mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 756975 - make RootAccessible::NativeRole faster, r=tbsaunde
This commit is contained in:
parent
e49ce8531b
commit
5524b9528b
@ -102,17 +102,10 @@ role
|
||||
RootAccessible::NativeRole()
|
||||
{
|
||||
// If it's a <dialog> or <wizard>, use roles::DIALOG instead
|
||||
dom::Element *root = mDocument->GetRootElement();
|
||||
if (root) {
|
||||
nsCOMPtr<nsIDOMElement> rootElement(do_QueryInterface(root));
|
||||
if (rootElement) {
|
||||
nsAutoString name;
|
||||
rootElement->GetLocalName(name);
|
||||
if (name.EqualsLiteral("dialog") || name.EqualsLiteral("wizard")) {
|
||||
return roles::DIALOG; // Always at the root
|
||||
}
|
||||
}
|
||||
}
|
||||
dom::Element* rootElm = mDocument->GetRootElement();
|
||||
if (rootElm && (rootElm->Tag() == nsGkAtoms::dialog ||
|
||||
rootElm->Tag() == nsGkAtoms::wizard))
|
||||
return roles::DIALOG;
|
||||
|
||||
return nsDocAccessibleWrap::NativeRole();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user