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

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: 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..fbae2f753eade85963070831e2ffd805d0ce2fcb 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::isWaitingCustomElementMicrotaskSteps() const
dglazkov 2014/05/16 16:10:49 "is waiting on" or "is waiting for" might feel a t
+{
+ 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();
+}
+
bool HTMLImportChild::isDone() const
{
- return m_loader && m_loader->isDone() && !m_loader->microtaskQueue()->needsProcessOrStop() && !m_customElementMicrotaskStep;
+ return m_loader && m_loader->isDone() && !isWaitingCustomElementMicrotaskSteps() && !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