Closed Bug 416762 Opened 16 years ago Closed 16 years ago

OBJECTBOUNDINGBOX units should include a translation by the boundingbox origin

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

Details

Attachments

(1 file, 1 obsolete file)

In two places we use nsSVGUtils::ObjectSpace to interpret x/y/width/height coordinates according to objectBoundingBox units, without using the bounding-box origin as a translation:

Patterns:
http://mxr.mozilla.org/seamonkey/source/layout/svg/base/src/nsSVGPatternFrame.cpp#643

Filter primitive subregions:
http://mxr.mozilla.org/seamonkey/source/layout/svg/base/src/nsSVGFilterFrame.cpp#451

These are both bugs, right? The spec says
http://www.w3.org/TR/SVG/coords.html#ObjectBoundingBox
> Then, coordinate (0,0) in the new user coordinate system is mapped to the
> (minx,miny) corner of the tight bounding box within the user coordinate system
> of the applicable element
which is of course what authors would expect too.
Attached image testcase
This testcase shows the problem. It doesn't display anything on trunk. It should display a green rectangle.

I've fixed this for filter subregions in my patch for bug 414784. Still probably need a fix for patterns, although I don't have a testcase for that.
Didn't I do patterns in bug 338596, although that patch wasn't quite right and I had to fix it in bug 261693? 

s/261693/377263/

OK cool. Would you mind manufacturing a reftest for that and checking it in? Then I'll close this bug :-).
Attached patch pattern reftest (obsolete) — Splinter Review
Cool, I'll close this down now. The filter stuff will be fixed in bug 414784.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Flags: in-testsuite+
Attachment #302544 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: