RenderSVGContainer.h [plain text]
#pragma once
#include "RenderSVGModelObject.h"
namespace WebCore {
class SVGElement;
class RenderSVGContainer : public RenderSVGModelObject {
public:
virtual ~RenderSVGContainer();
void paint(PaintInfo&, const LayoutPoint&) override;
void setNeedsBoundariesUpdate() final { m_needsBoundariesUpdate = true; }
bool needsBoundariesUpdate() final { return m_needsBoundariesUpdate; }
virtual bool didTransformToRootUpdate() { return false; }
bool isObjectBoundingBoxValid() const { return m_objectBoundingBoxValid; }
protected:
RenderSVGContainer(SVGElement&, RenderStyle&&);
const char* renderName() const override { return "RenderSVGContainer"; }
bool canHaveChildren() const final { return true; }
void layout() override;
void addChild(RenderObject* child, RenderObject* beforeChild = 0) final;
void removeChild(RenderObject&) final;
void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) final;
FloatRect objectBoundingBox() const final { return m_objectBoundingBox; }
FloatRect strokeBoundingBox() const final { return m_strokeBoundingBox; }
FloatRect repaintRectInLocalCoordinates() const final { return m_repaintBoundingBox; }
bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction) override;
virtual bool calculateLocalTransform() { return false; }
virtual void calcViewport() { }
virtual void applyViewportClip(PaintInfo&) { }
virtual bool pointIsInsideViewportClip(const FloatPoint& ) { return true; }
virtual void determineIfLayoutSizeChanged() { }
bool selfWillPaint();
void updateCachedBoundaries();
private:
bool isSVGContainer() const final { return true; }
FloatRect m_objectBoundingBox;
bool m_objectBoundingBoxValid;
FloatRect m_strokeBoundingBox;
FloatRect m_repaintBoundingBox;
bool m_needsBoundariesUpdate : 1;
};
}
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderSVGContainer, isSVGContainer())