Fix BrowserAccessibility::IsLeaf to consider a node's child tree
1. https://chromium-review.googlesource.com/2171436 introduced a change to how `AXPlatformNodeBase::IsLeaf` works; previously, a node would start by querying `AXPlatformNodeBase::GetChildCount` (which relies on `BrowserAccessibility::PlatformChildCount`) to check whether the node has no children (which would make it a leaf by definition). After CL 2171436, `AXPlatformNodeBase::IsLeaf` is delegated to `BrowserAccessibility::PlatformIsLeaf`, but the case of an '<iframe>' is mishandled since now we don't check if the node has a child tree. Fixing `BrowserAccessibility::IsLeaf` to check for the child tree of a node; this will allow several `BrowserAccessibilityPosition`'s methods to correctly traverse into '<iframe>' elements. 2. Introducing a content browser test to validate that methods from `BrowserAccessibilityPosition` can navigate into iframes. 3. Rebaselining `DumpAccessibilityTreeTest.AccessibilityIframe` which incorrectly expected '<iframe>' nodes to be treated as leaves. Bug: 1101480 Change-Id: Ib364ee78a39ef6b7854fc41985bd059dfced8a46 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2364049Reviewed-by:Kurt Catti-Schmidt <kschmi@microsoft.com> Reviewed-by:
Nektarios Paisios <nektar@chromium.org> Commit-Queue: Ethan Jimenez <ethavar@microsoft.com> Cr-Commit-Position: refs/heads/master@{#800321}
Showing
Please register or sign in to comment