Changeset 290422 in webkit


Ignore:
Timestamp:
Feb 24, 2022, 3:57:47 AM (3 years ago)
Author:
Martin Robinson
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):

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r290380 r290422  
     12022-02-24  Martin Robinson  <mrobinson@webkit.org>
     2
     3        Implement logical properties for CSS overscroll-behavior
     4        https://bugs.webkit.org/show_bug.cgi?id=237080
     5
     6        Reviewed by Simon Fraser.
     7
     8        * web-platform-tests/css/css-overscroll-behavior/inheritance-expected.txt: Update expectations for passing tests.
     9        * web-platform-tests/css/css-overscroll-behavior/overscroll-behavior-logical-expected.txt: Ditto.
     10        * web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed-expected.txt: Ditto.
     11        * web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid-expected.txt: Ditto.
     12
    1132022-02-23  Antti Koivisto  <antti@apple.com>
    214
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/inheritance-expected.txt

    r270613 r290422  
    11
    2 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
    3 FAIL Property overscroll-behavior-block does not inherit assert_true: expected true got false
    4 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
    5 FAIL Property overscroll-behavior-inline does not inherit assert_true: expected true got false
     2PASS Property overscroll-behavior-block has initial value auto
     3PASS Property overscroll-behavior-block does not inherit
     4PASS Property overscroll-behavior-inline has initial value auto
     5PASS Property overscroll-behavior-inline does not inherit
    66PASS Property overscroll-behavior-x has initial value auto
    77PASS Property overscroll-behavior-x does not inherit
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/overscroll-behavior-logical-expected.txt

    r270613 r290422  
    11
    2 FAIL Logical overscroll-behavior maps correctly when element has horizontal-tb writing mode assert_equals: expected "none" but got "auto"
    3 FAIL Logical overscroll-behavior maps correctly when element has vertical-rl writing mode assert_equals: expected "contain" but got "auto"
    4 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"
     2PASS Logical overscroll-behavior maps correctly when element has horizontal-tb writing mode
     3PASS Logical overscroll-behavior maps correctly when element has vertical-rl writing mode
     4PASS Logical overscroll-behavior maps correctly when element has horizontal-tb writing mode and is not affected by rtl direction
    55
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed-expected.txt

    r270613 r290422  
    66PASS Property overscroll-behavior-y value 'none'
    77PASS Property overscroll-behavior-y value 'auto'
    8 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
    9 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
    10 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
    11 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
    12 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
    13 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
     8PASS Property overscroll-behavior-inline value 'contain'
     9PASS Property overscroll-behavior-inline value 'none'
     10PASS Property overscroll-behavior-inline value 'auto'
     11PASS Property overscroll-behavior-block value 'contain'
     12PASS Property overscroll-behavior-block value 'none'
     13PASS Property overscroll-behavior-block value 'auto'
    1414
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid-expected.txt

    r270613 r290422  
    1515PASS e.style['overscroll-behavior-y'] = "none" should set the property value
    1616PASS e.style['overscroll-behavior-y'] = "auto" should set the property value
    17 FAIL e.style['overscroll-behavior-inline'] = "contain" should set the property value assert_not_equals: property should be set got disallowed value ""
    18 FAIL e.style['overscroll-behavior-inline'] = "none" should set the property value assert_not_equals: property should be set got disallowed value ""
    19 FAIL e.style['overscroll-behavior-inline'] = "auto" should set the property value assert_not_equals: property should be set got disallowed value ""
    20 FAIL e.style['overscroll-behavior-block'] = "contain" should set the property value assert_not_equals: property should be set got disallowed value ""
    21 FAIL e.style['overscroll-behavior-block'] = "none" should set the property value assert_not_equals: property should be set got disallowed value ""
    22 FAIL e.style['overscroll-behavior-block'] = "auto" should set the property value assert_not_equals: property should be set got disallowed value ""
     17PASS e.style['overscroll-behavior-inline'] = "contain" should set the property value
     18PASS e.style['overscroll-behavior-inline'] = "none" should set the property value
     19PASS e.style['overscroll-behavior-inline'] = "auto" should set the property value
     20PASS e.style['overscroll-behavior-block'] = "contain" should set the property value
     21PASS e.style['overscroll-behavior-block'] = "none" should set the property value
     22PASS e.style['overscroll-behavior-block'] = "auto" should set the property value
    2323
  • trunk/Source/WebCore/ChangeLog

    r290419 r290422  
     12022-02-24  Martin Robinson  <mrobinson@webkit.org>
     2
     3        Implement logical properties for CSS overscroll-behavior
     4        https://bugs.webkit.org/show_bug.cgi?id=237080
     5
     6        Reviewed by Simon Fraser.
     7
     8        No new tests. This is covered by existing WPT tests.
     9
     10        Add support for overscroll-behavior-block and overscroll-behavior-inline, the logical versions
     11        of the overscroll behavior properties.
     12
     13        * css/CSSComputedStyleDeclaration.cpp:
     14        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
     15        * css/CSSProperties.json:
     16        * css/parser/CSSParserContext.cpp:
     17        (WebCore::CSSParserContext::isPropertyRuntimeDisabled const):
     18        * css/parser/CSSParserFastPaths.cpp:
     19        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
     20        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
     21        * css/parser/CSSPropertyParser.cpp:
     22        (WebCore::CSSPropertyParser::parseSingleValue):
     23
    1242022-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
    225
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r290320 r290422  
    42114211        case CSSPropertyMarginInlineEnd:
    42124212        case CSSPropertyMarginInlineStart:
     4213        case CSSPropertyOverscrollBehaviorInline:
     4214        case CSSPropertyOverscrollBehaviorBlock:
    42134215        case CSSPropertyPaddingBlockEnd:
    42144216        case CSSPropertyPaddingBlockStart:
  • trunk/Source/WebCore/css/CSSProperties.json

    r289876 r290422  
    39113911            ],
    39123912            "codegen-properties": {
    3913                 "settings-flag": "overscrollBehaviorEnabled"
     3913                "settings-flag": "overscrollBehaviorEnabled",
     3914                "logical-property-group": {
     3915                    "name": "overscroll-behavior",
     3916                    "resolver": "horizontal"
     3917                }
    39143918            },
    39153919            "status": {
     
    39273931            ],
    39283932            "codegen-properties": {
    3929                 "settings-flag": "overscrollBehaviorEnabled"
     3933                "settings-flag": "overscrollBehaviorEnabled",
     3934                "logical-property-group": {
     3935                    "name": "overscroll-behavior",
     3936                    "resolver": "vertical"
     3937                }
    39303938            },
    39313939            "status": {
     
    39343942            "specification": {
    39353943                "url": "https://drafts.csswg.org/css-overscroll-1/#propdef-overscroll-behavior-y"
     3944            }
     3945        },
     3946        "overscroll-behavior-inline": {
     3947            "values": [
     3948                "contain",
     3949                "none",
     3950                "auto"
     3951            ],
     3952            "codegen-properties": {
     3953                "settings-flag": "overscrollBehaviorEnabled",
     3954                "skip-builder": true,
     3955                "logical-property-group": {
     3956                    "name": "overscroll-behavior",
     3957                    "resolver": "inline"
     3958                }
     3959            },
     3960            "status": {
     3961                "status": "in development"
     3962            },
     3963            "specification": {
     3964                "url": "https://drafts.csswg.org/css-overscroll-1/#propdef-overscroll-behavior-x"
     3965            }
     3966        },
     3967        "overscroll-behavior-block": {
     3968            "values": [
     3969                "contain",
     3970                "none",
     3971                "auto"
     3972            ],
     3973            "codegen-properties": {
     3974                "settings-flag": "overscrollBehaviorEnabled",
     3975                "skip-builder": true,
     3976                "logical-property-group": {
     3977                    "name": "overscroll-behavior",
     3978                    "resolver": "block"
     3979                }
     3980            },
     3981            "status": {
     3982                "status": "in development"
     3983            },
     3984            "specification": {
     3985                "url": "https://drafts.csswg.org/css-overscroll-1/#propdef-overscroll-behavior-x"
    39363986            }
    39373987        },
  • trunk/Source/WebCore/css/parser/CSSParserContext.cpp

    r290394 r290422  
    245245        return !individualTransformPropertiesEnabled;
    246246    case CSSPropertyOverscrollBehavior:
     247    case CSSPropertyOverscrollBehaviorBlock:
     248    case CSSPropertyOverscrollBehaviorInline:
    247249    case CSSPropertyOverscrollBehaviorX:
    248250    case CSSPropertyOverscrollBehaviorY:
  • trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp

    r288590 r290422  
    684684            return true;
    685685        return valueID == CSSValueVisible || valueID == CSSValueHidden || valueID == CSSValueScroll || valueID == CSSValueAuto || valueID == CSSValueOverlay || valueID == CSSValueWebkitPagedX || valueID == CSSValueWebkitPagedY;
     686    case CSSPropertyOverscrollBehaviorBlock:
     687    case CSSPropertyOverscrollBehaviorInline:
    686688    case CSSPropertyOverscrollBehaviorX:
    687689    case CSSPropertyOverscrollBehaviorY:
     
    950952    case CSSPropertyOverflowX:
    951953    case CSSPropertyOverflowY:
     954    case CSSPropertyOverscrollBehaviorBlock:
     955    case CSSPropertyOverscrollBehaviorInline:
    952956    case CSSPropertyOverscrollBehaviorX:
    953957    case CSSPropertyOverscrollBehaviorY:
  • trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp

    r289876 r290422  
    43484348            return nullptr;
    43494349        return consumeScrollBehavior(m_range);
     4350    case CSSPropertyOverscrollBehaviorBlock:
     4351    case CSSPropertyOverscrollBehaviorInline:
    43504352    case CSSPropertyOverscrollBehaviorX:
    43514353    case CSSPropertyOverscrollBehaviorY:
Note: See TracChangeset for help on using the changeset viewer.