diff options
Diffstat (limited to 'Source/WebCore/rendering/RenderMedia.h')
-rw-r--r-- | Source/WebCore/rendering/RenderMedia.h | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/Source/WebCore/rendering/RenderMedia.h b/Source/WebCore/rendering/RenderMedia.h index 8ef887ed9..7c5cfdadd 100644 --- a/Source/WebCore/rendering/RenderMedia.h +++ b/Source/WebCore/rendering/RenderMedia.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,8 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef RenderMedia_h -#define RenderMedia_h +#pragma once #if ENABLE(VIDEO) @@ -35,32 +34,36 @@ namespace WebCore { class RenderMedia : public RenderImage { public: - RenderMedia(HTMLMediaElement&, PassRef<RenderStyle>); - RenderMedia(HTMLMediaElement&, PassRef<RenderStyle>, const IntSize& intrinsicSize); + RenderMedia(HTMLMediaElement&, RenderStyle&&); + RenderMedia(HTMLMediaElement&, RenderStyle&&, const IntSize& intrinsicSize); virtual ~RenderMedia(); - HTMLMediaElement& mediaElement() const { return toHTMLMediaElement(nodeForNonAnonymous()); } + HTMLMediaElement& mediaElement() const { return downcast<HTMLMediaElement>(nodeForNonAnonymous()); } protected: - virtual void layout(); + void layout() override; private: void element() const = delete; - virtual bool canHaveChildren() const override final { return true; } + bool canHaveChildren() const final { return true; } - virtual const char* renderName() const override { return "RenderMedia"; } - virtual bool isMedia() const override final { return true; } - virtual bool isImage() const override final { return false; } - virtual void paintReplaced(PaintInfo&, const LayoutPoint&) override; + const char* renderName() const override { return "RenderMedia"; } + bool isMedia() const final { return true; } + bool isImage() const final { return false; } + void paintReplaced(PaintInfo&, const LayoutPoint&) override; - virtual bool requiresForcedStyleRecalcPropagation() const override final { return true; } + bool shadowControlsNeedCustomLayoutMetrics() const override { return true; } + void styleDidChange(StyleDifference, const RenderStyle* oldStyle) final; }; -RENDER_OBJECT_TYPE_CASTS(RenderMedia, isMedia()) +inline RenderMedia* HTMLMediaElement::renderer() const +{ + return downcast<RenderMedia>(HTMLElement::renderer()); +} } // namespace WebCore -#endif +SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMedia, isMedia()) -#endif // RenderMedia_h +#endif // ENABLE(VIDEO) |