- From: Afterlifepro via GitHub <noreply@w3.org>
- Date: Sat, 05 Jul 2025 14:57:00 +0000
- To: public-fxtf-archive@w3.org
A couple issues with `intersectionRect`/`intersectionQuad` which would need addressing before they're implemented: - `intersectionRect` accepts `DOMQuad` which would cause issues given this situation, as the intersection is clearly a `DOMQuad`: <br><img width="300" alt="A graph showing a quad and rect, with the rect intersecting the quad in such a position that the intersection is a quad" src="https://github.com/user-attachments/assets/dc8a3e85-9153-4b48-a85b-ab4fde1b3f07" /> - This could be resolved by either limiting it to only accept `DOMRect`s or simply removing it and relying on `intersectionQuad` (although this may be undesirable as 9 times out of 10 I imagine people will be using `DOMRect` and this would just be annoying) - `intersectionQuad` could run into issues where the intersection isn't a quad, but instead a triangle, or polygon with >4 points: <br><img width="300" alt="An intersection of 2 quads which causes a triangle" src="https://github.com/user-attachments/assets/37ab8819-c739-4b96-90a5-261248e4ce32" /><img width="300" alt="An intersection of 2 quads which creates a pentagon" src="https://github.com/user-attachments/assets/f705787d-a2b8-4355-8991-21ac30800933" /> - This could be resolved by something like a `DOMPolygon`, however this would probably need these same APIs which could cause complexity for the browser devs, and **_might_** cause issues with `DOMMatrix` (I'm not actually sure because I don't know the maths at all) (Looking at MDN the way it's worded suggests it would be fine but worth making sure) Intersection would probably need to define an algorithm to make sure that edge cases are handled consistently. Ex: <img width="300" alt="Image" src="https://github.com/user-attachments/assets/ee911b14-73b6-4a0d-9fc9-e23e8da03592" /> Its also worth considering if there are any usecases for the intersection APIs, since they seem (to me) like they might cause a lot of issues for browser makers, while not serving much real world use. (Issues moreso stem from quad) -- GitHub Notification of comment by Afterlifepro Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/602#issuecomment-3039060474 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 5 July 2025 14:57:01 UTC