Bug 1634939. When forwarding afterpaint events the child could have been removed from the doc tree. r=mattwoodrow

Depends on D73565

Differential Revision: https://phabricator.services.mozilla.com/D73566
This commit is contained in:
Timothy Nikkel 2020-05-03 21:03:30 +00:00
Родитель 8f1f560edb
Коммит 3316760312
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -52,6 +52,15 @@ class ReftestFissionChild extends JSWindowActorChild {
switch (msg.name) {
case "ForwardAfterPaintEventToSelfAndParent":
{
// The embedderElement can be null if the child we got this from was removed.
// Not much we can do to transform the rects, but it doesn't matter, the rects
// won't reach reftest-content.js.
if (msg.data.fromBrowsingContext.embedderElement == null) {
this.forwardAfterPaintEventToParent(msg.data.rects, msg.data.originalTargetUri,
/* dispatchToSelfAsWell */ true);
return;
}
// Transform the rects from fromBrowsingContext to us.
// We first translate from the content rect to the border rect of the iframe.
let style = this.contentWindow.getComputedStyle(msg.data.fromBrowsingContext.embedderElement);