#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&, int tx, int ty);
virtual void layout();
virtual int computeReplacedLogicalWidth(bool includeMaxWidth = true) const;
virtual int computeReplacedLogicalHeight() const;
virtual int minimumReplacedHeight() const;
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