haikuwebkit/LayoutTests/fast/scrolling/scroll-behavior-invalidate-...

2 lines
94 B
Plaintext
Raw Permalink Normal View History

REGRESSION (r254790): No longer get smooth scrolling on music.apple.com https://bugs.webkit.org/show_bug.cgi?id=210634 Reviewed by Darin Adler. Source/WebCore: The page uses the access of "scrollBehavior" in CSSStyleDeclaration as the support of scroll-behavior. If supported, it will use scroll-behavior. Otherwise, it will perform a JS smooth scroll. Currently, "scrollBehavior" is still available when CSSOMViewSmoothScrolling is off, only the value "smooth" is invalidated. In order to fix this, CSSStyleDeclaration will take account of CSSOMViewSmoothScrolling in Settings. This patch also tries to provide an interface which let flags in Settings can enable/disable a property. However, it is not complete, for there are some scenarios that Settings isn't accessible. By adding "settings-flag" to CSSProperties.json, it would be effective to control the property access in CSSStyleDeclaration. Tests: fast/scrolling/scroll-behavior-invalidate-if-disabled.html fast/scrolling/scroll-behavior-validate-if-enabled.html * css/CSSProperties.json: * css/CSSStyleDeclaration.cpp: (WebCore::CSSStyleDeclaration::getCSSPropertyIDFromJavaScriptPropertyName): (WebCore::CSSStyleDeclaration::namedItem): (WebCore::CSSStyleDeclaration::setNamedItem): (WebCore::CSSStyleDeclaration::supportedPropertyNames const): * css/makeprop.pl: (addProperty): * css/parser/CSSPropertyParser.cpp: (WebCore::cssPropertyID): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::collectProperties const): * inspector/agents/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getSupportedCSSProperties): Tools: Add settings-flag. Add support for CSSOMViewSmoothScrolling on Windows DumpRenderTree. * DumpRenderTree/win/DumpRenderTree.cpp: (enableExperimentalFeatures): (setWebPreferencesForTestOptions): * Scripts/webkitpy/style/checkers/jsonchecker.py: (JSONCSSPropertiesChecker.check_codegen_properties): LayoutTests: "scrollBehavior" is not available in CSSStyleDeclaration if the flag is off. It's available if the flag is on. * fast/scrolling/scroll-behavior-invalidate-if-disabled-expected.txt: Added. * fast/scrolling/scroll-behavior-invalidate-if-disabled.html: Added. * fast/scrolling/scroll-behavior-validate-if-enabled-expected.txt: Added. * fast/scrolling/scroll-behavior-validate-if-enabled.html: Added. Canonical link: https://commits.webkit.org/223727@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-22 03:03:43 +00:00
Pass test scrollBehavior should be invalidate if CSSOMViewSmoothScrollingEnabled is disabled.