| Index: Source/core/html/HTMLElement.cpp
|
| diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
|
| index 1a98cf035b19329dd366f97188a7a7072d8790bd..dd1059ed9fd093adaf18eb368d298a3e72da1a23 100644
|
| --- a/Source/core/html/HTMLElement.cpp
|
| +++ b/Source/core/html/HTMLElement.cpp
|
| @@ -46,6 +46,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"
|
| @@ -917,6 +918,17 @@ bool HTMLElement::isInteractiveContent() const
|
| return false;
|
| }
|
|
|
| +HTMLMenuElement* HTMLElement::menuElement() const
|
| +{
|
| + Element* element = treeScope().getElementById(fastGetAttribute(contextmenuAttr));
|
| + if (!element)
|
| + return 0;
|
| + if (!isHTMLMenuElement(*element))
|
| + return 0;
|
| +
|
| + return toHTMLMenuElement(element);
|
| +}
|
| +
|
| void HTMLElement::defaultEventHandler(Event* event)
|
| {
|
| if (event->type() == EventTypeNames::keypress && event->isKeyboardEvent()) {
|
|
|