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 d911c98bb50e6b5b22966e5e5128dac3fec68c64..447d606148c6458e350cbf95d487d5c4e38b08d1 100644 |
--- a/third_party/WebKit/Source/core/dom/Node.h |
+++ b/third_party/WebKit/Source/core/dom/Node.h |
@@ -91,6 +91,7 @@ class Text; |
class TouchEvent; |
const int nodeStyleChangeShift = 19; |
+const int nodeCustomElementShift = 21; |
enum StyleChangeType { |
NoStyleChange = 0, |
@@ -100,9 +101,13 @@ enum StyleChangeType { |
}; |
enum class CustomElementState { |
+ // https://dom.spec.whatwg.org/#concept-element-custom-element-state |
Uncustomized = 0, |
- Custom = 1, |
- Undefined = 2, |
+ Custom = 1 << nodeCustomElementShift, |
+ Undefined = 2 << nodeCustomElementShift, |
+ Failed = 3 << nodeCustomElementShift, |
+ |
+ NotDefinedFlag = 2 << nodeCustomElementShift, |
}; |
CORE_EXPORT std::ostream& operator<<(std::ostream&, CustomElementState); |
@@ -253,8 +258,7 @@ public: |
bool isFirstLetterPseudoElement() const { return getPseudoId() == PseudoIdFirstLetter; } |
virtual PseudoId getPseudoId() const { return PseudoIdNone; } |
- bool isCustomElement() const { return getFlag(CustomElementFlag); } |
- CustomElementState getCustomElementState() const; |
+ CustomElementState getCustomElementState() const { return static_cast<CustomElementState>(m_nodeFlags & CustomElementStateMask); } |
void setCustomElementState(CustomElementState); |
bool isV0CustomElement() const { return getFlag(V0CustomElementFlag); } |
enum V0CustomElementState { |
@@ -699,8 +703,7 @@ private: |
ChildNeedsStyleRecalcFlag = 1 << 18, |
StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift + 1), |
- CustomElementFlag = 1 << 21, |
- CustomElementCustomFlag = 1 << 22, |
+ CustomElementStateMask = 1 << nodeCustomElementShift | 1 << (nodeCustomElementShift + 1), |
dominicc (has gone to gerrit)
2016/07/26 05:47:42
Maybe 0x3 << nodeCustomElementShift is simpler to
|
HasNameOrIsEditingTextFlag = 1 << 23, |
HasWeakReferencesFlag = 1 << 24, |