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

Unified Diff: third_party/WebKit/Source/core/dom/Node.h

Issue 1982973002: Add CustomElementState for Custom Elements v1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix and UNREACHABLE -> NOTREACHED Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.h ('k') | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Node.h
diff --git a/third_party/WebKit/Source/core/dom/Node.h b/third_party/WebKit/Source/core/dom/Node.h
index 5fb0aff25e3854dfba43ce7faede77ded6adec5c..acd595fb9729ad9112a3489c70eeabbbe650027f 100644
--- a/third_party/WebKit/Source/core/dom/Node.h
+++ b/third_party/WebKit/Source/core/dom/Node.h
@@ -99,6 +99,14 @@ enum StyleChangeType {
NeedsReattachStyleChange = 3 << nodeStyleChangeShift,
};
+enum class CustomElementState {
+ Uncustomized = 0,
+ Custom = 1,
+ Undefined = 2,
+};
+
+CORE_EXPORT std::ostream& operator<<(std::ostream&, CustomElementState);
+
class NodeRareDataBase {
public:
LayoutObject* layoutObject() const { return m_layoutObject; }
@@ -244,6 +252,9 @@ public:
bool isFirstLetterPseudoElement() const { return getPseudoId() == PseudoIdFirstLetter; }
virtual PseudoId getPseudoId() const { return PseudoIdNone; }
+ bool isCustomElement() const { return getFlag(CustomElementFlag); }
+ CustomElementState getCustomElementState() const;
+ void setCustomElementState(CustomElementState);
bool isV0CustomElement() const { return getFlag(V0CustomElementFlag); }
enum V0CustomElementState {
V0NotCustomElement = 0,
@@ -713,8 +724,8 @@ private:
ChildNeedsStyleRecalcFlag = 1 << 18,
StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift + 1),
- V0CustomElementFlag = 1 << 21,
- V0CustomElementUpgradedFlag = 1 << 22,
+ CustomElementFlag = 1 << 21,
+ CustomElementCustomFlag = 1 << 22,
HasNameOrIsEditingTextFlag = 1 << 23,
HasWeakReferencesFlag = 1 << 24,
@@ -722,6 +733,9 @@ private:
HasEventTargetDataFlag = 1 << 26,
AlreadySpellCheckedFlag = 1 << 27,
+ V0CustomElementFlag = 1 << 28,
+ V0CustomElementUpgradedFlag = 1 << 29,
+
DefaultNodeFlags = IsFinishedParsingChildrenFlag | NeedsReattachStyleChange
};
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.h ('k') | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698