mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 00:08:55 +00:00
LibWeb/CSS: Allow calc() values in media queries
It was initially thought that the spec disallows them, but this turned out to be incorrect. This fixes several WPT tests.
This commit is contained in:
parent
ad3dd547b7
commit
8bec80ac47
Notes:
github-actions[bot]
2024-12-04 12:39:02 +00:00
Author: https://github.com/milotier
Commit: 8bec80ac47
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2640
Reviewed-by: https://github.com/AtkinsSJ ✅
20 changed files with 439 additions and 52 deletions
|
@ -119,6 +119,8 @@ class IntegerOrCalculated : public CalculatedOr<i64> {
|
|||
public:
|
||||
using CalculatedOr<i64>::CalculatedOr;
|
||||
|
||||
[[nodiscard]] i64 resolved() const;
|
||||
|
||||
private:
|
||||
virtual i64 resolve_calculated(NonnullRefPtr<CSSMathValue> const&, Layout::Node const&) const override;
|
||||
virtual NonnullRefPtr<CSSStyleValue> create_style_value() const override;
|
||||
|
@ -157,6 +159,8 @@ class ResolutionOrCalculated : public CalculatedOr<Resolution> {
|
|||
public:
|
||||
using CalculatedOr<Resolution>::CalculatedOr;
|
||||
|
||||
[[nodiscard]] Resolution resolved() const;
|
||||
|
||||
private:
|
||||
virtual Resolution resolve_calculated(NonnullRefPtr<CSSMathValue> const&, Layout::Node const&) const override;
|
||||
virtual NonnullRefPtr<CSSStyleValue> create_style_value() const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue