Bug 1616797 - Check that accessible's frame still exists in scroll dispatcher r=Jamie

Differential Revision: https://phabricator.services.mozilla.com/D63546

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Eitan Isaacson 2020-02-20 21:12:43 +00:00
Родитель 2bf255b05a
Коммит 777e8fba2d
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -2531,11 +2531,18 @@ void DocAccessible::DispatchScrollingEvent(nsINode* aTarget,
return;
}
nsIFrame* frame = acc->GetFrame();
if (!frame) {
// Although the accessible had a frame at scroll time, it may now be gone
// because of display: contents.
return;
}
LayoutDevicePoint scrollPoint;
LayoutDeviceRect scrollRange;
nsIScrollableFrame* sf = acc == this
? mPresShell->GetRootScrollFrameAsScrollable()
: acc->GetFrame()->GetScrollTargetFrame();
: frame->GetScrollTargetFrame();
// If there is no scrollable frame, it's likely a scroll in a popup, like
// <select>. Just send an event with no scroll info. The scroll info