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

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

Issue 2274883005: Fix ScriptCustomElementDefinition::createElementSync to use the given document (Closed)
Patch Set: Fix typo in comment 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..a33c68e7e1a523901fe048b54b53cc9f24e4263f 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 {
kochi 2016/08/25 08:18:11 ScopedConstructionStack? (I don't have strong opin
kojii 2016/08/25 09:01:17 We have CEReactionsScope, if not strong, allow me
kochi 2016/08/25 09:12:19 Acknowledged.
+ STACK_ALLOCATED();
+ WTF_MAKE_NONCOPYABLE(ConstructionStackScope);
tkent 2016/08/25 09:03:35 nit: Let's use DISALLOW_COPY_AND_ASSIGN(Constructi
+ public:
+ ConstructionStackScope(CustomElementDefinition*, Element*);
+ ~ConstructionStackScope();
+
+ private:
+ ConstructionStack& m_constructionStack;
+ Member<Element> m_element;
+ size_t m_depth;
kochi 2016/08/25 08:18:11 Looks like m_element and m_depth are only used for
kojii 2016/08/25 09:01:17 Done.
+ };
protected:
virtual bool runConstructor(Element*) = 0;

Powered by Google App Engine
This is Rietveld 408576698