WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
172866
Object bounding box wrong for some paths
https://bugs.webkit.org/show_bug.cgi?id=172866
Summary
Object bounding box wrong for some paths
Simon Fraser (smfr)
Reported
2017-06-02 11:41:51 PDT
See
https://codepen.io/AmeliaBR/details/dRyPJE/
. Blink bug is
https://bugs.chromium.org/p/chromium/issues/detail?id=729067
Attachments
Testcase
(2.31 KB, text/html)
2017-06-02 16:17 PDT
,
Simon Fraser (smfr)
no flags
Details
Better testcase
(2.20 KB, text/html)
2017-06-02 16:47 PDT
,
Simon Fraser (smfr)
no flags
Details
Patch
(786.15 KB, patch)
2017-06-04 09:47 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2017-06-02 16:17:54 PDT
Created
attachment 311881
[details]
Testcase
Simon Fraser (smfr)
Comment 2
2017-06-02 16:47:45 PDT
Created
attachment 311884
[details]
Better testcase
Simon Fraser (smfr)
Comment 3
2017-06-02 17:25:50 PDT
RenderSVGShape::calculateObjectBoundingBox() is calling path().fastBoundingRect() which, on macOS, calls CGPathGetBoundingBox(). The comments say: /* Return the bounding box of `path'. The bounding box is the smallest rectangle completely enclosing all points in the path, including control points for Bézier cubic and quadratic curves. If the path is empty, then return `CGRectNull'. */ We should instead use: /* Return the path bounding box of `path'. The path bounding box is the smallest rectangle completely enclosing all points in the path, *not* including control points for Bézier cubic and quadratic curves. If the path is empty, then return `CGRectNull'. */ CG_EXTERN CGRect CGPathGetPathBoundingBox(CGPathRef path); but need to vet all callers of Path::fastBoundingRect().
Simon Fraser (smfr)
Comment 4
2017-06-02 17:36:02 PDT
See also
https://trac.webkit.org/changeset/99460/webkit
Simon Fraser (smfr)
Comment 5
2017-06-04 09:47:58 PDT
Created
attachment 311965
[details]
Patch
WebKit Commit Bot
Comment 6
2017-06-04 10:57:08 PDT
Comment on
attachment 311965
[details]
Patch Clearing flags on attachment: 311965 Committed
r217772
: <
http://trac.webkit.org/changeset/217772
>
WebKit Commit Bot
Comment 7
2017-06-04 10:57:10 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug