#ifndef RenderVideo_h
#define RenderVideo_h
#if ENABLE(VIDEO)
#include "RenderMedia.h"
namespace WebCore {
class HTMLMediaElement;
class HTMLVideoElement;
class RenderVideo : public RenderMedia {
public:
RenderVideo(HTMLVideoElement*);
virtual ~RenderVideo();
IntRect videoBox() const;
static IntSize defaultSize();
#if USE(ACCELERATED_COMPOSITING)
bool supportsAcceleratedRendering() const;
void acceleratedRenderingStateChanged();
#endif
virtual bool shouldDisplayVideo() const;
private:
virtual void updateFromElement();
inline HTMLVideoElement* videoElement() const;
virtual void intrinsicSizeChanged();
IntSize calculateIntrinsicSize();
void updateIntrinsicSize();
virtual void imageChanged(WrappedImagePtr, const IntRect*);
virtual const char* renderName() const { return "RenderVideo"; }
virtual bool requiresLayer() const { return true; }
virtual bool isVideo() const { return true; }
virtual void paintReplaced(PaintInfo&, const LayoutPoint&);
virtual void layout();
virtual LayoutUnit computeReplacedLogicalWidth(bool includeMaxWidth = true) const;
virtual LayoutUnit computeReplacedLogicalHeight() const;
virtual int minimumReplacedHeight() const;
#if ENABLE(FULLSCREEN_API)
virtual LayoutUnit offsetLeft() const;
virtual LayoutUnit offsetTop() const;
virtual LayoutUnit offsetWidth() const;
virtual LayoutUnit offsetHeight() const;
#endif
void updatePlayer();
IntSize m_cachedImageSize;
};
inline RenderVideo* toRenderVideo(RenderObject* object)
{
ASSERT(!object || object->isVideo());
return static_cast<RenderVideo*>(object);
}
void toRenderVideo(const RenderVideo*);
}
#endif
#endif // RenderVideo_h