diff options
Diffstat (limited to 'Source/WebCore/dom/DocumentEventQueue.h')
-rw-r--r-- | Source/WebCore/dom/DocumentEventQueue.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/Source/WebCore/dom/DocumentEventQueue.h b/Source/WebCore/dom/DocumentEventQueue.h index 3ac05e4f4..973b0d136 100644 --- a/Source/WebCore/dom/DocumentEventQueue.h +++ b/Source/WebCore/dom/DocumentEventQueue.h @@ -11,10 +11,10 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -25,13 +25,12 @@ * */ -#ifndef DocumentEventQueue_h -#define DocumentEventQueue_h +#pragma once #include "EventQueue.h" +#include <memory> #include <wtf/HashSet.h> #include <wtf/ListHashSet.h> -#include <wtf/OwnPtr.h> namespace WebCore { @@ -44,9 +43,9 @@ public: explicit DocumentEventQueue(Document&); virtual ~DocumentEventQueue(); - virtual bool enqueueEvent(PassRefPtr<Event>) override; - virtual bool cancelEvent(Event&) override; - virtual void close() override; + bool enqueueEvent(Ref<Event>&&) override; + bool cancelEvent(Event&) override; + void close() override; void enqueueOrDispatchScrollEvent(Node&); @@ -57,12 +56,10 @@ private: class Timer; Document& m_document; - OwnPtr<Timer> m_pendingEventTimer; - ListHashSet<RefPtr<Event>, 16> m_queuedEvents; + std::unique_ptr<Timer> m_pendingEventTimer; + ListHashSet<RefPtr<Event>> m_queuedEvents; HashSet<Node*> m_nodesWithQueuedScrollEvents; bool m_isClosed; }; -} - -#endif // DocumentEventQueue_h +} // namespace WebCore |