SVGRenderSupport.h [plain text]
#pragma once
#include "PaintInfo.h"
#include "RenderObject.h"
namespace WebCore {
class FloatPoint;
class FloatRect;
class ImageBuffer;
class LayoutRect;
class RenderBoxModelObject;
class RenderElement;
class RenderGeometryMap;
class RenderLayerModelObject;
class RenderStyle;
class RenderSVGRoot;
class TransformState;
class SVGRenderSupport {
public:
static void layoutDifferentRootIfNeeded(const RenderElement&);
static void layoutChildren(RenderElement&, bool selfNeedsLayout);
static bool isOverflowHidden(const RenderElement&);
static void intersectRepaintRectWithResources(const RenderElement&, FloatRect&);
static bool filtersForceContainerLayout(const RenderElement&);
static bool pointInClippingArea(const RenderElement&, const FloatPoint&);
static void computeContainerBoundingBoxes(const RenderElement& container, FloatRect& objectBoundingBox, bool& objectBoundingBoxValid, FloatRect& strokeBoundingBox, FloatRect& repaintBoundingBox);
static bool paintInfoIntersectsRepaintRect(const FloatRect& localRepaintRect, const AffineTransform& localTransform, const PaintInfo&);
static LayoutRect clippedOverflowRectForRepaint(const RenderElement&, const RenderLayerModelObject* repaintContainer);
static Optional<FloatRect> computeFloatVisibleRectInContainer(const RenderElement&, const FloatRect&, const RenderLayerModelObject* container, RenderObject::VisibleRectContext);
static const RenderElement& localToParentTransform(const RenderElement&, AffineTransform &);
static void mapLocalToContainer(const RenderElement&, const RenderLayerModelObject* repaintContainer, TransformState&, bool* wasFixed);
static const RenderElement* pushMappingToContainer(const RenderElement&, const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&);
static bool checkForSVGRepaintDuringLayout(const RenderElement&);
static void applyStrokeStyleToContext(GraphicsContext*, const RenderStyle&, const RenderElement&);
static bool transformToRootChanged(RenderElement*);
static void clipContextToCSSClippingArea(GraphicsContext&, const RenderElement& renderer);
static void styleChanged(RenderElement&, const RenderStyle*);
#if ENABLE(CSS_COMPOSITING)
static bool isolatesBlending(const RenderStyle&);
static void updateMaskedAncestorShouldIsolateBlending(const RenderElement&);
#endif
static RenderSVGRoot* findTreeRootObject(RenderElement&);
static const RenderSVGRoot* findTreeRootObject(const RenderElement&);
private:
SVGRenderSupport();
~SVGRenderSupport();
};
}