<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)
commit1ff1aa7c7cbd0b95f592aec93a5e065415c69d85
tree18819c7ea363ae35376312ef65aee43c3f4f94d7
parent8b742be101ce73a8547a6d5743d7743a3d21a798
<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: http://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