mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Add a flag for UA internal shadow roots
This commit is contained in:
committed by
Sam Atkins
parent
853526200a
commit
73fcbb0666
Notes:
github-actions[bot]
2026-02-06 10:46:15 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/73fcbb06666 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7721 Reviewed-by: https://github.com/AtkinsSJ ✅ Reviewed-by: https://github.com/awesomekling ✅ Reviewed-by: https://github.com/konradekk
@@ -1086,6 +1086,7 @@ void HTMLInputElement::update_shadow_tree()
|
||||
void HTMLInputElement::create_button_input_shadow_tree()
|
||||
{
|
||||
auto shadow_root = realm().create<DOM::ShadowRoot>(document(), *this, Bindings::ShadowRootMode::Closed);
|
||||
shadow_root->set_user_agent_internal(true);
|
||||
set_shadow_root(shadow_root);
|
||||
auto text_container = MUST(DOM::create_element(document(), HTML::TagNames::span, Namespace::HTML));
|
||||
text_container->set_attribute_value(HTML::AttributeNames::style, "display: inline-block; pointer-events: none;"_string);
|
||||
@@ -1098,6 +1099,7 @@ void HTMLInputElement::create_button_input_shadow_tree()
|
||||
void HTMLInputElement::create_text_input_shadow_tree()
|
||||
{
|
||||
auto shadow_root = realm().create<DOM::ShadowRoot>(document(), *this, Bindings::ShadowRootMode::Closed);
|
||||
shadow_root->set_user_agent_internal(true);
|
||||
set_shadow_root(shadow_root);
|
||||
|
||||
auto element = MUST(DOM::create_element(document(), HTML::TagNames::div, Namespace::HTML));
|
||||
@@ -1225,6 +1227,7 @@ void HTMLInputElement::create_text_input_shadow_tree()
|
||||
void HTMLInputElement::create_color_input_shadow_tree()
|
||||
{
|
||||
auto shadow_root = realm().create<DOM::ShadowRoot>(document(), *this, Bindings::ShadowRootMode::Closed);
|
||||
shadow_root->set_user_agent_internal(true);
|
||||
|
||||
auto color = value_sanitization_algorithm(m_value);
|
||||
|
||||
@@ -1264,6 +1267,7 @@ void HTMLInputElement::create_file_input_shadow_tree()
|
||||
auto& realm = this->realm();
|
||||
|
||||
auto shadow_root = realm.create<DOM::ShadowRoot>(document(), *this, Bindings::ShadowRootMode::Closed);
|
||||
shadow_root->set_user_agent_internal(true);
|
||||
|
||||
m_file_button = DOM::create_element(document(), HTML::TagNames::button, Namespace::HTML).release_value_but_fixme_should_propagate_errors();
|
||||
m_file_button->set_use_pseudo_element(CSS::PseudoElement::FileSelectorButton);
|
||||
@@ -1309,6 +1313,7 @@ void HTMLInputElement::update_file_input_shadow_tree()
|
||||
void HTMLInputElement::create_range_input_shadow_tree()
|
||||
{
|
||||
auto shadow_root = realm().create<DOM::ShadowRoot>(document(), *this, Bindings::ShadowRootMode::Closed);
|
||||
shadow_root->set_user_agent_internal(true);
|
||||
set_shadow_root(shadow_root);
|
||||
|
||||
m_slider_runnable_track = MUST(DOM::create_element(document(), HTML::TagNames::div, Namespace::HTML));
|
||||
|
||||
Reference in New Issue
Block a user