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) |