mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
LibWeb: Support multi-keyword syntax for CSS display property
The Display class already supported all specific values, and now they will be parsed too. The display property now has a special type DisplayStyleValue.
This commit is contained in:
parent
81c11bc6f2
commit
31e1be0438
13 changed files with 249 additions and 55 deletions
|
@ -98,6 +98,7 @@ public:
|
|||
Color,
|
||||
ConicGradient,
|
||||
Content,
|
||||
Display,
|
||||
Edge,
|
||||
FilterValueList,
|
||||
Flex,
|
||||
|
@ -150,6 +151,7 @@ public:
|
|||
bool is_color() const { return type() == Type::Color; }
|
||||
bool is_conic_gradient() const { return type() == Type::ConicGradient; }
|
||||
bool is_content() const { return type() == Type::Content; }
|
||||
bool is_display() const { return type() == Type::Display; }
|
||||
bool is_edge() const { return type() == Type::Edge; }
|
||||
bool is_filter_value_list() const { return type() == Type::FilterValueList; }
|
||||
bool is_flex() const { return type() == Type::Flex; }
|
||||
|
@ -200,6 +202,7 @@ public:
|
|||
ColorStyleValue const& as_color() const;
|
||||
ConicGradientStyleValue const& as_conic_gradient() const;
|
||||
ContentStyleValue const& as_content() const;
|
||||
DisplayStyleValue const& as_display() const;
|
||||
EdgeStyleValue const& as_edge() const;
|
||||
FilterValueListStyleValue const& as_filter_value_list() const;
|
||||
FlexFlowStyleValue const& as_flex_flow() const;
|
||||
|
@ -248,6 +251,7 @@ public:
|
|||
ColorStyleValue& as_color() { return const_cast<ColorStyleValue&>(const_cast<StyleValue const&>(*this).as_color()); }
|
||||
ConicGradientStyleValue& as_conic_gradient() { return const_cast<ConicGradientStyleValue&>(const_cast<StyleValue const&>(*this).as_conic_gradient()); }
|
||||
ContentStyleValue& as_content() { return const_cast<ContentStyleValue&>(const_cast<StyleValue const&>(*this).as_content()); }
|
||||
DisplayStyleValue& as_display() { return const_cast<DisplayStyleValue&>(const_cast<StyleValue const&>(*this).as_display()); }
|
||||
EdgeStyleValue& as_edge() { return const_cast<EdgeStyleValue&>(const_cast<StyleValue const&>(*this).as_edge()); }
|
||||
FilterValueListStyleValue& as_filter_value_list() { return const_cast<FilterValueListStyleValue&>(const_cast<StyleValue const&>(*this).as_filter_value_list()); }
|
||||
FlexFlowStyleValue& as_flex_flow() { return const_cast<FlexFlowStyleValue&>(const_cast<StyleValue const&>(*this).as_flex_flow()); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue