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•3 years ago
|
Comment 3•1 year 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•1 year 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•1 year ago
|
Comment 5•1 year ago
|
||
How/where can I fill issues against the spec?
Comment 6•1 year 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•1 year 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•1 year 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•1 year ago
|
||
I've now created a pull request at css-wg, see: https://github.com/w3c/csswg-drafts/pull/10538
Comment 10•11 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•5 months 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
Comment 12•2 months ago
|
||
(In reply to jochen.kuehner from comment #11)
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
Emilio, as an editor of CSSOM View, maybe you could review https://github.com/w3c/csswg-drafts/pull/10538.
Once the spec. changes are merged, it will probably be necessary to update the implementation. You should then file bugs for those changes that block this one.
Sebastian
Comment 13•2 months ago
|
||
I don‘t think updates are needed, as I based my polyfill and the spec on the firefox source
Description
•