Closed Bug 309514 Opened 16 years ago Closed 16 years ago

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

Categories

(Core :: SVG, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: bugzilla, Assigned: tor)

Details

(Keywords: fixed1.8)

Attachments

(2 files)

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.
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: general → tor
Status: UNCONFIRMED → ASSIGNED
Attachment #197462 - Flags: review?(scootermorris)
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+
Checked in on trunk.
Attachment #197462 - Flags: approval1.8b5?
Attachment #197462 - Flags: approval1.8b5? → approval1.8b5+
Checked in on branch.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: fixed1.8
Resolution: --- → FIXED
Thanks. It works fine.
Status: RESOLVED → VERIFIED
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.