Title: [291046] trunk
- Revision
- 291046
- Author
- an...@apple.com
- Date
- 2022-03-09 05:34:33 -0800 (Wed, 09 Mar 2022)
Log Message
[CSS Container Queries] Remove size() function syntax
https://bugs.webkit.org/show_bug.cgi?id=237639
Reviewed by Antoine Quint.
LayoutTests/imported/w3c:
* web-platform-tests/css/css-contain/container-queries/at-container-parsing-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-name-parsing-expected.txt:
Source/WebCore:
Per https://github.com/w3c/csswg-drafts/issues/6870
* css/ContainerQueryParser.cpp:
(WebCore::ContainerQueryParser::consumeContainerQuery):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeSingleContainerName):
Also disallow strings as container names (they need to be identifiers).
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (291045 => 291046)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-03-09 13:31:01 UTC (rev 291045)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-03-09 13:34:33 UTC (rev 291046)
@@ -1,3 +1,13 @@
+2022-03-09 Antti Koivisto <an...@apple.com>
+
+ [CSS Container Queries] Remove size() function syntax
+ https://bugs.webkit.org/show_bug.cgi?id=237639
+
+ Reviewed by Antoine Quint.
+
+ * web-platform-tests/css/css-contain/container-queries/at-container-parsing-expected.txt:
+ * web-platform-tests/css/css-contain/container-queries/container-name-parsing-expected.txt:
+
2022-03-09 Antoine Quint <grao...@webkit.org>
[web-animations] color-interpolation-filters should support discrete animation
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-parsing-expected.txt (291045 => 291046)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-parsing-expected.txt 2022-03-09 13:31:01 UTC (rev 291045)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-parsing-expected.txt 2022-03-09 13:34:33 UTC (rev 291046)
@@ -24,7 +24,7 @@
PASS (100px < width)
PASS (100px < width < 200px)
PASS foo(width)
-FAIL size(width) assert_equals: expected "" but got "true"
+PASS size(width)
PASS (asdf)
PASS (resolution > 100dpi)
PASS (resolution: 150dpi)
@@ -50,6 +50,6 @@
PASS Container selector: 50gil
PASS Container selector: name(foo)
PASS Container selector: type(inline-size)
-FAIL Container selector: "foo" assert_equals: expected 0 but got 1
-FAIL Container selector: "inherit" assert_equals: expected 0 but got 1
+PASS Container selector: "foo"
+PASS Container selector: "inherit"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-name-parsing-expected.txt (291045 => 291046)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-name-parsing-expected.txt 2022-03-09 13:31:01 UTC (rev 291045)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-name-parsing-expected.txt 2022-03-09 13:34:33 UTC (rev 291046)
@@ -12,10 +12,10 @@
PASS e.style['container-name'] = "#fff" should not set the property value
PASS e.style['container-name'] = "1px" should not set the property value
PASS e.style['container-name'] = "default" should not set the property value
-FAIL e.style['container-name'] = "\"initial\"" should not set the property value assert_equals: expected "" but got "\"initial\""
-FAIL e.style['container-name'] = "\"inherit\"" should not set the property value assert_equals: expected "" but got "\"inherit\""
-FAIL e.style['container-name'] = "\"unset\"" should not set the property value assert_equals: expected "" but got "\"unset\""
-FAIL e.style['container-name'] = "\"revert\"" should not set the property value assert_equals: expected "" but got "\"revert\""
-FAIL e.style['container-name'] = "\"none\"" should not set the property value assert_equals: expected "" but got "\"none\""
-FAIL e.style['container-name'] = "\"foo\"" should not set the property value assert_equals: expected "" but got "\"foo\""
+PASS e.style['container-name'] = "\"initial\"" should not set the property value
+PASS e.style['container-name'] = "\"inherit\"" should not set the property value
+PASS e.style['container-name'] = "\"unset\"" should not set the property value
+PASS e.style['container-name'] = "\"revert\"" should not set the property value
+PASS e.style['container-name'] = "\"none\"" should not set the property value
+PASS e.style['container-name'] = "\"foo\"" should not set the property value
Modified: trunk/Source/WebCore/ChangeLog (291045 => 291046)
--- trunk/Source/WebCore/ChangeLog 2022-03-09 13:31:01 UTC (rev 291045)
+++ trunk/Source/WebCore/ChangeLog 2022-03-09 13:34:33 UTC (rev 291046)
@@ -1,3 +1,19 @@
+2022-03-09 Antti Koivisto <an...@apple.com>
+
+ [CSS Container Queries] Remove size() function syntax
+ https://bugs.webkit.org/show_bug.cgi?id=237639
+
+ Reviewed by Antoine Quint.
+
+ Per https://github.com/w3c/csswg-drafts/issues/6870
+
+ * css/ContainerQueryParser.cpp:
+ (WebCore::ContainerQueryParser::consumeContainerQuery):
+ * css/parser/CSSPropertyParserHelpers.cpp:
+ (WebCore::CSSPropertyParserHelpers::consumeSingleContainerName):
+
+ Also disallow strings as container names (they need to be identifiers).
+
2022-03-09 Fujii Hironori <hironori.fu...@sony.com>
[WinCairo] SpatialNavigation.h(93): error C2365: 'WebCore::None': redefinition; previous definition was 'enumerator'
Modified: trunk/Source/WebCore/css/ContainerQueryParser.cpp (291045 => 291046)
--- trunk/Source/WebCore/css/ContainerQueryParser.cpp 2022-03-09 13:31:01 UTC (rev 291045)
+++ trunk/Source/WebCore/css/ContainerQueryParser.cpp 2022-03-09 13:34:33 UTC (rev 291046)
@@ -39,18 +39,9 @@
std::optional<CQ::ContainerQuery> ContainerQueryParser::consumeContainerQuery(CSSParserTokenRange& range)
{
if (range.peek().type() == FunctionToken) {
- bool isSizeQuery = range.peek().functionId() == CSSValueSize;
-
- auto blockRange = range.consumeBlock();
- blockRange.consumeWhitespace();
-
- if (!isSizeQuery)
- return CQ::UnknownQuery { };
-
- auto sizeQuery = consumeSizeQuery(blockRange);
- if (!sizeQuery)
- return { };
- return { *sizeQuery };
+ range.consumeBlock();
+ // This is where we would support style() queries.
+ return CQ::UnknownQuery { };
}
if (range.peek().type() == LeftParenthesisToken) {
Modified: trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp (291045 => 291046)
--- trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp 2022-03-09 13:31:01 UTC (rev 291045)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp 2022-03-09 13:34:33 UTC (rev 291046)
@@ -4285,8 +4285,6 @@
return nullptr;
if (auto ident = consumeCustomIdent(range))
return ident;
- if (auto string = consumeString(range))
- return string;
return nullptr;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes