- Revision
- 257018
- Author
- alanc...@apple.com
- Date
- 2020-02-19 17:52:14 -0800 (Wed, 19 Feb 2020)
Log Message
Cherry-pick r256513. rdar://problem/59446986
REGRESSION (r255037): Zooming in and out on Quip in macOS Safari can cause the content to be offset to the side
https://bugs.webkit.org/show_bug.cgi?id=207674
rdar://problem/59404866
Reviewed by Antti Koivisto.
Source/WebCore:
Remove the early return in ScrollingStateScrollingNode::setRequestedScrollData(); comparing
with the last m_requestedScrollData is wrong, because requested scroll positions are not "state"
in the scrolling tree, they are requests to scroll. Ideally, they would be represented in some
different way in the scrolling tree.
Test: fast/scrolling/programmatic-scroll-to-zero-zero.html
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::setRequestedScrollData):
LayoutTests:
Test that does a programmatic scroll to 0,0, does a user scroll, then a second programmatic scroll to 0,0,
which is expected to work.
* fast/scrolling/programmatic-scroll-to-zero-zero-expected.html: Added.
* fast/scrolling/programmatic-scroll-to-zero-zero.html: Added.
* platform/ios/TestExpectations: Skip the new test on iOS (it relies on eventSender) and sort the grouping.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-609.1.20.0-branch/LayoutTests/ChangeLog (257017 => 257018)
--- branches/safari-609.1.20.0-branch/LayoutTests/ChangeLog 2020-02-20 01:52:11 UTC (rev 257017)
+++ branches/safari-609.1.20.0-branch/LayoutTests/ChangeLog 2020-02-20 01:52:14 UTC (rev 257018)
@@ -1,5 +1,54 @@
2020-02-19 Alan Coon <alanc...@apple.com>
+ Cherry-pick r256513. rdar://problem/59446986
+
+ REGRESSION (r255037): Zooming in and out on Quip in macOS Safari can cause the content to be offset to the side
+ https://bugs.webkit.org/show_bug.cgi?id=207674
+ rdar://problem/59404866
+
+ Reviewed by Antti Koivisto.
+
+ Source/WebCore:
+
+ Remove the early return in ScrollingStateScrollingNode::setRequestedScrollData(); comparing
+ with the last m_requestedScrollData is wrong, because requested scroll positions are not "state"
+ in the scrolling tree, they are requests to scroll. Ideally, they would be represented in some
+ different way in the scrolling tree.
+
+ Test: fast/scrolling/programmatic-scroll-to-zero-zero.html
+
+ * page/scrolling/ScrollingStateScrollingNode.cpp:
+ (WebCore::ScrollingStateScrollingNode::setRequestedScrollData):
+
+ LayoutTests:
+
+ Test that does a programmatic scroll to 0,0, does a user scroll, then a second programmatic scroll to 0,0,
+ which is expected to work.
+
+ * fast/scrolling/programmatic-scroll-to-zero-zero-expected.html: Added.
+ * fast/scrolling/programmatic-scroll-to-zero-zero.html: Added.
+ * platform/ios/TestExpectations: Skip the new test on iOS (it relies on eventSender) and sort the grouping.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-02-13 Simon Fraser <simon.fra...@apple.com>
+
+ REGRESSION (r255037): Zooming in and out on Quip in macOS Safari can cause the content to be offset to the side
+ https://bugs.webkit.org/show_bug.cgi?id=207674
+ rdar://problem/59404866
+
+ Reviewed by Antti Koivisto.
+
+ Test that does a programmatic scroll to 0,0, does a user scroll, then a second programmatic scroll to 0,0,
+ which is expected to work.
+
+ * fast/scrolling/programmatic-scroll-to-zero-zero-expected.html: Added.
+ * fast/scrolling/programmatic-scroll-to-zero-zero.html: Added.
+ * platform/ios/TestExpectations: Skip the new test on iOS (it relies on eventSender) and sort the grouping.
+
+2020-02-19 Alan Coon <alanc...@apple.com>
+
Cherry-pick r256435. rdar://problem/59446986
REGRESSION: (256400) tiled-drawing/scrolling/fixed/fixed-during-rubberband.html is failing
Added: branches/safari-609.1.20.0-branch/LayoutTests/fast/scrolling/programmatic-scroll-to-zero-zero-expected.html (0 => 257018)
--- branches/safari-609.1.20.0-branch/LayoutTests/fast/scrolling/programmatic-scroll-to-zero-zero-expected.html (rev 0)
+++ branches/safari-609.1.20.0-branch/LayoutTests/fast/scrolling/programmatic-scroll-to-zero-zero-expected.html 2020-02-20 01:52:14 UTC (rev 257018)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>The page should scroll back to the top</title>
+ <style>
+ body {
+ height: 2000px;
+ background-image: repeating-linear-gradient(white, silver 200px);
+ }
+
+ .box {
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ }
+ </style>
+</head>
+<body>
+ <div class="box"></div>
+</body>
+</html>
Added: branches/safari-609.1.20.0-branch/LayoutTests/fast/scrolling/programmatic-scroll-to-zero-zero.html (0 => 257018)
--- branches/safari-609.1.20.0-branch/LayoutTests/fast/scrolling/programmatic-scroll-to-zero-zero.html (rev 0)
+++ branches/safari-609.1.20.0-branch/LayoutTests/fast/scrolling/programmatic-scroll-to-zero-zero.html 2020-02-20 01:52:14 UTC (rev 257018)
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>The page should scroll back to the top</title>
+ <style>
+ body {
+ height: 2000px;
+ background-image: repeating-linear-gradient(white, silver 200px);
+ }
+
+ .box {
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ }
+ </style>
+ <script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ function doTest()
+ {
+ document.scrollingElement.scrollTop = 20;
+ document.scrollingElement.scrollTop = 0;
+
+ eventSender.monitorWheelEvents();
+
+ setTimeout(() => {
+ eventSender.mouseMoveTo(20, 20);
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "began", "none");
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, "changed", "none");
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none");
+ eventSender.callAfterScrollingCompletes(() => {
+ document.scrollingElement.scrollTop = 0;
+ testRunner.notifyDone();
+ });
+ }, 0);
+ }
+
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+ <div class="box"></div>
+</body>
+</html>
Modified: branches/safari-609.1.20.0-branch/LayoutTests/platform/ios/TestExpectations (257017 => 257018)
--- branches/safari-609.1.20.0-branch/LayoutTests/platform/ios/TestExpectations 2020-02-20 01:52:11 UTC (rev 257017)
+++ branches/safari-609.1.20.0-branch/LayoutTests/platform/ios/TestExpectations 2020-02-20 01:52:14 UTC (rev 257018)
@@ -68,17 +68,7 @@
fast/history/page-cache-suspended-audiocontext.html
# No wheel events on iOS
-fast/scrolling/iframe-scrollable-after-back.html [ Skip ]
-fast/scrolling/overflow-scrollable-after-back.html [ Skip ]
-fast/events/wheel-event-destroys-frame.html [ Skip ]
-fast/events/wheel-event-destroys-overflow.html [ Skip ]
-fast/events/wheel-event-outside-body.html [ Skip ]
-fast/scrolling/scroll-container-horizontally.html [ Failure ]
-fast/events/wheelevent-basic.html [ Skip ]
-fast/events/wheelevent-direction-inverted-from-device.html [ Skip ]
-fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html [ Skip ]
-fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html [ Skip ]
-fast/events/wheelevent-mousewheel-interaction.html [ Skip ]
+fast/events/continuous-platform-wheelevent-in-scrolling-div.html [ Skip ]
fast/events/platform-wheelevent-in-scrolling-div.html [ Skip ]
fast/events/platform-wheelevent-paging-x-in-non-scrolling-div.html [ Skip ]
fast/events/platform-wheelevent-paging-x-in-non-scrolling-page.html [ Skip ]
@@ -90,8 +80,19 @@
fast/events/platform-wheelevent-paging-y-in-non-scrolling-page.html [ Skip ]
fast/events/platform-wheelevent-paging-y-in-scrolling-div.html [ Skip ]
fast/events/platform-wheelevent-paging-y-in-scrolling-page.html [ Skip ]
+fast/events/wheel-event-destroys-frame.html [ Skip ]
+fast/events/wheel-event-destroys-overflow.html [ Skip ]
+fast/events/wheel-event-outside-body.html [ Skip ]
+fast/events/wheelevent-basic.html [ Skip ]
+fast/events/wheelevent-direction-inverted-from-device.html [ Skip ]
+fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html [ Skip ]
fast/events/wheelevent-in-text-node.html [ Skip ]
-fast/events/continuous-platform-wheelevent-in-scrolling-div.html [ Skip ]
+fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html [ Skip ]
+fast/events/wheelevent-mousewheel-interaction.html [ Skip ]
+fast/scrolling/iframe-scrollable-after-back.html [ Skip ]
+fast/scrolling/overflow-scrollable-after-back.html [ Skip ]
+fast/scrolling/programmatic-scroll-to-zero-zero.html [ Skip ]
+fast/scrolling/scroll-container-horizontally.html [ Failure ]
# This test requires alpha-channel video support.
compositing/video/video-background-color.html [ WontFix ]
Modified: branches/safari-609.1.20.0-branch/Source/WebCore/ChangeLog (257017 => 257018)
--- branches/safari-609.1.20.0-branch/Source/WebCore/ChangeLog 2020-02-20 01:52:11 UTC (rev 257017)
+++ branches/safari-609.1.20.0-branch/Source/WebCore/ChangeLog 2020-02-20 01:52:14 UTC (rev 257018)
@@ -1,5 +1,57 @@
2020-02-19 Alan Coon <alanc...@apple.com>
+ Cherry-pick r256513. rdar://problem/59446986
+
+ REGRESSION (r255037): Zooming in and out on Quip in macOS Safari can cause the content to be offset to the side
+ https://bugs.webkit.org/show_bug.cgi?id=207674
+ rdar://problem/59404866
+
+ Reviewed by Antti Koivisto.
+
+ Source/WebCore:
+
+ Remove the early return in ScrollingStateScrollingNode::setRequestedScrollData(); comparing
+ with the last m_requestedScrollData is wrong, because requested scroll positions are not "state"
+ in the scrolling tree, they are requests to scroll. Ideally, they would be represented in some
+ different way in the scrolling tree.
+
+ Test: fast/scrolling/programmatic-scroll-to-zero-zero.html
+
+ * page/scrolling/ScrollingStateScrollingNode.cpp:
+ (WebCore::ScrollingStateScrollingNode::setRequestedScrollData):
+
+ LayoutTests:
+
+ Test that does a programmatic scroll to 0,0, does a user scroll, then a second programmatic scroll to 0,0,
+ which is expected to work.
+
+ * fast/scrolling/programmatic-scroll-to-zero-zero-expected.html: Added.
+ * fast/scrolling/programmatic-scroll-to-zero-zero.html: Added.
+ * platform/ios/TestExpectations: Skip the new test on iOS (it relies on eventSender) and sort the grouping.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-02-13 Simon Fraser <simon.fra...@apple.com>
+
+ REGRESSION (r255037): Zooming in and out on Quip in macOS Safari can cause the content to be offset to the side
+ https://bugs.webkit.org/show_bug.cgi?id=207674
+ rdar://problem/59404866
+
+ Reviewed by Antti Koivisto.
+
+ Remove the early return in ScrollingStateScrollingNode::setRequestedScrollData(); comparing
+ with the last m_requestedScrollData is wrong, because requested scroll positions are not "state"
+ in the scrolling tree, they are requests to scroll. Ideally, they would be represented in some
+ different way in the scrolling tree.
+
+ Test: fast/scrolling/programmatic-scroll-to-zero-zero.html
+
+ * page/scrolling/ScrollingStateScrollingNode.cpp:
+ (WebCore::ScrollingStateScrollingNode::setRequestedScrollData):
+
+2020-02-19 Alan Coon <alanc...@apple.com>
+
Cherry-pick r256400. rdar://problem/59446986
Unreviewed, partial rollout of r255037.
Modified: branches/safari-609.1.20.0-branch/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp (257017 => 257018)
--- branches/safari-609.1.20.0-branch/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp 2020-02-20 01:52:11 UTC (rev 257017)
+++ branches/safari-609.1.20.0-branch/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp 2020-02-20 01:52:14 UTC (rev 257018)
@@ -220,9 +220,7 @@
void ScrollingStateScrollingNode::setRequestedScrollData(const RequestedScrollData& scrollData)
{
- if (scrollData == m_requestedScrollData)
- return;
-
+ // Scroll position requests are imperative, not stateful, so we can't early return here.
m_requestedScrollData = scrollData;
setPropertyChanged(RequestedScrollPosition);
}