diff --git a/patch/patch.cfg b/patch/patch.cfg index a05e12911..a5c0e7221 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -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 a/patch/patches/webkit_eventhandler_2288083002.patch b/patch/patches/webkit_eventhandler_2288083002.patch new file mode 100644 index 000000000..020972a6f --- /dev/null +++ b/patch/patches/webkit_eventhandler_2288083002.patch @@ -0,0 +1,15 @@ +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); +