WebContent+LibWeb: Display resolved pseudo-element style in inspector

This also now uses the cached computed style for them, instead of
computing it fresh each time.
This commit is contained in:
Sam Atkins 2024-08-06 15:39:57 +01:00 committed by Andreas Kling
commit 4ec3968178
Notes: github-actions[bot] 2024-08-07 14:15:38 +00:00
3 changed files with 6 additions and 9 deletions

View file

@ -607,9 +607,9 @@ CSS::RequiredInvalidationAfterStyleChange Element::recompute_style()
return invalidation;
}
NonnullRefPtr<CSS::StyleProperties> Element::resolved_css_values()
NonnullRefPtr<CSS::StyleProperties> Element::resolved_css_values(Optional<CSS::Selector::PseudoElement::Type> type)
{
auto element_computed_style = CSS::ResolvedCSSStyleDeclaration::create(*this);
auto element_computed_style = CSS::ResolvedCSSStyleDeclaration::create(*this, type);
auto properties = CSS::StyleProperties::create();
for (auto i = to_underlying(CSS::first_property_id); i <= to_underlying(CSS::last_property_id); ++i) {