From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/html/MediaDocument.h | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'Source/WebCore/html/MediaDocument.h') diff --git a/Source/WebCore/html/MediaDocument.h b/Source/WebCore/html/MediaDocument.h index 3e3474719..5a863aed8 100644 --- a/Source/WebCore/html/MediaDocument.h +++ b/Source/WebCore/html/MediaDocument.h @@ -23,8 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef MediaDocument_h -#define MediaDocument_h +#pragma once #if ENABLE(VIDEO) @@ -34,32 +33,34 @@ namespace WebCore { class MediaDocument final : public HTMLDocument { public: - static PassRefPtr create(Frame* frame, const URL& url) + static Ref create(Frame* frame, const URL& url) { - return adoptRef(new MediaDocument(frame, url)); + return adoptRef(*new MediaDocument(frame, url)); } virtual ~MediaDocument(); void mediaElementSawUnsupportedTracks(); + void mediaElementNaturalSizeChanged(const IntSize&); + String outgoingReferrer() const { return m_outgoingReferrer; } private: MediaDocument(Frame*, const URL&); - virtual PassRefPtr createParser() override; + Ref createParser() override; - virtual void defaultEventHandler(Event*) override; + void defaultEventHandler(Event&) override; - void replaceMediaElementTimerFired(Timer&); + void replaceMediaElementTimerFired(); - Timer m_replaceMediaElementTimer; + Timer m_replaceMediaElementTimer; + String m_outgoingReferrer; }; -inline bool isMediaDocument(const Document& document) { return document.isMediaDocument(); } -void isMediaDocument(const MediaDocument&); // Catch unnecessary runtime check of type known at compile time. +} // namespace WebCore -DOCUMENT_TYPE_CASTS(MediaDocument) +SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::MediaDocument) + static bool isType(const WebCore::Document& document) { return document.isMediaDocument(); } + static bool isType(const WebCore::Node& node) { return is(node) && isType(downcast(node)); } +SPECIALIZE_TYPE_TRAITS_END() -} - -#endif -#endif +#endif // ENABLE(VIDEO) -- cgit v1.2.1