mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
LibWeb: Render text inside <input type=password> as asterisks (*)
This makes it possible to enter passwords while recording YouTube videos. :^)
This commit is contained in:
@@ -344,6 +344,10 @@ void HTMLInputElement::create_shadow_tree_if_needed()
|
||||
m_text_node = heap().allocate<DOM::Text>(realm(), document(), initial_value);
|
||||
m_text_node->set_always_editable(m_type != TypeAttributeState::FileUpload);
|
||||
m_text_node->set_owner_input_element({}, *this);
|
||||
|
||||
if (m_type == TypeAttributeState::Password)
|
||||
m_text_node->set_is_password_input({}, true);
|
||||
|
||||
MUST(element->append_child(*m_text_node));
|
||||
MUST(shadow_root->append_child(move(element)));
|
||||
set_shadow_root(move(shadow_root));
|
||||
|
||||
Reference in New Issue
Block a user