mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:48:14 +00:00
LibWeb: Move use pseudo element styles from TreeBuilder to StyleComputer
The styling of elements using the `use_pseudo_element()` was only applied on layout. When an element style was recomputed later that styling was not overruled with the pseudo element selector styles. This moves the styling override from `TreeBuilder.cpp` to `StyleComputer.cpp`. Now the styles are always correctly applied. I also removed the method `property_id_by_index()` because it was not needed anymore. Als some calls to `invalidate_layout()` in the Meter, Progress and Select elements where not needed anymore because the style values are update on the changing of the style attribute. This fixes issue #22278.
This commit is contained in:
parent
7578620f25
commit
a05fd28b7b
11 changed files with 44 additions and 49 deletions
|
@ -82,11 +82,6 @@ String ResolvedCSSStyleDeclaration::item(size_t index) const
|
|||
return MUST(String::from_utf8(string_from_property_id(property_id)));
|
||||
}
|
||||
|
||||
CSS::PropertyID ResolvedCSSStyleDeclaration::property_id_by_index(size_t index) const
|
||||
{
|
||||
return static_cast<PropertyID>(index + to_underlying(first_longhand_property_id));
|
||||
}
|
||||
|
||||
static NonnullRefPtr<StyleValue const> style_value_for_background_property(Layout::NodeWithStyle const& layout_node, Function<NonnullRefPtr<StyleValue const>(BackgroundLayerData const&)> callback, Function<NonnullRefPtr<StyleValue const>()> default_value)
|
||||
{
|
||||
auto const& background_layers = layout_node.background_layers();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue