Diff
Modified: branches/safari-609-branch/LayoutTests/ChangeLog (255006 => 255007)
--- branches/safari-609-branch/LayoutTests/ChangeLog 2020-01-23 21:43:22 UTC (rev 255006)
+++ branches/safari-609-branch/LayoutTests/ChangeLog 2020-01-23 21:43:26 UTC (rev 255007)
@@ -1,5 +1,49 @@
2020-01-23 Russell Epstein <[email protected]>
+ Cherry-pick r254497. rdar://problem/58606212
+
+ REGRESSION (Catalina) non-scrolling iframe prevents document scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=202687
+
+ Reviewed by Tim Horton.
+
+ Source/WebCore:
+
+ Latching code in EventHandlerMac would consider <iframe scrolling=no> to be a latching
+ candidate, which would cause mousewheel scrolling in a <iframe scrolling=no> nested inside
+ a scrollable frame to not scroll. This affected ads and twitch.tv.
+
+ Fix by having scrolledToEdgeInDominantDirection() return true for non-scrollable iframes.
+
+ Test: tiled-drawing/scrolling/scrolling-no-iframe-latching.html
+
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::scrolledToEdgeInDominantDirection):
+ * platform/ScrollView.h:
+ (WebCore::ScrollView::canHaveScrollbars const): Deleted.
+ * platform/ScrollableArea.h:
+ (WebCore::ScrollableArea::canHaveScrollbars const):
+
+ LayoutTests:
+
+ * tiled-drawing/scrolling/scrolling-no-iframe-latching-expected.txt: Added.
+ * tiled-drawing/scrolling/scrolling-no-iframe-latching.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-01-13 Simon Fraser <[email protected]>
+
+ REGRESSION (Catalina) non-scrolling iframe prevents document scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=202687
+
+ Reviewed by Tim Horton.
+
+ * tiled-drawing/scrolling/scrolling-no-iframe-latching-expected.txt: Added.
+ * tiled-drawing/scrolling/scrolling-no-iframe-latching.html: Added.
+
+2020-01-23 Russell Epstein <[email protected]>
+
Cherry-pick r254492. rdar://problem/58606251
Scrollbar hiding on iOS via ::-webkit-scrollbar { display: none } doesn't work
Added: branches/safari-609-branch/LayoutTests/tiled-drawing/scrolling/scrolling-no-iframe-latching-expected.txt (0 => 255007)
--- branches/safari-609-branch/LayoutTests/tiled-drawing/scrolling/scrolling-no-iframe-latching-expected.txt (rev 0)
+++ branches/safari-609-branch/LayoutTests/tiled-drawing/scrolling/scrolling-no-iframe-latching-expected.txt 2020-01-23 21:43:26 UTC (rev 255007)
@@ -0,0 +1,11 @@
+
+Tests that an inner frame with scrolling=no doesn't prevent scrolling a parent frame
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS Outer frame scrolled.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: branches/safari-609-branch/LayoutTests/tiled-drawing/scrolling/scrolling-no-iframe-latching.html (0 => 255007)
--- branches/safari-609-branch/LayoutTests/tiled-drawing/scrolling/scrolling-no-iframe-latching.html (rev 0)
+++ branches/safari-609-branch/LayoutTests/tiled-drawing/scrolling/scrolling-no-iframe-latching.html 2020-01-23 21:43:26 UTC (rev 255007)
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script>
+ window.jsTestIsAsync = true;
+
+ function checkForScroll()
+ {
+ // The first-level iframe should have scrolled.
+ let testFrame = document.getElementById('target');
+ var frameScrollPosition = testFrame.contentDocument.scrollingElement.scrollTop;
+
+ if (!frameScrollPosition)
+ testFailed("Outer frame did not scroll.");
+ else
+ testPassed("Outer frame scrolled.");
+
+ finishJSTest();
+ }
+
+ function scrollTest()
+ {
+ // Send a scroll while over the inner iframe.
+ var startPosX = 150;
+ var startPosY = 150;
+ eventSender.monitorWheelEvents();
+ eventSender.mouseMoveTo(startPosX, startPosY);
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+ eventSender.callAfterScrollingCompletes(checkForScroll);
+ }
+
+ function setupTopLevel()
+ {
+ if (window.eventSender) {
+ testRunner.dumpAsText();
+ setTimeout(scrollTest, 0);
+ }
+
+ setTimeout(checkForScroll, 1000);
+ }
+</script>
+ <iframe id="target" scrolling="yes" style="height: 400px; width: 500px;"
+ srcdoc= "
+ <style>body { height: 1000px; }</style>
+ <p>This frame is scrollable.</p>
+
+ <iframe scrolling='no' height=200 width=350 srcdoc='
+ <style>body { height: 1000px; }</style>
+ <p>This frame is not scrollable.</p>
+ '>
+ "
+ _onload_="setupTopLevel();"
+ >
+ </iframe>
+ <div id="console"></div>
+<script>
+description("Tests that an inner frame with scrolling=no doesn't prevent scrolling a parent frame");
+</script>
+<script src=""
+</body>
+</html>
Modified: branches/safari-609-branch/Source/WebCore/ChangeLog (255006 => 255007)
--- branches/safari-609-branch/Source/WebCore/ChangeLog 2020-01-23 21:43:22 UTC (rev 255006)
+++ branches/safari-609-branch/Source/WebCore/ChangeLog 2020-01-23 21:43:26 UTC (rev 255007)
@@ -1,5 +1,61 @@
2020-01-23 Russell Epstein <[email protected]>
+ Cherry-pick r254497. rdar://problem/58606212
+
+ REGRESSION (Catalina) non-scrolling iframe prevents document scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=202687
+
+ Reviewed by Tim Horton.
+
+ Source/WebCore:
+
+ Latching code in EventHandlerMac would consider <iframe scrolling=no> to be a latching
+ candidate, which would cause mousewheel scrolling in a <iframe scrolling=no> nested inside
+ a scrollable frame to not scroll. This affected ads and twitch.tv.
+
+ Fix by having scrolledToEdgeInDominantDirection() return true for non-scrollable iframes.
+
+ Test: tiled-drawing/scrolling/scrolling-no-iframe-latching.html
+
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::scrolledToEdgeInDominantDirection):
+ * platform/ScrollView.h:
+ (WebCore::ScrollView::canHaveScrollbars const): Deleted.
+ * platform/ScrollableArea.h:
+ (WebCore::ScrollableArea::canHaveScrollbars const):
+
+ LayoutTests:
+
+ * tiled-drawing/scrolling/scrolling-no-iframe-latching-expected.txt: Added.
+ * tiled-drawing/scrolling/scrolling-no-iframe-latching.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-01-13 Simon Fraser <[email protected]>
+
+ REGRESSION (Catalina) non-scrolling iframe prevents document scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=202687
+
+ Reviewed by Tim Horton.
+
+ Latching code in EventHandlerMac would consider <iframe scrolling=no> to be a latching
+ candidate, which would cause mousewheel scrolling in a <iframe scrolling=no> nested inside
+ a scrollable frame to not scroll. This affected ads and twitch.tv.
+
+ Fix by having scrolledToEdgeInDominantDirection() return true for non-scrollable iframes.
+
+ Test: tiled-drawing/scrolling/scrolling-no-iframe-latching.html
+
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::scrolledToEdgeInDominantDirection):
+ * platform/ScrollView.h:
+ (WebCore::ScrollView::canHaveScrollbars const): Deleted.
+ * platform/ScrollableArea.h:
+ (WebCore::ScrollableArea::canHaveScrollbars const):
+
+2020-01-23 Russell Epstein <[email protected]>
+
Cherry-pick r254492. rdar://problem/58606251
Scrollbar hiding on iOS via ::-webkit-scrollbar { display: none } doesn't work
Modified: branches/safari-609-branch/Source/WebCore/page/mac/EventHandlerMac.mm (255006 => 255007)
--- branches/safari-609-branch/Source/WebCore/page/mac/EventHandlerMac.mm 2020-01-23 21:43:22 UTC (rev 255006)
+++ branches/safari-609-branch/Source/WebCore/page/mac/EventHandlerMac.mm 2020-01-23 21:43:26 UTC (rev 255007)
@@ -817,6 +817,9 @@
if (!container.renderer())
return true;
+ if (!area.canHaveScrollbars())
+ return true;
+
const RenderStyle& style = container.renderer()->style();
if (!deltaIsPredominantlyVertical(deltaX, deltaY) && deltaX) {
Modified: branches/safari-609-branch/Source/WebCore/platform/ScrollView.h (255006 => 255007)
--- branches/safari-609-branch/Source/WebCore/platform/ScrollView.h 2020-01-23 21:43:22 UTC (rev 255006)
+++ branches/safari-609-branch/Source/WebCore/platform/ScrollView.h 2020-01-23 21:43:26 UTC (rev 255007)
@@ -120,7 +120,6 @@
void setScrollingModesLock(bool lock = true) { m_horizontalScrollbarLock = m_verticalScrollbarLock = lock; }
WEBCORE_EXPORT virtual void setCanHaveScrollbars(bool);
- bool canHaveScrollbars() const { return horizontalScrollbarMode() != ScrollbarAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; }
virtual bool avoidScrollbarCreation() const { return false; }
Modified: branches/safari-609-branch/Source/WebCore/platform/ScrollableArea.h (255006 => 255007)
--- branches/safari-609-branch/Source/WebCore/platform/ScrollableArea.h 2020-01-23 21:43:22 UTC (rev 255006)
+++ branches/safari-609-branch/Source/WebCore/platform/ScrollableArea.h 2020-01-23 21:43:26 UTC (rev 255007)
@@ -120,6 +120,7 @@
virtual ScrollbarMode horizontalScrollbarMode() const { return ScrollbarAuto; }
virtual ScrollbarMode verticalScrollbarMode() const { return ScrollbarAuto; }
+ bool canHaveScrollbars() const { return horizontalScrollbarMode() != ScrollbarAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; }
virtual bool horizontalScrollbarHiddenByStyle() const { return false; }
virtual bool verticalScrollbarHiddenByStyle() const { return false; }