mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:28:13 +00:00
LibWeb: Cache HTMLInputElement's parsed type attribute when it changes
This will let us avoid parsing the type each time type() or type_state() are invoked.
This commit is contained in:
parent
1ac0116688
commit
95b084a08f
2 changed files with 19 additions and 0 deletions
|
@ -105,6 +105,7 @@ private:
|
|||
virtual void legacy_cancelled_activation_behavior() override;
|
||||
virtual void legacy_cancelled_activation_behavior_was_not_called() override;
|
||||
|
||||
static TypeAttributeState parse_type_attribute(StringView);
|
||||
void create_shadow_tree_if_needed();
|
||||
void run_input_activation_behavior();
|
||||
void set_checked_within_group();
|
||||
|
@ -121,6 +122,8 @@ private:
|
|||
// https://html.spec.whatwg.org/multipage/input.html#the-input-element:legacy-pre-activation-behavior
|
||||
bool m_before_legacy_pre_activation_behavior_checked { false };
|
||||
RefPtr<HTMLInputElement> m_legacy_pre_activation_behavior_checked_element_in_group;
|
||||
|
||||
TypeAttributeState m_type { TypeAttributeState::Text };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue