LibWeb: Rework obtaining resolved styles in the Editing API

The algorithm referenced to in the Editing spec whenever they talk about
obtaining the "resolved" style or value is actually implemented in
ResolvedCSSStyleDeclaration, so use that instead of going directly to
the computed styles.
This commit is contained in:
Jelle Raaijmakers 2024-12-18 12:22:45 +01:00 committed by Jelle Raaijmakers
commit 2c51ed8dec
Notes: github-actions[bot] 2024-12-21 18:17:40 +00:00
3 changed files with 79 additions and 34 deletions

View file

@ -90,5 +90,8 @@ GC::Ptr<DOM::Node> wrap(Vector<GC::Ref<DOM::Node>>, Function<bool(GC::Ref<DOM::N
bool has_visible_children(GC::Ref<DOM::Node>);
bool is_heading(FlyString const&);
Optional<CSS::Display> resolved_display(GC::Ref<DOM::Node>);
Optional<CSS::Keyword> resolved_keyword(GC::Ref<DOM::Node>, CSS::PropertyID);
Optional<NonnullRefPtr<CSS::CSSStyleValue const>> resolved_value(GC::Ref<DOM::Node>, CSS::PropertyID);
}