mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Keep track of the order in which option elements are selected
This allows us to locate the most-recently-selected when running the selectedness update algorithm.
This commit is contained in:
committed by
Andreas Kling
parent
581597cb34
commit
dc9179bb1b
@@ -21,6 +21,7 @@ public:
|
||||
bool selected() const { return m_selected; }
|
||||
void set_selected(bool);
|
||||
void set_selected_internal(bool);
|
||||
[[nodiscard]] u64 selectedness_update_index() const { return m_selectedness_update_index; }
|
||||
|
||||
String value() const;
|
||||
WebIDL::ExceptionOr<void> set_value(String const&);
|
||||
@@ -46,6 +47,9 @@ private:
|
||||
|
||||
virtual void attribute_changed(FlyString const& name, Optional<String> const& old_value, Optional<String> const& value, Optional<FlyString> const& namespace_) override;
|
||||
|
||||
virtual void inserted() override;
|
||||
virtual void removed_from(Node*) override;
|
||||
|
||||
void ask_for_a_reset();
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#concept-option-selectedness
|
||||
@@ -53,6 +57,8 @@ private:
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#concept-option-dirtiness
|
||||
bool m_dirty { false };
|
||||
|
||||
u64 m_selectedness_update_index { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user