Enable getBoxQuads & convertFromNode in Release builds
Categories
(Core :: Layout, task)
Tracking
()
People
(Reporter: bugs, Unassigned)
References
(Blocks 3 open bugs, )
Details
(Keywords: dev-doc-needed)
Updated•8 years ago
|
Comment 2•8 years ago
|
||
Updated•2 years ago
|
Comment 3•7 months ago
|
||
I've created a polyfill for this: https://github.com/jogibear9988/getBoxQuadsPolyfill
Problem, it does not work correctly with SVG and MathML Elements, cause they are missing offsetLeft and offsetTop, wich is needed to calculate the complete transform
Comment 4•7 months ago
|
||
As noted by Chris Rebert above and Chris Harrelson in the related CSSWG issue you filed, the main thing to do before this feature can be shipped is to properly specify getBoxQuads
.
So, Jochen, with the experience of your polyfill, you may provide valuable feedback on the design of that API and maybe help the authors of that spec. Simon and Emilio out with a definition for it.
Sebastian
Updated•7 months ago
|
Comment 5•7 months ago
|
||
How/where can I fill issues against the spec?
Comment 6•7 months ago
|
||
Well, you already did with https://github.com/w3c/csswg-drafts/issues/10514. 😀 You may create another one explicitly targeting the definition of GeometryUtils
.
Sebastian
Comment 7•7 months ago
|
||
Can anyone help me a little bit? I try to write the documentation. But for me it's not clear what the "convertPointFromNode" API does. I thought it converts a point to a coordinate, of the target elment. My polyfill return exactly the same values as the same native Firefox implementation, but I don't really get what it is for.
If you look at my sample: https://jogibear9988.github.io/getBoxQuadsPolyfill/
Click in the Elements "Test Padding" or "Test Padding 6 Border". I then draw a rect in the outer light blue div, wich is positioned relative how you clicked inside of the elements.
Now if you click inside of one of the rotated ones, I would have expected the same. If I click inside of the rotated element in the near of point p1 of the domquad, the rect should show in the upper left corner of the light blue div. But this does not happen.
Can anybody help here?
Comment 8•7 months ago
|
||
Question solved. Found my issue. Needed to subtract the x/y offset before transformation.
I'm now looking to fix the spec. I would also fix the description what the API does. I'm looking to do this at MDN
Comment 9•7 months ago
|
||
I've now created a pull request at css-wg, see: https://github.com/w3c/csswg-drafts/pull/10538
Comment 10•6 months ago
|
||
One more Info.
I suggest adding a offset property to the getBoxQuads API, if it is not present, I'm not able to calculate for example a rect around an element wich is offset. Of course I could use the convertQuadFromNode API, but for this API I then need to know the real element size, wich I don't know for SVG and MathML Elments, cause they are missing offsetWidth Property
Comment 11•7 days ago
|
||
(In reply to Sebastian Zartner [:sebo] from comment #6)
Well, you already did with https://github.com/w3c/csswg-drafts/issues/10514. 😀 You may create another one explicitly targeting the definition of
GeometryUtils
.Sebastian
any Idea how I can increase the pace here?
I'd like this API to get enabled, so chrome maybe also thinks oof implementing it
Description
•