LibWeb: Recreate the <input> shadow tree when the type attribute changes

This is often used on login forms, for example, to toggle the visibility
of a password. The site will change the <input> element's type to "text"
to allow the password to show.
This commit is contained in:
Timothy Flynn
2024-04-04 12:37:27 -04:00
committed by Andreas Kling
parent 06a3ca734e
commit 0e774fe780
Notes: sideshowbarker 2024-07-17 01:46:43 +09:00
6 changed files with 67 additions and 1 deletions

View File

@@ -265,6 +265,7 @@ private:
JS::GCPtr<DOM::Element> m_placeholder_element;
JS::GCPtr<DOM::Text> m_placeholder_text_node;
void update_text_input_shadow_tree();
JS::GCPtr<DOM::Element> m_inner_text_element;
JS::GCPtr<DOM::Text> m_text_node;
bool m_checked { false };