Closed Bug 1513749 Opened 11 months ago Closed 11 months ago

Deduplicate element(s)FromPoint and nodesFromRect.


(Core :: DOM: CSS Object Model, enhancement)

Not set



Tracking Status
firefox66 --- fixed


(Reporter: emilio, Assigned: emilio)




(4 files)

This will make bug 1513658 trivial.
Also add an IsElement check in GetElementFromPoint in the APZ code since I think
the element cast is unsound in presence of Shadow DOM.
We'll factor the commont bits out in a bit.

Depends on D14355
This way it has a more WebIDL-like signature, which will be helpful in a second.

Depends on D14356
Hey Mats, I don't know how you feel about these. The point of these changes is to make bug 1513658 trivially implementable without duplicating a bunch of logic. But for that the EnumSet stuff is not needed.

I think I like the end result slightly better, but I don't feel too strongly about it, so if you want me to remove the first change I can do that.
Pushed by
Modernize a bit nsLayoutUtils::GetFrameForPoint / GetFrameForArea. r=mats
Move NodesFromRectHelper to DocumentOrShadowRoot. r=mats
Rename and make nodesFromRect infallible. r=mats
Deduplicate NodesFromRect and Element(s)FromPoint. r=mats
You need to log in before you can comment on or make changes to this bug.