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

Unified Diff: third_party/WebKit/Source/core/input/MouseEventManager.cpp

Issue 2646653002: Fix crash in mouse event handling with a dirty layout tree. (Closed)
Patch Set: none Created 3 years, 11 months 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/editing/selection/select-delete-in-event-handler.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/input/MouseEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/MouseEventManager.cpp b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
index 5961dd0ce4de863dcfabd41b0a977cb0ac2355ce..1505b30f9e4d766c9cae86c17f4705820dc30281 100644
--- a/third_party/WebKit/Source/core/input/MouseEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
@@ -730,7 +730,11 @@ WebInputEventResult MouseEventManager::handleMouseDraggedEvent(
event, m_mouseDownPos, m_dragStartPos, m_mousePressNode.get(),
m_lastKnownMousePosition);
- if (m_mouseDownMayStartAutoscroll &&
+ // The call into handleMouseDraggedEvent may have caused a re-layout,
+ // so get the new LayoutObject again.
wkorman 2017/01/18 23:49:56 rm 'new', since it's new this time, but wasn't las
chrishtr 2017/01/19 19:48:35 Done.
+ layoutObject = targetNode->layoutObject();
+
+ if (layoutObject && m_mouseDownMayStartAutoscroll &&
!m_scrollManager->middleClickAutoscrollInProgress() &&
!m_frame->selection().selectedHTMLForClipboard().isEmpty()) {
if (AutoscrollController* controller =
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/selection/select-delete-in-event-handler.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698