Closed Bug 604723 Opened 14 years ago Closed 14 years ago

Wrong svg:image position

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b7
Tracking Status
blocking2.0 --- beta8+

People

(Reporter: mash, Assigned: dholbert)

References

Details

(Keywords: regression)

Attachments

(4 files)

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b8pre) Gecko/20101015 Firefox/4.0b8pre Build Identifier: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 85 85"> <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="firefox.png" x="0" y="0" width="100%" height="100%"/> </svg> Wrong svg:image position. Reproducible: Always
Can you please either point to a web page showing the problem, or attach the full SVG file and image needed to reproduce the issue?
Summary: Wrong svn:image position → Wrong svg:image position
Ah, indeed. Looks like a regression from 3.6.
Status: UNCONFIRMED → NEW
blocking2.0: --- → ?
Ever confirmed: true
Regression window: ok: 2010-10-11-03-mozilla-central bad: 2010-10-12-03-mozilla-central
This testcase demonstrates the bug. It looks like, for <svg> embedded in HTML, we set the "0,0" position to be the upper-left corner of the _host_ document, rather than the upper-left corner of the <svg> node.
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
Blocks: 598798
blocking2.0: ? → beta8+
OS: All → Mac OS X
Hardware: All → x86
Version: Trunk → unspecified
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
This testcase replaces the <image> element with a <circle>. No bug here.
(so, specific to <image> painting --> definitely bug 598798.)
Attached patch fixSplinter Review
Trivial fix. I should have used ctx->Multiply() instead of SetMatrix(), to match the behavior in nsSVGUtils::CompositeSurfaceMatrix() (the method we used to use for applying the matrix & drawing). This fixes that and fixes the bug.
Attachment #483590 - Flags: review?
Comment on attachment 483590 [details] [diff] [review] fix (RE the svg/image/reftest.list change -- this patch just adds one line to that file, though I also increased indentation on other lines, so the reference cases would still line up nicely.)
Attachment #483590 - Flags: review? → review?(jwatt)
Comment on attachment 483590 [details] [diff] [review] fix additional-r?'ing longsonr in case he gets to this first.
Attachment #483590 - Flags: review?(longsonr)
Attachment #483590 - Flags: review?(longsonr) → review+
Attachment #483590 - Flags: review?(jwatt)
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Keywords: regression
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
(In reply to comment #11) > *** Bug 605416 has been marked as a duplicate of this bug. *** There are still some not got fixed, see Bug 606418
Target Milestone: mozilla2.0b8 → mozilla2.0b7
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: