cef/patch/patches/webkit_eventhandler_2288083...

16 lines
976 B
Diff

diff --git third_party/WebKit/Source/core/input/EventHandler.cpp third_party/WebKit/Source/core/input/EventHandler.cpp
index a91217a..954df59 100644
--- third_party/WebKit/Source/core/input/EventHandler.cpp
+++ third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -2272,6 +2272,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);