Title: [290422] trunk
Revision
290422
Author
mrobin...@webkit.org
Date
2022-02-24 03:57:47 -0800 (Thu, 24 Feb 2022)

Log Message

Implement logical properties for CSS overscroll-behavior
https://bugs.webkit.org/show_bug.cgi?id=237080

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-overscroll-behavior/inheritance-expected.txt: Update expectations for passing tests.
* web-platform-tests/css/css-overscroll-behavior/overscroll-behavior-logical-expected.txt: Ditto.
* web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed-expected.txt: Ditto.
* web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid-expected.txt: Ditto.

Source/WebCore:

No new tests. This is covered by existing WPT tests.

Add support for overscroll-behavior-block and overscroll-behavior-inline, the logical versions
of the overscroll behavior properties.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* css/CSSProperties.json:
* css/parser/CSSParserContext.cpp:
(WebCore::CSSParserContext::isPropertyRuntimeDisabled const):
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseSingleValue):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (290421 => 290422)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-24 11:13:46 UTC (rev 290421)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-24 11:57:47 UTC (rev 290422)
@@ -1,3 +1,15 @@
+2022-02-24  Martin Robinson  <mrobin...@webkit.org>
+
+        Implement logical properties for CSS overscroll-behavior
+        https://bugs.webkit.org/show_bug.cgi?id=237080
+
+        Reviewed by Simon Fraser.
+
+        * web-platform-tests/css/css-overscroll-behavior/inheritance-expected.txt: Update expectations for passing tests.
+        * web-platform-tests/css/css-overscroll-behavior/overscroll-behavior-logical-expected.txt: Ditto.
+        * web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed-expected.txt: Ditto.
+        * web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid-expected.txt: Ditto.
+
 2022-02-23  Antti Koivisto  <an...@apple.com>
 
         [CSS Container Queries] offsetWidth/Height and similar should update layout for container queries

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/inheritance-expected.txt (290421 => 290422)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/inheritance-expected.txt	2022-02-24 11:13:46 UTC (rev 290421)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/inheritance-expected.txt	2022-02-24 11:57:47 UTC (rev 290422)
@@ -1,8 +1,8 @@
 
-FAIL Property overscroll-behavior-block has initial value auto assert_true: overscroll-behavior-block doesn't seem to be supported in the computed style expected true got false
-FAIL Property overscroll-behavior-block does not inherit assert_true: expected true got false
-FAIL Property overscroll-behavior-inline has initial value auto assert_true: overscroll-behavior-inline doesn't seem to be supported in the computed style expected true got false
-FAIL Property overscroll-behavior-inline does not inherit assert_true: expected true got false
+PASS Property overscroll-behavior-block has initial value auto
+PASS Property overscroll-behavior-block does not inherit
+PASS Property overscroll-behavior-inline has initial value auto
+PASS Property overscroll-behavior-inline does not inherit
 PASS Property overscroll-behavior-x has initial value auto
 PASS Property overscroll-behavior-x does not inherit
 PASS Property overscroll-behavior-y has initial value auto

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/overscroll-behavior-logical-expected.txt (290421 => 290422)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/overscroll-behavior-logical-expected.txt	2022-02-24 11:13:46 UTC (rev 290421)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/overscroll-behavior-logical-expected.txt	2022-02-24 11:57:47 UTC (rev 290422)
@@ -1,5 +1,5 @@
 
-FAIL Logical overscroll-behavior maps correctly when element has horizontal-tb writing mode assert_equals: expected "none" but got "auto"
-FAIL Logical overscroll-behavior maps correctly when element has vertical-rl writing mode assert_equals: expected "contain" but got "auto"
-FAIL Logical overscroll-behavior maps correctly when element has horizontal-tb writing mode and is not affected by rtl direction assert_equals: expected "none" but got "auto"
+PASS Logical overscroll-behavior maps correctly when element has horizontal-tb writing mode
+PASS Logical overscroll-behavior maps correctly when element has vertical-rl writing mode
+PASS Logical overscroll-behavior maps correctly when element has horizontal-tb writing mode and is not affected by rtl direction
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed-expected.txt (290421 => 290422)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed-expected.txt	2022-02-24 11:13:46 UTC (rev 290421)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed-expected.txt	2022-02-24 11:57:47 UTC (rev 290422)
@@ -5,10 +5,10 @@
 PASS Property overscroll-behavior-y value 'contain'
 PASS Property overscroll-behavior-y value 'none'
 PASS Property overscroll-behavior-y value 'auto'
-FAIL Property overscroll-behavior-inline value 'contain' assert_true: overscroll-behavior-inline doesn't seem to be supported in the computed style expected true got false
-FAIL Property overscroll-behavior-inline value 'none' assert_true: overscroll-behavior-inline doesn't seem to be supported in the computed style expected true got false
-FAIL Property overscroll-behavior-inline value 'auto' assert_true: overscroll-behavior-inline doesn't seem to be supported in the computed style expected true got false
-FAIL Property overscroll-behavior-block value 'contain' assert_true: overscroll-behavior-block doesn't seem to be supported in the computed style expected true got false
-FAIL Property overscroll-behavior-block value 'none' assert_true: overscroll-behavior-block doesn't seem to be supported in the computed style expected true got false
-FAIL Property overscroll-behavior-block value 'auto' assert_true: overscroll-behavior-block doesn't seem to be supported in the computed style expected true got false
+PASS Property overscroll-behavior-inline value 'contain'
+PASS Property overscroll-behavior-inline value 'none'
+PASS Property overscroll-behavior-inline value 'auto'
+PASS Property overscroll-behavior-block value 'contain'
+PASS Property overscroll-behavior-block value 'none'
+PASS Property overscroll-behavior-block value 'auto'
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid-expected.txt (290421 => 290422)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid-expected.txt	2022-02-24 11:13:46 UTC (rev 290421)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid-expected.txt	2022-02-24 11:57:47 UTC (rev 290422)
@@ -14,10 +14,10 @@
 PASS e.style['overscroll-behavior-y'] = "contain" should set the property value
 PASS e.style['overscroll-behavior-y'] = "none" should set the property value
 PASS e.style['overscroll-behavior-y'] = "auto" should set the property value
-FAIL e.style['overscroll-behavior-inline'] = "contain" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['overscroll-behavior-inline'] = "none" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['overscroll-behavior-inline'] = "auto" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['overscroll-behavior-block'] = "contain" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['overscroll-behavior-block'] = "none" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['overscroll-behavior-block'] = "auto" should set the property value assert_not_equals: property should be set got disallowed value ""
+PASS e.style['overscroll-behavior-inline'] = "contain" should set the property value
+PASS e.style['overscroll-behavior-inline'] = "none" should set the property value
+PASS e.style['overscroll-behavior-inline'] = "auto" should set the property value
+PASS e.style['overscroll-behavior-block'] = "contain" should set the property value
+PASS e.style['overscroll-behavior-block'] = "none" should set the property value
+PASS e.style['overscroll-behavior-block'] = "auto" should set the property value
 

Modified: trunk/Source/WebCore/ChangeLog (290421 => 290422)


--- trunk/Source/WebCore/ChangeLog	2022-02-24 11:13:46 UTC (rev 290421)
+++ trunk/Source/WebCore/ChangeLog	2022-02-24 11:57:47 UTC (rev 290422)
@@ -1,3 +1,26 @@
+2022-02-24  Martin Robinson  <mrobin...@webkit.org>
+
+        Implement logical properties for CSS overscroll-behavior
+        https://bugs.webkit.org/show_bug.cgi?id=237080
+
+        Reviewed by Simon Fraser.
+
+        No new tests. This is covered by existing WPT tests.
+
+        Add support for overscroll-behavior-block and overscroll-behavior-inline, the logical versions
+        of the overscroll behavior properties.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
+        * css/CSSProperties.json:
+        * css/parser/CSSParserContext.cpp:
+        (WebCore::CSSParserContext::isPropertyRuntimeDisabled const):
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
+        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::CSSPropertyParser::parseSingleValue):
+
 2022-02-24  Carlos Garcia Campos  <cgar...@igalia.com>
 
         Unreviewed. [GTK] Mark GLContextGLX.cpp as no-unify

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (290421 => 290422)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2022-02-24 11:13:46 UTC (rev 290421)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2022-02-24 11:57:47 UTC (rev 290422)
@@ -4210,6 +4210,8 @@
         case CSSPropertyMarginBlockStart:
         case CSSPropertyMarginInlineEnd:
         case CSSPropertyMarginInlineStart:
+        case CSSPropertyOverscrollBehaviorInline:
+        case CSSPropertyOverscrollBehaviorBlock:
         case CSSPropertyPaddingBlockEnd:
         case CSSPropertyPaddingBlockStart:
         case CSSPropertyPaddingInlineEnd:

Modified: trunk/Source/WebCore/css/CSSProperties.json (290421 => 290422)


--- trunk/Source/WebCore/css/CSSProperties.json	2022-02-24 11:13:46 UTC (rev 290421)
+++ trunk/Source/WebCore/css/CSSProperties.json	2022-02-24 11:57:47 UTC (rev 290422)
@@ -3910,7 +3910,11 @@
                 "auto"
             ],
             "codegen-properties": {
-                "settings-flag": "overscrollBehaviorEnabled"
+                "settings-flag": "overscrollBehaviorEnabled",
+                "logical-property-group": {
+                    "name": "overscroll-behavior",
+                    "resolver": "horizontal"
+                }
             },
             "status": {
                 "status": "in development"
@@ -3926,7 +3930,11 @@
                 "auto"
             ],
             "codegen-properties": {
-                "settings-flag": "overscrollBehaviorEnabled"
+                "settings-flag": "overscrollBehaviorEnabled",
+                "logical-property-group": {
+                    "name": "overscroll-behavior",
+                    "resolver": "vertical"
+                }
             },
             "status": {
                 "status": "in development"
@@ -3935,6 +3943,48 @@
                 "url": "https://drafts.csswg.org/css-overscroll-1/#propdef-overscroll-behavior-y"
             }
         },
+        "overscroll-behavior-inline": {
+            "values": [
+                "contain",
+                "none",
+                "auto"
+            ],
+            "codegen-properties": {
+                "settings-flag": "overscrollBehaviorEnabled",
+                "skip-builder": true,
+                "logical-property-group": {
+                    "name": "overscroll-behavior",
+                    "resolver": "inline"
+                }
+            },
+            "status": {
+                "status": "in development"
+            },
+            "specification": {
+                "url": "https://drafts.csswg.org/css-overscroll-1/#propdef-overscroll-behavior-x"
+            }
+        },
+        "overscroll-behavior-block": {
+            "values": [
+                "contain",
+                "none",
+                "auto"
+            ],
+            "codegen-properties": {
+                "settings-flag": "overscrollBehaviorEnabled",
+                "skip-builder": true,
+                "logical-property-group": {
+                    "name": "overscroll-behavior",
+                    "resolver": "block"
+                }
+            },
+            "status": {
+                "status": "in development"
+            },
+            "specification": {
+                "url": "https://drafts.csswg.org/css-overscroll-1/#propdef-overscroll-behavior-x"
+            }
+        },
         "pad": {
             "codegen-properties": {
                 "descriptor-only": true,

Modified: trunk/Source/WebCore/css/parser/CSSParserContext.cpp (290421 => 290422)


--- trunk/Source/WebCore/css/parser/CSSParserContext.cpp	2022-02-24 11:13:46 UTC (rev 290421)
+++ trunk/Source/WebCore/css/parser/CSSParserContext.cpp	2022-02-24 11:57:47 UTC (rev 290422)
@@ -244,6 +244,8 @@
     case CSSPropertyScale:
         return !individualTransformPropertiesEnabled;
     case CSSPropertyOverscrollBehavior:
+    case CSSPropertyOverscrollBehaviorBlock:
+    case CSSPropertyOverscrollBehaviorInline:
     case CSSPropertyOverscrollBehaviorX:
     case CSSPropertyOverscrollBehaviorY:
         return !overscrollBehaviorEnabled;

Modified: trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp (290421 => 290422)


--- trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp	2022-02-24 11:13:46 UTC (rev 290421)
+++ trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp	2022-02-24 11:57:47 UTC (rev 290422)
@@ -683,6 +683,8 @@
         if (context.overflowClipEnabled && valueID == CSSValueClip)
             return true;
         return valueID == CSSValueVisible || valueID == CSSValueHidden || valueID == CSSValueScroll || valueID == CSSValueAuto || valueID == CSSValueOverlay || valueID == CSSValueWebkitPagedX || valueID == CSSValueWebkitPagedY;
+    case CSSPropertyOverscrollBehaviorBlock:
+    case CSSPropertyOverscrollBehaviorInline:
     case CSSPropertyOverscrollBehaviorX:
     case CSSPropertyOverscrollBehaviorY:
         if (!context.overscrollBehaviorEnabled)
@@ -949,6 +951,8 @@
     case CSSPropertyOverflowWrap:
     case CSSPropertyOverflowX:
     case CSSPropertyOverflowY:
+    case CSSPropertyOverscrollBehaviorBlock:
+    case CSSPropertyOverscrollBehaviorInline:
     case CSSPropertyOverscrollBehaviorX:
     case CSSPropertyOverscrollBehaviorY:
     case CSSPropertyPointerEvents:

Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (290421 => 290422)


--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2022-02-24 11:13:46 UTC (rev 290421)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2022-02-24 11:57:47 UTC (rev 290422)
@@ -4347,6 +4347,8 @@
         if (!m_context.scrollBehaviorEnabled)
             return nullptr;
         return consumeScrollBehavior(m_range);
+    case CSSPropertyOverscrollBehaviorBlock:
+    case CSSPropertyOverscrollBehaviorInline:
     case CSSPropertyOverscrollBehaviorX:
     case CSSPropertyOverscrollBehaviorY:
         if (!m_context.overscrollBehaviorEnabled)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to