Skip to content

Commit

Permalink
[CSS Container Queries][Style queries] Resolve container units in sty…
Browse files Browse the repository at this point in the history
…le queries correctly

https://bugs.webkit.org/show_bug.cgi?id=270511
rdar://124058441

Reviewed by Antoine Quint.

* LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries-expected.txt:
* Source/WebCore/css/query/ContainerQueryFeatures.cpp:

Provide the context element so container units can be resolved.

Canonical link: https://commits.webkit.org/275689@main
  • Loading branch information
anttijk committed Mar 5, 2024
1 parent 75f6f39 commit e1b6c5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ PASS Match registered <length> custom property with px.
PASS Match registered <length> custom property with px via initial keyword.
PASS Match registered <length> custom property with em in query.
PASS Match registered <length> custom property with em in computed value.
FAIL Match registered <length> custom property with cqi unit. assert_equals: expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)"
PASS Match registered <length> custom property with cqi unit.
PASS Match registered <length> custom property with initial value.
PASS Match registered <length> custom property with initial value via initial keyword.
PASS Should only match exact string for numbers in non-registered custom properties
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/css/query/ContainerQueryFeatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ struct StyleFeatureSchema : public FeatureSchema {
context.document.get(),
*context.conversionData.parentStyle(),
context.conversionData.rootStyle(),
nullptr
context.conversionData.elementForContainerUnitResolution()
};

auto dummyStyle = RenderStyle::clone(style);
Expand Down

0 comments on commit e1b6c5a

Please sign in to comment.