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

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

Issue 69533003: Upgrade parser-created Custom Elements in creation order. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bring patch to head. Created 7 years, 1 month 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 | « Source/core/dom/Element.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.h
diff --git a/Source/core/dom/Node.h b/Source/core/dom/Node.h
index ce640b4aed7c0107c9099dcd0517d0ac70177769..2dfea7df1abccd3ac2782d12ef5f8db1045f395a 100644
--- a/Source/core/dom/Node.h
+++ b/Source/core/dom/Node.h
@@ -231,14 +231,18 @@ public:
bool isAfterPseudoElement() const { return pseudoId() == AFTER; }
PseudoId pseudoId() const { return (isElementNode() && hasCustomStyleCallbacks()) ? customPseudoId() : NOPSEUDO; }
+ bool isCustomElement() const { return getFlag(CustomElement); }
enum CustomElementState {
- NotCustomElement,
- WaitingForParser,
- WaitingForUpgrade,
- Upgraded
+ NotCustomElement = 0,
+ WaitingForUpgrade = 1 << 0,
+ Upgraded = 1 << 1
};
- bool isCustomElement() const { return customElementState() != NotCustomElement; }
- CustomElementState customElementState() const { return CustomElementState((getFlag(CustomElementWaitingForParserOrIsUpgraded) ? 1 : 0) | (getFlag(CustomElementWaitingForUpgradeOrIsUpgraded) ? 2 : 0)); }
+ CustomElementState customElementState() const
+ {
+ return isCustomElement()
+ ? (getFlag(CustomElementUpgraded) ? Upgraded : WaitingForUpgrade)
+ : NotCustomElement;
+ }
void setCustomElementState(CustomElementState newState);
virtual bool isMediaControlElement() const { return false; }
@@ -738,8 +742,8 @@ private:
NotifyRendererWithIdenticalStyles = 1 << 26,
- CustomElementWaitingForParserOrIsUpgraded = 1 << 27,
- CustomElementWaitingForUpgradeOrIsUpgraded = 1 << 28,
+ CustomElement = 1 << 27,
+ CustomElementUpgraded = 1 << 28,
AlreadySpellCheckedFlag = 1 << 29,
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698