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

Unified Diff: third_party/WebKit/Source/core/html/HTMLElement.cpp

Issue 1885453002: Rename Node::treeScope() to Node::treeScopeOrDocument() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 months 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
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 fd68fa31ba72fa0ed183a71a9b33b27b5f67b11e..109d11ae0a12ef73484586fb6398a6e4c1abb1f1 100644
--- a/third_party/WebKit/Source/core/html/HTMLElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLElement.cpp
@@ -954,7 +954,7 @@ HTMLMenuElement* HTMLElement::contextMenu() const
if (contextMenuId.isNull())
return nullptr;
- Element* element = treeScope().getElementById(contextMenuId);
+ Element* element = treeScopeOrDocument().getElementById(contextMenuId);
// 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;
@@ -975,7 +975,7 @@ void HTMLElement::setContextMenu(HTMLMenuElement* contextMenu)
// Otherwise, the content attribute must be set to the empty string.
const AtomicString& contextMenuId(contextMenu->fastGetAttribute(idAttr));
- if (!contextMenuId.isNull() && contextMenu == treeScope().getElementById(contextMenuId))
+ if (!contextMenuId.isNull() && contextMenu == treeScopeOrDocument().getElementById(contextMenuId))
setAttribute(contextmenuAttr, contextMenuId);
else
setAttribute(contextmenuAttr, "");

Powered by Google App Engine
This is Rietveld 408576698