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
Libraries/LibWeb/HTML

View file

@ -197,7 +197,7 @@ void HTMLMeterElement::create_shadow_tree_if_needed()
set_shadow_root(shadow_root);
auto meter_bar_element = MUST(DOM::create_element(document(), HTML::TagNames::div, Namespace::HTML));
meter_bar_element->set_use_pseudo_element(CSS::Selector::PseudoElement::Type::MeterBar);
meter_bar_element->set_use_pseudo_element(CSS::Selector::PseudoElement::Type::Track);
MUST(shadow_root->append_child(*meter_bar_element));
m_meter_value_element = MUST(DOM::create_element(document(), HTML::TagNames::div, Namespace::HTML));