Mouse coordinates in zoomed foreignObject are calculated incorrectly

RESOLVED FIXED in mozilla1.9.2a1

Status

()

RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: Kai.Londenberg, Assigned: longsonr)

Tracking

({fixed1.9.1})

Trunk
mozilla1.9.2a1
fixed1.9.1
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed1.9.1b4])

Attachments

(4 attachments, 1 obsolete attachment)

(Reporter)

Description

10 years ago
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
(Assignee)

Comment 1

10 years ago
Created attachment 368813 [details]
reporters testcase as attachment
(Assignee)

Updated

10 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Updated

10 years ago
Assignee: nobody → longsonr
(Assignee)

Comment 2

10 years ago
Created attachment 368920 [details] [diff] [review]
patch
Attachment #368920 - Flags: superreview?(roc)
Attachment #368920 - Flags: review?(roc)
(Assignee)

Comment 3

10 years ago
Created attachment 368922 [details] [diff] [review]
update patch
[Checkin: See comment 7 & 10+12]
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
(Assignee)

Comment 5

10 years ago
Created attachment 369191 [details] [diff] [review]
reftest
[Checkin: Comment 7]
(Assignee)

Comment 6

10 years ago
Created attachment 369192 [details] [diff] [review]
reftest for 1.9.1
[Checkin: Comment 11]
(Assignee)

Updated

10 years ago
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
(Assignee)

Updated

10 years ago
Flags: in-testsuite+
(Assignee)

Comment 8

10 years ago
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?
(Assignee)

Updated

10 years ago
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+
(Assignee)

Updated

10 years ago
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]
Keywords: checkin-needed → fixed1.9.1
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.