#include "core/rendering/svg/RenderSVGForeignObject.h"
#include "core/rendering/HitTestResult.h"
-#include "core/rendering/LayoutRepainter.h"
#include "core/rendering/RenderView.h"
#include "core/rendering/svg/SVGRenderSupport.h"
#include "core/rendering/svg/SVGRenderingContext.h"
#include "core/svg/SVGForeignObjectElement.h"
#include "platform/graphics/GraphicsContextStateSaver.h"
-namespace WebCore {
+namespace blink {
RenderSVGForeignObject::RenderSVGForeignObject(SVGForeignObjectElement* node)
: RenderSVGBlock(node)
void RenderSVGForeignObject::paint(PaintInfo& paintInfo, const LayoutPoint&)
{
- if (paintInfo.context->paintingDisabled()
- || (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection))
+ if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection)
return;
PaintInfo childPaintInfo(paintInfo);
void RenderSVGForeignObject::layout()
{
ASSERT(needsLayout());
- ASSERT(!view()->layoutStateCachedOffsetsEnabled()); // RenderSVGRoot disables layoutState for the SVG rendering tree.
- LayoutRepainter repainter(*this, SVGRenderSupport::checkForSVGRepaintDuringLayout(this));
SVGForeignObjectElement* foreign = toSVGForeignObjectElement(node());
bool updateCachedBoundariesInParents = false;
// Invalidate all resources of this client if our layout changed.
if (layoutChanged)
SVGResourcesCache::clientLayoutChanged(this);
-
- repainter.repaintAfterLayout();
}
-void RenderSVGForeignObject::mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer,
- LayoutRect& rect, bool fixed) const
+void RenderSVGForeignObject::mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect, ViewportConstrainedPosition, const PaintInvalidationState* paintInvalidationState) const
{
FloatRect r(rect);
- SVGRenderSupport::computeFloatRectForRepaint(this, paintInvalidationContainer, r, fixed);
+ SVGRenderSupport::computeFloatRectForPaintInvalidation(this, paintInvalidationContainer, r, paintInvalidationState);
rect = enclosingLayoutRect(r);
}
if (hitTestAction != HitTestForeground)
return false;
- FloatPoint localPoint = localTransform().inverse().mapPoint(pointInParent);
+ AffineTransform localTransform = this->localTransform();
+ if (!localTransform.isInvertible())
+ return false;
+
+ FloatPoint localPoint = localTransform.inverse().mapPoint(pointInParent);
// Early exit if local point is not contained in clipped viewport area
if (SVGRenderSupport::isOverflowHidden(this) && !m_viewport.contains(localPoint))