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

Unified Diff: Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp

Issue 238923009: HTML Imports: No more BlockingDocumentCreation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased to ToT. Created 6 years, 8 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/CustomElementMicrotaskDispatcher.cpp
diff --git a/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp b/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp
index 5337da3359835fb8512eaecab54cf2cf28eed2b5..8b563938daff647e81db26a8d50fd9d20163382f 100644
--- a/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp
+++ b/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp
@@ -9,8 +9,9 @@
#include "core/dom/custom/CustomElementCallbackDispatcher.h"
#include "core/dom/custom/CustomElementCallbackQueue.h"
#include "core/dom/custom/CustomElementMicrotaskImportStep.h"
+#include "core/dom/custom/CustomElementMicrotaskQueue.h"
#include "core/dom/custom/CustomElementScheduler.h"
-#include "core/html/imports/HTMLImport.h"
+#include "core/html/imports/HTMLImportLoader.h"
#include "wtf/MainThread.h"
namespace WebCore {
@@ -20,6 +21,7 @@ static const CustomElementCallbackQueue::ElementQueueId kMicrotaskQueueId = 0;
CustomElementMicrotaskDispatcher::CustomElementMicrotaskDispatcher()
: m_hasScheduledMicrotask(false)
, m_phase(Quiescent)
+ , m_resolutionAndImports(CustomElementMicrotaskQueue::create())
{
}
@@ -29,14 +31,14 @@ CustomElementMicrotaskDispatcher& CustomElementMicrotaskDispatcher::instance()
return instance;
}
-void CustomElementMicrotaskDispatcher::enqueue(HTMLImport* import, PassOwnPtr<CustomElementMicrotaskStep> step)
+void CustomElementMicrotaskDispatcher::enqueue(HTMLImportLoader* importLoader, PassOwnPtr<CustomElementMicrotaskStep> step)
{
ASSERT(m_phase == Quiescent || m_phase == DispatchingCallbacks);
ensureMicrotaskScheduled();
- if (import && import->customElementMicrotaskStep())
- import->customElementMicrotaskStep()->enqueue(step);
+ if (importLoader)
+ importLoader->microtaskQueue()->enqueue(step);
else
- m_resolutionAndImports.enqueue(step);
+ m_resolutionAndImports->enqueue(step);
}
void CustomElementMicrotaskDispatcher::enqueue(CustomElementCallbackQueue* queue)
@@ -79,7 +81,7 @@ void CustomElementMicrotaskDispatcher::doDispatch()
ASSERT_WITH_SECURITY_IMPLICATION(!CustomElementCallbackDispatcher::inCallbackDeliveryScope());
m_phase = Resolving;
- m_resolutionAndImports.dispatch();
+ m_resolutionAndImports->dispatch();
m_phase = DispatchingCallbacks;
for (Vector<CustomElementCallbackQueue*>::iterator it = m_elements.begin();it != m_elements.end(); ++it) {
« no previous file with comments | « Source/core/dom/custom/CustomElementMicrotaskDispatcher.h ('k') | Source/core/dom/custom/CustomElementMicrotaskImportStep.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698