LibWeb: Replace ::-webkit pseudo-elements with ones from CSS Forms spec

This spec is very early on, and likely to change. However, it still
feels preferable to use these rather than the prefixed -webkit ones.

Plus, as we have a `::fill` on range inputs, we can use that for styling
the bar instead of inserting CSS from C++.
This commit is contained in:
Sam Atkins 2025-03-18 15:57:43 +00:00
parent f5a6704219
commit 3ebdb64fed
Notes: github-actions[bot] 2025-03-19 10:11:17 +00:00
6 changed files with 85 additions and 81 deletions

View file

@ -118,11 +118,11 @@ void HTMLProgressElement::create_shadow_tree_if_needed()
set_shadow_root(shadow_root);
auto progress_bar_element = MUST(DOM::create_element(document(), HTML::TagNames::div, Namespace::HTML));
progress_bar_element->set_use_pseudo_element(CSS::Selector::PseudoElement::Type::ProgressBar);
progress_bar_element->set_use_pseudo_element(CSS::Selector::PseudoElement::Type::Track);
MUST(shadow_root->append_child(*progress_bar_element));
m_progress_value_element = MUST(DOM::create_element(document(), HTML::TagNames::div, Namespace::HTML));
m_progress_value_element->set_use_pseudo_element(CSS::Selector::PseudoElement::Type::ProgressValue);
m_progress_value_element->set_use_pseudo_element(CSS::Selector::PseudoElement::Type::Fill);
MUST(progress_bar_element->append_child(*m_progress_value_element));
update_progress_value_element();
}