Changeset 94116 in webkit


Ignore:
Timestamp:
Aug 30, 2011 3:12:02 PM (13 years ago)
Author:
timothy_horton@apple.com
Message:

getBBox() on a SVGPathElement with curves incorrectly includes control points
https://bugs.webkit.org/show_bug.cgi?id=53512
<rdar://problem/9861154>

Reviewed by Dirk Schulze.

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.

Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r94114 r94116  
     12011-08-30  Tim Horton  <timothy_horton@apple.com>
     2
     3        getBBox() on a SVGPathElement with curves incorrectly includes control points
     4        https://bugs.webkit.org/show_bug.cgi?id=53512
     5        <rdar://problem/9861154>
     6
     7        Reviewed by Dirk Schulze.
     8
     9        Add a test ensuring that getBBox returns only the bounds of the filled shape,
     10        not the bounds of all of the control points.
     11
     12        * platform/chromium/test_expectations.txt:
     13        * svg/custom/getBBox-path-expected.txt: Added.
     14        * svg/custom/getBBox-path.svg: Added.
     15
    1162011-08-30  Tim Horton  <timothy_horton@apple.com>
    217
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r94100 r94116  
    35883588BUGWK65874 : fast/js/preventExtensions.html = TEXT
    35893589
     3590// Introduced due to BUGWK53512, fails under Skia right now
     3591BUGWK65939 : svg/custom/getBBox-path.svg = TEXT
     3592
    35903593// Caused by r92704
    35913594BUGWK65951 WIN DEBUG : webaudio/audiobuffersource.html = CRASH
  • trunk/Source/WebCore/ChangeLog

    r94114 r94116  
     12011-08-30  Tim Horton  <timothy_horton@apple.com>
     2
     3        getBBox() on a SVGPathElement with curves incorrectly includes control points
     4        https://bugs.webkit.org/show_bug.cgi?id=53512
     5        <rdar://problem/9861154>
     6
     7        Reviewed by Dirk Schulze.
     8
     9        The CoreGraphics implementation of Path::boundingRect() called
     10        CGPathGetBoundingBox, which includes the path's control points in its
     11        calculations. Snow Leopard added CGPathGetPathBoundingBox, which
     12        finds the bounding box of only points within the path, and does not
     13        include control points. On Snow Leopard and above, we now use the latter.
     14
     15        Test: svg/custom/getBBox-path.svg
     16
     17        * platform/graphics/cg/PathCG.cpp:
     18        (WebCore::Path::boundingRect):
     19
    1202011-08-30  Tim Horton  <timothy_horton@apple.com>
    221
  • trunk/Source/WebCore/platform/graphics/cg/PathCG.cpp

    r85540 r94116  
    164164FloatRect Path::boundingRect() const
    165165{
     166    // CGPathGetBoundingBox includes the path's control points, CGPathGetPathBoundingBox
     167    // does not, but only exists on 10.6 and above.
     168#if !defined(BUILDING_ON_LEOPARD)
     169    return CGPathGetPathBoundingBox(m_path);
     170#else
    166171    return CGPathGetBoundingBox(m_path);
     172#endif
    167173}
    168174
Note: See TracChangeset for help on using the changeset viewer.