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/HTMLSourceElement.h | 42 ++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 17 deletions(-) (limited to 'Source/WebCore/html/HTMLSourceElement.h') diff --git a/Source/WebCore/html/HTMLSourceElement.h b/Source/WebCore/html/HTMLSourceElement.h index 492d1c2df..fdcdae5ae 100644 --- a/Source/WebCore/html/HTMLSourceElement.h +++ b/Source/WebCore/html/HTMLSourceElement.h @@ -10,10 +10,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 @@ -23,18 +23,18 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef HTMLSourceElement_h -#define HTMLSourceElement_h +#pragma once -#if ENABLE(VIDEO) #include "HTMLElement.h" +#include "MediaList.h" #include "Timer.h" namespace WebCore { -class HTMLSourceElement final : public HTMLElement { +class HTMLSourceElement final : public HTMLElement, public ActiveDOMObject { public: - static PassRefPtr create(const QualifiedName&, Document&); + static Ref create(Document&); + static Ref create(const QualifiedName&, Document&); String media() const; String type() const; @@ -45,21 +45,29 @@ public: void scheduleErrorEvent(); void cancelPendingErrorEvent(); + MediaQuerySet* mediaQuerySet() const { return m_mediaQuerySet.get(); } + private: HTMLSourceElement(const QualifiedName&, Document&); - virtual InsertionNotificationRequest insertedInto(ContainerNode&) override; - virtual void removedFrom(ContainerNode&) override; - virtual bool isURLAttribute(const Attribute&) const override; + InsertionNotificationRequest insertedInto(ContainerNode&) final; + void removedFrom(ContainerNode&) final; + bool isURLAttribute(const Attribute&) const final; - void errorEventTimerFired(Timer&); + // ActiveDOMObject. + const char* activeDOMObjectName() const final; + bool canSuspendForDocumentSuspension() const final; + void suspend(ReasonForSuspension) final; + void resume() final; + void stop() final; - Timer m_errorEventTimer; -}; + void parseAttribute(const QualifiedName&, const AtomicString&) final; -NODE_TYPE_CASTS(HTMLSourceElement) + void errorEventTimerFired(); -} //namespace + Timer m_errorEventTimer; + bool m_shouldRescheduleErrorEventOnResume { false }; + RefPtr m_mediaQuerySet; +}; -#endif -#endif +} // namespace WebCore -- cgit v1.2.1