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

Unified Diff: third_party/WebKit/Source/core/dom/custom/CustomElement.cpp

Issue 2242743002: Make custom elements work in HTML imports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test Created 4 years, 4 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/dom/custom/CustomElement.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
index f5d1b2084259d210e062bf6553be983a8d4a5af4..b1e824fc74fb7d3103b05e9bcbff9a9f7ad4ea28 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
@@ -24,9 +24,10 @@ CustomElementsRegistry* CustomElement::registry(const Element& element)
{
return registry(element.document());
}
+
CustomElementsRegistry* CustomElement::registry(const Document& document)
{
- if (LocalDOMWindow* window = document.domWindow())
+ if (LocalDOMWindow* window = const_cast<Document&>(document).executingWindow())
dominicc (has gone to gerrit) 2016/08/22 01:46:36 const cast :/
kochi 2016/08/22 07:37:34 Done :-)
return window->customElements();
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698