1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:37:35 +00:00

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
parent 6f45df5ced
commit 07039af982
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();