Last Comment Bug 309514 - Mouse events sent to node disregarding applied clip-path (clippath)
: Mouse events sent to node disregarding applied clip-path (clippath)
Status: VERIFIED FIXED
: fixed1.8
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: ---
Assigned To: tor
: Hixie (not reading bugmail)
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-21 12:53 PDT by JP Fiset
Modified: 2007-03-16 17:41 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Here is a file that demonstrates the problem. (1.32 KB, image/svg+xml)
2005-09-21 12:55 PDT, JP Fiset
no flags Details
clippath logic for group hit test, like path geometry (1.21 KB, patch)
2005-09-26 13:51 PDT, tor
scootermorris: review+
asa: approval1.8b5+
Details | Diff | Review

Description JP Fiset 2005-09-21 12:53:35 PDT
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.
Comment 1 JP Fiset 2005-09-21 12:55:12 PDT
Created attachment 196940 [details]
Here is a file that demonstrates the problem.
Comment 2 Amos Hayes 2005-09-21 13:25:25 PDT
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.
Comment 3 tor 2005-09-26 13:51:12 PDT
Created attachment 197462 [details] [diff] [review]
clippath logic for group hit test, like path geometry
Comment 4 Scooter Morris 2005-09-26 18:14:45 PDT
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+
Comment 5 tor 2005-09-27 10:10:43 PDT
Checked in on trunk.
Comment 6 tor 2005-09-27 13:04:26 PDT
Checked in on branch.
Comment 7 JP Fiset 2006-11-21 12:40:32 PST
Thanks. It works fine.

Note You need to log in before you can comment on or make changes to this bug.