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

Unified Diff: Source/core/html/imports/HTMLImportChild.cpp

Issue 288323004: HTML Imports: Get rid of needsProcessOrStop() from dom/custom/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Renamed to isWaitingForCustomElementMicrosteps() Created 6 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 | « Source/core/html/imports/HTMLImportChild.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/imports/HTMLImportChild.cpp
diff --git a/Source/core/html/imports/HTMLImportChild.cpp b/Source/core/html/imports/HTMLImportChild.cpp
index 3b8cd484b5ae89f248b749ff2b194171cc7e7258..2c94060b2d63907f0dd0fc2099fe9e739a91b32d 100644
--- a/Source/core/html/imports/HTMLImportChild.cpp
+++ b/Source/core/html/imports/HTMLImportChild.cpp
@@ -206,9 +206,24 @@ void HTMLImportChild::shareLoader(HTMLImportChild* loader)
stateWillChange();
}
+bool HTMLImportChild::isWaitingForCustomElementMicrotaskSteps() const
+{
+ if (m_loader->microtaskQueue()->isEmpty())
+ return false;
+
+ size_t ignorableStepCount = 0;
+ for (HTMLImport* i = firstChild(); i; i = i->next()) {
+ HTMLImportChild* child = toHTMLImportChild(i);
+ if (child->hasMicrotaskStep() && !child->isSync())
+ ignorableStepCount++;
+ }
+
+ return ignorableStepCount < m_loader->microtaskQueue()->size();
dominicc (has gone to gerrit) 2014/05/23 00:29:25 Wrote a huge comment about this, but let me try an
+}
+
bool HTMLImportChild::isDone() const
{
- return m_loader && m_loader->isDone() && !m_loader->microtaskQueue()->needsProcessOrStop() && !m_customElementMicrotaskStep;
+ return m_loader && m_loader->isDone() && !isWaitingForCustomElementMicrotaskSteps() && !m_customElementMicrotaskStep;
}
bool HTMLImportChild::loaderHasError() const
« no previous file with comments | « Source/core/html/imports/HTMLImportChild.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698