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

Unified Diff: Source/core/html/HTMLElement.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.h ('k') | Source/core/page/ContextMenuController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLElement.cpp
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
index 59e0cba45f063250b31e2a2163e13c282a11bf59..8eb8c19b2410213c17b090ca9e38f3d5d6fed2ce 100644
--- a/Source/core/html/HTMLElement.cpp
+++ b/Source/core/html/HTMLElement.cpp
@@ -934,6 +934,13 @@ bool HTMLElement::isInteractiveContent() const
return false;
}
+HTMLMenuElement* HTMLElement::assignedContextMenu() const
+{
+ if (HTMLMenuElement* menu = contextMenu())
+ return menu;
+
+ return parentElement() && parentElement()->isHTMLElement() ? toHTMLElement(parentElement())->assignedContextMenu() : nullptr;
+}
HTMLMenuElement* HTMLElement::contextMenu() const
{
« no previous file with comments | « Source/core/html/HTMLElement.h ('k') | Source/core/page/ContextMenuController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698