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

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

Issue 23009004: Process Custom Elements in post-order. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing. Created 7 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
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/scripts/make_names.pl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 17776ecb050eb538526cb03c27d9101046ef558a..291c59c1f4725c23a310c014b5c4efa75c7e2ba9 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -2732,18 +2732,22 @@ void Node::setCustomElementState(CustomElementState newState)
ASSERT_NOT_REACHED(); // Everything starts in this state
return;
- case WaitingForUpgrade:
+ case WaitingForParser:
ASSERT(NotCustomElement == oldState);
break;
+ case WaitingForUpgrade:
+ ASSERT(NotCustomElement == oldState || WaitingForParser == oldState);
+ break;
+
case Upgraded:
- ASSERT(WaitingForUpgrade == oldState);
+ ASSERT(WaitingForParser == oldState || WaitingForUpgrade == oldState);
break;
}
ASSERT(isHTMLElement() || isSVGElement());
- setFlag(newState & 1, CustomElementWaitingForUpgrade);
- setFlag(newState & 2, CustomElementIsUpgraded);
+ setFlag(newState & 1, CustomElementWaitingForParserOrIsUpgraded);
+ setFlag(newState & 2, CustomElementWaitingForUpgradeOrIsUpgraded);
if (oldState == NotCustomElement || newState == Upgraded)
setNeedsStyleRecalc(); // :unresolved has changed
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/scripts/make_names.pl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698