Closed Bug 820506 Opened 12 years ago Closed 11 years ago

Problem selecting image node in SVG when used with clip-path in certain condition

Categories

(Core :: SVG, defect)

17 Branch
defect
Not set
major

Tracking

()

VERIFIED FIXED
mozilla21
Tracking Status
firefox17 --- wontfix
firefox18 - wontfix
firefox19 + verified
firefox20 + verified
firefox-esr10 --- unaffected
firefox-esr17 19+ verified

People

(Reporter: ron_and_mac, Assigned: jwatt)

References

()

Details

(Keywords: regression, verifyme)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0
Build ID: 20121128204232

Steps to reproduce:

The following fiddle illustrates the problem pretty well:
http://jsfiddle.net/rmaccracken/5Js4x/3/

The problem seems to arise when using an image with negative x and/or y properties with a clip-path. It seems to work if x and y are positive, or if there is no clip-path.



Actual results:

Clicking on the image in SVG returns a mouse event with the root SVG node as the explicitOriginalTarget rather than the image itself.


Expected results:

The image should be the event's explicitOriginalTarget anywhere you click on the image. This worked in previous versions of Firefox, but is a problem in the latest version (17.0.1).
This causes a problem with our enterprise software's SVG editor in that after cropping an image it appears that the image cannot be selected / edited further. The current workaround that appears to work consistently is to select the image in the top-left corner, but sometimes that is a very small region. So for us this is a pretty serious issue.
Severity: normal → major
Would you be willing to find a regression range? Do do that you would follow the instructions here: https://quality.mozilla.org/docs/bugzilla/guide-to-triaging-bugs-for-firefox/finding-a-regression-window/

type about:buildconfig in the address bar in the last good build and first bad build and post the Built from link from each
I will see what I can do when I return from vacation next week, but I was told from our QA that it works just fine in 16.0.2. So there should not be too big of a range to look at.
Regression range:

m-c
good=2012-08-02
bad=2012-08-03
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=588424024294&tochange=89dcadd42ec4

Suspected bug:
Jonathan Watt — Bug 776054 - Flip the prefs to enable the use of display lists for SVG painting and hit-testing. r=roc.

Workaround:
Setting svg.display-lists.hit-testing.enabled=false and svg.display-lists.painting.enabled=false fixes the issue.

NB: setting only svg.display-lists.hit-testing.enabled=false fixes randomly the issue.
Blocks: 776054
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Since this is impacting enterprise users, let's try to get a fix into FF19/ESR17(19+).
There's another example here: http://blog.goo.ne.jp/edo-toddler/e/7fa1f8e1732f70d88f7d9f26edb608b7

http://park5.wakwak.com/~toshkish/svgAgain/shtnew/clipRect_dragableB.html (Sample B) is an image with negative x, y and is only draggable at the top left.
Attached patch patchSplinter Review
Attachment #699222 - Flags: review?(roc)
Blocks: 823179
OS: Windows 7 → All
Hardware: x86_64 → All
https://hg.mozilla.org/mozilla-central/rev/e11cd5e7b872
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Comment on attachment 699222 [details] [diff] [review]
patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 776054
User impact if declined: pointer interaction broken for some SVG
Testing completed (on m-c, etc.): merged to m-c
Risk to taking this patch (and alternatives if risky): very low, since the patch can only affect (fix) things that are already broken
String or UUID changes made by this patch: none
Attachment #699222 - Flags: approval-mozilla-beta?
Attachment #699222 - Flags: approval-mozilla-aurora?
Keywords: qawanted, verifyme
Comment on attachment 699222 [details] [diff] [review]
patch

Approving the low risk patch for FF19/FF20 & request to QA to help with some testing/verification around the problem.
Attachment #699222 - Flags: approval-mozilla-beta?
Attachment #699222 - Flags: approval-mozilla-beta+
Attachment #699222 - Flags: approval-mozilla-aurora?
Attachment #699222 - Flags: approval-mozilla-aurora+
Pushed to m-a: https://hg.mozilla.org/releases/mozilla-aurora/rev/7704435ed3f6

Waiting for m-b to reopen before I push there.
Here are my results using the testcase at http://jsfiddle.net/rmaccracken/5Js4x/3/

Firefox 19.0b1:
> Click inside red box -> [object SVGImageElement]
> Click outside red box -> [object SVGSVGElement]

Firefox 21.0a1 2013-01-10:
> Click inside red box -> [object SVGImageElement]
> Click outside red box -> [object SVGImageElement]

Firefox 20.0a2 2013-01-10:
> Click inside red box -> [object SVGImageElement]
> Click outside red box -> [object SVGImageElement]

Dropping qawanted but leaving verifyme for verification on other branches once it lands.
Status: RESOLVED → VERIFIED
Keywords: qawanted
Reproduced the issue following STR from comment 0 on Firefox 17.0.1
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0
Build ID: 20121128204232

Verified the fix in Firefox 19.0 Beta 2
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Mozilla/5.0 (Macintosh: Intel Mac OS X 10.7; rv:19.0) Gecko/20100101 Firefox 19.0
Build ID: 20130116072953
(In reply to Jonathan Watt [:jwatt] from comment #10)
> Comment on attachment 699222 [details] [diff] [review]
> patch
> 
> [Approval Request Comment]
> Bug caused by (feature/regressing bug #): bug 776054
> User impact if declined: pointer interaction broken for some SVG
> Testing completed (on m-c, etc.): merged to m-c
> Risk to taking this patch (and alternatives if risky): very low, since the
> patch can only affect (fix) things that are already broken
> String or UUID changes made by this patch: none

Can you please get a esr17 patch ready & nominate it for approval asap ? Thanks!
Attached patch patch for esr17Splinter Review
Attachment #710989 - Flags: approval-mozilla-esr17?
(In reply to Jonathan Watt [:jwatt] from comment #17)
> Created attachment 710989 [details] [diff] [review]
> patch for esr17

:jwatt, would the risk profile in comment 16 stand true for esr as well ?
bajaj: yes, that's correct.
Comment on attachment 710989 [details] [diff] [review]
patch for esr17

Please make sure to land before 2/11 on esr branch.
Attachment #710989 - Flags: approval-mozilla-esr17? → approval-mozilla-esr17+
Verified fix for Firefox 17.0.3 ESR
Mozilla/5.0 (Windows NT 6.2; rv:17.0) Gecko/20100101 Firefox/17.0
Build ID: 20130215125822

Click inside/outside red box -> [object SVGImageElement] in Web Console
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: