Bug 81137 - getIntersectionList returns false positives when the coordinate system has been rotated
Summary: getIntersectionList returns false positives when the coordinate system has be...
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2012-03-14 11:18 PDT by Oscar Kozlowski
Modified: 2017-03-22 02:41 PDT (History)
3 users (show)

See Also:

Repro case (1.28 KB, image/svg+xml)
2012-03-14 11:18 PDT, Oscar Kozlowski
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oscar Kozlowski 2012-03-14 11:18:24 PDT
Created attachment 131886 [details]
Repro case

getIntersectionList appears to use axis-aligned bounding boxes for intersection testing, resulting in false positives being returned when the coordinate system has been rotated.

Steps to reproduce: 
1. Open attached mininmal repro (svg_getIntersectionList_rotation_bug.svg). This repro attaches a mouse move handler that retrieves the intersected SVG elements directly under the pointer. If the rectangle is intersected, it is highlighted red, otherwise it is green.
2. Move mouse over the green rectangle. Rectangle is highlighted red as expected.
3. Move mouse out of rectangle but within the axis aligned bounding box (e.g. screen coordinate (0, 0)). Rectangle remains red, but expected to revert back to green.
4. Move mouse further out of the axis aligned bounding box. Rectangle turns green as expected.

Correct behaviour under IE9 and Opera.
Comment 1 Daniel Trebbien 2014-11-24 08:54:56 PST
The issue is that WebKit is considering the bounding box.

See the bug report for Chrome: http://crbug.com/370012
Comment 2 Pete Thompson 2017-03-22 02:41:45 PDT
Is there any plan to fix this? I'm making use of the getIntersectionList method and am getting false positives due to rotated elements.