Closed Bug 719385 Opened 14 years ago Closed 14 years ago

Stroke hit-testing is buggy

Categories

(Core :: SVG, defect)

defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 676001

People

(Reporter: rustam_faizr, Unassigned)

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

Attached image test.svg (obsolete) —
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 Build ID: 20111220165912 Steps to reproduce: Highlight SVG Line and SVG Polyline on 'mouseover' event Actual results: SVG event 'mouseover' not work for 'nearly horizontal polyline and line' Expected results: event 'onmouseover'
This sample work correctly in all browsers.
Severity: normal → critical
Confirmed on Mozilla/5.0 (Windows NT 5.1; rv:12.0a1) Gecko/20120119 Firefox/12.0a1 ID:20120119031105 Only middle line changes color on mouseover. Tested Safari and Opera and all lines correctly change color.
Status: UNCONFIRMED → NEW
Component: Untriaged → SVG
Ever confirmed: true
Product: Firefox → Core
QA Contact: untriaged → general
Version: 9 Branch → Trunk
Severity: critical → major
Assignee: nobody → jwatt
OS: Windows XP → All
Hardware: x86 → All
Summary: SVG line and polyline mouseover → Hit testing for stroke is buggy
Attached image testcase
Mousing over the line, you'll see that there are small patches on the line which are not returning true for hit testing. The same problem exists on the right hand side of the circle.
Attachment #589822 - Attachment is obsolete: true
Attachment #593146 - Attachment is patch: false
Attachment #593146 - Attachment mime type: text/plain → image/svg+xml
Assignee: jwatt → nobody
Seems like gfxContext::PointInStroke can't be relied upon to tell the truth.
If you use this mochitest to debug and put a breakpoint in nsSVGPathGeometryFrame::GetFrameForPoint it'll be hit four times. Twice for the first elementFromPoint() (once for the circle, once for the line), then twice for the second elementFromPoint() (once for the circle, once for the line). Both time's we're in nsSVGPathGeometryFrame::GetFrameForPoint for the circle, gfxContext::PointInStroke should return true. It only returns true the second time though.
Keywords: regression
Summary: Hit testing for stroke is buggy → Stroke hit-testing is buggy
It regressed some time between 3.6 and 4.0 it seems, but I didn't narrow the range any further than that.
Is this the same issue as bug 676001 it seems similar
bug 676001 has a regression range
Sure looks like it. Thanks, Robert.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: