Index: third_party/WebKit/Source/core/html/HTMLElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLElement.cpp b/third_party/WebKit/Source/core/html/HTMLElement.cpp |
index 2eb5239b509dbdaf0e992c8e5f74f9e114f405f5..59365c051568e9f0598e3eb861b6a69a00df2188 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLElement.cpp |
@@ -57,7 +57,6 @@ |
#include "core/html/HTMLDimension.h" |
#include "core/html/HTMLFormElement.h" |
#include "core/html/HTMLInputElement.h" |
-#include "core/html/HTMLMenuElement.h" |
#include "core/html/HTMLTemplateElement.h" |
#include "core/html/parser/HTMLParserIdioms.h" |
#include "core/layout/LayoutBoxModelObject.h" |
@@ -1067,49 +1066,6 @@ 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 { |
- const AtomicString& context_menu_id(FastGetAttribute(contextmenuAttr)); |
- if (context_menu_id.IsNull()) |
- return nullptr; |
- |
- Element* element = GetTreeScope().getElementById(context_menu_id); |
- // Not checking if the menu element is of type "popup". |
- // Ignoring menu element type attribute is intentional according to the |
- // standard. |
- return isHTMLMenuElement(element) ? toHTMLMenuElement(element) : nullptr; |
-} |
- |
-void HTMLElement::setContextMenu(HTMLMenuElement* context_menu) { |
- if (!context_menu) { |
- setAttribute(contextmenuAttr, ""); |
- return; |
- } |
- |
- // http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#reflecting-content-attributes-in-idl-attributes |
- // On setting, if the given element has an id attribute, and has the same home |
- // subtree as the element of the attribute being set, and the given element is |
- // the first element in that home subtree whose ID is the value of that id |
- // attribute, then the content attribute must be set to the value of that id |
- // attribute. Otherwise, the content attribute must be set to the empty |
- // string. |
- const AtomicString& context_menu_id(context_menu->FastGetAttribute(idAttr)); |
- |
- if (!context_menu_id.IsNull() && |
- context_menu == GetTreeScope().getElementById(context_menu_id)) |
- setAttribute(contextmenuAttr, context_menu_id); |
- else |
- setAttribute(contextmenuAttr, ""); |
-} |
- |
void HTMLElement::DefaultEventHandler(Event* event) { |
if (event->type() == EventTypeNames::keypress && event->IsKeyboardEvent()) { |
HandleKeypressEvent(ToKeyboardEvent(event)); |