Revert ca608f18f089. rdar://problem/103539448 This reverts commit 65db389fa4b6c49c3c4965b096d68121e8a325a8. Canonical link: https://commits.webkit.org/252432.1015@safari-7614.4.6.2-branch
diff --git a/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden-and-layout-expected.txt b/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden-and-layout-expected.txt deleted file mode 100644 index f97ab22..0000000 --- a/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden-and-layout-expected.txt +++ /dev/null
@@ -1,5 +0,0 @@ -PASS scrollContainer.scrollLeft is 500 -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden-and-layout.html b/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden-and-layout.html deleted file mode 100644 index 2d85284..0000000 --- a/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden-and-layout.html +++ /dev/null
@@ -1,60 +0,0 @@ -<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] --> -<html> -<head> - <style> - .scroll-container { - height: 250px; - width: 300px; - border: 1px solid black; - overflow: hidden; - } - - .contents { - height: 100%; - width: 400%; - background-image: repeating-linear-gradient(to right, white, silver 250px); - } - - body.changed .contents { - height: 120%; - } - </style> - <script src="../../../resources/ui-helper.js"></script> - <script src="../../../resources/js-test-pre.js"></script> - <script> - jsTestIsAsync = true; - - async function runTest() - { - scrollContainer = document.querySelector('.scroll-container'); - - if (window.eventSender) - eventSender.monitorWheelEvents(); - - scrollContainer.scrollTo({ - top: 0, - left: 500, - behavior: 'smooth' - }); - - document.body.classList.add('changed'); - - await UIHelper.waitForScrollCompletion(); - - shouldBe('scrollContainer.scrollLeft', '500'); - finishJSTest(); - } - - window.addEventListener('load', () => { - setTimeout(runTest, 0); - }, false); - </script> -</head> -<body> - <div class="scroll-container"> - <div class="contents"></div> - </div> - <div id="console"></div> - <script src="../../../resources/js-test-post.js"></script> -</body> -</html>
diff --git a/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden.html b/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden.html index d146d85..42aa9b4 100644 --- a/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden.html +++ b/LayoutTests/fast/scrolling/mac/smooth-scroll-with-overflow-hidden.html
@@ -6,6 +6,7 @@ height: 250px; width: 300px; border: 1px solid black; + overflow-y: scroll; overflow: hidden; } @@ -24,8 +25,7 @@ { scrollContainer = document.querySelector('.scroll-container'); - if (window.eventSender) - eventSender.monitorWheelEvents(); + eventSender.monitorWheelEvents(); scrollContainer.scrollTo({ top: 0,
diff --git a/Source/WebCore/platform/ScrollableArea.h b/Source/WebCore/platform/ScrollableArea.h index d65887c..c42d338 100644 --- a/Source/WebCore/platform/ScrollableArea.h +++ b/Source/WebCore/platform/ScrollableArea.h
@@ -451,6 +451,7 @@ bool m_inLiveResize { false }; bool m_scrollOriginChanged { false }; bool m_scrollShouldClearLatchedState { false }; + bool m_hasActiveScrollAnimation { false }; }; WTF::TextStream& operator<<(WTF::TextStream&, const ScrollableArea&);
diff --git a/Source/WebCore/rendering/RenderLayerScrollableArea.cpp b/Source/WebCore/rendering/RenderLayerScrollableArea.cpp index 1c1446f..c75b005 100644 --- a/Source/WebCore/rendering/RenderLayerScrollableArea.cpp +++ b/Source/WebCore/rendering/RenderLayerScrollableArea.cpp
@@ -1648,10 +1648,10 @@ if (HTMLFrameOwnerElement* owner = frameView.frame().ownerElement()) isVisibleToHitTest &= owner->renderer() && owner->renderer()->visibleToHitTesting(); - bool needsToBeRegistered = (hasOverflow && isVisibleToHitTest) || scrollAnimationStatus() == ScrollAnimationStatus::Animating; + bool isScrollable = hasOverflow && isVisibleToHitTest; bool addedOrRemoved = false; - if (needsToBeRegistered) { + if (isScrollable) { if (!m_registeredScrollableArea) { addedOrRemoved = frameView.addScrollableArea(this); m_registeredScrollableArea = true;