mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 14:42:50 +02:00
LibWeb: Make input type state change handling specification compliant
This change ensures that the value sanitization algorithm is run and the text cursor is set to the correct position when the type attribute of an input is changed. (cherry picked from commit 1b74104c17726018788034f2ad66201889ce6225)
This commit is contained in:
committed by
Nico Weber
parent
f24a625eb0
commit
c7a699ed73
@@ -205,12 +205,16 @@ public:
|
||||
bool select_applies() const;
|
||||
bool selection_or_range_applies() const;
|
||||
|
||||
static bool selection_or_range_applies_for_type_state(TypeAttributeState);
|
||||
|
||||
protected:
|
||||
void selection_was_changed(size_t selection_start, size_t selection_end) override;
|
||||
|
||||
private:
|
||||
HTMLInputElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
void type_attribute_changed(TypeAttributeState old_state, TypeAttributeState new_state);
|
||||
|
||||
// ^DOM::Node
|
||||
virtual bool is_html_input_element() const final { return true; }
|
||||
|
||||
@@ -280,6 +284,7 @@ private:
|
||||
DefaultOn,
|
||||
Filename,
|
||||
};
|
||||
static ValueAttributeMode value_attribute_mode_for_type_state(TypeAttributeState);
|
||||
ValueAttributeMode value_attribute_mode() const;
|
||||
|
||||
void update_placeholder_visibility();
|
||||
|
||||
Reference in New Issue
Block a user