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

Unified Diff: Source/core/dom/custom/CustomElementMicrotaskImportStep.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
Index: Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp
diff --git a/Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp b/Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp
index 39f6bd2a10d7da687751409d43a631b23e0c67df..ee0fc1b827c7b6123b980e6ee9ac71930562829c 100644
--- a/Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp
+++ b/Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp
@@ -66,7 +66,7 @@ bool CustomElementMicrotaskImportStep::shouldWaitForImport() const
return m_import && !m_import->isLoaded();
}
-bool CustomElementMicrotaskImportStep::shouldStopProcessing() const
+bool CustomElementMicrotaskImportStep::isSync() const
dominicc (has gone to gerrit) 2014/05/27 23:41:25 It looks like this is only used during that initia
Hajime Morrita 2014/05/28 00:41:37 Probably that's better. Will do.
{
return m_import && m_import->isSync();
}
@@ -80,26 +80,18 @@ void CustomElementMicrotaskImportStep::didUpgradeAllCustomElements()
CustomElementMicrotaskStep::Result CustomElementMicrotaskImportStep::process()
{
- Result result = m_queue->dispatch();
- if (!(result & ShouldStop) && !shouldWaitForImport())
- didUpgradeAllCustomElements();
+ m_queue->dispatch();
+ if (!m_queue->isEmpty() || shouldWaitForImport())
+ return Processing;
- if (shouldWaitForImport())
- result = Result(result | ShouldRemain | ShouldStop);
- if (!shouldStopProcessing())
- result = Result(result & ~ShouldStop);
- return result;
-}
-
-bool CustomElementMicrotaskImportStep::needsProcessOrStop() const
-{
- return shouldStopProcessing() || m_queue->needsProcessOrStop();
+ didUpgradeAllCustomElements();
+ return FinishedProcessing;
}
#if !defined(NDEBUG)
void CustomElementMicrotaskImportStep::show(unsigned indent)
{
- fprintf(stderr, "%*sImport(wait=%d sync=%d, url=%s)\n", indent, "", shouldWaitForImport(), shouldStopProcessing(), m_import ? m_import->url().string().utf8().data() : "null");
+ fprintf(stderr, "%*sImport(wait=%d sync=%d, url=%s)\n", indent, "", shouldWaitForImport(), m_import && m_import->isSync(), m_import ? m_import->url().string().utf8().data() : "null");
m_queue->show(indent + 1);
}
#endif

Powered by Google App Engine
This is Rietveld 408576698