diff options
Diffstat (limited to 'Source/WebCore/html/HTMLSourceElement.h')
-rw-r--r-- | Source/WebCore/html/HTMLSourceElement.h | 42 |
1 files changed, 25 insertions, 17 deletions
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<HTMLSourceElement> create(const QualifiedName&, Document&); + static Ref<HTMLSourceElement> create(Document&); + static Ref<HTMLSourceElement> 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<HTMLSourceElement>&); + // ActiveDOMObject. + const char* activeDOMObjectName() const final; + bool canSuspendForDocumentSuspension() const final; + void suspend(ReasonForSuspension) final; + void resume() final; + void stop() final; - Timer<HTMLSourceElement> m_errorEventTimer; -}; + void parseAttribute(const QualifiedName&, const AtomicString&) final; -NODE_TYPE_CASTS(HTMLSourceElement) + void errorEventTimerFired(); -} //namespace + Timer m_errorEventTimer; + bool m_shouldRescheduleErrorEventOnResume { false }; + RefPtr<MediaQuerySet> m_mediaQuerySet; +}; -#endif -#endif +} // namespace WebCore |