Open Bug 1107559 Opened 10 years ago Updated 27 days ago

Enable getBoxQuads & convertFromNode in Release builds

Categories

(Core :: Layout, task)

x86_64
Linux
task

Tracking

()

People

(Reporter: bugs, Unassigned)

References

(Blocks 3 open bugs, )

Details

(Keywords: dev-doc-needed)

We need MDN docs.
See Also: → 626359
Blocks: cssom-view-1
And an actual specification that consists of more than just placeholders.
Severity: normal → S3

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

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

Type: defect → task

How/where can I fill issues against the spec?

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

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?

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

I've now created a pull request at css-wg, see: https://github.com/w3c/csswg-drafts/pull/10538

You need to log in before you can comment on or make changes to this bug.