Closed Bug 484677 Opened 15 years ago Closed 15 years ago

Mouse coordinates in zoomed foreignObject are calculated incorrectly

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: Kai.Londenberg, Assigned: longsonr)

References

Details

(Keywords: fixed1.9.1, Whiteboard: [fixed1.9.1b4])

Attachments

(4 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2a1pre) Gecko/20090223 Minefield/3.2a1pre
Build Identifier: validated for 3.0.6 to Minefield/3.2a1pre

When a page is zoomed, coordinates of mouse events don't match the content in foreignObject elements.

I guess the zoom transformation somehow gets applied twice.

If you enhance the page zoom level, the "sensitive region" of the link gets too large. If you reduce the zoom level, the "sensitive region" of the link gets too small.

To reproduce the problem, take the simple XUL / SVG Page below, and load it into Firefox. Then zoom the page to a large zoom level (for example using ctrl+mousewheel) and check the marked boundaries of the link against the area in which the cursor changes since it hovers above it (sensitive region). 



--
 <xul:page  width="900" height="900" xmlns:svg="http://www.w3.org/2000/svg" 
xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 
            <svg:svg width="800px" height="800px" >
                <svg:foreignObject width="420" height="80" >
                     <html:a style="display:inline; border: 1px solid grey;" href="http://www.google.de/">Google</html:a>
                </svg:foreignObject>
            </svg:svg>
</xul:page>
--


Reproducible: Always

Steps to Reproduce:
1.Load the XUL/SVG Page from bug description into Firefox
2.Zoom the page to a large zoom level using ctrl+mousewheel
3.Move the mouse over the link. The sensitive region of the link is too large.
Actual Results:  
The sensitive region of the link is too large. Mouse coordinates don't match up with the contents of the foreignObject

Expected Results:  
The sensitive region should scale along correctly
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → longsonr
Attached patch patch (obsolete) — Splinter Review
Attachment #368920 - Flags: superreview?(roc)
Attachment #368920 - Flags: review?(roc)
Attachment #368920 - Attachment is obsolete: true
Attachment #368922 - Flags: superreview?(roc)
Attachment #368922 - Flags: review?(roc)
Attachment #368920 - Flags: superreview?(roc)
Attachment #368920 - Flags: review?(roc)
Attachment #368922 - Flags: superreview?(roc)
Attachment #368922 - Flags: superreview+
Attachment #368922 - Flags: review?(roc)
Attachment #368922 - Flags: review+
Comment on attachment 368922 [details] [diff] [review]
update patch
[Checkin: See comment 7 & 10+12]

Should be able to use reftest-zoom and elementFromPoint to write an easy test here
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Flags: in-testsuite+
Comment on attachment 368922 [details] [diff] [review]
update patch
[Checkin: See comment 7 & 10+12]

Low risk patch, includes a reftest
Attachment #368922 - Flags: approval1.9.1?
Blocks: 462166
Comment on attachment 368922 [details] [diff] [review]
update patch
[Checkin: See comment 7 & 10+12]

a191=beltzner for this and the associated reftest
Attachment #368922 - Flags: approval1.9.1? → approval1.9.1+
Keywords: checkin-needed
Whiteboard: [needs 191 landing]
Comment on attachment 368922 [details] [diff] [review]
update patch
[Checkin: See comment 7 & 10+12]


http://hg.mozilla.org/releases/mozilla-1.9.1/rev/6676b7742b23

After fixing context for
{
patching file layout/svg/base/src/nsSVGForeignObjectFrame.cpp
Hunk #7 FAILED at 677
1 out of 7 hunks FAILED
}
Attachment #368922 - Attachment description: update patch → update patch [Checkin: See comment 7 & 10]
Attachment #369192 - Attachment description: reftest for 1.9.1 → reftest for 1.9.1 [Checkin: Comment 11]
Attachment #369191 - Attachment description: reftest → reftest [Checkin: Comment 7]
Whiteboard: [needs 191 landing] → [fixed1.9.1b4]
Target Milestone: --- → mozilla1.9.2a1
Version: unspecified → Trunk
Comment on attachment 368922 [details] [diff] [review]
update patch
[Checkin: See comment 7 & 10+12]


http://hg.mozilla.org/releases/mozilla-1.9.1/rev/958454f9cd0e
(bad merge fix)
Attachment #368922 - Attachment description: update patch [Checkin: See comment 7 & 10] → update patch [Checkin: See comment 7 & 10+12]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: