<rdar://problem/9973489> REGRESSION (r66599): -[DOMNode boundingBox] returns the...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Oct 2011 00:10:38 +0000 (00:10 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Oct 2011 00:10:38 +0000 (00:10 +0000)
commitb2218740ab60495b1032aa2913e539483dda429c
tree18819c7ea363ae35376312ef65aee43c3f4f94d7
parentb82ad2eb6d0eb460a529501819ef81f0c312b1cc
<rdar://problem/9973489> REGRESSION (r66599): -[DOMNode boundingBox] returns the zero rect for SVG elements
https://bugs.webkit.org/show_bug.cgi?id=69305

Reviewed by Simon Fraser.

Source/WebCore:

Test: svg/custom/boundingBox.html

Rather than asserting and returning the zero rect, take the transform-aware code path for computing SVG
bounding rects.

* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::mapLocalToContainer): Updated for change to SVGRenderSupport::mapLocalToContainer().
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::mapLocalToContainer): Ditto.
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::mapLocalToContainer): Ditto.
(WebCore::RenderSVGModelObject::absoluteRects): Replaced an incorrect assertion with code to approximate the bounding
box.
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::mapLocalToContainer): Updated for change to SVGRenderSupport::mapLocalToContainer().
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::mapLocalToContainer): Removed the fixed and useTransform boolean parameters.
* rendering/svg/SVGRenderSupport.h:

LayoutTests:

* svg/custom/boundingBox-expected.txt: Added.
* svg/custom/boundingBox.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@96558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/custom/boundingBox-expected.txt [new file with mode: 0644]
LayoutTests/svg/custom/boundingBox.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
Source/WebCore/rendering/svg/RenderSVGInline.cpp
Source/WebCore/rendering/svg/RenderSVGModelObject.cpp
Source/WebCore/rendering/svg/RenderSVGText.cpp
Source/WebCore/rendering/svg/SVGRenderSupport.cpp
Source/WebCore/rendering/svg/SVGRenderSupport.h