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

Unified Diff: Source/core/page/ContextMenuController.cpp

Issue 721603002: If an element A has a parent element, then A's assigned context menu is the assigned context menu o… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed nits Created 6 years, 1 month 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 | « Source/core/html/HTMLElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/ContextMenuController.cpp
diff --git a/Source/core/page/ContextMenuController.cpp b/Source/core/page/ContextMenuController.cpp
index 9199bda2d53b79478cbb12a5066281964c2874df..dbc6ff736ad7376d093f5ede45dc24133d3da407 100644
--- a/Source/core/page/ContextMenuController.cpp
+++ b/Source/core/page/ContextMenuController.cpp
@@ -95,13 +95,13 @@ void ContextMenuController::populateCustomContextMenu(const Event& event)
return;
HTMLElement& element = toHTMLElement(*node);
- RefPtrWillBeRawPtr<HTMLMenuElement> menuElement = element.contextMenu();
+ RefPtrWillBeRawPtr<HTMLMenuElement> menuElement = element.assignedContextMenu();
if (!menuElement || !equalIgnoringCase(menuElement->fastGetAttribute(typeAttr), "popup"))
return;
RefPtrWillBeRawPtr<RelatedEvent> relatedEvent = RelatedEvent::create(EventTypeNames::show, true, true, node);
if (!menuElement->dispatchEvent(relatedEvent.release()))
return;
- if (menuElement != element.contextMenu())
+ if (menuElement != element.assignedContextMenu())
return;
m_menuProvider = CustomContextMenuProvider::create(*menuElement, element);
m_menuProvider->populateContextMenu(m_contextMenu.get());
« no previous file with comments | « Source/core/html/HTMLElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698