Last Comment Bug 684479 - Bounding boxes for strokes are unnecessarily big for many shapes
: Bounding boxes for strokes are unnecessarily big for many shapes
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla9
Assigned To: Robert Longson
:
Mentors:
Depends on: 684790
Blocks: 647687
  Show dependency treegraph
 
Reported: 2011-09-03 04:32 PDT by Robert Longson
Modified: 2011-09-06 04:03 PDT (History)
2 users (show)
longsonr: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (5.37 KB, patch)
2011-09-03 04:34 PDT, Robert Longson
roc: review+
Details | Diff | Review

Description Robert Longson 2011-09-03 04:32:28 PDT
text, rect, circle, ellipse don't have vertices but the bounding boxes we calculate assume that they might have.
Comment 1 Robert Longson 2011-09-03 04:34:00 PDT
Created attachment 558057 [details] [diff] [review]
patch
Comment 2 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2011-09-03 05:48:51 PDT
Comment on attachment 558057 [details] [diff] [review]
patch

Review of attachment 558057 [details] [diff] [review]:
-----------------------------------------------------------------

Test?
Comment 3 Robert Longson 2011-09-03 06:21:31 PDT
getBBox ignores strokes. I could do a getBoundingClientRect mochitest on a rect with a stroke at the moment but there seems some question over whether that method should or should not include the stroke. Currently Firefox and IE do include the stroke but the w3c specification says not to which I've raised as an issue. Would you like a getBoundingClientRect based test?
Comment 4 Robert Longson 2011-09-03 06:22:31 PDT
Do you want a getBoundingClientRect based test even if that may be returning the wrong thing currently?
Comment 5 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2011-09-03 06:43:28 PDT
Yes I think so
Comment 6 Robert Longson 2011-09-04 23:55:54 PDT
sent to try with tests https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=fc31fb935a31
Comment 8 Kyle Huey [:khuey] (khuey@mozilla.com) 2011-09-06 04:03:39 PDT
http://hg.mozilla.org/mozilla-central/rev/620b73b3d768

Note You need to log in before you can comment on or make changes to this bug.