summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackDispatcher.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackDispatcher.h')
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackDispatcher.h28
1 files changed, 8 insertions, 20 deletions
diff --git a/chromium/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackDispatcher.h b/chromium/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackDispatcher.h
index 179219110c1..3e505c80600 100644
--- a/chromium/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackDispatcher.h
+++ b/chromium/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackDispatcher.h
@@ -31,19 +31,18 @@
#ifndef CustomElementCallbackDispatcher_h
#define CustomElementCallbackDispatcher_h
-#include "core/dom/custom/CustomElementBaseElementQueue.h"
+#include "core/dom/custom/CustomElementCallbackQueue.h"
#include "wtf/Vector.h"
namespace WebCore {
-class CustomElementCallbackQueue;
-class CustomElementCallbackScheduler;
+class CustomElementScheduler;
+// FIXME: Rename this CustomElementProcessingStack. It only handles
+// the processing stack.
class CustomElementCallbackDispatcher {
WTF_MAKE_NONCOPYABLE(CustomElementCallbackDispatcher);
public:
- static CustomElementCallbackDispatcher& instance();
-
// This is stack allocated in many DOM callbacks. Make it cheap.
class CallbackDeliveryScope {
public:
@@ -64,13 +63,11 @@ public:
size_t m_savedElementQueueStart;
};
- // Returns true if more work may have to be performed at the
- // checkpoint by this or other workers (for example, this work
- // invoked author scripts)
- bool dispatch();
+ static bool inCallbackDeliveryScope() { return s_elementQueueStart; }
protected:
- friend class CustomElementCallbackScheduler;
+ friend class CustomElementScheduler;
+ static CustomElementCallbackDispatcher& instance();
void enqueue(CustomElementCallbackQueue*);
private:
@@ -95,20 +92,11 @@ private:
// stack. A cache of instance().m_flattenedProcessingStack.size().
static size_t s_elementQueueEnd;
- static bool inCallbackDeliveryScope() { return s_elementQueueStart; }
-
- typedef int ElementQueue;
- static ElementQueue baseElementQueue() { return ElementQueue(0); }
- static ElementQueue currentElementQueue() { return ElementQueue(s_elementQueueStart); }
+ static CustomElementCallbackQueue::ElementQueueId currentElementQueue() { return CustomElementCallbackQueue::ElementQueueId(s_elementQueueStart); }
static void processElementQueueAndPop();
void processElementQueueAndPop(size_t start, size_t end);
- // The base element queue, used when no CallbackDeliveryScope is
- // active. Callbacks for elements created by the parser are
- // enqueued here.
- CustomElementBaseElementQueue m_baseElementQueue;
-
// The processing stack, flattened. Element queues lower in the
// stack appear toward the head of the vector. The first element
// is a null sentinel value.