- Revision
- 290625
- Author
- [email protected]
- Date
- 2022-02-28 19:00:08 -0800 (Mon, 28 Feb 2022)
Log Message
No animation when scroll snap scroller is navigated with the keyboard
https://bugs.webkit.org/show_bug.cgi?id=236244
Reviewed by Tim Horton.
Source/WebCore:
Keyboard-driven scrolls in overflow didn't animate, simply because scrollAnimatorEnabled()
wasn't implemented for RenderLayerScrollableArea.
I could not figure out a reliable way to test that we animated the scroll.
* rendering/RenderLayerScrollableArea.cpp:
(WebCore::RenderLayerScrollableArea::scrollAnimatorEnabled const):
* rendering/RenderLayerScrollableArea.h:
Tools:
In fixing this bug I ran into the issue predicted in https://bugs.webkit.org/show_bug.cgi?id=234456#c6.
As a workaround, explicitly set NSScrollAnimationEnabled to NO in both processes. This is a partial revert
of r287228 which I tried, and failed to fix via bug 234488.
* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::InjectedBundle::platformInitialize):
* WebKitTestRunner/mac/main.mm:
(setDefaultsToConsistentValuesForTesting):
LayoutTests:
Turn off the scroll animator for these tests that assume that scrolling is instantaneous.
* css3/scroll-snap/scroll-padding-overflow-paging.html:
* fast/events/wheelevent-in-scrolling-div.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow-rtl-with-keyboard.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (290624 => 290625)
--- trunk/LayoutTests/ChangeLog 2022-03-01 02:38:13 UTC (rev 290624)
+++ trunk/LayoutTests/ChangeLog 2022-03-01 03:00:08 UTC (rev 290625)
@@ -1,3 +1,16 @@
+2022-02-28 Simon Fraser <[email protected]>
+
+ No animation when scroll snap scroller is navigated with the keyboard
+ https://bugs.webkit.org/show_bug.cgi?id=236244
+
+ Reviewed by Tim Horton.
+
+ Turn off the scroll animator for these tests that assume that scrolling is instantaneous.
+
+ * css3/scroll-snap/scroll-padding-overflow-paging.html:
+ * fast/events/wheelevent-in-scrolling-div.html:
+ * tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow-rtl-with-keyboard.html:
+
2022-02-28 Matteo Flores <[email protected]>
[ iOS ] fast/mediastream/video-rotation-gpu-process-crash.html is a flaky crash
Modified: trunk/LayoutTests/css3/scroll-snap/scroll-padding-overflow-paging.html (290624 => 290625)
--- trunk/LayoutTests/css3/scroll-snap/scroll-padding-overflow-paging.html 2022-03-01 02:38:13 UTC (rev 290624)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-padding-overflow-paging.html 2022-03-01 03:00:08 UTC (rev 290625)
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!DOCTYPE html> <!-- webkit-test-runner [ ScrollAnimatorEnabled=false ] -->
<html>
<head>
<style>
Modified: trunk/LayoutTests/fast/events/wheelevent-in-scrolling-div.html (290624 => 290625)
--- trunk/LayoutTests/fast/events/wheelevent-in-scrolling-div.html 2022-03-01 02:38:13 UTC (rev 290624)
+++ trunk/LayoutTests/fast/events/wheelevent-in-scrolling-div.html 2022-03-01 03:00:08 UTC (rev 290625)
@@ -1,3 +1,4 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ ScrollAnimatorEnabled=false ] -->
<html>
<head>
<script src=""
Modified: trunk/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow-rtl-with-keyboard.html (290624 => 290625)
--- trunk/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow-rtl-with-keyboard.html 2022-03-01 02:38:13 UTC (rev 290624)
+++ trunk/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow-rtl-with-keyboard.html 2022-03-01 03:00:08 UTC (rev 290625)
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML>
+<!DOCTYPE html> <!-- webkit-test-runner [ ScrollAnimatorEnabled=false ] -->
<html>
<head>
<style>
Modified: trunk/Source/WebCore/ChangeLog (290624 => 290625)
--- trunk/Source/WebCore/ChangeLog 2022-03-01 02:38:13 UTC (rev 290624)
+++ trunk/Source/WebCore/ChangeLog 2022-03-01 03:00:08 UTC (rev 290625)
@@ -1,3 +1,19 @@
+2022-02-28 Simon Fraser <[email protected]>
+
+ No animation when scroll snap scroller is navigated with the keyboard
+ https://bugs.webkit.org/show_bug.cgi?id=236244
+
+ Reviewed by Tim Horton.
+
+ Keyboard-driven scrolls in overflow didn't animate, simply because scrollAnimatorEnabled()
+ wasn't implemented for RenderLayerScrollableArea.
+
+ I could not figure out a reliable way to test that we animated the scroll.
+
+ * rendering/RenderLayerScrollableArea.cpp:
+ (WebCore::RenderLayerScrollableArea::scrollAnimatorEnabled const):
+ * rendering/RenderLayerScrollableArea.h:
+
2022-02-28 Jer Noble <[email protected]>
[Cocoa] Adopt -streamDataParser:didProvideContentKeySpecifier:forTrackID: delegate callback
Modified: trunk/Source/WebCore/rendering/RenderLayerScrollableArea.cpp (290624 => 290625)
--- trunk/Source/WebCore/rendering/RenderLayerScrollableArea.cpp 2022-03-01 02:38:13 UTC (rev 290624)
+++ trunk/Source/WebCore/rendering/RenderLayerScrollableArea.cpp 2022-03-01 03:00:08 UTC (rev 290625)
@@ -1542,6 +1542,11 @@
return false;
}
+bool RenderLayerScrollableArea::scrollAnimatorEnabled() const
+{
+ return m_layer.page().settings().scrollAnimatorEnabled();
+}
+
void RenderLayerScrollableArea::paintOverlayScrollbars(GraphicsContext& context, const LayoutRect& damageRect, OptionSet<PaintBehavior> paintBehavior, RenderObject* subtreePaintRoot)
{
if (!m_containsDirtyOverlayScrollbars)
Modified: trunk/Source/WebCore/rendering/RenderLayerScrollableArea.h (290624 => 290625)
--- trunk/Source/WebCore/rendering/RenderLayerScrollableArea.h 2022-03-01 02:38:13 UTC (rev 290624)
+++ trunk/Source/WebCore/rendering/RenderLayerScrollableArea.h 2022-03-01 03:00:08 UTC (rev 290625)
@@ -193,6 +193,7 @@
bool isRubberBandInProgress() const final;
bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const final;
bool isScrollSnapInProgress() const final;
+ bool scrollAnimatorEnabled() const final;
bool mockScrollbarsControllerEnabled() const final;
void logMockScrollbarsControllerMessage(const String&) const final;
Modified: trunk/Tools/ChangeLog (290624 => 290625)
--- trunk/Tools/ChangeLog 2022-03-01 02:38:13 UTC (rev 290624)
+++ trunk/Tools/ChangeLog 2022-03-01 03:00:08 UTC (rev 290625)
@@ -1,3 +1,19 @@
+2022-02-28 Simon Fraser <[email protected]>
+
+ No animation when scroll snap scroller is navigated with the keyboard
+ https://bugs.webkit.org/show_bug.cgi?id=236244
+
+ Reviewed by Tim Horton.
+
+ In fixing this bug I ran into the issue predicted in https://bugs.webkit.org/show_bug.cgi?id=234456#c6.
+ As a workaround, explicitly set NSScrollAnimationEnabled to NO in both processes. This is a partial revert
+ of r287228 which I tried, and failed to fix via bug 234488.
+
+ * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
+ (WTR::InjectedBundle::platformInitialize):
+ * WebKitTestRunner/mac/main.mm:
+ (setDefaultsToConsistentValuesForTesting):
+
2022-02-28 Wenson Hsieh <[email protected]>
Add API testing infrastructure for "Markup Image" and "Copy Cropped Image"
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm (290624 => 290625)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm 2022-03-01 02:38:13 UTC (rev 290624)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm 2022-03-01 03:00:08 UTC (rev 290625)
@@ -53,6 +53,7 @@
@"AppleHighlightColor": @"0.709800 0.835300 1.000000",
@"AppleOtherHighlightColor": @"0.500000 0.500000 0.500000",
@"NSOverlayScrollersEnabled": @NO,
+ @"NSScrollAnimationEnabled" : @NO,
@"AppleShowScrollBars": @"Always",
@"NSButtonAnimationsEnabled": @NO, // Ideally, we should find a way to test animations, but for now, make sure that the dumped snapshot matches actual state.
// FIXME (<rdar://problem/13396515>): It is too late to set AppleLanguages here, as loaded frameworks localizations cannot be changed.
Modified: trunk/Tools/WebKitTestRunner/mac/main.mm (290624 => 290625)
--- trunk/Tools/WebKitTestRunner/mac/main.mm 2022-03-01 02:38:13 UTC (rev 290624)
+++ trunk/Tools/WebKitTestRunner/mac/main.mm 2022-03-01 03:00:08 UTC (rev 290625)
@@ -43,6 +43,7 @@
@"com.apple.swipescrolldirection": @1,
@"com.apple.trackpad.forceClick": @1,
@"NSOverlayScrollersEnabled": @NO,
+ @"NSScrollAnimationEnabled" : @NO,
@"AppleShowScrollBars": @"Always",
@"WebKit2UseRemoteLayerTreeDrawingArea": @NO,
};