Index: Source/core/svg/SVGSVGElement.cpp |
diff --git a/Source/core/svg/SVGSVGElement.cpp b/Source/core/svg/SVGSVGElement.cpp |
index 117feddae61fc20df439d2b6fcc9de39126e8dce..db7d42393fa3ba50dfdb258f302d0937afc65c1c 100644 |
--- a/Source/core/svg/SVGSVGElement.cpp |
+++ b/Source/core/svg/SVGSVGElement.cpp |
@@ -205,7 +205,7 @@ void SVGSVGElement::setCurrentTranslate(const FloatPoint& point) |
void SVGSVGElement::updateCurrentTranslate() |
{ |
- if (LayoutObject* object = renderer()) |
+ if (LayoutObject* object = layoutObject()) |
object->setNeedsLayoutAndFullPaintInvalidation(); |
} |
@@ -294,7 +294,7 @@ void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName) |
// roots, there is an attribute synchronization missing. See |
// http://crbug.com/364807 |
if (widthChanged || heightChanged) { |
- LayoutObject* layoutObject = renderer(); |
+ LayoutObject* layoutObject = this->layoutObject(); |
if (layoutObject && layoutObject->isSVGRoot()) { |
invalidateSVGPresentationAttributeStyle(); |
setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::SVGContainerSizeChange)); |
@@ -308,7 +308,7 @@ void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName) |
if (SVGFitToViewBox::isKnownAttribute(attrName)) { |
updateRelativeLengthsOrViewBox = true; |
- if (LayoutObject* object = renderer()) |
+ if (LayoutObject* object = layoutObject()) |
object->setNeedsTransformUpdate(); |
} |
@@ -316,8 +316,8 @@ void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName) |
if (updateRelativeLengthsOrViewBox |
|| SVGZoomAndPan::isKnownAttribute(attrName)) { |
- if (renderer()) |
- markForLayoutAndParentResourceInvalidation(renderer()); |
+ if (layoutObject()) |
+ markForLayoutAndParentResourceInvalidation(layoutObject()); |
return; |
} |
@@ -347,7 +347,7 @@ static bool isIntersectionOrEnclosureTarget(LayoutObject* renderer) |
bool SVGSVGElement::checkIntersectionOrEnclosure(const SVGElement& element, const FloatRect& rect, |
CheckIntersectionOrEnclosure mode) const |
{ |
- LayoutObject* renderer = element.renderer(); |
+ LayoutObject* renderer = element.layoutObject(); |
ASSERT(!renderer || renderer->style()); |
if (!renderer || renderer->style()->pointerEvents() == PE_NONE) |
return false; |
@@ -487,7 +487,7 @@ AffineTransform SVGSVGElement::localCoordinateSpaceTransform(SVGElement::CTMScop |
SVGLengthContext lengthContext(this); |
transform.translate(m_x->currentValue()->value(lengthContext), m_y->currentValue()->value(lengthContext)); |
} else if (mode == SVGElement::ScreenScope) { |
- if (LayoutObject* renderer = this->renderer()) { |
+ if (LayoutObject* renderer = this->layoutObject()) { |
FloatPoint location; |
float zoomFactor = 1; |
@@ -615,9 +615,9 @@ FloatRect SVGSVGElement::currentViewBoxRect() const |
FloatRect useViewBox = viewBox()->currentValue()->value(); |
if (!useViewBox.isEmpty()) |
return useViewBox; |
- if (!renderer() || !renderer()->isSVGRoot()) |
+ if (!layoutObject() || !layoutObject()->isSVGRoot()) |
return FloatRect(); |
- if (!toLayoutSVGRoot(renderer())->isEmbeddedThroughSVGImage()) |
+ if (!toLayoutSVGRoot(layoutObject())->isEmbeddedThroughSVGImage()) |
return FloatRect(); |
// If no viewBox is specified but non-relative width/height values, then we |
@@ -627,15 +627,15 @@ FloatRect SVGSVGElement::currentViewBoxRect() const |
FloatSize SVGSVGElement::currentViewportSize() const |
{ |
- if (!renderer()) |
+ if (!layoutObject()) |
return FloatSize(); |
- if (renderer()->isSVGRoot()) { |
- LayoutRect contentBoxRect = toLayoutSVGRoot(renderer())->contentBoxRect(); |
- return FloatSize(contentBoxRect.width() / renderer()->style()->effectiveZoom(), contentBoxRect.height() / renderer()->style()->effectiveZoom()); |
+ if (layoutObject()->isSVGRoot()) { |
+ LayoutRect contentBoxRect = toLayoutSVGRoot(layoutObject())->contentBoxRect(); |
+ return FloatSize(contentBoxRect.width() / layoutObject()->style()->effectiveZoom(), contentBoxRect.height() / layoutObject()->style()->effectiveZoom()); |
} |
- FloatRect viewportRect = toLayoutSVGViewportContainer(renderer())->viewport(); |
+ FloatRect viewportRect = toLayoutSVGViewportContainer(layoutObject())->viewport(); |
return FloatSize(viewportRect.width(), viewportRect.height()); |
} |
@@ -686,7 +686,7 @@ AffineTransform SVGSVGElement::viewBoxToViewTransform(float viewWidth, float vie |
void SVGSVGElement::setupInitialView(const String& fragmentIdentifier, Element* anchorNode) |
{ |
- LayoutObject* renderer = this->renderer(); |
+ LayoutObject* renderer = this->layoutObject(); |
SVGViewSpec* view = m_viewSpec.get(); |
if (view) |
view->reset(); |
@@ -725,7 +725,7 @@ void SVGSVGElement::setupInitialView(const String& fragmentIdentifier, Element* |
if (SVGSVGElement* svg = viewElement.ownerSVGElement()) { |
svg->inheritViewAttributes(&viewElement); |
- if (LayoutObject* renderer = svg->renderer()) |
+ if (LayoutObject* renderer = svg->layoutObject()) |
markForLayoutAndParentResourceInvalidation(renderer); |
return; |