mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
LibWeb: Handle input element value setting & getting closer to the spec
We should not set the 'value' attribute when an input element's value is changed (by the user or programmatically). Instead, we should track the value internally and mark it with a dirty flag when it is changed.
This commit is contained in:
parent
31b24c2b29
commit
859a75fd4c
Notes:
sideshowbarker
2024-07-17 16:54:56 +09:00
Author: https://github.com/trflynn89
Commit: 859a75fd4c
Pull-request: https://github.com/SerenityOS/serenity/pull/13195
2 changed files with 36 additions and 10 deletions
|
@ -119,11 +119,15 @@ private:
|
|||
// https://html.spec.whatwg.org/multipage/input.html#concept-input-checked-dirty-flag
|
||||
bool m_dirty_checkedness { false };
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-fe-dirty
|
||||
bool m_dirty_value { false };
|
||||
|
||||
// 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 };
|
||||
String m_value;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue