haikuwebkit/LayoutTests/svg/custom/getBBox-path-expected.txt

2 lines
14 B
Plaintext
Raw Permalink Normal View History

getBBox() on a SVGPathElement with curves incorrectly includes control points https://bugs.webkit.org/show_bug.cgi?id=53512 <rdar://problem/9861154> Reviewed by Oliver Hunt. Split Path::boundingRect() into two, adding Path::fastBoundingRect() for a rough estimate of the bounding rect (always equal to or larger than boundingRect()). fastBoundingRect() currently falls back to boundingRect() for all ports besides CG, though in most cases (on a port-by-port basis) the current implementation of boundingRect() will need to become fastBoundingRect(), and a new, more accurate method will be implemented for boundingRect(). All previous callers of boundingRect() are transitioned to using fastBoundingRect() except SVGPathElement::getBBox, which wants an accurate bounding box. The CoreGraphics implementation of Path::boundingRect() called CGPathGetBoundingBox, which includes the path's control points in its calculations. Snow Leopard added CGPathGetPathBoundingBox, which finds the bounding box of only points within the path, and does not include control points. On Snow Leopard and above, we now use the latter. Test: svg/custom/getBBox-path.svg * html/HTMLAreaElement.cpp: * html/canvas/CanvasRenderingContext2D.cpp: * platform/graphics/Path.cpp: * platform/graphics/Path.h: * platform/graphics/cg/GraphicsContextCG.cpp: * platform/graphics/cg/PathCG.cpp: (WebCore::Path::boundingRect): * rendering/RenderObject.h: * rendering/svg/RenderSVGPath.cpp: * svg/SVGPathElement.cpp: * svg/SVGPathElement.h: Add a test that ensures that getBBox does not include control points in the rect it returns. * platform/chromium/test_expectations.txt: * svg/custom/getBBox-path-expected.txt: Added. * svg/custom/getBBox-path.svg: Added. Canonical link: https://commits.webkit.org/88037@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-07 20:40:24 +00:00
100 37.5 PASS