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

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-expected.txt ('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 547576bfcfdcb621c8255bb0b1b2028f38caf45c..b385763178ce55bb5bb71ac5a1290c91de0cddd8 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 LayoutObject again.
+ 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-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698