#ifndef RenderSVGViewportContainer_h
#define RenderSVGViewportContainer_h
#include "core/rendering/svg/RenderSVGContainer.h"
namespace WebCore {
class RenderSVGViewportContainer FINAL : public RenderSVGContainer {
public:
explicit RenderSVGViewportContainer(SVGElement*);
FloatRect viewport() const { return m_viewport; }
bool isLayoutSizeChanged() const { return m_isLayoutSizeChanged; }
virtual bool didTransformToRootUpdate() OVERRIDE { return m_didTransformToRootUpdate; }
virtual void determineIfLayoutSizeChanged() OVERRIDE;
virtual void setNeedsTransformUpdate() OVERRIDE { m_needsTransformUpdate = true; }
virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE;
private:
virtual bool isSVGViewportContainer() const OVERRIDE { return true; }
virtual const char* renderName() const OVERRIDE { return "RenderSVGViewportContainer"; }
AffineTransform viewportTransform() const;
virtual const AffineTransform& localToParentTransform() const OVERRIDE { return m_localToParentTransform; }
virtual void calcViewport() OVERRIDE;
virtual bool calculateLocalTransform() OVERRIDE;
virtual void applyViewportClip(PaintInfo&) OVERRIDE;
virtual bool pointIsInsideViewportClip(const FloatPoint& pointInParent) OVERRIDE;
FloatRect m_viewport;
mutable AffineTransform m_localToParentTransform;
bool m_didTransformToRootUpdate : 1;
bool m_isLayoutSizeChanged : 1;
bool m_needsTransformUpdate : 1;
};
DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGViewportContainer, isSVGViewportContainer());
}
#endif