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

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: 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
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..ecc4f41902054cac6f5cb3b2a63620f0981d6283 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.
+ // layoutObject = targetNode->layoutObject();
+
+ if (layoutObject && m_mouseDownMayStartAutoscroll &&
!m_scrollManager->middleClickAutoscrollInProgress() &&
!m_frame->selection().selectedHTMLForClipboard().isEmpty()) {
if (AutoscrollController* controller =

Powered by Google App Engine
This is Rietveld 408576698