LibWeb: Stop computing content in NodeWithStyle::apply_style()

This seems to have been required when pseudo-elements were first
implemented, but has since become unused. It's also awkward because we
don't have access to the DOM Element and its CountersSet at this point.
So, let's remove it.

For reference, Chrome&Firefox both return the computed value for
`content: counter(foo)` as `counter(foo)`, not as the computed string.
So not computing it here seems like the intended behaviour.
This commit is contained in:
Sam Atkins 2024-07-18 17:41:43 +01:00
parent 708f49d906
commit 6f2f91d1f5
Notes: github-actions[bot] 2024-07-26 10:05:55 +00:00

View file

@ -751,8 +751,6 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
if (auto outline_width = computed_style.property(CSS::PropertyID::OutlineWidth); outline_width->is_length()) if (auto outline_width = computed_style.property(CSS::PropertyID::OutlineWidth); outline_width->is_length())
computed_values.set_outline_width(outline_width->as_length().length()); computed_values.set_outline_width(outline_width->as_length().length());
// FIXME: Stop generating the content twice. (First time is in TreeBuilder.)
computed_values.set_content(computed_style.content(initial_quote_nesting_level()).content_data);
computed_values.set_grid_auto_columns(computed_style.grid_auto_columns()); computed_values.set_grid_auto_columns(computed_style.grid_auto_columns());
computed_values.set_grid_auto_rows(computed_style.grid_auto_rows()); computed_values.set_grid_auto_rows(computed_style.grid_auto_rows());
computed_values.set_grid_template_columns(computed_style.grid_template_columns()); computed_values.set_grid_template_columns(computed_style.grid_template_columns());