Closed Bug 1513749 Opened 5 years ago Closed 5 years ago

Deduplicate element(s)FromPoint and nodesFromRect.

Categories

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

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(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 rgurzau@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/3acd87aa7826
Modernize a bit nsLayoutUtils::GetFrameForPoint / GetFrameForArea. r=mats
https://hg.mozilla.org/mozilla-central/rev/72b9ffb09547
Move NodesFromRectHelper to DocumentOrShadowRoot. r=mats
https://hg.mozilla.org/mozilla-central/rev/4cea8f588b87
Rename and make nodesFromRect infallible. r=mats
https://hg.mozilla.org/mozilla-central/rev/7fde7d6f3628
Deduplicate NodesFromRect and Element(s)FromPoint. r=mats
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: