Closed Bug 934156 Opened 11 years ago Closed 11 years ago

Make the SVG elements' BuildPath methods return nullptr when the element is disabled

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

Attachments

(1 file)

I should have made the SVG elements' BuildPath methods return nullptr when the element is disabled in bug 932761. It's more efficient, but more to the point it turns out some of the Moz2D backends can end up returning stroke bounds with NaN values in the case that no path is emitted. :/ This also fixes a bug with the width/height checking in SVGImageElement::BuildPath where the logic was the wrong way around.
Attached patch patch (deleted) — Splinter Review
Attachment #826342 - Flags: review?(dholbert)
Blocks: 934183
Depends on: 932761
Comment on attachment 826342 [details] [diff] [review] patch (In reply to Jonathan Watt [:jwatt] from comment #0) > it turns out some of the Moz2D backends can end up returning stroke > bounds with NaN values in the case that no path is emitted. :/ Are there automated testcases somewhere (maybe some random already-in-the-tree tests) that fail due to this when using those backends? r=me
Attachment #826342 - Flags: review?(dholbert) → review+
Also: Please update the BuildPath() header-comment here... http://mxr.mozilla.org/mozilla-central/source/content/svg/content/src/nsSVGPathGeometryElement.h?rev=e05ec9f34435&mark=63-65#63 ...to mention that the method may return null, in cases where the element has no valid path. (or something like that)
https://hg.mozilla.org/integration/mozilla-inbound/rev/f2f5e3c75e15 (In reply to Daniel Holbert [:dholbert] from comment #2) > Are there automated testcases somewhere (maybe some random > already-in-the-tree tests) that fail due to this when using those backends? Yes, quite a few. (In reply to Daniel Holbert [:dholbert] from comment #3) > Also: Please update the BuildPath() header-comment Done.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: