Bug 1813980: Check IsDoc before Parent in RemoteAccessibleBase::ApplyCrossDocOffset. r=morgan
We call this function on every ancestor when calculating bounds.
RemoteParent() currently requires a hash lookup, so it's more efficient to early return for !IsDoc() first.
This is a micro-optimisation, but it might have some impact given that we call this on every ancestor, especially when hit testing, where we call Bounds() a lot.
As a bit of drive-by cleanup, use RemoteParent() rather than calling Parent() and IsRemote/AsRemote().
Differential Revision:
https://phabricator.services.mozilla.com/D168346
<html>
<script>
var frameUnloaded = function() {
var u = new SpeechSynthesisUtterance('hi');
u.addEventListener('end', function () {
opener.ok(true, 'Successfully spoke utterance from new frame.');
opener.onDone();
});
speechSynthesis.speak(u);
};
</script>
<body onpageshow="frameUnloaded()"></body></html>