Issue metadata
Sign in to add a comment
|
SVGSVGElement.checkIntersection() is completely broken, based on bounding rects
Reported by
teo8...@gmail.com,
Nov 25 2017
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36 Steps to reproduce the problem: 1. visit http://jsbin.com/qepaxirotu/edit?html,console,output 2. check console output What is the expected behavior? output should be false. The output is the result of the test svgRoot.checkIntersection(rectelem, refrect) where svgRoot is an SVG root element, rectelem is a rotated SVG rectangle element inside it, and refrect is a SVGRect object representing a rectangle that does NOT intersect the rotated rectangle element. Hence, the test should return false What went wrong? The output is true. Based on a few tests I've done by moving around the rectangle in the example, I strongly suspect checkIntersection() actually checks whether the BOUNDING RECTANGLE of the given svg element, the one you would get via getBoundingClientRect(), intersects the given geometry rectangle. That's stupid and useless. I can write that test with half a dozen lines of codes using getBoundingClientRect(), I don't need checkIntersection for that, and it is completely useless in determining whether an svg element intersects a given rectangle, because it can give a wild range of false positives as the example demostrates. Did this work before? No Chrome version: 62.0.3202.89 Channel: n/a OS Version: Flash Version:
,
Nov 27 2017
,
Nov 27 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by dtapu...@chromium.org
, Nov 27 2017