- Revision
- 256973
- Author
- repst...@apple.com
- Date
- 2020-02-19 15:37:44 -0800 (Wed, 19 Feb 2020)
Log Message
Cherry-pick r256513. rdar://problem/59576794
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.1-branch/LayoutTests/ChangeLog (256972 => 256973)
--- branches/safari-609.1.20.1-branch/LayoutTests/ChangeLog 2020-02-19 23:37:38 UTC (rev 256972)
+++ branches/safari-609.1.20.1-branch/LayoutTests/ChangeLog 2020-02-19 23:37:44 UTC (rev 256973)
@@ -1,5 +1,54 @@
2020-02-19 Alan Coon <alanc...@apple.com>
+ Cherry-pick r256513. rdar://problem/59576794
+
+ 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 r256191. rdar://problem/59576820
Disallow setting base URL to a data or _javascript_ URL
Added: branches/safari-609.1.20.1-branch/LayoutTests/fast/scrolling/programmatic-scroll-to-zero-zero-expected.html (0 => 256973)
--- branches/safari-609.1.20.1-branch/LayoutTests/fast/scrolling/programmatic-scroll-to-zero-zero-expected.html (rev 0)
+++ branches/safari-609.1.20.1-branch/LayoutTests/fast/scrolling/programmatic-scroll-to-zero-zero-expected.html 2020-02-19 23:37:44 UTC (rev 256973)
@@ -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.1-branch/LayoutTests/fast/scrolling/programmatic-scroll-to-zero-zero.html (0 => 256973)
--- branches/safari-609.1.20.1-branch/LayoutTests/fast/scrolling/programmatic-scroll-to-zero-zero.html (rev 0)
+++ branches/safari-609.1.20.1-branch/LayoutTests/fast/scrolling/programmatic-scroll-to-zero-zero.html 2020-02-19 23:37:44 UTC (rev 256973)
@@ -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.1-branch/LayoutTests/platform/ios/TestExpectations (256972 => 256973)
--- branches/safari-609.1.20.1-branch/LayoutTests/platform/ios/TestExpectations 2020-02-19 23:37:38 UTC (rev 256972)
+++ branches/safari-609.1.20.1-branch/LayoutTests/platform/ios/TestExpectations 2020-02-19 23:37:44 UTC (rev 256973)
@@ -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.1-branch/Source/WebCore/ChangeLog (256972 => 256973)
--- branches/safari-609.1.20.1-branch/Source/WebCore/ChangeLog 2020-02-19 23:37:38 UTC (rev 256972)
+++ branches/safari-609.1.20.1-branch/Source/WebCore/ChangeLog 2020-02-19 23:37:44 UTC (rev 256973)
@@ -1,5 +1,57 @@
2020-02-19 Alan Coon <alanc...@apple.com>
+ Cherry-pick r256513. rdar://problem/59576794
+
+ 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/59576794
Unreviewed, partial rollout of r255037.
Modified: branches/safari-609.1.20.1-branch/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp (256972 => 256973)
--- branches/safari-609.1.20.1-branch/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp 2020-02-19 23:37:38 UTC (rev 256972)
+++ branches/safari-609.1.20.1-branch/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp 2020-02-19 23:37:44 UTC (rev 256973)
@@ -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);
}