mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-04 15:19:16 +00:00
LibWeb: Implement anchor-size(..)
function parsing
This parses `anchor-size(..)` functions in CSS, but does not yet result in a useful `Size`: we need style & layout interleaving similar to container queries for this, since the resulting value depends on layout results. Not supported yet: `anchor-size()` appearing inside a `calc()` node. Adds 4280 WPT subtest passes in `css/css-anchor-position`.
This commit is contained in:
parent
02598040ad
commit
c4f5e7bee3
Notes:
github-actions[bot]
2025-07-30 17:15:09 +00:00
Author: https://github.com/gmta
Commit: c4f5e7bee3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5655
Reviewed-by: https://github.com/tcl3 ✅
16 changed files with 318 additions and 3 deletions
|
@ -13,6 +13,7 @@
|
|||
#include <LibWeb/CSS/CSSStyleValue.h>
|
||||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/CSS/StyleValues/AbstractImageStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/AnchorSizeStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/AngleStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/BackgroundRepeatStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/BackgroundSizeStyleValue.h>
|
||||
|
@ -83,6 +84,12 @@ AbstractImageStyleValue const& CSSStyleValue::as_abstract_image() const
|
|||
return static_cast<AbstractImageStyleValue const&>(*this);
|
||||
}
|
||||
|
||||
AnchorSizeStyleValue const& CSSStyleValue::as_anchor_size() const
|
||||
{
|
||||
VERIFY(is_anchor_size());
|
||||
return static_cast<AnchorSizeStyleValue const&>(*this);
|
||||
}
|
||||
|
||||
AngleStyleValue const& CSSStyleValue::as_angle() const
|
||||
{
|
||||
VERIFY(is_angle());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue