LibWeb: Add textarea readonly support

This commit is contained in:
Bastiaan van der Plaat 2024-02-26 19:12:32 +01:00 committed by Tim Flynn
parent 9aa31157d5
commit 05e78dabdb
Notes: sideshowbarker 2024-07-18 05:37:06 +09:00
6 changed files with 42 additions and 6 deletions

View file

@ -94,6 +94,8 @@ private:
void create_shadow_tree_if_needed();
void handle_readonly_attribute(Optional<String> const& value);
void update_placeholder_visibility();
JS::GCPtr<DOM::Element> m_placeholder_element;
JS::GCPtr<DOM::Text> m_placeholder_text_node;
@ -101,7 +103,13 @@ private:
JS::GCPtr<DOM::Element> m_inner_text_element;
JS::GCPtr<DOM::Text> m_text_node;
bool m_dirty { 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/form-elements.html#the-textarea-element:concept-fe-mutable
bool m_is_mutable { true };
// https://html.spec.whatwg.org/multipage/form-elements.html#concept-textarea-raw-value
String m_raw_value;
};