This source file includes following definitions.
- isChildAllowed
- clippedOverflowRectForRepaint
- computeFloatRectForRepaint
- mapLocalToContainer
- pushMappingToContainer
- absoluteRects
- absoluteQuads
- willBeDestroyed
- computeLayerHitTestRects
- addLayerHitTestRects
- styleDidChange
- nodeAtPoint
- absoluteFocusRingQuads
#include "config.h"
#include "core/rendering/svg/RenderSVGModelObject.h"
#include "SVGNames.h"
#include "core/rendering/svg/RenderSVGRoot.h"
#include "core/rendering/svg/SVGResourcesCache.h"
#include "core/svg/SVGGraphicsElement.h"
namespace WebCore {
RenderSVGModelObject::RenderSVGModelObject(SVGElement* node)
: RenderObject(node)
{
}
bool RenderSVGModelObject::isChildAllowed(RenderObject* child, RenderStyle*) const
{
return child->isSVG() && !(child->isSVGInline() || child->isSVGInlineText());
}
LayoutRect RenderSVGModelObject::clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const
{
return SVGRenderSupport::clippedOverflowRectForRepaint(this, repaintContainer);
}
void RenderSVGModelObject::computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect& repaintRect, bool fixed) const
{
SVGRenderSupport::computeFloatRectForRepaint(this, repaintContainer, repaintRect, fixed);
}
void RenderSVGModelObject::mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState& transformState, MapCoordinatesFlags, bool* wasFixed) const
{
SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState, wasFixed);
}
const RenderObject* RenderSVGModelObject::pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const
{
return SVGRenderSupport::pushMappingToContainer(this, ancestorToStopAt, geometryMap);
}
void RenderSVGModelObject::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
{
IntRect rect = enclosingIntRect(strokeBoundingBox());
rect.moveBy(roundedIntPoint(accumulatedOffset));
rects.append(rect);
}
void RenderSVGModelObject::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
{
quads.append(localToAbsoluteQuad(strokeBoundingBox(), 0 , wasFixed));
}
void RenderSVGModelObject::willBeDestroyed()
{
SVGResourcesCache::clientDestroyed(this);
RenderObject::willBeDestroyed();
}
void RenderSVGModelObject::computeLayerHitTestRects(LayerHitTestRects& rects) const
{
SVGRenderSupport::findTreeRootObject(this)->computeLayerHitTestRects(rects);
}
void RenderSVGModelObject::addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* currentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const
{
}
void RenderSVGModelObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
if (diff == StyleDifferenceLayout) {
setNeedsBoundariesUpdate();
if (style()->hasTransform())
setNeedsTransformUpdate();
}
RenderObject::styleDidChange(diff, oldStyle);
SVGResourcesCache::clientStyleChanged(this, diff, style());
}
bool RenderSVGModelObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation&, const LayoutPoint&, HitTestAction)
{
ASSERT_NOT_REACHED();
return false;
}
void RenderSVGModelObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads)
{
quads.append(localToAbsoluteQuad(FloatQuad(repaintRectInLocalCoordinates())));
}
}