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
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
Classes = [
{
'cid': '{e7d52d9e-c148-47d8-ab2a-95d7f40ea53d}',
'contract_ids': ['@mozilla.org/fakesynth;1'],
'singleton': True,
'type': 'mozilla::dom::nsFakeSynthServices',
'headers': ['/dom/media/webspeech/synth/test/nsFakeSynthServices.h'],
'constructor': 'mozilla::dom::nsFakeSynthServices::GetInstanceForService',
'categories': {'speech-synth-started': 'Fake Speech Synth'},
},
]