Index: Source/core/html/HTMLElement.cpp |
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp |
index d5c9c754a92cbefc8fa757afb46179696f09b339..48df0625127387fc9663162326af60cbf997191a 100644 |
--- a/Source/core/html/HTMLElement.cpp |
+++ b/Source/core/html/HTMLElement.cpp |
@@ -48,6 +48,7 @@ |
#include "core/html/HTMLBRElement.h" |
#include "core/html/HTMLFormElement.h" |
#include "core/html/HTMLInputElement.h" |
+#include "core/html/HTMLMenuElement.h" |
#include "core/html/HTMLTemplateElement.h" |
#include "core/html/HTMLTextFormControlElement.h" |
#include "core/html/parser/HTMLParserIdioms.h" |
@@ -900,6 +901,12 @@ bool HTMLElement::isInteractiveContent() const |
return false; |
} |
+HTMLMenuElement* HTMLElement::menuElement() const |
+{ |
+ Element* element = treeScope().getElementById(fastGetAttribute(contextmenuAttr)); |
+ return isHTMLMenuElement(element) ? toHTMLMenuElement(element) : 0; |
+} |
+ |
void HTMLElement::defaultEventHandler(Event* event) |
{ |
if (event->type() == EventTypeNames::keypress && event->isKeyboardEvent()) { |