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: