mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb/CSS: Introduce OpenTypeTaggedStyleValue
Two font properties, font-feature-settings and font-variation-settings, contain a list of values that are an `<opentype-tag>` followed by a single value. This class is intended to fill both roles.
This commit is contained in:
parent
94b3b84dd8
commit
c22a2d8f2b
Notes:
github-actions[bot]
2024-10-02 15:38:16 +00:00
Author: https://github.com/AtkinsSJ
Commit: c22a2d8f2b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1599
6 changed files with 85 additions and 0 deletions
|
@ -117,6 +117,7 @@ public:
|
|||
Math,
|
||||
MathDepth,
|
||||
Number,
|
||||
OpenTypeTagged,
|
||||
Percentage,
|
||||
Position,
|
||||
RadialGradient,
|
||||
|
@ -260,6 +261,10 @@ public:
|
|||
NumberStyleValue const& as_number() const;
|
||||
NumberStyleValue& as_number() { return const_cast<NumberStyleValue&>(const_cast<CSSStyleValue const&>(*this).as_number()); }
|
||||
|
||||
bool is_open_type_tagged() const { return type() == Type::OpenTypeTagged; }
|
||||
OpenTypeTaggedStyleValue const& as_open_type_tagged() const;
|
||||
OpenTypeTaggedStyleValue& as_open_type_tagged() { return const_cast<OpenTypeTaggedStyleValue&>(const_cast<CSSStyleValue const&>(*this).as_open_type_tagged()); }
|
||||
|
||||
bool is_percentage() const { return type() == Type::Percentage; }
|
||||
PercentageStyleValue const& as_percentage() const;
|
||||
PercentageStyleValue& as_percentage() { return const_cast<PercentageStyleValue&>(const_cast<CSSStyleValue const&>(*this).as_percentage()); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue