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
[DEFAULT]
tags=mtg
subsuite = media
support-files =
common.js
file_bfcache_page1.html
file_bfcache_page2.html
file_setup.html
file_speech_queue.html
file_speech_simple.html
file_speech_cancel.html
file_speech_error.html
file_indirect_service_events.html
file_global_queue.html
file_global_queue_cancel.html
file_global_queue_pause.html
file_speech_repeating_utterance.html
[test_setup.html]
[test_speech_queue.html]
[test_speech_simple.html]
[test_speech_cancel.html]
[test_speech_error.html]
[test_indirect_service_events.html]
[test_global_queue.html]
[test_global_queue_cancel.html]
[test_global_queue_pause.html]
[test_bfcache.html]
[test_speech_repeating_utterance.html]