⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 270613 in webkit


Ignore:
Timestamp:
Dec 9, 2020, 10:39:21 PM (6 years ago)
Author:
cathiechen
Message:

Support overscroll-behavior parsing
https://bugs.webkit.org/show_bug.cgi?id=219305

Reviewed by Simon Fraser.

Based on Frédéric Wang's patch.

LayoutTests/imported/w3c:

Update expectations for overscroll-behavior parsing tests.

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/css-overscroll-behavior/inheritance-expected.txt:
  • web-platform-tests/css/css-overscroll-behavior/overscroll-behavior-logical-expected.txt:
  • web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed-expected.txt:
  • web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid-expected.txt:
  • web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Source/WebCore:

Support parsing CSS properties: overscroll-behavior, overscroll-behavior-x and overscroll-behavior-y.

Tests: fast/css/overscroll-behavior-invalidate-if-disabled.html

fast/css/overscroll-behavior-validate-if-enable.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::settings const):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSComputedStyleDeclaration.h:
  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator OverscrollBehavior const):

  • css/CSSProperties.json:
  • css/CSSStyleDeclaration.cpp:

(WebCore::CSSStyleDeclaration::settings const):
(WebCore::CSSStyleDeclaration::namedItem):
(WebCore::CSSStyleDeclaration::setNamedItem):
(WebCore::CSSStyleDeclaration::supportedPropertyNames const):

  • css/CSSStyleDeclaration.h:
  • css/CSSValueKeywords.in:
  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):
(WebCore::StyleProperties::asText const):

  • css/parser/CSSParserContext.cpp:

(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):

  • css/parser/CSSParserContext.h:

(WebCore::CSSParserContextHash::hash):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeOverscrollBehavior):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::consumeOverscrollBehaviorShorthand):
(WebCore::CSSPropertyParser::parseShorthand):

  • css/parser/CSSPropertyParser.h:
  • platform/ScrollTypes.h:
  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::overscrollBehaviorX const):
(WebCore::RenderStyle::overscrollBehaviorY const):
(WebCore::RenderStyle::setOverscrollBehaviorX):
(WebCore::RenderStyle::setOverscrollBehaviorY):
(WebCore::RenderStyle::initialOverscrollBehaviorX):
(WebCore::RenderStyle::initialOverscrollBehaviorY):

  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):

  • rendering/style/StyleRareNonInheritedData.h:

Source/WebKitLegacy/win:

Add an experimental feature flag for overscroll-behavior.

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::initializeDefaultSettings):
(WebPreferences::overscrollBehaviorEnabled):
(WebPreferences::setOverscrollBehaviorEnabled):

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Source/WTF:

Add an experimental feature flag for overscroll-behavior.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Tools:

Add support for testing overscroll-behavior parsing.

  • DumpRenderTree/TestOptions.cpp:

(WTR::TestOptions::defaults):

LayoutTests:

Test overscrollBehavior's validation when enable or disable OverscrollBehaviorEnabled.

  • fast/css/overscroll-behavior-invalidate-if-disabled-expected.txt: Added.
  • fast/css/overscroll-behavior-invalidate-if-disabled.html: Added.
  • fast/css/overscroll-behavior-validate-if-enable-expected.txt: Added.
  • fast/css/overscroll-behavior-validate-if-enable.html: Added.
  • platform/ios-13/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
Location:
trunk
Files:
4 added
39 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r270610 r270613  
     12020-12-09  Cathie Chen  <cathiechen@igalia.com>
     2
     3        Support overscroll-behavior parsing
     4        https://bugs.webkit.org/show_bug.cgi?id=219305
     5
     6        Reviewed by Simon Fraser.
     7
     8        Based on Frédéric Wang's patch.
     9
     10        Test overscrollBehavior's validation when enable or disable OverscrollBehaviorEnabled.
     11
     12        * fast/css/overscroll-behavior-invalidate-if-disabled-expected.txt: Added.
     13        * fast/css/overscroll-behavior-invalidate-if-disabled.html: Added.
     14        * fast/css/overscroll-behavior-validate-if-enable-expected.txt: Added.
     15        * fast/css/overscroll-behavior-validate-if-enable.html: Added.
     16        * platform/ios-13/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
     17        * platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
     18        * platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
     19
    1202020-12-09  Geoffrey Garen  <ggaren@apple.com>
    221
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r270597 r270613  
     12020-12-09  Cathie Chen  <cathiechen@igalia.com>
     2
     3        Support overscroll-behavior parsing
     4        https://bugs.webkit.org/show_bug.cgi?id=219305
     5
     6        Reviewed by Simon Fraser.
     7
     8        Based on Frédéric Wang's patch.
     9
     10        Update expectations for overscroll-behavior parsing tests.
     11
     12        * web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
     13        * web-platform-tests/css/css-overscroll-behavior/inheritance-expected.txt:
     14        * web-platform-tests/css/css-overscroll-behavior/overscroll-behavior-logical-expected.txt:
     15        * web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed-expected.txt:
     16        * web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid-expected.txt:
     17        * web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
     18
    1192020-12-09  Antoine Quint  <graouts@webkit.org>
    220
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt

    r269820 r270613  
    196196PASS overflow-x
    197197PASS overflow-y
     198PASS overscroll-behavior-x
     199PASS overscroll-behavior-y
    198200PASS padding-block-end
    199201PASS padding-block-start
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/inheritance-expected.txt

    r264522 r270613  
    44FAIL 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
    55FAIL Property overscroll-behavior-inline does not inherit assert_true: expected true got false
    6 FAIL Property overscroll-behavior-x has initial value auto assert_true: overscroll-behavior-x doesn't seem to be supported in the computed style expected true got false
    7 FAIL Property overscroll-behavior-x does not inherit assert_true: expected true got false
    8 FAIL Property overscroll-behavior-y has initial value auto assert_true: overscroll-behavior-y doesn't seem to be supported in the computed style expected true got false
    9 FAIL Property overscroll-behavior-y does not inherit assert_true: expected true got false
     6PASS Property overscroll-behavior-x has initial value auto
     7PASS Property overscroll-behavior-x does not inherit
     8PASS Property overscroll-behavior-y has initial value auto
     9PASS Property overscroll-behavior-y does not inherit
    1010
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/overscroll-behavior-logical-expected.txt

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

    r264522 r270613  
    11
    2 FAIL Property overscroll-behavior-x value 'contain' assert_true: overscroll-behavior-x doesn't seem to be supported in the computed style expected true got false
    3 FAIL Property overscroll-behavior-x value 'none' assert_true: overscroll-behavior-x doesn't seem to be supported in the computed style expected true got false
    4 FAIL Property overscroll-behavior-x value 'auto' assert_true: overscroll-behavior-x doesn't seem to be supported in the computed style expected true got false
    5 FAIL Property overscroll-behavior-y value 'contain' assert_true: overscroll-behavior-y doesn't seem to be supported in the computed style expected true got false
    6 FAIL Property overscroll-behavior-y value 'none' assert_true: overscroll-behavior-y doesn't seem to be supported in the computed style expected true got false
    7 FAIL Property overscroll-behavior-y value 'auto' assert_true: overscroll-behavior-y doesn't seem to be supported in the computed style expected true got false
     2PASS Property overscroll-behavior-x value 'contain'
     3PASS Property overscroll-behavior-x value 'none'
     4PASS Property overscroll-behavior-x value 'auto'
     5PASS Property overscroll-behavior-y value 'contain'
     6PASS Property overscroll-behavior-y value 'none'
     7PASS Property overscroll-behavior-y value 'auto'
    88FAIL 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
    99FAIL 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
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid-expected.txt

    r264522 r270613  
    11
    2 FAIL e.style['overscroll-behavior'] = "contain" should set the property value assert_not_equals: property should be set got disallowed value ""
    3 FAIL e.style['overscroll-behavior'] = "none" should set the property value assert_not_equals: property should be set got disallowed value ""
    4 FAIL e.style['overscroll-behavior'] = "auto" should set the property value assert_not_equals: property should be set got disallowed value ""
    5 FAIL e.style['overscroll-behavior'] = "contain none" should set the property value assert_not_equals: property should be set got disallowed value ""
    6 FAIL e.style['overscroll-behavior'] = "none auto" should set the property value assert_not_equals: property should be set got disallowed value ""
    7 FAIL e.style['overscroll-behavior'] = "auto contain" should set the property value assert_not_equals: property should be set got disallowed value ""
    8 FAIL e.style['overscroll-behavior'] = "contain contain" should set the property value assert_not_equals: property should be set got disallowed value ""
    9 FAIL e.style['overscroll-behavior'] = "none none" should set the property value assert_not_equals: property should be set got disallowed value ""
    10 FAIL e.style['overscroll-behavior'] = "auto auto" should set the property value assert_not_equals: property should be set got disallowed value ""
    11 FAIL e.style['overscroll-behavior-x'] = "contain" should set the property value assert_not_equals: property should be set got disallowed value ""
    12 FAIL e.style['overscroll-behavior-x'] = "none" should set the property value assert_not_equals: property should be set got disallowed value ""
    13 FAIL e.style['overscroll-behavior-x'] = "auto" should set the property value assert_not_equals: property should be set got disallowed value ""
    14 FAIL e.style['overscroll-behavior-y'] = "contain" should set the property value assert_not_equals: property should be set got disallowed value ""
    15 FAIL e.style['overscroll-behavior-y'] = "none" should set the property value assert_not_equals: property should be set got disallowed value ""
    16 FAIL e.style['overscroll-behavior-y'] = "auto" should set the property value assert_not_equals: property should be set got disallowed value ""
     2PASS e.style['overscroll-behavior'] = "contain" should set the property value
     3PASS e.style['overscroll-behavior'] = "none" should set the property value
     4PASS e.style['overscroll-behavior'] = "auto" should set the property value
     5PASS e.style['overscroll-behavior'] = "contain none" should set the property value
     6PASS e.style['overscroll-behavior'] = "none auto" should set the property value
     7PASS e.style['overscroll-behavior'] = "auto contain" should set the property value
     8PASS e.style['overscroll-behavior'] = "contain contain" should set the property value
     9PASS e.style['overscroll-behavior'] = "none none" should set the property value
     10PASS e.style['overscroll-behavior'] = "auto auto" should set the property value
     11PASS e.style['overscroll-behavior-x'] = "contain" should set the property value
     12PASS e.style['overscroll-behavior-x'] = "none" should set the property value
     13PASS e.style['overscroll-behavior-x'] = "auto" should set the property value
     14PASS e.style['overscroll-behavior-y'] = "contain" should set the property value
     15PASS e.style['overscroll-behavior-y'] = "none" should set the property value
     16PASS e.style['overscroll-behavior-y'] = "auto" should set the property value
    1717FAIL e.style['overscroll-behavior-inline'] = "contain" should set the property value assert_not_equals: property should be set got disallowed value ""
    1818FAIL e.style['overscroll-behavior-inline'] = "none" should set the property value assert_not_equals: property should be set got disallowed value ""
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt

    r269820 r270613  
    88PASS whitespaces in value
    99PASS invalid property does not appear
    10 FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0, 0); border-block-start-style: none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-image-outset: 0px; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none; border-top-width: 0px; bottom: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-family: -webkit-standard; font-feature-settings: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: normal; justify-items: normal; justify-self: auto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; padding-block-end: 0px; padding-block-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-bottom: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-bottom: 0px; scroll-padding-left: 0px; scroll-padding-right: 0px; scroll-padding-top: 0px; scroll-snap-align: none none; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape-rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0, 0); stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; translate: none; unicode-bidi: normal; vector-effect: none; vertical-align: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-backface-visibility: visible; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -webkit-box-pack: start; -webkit-box-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0px; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box-image-slice: 0 fill; -webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: normal; -webkit-transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: read-only; -webkit-user-select: text;"
     10FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0, 0); border-block-start-style: none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-image-outset: 0px; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none; border-top-width: 0px; bottom: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-family: -webkit-standard; font-feature-settings: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: normal; justify-items: normal; justify-self: auto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; overscroll-behavior-x: auto; overscroll-behavior-y: auto; padding-block-end: 0px; padding-block-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-bottom: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-bottom: 0px; scroll-padding-left: 0px; scroll-padding-right: 0px; scroll-padding-top: 0px; scroll-snap-align: none none; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape-rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0, 0); stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; translate: none; unicode-bidi: normal; vector-effect: none; vertical-align: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-backface-visibility: visible; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -webkit-box-pack: start; -webkit-box-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0px; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box-image-slice: 0 fill; -webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: normal; -webkit-transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: read-only; -webkit-user-select: text;"
    1111
  • trunk/LayoutTests/platform/ios-13/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt

    r269820 r270613  
    195195PASS overflow-x
    196196PASS overflow-y
     197PASS overscroll-behavior-x
     198PASS overscroll-behavior-y
    197199PASS padding-block-end
    198200PASS padding-block-start
  • trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt

    r269820 r270613  
    88PASS whitespaces in value
    99PASS invalid property does not appear
    10 FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0, 0); border-block-start-style: none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-image-outset: 0px; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none; border-top-width: 0px; bottom: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-family: -webkit-standard; font-feature-settings: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: normal; justify-items: normal; justify-self: auto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; padding-block-end: 0px; padding-block-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-bottom: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-bottom: 0px; scroll-padding-left: 0px; scroll-padding-right: 0px; scroll-padding-top: 0px; scroll-snap-align: none none; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape-rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0, 0); stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; translate: none; unicode-bidi: normal; vector-effect: none; vertical-align: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-backface-visibility: visible; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -webkit-box-pack: start; -webkit-box-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0px; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box-image-slice: 0 fill; -webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-overflow-scrolling: auto; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: normal; -webkit-touch-callout: default; -webkit-transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: read-only; -webkit-user-select: text;"
     10FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0, 0); border-block-start-style: none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-image-outset: 0px; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none; border-top-width: 0px; bottom: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-family: -webkit-standard; font-feature-settings: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: normal; justify-items: normal; justify-self: auto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; overscroll-behavior-x: auto; overscroll-behavior-y: auto; padding-block-end: 0px; padding-block-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-bottom: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-bottom: 0px; scroll-padding-left: 0px; scroll-padding-right: 0px; scroll-padding-top: 0px; scroll-snap-align: none none; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape-rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0, 0); stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; translate: none; unicode-bidi: normal; vector-effect: none; vertical-align: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-backface-visibility: visible; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -webkit-box-pack: start; -webkit-box-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0px; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box-image-slice: 0 fill; -webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-overflow-scrolling: auto; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: normal; -webkit-touch-callout: default; -webkit-transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: read-only; -webkit-user-select: text;"
    1111
  • trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt

    r269820 r270613  
    195195PASS overflow-x
    196196PASS overflow-y
     197PASS overscroll-behavior-x
     198PASS overscroll-behavior-y
    197199PASS padding-block-end
    198200PASS padding-block-start
  • trunk/Source/WTF/ChangeLog

    r270600 r270613  
     12020-12-09  Cathie Chen  <cathiechen@igalia.com>
     2
     3        Support overscroll-behavior parsing
     4        https://bugs.webkit.org/show_bug.cgi?id=219305
     5
     6        Reviewed by Simon Fraser.
     7
     8        Based on Frédéric Wang's patch.
     9
     10        Add an experimental feature flag for overscroll-behavior.
     11
     12        * Scripts/Preferences/WebPreferencesExperimental.yaml:
     13
    1142020-12-09  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml

    r270256 r270613  
    592592      default: false
    593593
     594OverscrollBehaviorEnabled:
     595  type: bool
     596  humanReadableName: "CSS Overscroll Behavior"
     597  humanReadableDescription: "Enable CSS overscroll-behavior"
     598  defaultValue:
     599    WebKitLegacy:
     600      default: false
     601    WebKit:
     602      default: false
     603    WebCore:
     604      default: false
     605
    594606PageAtRuleSupportEnabled:
    595607  type: bool
  • trunk/Source/WebCore/ChangeLog

    r270612 r270613  
     12020-12-09  Cathie Chen  <cathiechen@igalia.com>
     2
     3        Support overscroll-behavior parsing
     4        https://bugs.webkit.org/show_bug.cgi?id=219305
     5
     6        Reviewed by Simon Fraser.
     7
     8        Based on Frédéric Wang's patch.
     9
     10        Support parsing CSS properties: overscroll-behavior, overscroll-behavior-x and overscroll-behavior-y.
     11
     12        Tests: fast/css/overscroll-behavior-invalidate-if-disabled.html
     13               fast/css/overscroll-behavior-validate-if-enable.html
     14
     15        * css/CSSComputedStyleDeclaration.cpp:
     16        (WebCore::CSSComputedStyleDeclaration::settings const):
     17        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
     18        * css/CSSComputedStyleDeclaration.h:
     19        * css/CSSPrimitiveValueMappings.h:
     20        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
     21        (WebCore::CSSPrimitiveValue::operator OverscrollBehavior const):
     22        * css/CSSProperties.json:
     23        * css/CSSStyleDeclaration.cpp:
     24        (WebCore::CSSStyleDeclaration::settings const):
     25        (WebCore::CSSStyleDeclaration::namedItem):
     26        (WebCore::CSSStyleDeclaration::setNamedItem):
     27        (WebCore::CSSStyleDeclaration::supportedPropertyNames const):
     28        * css/CSSStyleDeclaration.h:
     29        * css/CSSValueKeywords.in:
     30        * css/StyleProperties.cpp:
     31        (WebCore::StyleProperties::getPropertyValue const):
     32        (WebCore::StyleProperties::asText const):
     33        * css/parser/CSSParserContext.cpp:
     34        (WebCore::CSSParserContext::CSSParserContext):
     35        (WebCore::operator==):
     36        * css/parser/CSSParserContext.h:
     37        (WebCore::CSSParserContextHash::hash):
     38        * css/parser/CSSParserFastPaths.cpp:
     39        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
     40        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
     41        * css/parser/CSSPropertyParser.cpp:
     42        (WebCore::consumeOverscrollBehavior):
     43        (WebCore::CSSPropertyParser::parseSingleValue):
     44        (WebCore::CSSPropertyParser::consumeOverscrollBehaviorShorthand):
     45        (WebCore::CSSPropertyParser::parseShorthand):
     46        * css/parser/CSSPropertyParser.h:
     47        * platform/ScrollTypes.h:
     48        * rendering/style/RenderStyle.h:
     49        (WebCore::RenderStyle::overscrollBehaviorX const):
     50        (WebCore::RenderStyle::overscrollBehaviorY const):
     51        (WebCore::RenderStyle::setOverscrollBehaviorX):
     52        (WebCore::RenderStyle::setOverscrollBehaviorY):
     53        (WebCore::RenderStyle::initialOverscrollBehaviorX):
     54        (WebCore::RenderStyle::initialOverscrollBehaviorY):
     55        * rendering/style/StyleRareNonInheritedData.cpp:
     56        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
     57        (WebCore::StyleRareNonInheritedData::operator== const):
     58        * rendering/style/StyleRareNonInheritedData.h:
     59
    1602020-12-09  Peng Liu  <peng.liu6@apple.com>
    261
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r270248 r270613  
    22572257{
    22582258    return ComputedStyleExtractor(m_element.ptr(), m_allowVisitedStyle, m_pseudoElementSpecifier).copyProperties();
     2259}
     2260
     2261const Settings* CSSComputedStyleDeclaration::settings() const
     2262{
     2263    return &m_element->document().settings();
    22592264}
    22602265
     
    31393144        case CSSPropertyOverflowY:
    31403145            return cssValuePool.createValue(style.overflowY());
     3146        case CSSPropertyOverscrollBehavior:
     3147            if (renderer && !renderer->settings().overscrollBehaviorEnabled())
     3148                return nullptr;
     3149            return cssValuePool.createValue(std::max(style.overscrollBehaviorX(), style.overscrollBehaviorY()));
     3150        case CSSPropertyOverscrollBehaviorX:
     3151            if (renderer && !renderer->settings().overscrollBehaviorEnabled())
     3152                return nullptr;
     3153            return cssValuePool.createValue(style.overscrollBehaviorX());
     3154        case CSSPropertyOverscrollBehaviorY:
     3155            if (renderer && !renderer->settings().overscrollBehaviorEnabled())
     3156                return nullptr;
     3157            return cssValuePool.createValue(style.overscrollBehaviorY());
    31413158        case CSSPropertyPaddingTop:
    31423159            return zoomAdjustedPaddingOrMarginPixelValue<&RenderStyle::paddingTop, &RenderBoxModelObject::computedCSSPaddingTop>(style, renderer);
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h

    r246951 r270613  
    139139    RefPtr<CSSValue> getPropertyCSSValue(CSSPropertyID, EUpdateLayout = UpdateLayout) const;
    140140
     141    const Settings* settings() const final;
     142
    141143    mutable Ref<Element> m_element;
    142144    PseudoId m_pseudoElementSpecifier;
  • trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h

    r269785 r270613  
    4040#include "RenderStyleConstants.h"
    4141#include "SVGRenderStyleDefs.h"
     42#include "ScrollTypes.h"
    4243#include "TextFlags.h"
    4344#include "ThemeTypes.h"
     
    22052206    ASSERT_NOT_REACHED();
    22062207    return Overflow::Visible;
     2208}
     2209
     2210template<> inline CSSPrimitiveValue::CSSPrimitiveValue(OverscrollBehavior behavior)
     2211    : CSSValue(PrimitiveClass)
     2212{
     2213    setPrimitiveUnitType(CSSUnitType::CSS_VALUE_ID);
     2214    switch (behavior) {
     2215    case OverscrollBehavior::Contain:
     2216        m_value.valueID = CSSValueContain;
     2217        break;
     2218    case OverscrollBehavior::None:
     2219        m_value.valueID = CSSValueNone;
     2220        break;
     2221    case OverscrollBehavior::Auto:
     2222        m_value.valueID = CSSValueAuto;
     2223        break;
     2224    }
     2225}
     2226
     2227template<> inline CSSPrimitiveValue::operator OverscrollBehavior() const
     2228{
     2229    ASSERT(isValueID());
     2230
     2231    switch (m_value.valueID) {
     2232    case CSSValueContain:
     2233        return OverscrollBehavior::Contain;
     2234    case CSSValueNone:
     2235        return OverscrollBehavior::None;
     2236    case CSSValueAuto:
     2237        return OverscrollBehavior::Auto;
     2238    default:
     2239        break;
     2240    }
     2241
     2242    ASSERT_NOT_REACHED();
     2243    return OverscrollBehavior::Auto;
    22072244}
    22082245
  • trunk/Source/WebCore/css/CSSProperties.json

    r270023 r270613  
    32953295            }
    32963296        },
     3297        "overscroll-behavior": {
     3298            "codegen-properties": {
     3299                "longhands": [
     3300                    "overscroll-behavior-x",
     3301                    "overscroll-behavior-y"
     3302                ],
     3303                "settings-flag": "overscrollBehavior"
     3304            },
     3305            "status": {
     3306                "status": "in development"
     3307            },
     3308            "specification": {
     3309                "url": "https://drafts.csswg.org/css-overscroll-1/#propdef-overscroll-behavior"
     3310            }
     3311        },
     3312        "overscroll-behavior-x": {
     3313            "values": [
     3314                "contain",
     3315                "none",
     3316                "auto"
     3317            ],
     3318            "codegen-properties": {
     3319                "settings-flag": "overscrollBehavior"
     3320            },
     3321            "status": {
     3322                "status": "in development"
     3323            },
     3324            "specification": {
     3325                "url": "https://drafts.csswg.org/css-overscroll-1/#propdef-overscroll-behavior-x"
     3326            }
     3327        },
     3328        "overscroll-behavior-y": {
     3329            "values": [
     3330                "contain",
     3331                "none",
     3332                "auto"
     3333            ],
     3334            "codegen-properties": {
     3335                "settings-flag": "overscrollBehavior"
     3336            },
     3337            "status": {
     3338                "status": "in development"
     3339            },
     3340            "specification": {
     3341                "url": "https://drafts.csswg.org/css-overscroll-1/#propdef-overscroll-behavior-y"
     3342            }
     3343        },
    32973344        "padding": {
    32983345            "codegen-properties": {
  • trunk/Source/WebCore/css/CSSStyleDeclaration.cpp

    r269314 r270613  
    255255}
    256256
     257const Settings* CSSStyleDeclaration::settings() const
     258{
     259    return parentElement() ? &parentElement()->document().settings() : nullptr;
     260}
     261
    257262Optional<Variant<String, double>> CSSStyleDeclaration::namedItem(const AtomString& propertyName)
    258263{
    259     auto* settings = parentElement() ? &parentElement()->document().settings() : nullptr;
    260     auto propertyInfo = propertyInfoFromJavaScriptCSSPropertyName(propertyName, settings);
     264    auto propertyInfo = propertyInfoFromJavaScriptCSSPropertyName(propertyName, settings());
    261265    if (!propertyInfo.propertyID)
    262266        return WTF::nullopt;
     
    280284ExceptionOr<void> CSSStyleDeclaration::setNamedItem(const AtomString& propertyName, String value, bool& propertySupported)
    281285{
    282     auto* settings = parentElement() ? &parentElement()->document().settings() : nullptr;
    283     auto propertyInfo = propertyInfoFromJavaScriptCSSPropertyName(propertyName, settings);
     286    auto propertyInfo = propertyInfoFromJavaScriptCSSPropertyName(propertyName, settings());
    284287    if (!propertyInfo.propertyID) {
    285288        propertySupported = false;
     
    311314{
    312315    static unsigned numNames = 0;
    313     static const AtomString* const cssPropertyNames = [] {
     316    static const AtomString* const cssPropertyNames = [this] {
    314317        String names[numCSSProperties];
    315318        for (int i = 0; i < numCSSProperties; ++i) {
    316319            CSSPropertyID id = static_cast<CSSPropertyID>(firstCSSProperty + i);
    317             // FIXME: Should take account for flags in settings().
    318             if (isEnabledCSSProperty(id))
     320            if (isEnabledCSSProperty(id) && isCSSPropertyEnabledBySettings(id, settings()))
    319321                names[numNames++] = getJSPropertyName(id);
    320322        }
  • trunk/Source/WebCore/css/CSSStyleDeclaration.h

    r269314 r270613  
    7373    virtual CSSStyleSheet* parentStyleSheet() const { return nullptr; }
    7474
     75    virtual const Settings* settings() const;
     76
    7577    // Bindings support.
    7678    Optional<Variant<String, double>> namedItem(const AtomString&);
  • trunk/Source/WebCore/css/CSSValueKeywords.in

    r270362 r270613  
    13901390smooth
    13911391
     1392// overscroll-behavior
     1393// contain
     1394
    13921395// hanging-punctuation
    13931396allow-end
  • trunk/Source/WebCore/css/StyleProperties.cpp

    r270023 r270613  
    254254    case CSSPropertyOverflow:
    255255        return get2Values(overflowShorthand());
     256    case CSSPropertyOverscrollBehavior:
     257        return get2Values(overscrollBehaviorShorthand());
    256258    case CSSPropertyPadding:
    257259        return get4Values(paddingShorthand());
     
    11531155                shorthandPropertyID = CSSPropertyOverflow;
    11541156                break;
     1157            case CSSPropertyOverscrollBehaviorX:
     1158            case CSSPropertyOverscrollBehaviorY:
     1159                shorthandPropertyID = CSSPropertyOverscrollBehavior;
     1160                break;
    11551161            case CSSPropertyPaddingTop:
    11561162            case CSSPropertyPaddingRight:
  • trunk/Source/WebCore/css/parser/CSSParserContext.cpp

    r269641 r270613  
    7777    deferredCSSParserEnabled = document.settings().deferredCSSParserEnabled();
    7878    scrollBehaviorEnabled = document.settings().CSSOMViewSmoothScrollingEnabled();
     79    overscrollBehaviorEnabled = document.settings().overscrollBehaviorEnabled();
    7980    useSystemAppearance = document.page() ? document.page()->useSystemAppearance() : false;
    8081    individualTransformPropertiesEnabled = document.settings().cssIndividualTransformPropertiesEnabled();
     
    107108        && a.hasDocumentSecurityOrigin == b.hasDocumentSecurityOrigin
    108109        && a.useSystemAppearance == b.useSystemAppearance
    109         && a.aspectRatioEnabled == b.aspectRatioEnabled;
     110        && a.aspectRatioEnabled == b.aspectRatioEnabled
     111        && a.overscrollBehaviorEnabled == b.overscrollBehaviorEnabled;
    110112}
    111113
  • trunk/Source/WebCore/css/parser/CSSParserContext.h

    r269641 r270613  
    6969    bool individualTransformPropertiesEnabled { false };
    7070
     71    bool overscrollBehaviorEnabled { false };
     72   
    7173    // This is only needed to support getMatchedCSSRules.
    7274    bool hasDocumentSecurityOrigin { false };
     
    114116            & key.scrollBehaviorEnabled                     << 12
    115117            & key.individualTransformPropertiesEnabled      << 13
    116             & key.mode                                      << 14; // Keep this last.
     118            & key.overscrollBehaviorEnabled                 << 14
     119            & key.mode                                      << 15; // Keep this last.
    117120        hash ^= WTF::intHash(bits);
    118121        return hash;
  • trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp

    r268064 r270613  
    686686    case CSSPropertyOverflowY: // visible | hidden | scroll | auto | overlay | -webkit-paged-x | -webkit-paged-y (overlay is a synonym for auto)
    687687        return valueID == CSSValueVisible || valueID == CSSValueHidden || valueID == CSSValueScroll || valueID == CSSValueAuto || valueID == CSSValueOverlay || valueID == CSSValueWebkitPagedX || valueID == CSSValueWebkitPagedY;
     688    case CSSPropertyOverscrollBehaviorX:
     689    case CSSPropertyOverscrollBehaviorY:
     690        if (!context.overscrollBehaviorEnabled)
     691            return false;
     692        return valueID == CSSValueAuto || valueID == CSSValueContain || valueID == CSSValueNone;
    688693    case CSSPropertyBreakAfter:
    689694    case CSSPropertyBreakBefore:
     
    941946    case CSSPropertyOverflowX:
    942947    case CSSPropertyOverflowY:
     948    case CSSPropertyOverscrollBehaviorX:
     949    case CSSPropertyOverscrollBehaviorY:
    943950    case CSSPropertyPointerEvents:
    944951    case CSSPropertyPosition:
  • trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp

    r270167 r270613  
    25322532}
    25332533
     2534static RefPtr<CSSValue> consumeOverscrollBehavior(CSSParserTokenRange& range)
     2535{
     2536    auto valueID = range.peek().id();
     2537    if (valueID != CSSValueAuto && valueID != CSSValueNone && valueID != CSSValueContain)
     2538        return nullptr;
     2539    return consumeIdent(range);
     2540}
     2541
    25342542static RefPtr<CSSValue> consumeBorderRadiusCorner(CSSParserTokenRange& range, CSSParserMode cssParserMode)
    25352543{
     
    41474155            return nullptr;
    41484156        return consumeScrollBehavior(m_range);
     4157    case CSSPropertyOverscrollBehaviorX:
     4158    case CSSPropertyOverscrollBehaviorY:
     4159        if (!m_context.overscrollBehaviorEnabled)
     4160            return nullptr;
     4161        return consumeOverscrollBehavior(m_range);
    41494162    case CSSPropertyClip:
    41504163        return consumeClip(m_range, m_context.mode);
     
    57535766}
    57545767
     5768bool CSSPropertyParser::consumeOverscrollBehaviorShorthand(bool important)
     5769{
     5770    ASSERT(shorthandForProperty(CSSPropertyOverscrollBehavior).length() == 2);
     5771    if (!m_context.overscrollBehaviorEnabled)
     5772        return false;
     5773
     5774    if (m_range.atEnd())
     5775        return false;
     5776
     5777    RefPtr<CSSValue> overscrollBehaviorX = consumeOverscrollBehavior(m_range);
     5778    if (!overscrollBehaviorX)
     5779        return false;
     5780
     5781    RefPtr<CSSValue> overscrollBehaviorY;
     5782    m_range.consumeWhitespace();
     5783    if (m_range.atEnd())
     5784        overscrollBehaviorY = overscrollBehaviorX;
     5785    else {
     5786        overscrollBehaviorY = consumeOverscrollBehavior(m_range);
     5787        m_range.consumeWhitespace();
     5788        if (!m_range.atEnd())
     5789            return false;
     5790    }
     5791
     5792    addProperty(CSSPropertyOverscrollBehaviorX, CSSPropertyOverscrollBehavior, *overscrollBehaviorX, important);
     5793    addProperty(CSSPropertyOverscrollBehaviorY, CSSPropertyOverscrollBehavior, *overscrollBehaviorY, important);
     5794    return true;
     5795}
     5796
    57555797bool CSSPropertyParser::parseShorthand(CSSPropertyID property, bool important)
    57565798{
     
    57735815    case CSSPropertyOverflow:
    57745816        return consumeOverflowShorthand(important);
     5817    case CSSPropertyOverscrollBehavior:
     5818        return consumeOverscrollBehaviorShorthand(important);
    57755819    case CSSPropertyFont: {
    57765820        const CSSParserToken& token = m_range.peek();
  • trunk/Source/WebCore/css/parser/CSSPropertyParser.h

    r269957 r270613  
    114114    bool consumePerspectiveOrigin(bool important);
    115115
     116    bool consumeOverscrollBehaviorShorthand(bool important);
     117
    116118private:
    117119    // Inputs:
  • trunk/Source/WebCore/platform/ScrollTypes.h

    r264891 r270613  
    4747};
    4848
     49enum class OverscrollBehavior : uint8_t {
     50    Auto,
     51    Contain,
     52    None
     53};
     54
    4955enum ScrollDirection : uint8_t {
    5056    ScrollUp,
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r270551 r270613  
    4949#include "SVGRenderStyle.h"
    5050#include "ScaleTransformOperation.h"
     51#include "ScrollTypes.h"
    5152#include "ShadowData.h"
    5253#include "ShapeValue.h"
     
    331332    Overflow overflowBlockDirection() const { return isHorizontalWritingMode() ? overflowY() : overflowX(); }
    332333    bool isOverflowVisible() const { return overflowX() == Overflow::Visible || overflowY() == Overflow::Visible; }
     334
     335    OverscrollBehavior overscrollBehaviorX() const { return static_cast<OverscrollBehavior>(m_rareNonInheritedData->overscrollBehaviorX); }
     336    OverscrollBehavior overscrollBehaviorY() const { return static_cast<OverscrollBehavior>(m_rareNonInheritedData->overscrollBehaviorY); }
    333337   
    334338    Visibility visibility() const { return static_cast<Visibility>(m_inheritedFlags.visibility); }
     
    914918    void setOverflowX(Overflow v) { m_nonInheritedFlags.overflowX =  static_cast<unsigned>(v); }
    915919    void setOverflowY(Overflow v) { m_nonInheritedFlags.overflowY = static_cast<unsigned>(v); }
     920    void setOverscrollBehaviorX(OverscrollBehavior v) { SET_VAR(m_rareNonInheritedData, overscrollBehaviorX, static_cast<unsigned>(v)); }
     921    void setOverscrollBehaviorY(OverscrollBehavior v) { SET_VAR(m_rareNonInheritedData, overscrollBehaviorY, static_cast<unsigned>(v)); }
    916922    void setVisibility(Visibility v) { m_inheritedFlags.visibility = static_cast<unsigned>(v); }
    917923    void setVerticalAlign(VerticalAlign v) { m_nonInheritedFlags.verticalAlign = static_cast<unsigned>(v); }
     
    15021508    static Overflow initialOverflowX() { return Overflow::Visible; }
    15031509    static Overflow initialOverflowY() { return Overflow::Visible; }
     1510    static OverscrollBehavior initialOverscrollBehaviorX() { return OverscrollBehavior::Auto; }
     1511    static OverscrollBehavior initialOverscrollBehaviorY() { return OverscrollBehavior::Auto; }
     1512
    15041513    static Clear initialClear() { return Clear::None; }
    15051514    static DisplayType initialDisplay() { return DisplayType::Inline; }
  • trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp

    r270023 r270613  
    6060    , grid(StyleGridData::create())
    6161    , gridItem(StyleGridItemData::create())
     62    , overscrollBehaviorX(static_cast<unsigned>(RenderStyle::initialOverscrollBehaviorX()))
     63    , overscrollBehaviorY(static_cast<unsigned>(RenderStyle::initialOverscrollBehaviorY()))
    6264    , willChange(RenderStyle::initialWillChange())
    6365    , mask(FillLayer::create(FillLayerType::Mask))
     
    141143    , scrollSnapAlign(o.scrollSnapAlign)
    142144#endif
     145    , overscrollBehaviorX(o.overscrollBehaviorX)
     146    , overscrollBehaviorY(o.overscrollBehaviorY)
    143147    , content(o.content ? o.content->clone() : nullptr)
    144148    , counterDirectives(o.counterDirectives ? makeUnique<CounterDirectiveMap>(*o.counterDirectives) : nullptr)
     
    245249        && scrollSnapAlign == o.scrollSnapAlign
    246250#endif
     251        && overscrollBehaviorX == o.overscrollBehaviorX
     252        && overscrollBehaviorY == o.overscrollBehaviorY
    247253        && contentDataEquivalent(o)
    248254        && arePointingToEqualData(counterDirectives, o.counterDirectives)
  • trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h

    r270023 r270613  
    139139#endif
    140140
     141    unsigned overscrollBehaviorX : 2; // OverscrollBehavior
     142    unsigned overscrollBehaviorY : 2; // OverscrollBehavior
     143
    141144    std::unique_ptr<ContentData> content;
    142145    std::unique_ptr<CounterDirectiveMap> counterDirectives;
  • trunk/Source/WebKitLegacy/win/ChangeLog

    r270273 r270613  
     12020-12-09  Cathie Chen  <cathiechen@igalia.com>
     2
     3        Support overscroll-behavior parsing
     4        https://bugs.webkit.org/show_bug.cgi?id=219305
     5
     6        Reviewed by Simon Fraser.
     7
     8        Based on Frédéric Wang's patch.
     9
     10        Add an experimental feature flag for overscroll-behavior.
     11
     12        * Interfaces/IWebPreferencesPrivate.idl:
     13        * WebPreferenceKeysPrivate.h:
     14        * WebPreferences.cpp:
     15        (WebPreferences::initializeDefaultSettings):
     16        (WebPreferences::overscrollBehaviorEnabled):
     17        (WebPreferences::setOverscrollBehaviorEnabled):
     18        * WebPreferences.h:
     19        * WebView.cpp:
     20        (WebView::notifyPreferencesChanged):
     21
    1222020-11-30  Chris Dumez  <cdumez@apple.com>
    223
  • trunk/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl

    r269348 r270613  
    276276    HRESULT speechRecognitionEnabled([out, retval] BOOL* enabled);
    277277    HRESULT setSpeechRecognitionEnabled([in] BOOL enabled);
    278 }
     278    HRESULT overscrollBehaviorEnabled([ out, retval ] BOOL*);
     279    HRESULT setOverscrollBehaviorEnabled([in] BOOL enabled);
     280}
  • trunk/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h

    r269348 r270613  
    234234
    235235#define WebKitSpeechRecognitionEnabledPreferenceKey "WebKitSpeechRecognitionEnabled"
     236
     237#define WebKitOverscrollBehaviorEnabledPreferenceKey "WebKitOverscrollBehaviorEnabled"
  • trunk/Source/WebKitLegacy/win/WebPreferences.cpp

    r269704 r270613  
    353353    CFDictionaryAddValue(defaults, CFSTR(WebKitSpeechRecognitionEnabledPreferenceKey), kCFBooleanFalse);
    354354
     355    CFDictionaryAddValue(defaults, CFSTR(WebKitOverscrollBehaviorEnabledPreferenceKey), kCFBooleanFalse);
     356
    355357    defaultSettings = defaults;
    356358#endif
     
    25782580    return S_OK;
    25792581}
     2582
     2583HRESULT WebPreferences::overscrollBehaviorEnabled(_Out_ BOOL* enabled)
     2584{
     2585    if (!enabled)
     2586        return E_POINTER;
     2587    *enabled = boolValueForKey(WebKitOverscrollBehaviorEnabledPreferenceKey);
     2588    return S_OK;
     2589}
     2590
     2591HRESULT WebPreferences::setOverscrollBehaviorEnabled(BOOL enabled)
     2592{
     2593    setBoolValue(WebKitOverscrollBehaviorEnabledPreferenceKey, enabled);
     2594    return S_OK;
     2595}
  • trunk/Source/WebKitLegacy/win/WebPreferences.h

    r269348 r270613  
    314314    virtual HRESULT STDMETHODCALLTYPE speechRecognitionEnabled(_Out_ BOOL*);
    315315    virtual HRESULT STDMETHODCALLTYPE setSpeechRecognitionEnabled(BOOL);
     316    virtual HRESULT STDMETHODCALLTYPE overscrollBehaviorEnabled(_Out_ BOOL*);
     317    virtual HRESULT STDMETHODCALLTYPE setOverscrollBehaviorEnabled(BOOL);
    316318
    317319    // WebPreferences
  • trunk/Source/WebKitLegacy/win/WebView.cpp

    r269973 r270613  
    56595659    settings.setSpeechRecognitionEnabled(!!enabled);
    56605660
     5661    hr = prefsPrivate->overscrollBehaviorEnabled(&enabled);
     5662    if (FAILED(hr))
     5663        return hr;
     5664    settings.setOverscrollBehaviorEnabled(!!enabled);
     5665
    56615666    return S_OK;
    56625667}
  • trunk/Tools/ChangeLog

    r270598 r270613  
     12020-12-09  Cathie Chen  <cathiechen@igalia.com>
     2
     3        Support overscroll-behavior parsing
     4        https://bugs.webkit.org/show_bug.cgi?id=219305
     5
     6        Reviewed by Simon Fraser.
     7
     8        Based on Frédéric Wang's patch.
     9
     10        Add support for testing overscroll-behavior parsing.
     11
     12        * DumpRenderTree/TestOptions.cpp:
     13        (WTR::TestOptions::defaults):
     14
    1152020-12-09  John Wilander  <wilander@apple.com>
    216
  • trunk/Tools/DumpRenderTree/TestOptions.cpp

    r269713 r270613  
    9595            { "ModernMediaControlsEnabled", true },
    9696            { "NeedsStorageAccessFromFileURLsQuirk", false },
     97            { "OverscrollBehaviorEnabled", true },
    9798            { "PluginsEnabled", true },
    9899            { "PrivateClickMeasurementEnabled", false },
Note: See TracChangeset for help on using the changeset viewer.