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

Unified Diff: third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h

Issue 2274883005: Fix ScriptCustomElementDefinition::createElementSync to use the given document (Closed)
Patch Set: Remove #if DCHECK_IS_ON() due to failure on CrOS 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/CustomElementDefinition.h
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
index 0bf974f57d4b278841c4f18eb7313547dce5ed41..bf64d975ed8eafca5035b4ee19ab73f9e68fcfbc 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
@@ -48,6 +48,7 @@ public:
return m_constructionStack;
}
+ HTMLElement* createElementForConstructor(Document&);
virtual HTMLElement* createElementSync(Document&, const QualifiedName&) = 0;
virtual HTMLElement* createElementSync(Document&, const QualifiedName&, ExceptionState&) = 0;
HTMLElement* createElementAsync(Document&, const QualifiedName&);
@@ -73,6 +74,18 @@ public:
void enqueueAttributeChangedCallback(Element*, const QualifiedName&,
const AtomicString& oldValue, const AtomicString& newValue);
+ class CORE_EXPORT ConstructionStackScope final {
+ STACK_ALLOCATED();
+ DISALLOW_COPY_AND_ASSIGN(ConstructionStackScope);
+ public:
+ ConstructionStackScope(CustomElementDefinition*, Element*);
+ ~ConstructionStackScope();
+
+ private:
+ ConstructionStack& m_constructionStack;
+ Member<Element> m_element;
+ size_t m_depth;
+ };
protected:
virtual bool runConstructor(Element*) = 0;

Powered by Google App Engine
This is Rietveld 408576698