Modernize RenderSVGText::locateRenderSVGTextAncestor().
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Feb 2014 05:04:57 +0000 (05:04 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Feb 2014 05:04:57 +0000 (05:04 +0000)
commit93c2b6c96c46feeafcd58472565cde96823475d4
tree59c56e9f05b8804d6f71bb435c8b23e10287ae1d
parent43ef1bfcfa8f7c20c1b55562682e7a23e650f2de
Modernize RenderSVGText::locateRenderSVGTextAncestor().
<https://webkit.org/b/128093>

Make locateRenderSVGTextAncestor() take a reference, and simplify it
internally with lineageOfType.

Switched callers to use 'auto' for the return type so we get some
devirtualization freebies.

Reviewed by Anders Carlsson.

* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::objectBoundingBox):
(WebCore::RenderSVGInline::strokeBoundingBox):
(WebCore::RenderSVGInline::repaintRectInLocalCoordinates):
(WebCore::RenderSVGInline::absoluteQuads):
(WebCore::RenderSVGInline::addChild):
(WebCore::RenderSVGInline::removeChild):
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::setTextInternal):
(WebCore::RenderSVGInlineText::styleDidChange):
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::createMaskAndSwapContextForTextGradient):
(WebCore::clipToTextMask):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::locateRenderSVGTextAncestor):
* rendering/svg/RenderSVGText.h:
(WebCore::RenderSVGText>):
* rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
(WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::measureTextRenderer):
* svg/SVGTextPositioningElement.cpp:
(WebCore::SVGTextPositioningElement::svgAttributeChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/svg/RenderSVGInline.cpp
Source/WebCore/rendering/svg/RenderSVGInlineText.cpp
Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp
Source/WebCore/rendering/svg/RenderSVGText.cpp
Source/WebCore/rendering/svg/RenderSVGText.h
Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp
Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp
Source/WebCore/svg/SVGTextPositioningElement.cpp