mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1186536 - make SerializeTree() use IsOuterDoc() to check if an accessible is an outer doc r=davidb
In theory this should be the same, but slightly faster than checking there is one child and it is a document. However it appears ChildCount() sometimes returns 1 when there is no child 0.
This commit is contained in:
parent
1da8beb1bb
commit
829582f021
@ -57,7 +57,8 @@ SerializeTree(Accessible* aRoot, nsTArray<AccessibleData>& aTree)
|
||||
// OuterDocAccessibles are special because we don't want to serialize the
|
||||
// child doc here, we'll call PDocAccessibleConstructor in
|
||||
// NotificationController.
|
||||
if (childCount == 1 && aRoot->GetChildAt(0)->IsDoc())
|
||||
MOZ_ASSERT(!aRoot->IsDoc(), "documents shouldn't be serialized");
|
||||
if (aRoot->IsOuterDoc())
|
||||
childCount = 0;
|
||||
|
||||
aTree.AppendElement(AccessibleData(id, role, childCount, interfaces));
|
||||
|
Loading…
Reference in New Issue
Block a user