Chromium Code Reviews| 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 |