#ifndef RenderVideo_h
#define RenderVideo_h
#include "core/rendering/RenderMedia.h"
namespace WebCore {
class HTMLMediaElement;
class HTMLVideoElement;
class RenderVideo FINAL : public RenderMedia {
public:
RenderVideo(HTMLVideoElement*);
virtual ~RenderVideo();
IntRect videoBox() const;
static IntSize defaultSize();
bool supportsAcceleratedRendering() const;
bool shouldDisplayVideo() const;
private:
virtual void updateFromElement() OVERRIDE;
inline HTMLVideoElement* videoElement() const;
virtual void intrinsicSizeChanged() OVERRIDE;
LayoutSize calculateIntrinsicSize();
void updateIntrinsicSize();
virtual void imageChanged(WrappedImagePtr, const IntRect*) OVERRIDE;
virtual const char* renderName() const OVERRIDE { return "RenderVideo"; }
virtual LayerType layerTypeRequired() const OVERRIDE { return NormalLayer; }
virtual bool isVideo() const OVERRIDE { return true; }
virtual void paintReplaced(PaintInfo&, const LayoutPoint&) OVERRIDE;
virtual void layout() OVERRIDE;
virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = ComputeActual) const OVERRIDE;
virtual LayoutUnit computeReplacedLogicalHeight() const OVERRIDE;
virtual LayoutUnit minimumReplacedHeight() const OVERRIDE;
virtual LayoutUnit offsetLeft() const OVERRIDE;
virtual LayoutUnit offsetTop() const OVERRIDE;
virtual LayoutUnit offsetWidth() const OVERRIDE;
virtual LayoutUnit offsetHeight() const OVERRIDE;
virtual CompositingReasons additionalCompositingReasons(CompositingTriggerFlags) const OVERRIDE;
void updatePlayer();
bool acceleratedRenderingInUse();
LayoutSize m_cachedImageSize;
};
DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderVideo, isVideo());
}
#endif