这是indexloc提供的服务,不要输入任何密码
| Differences between
and this patch
- a/Source/WebCore/ChangeLog +145 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2018-11-09  Frederic Wang  <fwang@igalia.com>
2
3
        Add support for ScrollOptions' ScrollBehavior and CSS scroll-behavior properties
4
        https://bugs.webkit.org/show_bug.cgi?id=188043
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        This patch introduces a programmatic smooth scrolling in WebKit from the CSSOM View
9
        specification [1]. To use this effect, web developers can pass a behavior parameter (auto,
10
        smooth, or instant) to Element.scroll, Element.scrollTo, Element.scrollBy,
11
        Element.scrollIntoView, Window.scroll, Window.scrollTo or Window.scrollBy [2]. When behavior
12
        is auto, the instant/smooth characteristic is actually taken from the value of a new CSS
13
        scroll-behavior property [3]. Both the new CSS and DOM behavior are protected by a runtime
14
        flag. The Element.scrollIntoView part will be refined later in bug 189907. The actual
15
        animation relies on the existing ScrollAnimationSmooth.
16
17
        [1] https://drafts.csswg.org/cssom-view
18
        [2] https://drafts.csswg.org/cssom-view/#dictdef-scrolloptions
19
        [3] https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior
20
21
        Add support for ScrollOptions' ScrollBehavior and CSS scroll-behavior properties
22
23
        Tests: imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css.html
24
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element.html
25
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html
26
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html
27
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html
28
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html
29
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html
30
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html
31
32
        * CMakeLists.txt: Add IDL files for ScrollOptions and ScrollBehavior.
33
        * DerivedSources.make: Ditto.
34
        * Sources.txt: Add ScrollBehavor and ScrollOptions implementation. Also build
35
        ScrollAnimationSmooth.cpp on all platforms.
36
        * Headers.cmake: Add headers for ScrollBehavor and ScrollOptions.
37
        * SourcesGTK.txt: Remove ScrollAnimationSmooth.cpp since it is built on all platforms now.
38
        * WebCore.xcodeproj/project.pbxproj: Add files to the build system.
39
        * css/CSSComputedStyleDeclaration.cpp: Handle scroll-behavior.
40
        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
41
        * css/CSSProperties.json: Add scroll-behavior.
42
        * css/CSSValueKeywords.in: Add keywords for scroll-behavior.
43
        * css/StyleBuilderConverter.h:
44
        (WebCore::StyleBuilderConverter::convertSmoothScrolling): New function to convert
45
        scroll-behavior into a "is smooth" boolean.
46
        * css/parser/CSSParserContext.cpp: Add runtime config for scroll-behavior.
47
        (WebCore::CSSParserContext::CSSParserContext):
48
        (WebCore::operator==):
49
        * css/parser/CSSParserContext.h: Ditto.
50
        (WebCore::CSSParserContextHash::hash):
51
        * css/parser/CSSParserFastPaths.cpp: Remove scroll-behavior templates. It is handled in the
52
        slow path since property can be disabled.
53
        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
54
        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
55
        * css/parser/CSSPropertyParser.cpp:
56
        (WebCore::CSSPropertyParser::parseSingleValue): Parse scroll-behavior (only if enabled).
57
        * dom/Element.cpp:
58
        (WebCore::Element::scrollIntoView): Pass scroll behavior, if any.
59
        (WebCore::Element::scrollBy): Use fromCoordinates helper function.
60
        (WebCore::Element::scrollTo): Handle the case when scroll behavior is smooth. Use
61
        fromCoordinates helper function.
62
        * page/DOMWindow.cpp:
63
        (WebCore::DOMWindow::scrollBy const): Use fromCoordinates helper function.
64
        (WebCore::DOMWindow::scrollTo const): Use fromCoordinates helper function. Handle the case
65
        when scroll behavior is smooth. The optimization when scroll position is (0, 0) is skipped
66
        when a scroll is in progress, otherwise such a scroll can't be cancelled by a follow-up
67
        scroll.
68
        * page/ScrollBehavior.cpp: Added.
69
        (WebCore::useSmoothScrolling): Helper funciton to determine the scroll behavior to apply to
70
        an element from the CSS and DOM behavior.
71
        * page/ScrollBehavior.h: Added.
72
        * page/ScrollBehavior.idl: Added.
73
        * page/ScrollIntoViewOptions.h: Make this class inherits from ScrollOption. Also remove
74
        unnecessary forward declaration.
75
        * page/ScrollIntoViewOptions.idl: Make this class inherits from ScrollOption.
76
        * page/ScrollOptions.h: Added.
77
        * page/ScrollOptions.idl: Added.
78
        * page/ScrollToOptions.h: Make this struct inherits from ScrollOptions.
79
        (WebCore::fromCoordinates): New helper function to generate a ScrollToOptions with undefined
80
        behavior. This is necessary to replace curly brace { x, y } declarations now that there is
81
        an extra behavior member from the parent class.
82
        (WebCore::normalizeNonFiniteCoordinatesOrFallBackTo): Copy the current ScrollToOptions so
83
        that the scroll behavior is preserved.
84
        * page/ScrollToOptions.idl: Make this class inherit from ScrollOptions.
85
        * page/Settings.yaml: New setting for CSSOM View smooth scrolling.
86
        * platform/ScrollAnimation.h:
87
        (WebCore::ScrollAnimation::scroll): Function to animate scrolling to a specified position.
88
        (WebCore::ScrollAnimation::isScrollInProgress const):
89
        * platform/ScrollAnimationKinetic.cpp:
90
        (WebCore::ScrollAnimationKinetic::isScrollInProgress const):
91
        * platform/ScrollAnimationKinetic.h:
92
        * platform/ScrollAnimationSmooth.cpp: Build this file on all platforms. Add a
93
        smoothFactorForProgrammaticScroll parameter to slow down the smooth scrolling.
94
        (WebCore::ScrollAnimationSmooth::scroll):
95
        (WebCore::ScrollAnimationSmooth::updatePerAxisData): Scale the time parameters of the
96
        animation so that it looks smoother.
97
        * platform/ScrollAnimationSmooth.h: Declare the class on all platforms.
98
        * platform/ScrollAnimator.cpp:
99
        (WebCore::ScrollAnimator::ScrollAnimator): Initialize animation member for programmatic scrolling.
100
        (WebCore::ScrollAnimator::isScrollInProgress const): For now, only claims scroll is in
101
        progress if smooth programmatic scroll is in progress.
102
        (WebCore::ScrollAnimator::scrollToOffset): Animate scrolling to the specified position.
103
        (WebCore::ScrollAnimator::cancelAnimations): Copy logic from ScrollAnimationSmooth.cpp.
104
        (WebCore::ScrollAnimator::serviceScrollAnimations): Ditto.
105
        (WebCore::ScrollAnimator::willEndLiveResize): Ditto.
106
        (WebCore::ScrollAnimator::didAddVerticalScrollbar): Ditto.
107
        (WebCore::ScrollAnimator::didAddHorizontalScrollbar): Ditto.
108
        * platform/ScrollAnimator.h: New animation member for smooth programmatic scrolling.
109
        * platform/ScrollAnimatorMac.mm:
110
        (WebCore::ScrollAnimatorMac::cancelAnimations): Call parent member to handle programmatic scrolling.
111
        * platform/ScrollView.cpp:
112
        (WebCore::ScrollView::setScrollPosition): Follow the CSSOM View spec: If a scroll is in
113
        progress, we interrupt it and continue the scroll call (even when we are at the final
114
        position).
115
        * platform/ScrollableArea.cpp:
116
        (WebCore::ScrollableArea::isScrollInProgress const): Helper function to check whether scroll
117
        is in progress on the animator. If m_scrollAnimator does not exist we don't construct it.
118
        (WebCore::ScrollableArea::scrollToOffsetWithAnimation):
119
        * platform/ScrollableArea.h:
120
        * rendering/RenderBox.cpp:
121
        (WebCore::RenderBox::scrollToPositionWithAnimation): Similar to setScrollTop/setScrollLeft
122
        but animate the scrolling.
123
        * rendering/RenderBox.h:
124
        * rendering/RenderLayer.cpp:
125
        (WebCore::RenderLayer::scrollToOffset): Follow the CSSOM View spec: If a scroll is in
126
        progress, we interrupt it and continue the scroll call (even when we are at the final
127
        position).
128
        (WebCore::RenderLayer::scrollToOffsetWithAnimation): Ditto. This is similar to scrollToOffset
129
        but animates the scroll.
130
        (WebCore::RenderLayer::scrollRectToVisible): Again don't do an early return if scroll is in
131
        progress. We call scrollToOffsetWithAnimation instead of scrollToOffset when appropriate.
132
        Note that this function may not work well for several nested scroll boxes with at least one
133
        element with smooth behavior. It will handled in bug Follow.
134
        * rendering/RenderLayer.h: Add scroll behavior to ScrollTectToVisibleOptions.
135
        * rendering/style/RenderStyle.h: Handle 'smooth scrolling' boolean data.
136
        (WebCore::RenderStyle::useSmoothScrolling const):
137
        (WebCore::RenderStyle::setUseSmoothScrolling):
138
        (WebCore::RenderStyle::initialUseSmoothScrolling):
139
        * rendering/style/StyleRareNonInheritedData.cpp: Ditto.
140
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
141
        (WebCore::StyleRareNonInheritedData::operator== const):
142
        * rendering/style/StyleRareNonInheritedData.h: Ditto.
143
        * testing/Internals.cpp:
144
        (WebCore::Internals::unconstrainedScrollTo): Use fromCoordinates helper function.
145
1
2019-04-25  Carlos Garcia Campos  <cgarcia@igalia.com>
146
2019-04-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2
147
3
        REGRESSION(r244635): [GTK] Wrong background color used in non-dark mode
148
        REGRESSION(r244635): [GTK] Wrong background color used in non-dark mode
- a/Source/WebKit/ChangeLog +11 lines
Lines 1-3 a/Source/WebKit/ChangeLog_sec1
1
2018-11-06  Frederic Wang  <fwang@igalia.com>
2
3
        Add support for ScrollOptions' ScrollBehavior and CSS scroll-behavior properties
4
        https://bugs.webkit.org/show_bug.cgi?id=188043
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Add CSSOM smooth scrolling as an experimental feature.
9
10
        * Shared/WebPreferences.yaml:
11
1
2019-04-29  Michael Catanzaro  <mcatanzaro@igalia.com>
12
2019-04-29  Michael Catanzaro  <mcatanzaro@igalia.com>
2
13
3
        [WPE][GTK] window-object-cleared documentation should reference webkit_frame_get_js_context_for_script_world()
14
        [WPE][GTK] window-object-cleared documentation should reference webkit_frame_get_js_context_for_script_world()
- a/Source/WebKitLegacy/mac/ChangeLog +17 lines
Lines 1-3 a/Source/WebKitLegacy/mac/ChangeLog_sec1
1
2018-11-07  Frederic Wang  <fwang@igalia.com>
2
3
        Add support for ScrollOptions' ScrollBehavior and CSS scroll-behavior properties
4
        https://bugs.webkit.org/show_bug.cgi?id=188043
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * WebView/WebPreferenceKeysPrivate.h: Handle CSSOMViewSmoothScrolling by.
9
        * WebView/WebPreferencesPrivate.h: Ditto.
10
        * WebView/WebView.mm:
11
        (-[WebView _preferencesChanged:]): Ditto.
12
13
        * WebView/WebPreferences.mm:
14
        (+[WebPreferences initialize]): Disable CSSOMViewSmoothScrolling by default.
15
        (-[WebPreferences CSSOMViewSmoothScrollingEnabled]): Getter.
16
        (-[WebPreferences setCSSOMViewSmoothScrollingEnabled:]): Setter.
17
1
2019-04-26  Keith Rollin  <krollin@apple.com>
18
2019-04-26  Keith Rollin  <krollin@apple.com>
2
19
3
        Enable new build rule for post-processing headers when using XCBuild
20
        Enable new build rule for post-processing headers when using XCBuild
- a/Source/WebKitLegacy/win/ChangeLog +17 lines
Lines 1-3 a/Source/WebKitLegacy/win/ChangeLog_sec1
1
2018-11-07  Frederic Wang  <fwang@igalia.com>
2
3
        Add support for ScrollOptions' ScrollBehavior and CSS scroll-behavior properties
4
        https://bugs.webkit.org/show_bug.cgi?id=188043
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * Interfaces/IWebPreferencesPrivate.idl: Handle smooth scrolling option.
9
        * WebPreferenceKeysPrivate.h: Ditto.
10
        * WebPreferences.cpp: Ditto.
11
        (WebPreferences::initializeDefaultSettings):
12
        (WebPreferences::CSSOMViewSmoothScrollingEnabled):
13
        (WebPreferences::setCSSOMViewSmoothScrollingEnabled):
14
        * WebPreferences.h: Ditto.
15
        * WebView.cpp: Ditto.
16
        (WebView::notifyPreferencesChanged):
17
1
2019-04-24  Zalan Bujtas  <zalan@apple.com>
18
2019-04-24  Zalan Bujtas  <zalan@apple.com>
2
19
3
        Regression (r244291): Broken API Test AutoLayoutRenderingProgressRelativeOrdering
20
        Regression (r244291): Broken API Test AutoLayoutRenderingProgressRelativeOrdering
- a/Source/WebCore/CMakeLists.txt +2 lines
Lines 930-937 set(WebCore_NON_SVG_IDL_FILES a/Source/WebCore/CMakeLists.txt_sec1
930
    page/ResizeObserverCallback.idl
930
    page/ResizeObserverCallback.idl
931
    page/ResizeObserverEntry.idl
931
    page/ResizeObserverEntry.idl
932
    page/Screen.idl
932
    page/Screen.idl
933
    page/ScrollBehavior.idl
933
    page/ScrollIntoViewOptions.idl
934
    page/ScrollIntoViewOptions.idl
934
    page/ScrollLogicalPosition.idl
935
    page/ScrollLogicalPosition.idl
936
    page/ScrollOptions.idl
935
    page/ScrollToOptions.idl
937
    page/ScrollToOptions.idl
936
    page/ShareData.idl
938
    page/ShareData.idl
937
    page/UndoItem.idl
939
    page/UndoItem.idl
- a/Source/WebCore/DerivedSources.make +2 lines
Lines 875-882 JS_BINDING_IDLS = \ a/Source/WebCore/DerivedSources.make_sec1
875
    $(WebCore)/page/ResizeObserverCallback.idl \
875
    $(WebCore)/page/ResizeObserverCallback.idl \
876
    $(WebCore)/page/ResizeObserverEntry.idl \
876
    $(WebCore)/page/ResizeObserverEntry.idl \
877
    $(WebCore)/page/Screen.idl \
877
    $(WebCore)/page/Screen.idl \
878
    $(WebCore)/page/ScrollBehavior.idl \
878
    $(WebCore)/page/ScrollIntoViewOptions.idl \
879
    $(WebCore)/page/ScrollIntoViewOptions.idl \
879
    $(WebCore)/page/ScrollLogicalPosition.idl \
880
    $(WebCore)/page/ScrollLogicalPosition.idl \
881
    $(WebCore)/page/ScrollOptions.idl \
880
    $(WebCore)/page/ScrollToOptions.idl \
882
    $(WebCore)/page/ScrollToOptions.idl \
881
    $(WebCore)/page/ShareData.idl \
883
    $(WebCore)/page/ShareData.idl \
882
    $(WebCore)/page/UndoItem.idl \
884
    $(WebCore)/page/UndoItem.idl \
- a/Source/WebCore/Headers.cmake +2 lines
Lines 791-798 set(WebCore_PRIVATE_FRAMEWORK_HEADERS a/Source/WebCore/Headers.cmake_sec1
791
    page/RemoteFrame.h
791
    page/RemoteFrame.h
792
    page/RenderingUpdateScheduler.h
792
    page/RenderingUpdateScheduler.h
793
    page/RuntimeEnabledFeatures.h
793
    page/RuntimeEnabledFeatures.h
794
    page/ScrollBehavior.h
794
    page/ScrollIntoViewOptions.h
795
    page/ScrollIntoViewOptions.h
795
    page/ScrollLogicalPosition.h
796
    page/ScrollLogicalPosition.h
797
    page/ScrollOptions.h
796
    page/ScrollToOptions.h
798
    page/ScrollToOptions.h
797
    page/SecurityOrigin.h
799
    page/SecurityOrigin.h
798
    page/SecurityOriginData.h
800
    page/SecurityOriginData.h
- a/Source/WebCore/Sources.txt +4 lines
Lines 1539-1544 page/ResourceUsageOverlay.cpp a/Source/WebCore/Sources.txt_sec1
1539
page/ResourceUsageThread.cpp
1539
page/ResourceUsageThread.cpp
1540
page/RuntimeEnabledFeatures.cpp
1540
page/RuntimeEnabledFeatures.cpp
1541
page/Screen.cpp
1541
page/Screen.cpp
1542
page/ScrollBehavior.cpp
1542
page/SecurityOrigin.cpp
1543
page/SecurityOrigin.cpp
1543
page/SecurityOriginData.cpp
1544
page/SecurityOriginData.cpp
1544
page/SecurityPolicy.cpp
1545
page/SecurityPolicy.cpp
Lines 1641-1646 platform/RuntimeApplicationChecks.cpp a/Source/WebCore/Sources.txt_sec2
1641
platform/SSLKeyGenerator.cpp
1642
platform/SSLKeyGenerator.cpp
1642
platform/SchemeRegistry.cpp
1643
platform/SchemeRegistry.cpp
1643
platform/ScrollAnimator.cpp
1644
platform/ScrollAnimator.cpp
1645
platform/ScrollAnimationSmooth.cpp
1644
platform/ScrollView.cpp
1646
platform/ScrollView.cpp
1645
platform/ScrollableArea.cpp
1647
platform/ScrollableArea.cpp
1646
platform/Scrollbar.cpp
1648
platform/Scrollbar.cpp
Lines 3214-3221 JSSVGZoomEvent.cpp a/Source/WebCore/Sources.txt_sec3
3214
JSScreen.cpp
3216
JSScreen.cpp
3215
JSScreenLuminance.cpp
3217
JSScreenLuminance.cpp
3216
JSScriptProcessorNode.cpp
3218
JSScriptProcessorNode.cpp
3219
JSScrollBehavior.cpp
3217
JSScrollIntoViewOptions.cpp
3220
JSScrollIntoViewOptions.cpp
3218
JSScrollLogicalPosition.cpp
3221
JSScrollLogicalPosition.cpp
3222
JSScrollOptions.cpp
3219
JSScrollToOptions.cpp
3223
JSScrollToOptions.cpp
3220
JSSecurityPolicyViolationEvent.cpp
3224
JSSecurityPolicyViolationEvent.cpp
3221
JSServiceWorker.cpp
3225
JSServiceWorker.cpp
- a/Source/WebCore/SourcesGTK.txt -1 lines
Lines 56-62 page/scrolling/nicosia/ScrollingTreeStickyNode.cpp a/Source/WebCore/SourcesGTK.txt_sec1
56
page/scrolling/generic/ScrollingThreadGeneric.cpp
56
page/scrolling/generic/ScrollingThreadGeneric.cpp
57
57
58
platform/ScrollAnimationKinetic.cpp
58
platform/ScrollAnimationKinetic.cpp
59
platform/ScrollAnimationSmooth.cpp
60
platform/UserAgentQuirks.cpp
59
platform/UserAgentQuirks.cpp
61
60
62
platform/generic/ScrollAnimatorGeneric.cpp
61
platform/generic/ScrollAnimatorGeneric.cpp
- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj +28 lines
Lines 2382-2387 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec1
2382
		83407FC11E8D9C1700E048D3 /* VisibilityChangeClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 83407FC01E8D9C1200E048D3 /* VisibilityChangeClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
2382
		83407FC11E8D9C1700E048D3 /* VisibilityChangeClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 83407FC01E8D9C1200E048D3 /* VisibilityChangeClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
2383
		834476EF1DA5BC5E002B5EB0 /* JSScrollLogicalPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E9B3011DA5A51E00FFD8D4 /* JSScrollLogicalPosition.h */; };
2383
		834476EF1DA5BC5E002B5EB0 /* JSScrollLogicalPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E9B3011DA5A51E00FFD8D4 /* JSScrollLogicalPosition.h */; };
2384
		834476EF1DA5BC5E002B5EC1 /* JSScrollIntoViewOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E9B3011DA5A51E00FFD8E5 /* JSScrollIntoViewOptions.h */; };
2384
		834476EF1DA5BC5E002B5EC1 /* JSScrollIntoViewOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E9B3011DA5A51E00FFD8E5 /* JSScrollIntoViewOptions.h */; };
2385
		834476EF1DA5BC5E002B6EB0 /* JSScrollBehavior.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E9B3011DA5A51E00FFE8D4 /* JSScrollBehavior.h */; };
2386
		834476EF1DA5BC5E002B6EC1 /* JSScrollOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E9B3011DA5A51E00FFE8E5 /* JSScrollOptions.h */; };
2385
		834476EF1DA5BC5E002B6ED2 /* JSScrollToOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E9B3011DA5A51E00FFE8F6 /* JSScrollToOptions.h */; };
2387
		834476EF1DA5BC5E002B6ED2 /* JSScrollToOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E9B3011DA5A51E00FFE8F6 /* JSScrollToOptions.h */; };
2386
		8348BFAC1B85729800912F36 /* ClassCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 8348BFAA1B85729500912F36 /* ClassCollection.h */; };
2388
		8348BFAC1B85729800912F36 /* ClassCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 8348BFAA1B85729500912F36 /* ClassCollection.h */; };
2387
		834DFAD01F7DAE5D00C2725B /* SharedStringHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 834DFACC1F7DAE5600C2725B /* SharedStringHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
2389
		834DFAD01F7DAE5D00C2725B /* SharedStringHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 834DFACC1F7DAE5600C2725B /* SharedStringHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
Lines 2437-2442 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec2
2437
		83C45B8E1DC2B68A008871BA /* ValidationBubble.h in Headers */ = {isa = PBXBuildFile; fileRef = 83C45B8D1DC2B67C008871BA /* ValidationBubble.h */; settings = {ATTRIBUTES = (Private, ); }; };
2439
		83C45B8E1DC2B68A008871BA /* ValidationBubble.h in Headers */ = {isa = PBXBuildFile; fileRef = 83C45B8D1DC2B67C008871BA /* ValidationBubble.h */; settings = {ATTRIBUTES = (Private, ); }; };
2438
		83C5795D1DA5C301006F9C86 /* ScrollLogicalPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = 8350C3E71DA59B6200355424 /* ScrollLogicalPosition.h */; settings = {ATTRIBUTES = (Private, ); }; };
2440
		83C5795D1DA5C301006F9C86 /* ScrollLogicalPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = 8350C3E71DA59B6200355424 /* ScrollLogicalPosition.h */; settings = {ATTRIBUTES = (Private, ); }; };
2439
		83C5795D1DA5C301006F9C97 /* ScrollIntoViewOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8350C3E71DA59B6200355435 /* ScrollIntoViewOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
2441
		83C5795D1DA5C301006F9C97 /* ScrollIntoViewOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8350C3E71DA59B6200355435 /* ScrollIntoViewOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
2442
		83C5795D1DA5C301006FAC86 /* ScrollBehavior.h in Headers */ = {isa = PBXBuildFile; fileRef = 8350C3E71DA59B6200356424 /* ScrollBehavior.h */; settings = {ATTRIBUTES = (Private, ); }; };
2443
		83C5795D1DA5C301006FAC97 /* ScrollOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8350C3E71DA59B6200356435 /* ScrollOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
2440
		83C5795D1DA5C301006FACA8 /* ScrollToOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8350C3E71DA59B6200356446 /* ScrollToOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
2444
		83C5795D1DA5C301006FACA8 /* ScrollToOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8350C3E71DA59B6200356446 /* ScrollToOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
2441
		83D35AEC1C7187FA00F70D5A /* XMLHttpRequestEventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 83D35AEA1C7187ED00F70D5A /* XMLHttpRequestEventTarget.h */; };
2445
		83D35AEC1C7187FA00F70D5A /* XMLHttpRequestEventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 83D35AEA1C7187ED00F70D5A /* XMLHttpRequestEventTarget.h */; };
2442
		83D35AF21C718D9000F70D5A /* JSXMLHttpRequestEventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 83D35AF01C718D8400F70D5A /* JSXMLHttpRequestEventTarget.h */; };
2446
		83D35AF21C718D9000F70D5A /* JSXMLHttpRequestEventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 83D35AF01C718D8400F70D5A /* JSXMLHttpRequestEventTarget.h */; };
Lines 9952-9957 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec3
9952
		834DFACE1F7DAE5700C2725B /* SharedStringHash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SharedStringHash.cpp; sourceTree = "<group>"; };
9956
		834DFACE1F7DAE5700C2725B /* SharedStringHash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SharedStringHash.cpp; sourceTree = "<group>"; };
9953
		8350C3E71DA59B6200355424 /* ScrollLogicalPosition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollLogicalPosition.h; sourceTree = "<group>"; };
9957
		8350C3E71DA59B6200355424 /* ScrollLogicalPosition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollLogicalPosition.h; sourceTree = "<group>"; };
9954
		8350C3E71DA59B6200355435 /* ScrollIntoViewOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollIntoViewOptions.h; sourceTree = "<group>"; };
9958
		8350C3E71DA59B6200355435 /* ScrollIntoViewOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollIntoViewOptions.h; sourceTree = "<group>"; };
9959
		8350C3E81DA59B6200355435 /* ScrollIntoViewOptions.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ScrollIntoViewOptions.idl; sourceTree = "<group>"; };
9960
		8350C3E71DA59B6200356424 /* ScrollBehavior.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollBehavior.h; sourceTree = "<group>"; };
9961
		8350C3E71DA59B6200356434 /* ScrollBehavior.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollBehavior.cpp; sourceTree = "<group>"; };
9962
		8350C3E81DA59B6200356424 /* ScrollBehavior.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ScrollBehavior.idl; sourceTree = "<group>"; };
9963
		8350C3E71DA59B6200356435 /* ScrollOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollOptions.h; sourceTree = "<group>"; };
9964
		8350C3E81DA59B6200356435 /* ScrollOptions.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ScrollOptions.idl; sourceTree = "<group>"; };
9955
		8350C3E71DA59B6200356446 /* ScrollToOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollToOptions.h; sourceTree = "<group>"; };
9965
		8350C3E71DA59B6200356446 /* ScrollToOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollToOptions.h; sourceTree = "<group>"; };
9956
		8350C3E81DA59B6200355424 /* ScrollLogicalPosition.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ScrollLogicalPosition.idl; sourceTree = "<group>"; };
9966
		8350C3E81DA59B6200355424 /* ScrollLogicalPosition.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ScrollLogicalPosition.idl; sourceTree = "<group>"; };
9957
		8350C3E81DA59B6200355435 /* ScrollIntoViewOptions.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ScrollIntoViewOptions.idl; sourceTree = "<group>"; };
9967
		8350C3E81DA59B6200355435 /* ScrollIntoViewOptions.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ScrollIntoViewOptions.idl; sourceTree = "<group>"; };
Lines 10073-10078 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec4
10073
		83E959E11B8BC22B004D9385 /* NativeNodeFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeNodeFilter.h; sourceTree = "<group>"; };
10083
		83E959E11B8BC22B004D9385 /* NativeNodeFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeNodeFilter.h; sourceTree = "<group>"; };
10074
		83E9B3001DA5A51E00FFD8D4 /* JSScrollLogicalPosition.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScrollLogicalPosition.cpp; sourceTree = "<group>"; };
10084
		83E9B3001DA5A51E00FFD8D4 /* JSScrollLogicalPosition.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScrollLogicalPosition.cpp; sourceTree = "<group>"; };
10075
		83E9B3001DA5A51E00FFD8E5 /* JSScrollIntoViewOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScrollIntoViewOptions.cpp; sourceTree = "<group>"; };
10085
		83E9B3001DA5A51E00FFD8E5 /* JSScrollIntoViewOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScrollIntoViewOptions.cpp; sourceTree = "<group>"; };
10086
		83E9B3011DA5A51E00FFD8E5 /* JSScrollIntoViewOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScrollIntoViewOptions.h; sourceTree = "<group>"; };
10087
		83E9B3001DA5A51E00FFE8D4 /* JSScrollBehavior.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScrollBehavior.cpp; sourceTree = "<group>"; };
10088
		83E9B3011DA5A51E00FFE8D4 /* JSScrollBehavior.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScrollBehavior.h; sourceTree = "<group>"; };
10089
		83E9B3001DA5A51E00FFE8E5 /* JSScrollOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScrollOptions.cpp; sourceTree = "<group>"; };
10090
		83E9B3011DA5A51E00FFE8E5 /* JSScrollOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScrollOptions.h; sourceTree = "<group>"; };
10076
		83E9B3001DA5A51E00FFE8F6 /* JSScrollToOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScrollToOptions.cpp; sourceTree = "<group>"; };
10091
		83E9B3001DA5A51E00FFE8F6 /* JSScrollToOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScrollToOptions.cpp; sourceTree = "<group>"; };
10077
		83E9B3011DA5A51E00FFD8D4 /* JSScrollLogicalPosition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScrollLogicalPosition.h; sourceTree = "<group>"; };
10092
		83E9B3011DA5A51E00FFD8D4 /* JSScrollLogicalPosition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScrollLogicalPosition.h; sourceTree = "<group>"; };
10078
		83E9B3011DA5A51E00FFD8E5 /* JSScrollIntoViewOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScrollIntoViewOptions.h; sourceTree = "<group>"; };
10093
		83E9B3011DA5A51E00FFD8E5 /* JSScrollIntoViewOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScrollIntoViewOptions.h; sourceTree = "<group>"; };
Lines 20241-20250 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec5
20241
				BCEC01BA0C274DAC009F4EC9 /* Screen.cpp */,
20256
				BCEC01BA0C274DAC009F4EC9 /* Screen.cpp */,
20242
				BCEC01BB0C274DAC009F4EC9 /* Screen.h */,
20257
				BCEC01BB0C274DAC009F4EC9 /* Screen.h */,
20243
				BCEC01BC0C274DAC009F4EC9 /* Screen.idl */,
20258
				BCEC01BC0C274DAC009F4EC9 /* Screen.idl */,
20259
				8350C3E71DA59B6200356434 /* ScrollBehavior.cpp */,
20260
				8350C3E71DA59B6200356424 /* ScrollBehavior.h */,
20261
				8350C3E81DA59B6200356424 /* ScrollBehavior.idl */,
20244
				8350C3E71DA59B6200355435 /* ScrollIntoViewOptions.h */,
20262
				8350C3E71DA59B6200355435 /* ScrollIntoViewOptions.h */,
20245
				8350C3E81DA59B6200355435 /* ScrollIntoViewOptions.idl */,
20263
				8350C3E81DA59B6200355435 /* ScrollIntoViewOptions.idl */,
20246
				8350C3E71DA59B6200355424 /* ScrollLogicalPosition.h */,
20264
				8350C3E71DA59B6200355424 /* ScrollLogicalPosition.h */,
20247
				8350C3E81DA59B6200355424 /* ScrollLogicalPosition.idl */,
20265
				8350C3E81DA59B6200355424 /* ScrollLogicalPosition.idl */,
20266
				8350C3E71DA59B6200356435 /* ScrollOptions.h */,
20267
				8350C3E81DA59B6200356435 /* ScrollOptions.idl */,
20248
				8350C3E71DA59B6200356446 /* ScrollToOptions.h */,
20268
				8350C3E71DA59B6200356446 /* ScrollToOptions.h */,
20249
				8350C3E81DA59B6200356446 /* ScrollToOptions.idl */,
20269
				8350C3E81DA59B6200356446 /* ScrollToOptions.idl */,
20250
				BCD0E0F70E972C3500265DEA /* SecurityOrigin.cpp */,
20270
				BCD0E0F70E972C3500265DEA /* SecurityOrigin.cpp */,
Lines 24932-24941 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec6
24932
				58B2FA022232D60A00938D63 /* JSResizeObserverEntry.h */,
24952
				58B2FA022232D60A00938D63 /* JSResizeObserverEntry.h */,
24933
				BCEC01C00C274DDD009F4EC9 /* JSScreen.cpp */,
24953
				BCEC01C00C274DDD009F4EC9 /* JSScreen.cpp */,
24934
				BCEC01C10C274DDD009F4EC9 /* JSScreen.h */,
24954
				BCEC01C10C274DDD009F4EC9 /* JSScreen.h */,
24955
				83E9B3001DA5A51E00FFE8D4 /* JSScrollBehavior.cpp */,
24956
				83E9B3011DA5A51E00FFE8D4 /* JSScrollBehavior.h */,
24935
				83E9B3001DA5A51E00FFD8E5 /* JSScrollIntoViewOptions.cpp */,
24957
				83E9B3001DA5A51E00FFD8E5 /* JSScrollIntoViewOptions.cpp */,
24936
				83E9B3011DA5A51E00FFD8E5 /* JSScrollIntoViewOptions.h */,
24958
				83E9B3011DA5A51E00FFD8E5 /* JSScrollIntoViewOptions.h */,
24937
				83E9B3001DA5A51E00FFD8D4 /* JSScrollLogicalPosition.cpp */,
24959
				83E9B3001DA5A51E00FFD8D4 /* JSScrollLogicalPosition.cpp */,
24938
				83E9B3011DA5A51E00FFD8D4 /* JSScrollLogicalPosition.h */,
24960
				83E9B3011DA5A51E00FFD8D4 /* JSScrollLogicalPosition.h */,
24961
				83E9B3001DA5A51E00FFE8E5 /* JSScrollOptions.cpp */,
24962
				83E9B3011DA5A51E00FFE8E5 /* JSScrollOptions.h */,
24939
				83E9B3001DA5A51E00FFE8F6 /* JSScrollToOptions.cpp */,
24963
				83E9B3001DA5A51E00FFE8F6 /* JSScrollToOptions.cpp */,
24940
				83E9B3011DA5A51E00FFE8F6 /* JSScrollToOptions.h */,
24964
				83E9B3011DA5A51E00FFE8F6 /* JSScrollToOptions.h */,
24941
				7C73FB0F191EF6F4007DE061 /* JSUserMessageHandler.cpp */,
24965
				7C73FB0F191EF6F4007DE061 /* JSUserMessageHandler.cpp */,
Lines 30032-30039 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec7
30032
				5E2C436C1BCF071E0001E2BC /* JSRTCTrackEvent.h in Headers */,
30056
				5E2C436C1BCF071E0001E2BC /* JSRTCTrackEvent.h in Headers */,
30033
				BCEC01C30C274DDD009F4EC9 /* JSScreen.h in Headers */,
30057
				BCEC01C30C274DDD009F4EC9 /* JSScreen.h in Headers */,
30034
				FDA15ECE12B03F61003A583A /* JSScriptProcessorNode.h in Headers */,
30058
				FDA15ECE12B03F61003A583A /* JSScriptProcessorNode.h in Headers */,
30059
				834476EF1DA5BC5E002B6EB0 /* JSScrollBehavior.h in Headers */,
30035
				834476EF1DA5BC5E002B5EC1 /* JSScrollIntoViewOptions.h in Headers */,
30060
				834476EF1DA5BC5E002B5EC1 /* JSScrollIntoViewOptions.h in Headers */,
30036
				834476EF1DA5BC5E002B5EB0 /* JSScrollLogicalPosition.h in Headers */,
30061
				834476EF1DA5BC5E002B5EB0 /* JSScrollLogicalPosition.h in Headers */,
30062
				834476EF1DA5BC5E002B6EC1 /* JSScrollOptions.h in Headers */,
30037
				834476EF1DA5BC5E002B6ED2 /* JSScrollToOptions.h in Headers */,
30063
				834476EF1DA5BC5E002B6ED2 /* JSScrollToOptions.h in Headers */,
30038
				CED06AD11C77754800FDFAF1 /* JSSecurityPolicyViolationEvent.h in Headers */,
30064
				CED06AD11C77754800FDFAF1 /* JSSecurityPolicyViolationEvent.h in Headers */,
30039
				5182C2561F3143CD0059BA7C /* JSServiceWorker.h in Headers */,
30065
				5182C2561F3143CD0059BA7C /* JSServiceWorker.h in Headers */,
Lines 31212-31217 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec8
31212
				44C991860F3D1EBE00586670 /* ScrollbarThemeIOS.h in Headers */,
31238
				44C991860F3D1EBE00586670 /* ScrollbarThemeIOS.h in Headers */,
31213
				BC8B853E0E7C7F1100AB6984 /* ScrollbarThemeMac.h in Headers */,
31239
				BC8B853E0E7C7F1100AB6984 /* ScrollbarThemeMac.h in Headers */,
31214
				0FE71406142170B800DB33BA /* ScrollbarThemeMock.h in Headers */,
31240
				0FE71406142170B800DB33BA /* ScrollbarThemeMock.h in Headers */,
31241
				83C5795D1DA5C301006FAC86 /* ScrollBehavior.h in Headers */,
31215
				1AA84F05143BA7BD0051D153 /* ScrollController.h in Headers */,
31242
				1AA84F05143BA7BD0051D153 /* ScrollController.h in Headers */,
31216
				0F605AED15F94848004DF0C0 /* ScrollingConstraints.h in Headers */,
31243
				0F605AED15F94848004DF0C0 /* ScrollingConstraints.h in Headers */,
31217
				1AF62EE814DA22A70041556C /* ScrollingCoordinator.h in Headers */,
31244
				1AF62EE814DA22A70041556C /* ScrollingCoordinator.h in Headers */,
Lines 31246-31251 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec9
31246
				83C5795D1DA5C301006F9C97 /* ScrollIntoViewOptions.h in Headers */,
31273
				83C5795D1DA5C301006F9C97 /* ScrollIntoViewOptions.h in Headers */,
31247
				7AAFE8D019CB8672000F56D8 /* ScrollLatchingState.h in Headers */,
31274
				7AAFE8D019CB8672000F56D8 /* ScrollLatchingState.h in Headers */,
31248
				83C5795D1DA5C301006F9C86 /* ScrollLogicalPosition.h in Headers */,
31275
				83C5795D1DA5C301006F9C86 /* ScrollLogicalPosition.h in Headers */,
31276
				83C5795D1DA5C301006FAC97 /* ScrollOptions.h in Headers */,
31249
				F478755419983AFF0024A287 /* ScrollSnapAnimatorState.h in Headers */,
31277
				F478755419983AFF0024A287 /* ScrollSnapAnimatorState.h in Headers */,
31250
				F46729281E0DE68500ACC3D8 /* ScrollSnapOffsetsInfo.h in Headers */,
31278
				F46729281E0DE68500ACC3D8 /* ScrollSnapOffsetsInfo.h in Headers */,
31251
				83C5795D1DA5C301006FACA8 /* ScrollToOptions.h in Headers */,
31279
				83C5795D1DA5C301006FACA8 /* ScrollToOptions.h in Headers */,
- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp +5 lines
Lines 386-391 static const CSSPropertyID computedProperties[] = { a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp_sec1
386
#if ENABLE(OVERFLOW_SCROLLING_TOUCH)
386
#if ENABLE(OVERFLOW_SCROLLING_TOUCH)
387
    CSSPropertyWebkitOverflowScrolling,
387
    CSSPropertyWebkitOverflowScrolling,
388
#endif
388
#endif
389
    CSSPropertyScrollBehavior,
389
    CSSPropertyPerspective,
390
    CSSPropertyPerspective,
390
    CSSPropertyPerspectiveOrigin,
391
    CSSPropertyPerspectiveOrigin,
391
    CSSPropertyWebkitPrintColorAdjust,
392
    CSSPropertyWebkitPrintColorAdjust,
Lines 3740-3745 RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyinStyle(const RenderSty a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp_sec2
3740
                return cssValuePool.createIdentifierValue(CSSValueAuto);
3741
                return cssValuePool.createIdentifierValue(CSSValueAuto);
3741
            return cssValuePool.createIdentifierValue(CSSValueTouch);
3742
            return cssValuePool.createIdentifierValue(CSSValueTouch);
3742
#endif
3743
#endif
3744
        case CSSPropertyScrollBehavior:
3745
            if (!style.useSmoothScrolling())
3746
                return cssValuePool.createIdentifierValue(CSSValueAuto);
3747
            return cssValuePool.createIdentifierValue(CSSValueSmooth);
3743
        case CSSPropertyPerspective:
3748
        case CSSPropertyPerspective:
3744
            if (!style.hasPerspective())
3749
            if (!style.hasPerspective())
3745
                return cssValuePool.createIdentifierValue(CSSValueNone);
3750
                return cssValuePool.createIdentifierValue(CSSValueNone);
- a/Source/WebCore/css/CSSProperties.json +16 lines
Lines 6516-6521 a/Source/WebCore/css/CSSProperties.json_sec1
6516
                "url": "https://www.w3.org/TR/css-ui-4/#propdef-user-select"
6516
                "url": "https://www.w3.org/TR/css-ui-4/#propdef-user-select"
6517
            }
6517
            }
6518
        },
6518
        },
6519
        "scroll-behavior": {
6520
            "values": [
6521
                "auto",
6522
                "smooth"
6523
            ],
6524
            "codegen-properties": {
6525
                "converter": "SmoothScrolling",
6526
                "name-for-methods": "UseSmoothScrolling"
6527
            },
6528
            "status": {
6529
                "status": "experimental"
6530
            },
6531
            "specification": {
6532
                "url": "https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior"
6533
            }
6534
        },
6519
        "scroll-padding": {
6535
        "scroll-padding": {
6520
            "codegen-properties": {
6536
            "codegen-properties": {
6521
                "enable-if": "ENABLE_CSS_SCROLL_SNAP",
6537
                "enable-if": "ENABLE_CSS_SCROLL_SNAP",
- a/Source/WebCore/css/CSSValueKeywords.in +4 lines
Lines 1383-1388 pan-y a/Source/WebCore/css/CSSValueKeywords.in_sec1
1383
pinch-zoom
1383
pinch-zoom
1384
#endif
1384
#endif
1385
1385
1386
// scroll-behavior
1387
// auto
1388
smooth
1389
1386
// hanging-punctuation
1390
// hanging-punctuation
1387
allow-end
1391
allow-end
1388
first
1392
first
- a/Source/WebCore/css/StyleBuilderConverter.h +6 lines
Lines 124-129 public: a/Source/WebCore/css/StyleBuilderConverter.h_sec1
124
#if ENABLE(OVERFLOW_SCROLLING_TOUCH)
124
#if ENABLE(OVERFLOW_SCROLLING_TOUCH)
125
    static bool convertOverflowScrolling(StyleResolver&, const CSSValue&);
125
    static bool convertOverflowScrolling(StyleResolver&, const CSSValue&);
126
#endif
126
#endif
127
    static bool convertSmoothScrolling(StyleResolver&, const CSSValue&);
127
    static FontFeatureSettings convertFontFeatureSettings(StyleResolver&, const CSSValue&);
128
    static FontFeatureSettings convertFontFeatureSettings(StyleResolver&, const CSSValue&);
128
    static FontSelectionValue convertFontWeightFromValue(const CSSValue&);
129
    static FontSelectionValue convertFontWeightFromValue(const CSSValue&);
129
    static FontSelectionValue convertFontStretchFromValue(const CSSValue&);
130
    static FontSelectionValue convertFontStretchFromValue(const CSSValue&);
Lines 1380-1385 inline bool StyleBuilderConverter::convertOverflowScrolling(StyleResolver&, cons a/Source/WebCore/css/StyleBuilderConverter.h_sec2
1380
}
1381
}
1381
#endif
1382
#endif
1382
1383
1384
inline bool StyleBuilderConverter::convertSmoothScrolling(StyleResolver&, const CSSValue& value)
1385
{
1386
    return downcast<CSSPrimitiveValue>(value).valueID() == CSSValueSmooth;
1387
}
1388
1383
inline SVGLengthValue StyleBuilderConverter::convertSVGLengthValue(StyleResolver&, const CSSValue& value)
1389
inline SVGLengthValue StyleBuilderConverter::convertSVGLengthValue(StyleResolver&, const CSSValue& value)
1384
{
1390
{
1385
    return SVGLengthValue::fromCSSPrimitiveValue(downcast<CSSPrimitiveValue>(value));
1391
    return SVGLengthValue::fromCSSPrimitiveValue(downcast<CSSPrimitiveValue>(value));
- a/Source/WebCore/css/parser/CSSParserContext.cpp +2 lines
Lines 68-73 CSSParserContext::CSSParserContext(const Document& document, const URL& sheetBas a/Source/WebCore/css/parser/CSSParserContext.cpp_sec1
68
    attachmentEnabled = RuntimeEnabledFeatures::sharedFeatures().attachmentElementEnabled();
68
    attachmentEnabled = RuntimeEnabledFeatures::sharedFeatures().attachmentElementEnabled();
69
#endif
69
#endif
70
    deferredCSSParserEnabled = document.settings().deferredCSSParserEnabled();
70
    deferredCSSParserEnabled = document.settings().deferredCSSParserEnabled();
71
    scrollBehaviorEnabled = document.settings().CSSOMViewSmoothScrollingEnabled();
71
    useSystemAppearance = document.page() ? document.page()->useSystemAppearance() : false;
72
    useSystemAppearance = document.page() ? document.page()->useSystemAppearance() : false;
72
}
73
}
73
74
Lines 92-97 bool operator==(const CSSParserContext& a, const CSSParserContext& b) a/Source/WebCore/css/parser/CSSParserContext.cpp_sec2
92
        && a.attachmentEnabled == b.attachmentEnabled
93
        && a.attachmentEnabled == b.attachmentEnabled
93
#endif
94
#endif
94
        && a.deferredCSSParserEnabled == b.deferredCSSParserEnabled
95
        && a.deferredCSSParserEnabled == b.deferredCSSParserEnabled
96
        && a.scrollBehaviorEnabled == b.scrollBehaviorEnabled
95
        && a.hasDocumentSecurityOrigin == b.hasDocumentSecurityOrigin
97
        && a.hasDocumentSecurityOrigin == b.hasDocumentSecurityOrigin
96
        && a.useSystemAppearance == b.useSystemAppearance;
98
        && a.useSystemAppearance == b.useSystemAppearance;
97
}
99
}
- a/Source/WebCore/css/parser/CSSParserContext.h -1 / +3 lines
Lines 61-66 public: a/Source/WebCore/css/parser/CSSParserContext.h_sec1
61
    bool attachmentEnabled { false };
61
    bool attachmentEnabled { false };
62
#endif
62
#endif
63
    bool deferredCSSParserEnabled { false };
63
    bool deferredCSSParserEnabled { false };
64
    bool scrollBehaviorEnabled { false };
64
    
65
    
65
    // This is only needed to support getMatchedCSSRules.
66
    // This is only needed to support getMatchedCSSRules.
66
    bool hasDocumentSecurityOrigin { false };
67
    bool hasDocumentSecurityOrigin { false };
Lines 110-116 struct CSSParserContextHash { a/Source/WebCore/css/parser/CSSParserContext.h_sec2
110
#if ENABLE(ATTACHMENT_ELEMENT)
111
#if ENABLE(ATTACHMENT_ELEMENT)
111
            & key.attachmentEnabled                         << 11
112
            & key.attachmentEnabled                         << 11
112
#endif
113
#endif
113
            & key.mode                                      << 12; // Keep this last.
114
            & key.scrollBehaviorEnabled                     << 12
115
            & key.mode                                      << 13; // Keep this last.
114
        hash ^= WTF::intHash(bits);
116
        hash ^= WTF::intHash(bits);
115
        return hash;
117
        return hash;
116
    }
118
    }
- a/Source/WebCore/css/parser/CSSParserFastPaths.cpp -5 lines
Lines 634-643 bool CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyID propertyId a/Source/WebCore/css/parser/CSSParserFastPaths.cpp_sec1
634
            || valueID == CSSValueSticky || valueID == CSSValueWebkitSticky;
634
            || valueID == CSSValueSticky || valueID == CSSValueWebkitSticky;
635
    case CSSPropertyResize: // none | both | horizontal | vertical | auto
635
    case CSSPropertyResize: // none | both | horizontal | vertical | auto
636
        return valueID == CSSValueNone || valueID == CSSValueBoth || valueID == CSSValueHorizontal || valueID == CSSValueVertical || valueID == CSSValueAuto;
636
        return valueID == CSSValueNone || valueID == CSSValueBoth || valueID == CSSValueHorizontal || valueID == CSSValueVertical || valueID == CSSValueAuto;
637
    // FIXME-NEWPARSER: Investigate this property.
638
    // case CSSPropertyScrollBehavior: // auto | smooth
639
    //     ASSERT(RuntimeEnabledFeatures::cssomSmoothScrollEnabled());
640
    //   return valueID == CSSValueAuto || valueID == CSSValueSmooth;
641
    case CSSPropertyShapeRendering:
637
    case CSSPropertyShapeRendering:
642
        return valueID == CSSValueAuto || valueID == CSSValueOptimizeSpeed || valueID == CSSValueCrispedges || valueID == CSSValueGeometricPrecision;
638
        return valueID == CSSValueAuto || valueID == CSSValueOptimizeSpeed || valueID == CSSValueCrispedges || valueID == CSSValueGeometricPrecision;
643
    case CSSPropertyStrokeLinejoin:
639
    case CSSPropertyStrokeLinejoin:
Lines 937-943 bool CSSParserFastPaths::isKeywordPropertyID(CSSPropertyID propertyId) a/Source/WebCore/css/parser/CSSParserFastPaths.cpp_sec2
937
    // case CSSPropertyFontKerning:
933
    // case CSSPropertyFontKerning:
938
    // case CSSPropertyHyphens:
934
    // case CSSPropertyHyphens:
939
    // case CSSPropertyOverflowAnchor:
935
    // case CSSPropertyOverflowAnchor:
940
    // case CSSPropertyScrollBehavior:
941
    // case CSSPropertyScrollSnapType:
936
    // case CSSPropertyScrollSnapType:
942
    // case CSSPropertyTextAlignLast:
937
    // case CSSPropertyTextAlignLast:
943
    // case CSSPropertyTextCombineUpright:
938
    // case CSSPropertyTextCombineUpright:
- a/Source/WebCore/css/parser/CSSPropertyParser.cpp +12 lines
Lines 2343-2348 static RefPtr<CSSValueList> consumeScrollSnapType(CSSParserTokenRange& range) a/Source/WebCore/css/parser/CSSPropertyParser.cpp_sec1
2343
2343
2344
#endif
2344
#endif
2345
2345
2346
static RefPtr<CSSPrimitiveValue> consumeScrollBehavior(CSSParserTokenRange& range)
2347
{
2348
    auto valueID = range.peek().id();
2349
    if (valueID != CSSValueAuto && valueID != CSSValueSmooth)
2350
        return nullptr;
2351
    return consumeIdent(range);
2352
}
2353
2346
static RefPtr<CSSValue> consumeBorderRadiusCorner(CSSParserTokenRange& range, CSSParserMode cssParserMode)
2354
static RefPtr<CSSValue> consumeBorderRadiusCorner(CSSParserTokenRange& range, CSSParserMode cssParserMode)
2347
{
2355
{
2348
    RefPtr<CSSPrimitiveValue> parsedValue1 = consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative);
2356
    RefPtr<CSSPrimitiveValue> parsedValue1 = consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative);
Lines 4039-4044 RefPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSPropertyID property, CSS a/Source/WebCore/css/parser/CSSPropertyParser.cpp_sec2
4039
    case CSSPropertyScrollSnapType:
4047
    case CSSPropertyScrollSnapType:
4040
        return consumeScrollSnapType(m_range);
4048
        return consumeScrollSnapType(m_range);
4041
#endif
4049
#endif
4050
    case CSSPropertyScrollBehavior:
4051
        if (!m_context.scrollBehaviorEnabled)
4052
            return nullptr;
4053
        return consumeScrollBehavior(m_range);
4042
    case CSSPropertyClip:
4054
    case CSSPropertyClip:
4043
        return consumeClip(m_range, m_context.mode);
4055
        return consumeClip(m_range, m_context.mode);
4044
#if ENABLE(POINTER_EVENTS)
4056
#if ENABLE(POINTER_EVENTS)
- a/Source/WebCore/dom/Element.cpp -8 / +21 lines
Lines 711-717 void Element::scrollIntoView(Optional<Variant<bool, ScrollIntoViewOptions>>&& ar a/Source/WebCore/dom/Element.cpp_sec1
711
    bool insideFixed;
711
    bool insideFixed;
712
    LayoutRect absoluteBounds = renderer()->absoluteAnchorRect(&insideFixed);
712
    LayoutRect absoluteBounds = renderer()->absoluteAnchorRect(&insideFixed);
713
713
714
    // FIXME(webkit.org/b/188043): Support ScrollBehavior.
715
    ScrollIntoViewOptions options;
714
    ScrollIntoViewOptions options;
716
    if (arg) {
715
    if (arg) {
717
        auto value = arg.value();
716
        auto value = arg.value();
Lines 721-729 void Element::scrollIntoView(Optional<Variant<bool, ScrollIntoViewOptions>>&& ar a/Source/WebCore/dom/Element.cpp_sec2
721
            options.blockPosition = ScrollLogicalPosition::End;
720
            options.blockPosition = ScrollLogicalPosition::End;
722
    }
721
    }
723
722
724
    ScrollAlignment alignX = toScrollAlignment(options.inlinePosition, false);
723
    ScrollRectToVisibleOptions scrollRectToVisibleOptions {
725
    ScrollAlignment alignY = toScrollAlignment(options.blockPosition, true);
724
        SelectionRevealMode::Reveal,
726
    renderer()->scrollRectToVisible(absoluteBounds, insideFixed, { SelectionRevealMode::Reveal, alignX, alignY, ShouldAllowCrossOriginScrolling::No });
725
        toScrollAlignment(options.inlinePosition, false),
726
        toScrollAlignment(options.blockPosition, true),
727
        ShouldAllowCrossOriginScrolling::No,
728
    };
729
    if (options.behavior)
730
        scrollRectToVisibleOptions.behavior = options.behavior.value();
731
    renderer()->scrollRectToVisible(absoluteBounds, insideFixed, scrollRectToVisibleOptions);
727
}
732
}
728
733
729
void Element::scrollIntoView(bool alignToTop) 
734
void Element::scrollIntoView(bool alignToTop) 
Lines 782-788 void Element::scrollBy(const ScrollToOptions& options) a/Source/WebCore/dom/Element.cpp_sec3
782
787
783
void Element::scrollBy(double x, double y)
788
void Element::scrollBy(double x, double y)
784
{
789
{
785
    scrollBy({ x, y });
790
    scrollBy(fromCoordinates(x, y));
786
}
791
}
787
792
788
void Element::scrollTo(const ScrollToOptions& options, ScrollClamping clamping)
793
void Element::scrollTo(const ScrollToOptions& options, ScrollClamping clamping)
Lines 818-830 void Element::scrollTo(const ScrollToOptions& options, ScrollClamping clamping) a/Source/WebCore/dom/Element.cpp_sec4
818
        adjustForAbsoluteZoom(renderer->scrollLeft(), *renderer),
823
        adjustForAbsoluteZoom(renderer->scrollLeft(), *renderer),
819
        adjustForAbsoluteZoom(renderer->scrollTop(), *renderer)
824
        adjustForAbsoluteZoom(renderer->scrollTop(), *renderer)
820
    );
825
    );
821
    renderer->setScrollLeft(clampToInteger(scrollToOptions.left.value() * renderer->style().effectiveZoom()), ScrollType::Programmatic, clamping);
826
    IntPoint scrollPosition(
822
    renderer->setScrollTop(clampToInteger(scrollToOptions.top.value() * renderer->style().effectiveZoom()), ScrollType::Programmatic, clamping);
827
        clampToInteger(scrollToOptions.left.value() * renderer->style().effectiveZoom()),
828
        clampToInteger(scrollToOptions.top.value() * renderer->style().effectiveZoom())
829
    );
830
    if (useSmoothScrolling(scrollToOptions.behavior.valueOr(ScrollBehavior::Auto), *this)) {
831
        renderer->scrollToPositionWithAnimation(scrollPosition, clamping);
832
        return;
833
    }
834
    renderer->setScrollLeft(scrollPosition.x(), ScrollType::Programmatic, clamping);
835
    renderer->setScrollTop(scrollPosition.y(), ScrollType::Programmatic, clamping);
823
}
836
}
824
837
825
void Element::scrollTo(double x, double y)
838
void Element::scrollTo(double x, double y)
826
{
839
{
827
    scrollTo({ x, y });
840
    scrollTo(fromCoordinates(x, y));
828
}
841
}
829
842
830
void Element::scrollByUnits(int units, ScrollGranularity granularity)
843
void Element::scrollByUnits(int units, ScrollGranularity granularity)
- a/Source/WebCore/page/DOMWindow.cpp -4 / +10 lines
Lines 1543-1549 double DOMWindow::devicePixelRatio() const a/Source/WebCore/page/DOMWindow.cpp_sec1
1543
1543
1544
void DOMWindow::scrollBy(double x, double y) const
1544
void DOMWindow::scrollBy(double x, double y) const
1545
{
1545
{
1546
    scrollBy({ x, y });
1546
    scrollBy(fromCoordinates(x, y));
1547
}
1547
}
1548
1548
1549
void DOMWindow::scrollBy(const ScrollToOptions& options) const
1549
void DOMWindow::scrollBy(const ScrollToOptions& options) const
Lines 1565-1574 void DOMWindow::scrollBy(const ScrollToOptions& options) const a/Source/WebCore/page/DOMWindow.cpp_sec2
1565
1565
1566
void DOMWindow::scrollTo(double x, double y, ScrollClamping clamping) const
1566
void DOMWindow::scrollTo(double x, double y, ScrollClamping clamping) const
1567
{
1567
{
1568
    scrollTo({ x, y }, clamping);
1568
    scrollTo(fromCoordinates(x, y), clamping);
1569
}
1569
}
1570
1570
1571
void DOMWindow::scrollTo(const ScrollToOptions& options, ScrollClamping) const
1571
void DOMWindow::scrollTo(const ScrollToOptions& options, ScrollClamping clamping) const
1572
{
1572
{
1573
    if (!isCurrentlyDisplayedInFrame())
1573
    if (!isCurrentlyDisplayedInFrame())
1574
        return;
1574
        return;
Lines 1581-1592 void DOMWindow::scrollTo(const ScrollToOptions& options, ScrollClamping) const a/Source/WebCore/page/DOMWindow.cpp_sec3
1581
        view->contentsScrollPosition().x(), view->contentsScrollPosition().y()
1581
        view->contentsScrollPosition().x(), view->contentsScrollPosition().y()
1582
    );
1582
    );
1583
1583
1584
    if (!scrollToOptions.left.value() && !scrollToOptions.top.value() && view->contentsScrollPosition() == IntPoint(0, 0))
1584
    if (!view->isScrollInProgress() && !scrollToOptions.left.value() && !scrollToOptions.top.value() && view->contentsScrollPosition() == IntPoint(0, 0))
1585
        return;
1585
        return;
1586
1586
1587
    document()->updateLayoutIgnorePendingStylesheets();
1587
    document()->updateLayoutIgnorePendingStylesheets();
1588
1588
1589
    IntPoint layoutPos(view->mapFromCSSToLayoutUnits(scrollToOptions.left.value()), view->mapFromCSSToLayoutUnits(scrollToOptions.top.value()));
1589
    IntPoint layoutPos(view->mapFromCSSToLayoutUnits(scrollToOptions.left.value()), view->mapFromCSSToLayoutUnits(scrollToOptions.top.value()));
1590
    // FIXME: Should we use document()->scrollingElement()?
1591
    // See https://github.com/w3c/csswg-drafts/issues/2977
1592
    if (document()->documentElement() && useSmoothScrolling(scrollToOptions.behavior.valueOr(ScrollBehavior::Auto), *document()->documentElement())) {
1593
        view->scrollToOffsetWithAnimation(layoutPos, clamping);
1594
        return;
1595
    }
1590
    view->setContentsScrollPosition(layoutPos);
1596
    view->setContentsScrollPosition(layoutPos);
1591
}
1597
}
1592
1598
- a/Source/WebCore/page/ScrollBehavior.cpp +48 lines
Line 0 a/Source/WebCore/page/ScrollBehavior.cpp_sec1
1
/*
2
 * Copyright (C) 2018 Igalia S.L.
3
 *
4
 * This library is free software; you can redistribute it and/or
5
 * modify it under the terms of the GNU Library General Public
6
 * License as published by the Free Software Foundation; either
7
 * version 2 of the License, or (at your option) any later version.
8
 *
9
 * This library is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 * Library General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU Library General Public License
15
 * along with this library; see the file COPYING.LIB.  If not, write to
16
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
 * Boston, MA 02110-1301, USA.
18
 */
19
20
#include "config.h"
21
#include "ScrollBehavior.h"
22
23
#include "Element.h"
24
#include "RenderElement.h"
25
#include "RenderStyle.h"
26
#include "Settings.h"
27
28
namespace WebCore {
29
30
bool useSmoothScrolling(ScrollBehavior behavior, Element& associatedElement)
31
{
32
    if (!associatedElement.document().settings().CSSOMViewSmoothScrollingEnabled() || !associatedElement.renderer())
33
        return false;
34
35
    // https://drafts.csswg.org/cssom-view/#scrolling
36
    switch (behavior) {
37
    case ScrollBehavior::Auto:
38
        return associatedElement.renderer()->style().useSmoothScrolling();
39
    case ScrollBehavior::Instant:
40
        return false;
41
    case ScrollBehavior::Smooth:
42
        return true;
43
    }
44
    ASSERT_NOT_REACHED();
45
    return false;
46
}
47
48
} // namespace WebCore
- a/Source/WebCore/page/ScrollBehavior.h +34 lines
Line 0 a/Source/WebCore/page/ScrollBehavior.h_sec1
1
/*
2
 * Copyright (C) 2018 Igalia S.L.
3
 *
4
 * This library is free software; you can redistribute it and/or
5
 * modify it under the terms of the GNU Library General Public
6
 * License as published by the Free Software Foundation; either
7
 * version 2 of the License, or (at your option) any later version.
8
 *
9
 * This library is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 * Library General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU Library General Public License
15
 * along with this library; see the file COPYING.LIB.  If not, write to
16
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
 * Boston, MA 02110-1301, USA.
18
 */
19
20
#pragma once
21
22
namespace WebCore {
23
24
class Element;
25
26
enum class ScrollBehavior : uint8_t {
27
    Auto = 0,
28
    Instant,
29
    Smooth
30
};
31
32
bool useSmoothScrolling(ScrollBehavior, Element& associatedElement);
33
34
} // namespace WebCore
- a/Source/WebCore/page/ScrollBehavior.idl +20 lines
Line 0 a/Source/WebCore/page/ScrollBehavior.idl_sec1
1
/*
2
 * Copyright (C) 2018 Igalia S.L.
3
 *
4
 * This library is free software; you can redistribute it and/or
5
 * modify it under the terms of the GNU Library General Public
6
 * License as published by the Free Software Foundation; either
7
 * version 2 of the License, or (at your option) any later version.
8
 *
9
 * This library is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 * Library General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU Library General Public License
15
 * along with this library; see the file COPYING.LIB.  If not, write to
16
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
 * Boston, MA 02110-1301, USA.
18
 */
19
20
enum ScrollBehavior { "auto", "instant", "smooth" };
- a/Source/WebCore/page/ScrollIntoViewOptions.h -3 / +2 lines
Lines 20-31 a/Source/WebCore/page/ScrollIntoViewOptions.h_sec1
20
#pragma once
20
#pragma once
21
21
22
#include "ScrollLogicalPosition.h"
22
#include "ScrollLogicalPosition.h"
23
#include "ScrollOptions.h"
23
24
24
namespace WebCore {
25
namespace WebCore {
25
26
26
class Element;
27
struct ScrollIntoViewOptions : ScrollOptions {
27
28
struct ScrollIntoViewOptions {
29
    Optional<ScrollLogicalPosition> blockPosition { ScrollLogicalPosition::Start };
28
    Optional<ScrollLogicalPosition> blockPosition { ScrollLogicalPosition::Start };
30
    Optional<ScrollLogicalPosition> inlinePosition { ScrollLogicalPosition::Nearest };
29
    Optional<ScrollLogicalPosition> inlinePosition { ScrollLogicalPosition::Nearest };
31
};
30
};
- a/Source/WebCore/page/ScrollIntoViewOptions.idl -2 / +1 lines
Lines 17-24 a/Source/WebCore/page/ScrollIntoViewOptions.idl_sec1
17
 * Boston, MA 02110-1301, USA.
17
 * Boston, MA 02110-1301, USA.
18
 */
18
 */
19
19
20
// FIXME(webkit.org/b/188043): Support ScrollBehavior.
20
dictionary ScrollIntoViewOptions : ScrollOptions {
21
dictionary ScrollIntoViewOptions {
22
    [ImplementedAs=blockPosition] ScrollLogicalPosition block = "start";
21
    [ImplementedAs=blockPosition] ScrollLogicalPosition block = "start";
23
    [ImplementedAs=inlinePosition] ScrollLogicalPosition inline = "nearest";
22
    [ImplementedAs=inlinePosition] ScrollLogicalPosition inline = "nearest";
24
};
23
};
- a/Source/WebCore/page/ScrollOptions.h +30 lines
Line 0 a/Source/WebCore/page/ScrollOptions.h_sec1
1
/*
2
 * Copyright (C) 2018 Igalia S.L.
3
 *
4
 * This library is free software; you can redistribute it and/or
5
 * modify it under the terms of the GNU Library General Public
6
 * License as published by the Free Software Foundation; either
7
 * version 2 of the License, or (at your option) any later version.
8
 *
9
 * This library is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 * Library General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU Library General Public License
15
 * along with this library; see the file COPYING.LIB.  If not, write to
16
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
 * Boston, MA 02110-1301, USA.
18
 */
19
20
#pragma once
21
22
#include "ScrollBehavior.h"
23
24
namespace WebCore {
25
26
struct ScrollOptions {
27
    Optional<ScrollBehavior> behavior { ScrollBehavior::Auto };
28
};
29
30
} // namespace WebCore
- a/Source/WebCore/page/ScrollOptions.idl +22 lines
Line 0 a/Source/WebCore/page/ScrollOptions.idl_sec1
1
/*
2
 * Copyright (C) 2018 Igalia S.L.
3
 *
4
 * This library is free software; you can redistribute it and/or
5
 * modify it under the terms of the GNU Library General Public
6
 * License as published by the Free Software Foundation; either
7
 * version 2 of the License, or (at your option) any later version.
8
 *
9
 * This library is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 * Library General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU Library General Public License
15
 * along with this library; see the file COPYING.LIB.  If not, write to
16
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
 * Boston, MA 02110-1301, USA.
18
 */
19
20
dictionary ScrollOptions {
21
    ScrollBehavior behavior = "auto";
22
};
- a/Source/WebCore/page/ScrollToOptions.h -2 / +11 lines
Lines 28-43 a/Source/WebCore/page/ScrollToOptions.h_sec1
28
28
29
#pragma once
29
#pragma once
30
30
31
#include "ScrollOptions.h"
31
#include <cmath>
32
#include <cmath>
32
#include <wtf/Optional.h>
33
#include <wtf/Optional.h>
33
34
34
namespace WebCore {
35
namespace WebCore {
35
36
36
struct ScrollToOptions {
37
struct ScrollToOptions : ScrollOptions {
37
    Optional<double> left;
38
    Optional<double> left;
38
    Optional<double> top;
39
    Optional<double> top;
39
};
40
};
40
41
42
inline ScrollToOptions fromCoordinates(double x, double y)
43
{
44
    ScrollToOptions options;
45
    options.left = x;
46
    options.top = y;
47
    return options;
48
};
49
41
inline double normalizeNonFiniteValueOrFallBackTo(Optional<double> value, double fallbackValue)
50
inline double normalizeNonFiniteValueOrFallBackTo(Optional<double> value, double fallbackValue)
42
{
51
{
43
    // Normalize non-finite values (https://drafts.csswg.org/cssom-view/#normalize-non-finite-values).
52
    // Normalize non-finite values (https://drafts.csswg.org/cssom-view/#normalize-non-finite-values).
Lines 47-53 inline double normalizeNonFiniteValueOrFallBackTo(Optional<double> value, double a/Source/WebCore/page/ScrollToOptions.h_sec2
47
// FIXME(https://webkit.org/b/88339): Consider using FloatPoint or DoublePoint for fallback and return values.
56
// FIXME(https://webkit.org/b/88339): Consider using FloatPoint or DoublePoint for fallback and return values.
48
inline ScrollToOptions normalizeNonFiniteCoordinatesOrFallBackTo(const ScrollToOptions& value, double x, double y)
57
inline ScrollToOptions normalizeNonFiniteCoordinatesOrFallBackTo(const ScrollToOptions& value, double x, double y)
49
{
58
{
50
    ScrollToOptions options;
59
    ScrollToOptions options = value;
51
    options.left = normalizeNonFiniteValueOrFallBackTo(value.left, x);
60
    options.left = normalizeNonFiniteValueOrFallBackTo(value.left, x);
52
    options.top = normalizeNonFiniteValueOrFallBackTo(value.top, y);
61
    options.top = normalizeNonFiniteValueOrFallBackTo(value.top, y);
53
    return options;
62
    return options;
- a/Source/WebCore/page/ScrollToOptions.idl -2 / +1 lines
Lines 26-33 a/Source/WebCore/page/ScrollToOptions.idl_sec1
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
28
29
// FIXME(webkit.org/b/188043): Support ScrollBehavior.
29
dictionary ScrollToOptions : ScrollOptions {
30
dictionary ScrollToOptions {
31
    unrestricted double left;
30
    unrestricted double left;
32
    unrestricted double top;
31
    unrestricted double top;
33
};
32
};
- a/Source/WebCore/page/Settings.yaml +3 lines
Lines 592-597 visualViewportAPIEnabled: a/Source/WebCore/page/Settings.yaml_sec1
592
CSSOMViewScrollingAPIEnabled:
592
CSSOMViewScrollingAPIEnabled:
593
  initial: false
593
  initial: false
594
594
595
CSSOMViewSmoothScrollingEnabled:
596
  initial: false
597
595
inputEventsEnabled:
598
inputEventsEnabled:
596
  initial: true
599
  initial: true
597
600
- a/Source/WebCore/platform/ScrollAnimation.h +3 lines
Lines 32-46 namespace WebCore { a/Source/WebCore/platform/ScrollAnimation.h_sec1
32
32
33
class FloatPoint;
33
class FloatPoint;
34
class ScrollableArea;
34
class ScrollableArea;
35
enum class ScrollClamping : uint8_t;
35
36
36
class ScrollAnimation {
37
class ScrollAnimation {
37
public:
38
public:
38
    virtual ~ScrollAnimation() { };
39
    virtual ~ScrollAnimation() { };
39
    virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float /* step */, float /* multiplier */) { return true; };
40
    virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float /* step */, float /* multiplier */) { return true; };
41
    virtual void scroll(const FloatPoint&, ScrollClamping) { };
40
    virtual void stop() = 0;
42
    virtual void stop() = 0;
41
    virtual void updateVisibleLengths() { };
43
    virtual void updateVisibleLengths() { };
42
    virtual void setCurrentPosition(const FloatPoint&) { };
44
    virtual void setCurrentPosition(const FloatPoint&) { };
43
    virtual void serviceAnimation() { };
45
    virtual void serviceAnimation() { };
46
    virtual bool isScrollInProgress() const { return false; }
44
47
45
protected:
48
protected:
46
    ScrollAnimation(ScrollableArea& scrollableArea)
49
    ScrollAnimation(ScrollableArea& scrollableArea)
- a/Source/WebCore/platform/ScrollAnimationKinetic.cpp +5 lines
Lines 165-168 void ScrollAnimationKinetic::animationTimerFired() a/Source/WebCore/platform/ScrollAnimationKinetic.cpp_sec1
165
    m_notifyPositionChangedFunction(FloatPoint(m_position));
165
    m_notifyPositionChangedFunction(FloatPoint(m_position));
166
}
166
}
167
167
168
bool ScrollAnimationKinetic::isScrollInProgress() const
169
{
170
    return m_animationTimer.isActive();
171
}
172
168
} // namespace WebCore
173
} // namespace WebCore
- a/Source/WebCore/platform/ScrollAnimationKinetic.h +1 lines
Lines 66-71 public: a/Source/WebCore/platform/ScrollAnimationKinetic.h_sec1
66
private:
66
private:
67
    void stop() override;
67
    void stop() override;
68
    void animationTimerFired();
68
    void animationTimerFired();
69
    bool isScrollInProgress() const override;
69
70
70
    std::function<void(FloatPoint&&)> m_notifyPositionChangedFunction;
71
    std::function<void(FloatPoint&&)> m_notifyPositionChangedFunction;
71
72
- a/Source/WebCore/platform/ScrollAnimationSmooth.cpp -5 / +21 lines
Lines 28-35 a/Source/WebCore/platform/ScrollAnimationSmooth.cpp_sec1
28
#include "config.h"
28
#include "config.h"
29
#include "ScrollAnimationSmooth.h"
29
#include "ScrollAnimationSmooth.h"
30
30
31
#if ENABLE(SMOOTH_SCROLLING)
32
33
#include "FloatPoint.h"
31
#include "FloatPoint.h"
34
#include "ScrollableArea.h"
32
#include "ScrollableArea.h"
35
33
Lines 38-43 namespace WebCore { a/Source/WebCore/platform/ScrollAnimationSmooth.cpp_sec2
38
static const double frameRate = 60;
36
static const double frameRate = 60;
39
static const Seconds tickTime = 1_s / frameRate;
37
static const Seconds tickTime = 1_s / frameRate;
40
static const Seconds minimumTimerInterval { 1_ms };
38
static const Seconds minimumTimerInterval { 1_ms };
39
static const double smoothFactorForProgrammaticScroll = 5;
41
40
42
ScrollAnimationSmooth::ScrollAnimationSmooth(ScrollableArea& scrollableArea, const FloatPoint& position, WTF::Function<void (FloatPoint&&)>&& notifyPositionChangedFunction)
41
ScrollAnimationSmooth::ScrollAnimationSmooth(ScrollableArea& scrollableArea, const FloatPoint& position, WTF::Function<void (FloatPoint&&)>&& notifyPositionChangedFunction)
43
    : ScrollAnimation(scrollableArea)
42
    : ScrollAnimation(scrollableArea)
Lines 67-72 bool ScrollAnimationSmooth::scroll(ScrollbarOrientation orientation, ScrollGranu a/Source/WebCore/platform/ScrollAnimationSmooth.cpp_sec3
67
    return needToScroll;
66
    return needToScroll;
68
}
67
}
69
68
69
void ScrollAnimationSmooth::scroll(const FloatPoint& position, ScrollClamping)
70
{
71
    // FIXME: Consider clamping?
72
    ScrollGranularity granularity = ScrollByPage;
73
    bool needToScroll = updatePerAxisData(m_horizontalData, granularity, position.x() - m_horizontalData.currentPosition, m_scrollableArea.minimumScrollPosition().x(), m_scrollableArea.maximumScrollPosition().x(), smoothFactorForProgrammaticScroll);
74
    needToScroll |=
75
        updatePerAxisData(m_verticalData, granularity, position.y() - m_verticalData.currentPosition, m_scrollableArea.minimumScrollPosition().y(), m_scrollableArea.maximumScrollPosition().y(), smoothFactorForProgrammaticScroll);
76
    if (needToScroll && !animationTimerActive()) {
77
        m_startTime = m_horizontalData.startTime;
78
        animationTimerFired();
79
    }
80
};
81
70
void ScrollAnimationSmooth::stop()
82
void ScrollAnimationSmooth::stop()
71
{
83
{
72
    m_animationTimer.stop();
84
    m_animationTimer.stop();
Lines 247-253 static inline void getAnimationParametersForGranularity(ScrollGranularity granul a/Source/WebCore/platform/ScrollAnimationSmooth.cpp_sec4
247
    }
259
    }
248
}
260
}
249
261
250
bool ScrollAnimationSmooth::updatePerAxisData(PerAxisData& data, ScrollGranularity granularity, float delta, float minScrollPosition, float maxScrollPosition)
262
bool ScrollAnimationSmooth::updatePerAxisData(PerAxisData& data, ScrollGranularity granularity, float delta, float minScrollPosition, float maxScrollPosition, double smoothFactor)
251
{
263
{
252
    if (!data.startTime || !delta || (delta < 0) != (data.desiredPosition - data.currentPosition < 0)) {
264
    if (!data.startTime || !delta || (delta < 0) != (data.desiredPosition - data.currentPosition < 0)) {
253
        data.desiredPosition = data.currentPosition;
265
        data.desiredPosition = data.currentPosition;
Lines 264-269 bool ScrollAnimationSmooth::updatePerAxisData(PerAxisData& data, ScrollGranulari a/Source/WebCore/platform/ScrollAnimationSmooth.cpp_sec5
264
    Curve coastTimeCurve;
276
    Curve coastTimeCurve;
265
    getAnimationParametersForGranularity(granularity, animationTime, repeatMinimumSustainTime, attackTime, releaseTime, coastTimeCurve, maximumCoastTime);
277
    getAnimationParametersForGranularity(granularity, animationTime, repeatMinimumSustainTime, attackTime, releaseTime, coastTimeCurve, maximumCoastTime);
266
278
279
    animationTime *= smoothFactor;
280
    repeatMinimumSustainTime *= smoothFactor;
281
    attackTime *= smoothFactor;
282
    releaseTime *= smoothFactor;
283
    maximumCoastTime *= smoothFactor;
284
267
    data.desiredPosition = newPosition;
285
    data.desiredPosition = newPosition;
268
    if (!data.startTime)
286
    if (!data.startTime)
269
        data.attackTime = attackTime;
287
        data.attackTime = attackTime;
Lines 407-411 bool ScrollAnimationSmooth::animationTimerActive() const a/Source/WebCore/platform/ScrollAnimationSmooth.cpp_sec6
407
}
425
}
408
426
409
} // namespace WebCore
427
} // namespace WebCore
410
411
#endif // ENABLE(SMOOTH_SCROLLING)
- a/Source/WebCore/platform/ScrollAnimationSmooth.h -4 / +4 lines
Lines 27-40 a/Source/WebCore/platform/ScrollAnimationSmooth.h_sec1
27
27
28
#include "ScrollAnimation.h"
28
#include "ScrollAnimation.h"
29
29
30
#if ENABLE(SMOOTH_SCROLLING)
31
32
#include "Timer.h"
30
#include "Timer.h"
33
31
34
namespace WebCore {
32
namespace WebCore {
35
33
36
class FloatPoint;
34
class FloatPoint;
37
class ScrollableArea;
35
class ScrollableArea;
36
enum class ScrollClamping : uint8_t;
38
37
39
class ScrollAnimationSmooth final: public ScrollAnimation {
38
class ScrollAnimationSmooth final: public ScrollAnimation {
40
public:
39
public:
Lines 51-59 public: a/Source/WebCore/platform/ScrollAnimationSmooth.h_sec2
51
50
52
private:
51
private:
53
    bool scroll(ScrollbarOrientation, ScrollGranularity, float step, float multiplier) override;
52
    bool scroll(ScrollbarOrientation, ScrollGranularity, float step, float multiplier) override;
53
    void scroll(const FloatPoint&, ScrollClamping) override;
54
    void stop() override;
54
    void stop() override;
55
    void updateVisibleLengths() override;
55
    void updateVisibleLengths() override;
56
    void setCurrentPosition(const FloatPoint&) override;
56
    void setCurrentPosition(const FloatPoint&) override;
57
    bool isScrollInProgress() const override { return animationTimerActive(); }
57
58
58
    struct PerAxisData {
59
    struct PerAxisData {
59
        PerAxisData() = delete;
60
        PerAxisData() = delete;
Lines 89-95 private: a/Source/WebCore/platform/ScrollAnimationSmooth.h_sec3
89
        int visibleLength { 0 };
90
        int visibleLength { 0 };
90
    };
91
    };
91
92
92
    bool updatePerAxisData(PerAxisData&, ScrollGranularity, float delta, float minScrollPosition, float maxScrollPosition);
93
    bool updatePerAxisData(PerAxisData&, ScrollGranularity, float delta, float minScrollPosition, float maxScrollPosition, double smoothFactor = 1);
93
    bool animateScroll(PerAxisData&, MonotonicTime currentTime);
94
    bool animateScroll(PerAxisData&, MonotonicTime currentTime);
94
95
95
    void requestAnimationTimerFired();
96
    void requestAnimationTimerFired();
Lines 108-111 private: a/Source/WebCore/platform/ScrollAnimationSmooth.h_sec4
108
109
109
} // namespace WebCore
110
} // namespace WebCore
110
111
111
#endif // ENABLE(SMOOTH_SCROLLING)
- a/Source/WebCore/platform/ScrollAnimator.cpp +48 lines
Lines 35-40 a/Source/WebCore/platform/ScrollAnimator.cpp_sec1
35
#include "FloatPoint.h"
35
#include "FloatPoint.h"
36
#include "LayoutSize.h"
36
#include "LayoutSize.h"
37
#include "PlatformWheelEvent.h"
37
#include "PlatformWheelEvent.h"
38
#include "ScrollAnimationSmooth.h"
38
#include "ScrollableArea.h"
39
#include "ScrollableArea.h"
39
#include <algorithm>
40
#include <algorithm>
40
41
Lines 52-62 ScrollAnimator::ScrollAnimator(ScrollableArea& scrollableArea) a/Source/WebCore/platform/ScrollAnimator.cpp_sec2
52
#if ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING)
53
#if ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING)
53
    , m_scrollController(*this)
54
    , m_scrollController(*this)
54
#endif
55
#endif
56
    , m_animationProgrammaticScroll(std::make_unique<ScrollAnimationSmooth>(scrollableArea, m_currentPosition, [this](FloatPoint&& position) {
57
        FloatSize delta = position - m_currentPosition;
58
        m_currentPosition = WTFMove(position);
59
        notifyPositionChanged(delta);
60
    }))
55
{
61
{
56
}
62
}
57
63
58
ScrollAnimator::~ScrollAnimator() = default;
64
ScrollAnimator::~ScrollAnimator() = default;
59
65
66
bool ScrollAnimator::isScrollInProgress() const
67
{
68
    // FIXME (TODO): This should also take into account animations in derived classes.
69
    return m_animationProgrammaticScroll->isScrollInProgress();
70
}
71
60
bool ScrollAnimator::scroll(ScrollbarOrientation orientation, ScrollGranularity, float step, float multiplier)
72
bool ScrollAnimator::scroll(ScrollbarOrientation orientation, ScrollGranularity, float step, float multiplier)
61
{
73
{
62
    FloatPoint currentPosition = this->currentPosition();
74
    FloatPoint currentPosition = this->currentPosition();
Lines 75-80 bool ScrollAnimator::scroll(ScrollbarOrientation orientation, ScrollGranularity, a/Source/WebCore/platform/ScrollAnimator.cpp_sec3
75
    return true;
87
    return true;
76
}
88
}
77
89
90
void ScrollAnimator::scrollToOffset(const FloatPoint& offset, ScrollClamping clamping)
91
{
92
    m_animationProgrammaticScroll->setCurrentPosition(m_currentPosition);
93
    auto newPosition = ScrollableArea::scrollPositionFromOffset(offset, toFloatSize(m_scrollableArea.scrollOrigin()));
94
    m_animationProgrammaticScroll->scroll(newPosition, clamping);
95
}
96
78
void ScrollAnimator::scrollToOffsetWithoutAnimation(const FloatPoint& offset, ScrollClamping)
97
void ScrollAnimator::scrollToOffsetWithoutAnimation(const FloatPoint& offset, ScrollClamping)
79
{
98
{
80
    FloatPoint newPositon = ScrollableArea::scrollPositionFromOffset(offset, toFloatSize(m_scrollableArea.scrollOrigin()));
99
    FloatPoint newPositon = ScrollableArea::scrollPositionFromOffset(offset, toFloatSize(m_scrollableArea.scrollOrigin()));
Lines 245-248 void ScrollAnimator::removeTestDeferralForReason(WheelEventTestTrigger::Scrollab a/Source/WebCore/platform/ScrollAnimator.cpp_sec4
245
}
264
}
246
#endif
265
#endif
247
266
267
void ScrollAnimator::cancelAnimations()
268
{
269
#if !USE(REQUEST_ANIMATION_FRAME_TIMER)
270
    m_animationProgrammaticScroll->stop();
271
#endif
272
}
273
274
void ScrollAnimator::serviceScrollAnimations()
275
{
276
#if !USE(REQUEST_ANIMATION_FRAME_TIMER)
277
    m_animationProgrammaticScroll->serviceAnimation();
278
#endif
279
}
280
281
void ScrollAnimator::willEndLiveResize()
282
{
283
    m_animationProgrammaticScroll->updateVisibleLengths();
284
}
285
286
void ScrollAnimator::didAddVerticalScrollbar(Scrollbar*)
287
{
288
    m_animationProgrammaticScroll->updateVisibleLengths();
289
}
290
291
void ScrollAnimator::didAddHorizontalScrollbar(Scrollbar*)
292
{
293
    m_animationProgrammaticScroll->updateVisibleLengths();
294
}
295
248
} // namespace WebCore
296
} // namespace WebCore
- a/Source/WebCore/platform/ScrollAnimator.h -5 / +10 lines
Lines 46-51 namespace WebCore { a/Source/WebCore/platform/ScrollAnimator.h_sec1
46
46
47
class FloatPoint;
47
class FloatPoint;
48
class PlatformTouchEvent;
48
class PlatformTouchEvent;
49
class ScrollAnimation;
49
class ScrollableArea;
50
class ScrollableArea;
50
class Scrollbar;
51
class Scrollbar;
51
class WheelEventTestTrigger;
52
class WheelEventTestTrigger;
Lines 68-73 public: a/Source/WebCore/platform/ScrollAnimator.h_sec2
68
    // The base class implementation always scrolls immediately, never animates.
69
    // The base class implementation always scrolls immediately, never animates.
69
    virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float step, float multiplier);
70
    virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float step, float multiplier);
70
71
72
    void scrollToOffset(const FloatPoint&, ScrollClamping = ScrollClamping::Clamped);
71
    virtual void scrollToOffsetWithoutAnimation(const FloatPoint&, ScrollClamping = ScrollClamping::Clamped);
73
    virtual void scrollToOffsetWithoutAnimation(const FloatPoint&, ScrollClamping = ScrollClamping::Clamped);
72
74
73
    ScrollableArea& scrollableArea() const { return m_scrollableArea; }
75
    ScrollableArea& scrollableArea() const { return m_scrollableArea; }
Lines 85-92 public: a/Source/WebCore/platform/ScrollAnimator.h_sec3
85
    void setCurrentPosition(const FloatPoint&);
87
    void setCurrentPosition(const FloatPoint&);
86
    const FloatPoint& currentPosition() const { return m_currentPosition; }
88
    const FloatPoint& currentPosition() const { return m_currentPosition; }
87
89
88
    virtual void cancelAnimations() { }
90
    virtual void cancelAnimations();
89
    virtual void serviceScrollAnimations() { }
91
    virtual void serviceScrollAnimations();
90
92
91
    virtual void contentAreaWillPaint() const { }
93
    virtual void contentAreaWillPaint() const { }
92
    virtual void mouseEnteredContentArea() { }
94
    virtual void mouseEnteredContentArea() { }
Lines 97-112 public: a/Source/WebCore/platform/ScrollAnimator.h_sec4
97
    virtual void mouseIsDownInScrollbar(Scrollbar*, bool) const { }
99
    virtual void mouseIsDownInScrollbar(Scrollbar*, bool) const { }
98
    virtual void willStartLiveResize() { }
100
    virtual void willStartLiveResize() { }
99
    virtual void contentsResized() const { }
101
    virtual void contentsResized() const { }
100
    virtual void willEndLiveResize() { }
102
    virtual void willEndLiveResize();
101
    virtual void contentAreaDidShow() { }
103
    virtual void contentAreaDidShow() { }
102
    virtual void contentAreaDidHide() { }
104
    virtual void contentAreaDidHide() { }
103
105
104
    virtual void lockOverlayScrollbarStateToHidden(bool) { }
106
    virtual void lockOverlayScrollbarStateToHidden(bool) { }
105
    virtual bool scrollbarsCanBeActive() const { return true; }
107
    virtual bool scrollbarsCanBeActive() const { return true; }
106
108
107
    virtual void didAddVerticalScrollbar(Scrollbar*) { }
109
    virtual void didAddVerticalScrollbar(Scrollbar*);
108
    virtual void willRemoveVerticalScrollbar(Scrollbar*) { }
110
    virtual void willRemoveVerticalScrollbar(Scrollbar*) { }
109
    virtual void didAddHorizontalScrollbar(Scrollbar*) { }
111
    virtual void didAddHorizontalScrollbar(Scrollbar*);
110
    virtual void willRemoveHorizontalScrollbar(Scrollbar*) { }
112
    virtual void willRemoveHorizontalScrollbar(Scrollbar*) { }
111
113
112
    virtual void invalidateScrollbarPartLayers(Scrollbar*) { }
114
    virtual void invalidateScrollbarPartLayers(Scrollbar*) { }
Lines 120-125 public: a/Source/WebCore/platform/ScrollAnimator.h_sec5
120
122
121
    virtual bool isRubberBandInProgress() const { return false; }
123
    virtual bool isRubberBandInProgress() const { return false; }
122
    virtual bool isScrollSnapInProgress() const { return false; }
124
    virtual bool isScrollSnapInProgress() const { return false; }
125
    bool isScrollInProgress() const;
123
126
124
    void setWheelEventTestTrigger(RefPtr<WheelEventTestTrigger>&& testTrigger) { m_wheelEventTestTrigger = testTrigger; }
127
    void setWheelEventTestTrigger(RefPtr<WheelEventTestTrigger>&& testTrigger) { m_wheelEventTestTrigger = testTrigger; }
125
#if (ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING)) && PLATFORM(MAC)
128
#if (ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING)) && PLATFORM(MAC)
Lines 150-155 protected: a/Source/WebCore/platform/ScrollAnimator.h_sec6
150
    ScrollController m_scrollController;
153
    ScrollController m_scrollController;
151
#endif
154
#endif
152
    FloatPoint m_currentPosition;
155
    FloatPoint m_currentPosition;
156
157
    std::unique_ptr<ScrollAnimation> m_animationProgrammaticScroll;
153
};
158
};
154
159
155
} // namespace WebCore
160
} // namespace WebCore
- a/Source/WebCore/platform/ScrollView.cpp -1 / +5 lines
Lines 501-509 void ScrollView::setScrollPosition(const ScrollPosition& scrollPosition) a/Source/WebCore/platform/ScrollView.cpp_sec1
501
501
502
    ScrollPosition newScrollPosition = !delegatesScrolling() ? adjustScrollPositionWithinRange(scrollPosition) : scrollPosition;
502
    ScrollPosition newScrollPosition = !delegatesScrolling() ? adjustScrollPositionWithinRange(scrollPosition) : scrollPosition;
503
503
504
    if ((!delegatesScrolling() || currentScrollType() == ScrollType::User) && newScrollPosition == this->scrollPosition())
504
    bool scrollInProgress = isScrollInProgress();
505
    if ((!delegatesScrolling() || currentScrollType() == ScrollType::User) && !scrollInProgress && newScrollPosition == this->scrollPosition())
505
        return;
506
        return;
506
507
508
    if (scrollInProgress)
509
        scrollAnimator().cancelAnimations();
510
507
    if (requestScrollPositionUpdate(newScrollPosition))
511
    if (requestScrollPositionUpdate(newScrollPosition))
508
        return;
512
        return;
509
513
- a/Source/WebCore/platform/ScrollableArea.cpp +11 lines
Lines 101-106 float ScrollableArea::adjustScrollStepForFixedContent(float step, ScrollbarOrien a/Source/WebCore/platform/ScrollableArea.cpp_sec1
101
    return step;
101
    return step;
102
}
102
}
103
103
104
bool ScrollableArea::isScrollInProgress() const
105
{
106
    return m_scrollAnimator && scrollAnimator().isScrollInProgress();
107
}
108
104
bool ScrollableArea::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier)
109
bool ScrollableArea::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier)
105
{
110
{
106
    ScrollbarOrientation orientation;
111
    ScrollbarOrientation orientation;
Lines 139-144 bool ScrollableArea::scroll(ScrollDirection direction, ScrollGranularity granula a/Source/WebCore/platform/ScrollableArea.cpp_sec2
139
    return scrollAnimator().scroll(orientation, granularity, step, multiplier);
144
    return scrollAnimator().scroll(orientation, granularity, step, multiplier);
140
}
145
}
141
146
147
void ScrollableArea::scrollToOffsetWithAnimation(const FloatPoint& offset, ScrollClamping clamping)
148
{
149
    LOG_WITH_STREAM(Scrolling, stream << "ScrollableArea " << this << " scrollToOffset " << offset);
150
    scrollAnimator().scrollToOffset(offset, clamping);
151
}
152
142
void ScrollableArea::scrollToOffsetWithoutAnimation(const FloatPoint& offset, ScrollClamping clamping)
153
void ScrollableArea::scrollToOffsetWithoutAnimation(const FloatPoint& offset, ScrollClamping clamping)
143
{
154
{
144
    LOG_WITH_STREAM(Scrolling, stream << "ScrollableArea " << this << " scrollToOffsetWithoutAnimation " << offset);
155
    LOG_WITH_STREAM(Scrolling, stream << "ScrollableArea " << this << " scrollToOffsetWithoutAnimation " << offset);
- a/Source/WebCore/platform/ScrollableArea.h +2 lines
Lines 50-56 typedef IntPoint ScrollOffset; a/Source/WebCore/platform/ScrollableArea.h_sec1
50
50
51
class ScrollableArea : public CanMakeWeakPtr<ScrollableArea> {
51
class ScrollableArea : public CanMakeWeakPtr<ScrollableArea> {
52
public:
52
public:
53
    WEBCORE_EXPORT bool isScrollInProgress() const;
53
    WEBCORE_EXPORT bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1);
54
    WEBCORE_EXPORT bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1);
55
    WEBCORE_EXPORT void scrollToOffsetWithAnimation(const FloatPoint&, ScrollClamping = ScrollClamping::Clamped);
54
    WEBCORE_EXPORT void scrollToOffsetWithoutAnimation(const FloatPoint&, ScrollClamping = ScrollClamping::Clamped);
56
    WEBCORE_EXPORT void scrollToOffsetWithoutAnimation(const FloatPoint&, ScrollClamping = ScrollClamping::Clamped);
55
    void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset);
57
    void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset);
56
58
- a/Source/WebCore/platform/mac/ScrollAnimatorMac.mm +1 lines
Lines 1151-1156 void ScrollAnimatorMac::notifyContentAreaScrolled(const FloatSize& delta) a/Source/WebCore/platform/mac/ScrollAnimatorMac.mm_sec1
1151
1151
1152
void ScrollAnimatorMac::cancelAnimations()
1152
void ScrollAnimatorMac::cancelAnimations()
1153
{
1153
{
1154
    ScrollAnimator::cancelAnimations();
1154
    m_haveScrolledSincePageLoad = false;
1155
    m_haveScrolledSincePageLoad = false;
1155
1156
1156
    if (scrollbarPaintTimerIsActive())
1157
    if (scrollbarPaintTimerIsActive())
- a/Source/WebCore/rendering/RenderBox.cpp +8 lines
Lines 591-596 void RenderBox::setScrollTop(int newTop, ScrollType scrollType, ScrollClamping c a/Source/WebCore/rendering/RenderBox.cpp_sec1
591
    layer()->scrollToYPosition(newTop, scrollType, clamping);
591
    layer()->scrollToYPosition(newTop, scrollType, clamping);
592
}
592
}
593
593
594
void RenderBox::scrollToPositionWithAnimation(ScrollPosition scrollPosition, ScrollClamping clamping)
595
{
596
    if (!hasOverflowClip() || !layer())
597
        return;
598
    setupWheelEventTestTrigger(*layer());
599
    layer()->scrollToOffsetWithAnimation(scrollPosition, clamping);
600
}
601
594
void RenderBox::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
602
void RenderBox::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
595
{
603
{
596
    rects.append(snappedIntRect(accumulatedOffset, size()));
604
    rects.append(snappedIntRect(accumulatedOffset, size()));
- a/Source/WebCore/rendering/RenderBox.h +1 lines
Lines 249-254 public: a/Source/WebCore/rendering/RenderBox.h_sec1
249
    virtual int scrollHeight() const;
249
    virtual int scrollHeight() const;
250
    virtual void setScrollLeft(int, ScrollType, ScrollClamping = ScrollClamping::Clamped);
250
    virtual void setScrollLeft(int, ScrollType, ScrollClamping = ScrollClamping::Clamped);
251
    virtual void setScrollTop(int, ScrollType, ScrollClamping = ScrollClamping::Clamped);
251
    virtual void setScrollTop(int, ScrollType, ScrollClamping = ScrollClamping::Clamped);
252
    void scrollToPositionWithAnimation(ScrollPosition, ScrollClamping = ScrollClamping::Clamped);
252
253
253
    LayoutUnit marginTop() const override { return m_marginBox.top(); }
254
    LayoutUnit marginTop() const override { return m_marginBox.top(); }
254
    LayoutUnit marginBottom() const override { return m_marginBox.bottom(); }
255
    LayoutUnit marginBottom() const override { return m_marginBox.bottom(); }
- a/Source/WebCore/rendering/RenderLayer.cpp -5 / +34 lines
Lines 114-119 a/Source/WebCore/rendering/RenderLayer.cpp_sec1
114
#include "ScaleTransformOperation.h"
114
#include "ScaleTransformOperation.h"
115
#include "ScriptDisallowedScope.h"
115
#include "ScriptDisallowedScope.h"
116
#include "ScrollAnimator.h"
116
#include "ScrollAnimator.h"
117
#include "ScrollBehavior.h"
117
#include "Scrollbar.h"
118
#include "Scrollbar.h"
118
#include "ScrollbarTheme.h"
119
#include "ScrollbarTheme.h"
119
#include "ScrollingCoordinator.h"
120
#include "ScrollingCoordinator.h"
Lines 2373-2384 void RenderLayer::scrollToOffset(const ScrollOffset& scrollOffset, ScrollType sc a/Source/WebCore/rendering/RenderLayer.cpp_sec2
2373
        handled = scrollingCoordinator->requestScrollPositionUpdate(*this, scrollPositionFromOffset(scrollOffset));
2374
        handled = scrollingCoordinator->requestScrollPositionUpdate(*this, scrollPositionFromOffset(scrollOffset));
2374
#endif
2375
#endif
2375
2376
2376
    if (!handled)
2377
    bool scrollInProgress = isScrollInProgress();
2378
    if (scrollInProgress)
2379
        scrollAnimator().cancelAnimations();
2380
    if (scrollInProgress || !handled)
2377
        scrollToOffsetWithoutAnimation(newScrollOffset, clamping);
2381
        scrollToOffsetWithoutAnimation(newScrollOffset, clamping);
2378
2382
2379
    setCurrentScrollType(previousScrollType);
2383
    setCurrentScrollType(previousScrollType);
2380
}
2384
}
2381
2385
2386
void RenderLayer::scrollToOffsetWithAnimation(const ScrollOffset& scrollOffset, ScrollClamping clamping)
2387
{
2388
    ScrollOffset newScrollOffset = clamping == ScrollClamping::Clamped ? clampScrollOffset(scrollOffset) : scrollOffset;
2389
    bool scrollInProgress = isScrollInProgress();
2390
    if (scrollInProgress)
2391
        scrollAnimator().cancelAnimations();
2392
    if (scrollInProgress || newScrollOffset != this->scrollOffset())
2393
        ScrollableArea::scrollToOffsetWithAnimation(newScrollOffset, clamping);
2394
}
2395
2382
void RenderLayer::scrollTo(const ScrollPosition& position)
2396
void RenderLayer::scrollTo(const ScrollPosition& position)
2383
{
2397
{
2384
    RenderBox* box = renderBox();
2398
    RenderBox* box = renderBox();
Lines 2524-2529 bool RenderLayer::allowsCurrentScroll() const a/Source/WebCore/rendering/RenderLayer.cpp_sec3
2524
2538
2525
void RenderLayer::scrollRectToVisible(const LayoutRect& absoluteRect, bool insideFixed, const ScrollRectToVisibleOptions& options)
2539
void RenderLayer::scrollRectToVisible(const LayoutRect& absoluteRect, bool insideFixed, const ScrollRectToVisibleOptions& options)
2526
{
2540
{
2541
    // FIXME (https://webkit.org/b/189907): Make this work with nested scrollable boxes when a smooth scrolling must be performed.
2527
    LOG_WITH_STREAM(Scrolling, stream << "Layer " << this << " scrollRectToVisible " << absoluteRect);
2542
    LOG_WITH_STREAM(Scrolling, stream << "Layer " << this << " scrollRectToVisible " << absoluteRect);
2528
2543
2529
    RenderLayer* parentLayer = nullptr;
2544
    RenderLayer* parentLayer = nullptr;
Lines 2546-2554 void RenderLayer::scrollRectToVisible(const LayoutRect& absoluteRect, bool insid a/Source/WebCore/rendering/RenderLayer.cpp_sec4
2546
        LayoutRect revealRect = getRectToExpose(layerBounds, localExposeRect, insideFixed, options.alignX, options.alignY);
2561
        LayoutRect revealRect = getRectToExpose(layerBounds, localExposeRect, insideFixed, options.alignX, options.alignY);
2547
2562
2548
        ScrollOffset clampedScrollOffset = clampScrollOffset(scrollOffset() + toIntSize(roundedIntRect(revealRect).location()));
2563
        ScrollOffset clampedScrollOffset = clampScrollOffset(scrollOffset() + toIntSize(roundedIntRect(revealRect).location()));
2549
        if (clampedScrollOffset != scrollOffset()) {
2564
        if (isScrollInProgress() || clampedScrollOffset != scrollOffset()) {
2550
            ScrollOffset oldScrollOffset = scrollOffset();
2565
            ScrollOffset oldScrollOffset = scrollOffset();
2551
            scrollToOffset(clampedScrollOffset);
2566
            if (box->element() && useSmoothScrolling(options.behavior, *box->element()))
2567
                scrollToOffsetWithAnimation(clampedScrollOffset);
2568
            else
2569
                scrollToOffset(clampedScrollOffset);
2552
            IntSize scrollOffsetDifference = scrollOffset() - oldScrollOffset;
2570
            IntSize scrollOffsetDifference = scrollOffset() - oldScrollOffset;
2553
            localExposeRect.move(-scrollOffsetDifference);
2571
            localExposeRect.move(-scrollOffsetDifference);
2554
            newRect = LayoutRect(box->localToAbsoluteQuad(FloatQuad(FloatRect(localExposeRect)), UseTransforms).boundingBox());
2572
            newRect = LayoutRect(box->localToAbsoluteQuad(FloatQuad(FloatRect(localExposeRect)), UseTransforms).boundingBox());
Lines 2572-2578 void RenderLayer::scrollRectToVisible(const LayoutRect& absoluteRect, bool insid a/Source/WebCore/rendering/RenderLayer.cpp_sec5
2572
                IntPoint scrollOffset(roundedIntPoint(exposeRect.location()));
2590
                IntPoint scrollOffset(roundedIntPoint(exposeRect.location()));
2573
                // Adjust offsets if they're outside of the allowable range.
2591
                // Adjust offsets if they're outside of the allowable range.
2574
                scrollOffset = scrollOffset.constrainedBetween(IntPoint(), IntPoint(frameView.contentsSize()));
2592
                scrollOffset = scrollOffset.constrainedBetween(IntPoint(), IntPoint(frameView.contentsSize()));
2575
                frameView.setScrollPosition(scrollOffset);
2593
                // FIXME: Should we use contentDocument()->scrollingElement()?
2594
                // See https://github.com/w3c/csswg-drafts/issues/2977
2595
                if (ownerElement->contentDocument() && ownerElement->contentDocument()->documentElement() && useSmoothScrolling(options.behavior, *ownerElement->contentDocument()->documentElement()))
2596
                    frameView.scrollToOffsetWithAnimation(scrollOffset);
2597
                else
2598
                    frameView.setScrollPosition(scrollOffset);
2576
2599
2577
                if (options.shouldAllowCrossOriginScrolling == ShouldAllowCrossOriginScrolling::Yes || frameView.safeToPropagateScrollToParent()) {
2600
                if (options.shouldAllowCrossOriginScrolling == ShouldAllowCrossOriginScrolling::Yes || frameView.safeToPropagateScrollToParent()) {
2578
                    parentLayer = ownerElement->renderer()->enclosingLayer();
2601
                    parentLayer = ownerElement->renderer()->enclosingLayer();
Lines 2597-2603 void RenderLayer::scrollRectToVisible(const LayoutRect& absoluteRect, bool insid a/Source/WebCore/rendering/RenderLayer.cpp_sec6
2597
2620
2598
            LayoutRect revealRect = getRectToExpose(viewRect, targetRect, insideFixed, options.alignX, options.alignY);
2621
            LayoutRect revealRect = getRectToExpose(viewRect, targetRect, insideFixed, options.alignX, options.alignY);
2599
            
2622
            
2600
            frameView.setScrollPosition(roundedIntPoint(revealRect.location()));
2623
            IntPoint scrollOffset(roundedIntPoint(revealRect.location()));
2624
            // FIXME: Should we use document()->scrollingElement()?
2625
            // See https://github.com/w3c/csswg-drafts/issues/2977
2626
            if (renderer().document().documentElement() && useSmoothScrolling(options.behavior, *renderer().document().documentElement()))
2627
                frameView.scrollToOffsetWithAnimation(scrollOffset);
2628
            else
2629
                frameView.setScrollPosition(scrollOffset);
2601
2630
2602
            // This is the outermost view of a web page, so after scrolling this view we
2631
            // This is the outermost view of a web page, so after scrolling this view we
2603
            // scroll its container by calling Page::scrollRectIntoView.
2632
            // scroll its container by calling Page::scrollRectIntoView.
- a/Source/WebCore/rendering/RenderLayer.h +3 lines
Lines 50-55 a/Source/WebCore/rendering/RenderLayer.h_sec1
50
#include "PaintInfo.h"
50
#include "PaintInfo.h"
51
#include "RenderBox.h"
51
#include "RenderBox.h"
52
#include "RenderPtr.h"
52
#include "RenderPtr.h"
53
#include "ScrollBehavior.h"
53
#include "ScrollableArea.h"
54
#include "ScrollableArea.h"
54
#include <memory>
55
#include <memory>
55
#include <wtf/WeakPtr.h>
56
#include <wtf/WeakPtr.h>
Lines 122-127 struct ScrollRectToVisibleOptions { a/Source/WebCore/rendering/RenderLayer.h_sec2
122
    const ScrollAlignment& alignX { ScrollAlignment::alignCenterIfNeeded };
123
    const ScrollAlignment& alignX { ScrollAlignment::alignCenterIfNeeded };
123
    const ScrollAlignment& alignY { ScrollAlignment::alignCenterIfNeeded };
124
    const ScrollAlignment& alignY { ScrollAlignment::alignCenterIfNeeded };
124
    ShouldAllowCrossOriginScrolling shouldAllowCrossOriginScrolling { ShouldAllowCrossOriginScrolling::No };
125
    ShouldAllowCrossOriginScrolling shouldAllowCrossOriginScrolling { ShouldAllowCrossOriginScrolling::No };
126
    ScrollBehavior behavior { ScrollBehavior::Auto };
125
};
127
};
126
128
127
class RenderLayer final : public ScrollableArea {
129
class RenderLayer final : public ScrollableArea {
Lines 420-425 public: a/Source/WebCore/rendering/RenderLayer.h_sec3
420
    void scrollByRecursively(const IntSize& delta, ScrollableArea** scrolledArea = nullptr);
422
    void scrollByRecursively(const IntSize& delta, ScrollableArea** scrolledArea = nullptr);
421
423
422
    WEBCORE_EXPORT void scrollToOffset(const ScrollOffset&, ScrollType = ScrollType::Programmatic, ScrollClamping = ScrollClamping::Clamped);
424
    WEBCORE_EXPORT void scrollToOffset(const ScrollOffset&, ScrollType = ScrollType::Programmatic, ScrollClamping = ScrollClamping::Clamped);
425
    WEBCORE_EXPORT void scrollToOffsetWithAnimation(const ScrollOffset&, ScrollClamping = ScrollClamping::Clamped);
423
426
424
    void scrollToXPosition(int x, ScrollType, ScrollClamping = ScrollClamping::Clamped);
427
    void scrollToXPosition(int x, ScrollType, ScrollClamping = ScrollClamping::Clamped);
425
    void scrollToYPosition(int y, ScrollType, ScrollClamping = ScrollClamping::Clamped);
428
    void scrollToYPosition(int y, ScrollType, ScrollClamping = ScrollClamping::Clamped);
- a/Source/WebCore/rendering/style/RenderStyle.h +6 lines
Lines 742-747 public: a/Source/WebCore/rendering/style/RenderStyle.h_sec1
742
    bool useTouchOverflowScrolling() const { return m_rareInheritedData->useTouchOverflowScrolling; }
742
    bool useTouchOverflowScrolling() const { return m_rareInheritedData->useTouchOverflowScrolling; }
743
#endif
743
#endif
744
744
745
    bool useSmoothScrolling() const { return m_rareNonInheritedData->useSmoothScrolling; }
746
745
#if ENABLE(TEXT_AUTOSIZING)
747
#if ENABLE(TEXT_AUTOSIZING)
746
    TextSizeAdjustment textSizeAdjust() const { return m_rareInheritedData->textSizeAdjust; }
748
    TextSizeAdjustment textSizeAdjust() const { return m_rareInheritedData->textSizeAdjust; }
747
#endif
749
#endif
Lines 1256-1261 public: a/Source/WebCore/rendering/style/RenderStyle.h_sec2
1256
    void setUseTouchOverflowScrolling(bool v) { SET_VAR(m_rareInheritedData, useTouchOverflowScrolling, v); }
1258
    void setUseTouchOverflowScrolling(bool v) { SET_VAR(m_rareInheritedData, useTouchOverflowScrolling, v); }
1257
#endif
1259
#endif
1258
1260
1261
    void setUseSmoothScrolling(bool v) { SET_VAR(m_rareNonInheritedData, useSmoothScrolling, v); }
1262
1259
#if ENABLE(TEXT_AUTOSIZING)
1263
#if ENABLE(TEXT_AUTOSIZING)
1260
    void setTextSizeAdjust(TextSizeAdjustment adjustment) { SET_VAR(m_rareInheritedData, textSizeAdjust, adjustment); }
1264
    void setTextSizeAdjust(TextSizeAdjustment adjustment) { SET_VAR(m_rareInheritedData, textSizeAdjust, adjustment); }
1261
#endif
1265
#endif
Lines 1692-1697 public: a/Source/WebCore/rendering/style/RenderStyle.h_sec3
1692
    static bool initialUseTouchOverflowScrolling() { return false; }
1696
    static bool initialUseTouchOverflowScrolling() { return false; }
1693
#endif
1697
#endif
1694
1698
1699
    static bool initialUseSmoothScrolling() { return false; }
1700
1695
#if ENABLE(DASHBOARD_SUPPORT)
1701
#if ENABLE(DASHBOARD_SUPPORT)
1696
    static const Vector<StyleDashboardRegion>& initialDashboardRegions();
1702
    static const Vector<StyleDashboardRegion>& initialDashboardRegions();
1697
    static const Vector<StyleDashboardRegion>& noneDashboardRegions();
1703
    static const Vector<StyleDashboardRegion>& noneDashboardRegions();
- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp +3 lines
Lines 80-85 StyleRareNonInheritedData::StyleRareNonInheritedData() a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp_sec1
80
#if ENABLE(POINTER_EVENTS)
80
#if ENABLE(POINTER_EVENTS)
81
    , touchActions(static_cast<unsigned>(RenderStyle::initialTouchActions()))
81
    , touchActions(static_cast<unsigned>(RenderStyle::initialTouchActions()))
82
#endif
82
#endif
83
    , useSmoothScrolling(static_cast<unsigned>(RenderStyle::initialUseSmoothScrolling()))
83
    , pageSizeType(PAGE_SIZE_AUTO)
84
    , pageSizeType(PAGE_SIZE_AUTO)
84
    , transformStyle3D(static_cast<unsigned>(RenderStyle::initialTransformStyle3D()))
85
    , transformStyle3D(static_cast<unsigned>(RenderStyle::initialTransformStyle3D()))
85
    , backfaceVisibility(static_cast<unsigned>(RenderStyle::initialBackfaceVisibility()))
86
    , backfaceVisibility(static_cast<unsigned>(RenderStyle::initialBackfaceVisibility()))
Lines 174-179 inline StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonIn a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp_sec2
174
#if ENABLE(POINTER_EVENTS)
175
#if ENABLE(POINTER_EVENTS)
175
    , touchActions(o.touchActions)
176
    , touchActions(o.touchActions)
176
#endif
177
#endif
178
    , useSmoothScrolling(o.useSmoothScrolling)
177
    , pageSizeType(o.pageSizeType)
179
    , pageSizeType(o.pageSizeType)
178
    , transformStyle3D(o.transformStyle3D)
180
    , transformStyle3D(o.transformStyle3D)
179
    , backfaceVisibility(o.backfaceVisibility)
181
    , backfaceVisibility(o.backfaceVisibility)
Lines 289-294 bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp_sec3
289
#if ENABLE(POINTER_EVENTS)
291
#if ENABLE(POINTER_EVENTS)
290
        && touchActions == o.touchActions
292
        && touchActions == o.touchActions
291
#endif
293
#endif
294
        && useSmoothScrolling == o.useSmoothScrolling
292
#if ENABLE(CSS_COMPOSITING)
295
#if ENABLE(CSS_COMPOSITING)
293
        && effectiveBlendMode == o.effectiveBlendMode
296
        && effectiveBlendMode == o.effectiveBlendMode
294
        && isolation == o.isolation
297
        && isolation == o.isolation
- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h +2 lines
Lines 180-185 public: a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h_sec1
180
    unsigned touchActions : 6; // TouchAction
180
    unsigned touchActions : 6; // TouchAction
181
#endif
181
#endif
182
182
183
    unsigned useSmoothScrolling : 1; // ScrollBehavior
184
183
    unsigned pageSizeType : 2; // PageSizeType
185
    unsigned pageSizeType : 2; // PageSizeType
184
    unsigned transformStyle3D : 1; // TransformStyle3D
186
    unsigned transformStyle3D : 1; // TransformStyle3D
185
    unsigned backfaceVisibility : 1; // BackfaceVisibility
187
    unsigned backfaceVisibility : 1; // BackfaceVisibility
- a/Source/WebCore/testing/Internals.cpp -1 / +1 lines
Lines 1686-1692 ExceptionOr<void> Internals::unconstrainedScrollTo(Element& element, double x, d a/Source/WebCore/testing/Internals.cpp_sec1
1686
    if (!document || !document->view())
1686
    if (!document || !document->view())
1687
        return Exception { InvalidAccessError };
1687
        return Exception { InvalidAccessError };
1688
1688
1689
    element.scrollTo({ x, y }, ScrollClamping::Unclamped);
1689
    element.scrollTo(fromCoordinates(x, y), ScrollClamping::Unclamped);
1690
    return { };
1690
    return { };
1691
}
1691
}
1692
1692
- a/Source/WebKit/Shared/WebPreferences.yaml -1 / +7 lines
Lines 1216-1222 ShouldDecidePolicyBeforeLoadingQuickLookPreview: a/Source/WebKit/Shared/WebPreferences.yaml_sec1
1216
#   DEFAULT_EXPERIMENTAL_FEATURES_ENABLED (for features that are ready for
1216
#   DEFAULT_EXPERIMENTAL_FEATURES_ENABLED (for features that are ready for
1217
#   wider testing).
1217
#   wider testing).
1218
1218
1219
1220
SpringTimingFunctionEnabled:
1219
SpringTimingFunctionEnabled:
1221
  type: bool
1220
  type: bool
1222
  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
1221
  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
Lines 1270-1275 BlockingOfSmallPluginsEnabled: a/Source/WebKit/Shared/WebPreferences.yaml_sec2
1270
  humanReadableDescription: "Stop plugins smaller than a certain threshold from loading."
1269
  humanReadableDescription: "Stop plugins smaller than a certain threshold from loading."
1271
  category: internal
1270
  category: internal
1272
1271
1272
CSSOMViewSmoothScrollingEnabled:
1273
  type: bool
1274
  defaultValue: false
1275
  humanReadableName: "CSSOM View Smooth Scrolling"
1276
  humanReadableDescription: "Enable DOM API and CSS property for 'smooth' scroll behavior"
1277
  category: experimental
1278
1273
WebAnimationsEnabled:
1279
WebAnimationsEnabled:
1274
  type: bool
1280
  type: bool
1275
  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
1281
  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
- a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h +1 lines
Lines 184-189 a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h_sec1
184
#define WebKitDirectoryUploadEnabledPreferenceKey @"WebKitDirectoryUploadEnabled"
184
#define WebKitDirectoryUploadEnabledPreferenceKey @"WebKitDirectoryUploadEnabled"
185
#define WebKitVisualViewportAPIEnabledPreferenceKey @"WebKitVisualViewportAPIEnabled"
185
#define WebKitVisualViewportAPIEnabledPreferenceKey @"WebKitVisualViewportAPIEnabled"
186
#define WebKitCSSOMViewScrollingAPIEnabledPreferenceKey @"WebKitCSSOMViewScrollingAPIEnabled"
186
#define WebKitCSSOMViewScrollingAPIEnabledPreferenceKey @"WebKitCSSOMViewScrollingAPIEnabled"
187
#define WebKitCSSOMViewSmoothScrollingEnabledPreferenceKey @"WebKitCSSOMViewSmoothScrollingEnabled"
187
#define WebKitModernMediaControlsEnabledPreferenceKey @"WebKitModernMediaControlsEnabled"
188
#define WebKitModernMediaControlsEnabledPreferenceKey @"WebKitModernMediaControlsEnabled"
188
#define WebKitSubtleCryptoEnabledPreferenceKey @"WebKitSubtleCryptoEnabled"
189
#define WebKitSubtleCryptoEnabledPreferenceKey @"WebKitSubtleCryptoEnabled"
189
#define WebKitMediaDevicesEnabledPreferenceKey @"WebKitMediaDevicesEnabled"
190
#define WebKitMediaDevicesEnabledPreferenceKey @"WebKitMediaDevicesEnabled"
- a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm +11 lines
Lines 652-657 public: a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm_sec1
652
#endif
652
#endif
653
653
654
        [NSNumber numberWithBool:NO], WebKitCSSOMViewScrollingAPIEnabledPreferenceKey,
654
        [NSNumber numberWithBool:NO], WebKitCSSOMViewScrollingAPIEnabledPreferenceKey,
655
        [NSNumber numberWithBool:NO], WebKitCSSOMViewSmoothScrollingEnabledPreferenceKey,
655
        [NSNumber numberWithBool:YES], WebKitNeedsStorageAccessFromFileURLsQuirkKey,
656
        [NSNumber numberWithBool:YES], WebKitNeedsStorageAccessFromFileURLsQuirkKey,
656
        [NSNumber numberWithBool:NO], WebKitAllowCrossOriginSubresourcesToAskForCredentialsKey,
657
        [NSNumber numberWithBool:NO], WebKitAllowCrossOriginSubresourcesToAskForCredentialsKey,
657
#if ENABLE(MEDIA_STREAM)
658
#if ENABLE(MEDIA_STREAM)
Lines 3135-3140 static NSString *classIBCreatorID = nil; a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm_sec2
3135
    [self _setBoolValue:flag forKey:WebKitCSSOMViewScrollingAPIEnabledPreferenceKey];
3136
    [self _setBoolValue:flag forKey:WebKitCSSOMViewScrollingAPIEnabledPreferenceKey];
3136
}
3137
}
3137
3138
3139
- (BOOL)CSSOMViewSmoothScrollingEnabled
3140
{
3141
    return [self _boolValueForKey:WebKitCSSOMViewSmoothScrollingEnabledPreferenceKey];
3142
}
3143
3144
- (void)setCSSOMViewSmoothScrollingEnabled:(BOOL)flag
3145
{
3146
    [self _setBoolValue:flag forKey:WebKitCSSOMViewSmoothScrollingEnabledPreferenceKey];
3147
}
3148
3138
- (BOOL)webAnimationsEnabled
3149
- (BOOL)webAnimationsEnabled
3139
{
3150
{
3140
    return [self _boolValueForKey:WebKitWebAnimationsEnabledPreferenceKey];
3151
    return [self _boolValueForKey:WebKitWebAnimationsEnabledPreferenceKey];
- a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h +1 lines
Lines 605-610 extern NSString *WebPreferencesCacheModelChangedInternalNotification WEBKIT_DEPR a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h_sec1
605
605
606
@property (nonatomic) BOOL visualViewportAPIEnabled;
606
@property (nonatomic) BOOL visualViewportAPIEnabled;
607
@property (nonatomic) BOOL CSSOMViewScrollingAPIEnabled;
607
@property (nonatomic) BOOL CSSOMViewScrollingAPIEnabled;
608
@property (nonatomic) BOOL CSSOMViewSmoothScrollingEnabled;
608
@property (nonatomic) BOOL largeImageAsyncDecodingEnabled;
609
@property (nonatomic) BOOL largeImageAsyncDecodingEnabled;
609
@property (nonatomic) BOOL animatedImageAsyncDecodingEnabled;
610
@property (nonatomic) BOOL animatedImageAsyncDecodingEnabled;
610
@property (nonatomic) BOOL javaScriptMarkupEnabled;
611
@property (nonatomic) BOOL javaScriptMarkupEnabled;
- a/Source/WebKitLegacy/mac/WebView/WebView.mm +1 lines
Lines 2972-2977 static bool needsSelfRetainWhileLoadingQuirk() a/Source/WebKitLegacy/mac/WebView/WebView.mm_sec1
2972
2972
2973
    settings.setVisualViewportAPIEnabled([preferences visualViewportAPIEnabled]);
2973
    settings.setVisualViewportAPIEnabled([preferences visualViewportAPIEnabled]);
2974
    settings.setCSSOMViewScrollingAPIEnabled([preferences CSSOMViewScrollingAPIEnabled]);
2974
    settings.setCSSOMViewScrollingAPIEnabled([preferences CSSOMViewScrollingAPIEnabled]);
2975
    settings.setCSSOMViewSmoothScrollingEnabled([preferences CSSOMViewSmoothScrollingEnabled]);
2975
    settings.setMediaContentTypesRequiringHardwareSupport([preferences mediaContentTypesRequiringHardwareSupport]);
2976
    settings.setMediaContentTypesRequiringHardwareSupport([preferences mediaContentTypesRequiringHardwareSupport]);
2976
2977
2977
    switch ([preferences storageBlockingPolicy]) {
2978
    switch ([preferences storageBlockingPolicy]) {
- a/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl +2 lines
Lines 223-228 interface IWebPreferencesPrivate6 : IWebPreferencesPrivate5 a/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl_sec1
223
    HRESULT setVisualViewportAPIEnabled([in] BOOL enabled);
223
    HRESULT setVisualViewportAPIEnabled([in] BOOL enabled);
224
    HRESULT CSSOMViewScrollingAPIEnabled([out, retval] BOOL*);
224
    HRESULT CSSOMViewScrollingAPIEnabled([out, retval] BOOL*);
225
    HRESULT setCSSOMViewScrollingAPIEnabled([in] BOOL enabled);
225
    HRESULT setCSSOMViewScrollingAPIEnabled([in] BOOL enabled);
226
    HRESULT CSSOMViewSmoothScrollingEnabled([out, retval] BOOL*);
227
    HRESULT setCSSOMViewSmoothScrollingEnabled([in] BOOL enabled);
226
    HRESULT fetchAPIKeepAliveEnabled([out, retval] BOOL* enabled);
228
    HRESULT fetchAPIKeepAliveEnabled([out, retval] BOOL* enabled);
227
    HRESULT setFetchAPIKeepAliveEnabled([in] BOOL enabled);
229
    HRESULT setFetchAPIKeepAliveEnabled([in] BOOL enabled);
228
    HRESULT spatialNavigationEnabled([out, retval] BOOL *enabled);
230
    HRESULT spatialNavigationEnabled([out, retval] BOOL *enabled);
- a/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h +1 lines
Lines 205-209 a/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h_sec1
205
#define WebKitServerTimingEnabledPreferenceKey "WebKitServerTimingEnabled"
205
#define WebKitServerTimingEnabledPreferenceKey "WebKitServerTimingEnabled"
206
206
207
#define WebKitCSSOMViewScrollingAPIEnabledPreferenceKey "WebKitCSSOMViewScrollingAPIEnabled"
207
#define WebKitCSSOMViewScrollingAPIEnabledPreferenceKey "WebKitCSSOMViewScrollingAPIEnabled"
208
#define WebKitCSSOMViewSmoothScrollingEnabledPreferenceKey "WebKitCSSOMViewSmoothScrollingEnabled"
208
209
209
#define WebKitResizeObserverEnabledPreferenceKey "WebKitResizeObserverEnabled"
210
#define WebKitResizeObserverEnabledPreferenceKey "WebKitResizeObserverEnabled"
- a/Source/WebKitLegacy/win/WebPreferences.cpp +16 lines
Lines 331-336 void WebPreferences::initializeDefaultSettings() a/Source/WebKitLegacy/win/WebPreferences.cpp_sec1
331
331
332
    CFDictionaryAddValue(defaults, CFSTR(WebKitResizeObserverEnabledPreferenceKey), kCFBooleanFalse);
332
    CFDictionaryAddValue(defaults, CFSTR(WebKitResizeObserverEnabledPreferenceKey), kCFBooleanFalse);
333
333
334
    CFDictionaryAddValue(defaults, CFSTR(WebKitCSSOMViewSmoothScrollingEnabledPreferenceKey), kCFBooleanFalse);
335
334
    defaultSettings = defaults;
336
    defaultSettings = defaults;
335
}
337
}
336
338
Lines 2201-2206 HRESULT WebPreferences::setCSSOMViewScrollingAPIEnabled(BOOL enabled) a/Source/WebKitLegacy/win/WebPreferences.cpp_sec2
2201
    return S_OK;
2203
    return S_OK;
2202
}
2204
}
2203
2205
2206
HRESULT WebPreferences::CSSOMViewSmoothScrollingEnabled(_Out_ BOOL* enabled)
2207
{
2208
    if (!enabled)
2209
        return E_POINTER;
2210
    *enabled = boolValueForKey(WebKitCSSOMViewSmoothScrollingEnabledPreferenceKey);
2211
    return S_OK;
2212
}
2213
2214
HRESULT WebPreferences::setCSSOMViewSmoothScrollingEnabled(BOOL enabled)
2215
{
2216
    setBoolValue(WebKitCSSOMViewSmoothScrollingEnabledPreferenceKey, enabled);
2217
    return S_OK;
2218
}
2219
2204
HRESULT WebPreferences::setApplicationId(BSTR applicationId)
2220
HRESULT WebPreferences::setApplicationId(BSTR applicationId)
2205
{
2221
{
2206
    m_applicationId = String(applicationId).createCFString();
2222
    m_applicationId = String(applicationId).createCFString();
- a/Source/WebKitLegacy/win/WebPreferences.h +2 lines
Lines 271-276 public: a/Source/WebKitLegacy/win/WebPreferences.h_sec1
271
    virtual HRESULT STDMETHODCALLTYPE setVisualViewportAPIEnabled(BOOL);
271
    virtual HRESULT STDMETHODCALLTYPE setVisualViewportAPIEnabled(BOOL);
272
    virtual HRESULT STDMETHODCALLTYPE CSSOMViewScrollingAPIEnabled(_Out_ BOOL*);
272
    virtual HRESULT STDMETHODCALLTYPE CSSOMViewScrollingAPIEnabled(_Out_ BOOL*);
273
    virtual HRESULT STDMETHODCALLTYPE setCSSOMViewScrollingAPIEnabled(BOOL);
273
    virtual HRESULT STDMETHODCALLTYPE setCSSOMViewScrollingAPIEnabled(BOOL);
274
    virtual HRESULT STDMETHODCALLTYPE CSSOMViewSmoothScrollingEnabled(_Out_ BOOL*);
275
    virtual HRESULT STDMETHODCALLTYPE setCSSOMViewSmoothScrollingEnabled(BOOL);
274
    virtual HRESULT STDMETHODCALLTYPE fetchAPIKeepAliveEnabled(_Out_ BOOL*);
276
    virtual HRESULT STDMETHODCALLTYPE fetchAPIKeepAliveEnabled(_Out_ BOOL*);
275
    virtual HRESULT STDMETHODCALLTYPE setFetchAPIKeepAliveEnabled(BOOL);
277
    virtual HRESULT STDMETHODCALLTYPE setFetchAPIKeepAliveEnabled(BOOL);
276
    virtual HRESULT STDMETHODCALLTYPE spatialNavigationEnabled(_Out_ BOOL*);
278
    virtual HRESULT STDMETHODCALLTYPE spatialNavigationEnabled(_Out_ BOOL*);
- a/Source/WebKitLegacy/win/WebView.cpp +5 lines
Lines 5297-5302 HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) a/Source/WebKitLegacy/win/WebView.cpp_sec1
5297
        return hr;
5297
        return hr;
5298
    settings.setCSSOMViewScrollingAPIEnabled(!!enabled);
5298
    settings.setCSSOMViewScrollingAPIEnabled(!!enabled);
5299
5299
5300
    hr = prefsPrivate->CSSOMViewSmoothScrollingEnabled(&enabled);
5301
    if (FAILED(hr))
5302
        return hr;
5303
    settings.setCSSOMViewSmoothScrollingEnabled(!!enabled);
5304
5300
    hr = preferences->privateBrowsingEnabled(&enabled);
5305
    hr = preferences->privateBrowsingEnabled(&enabled);
5301
    if (FAILED(hr))
5306
    if (FAILED(hr))
5302
        return hr;
5307
        return hr;
- a/Tools/ChangeLog +11 lines
Lines 1-3 a/Tools/ChangeLog_sec1
1
2018-11-06  Frederic Wang  <fwang@igalia.com>
2
3
        Add support for ScrollOptions' ScrollBehavior and CSS scroll-behavior properties
4
        https://bugs.webkit.org/show_bug.cgi?id=188043
5
6
        * DumpRenderTree/TestOptions.cpp:
7
        (TestOptions::TestOptions): Parse CSSOMViewSmoothScrollingEnabled.
8
        * DumpRenderTree/TestOptions.h: Add CSSOMViewSmoothScrollingEnabled, disabled by default.
9
        * DumpRenderTree/mac/DumpRenderTree.mm:
10
        (setWebPreferencesForTestOptions): Set CSSOMViewSmoothScrollingEnabled from the test options.
11
1
2019-04-26  Stephanie Lewis  <slewis@apple.com>
12
2019-04-26  Stephanie Lewis  <slewis@apple.com>
2
13
3
        run-benchmarks should have an intial prep and restore env call for tasks that are too expensive to do for every iteration
14
        run-benchmarks should have an intial prep and restore env call for tasks that are too expensive to do for every iteration
- a/Tools/DumpRenderTree/TestOptions.cpp +2 lines
Lines 113-118 TestOptions::TestOptions(const std::string& pathOrURL, const std::string& absolu a/Tools/DumpRenderTree/TestOptions.cpp_sec1
113
            adClickAttributionEnabled = parseBooleanTestHeaderValue(value);
113
            adClickAttributionEnabled = parseBooleanTestHeaderValue(value);
114
        else if (key == "experimental:ResizeObserverEnabled")
114
        else if (key == "experimental:ResizeObserverEnabled")
115
            enableResizeObserver = parseBooleanTestHeaderValue(value);
115
            enableResizeObserver = parseBooleanTestHeaderValue(value);
116
        else if (key == "experimental:CSSOMViewSmoothScrollingEnabled")
117
            enableCSSOMViewSmoothScrolling = parseBooleanTestHeaderValue(value);
116
        pairStart = pairEnd + 1;
118
        pairStart = pairEnd + 1;
117
    }
119
    }
118
}
120
}
- a/Tools/DumpRenderTree/TestOptions.h +1 lines
Lines 47-52 struct TestOptions { a/Tools/DumpRenderTree/TestOptions.h_sec1
47
    bool enableCSSLogical { false };
47
    bool enableCSSLogical { false };
48
    bool adClickAttributionEnabled { false };
48
    bool adClickAttributionEnabled { false };
49
    bool enableResizeObserver { false };
49
    bool enableResizeObserver { false };
50
    bool enableCSSOMViewSmoothScrolling { false };
50
    std::string jscOptions;
51
    std::string jscOptions;
51
52
52
    TestOptions(const std::string& pathOrURL, const std::string& absolutePath);
53
    TestOptions(const std::string& pathOrURL, const std::string& absolutePath);
- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm +1 lines
Lines 1019-1024 static void setWebPreferencesForTestOptions(const TestOptions& options) a/Tools/DumpRenderTree/mac/DumpRenderTree.mm_sec1
1019
    preferences.CSSLogicalEnabled = options.enableCSSLogical;
1019
    preferences.CSSLogicalEnabled = options.enableCSSLogical;
1020
    preferences.adClickAttributionEnabled = options.adClickAttributionEnabled;
1020
    preferences.adClickAttributionEnabled = options.adClickAttributionEnabled;
1021
    preferences.resizeObserverEnabled = options.enableResizeObserver;
1021
    preferences.resizeObserverEnabled = options.enableResizeObserver;
1022
    preferences.CSSOMViewSmoothScrollingEnabled = options.enableCSSOMViewSmoothScrolling;
1022
}
1023
}
1023
1024
1024
// Called once on DumpRenderTree startup.
1025
// Called once on DumpRenderTree startup.
- a/LayoutTests/ChangeLog +10 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2018-11-07  Frederic Wang  <fwang@igalia.com>
2
3
        Add support for ScrollOptions' ScrollBehavior and CSS scroll-behavior properties
4
        https://bugs.webkit.org/show_bug.cgi?id=188043
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * platform/mac-wk1/TestExpectations: Skip these tests on WK1 as they don't work for now and
9
        are slow anyway.
10
1
2019-04-29  Javier Fernandez  <jfernandez@igalia.com>
11
2019-04-29  Javier Fernandez  <jfernandez@igalia.com>
2
12
3
        Update the CSS Text WPT test suite
13
        Update the CSS Text WPT test suite
- a/LayoutTests/imported/w3c/ChangeLog +25 lines
Lines 1-3 a/LayoutTests/imported/w3c/ChangeLog_sec1
1
2018-11-06  Frederic Wang  <fwang@igalia.com>
2
3
        Add support for ScrollOptions' ScrollBehavior and CSS scroll-behavior properties
4
        https://bugs.webkit.org/show_bug.cgi?id=188043
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Enable CSSOMViewSmoothScrollingEnabled on scroll behavior tests and update expectations.
9
10
        * web-platform-tests/css/cssom-view/scroll-behavior-default-css-expected.txt:
11
        * web-platform-tests/css/cssom-view/scroll-behavior-default-css.html:
12
        * web-platform-tests/css/cssom-view/scroll-behavior-element-expected.txt:
13
        * web-platform-tests/css/cssom-view/scroll-behavior-element.html:
14
        * web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root-expected.txt:
15
        * web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html:
16
        * web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window-expected.txt:
17
        * web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html:
18
        * web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested-expected.txt:
19
        * web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html:
20
        * web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html:
21
        * web-platform-tests/css/cssom-view/scroll-behavior-subframe-root-expected.txt:
22
        * web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html:
23
        * web-platform-tests/css/cssom-view/scroll-behavior-subframe-window-expected.txt:
24
        * web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html:
25
1
2019-04-29  Javier Fernandez  <jfernandez@igalia.com>
26
2019-04-29  Javier Fernandez  <jfernandez@igalia.com>
2
27
3
        Update the CSS Text WPT test suite
28
        Update the CSS Text WPT test suite
- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css-expected.txt -1 / +1 lines
Lines 1-4 a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css-expected.txt_sec1
1
1
2
PASS Instant scrolling of an element with default scroll-behavior 
2
PASS Instant scrolling of an element with default scroll-behavior 
3
FAIL Smooth scrolling of an element with default scroll-behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
3
PASS Smooth scrolling of an element with default scroll-behavior 
4
4
- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css.html -1 / +1 lines
Lines 1-4 a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css.html_sec1
1
<!DOCTYPE html>
1
<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
2
<title>Testing default value of scroll-behavior</title>
2
<title>Testing default value of scroll-behavior</title>
3
<meta name="timeout" content="long"/>
3
<meta name="timeout" content="long"/>
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element-expected.txt -16 / +16 lines
Lines 2-36 a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element-expected.txt_sec1
2
PASS Element with auto scroll-behavior ; scroll() with default behavior 
2
PASS Element with auto scroll-behavior ; scroll() with default behavior 
3
PASS Element with auto scroll-behavior ; scroll() with auto behavior 
3
PASS Element with auto scroll-behavior ; scroll() with auto behavior 
4
PASS Element with auto scroll-behavior ; scroll() with instant behavior 
4
PASS Element with auto scroll-behavior ; scroll() with instant behavior 
5
FAIL Element with auto scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
5
PASS Element with auto scroll-behavior ; scroll() with smooth behavior 
6
FAIL Element with smooth scroll-behavior ; scroll() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
6
PASS Element with smooth scroll-behavior ; scroll() with default behavior 
7
FAIL Element with smooth scroll-behavior ; scroll() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
7
PASS Element with smooth scroll-behavior ; scroll() with auto behavior 
8
PASS Element with smooth scroll-behavior ; scroll() with instant behavior 
8
PASS Element with smooth scroll-behavior ; scroll() with instant behavior 
9
FAIL Element with smooth scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
9
PASS Element with smooth scroll-behavior ; scroll() with smooth behavior 
10
PASS Element with auto scroll-behavior ; scrollTo() with default behavior 
10
PASS Element with auto scroll-behavior ; scrollTo() with default behavior 
11
PASS Element with auto scroll-behavior ; scrollTo() with auto behavior 
11
PASS Element with auto scroll-behavior ; scrollTo() with auto behavior 
12
PASS Element with auto scroll-behavior ; scrollTo() with instant behavior 
12
PASS Element with auto scroll-behavior ; scrollTo() with instant behavior 
13
FAIL Element with auto scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
13
PASS Element with auto scroll-behavior ; scrollTo() with smooth behavior 
14
FAIL Element with smooth scroll-behavior ; scrollTo() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
14
PASS Element with smooth scroll-behavior ; scrollTo() with default behavior 
15
FAIL Element with smooth scroll-behavior ; scrollTo() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
15
PASS Element with smooth scroll-behavior ; scrollTo() with auto behavior 
16
PASS Element with smooth scroll-behavior ; scrollTo() with instant behavior 
16
PASS Element with smooth scroll-behavior ; scrollTo() with instant behavior 
17
FAIL Element with smooth scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
17
PASS Element with smooth scroll-behavior ; scrollTo() with smooth behavior 
18
PASS Element with auto scroll-behavior ; scrollBy() with default behavior 
18
PASS Element with auto scroll-behavior ; scrollBy() with default behavior 
19
PASS Element with auto scroll-behavior ; scrollBy() with auto behavior 
19
PASS Element with auto scroll-behavior ; scrollBy() with auto behavior 
20
PASS Element with auto scroll-behavior ; scrollBy() with instant behavior 
20
PASS Element with auto scroll-behavior ; scrollBy() with instant behavior 
21
FAIL Element with auto scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
21
PASS Element with auto scroll-behavior ; scrollBy() with smooth behavior 
22
FAIL Element with smooth scroll-behavior ; scrollBy() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
22
PASS Element with smooth scroll-behavior ; scrollBy() with default behavior 
23
FAIL Element with smooth scroll-behavior ; scrollBy() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
23
PASS Element with smooth scroll-behavior ; scrollBy() with auto behavior 
24
PASS Element with smooth scroll-behavior ; scrollBy() with instant behavior 
24
PASS Element with smooth scroll-behavior ; scrollBy() with instant behavior 
25
FAIL Element with smooth scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
25
PASS Element with smooth scroll-behavior ; scrollBy() with smooth behavior 
26
PASS Element with auto scroll-behavior ; scrollIntoView() with default behavior 
26
PASS Element with auto scroll-behavior ; scrollIntoView() with default behavior 
27
PASS Element with auto scroll-behavior ; scrollIntoView() with auto behavior 
27
PASS Element with auto scroll-behavior ; scrollIntoView() with auto behavior 
28
PASS Element with auto scroll-behavior ; scrollIntoView() with instant behavior 
28
PASS Element with auto scroll-behavior ; scrollIntoView() with instant behavior 
29
FAIL Element with auto scroll-behavior ; scrollIntoView() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
29
PASS Element with auto scroll-behavior ; scrollIntoView() with smooth behavior 
30
FAIL Element with smooth scroll-behavior ; scrollIntoView() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
30
PASS Element with smooth scroll-behavior ; scrollIntoView() with default behavior 
31
FAIL Element with smooth scroll-behavior ; scrollIntoView() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
31
PASS Element with smooth scroll-behavior ; scrollIntoView() with auto behavior 
32
PASS Element with smooth scroll-behavior ; scrollIntoView() with instant behavior 
32
PASS Element with smooth scroll-behavior ; scrollIntoView() with instant behavior 
33
FAIL Element with smooth scroll-behavior ; scrollIntoView() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
33
PASS Element with smooth scroll-behavior ; scrollIntoView() with smooth behavior 
34
PASS Aborting an ongoing smooth scrolling on an element with another smooth scrolling 
34
PASS Aborting an ongoing smooth scrolling on an element with another smooth scrolling 
35
PASS Aborting an ongoing smooth scrolling on an element with an instant scrolling 
35
PASS Aborting an ongoing smooth scrolling on an element with an instant scrolling 
36
36
- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element.html -1 / +1 lines
Lines 1-4 a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element.html_sec1
1
<!DOCTYPE html>
1
<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
2
<title>Testing scrollOptions' behavior for Element.scroll* and scroll-behavior on an element</title>
2
<title>Testing scrollOptions' behavior for Element.scroll* and scroll-behavior on an element</title>
3
<meta name="timeout" content="long"/>
3
<meta name="timeout" content="long"/>
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root-expected.txt -16 / +16 lines
Lines 3-37 PASS Page loaded a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root-expected.txt_sec1
3
PASS Main frame with auto scroll-behavior ; scroll() with default behavior 
3
PASS Main frame with auto scroll-behavior ; scroll() with default behavior 
4
PASS Main frame with auto scroll-behavior ; scroll() with auto behavior 
4
PASS Main frame with auto scroll-behavior ; scroll() with auto behavior 
5
PASS Main frame with auto scroll-behavior ; scroll() with instant behavior 
5
PASS Main frame with auto scroll-behavior ; scroll() with instant behavior 
6
FAIL Main frame with auto scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
6
PASS Main frame with auto scroll-behavior ; scroll() with smooth behavior 
7
FAIL Main frame with smooth scroll-behavior ; scroll() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
7
PASS Main frame with smooth scroll-behavior ; scroll() with default behavior 
8
FAIL Main frame with smooth scroll-behavior ; scroll() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
8
PASS Main frame with smooth scroll-behavior ; scroll() with auto behavior 
9
PASS Main frame with smooth scroll-behavior ; scroll() with instant behavior 
9
PASS Main frame with smooth scroll-behavior ; scroll() with instant behavior 
10
FAIL Main frame with smooth scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
10
PASS Main frame with smooth scroll-behavior ; scroll() with smooth behavior 
11
PASS Main frame with auto scroll-behavior ; scrollTo() with default behavior 
11
PASS Main frame with auto scroll-behavior ; scrollTo() with default behavior 
12
PASS Main frame with auto scroll-behavior ; scrollTo() with auto behavior 
12
PASS Main frame with auto scroll-behavior ; scrollTo() with auto behavior 
13
PASS Main frame with auto scroll-behavior ; scrollTo() with instant behavior 
13
PASS Main frame with auto scroll-behavior ; scrollTo() with instant behavior 
14
FAIL Main frame with auto scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
14
PASS Main frame with auto scroll-behavior ; scrollTo() with smooth behavior 
15
FAIL Main frame with smooth scroll-behavior ; scrollTo() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
15
PASS Main frame with smooth scroll-behavior ; scrollTo() with default behavior 
16
FAIL Main frame with smooth scroll-behavior ; scrollTo() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
16
PASS Main frame with smooth scroll-behavior ; scrollTo() with auto behavior 
17
PASS Main frame with smooth scroll-behavior ; scrollTo() with instant behavior 
17
PASS Main frame with smooth scroll-behavior ; scrollTo() with instant behavior 
18
FAIL Main frame with smooth scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
18
PASS Main frame with smooth scroll-behavior ; scrollTo() with smooth behavior 
19
PASS Main frame with auto scroll-behavior ; scrollBy() with default behavior 
19
PASS Main frame with auto scroll-behavior ; scrollBy() with default behavior 
20
PASS Main frame with auto scroll-behavior ; scrollBy() with auto behavior 
20
PASS Main frame with auto scroll-behavior ; scrollBy() with auto behavior 
21
PASS Main frame with auto scroll-behavior ; scrollBy() with instant behavior 
21
PASS Main frame with auto scroll-behavior ; scrollBy() with instant behavior 
22
FAIL Main frame with auto scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
22
PASS Main frame with auto scroll-behavior ; scrollBy() with smooth behavior 
23
FAIL Main frame with smooth scroll-behavior ; scrollBy() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
23
PASS Main frame with smooth scroll-behavior ; scrollBy() with default behavior 
24
FAIL Main frame with smooth scroll-behavior ; scrollBy() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
24
PASS Main frame with smooth scroll-behavior ; scrollBy() with auto behavior 
25
PASS Main frame with smooth scroll-behavior ; scrollBy() with instant behavior 
25
PASS Main frame with smooth scroll-behavior ; scrollBy() with instant behavior 
26
FAIL Main frame with smooth scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
26
PASS Main frame with smooth scroll-behavior ; scrollBy() with smooth behavior 
27
PASS Main frame with auto scroll-behavior ; scrollIntoView() with default behavior 
27
PASS Main frame with auto scroll-behavior ; scrollIntoView() with default behavior 
28
PASS Main frame with auto scroll-behavior ; scrollIntoView() with auto behavior 
28
PASS Main frame with auto scroll-behavior ; scrollIntoView() with auto behavior 
29
PASS Main frame with auto scroll-behavior ; scrollIntoView() with instant behavior 
29
PASS Main frame with auto scroll-behavior ; scrollIntoView() with instant behavior 
30
FAIL Main frame with auto scroll-behavior ; scrollIntoView() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
30
PASS Main frame with auto scroll-behavior ; scrollIntoView() with smooth behavior 
31
FAIL Main frame with smooth scroll-behavior ; scrollIntoView() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
31
PASS Main frame with smooth scroll-behavior ; scrollIntoView() with default behavior 
32
FAIL Main frame with smooth scroll-behavior ; scrollIntoView() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
32
PASS Main frame with smooth scroll-behavior ; scrollIntoView() with auto behavior 
33
PASS Main frame with smooth scroll-behavior ; scrollIntoView() with instant behavior 
33
PASS Main frame with smooth scroll-behavior ; scrollIntoView() with instant behavior 
34
FAIL Main frame with smooth scroll-behavior ; scrollIntoView() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
34
PASS Main frame with smooth scroll-behavior ; scrollIntoView() with smooth behavior 
35
PASS Aborting an ongoing smooth scrolling on the main frame with another smooth scrolling 
35
PASS Aborting an ongoing smooth scrolling on the main frame with another smooth scrolling 
36
PASS Aborting an ongoing smooth scrolling on the main frame with an instant scrolling 
36
PASS Aborting an ongoing smooth scrolling on the main frame with an instant scrolling 
37
37
- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html -1 / +1 lines
Lines 1-4 a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html_sec1
1
<!DOCTYPE html>
1
<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
2
<title>Testing scrollOptions' behavior for Element.scroll* and scroll-behavior on the root of the main frame</title>
2
<title>Testing scrollOptions' behavior for Element.scroll* and scroll-behavior on the root of the main frame</title>
3
<meta name="timeout" content="long"/>
3
<meta name="timeout" content="long"/>
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window-expected.txt -12 / +12 lines
Lines 3-29 PASS Page loaded a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window-expected.txt_sec1
3
PASS Main frame with auto scroll-behavior ; scroll() with default behavior 
3
PASS Main frame with auto scroll-behavior ; scroll() with default behavior 
4
PASS Main frame with auto scroll-behavior ; scroll() with auto behavior 
4
PASS Main frame with auto scroll-behavior ; scroll() with auto behavior 
5
PASS Main frame with auto scroll-behavior ; scroll() with instant behavior 
5
PASS Main frame with auto scroll-behavior ; scroll() with instant behavior 
6
FAIL Main frame with auto scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
6
PASS Main frame with auto scroll-behavior ; scroll() with smooth behavior 
7
FAIL Main frame with smooth scroll-behavior ; scroll() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
7
PASS Main frame with smooth scroll-behavior ; scroll() with default behavior 
8
FAIL Main frame with smooth scroll-behavior ; scroll() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
8
PASS Main frame with smooth scroll-behavior ; scroll() with auto behavior 
9
PASS Main frame with smooth scroll-behavior ; scroll() with instant behavior 
9
PASS Main frame with smooth scroll-behavior ; scroll() with instant behavior 
10
FAIL Main frame with smooth scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
10
PASS Main frame with smooth scroll-behavior ; scroll() with smooth behavior 
11
PASS Main frame with auto scroll-behavior ; scrollTo() with default behavior 
11
PASS Main frame with auto scroll-behavior ; scrollTo() with default behavior 
12
PASS Main frame with auto scroll-behavior ; scrollTo() with auto behavior 
12
PASS Main frame with auto scroll-behavior ; scrollTo() with auto behavior 
13
PASS Main frame with auto scroll-behavior ; scrollTo() with instant behavior 
13
PASS Main frame with auto scroll-behavior ; scrollTo() with instant behavior 
14
FAIL Main frame with auto scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
14
PASS Main frame with auto scroll-behavior ; scrollTo() with smooth behavior 
15
FAIL Main frame with smooth scroll-behavior ; scrollTo() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
15
PASS Main frame with smooth scroll-behavior ; scrollTo() with default behavior 
16
FAIL Main frame with smooth scroll-behavior ; scrollTo() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
16
PASS Main frame with smooth scroll-behavior ; scrollTo() with auto behavior 
17
PASS Main frame with smooth scroll-behavior ; scrollTo() with instant behavior 
17
PASS Main frame with smooth scroll-behavior ; scrollTo() with instant behavior 
18
FAIL Main frame with smooth scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
18
PASS Main frame with smooth scroll-behavior ; scrollTo() with smooth behavior 
19
PASS Main frame with auto scroll-behavior ; scrollBy() with default behavior 
19
PASS Main frame with auto scroll-behavior ; scrollBy() with default behavior 
20
PASS Main frame with auto scroll-behavior ; scrollBy() with auto behavior 
20
PASS Main frame with auto scroll-behavior ; scrollBy() with auto behavior 
21
PASS Main frame with auto scroll-behavior ; scrollBy() with instant behavior 
21
PASS Main frame with auto scroll-behavior ; scrollBy() with instant behavior 
22
FAIL Main frame with auto scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
22
PASS Main frame with auto scroll-behavior ; scrollBy() with smooth behavior 
23
FAIL Main frame with smooth scroll-behavior ; scrollBy() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
23
PASS Main frame with smooth scroll-behavior ; scrollBy() with default behavior 
24
FAIL Main frame with smooth scroll-behavior ; scrollBy() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
24
PASS Main frame with smooth scroll-behavior ; scrollBy() with auto behavior 
25
PASS Main frame with smooth scroll-behavior ; scrollBy() with instant behavior 
25
PASS Main frame with smooth scroll-behavior ; scrollBy() with instant behavior 
26
FAIL Main frame with smooth scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 2430 but got 2430
26
PASS Main frame with smooth scroll-behavior ; scrollBy() with smooth behavior 
27
PASS Aborting an ongoing smooth scrolling on the main frame with another smooth scrolling 
27
PASS Aborting an ongoing smooth scrolling on the main frame with another smooth scrolling 
28
PASS Aborting an ongoing smooth scrolling on the main frame with an instant scrolling 
28
PASS Aborting an ongoing smooth scrolling on the main frame with an instant scrolling 
29
29
- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html -1 / +1 lines
Lines 1-4 a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html_sec1
1
<!DOCTYPE html>
1
<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
2
<title>Testing scrollOptions' behavior for Element.scroll* on the window of the main frame</title>
2
<title>Testing scrollOptions' behavior for Element.scroll* on the window of the main frame</title>
3
<meta name="timeout" content="long"/>
3
<meta name="timeout" content="long"/>
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested-expected.txt -1 / +3 lines
Lines 1-3 a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested-expected.txt_sec1
1
1
2
FAIL scrollIntoView with nested elements with different scroll-behavior assert_less_than: Element with smooth behavior should not scroll immediately expected a number less than 500 but got 500
2
FAIL scrollIntoView with nested elements with different scroll-behavior assert_equals: Element with instant behavior should jump to the final position expected 0 but got 1000
3
4
assert_equals: Element with instant behavior should jump to the final position expected 500 but got 1000
3
5
- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html -1 / +1 lines
Lines 1-4 a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html_sec1
1
<!DOCTYPE html>
1
<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
2
<title>Testing scrollOptions' behavior with scrollIntoView for nested scrolling nodes</title>
2
<title>Testing scrollOptions' behavior with scrollIntoView for nested scrolling nodes</title>
3
<meta name="timeout" content="long"/>
3
<meta name="timeout" content="long"/>
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html -1 / +1 lines
Lines 1-4 a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html_sec1
1
<!DOCTYPE html>
1
<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
2
<title>Testing scroll positions when scrolling an element with smooth behavior</title>
2
<title>Testing scroll positions when scrolling an element with smooth behavior</title>
3
<meta name="timeout" content="long"/>
3
<meta name="timeout" content="long"/>
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root-expected.txt -16 / +16 lines
Lines 3-37 PASS iframe loaded a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root-expected.txt_sec1
3
PASS Subframe with auto scroll-behavior ; scroll() with default behavior 
3
PASS Subframe with auto scroll-behavior ; scroll() with default behavior 
4
PASS Subframe with auto scroll-behavior ; scroll() with auto behavior 
4
PASS Subframe with auto scroll-behavior ; scroll() with auto behavior 
5
PASS Subframe with auto scroll-behavior ; scroll() with instant behavior 
5
PASS Subframe with auto scroll-behavior ; scroll() with instant behavior 
6
FAIL Subframe with auto scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
6
PASS Subframe with auto scroll-behavior ; scroll() with smooth behavior 
7
FAIL Subframe with smooth scroll-behavior ; scroll() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
7
PASS Subframe with smooth scroll-behavior ; scroll() with default behavior 
8
FAIL Subframe with smooth scroll-behavior ; scroll() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
8
PASS Subframe with smooth scroll-behavior ; scroll() with auto behavior 
9
PASS Subframe with smooth scroll-behavior ; scroll() with instant behavior 
9
PASS Subframe with smooth scroll-behavior ; scroll() with instant behavior 
10
FAIL Subframe with smooth scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
10
PASS Subframe with smooth scroll-behavior ; scroll() with smooth behavior 
11
PASS Subframe with auto scroll-behavior ; scrollTo() with default behavior 
11
PASS Subframe with auto scroll-behavior ; scrollTo() with default behavior 
12
PASS Subframe with auto scroll-behavior ; scrollTo() with auto behavior 
12
PASS Subframe with auto scroll-behavior ; scrollTo() with auto behavior 
13
PASS Subframe with auto scroll-behavior ; scrollTo() with instant behavior 
13
PASS Subframe with auto scroll-behavior ; scrollTo() with instant behavior 
14
FAIL Subframe with auto scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
14
PASS Subframe with auto scroll-behavior ; scrollTo() with smooth behavior 
15
FAIL Subframe with smooth scroll-behavior ; scrollTo() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
15
PASS Subframe with smooth scroll-behavior ; scrollTo() with default behavior 
16
FAIL Subframe with smooth scroll-behavior ; scrollTo() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
16
PASS Subframe with smooth scroll-behavior ; scrollTo() with auto behavior 
17
PASS Subframe with smooth scroll-behavior ; scrollTo() with instant behavior 
17
PASS Subframe with smooth scroll-behavior ; scrollTo() with instant behavior 
18
FAIL Subframe with smooth scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
18
PASS Subframe with smooth scroll-behavior ; scrollTo() with smooth behavior 
19
PASS Subframe with auto scroll-behavior ; scrollBy() with default behavior 
19
PASS Subframe with auto scroll-behavior ; scrollBy() with default behavior 
20
PASS Subframe with auto scroll-behavior ; scrollBy() with auto behavior 
20
PASS Subframe with auto scroll-behavior ; scrollBy() with auto behavior 
21
PASS Subframe with auto scroll-behavior ; scrollBy() with instant behavior 
21
PASS Subframe with auto scroll-behavior ; scrollBy() with instant behavior 
22
FAIL Subframe with auto scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
22
PASS Subframe with auto scroll-behavior ; scrollBy() with smooth behavior 
23
FAIL Subframe with smooth scroll-behavior ; scrollBy() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
23
PASS Subframe with smooth scroll-behavior ; scrollBy() with default behavior 
24
FAIL Subframe with smooth scroll-behavior ; scrollBy() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
24
PASS Subframe with smooth scroll-behavior ; scrollBy() with auto behavior 
25
PASS Subframe with smooth scroll-behavior ; scrollBy() with instant behavior 
25
PASS Subframe with smooth scroll-behavior ; scrollBy() with instant behavior 
26
FAIL Subframe with smooth scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
26
PASS Subframe with smooth scroll-behavior ; scrollBy() with smooth behavior 
27
PASS Subframe with auto scroll-behavior ; scrollIntoView() with default behavior 
27
PASS Subframe with auto scroll-behavior ; scrollIntoView() with default behavior 
28
PASS Subframe with auto scroll-behavior ; scrollIntoView() with auto behavior 
28
PASS Subframe with auto scroll-behavior ; scrollIntoView() with auto behavior 
29
PASS Subframe with auto scroll-behavior ; scrollIntoView() with instant behavior 
29
PASS Subframe with auto scroll-behavior ; scrollIntoView() with instant behavior 
30
FAIL Subframe with auto scroll-behavior ; scrollIntoView() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
30
PASS Subframe with auto scroll-behavior ; scrollIntoView() with smooth behavior 
31
FAIL Subframe with smooth scroll-behavior ; scrollIntoView() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
31
PASS Subframe with smooth scroll-behavior ; scrollIntoView() with default behavior 
32
FAIL Subframe with smooth scroll-behavior ; scrollIntoView() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
32
PASS Subframe with smooth scroll-behavior ; scrollIntoView() with auto behavior 
33
PASS Subframe with smooth scroll-behavior ; scrollIntoView() with instant behavior 
33
PASS Subframe with smooth scroll-behavior ; scrollIntoView() with instant behavior 
34
FAIL Subframe with smooth scroll-behavior ; scrollIntoView() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
34
PASS Subframe with smooth scroll-behavior ; scrollIntoView() with smooth behavior 
35
PASS Aborting an ongoing smooth scrolling on a subframe with another smooth scrolling 
35
PASS Aborting an ongoing smooth scrolling on a subframe with another smooth scrolling 
36
PASS Aborting an ongoing smooth scrolling on a subframe with an instant scrolling 
36
PASS Aborting an ongoing smooth scrolling on a subframe with an instant scrolling 
37
37
- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html -1 / +1 lines
Lines 1-4 a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html_sec1
1
<!DOCTYPE html>
1
<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
2
<title>Testing scrollOptions' behavior for Element.scroll* and scroll-behavior on the root of a subframe</title>
2
<title>Testing scrollOptions' behavior for Element.scroll* and scroll-behavior on the root of a subframe</title>
3
<meta name="timeout" content="long"/>
3
<meta name="timeout" content="long"/>
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window-expected.txt -12 / +12 lines
Lines 3-29 PASS iframe loaded a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window-expected.txt_sec1
3
PASS Main frame with auto scroll-behavior ; scroll() with default behavior 
3
PASS Main frame with auto scroll-behavior ; scroll() with default behavior 
4
PASS Main frame with auto scroll-behavior ; scroll() with auto behavior 
4
PASS Main frame with auto scroll-behavior ; scroll() with auto behavior 
5
PASS Main frame with auto scroll-behavior ; scroll() with instant behavior 
5
PASS Main frame with auto scroll-behavior ; scroll() with instant behavior 
6
FAIL Main frame with auto scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
6
PASS Main frame with auto scroll-behavior ; scroll() with smooth behavior 
7
FAIL Main frame with smooth scroll-behavior ; scroll() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
7
PASS Main frame with smooth scroll-behavior ; scroll() with default behavior 
8
FAIL Main frame with smooth scroll-behavior ; scroll() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
8
PASS Main frame with smooth scroll-behavior ; scroll() with auto behavior 
9
PASS Main frame with smooth scroll-behavior ; scroll() with instant behavior 
9
PASS Main frame with smooth scroll-behavior ; scroll() with instant behavior 
10
FAIL Main frame with smooth scroll-behavior ; scroll() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
10
PASS Main frame with smooth scroll-behavior ; scroll() with smooth behavior 
11
PASS Main frame with auto scroll-behavior ; scrollTo() with default behavior 
11
PASS Main frame with auto scroll-behavior ; scrollTo() with default behavior 
12
PASS Main frame with auto scroll-behavior ; scrollTo() with auto behavior 
12
PASS Main frame with auto scroll-behavior ; scrollTo() with auto behavior 
13
PASS Main frame with auto scroll-behavior ; scrollTo() with instant behavior 
13
PASS Main frame with auto scroll-behavior ; scrollTo() with instant behavior 
14
FAIL Main frame with auto scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
14
PASS Main frame with auto scroll-behavior ; scrollTo() with smooth behavior 
15
FAIL Main frame with smooth scroll-behavior ; scrollTo() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
15
PASS Main frame with smooth scroll-behavior ; scrollTo() with default behavior 
16
FAIL Main frame with smooth scroll-behavior ; scrollTo() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
16
PASS Main frame with smooth scroll-behavior ; scrollTo() with auto behavior 
17
PASS Main frame with smooth scroll-behavior ; scrollTo() with instant behavior 
17
PASS Main frame with smooth scroll-behavior ; scrollTo() with instant behavior 
18
FAIL Main frame with smooth scroll-behavior ; scrollTo() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
18
PASS Main frame with smooth scroll-behavior ; scrollTo() with smooth behavior 
19
PASS Main frame with auto scroll-behavior ; scrollBy() with default behavior 
19
PASS Main frame with auto scroll-behavior ; scrollBy() with default behavior 
20
PASS Main frame with auto scroll-behavior ; scrollBy() with auto behavior 
20
PASS Main frame with auto scroll-behavior ; scrollBy() with auto behavior 
21
PASS Main frame with auto scroll-behavior ; scrollBy() with instant behavior 
21
PASS Main frame with auto scroll-behavior ; scrollBy() with instant behavior 
22
FAIL Main frame with auto scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
22
PASS Main frame with auto scroll-behavior ; scrollBy() with smooth behavior 
23
FAIL Main frame with smooth scroll-behavior ; scrollBy() with default behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
23
PASS Main frame with smooth scroll-behavior ; scrollBy() with default behavior 
24
FAIL Main frame with smooth scroll-behavior ; scrollBy() with auto behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
24
PASS Main frame with smooth scroll-behavior ; scrollBy() with auto behavior 
25
PASS Main frame with smooth scroll-behavior ; scrollBy() with instant behavior 
25
PASS Main frame with smooth scroll-behavior ; scrollBy() with instant behavior 
26
FAIL Main frame with smooth scroll-behavior ; scrollBy() with smooth behavior assert_less_than: Should not set scrollLeft immediately expected a number less than 500 but got 500
26
PASS Main frame with smooth scroll-behavior ; scrollBy() with smooth behavior 
27
PASS Aborting an ongoing smooth scrolling on the main frame with another smooth scrolling 
27
PASS Aborting an ongoing smooth scrolling on the main frame with another smooth scrolling 
28
PASS Aborting an ongoing smooth scrolling on the main frame with an instant scrolling 
28
PASS Aborting an ongoing smooth scrolling on the main frame with an instant scrolling 
29
29
- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html -1 / +1 lines
Lines 1-4 a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html_sec1
1
<!DOCTYPE html>
1
<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSOMViewSmoothScrollingEnabled=true ] -->
2
<title>Testing scrollOptions' behavior for Element.scroll* and scroll-behavior on the root of a subframe</title>
2
<title>Testing scrollOptions' behavior for Element.scroll* and scroll-behavior on the root of a subframe</title>
3
<meta name="timeout" content="long"/>
3
<meta name="timeout" content="long"/>
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
4
<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com">
- a/LayoutTests/platform/mac-wk1/TestExpectations +6 lines
Lines 665-670 webkit.org/b/189594 imported/w3c/web-platform-tests/css/css-animations/pending-s a/LayoutTests/platform/mac-wk1/TestExpectations_sec1
665
665
666
webkit.org/b/188070 imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.html [ Pass Failure ]
666
webkit.org/b/188070 imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.html [ Pass Failure ]
667
667
668
# Tests for smooth scroll behavior do not all work and they are slow, so let's just skip them.
669
webkit.org/b/191357 imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html [ Skip ]
670
webkit.org/b/191357 imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html [ Skip ]
671
webkit.org/b/191357 imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html [ Skip ]
672
webkit.org/b/191357 imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html [ Skip ]
673
668
webkit.org/b/189908 imported/w3c/web-platform-tests/resource-timing/resource_timing.worker.html [ Failure ]
674
webkit.org/b/189908 imported/w3c/web-platform-tests/resource-timing/resource_timing.worker.html [ Failure ]
669
675
670
webkit.org/b/189756 [ Mojave+ ] compositing/filters/opacity-change-on-filtered-paints-into-ancestor.html [ Pass ImageOnlyFailure ]
676
webkit.org/b/189756 [ Mojave+ ] compositing/filters/opacity-change-on-filtered-paints-into-ancestor.html [ Pass ImageOnlyFailure ]

Return to Bug 188043