Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(582)

Unified Diff: third_party/WebKit/Source/core/page/AutoscrollController.cpp

Issue 1461473002: Ensure that the auto scroll state in the AutoscrollController is cleared if the scroll operation cl… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another attempt to fix layout test redness Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/resources/iframe-with-overflow-scrollable-div.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/AutoscrollController.cpp
diff --git a/third_party/WebKit/Source/core/page/AutoscrollController.cpp b/third_party/WebKit/Source/core/page/AutoscrollController.cpp
index 38650aaf05c81d52b2e435a7bc625e765b137ce0..a3f79c56c73840bd5241b8430a13a96a0c798497 100644
--- a/third_party/WebKit/Source/core/page/AutoscrollController.cpp
+++ b/third_party/WebKit/Source/core/page/AutoscrollController.cpp
@@ -131,7 +131,12 @@ void AutoscrollController::updateAutoscrollLayoutObject()
while (layoutObject && !(layoutObject->isBox() && toLayoutBox(layoutObject)->canAutoscroll()))
layoutObject = layoutObject->parent();
- m_autoscrollLayoutObject = layoutObject && layoutObject->isBox() ? toLayoutBox(layoutObject) : nullptr;
+
+ LayoutBox* autoscrollLayoutObject = layoutObject && layoutObject->isBox() ? toLayoutBox(layoutObject) : nullptr;
+ if (m_autoscrollLayoutObject && !autoscrollLayoutObject)
+ stopAutoscrollIfNeeded(m_autoscrollLayoutObject);
+
+ m_autoscrollLayoutObject = autoscrollLayoutObject;
}
void AutoscrollController::updateDragAndDrop(Node* dropTargetNode, const IntPoint& eventPosition, double eventTime)
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/resources/iframe-with-overflow-scrollable-div.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698