Mouse events sent to node disregarding applied clip-path (clippath)

VERIFIED FIXED

Status

()

Core
SVG
VERIFIED FIXED
12 years ago
11 years ago

People

(Reporter: JP Fiset, Assigned: tor)

Tracking

({fixed1.8})

Trunk
x86
Windows XP
fixed1.8
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4

Mouse events are sent to a SVG node for the region of the associated shape where
it is not displayed because of a clip-path.

Reproducible: Always

Steps to Reproduce:
1. Create a shape
2. Apply a clip-path to the shape
3. Attach mouse events to the shape
4. Move mouse over the different regions: displayed area, clipped area, outside
of shape

Actual Results:  
The mouse events are sent for the displayed area and the clipped area.

Expected Results:  
The mouse event should be sent only to the displayed area. Not the clipped area.
(Reporter)

Comment 1

12 years ago
Created attachment 196940 [details]
Here is a file that demonstrates the problem.

Comment 2

12 years ago
The testcase also exhibits the erroneous behaviour on Deer Park 1.5 Beta 1 with cairo 1.0.0 (from 
MOZILLA_1_8_SVG_BRANCH).

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050915 Firefox/1.4


This is a serious bug for the application we're developing. I'd be very happy to see it resolved in Firefox 
1.5 if possible.
Flags: testcase+
(Assignee)

Comment 3

12 years ago
Created attachment 197462 [details] [diff] [review]
clippath logic for group hit test, like path geometry
Assignee: general → tor
Status: UNCONFIRMED → ASSIGNED
Attachment #197462 - Flags: review?(scootermorris)

Comment 4

12 years ago
Comment on attachment 197462 [details] [diff] [review]
clippath logic for group hit test, like path geometry

>Index: nsSVGGFrame.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/layout/svg/base/src/nsSVGGFrame.cpp,v
>retrieving revision 1.15
>diff -u -8 -p -r1.15 nsSVGGFrame.cpp
>--- nsSVGGFrame.cpp	19 Apr 2005 03:48:09 -0000	1.15
>+++ nsSVGGFrame.cpp	26 Sep 2005 20:45:26 -0000
>@@ -161,16 +161,34 @@ nsSVGGFrame::GetFrameForPointSVG(float x
>       nsresult rv = SVGFrame->GetFrameForPointSVG(x, y, &temp);
>       if (NS_SUCCEEDED(rv) && temp) {
>         *hit = temp;
>         // return NS_OK; can't return. we need reverse order but only
>         // have a singly linked list...
>       }
>     }
>   }
>+
>+  if (*hit) {
>+    PRBool clipHit = PR_TRUE;;

Remove extra semi.

With that -- r+
Attachment #197462 - Flags: review?(scootermorris) → review+
(Assignee)

Comment 5

12 years ago
Checked in on trunk.
(Assignee)

Updated

12 years ago
Attachment #197462 - Flags: approval1.8b5?

Updated

12 years ago
Attachment #197462 - Flags: approval1.8b5? → approval1.8b5+
(Assignee)

Comment 6

12 years ago
Checked in on branch.
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Keywords: fixed1.8
Resolution: --- → FIXED
(Reporter)

Comment 7

11 years ago
Thanks. It works fine.
Status: RESOLVED → VERIFIED

Updated

11 years ago
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.