Commit 594fde70 authored by Marshall Greenblatt's avatar Marshall Greenblatt
Browse files

Fix debug assertion on right-click context menu.

parent 10c1fd6b
......@@ -256,4 +256,10 @@ patches = [
'name': 'storage_partition_1973',
'path': '../',
},
{
# Fix debug assertion on right-click context menu.
# https://codereview.chromium.org/2288083002
'name': 'webkit_eventhandler_2288083002',
'path': '../',
},
]
diff --git third_party/WebKit/Source/core/input/EventHandler.cpp third_party/WebKit/Source/core/input/EventHandler.cpp
index 9c49350..aa5e6a9 100644
--- third_party/WebKit/Source/core/input/EventHandler.cpp
+++ third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -2039,6 +2039,10 @@ WebInputEventResult EventHandler::sendContextMenuEvent(const PlatformMouseEvent&
LayoutPoint positionInContents = v->rootFrameToContents(event.position());
HitTestRequest request(HitTestRequest::Active);
MouseEventWithHitTestResults mev = m_frame->document()->prepareMouseEvent(request, positionInContents, event);
+ // Since |Document::prepareMouseEvent()| modifies layout tree for setting
+ // hover element, we need to update layout tree for requirement of
+ // |SelectionController::sendContextMenuEvent()|.
+ m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
selectionController().sendContextMenuEvent(mev, positionInContents);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment