Bug 1873833 - Make tooltips work on anonymous content / UA widgets. r=smaug,Gijs

We also simplify the tooltip text provider loop, and make it work better
now that e.g. the anonymous button in file inputs can be targeted.

Differential Revision: https://phabricator.services.mozilla.com/D203759
This commit is contained in:
Emilio Cobos Álvarez
2024-03-13 11:30:57 +00:00
parent 0a015b760b
commit 2761003cb8
6 changed files with 205 additions and 153 deletions

View File

@@ -1177,7 +1177,7 @@ nsresult ChromeTooltipListener::MouseMove(Event* aMouseEvent) {
}
if (!mShowingTooltip) {
if (nsCOMPtr<EventTarget> eventTarget = aMouseEvent->GetComposedTarget()) {
if (nsCOMPtr<EventTarget> eventTarget = aMouseEvent->GetOriginalTarget()) {
mPossibleTooltipNode = nsINode::FromEventTarget(eventTarget);
}