LibWeb: Implement attr() types :^)

Support the optional `<attr-type>` parameter to the `attr()` function,
which allows parsing the attribute's value as a variety of types,
instead of always as a string.
This commit is contained in:
Sam Atkins 2023-09-04 12:57:12 +01:00 committed by Andreas Kling
commit 07039af982
Notes: sideshowbarker 2024-07-17 06:54:15 +09:00
6 changed files with 240 additions and 18 deletions

View file

@ -68,6 +68,8 @@ public:
RefPtr<StyleValue> parse_as_css_value(PropertyID);
Optional<ComponentValue> parse_as_component_value();
static NonnullRefPtr<StyleValue> resolve_unresolved_style_value(Badge<StyleComputer>, ParsingContext const&, DOM::Element&, Optional<CSS::Selector::PseudoElement>, PropertyID, UnresolvedStyleValue const&);
[[nodiscard]] LengthOrCalculated parse_as_sizes_attribute();