mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibWeb/CSS: Implement guaranteed-invalid value
This is a special value produced when var/attr substitution fails, and is also the initial value for custom properties.
This commit is contained in:
parent
804c1eeeed
commit
d1dadd43a1
Notes:
github-actions[bot]
2025-05-14 10:48:18 +00:00
Author: https://github.com/AtkinsSJ
Commit: d1dadd43a1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4209
Reviewed-by: https://github.com/awesomekling
4 changed files with 46 additions and 0 deletions
|
@ -113,6 +113,7 @@ public:
|
|||
GridTemplateArea,
|
||||
GridTrackPlacement,
|
||||
GridTrackSizeList,
|
||||
GuaranteedInvalid,
|
||||
Image,
|
||||
Integer,
|
||||
Keyword,
|
||||
|
@ -258,6 +259,10 @@ public:
|
|||
GridTrackSizeListStyleValue const& as_grid_track_size_list() const;
|
||||
GridTrackSizeListStyleValue& as_grid_track_size_list() { return const_cast<GridTrackSizeListStyleValue&>(const_cast<CSSStyleValue const&>(*this).as_grid_track_size_list()); }
|
||||
|
||||
bool is_guaranteed_invalid() const { return type() == Type::GuaranteedInvalid; }
|
||||
GuaranteedInvalidStyleValue const& as_guaranteed_invalid() const;
|
||||
GuaranteedInvalidStyleValue& as_guaranteed_invalid() { return const_cast<GuaranteedInvalidStyleValue&>(const_cast<CSSStyleValue const&>(*this).as_guaranteed_invalid()); }
|
||||
|
||||
bool is_image() const { return type() == Type::Image; }
|
||||
ImageStyleValue const& as_image() const;
|
||||
ImageStyleValue& as_image() { return const_cast<ImageStyleValue&>(const_cast<CSSStyleValue const&>(*this).as_image()); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue