diff options
Diffstat (limited to 'Source/WebCore/rendering/RenderVideo.h')
-rw-r--r-- | Source/WebCore/rendering/RenderVideo.h | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/Source/WebCore/rendering/RenderVideo.h b/Source/WebCore/rendering/RenderVideo.h index 164305424..f82e79dc0 100644 --- a/Source/WebCore/rendering/RenderVideo.h +++ b/Source/WebCore/rendering/RenderVideo.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,78 +23,78 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef RenderVideo_h -#define RenderVideo_h +#pragma once #if ENABLE(VIDEO) +#include "HTMLVideoElement.h" #include "RenderMedia.h" namespace WebCore { -class HTMLVideoElement; - class RenderVideo final : public RenderMedia { public: - RenderVideo(HTMLVideoElement&, PassRef<RenderStyle>); + RenderVideo(HTMLVideoElement&, RenderStyle&&); virtual ~RenderVideo(); HTMLVideoElement& videoElement() const; - IntRect videoBox() const; + WEBCORE_EXPORT IntRect videoBox() const; static IntSize defaultSize(); -#if USE(ACCELERATED_COMPOSITING) bool supportsAcceleratedRendering() const; void acceleratedRenderingStateChanged(); -#endif bool requiresImmediateCompositing() const; - virtual bool shouldDisplayVideo() const; + bool shouldDisplayVideo() const; + + void updateFromElement() final; private: + void willBeDestroyed() override; void mediaElement() const = delete; - virtual void updateFromElement(); - - virtual void intrinsicSizeChanged(); + void intrinsicSizeChanged() final; LayoutSize calculateIntrinsicSize(); - void updateIntrinsicSize(); + bool updateIntrinsicSize(); - virtual void imageChanged(WrappedImagePtr, const IntRect*); + void imageChanged(WrappedImagePtr, const IntRect*) final; - virtual const char* renderName() const { return "RenderVideo"; } + const char* renderName() const final { return "RenderVideo"; } - virtual bool requiresLayer() const { return true; } - virtual bool isVideo() const { return true; } + bool requiresLayer() const final { return true; } + bool isVideo() const final { return true; } - virtual void paintReplaced(PaintInfo&, const LayoutPoint&); + void paintReplaced(PaintInfo&, const LayoutPoint&) final; - virtual void layout(); + void layout() final; - virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = ComputeActual) const override; - virtual LayoutUnit computeReplacedLogicalHeight() const; - virtual LayoutUnit minimumReplacedHeight() const override; + LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = ComputeActual) const final; + LayoutUnit minimumReplacedHeight() const final; #if ENABLE(FULLSCREEN_API) - virtual LayoutUnit offsetLeft() const; - virtual LayoutUnit offsetTop() const; - virtual LayoutUnit offsetWidth() const; - virtual LayoutUnit offsetHeight() const; + LayoutUnit offsetLeft() const final; + LayoutUnit offsetTop() const final; + LayoutUnit offsetWidth() const final; + LayoutUnit offsetHeight() const final; #endif void updatePlayer(); - virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, unsigned maxDepthToTest) const override; + bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, unsigned maxDepthToTest) const final; LayoutSize m_cachedImageSize; }; -RENDER_OBJECT_TYPE_CASTS(RenderVideo, isVideo()); +inline RenderVideo* HTMLVideoElement::renderer() const +{ + return downcast<RenderVideo>(HTMLMediaElement::renderer()); +} } // namespace WebCore -#endif -#endif // RenderVideo_h +SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderVideo, isVideo()) + +#endif // ENABLE(VIDEO) |