Notify BrowserAccessibilityManager of frame info after already loaded
commit1743bc765f18f8d439f0e9e7f69b8761a654a2ad
authordemarem <demarem@amazon.com>
Tue, 5 May 2015 15:24:03 +0000 (5 08:24 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 5 May 2015 15:24:33 +0000 (5 15:24 +0000)
tree7530b2f814d2f07afa7fd406943cbc5a6402ceb0
parent13df768f704f41a1f21b6515dc620e2838bfe517
Notify BrowserAccessibilityManager of frame info after already loaded

BrowserAccessibilityManager is not notified that frame info is ready
when accessibility wasn't turned on when the frame info was updated in
ContentViewCore. As a result, calls to getAccessibilityNodeProvider()
will not return the node information of the page in this situation.

This arrises when accessibility is turned on after the page was loaded,
such as by UIAutomator. Because BrowserAccessibility is initialized
asynchronously, there is no guarantee that it will complete in time for
the call to getAccessibilityNodeProvider. However, experiments have
shown that many smaller pages (very common for WebView applications)
return accessibility node information successfully after this change.

BUG=482750

Review URL: https://codereview.chromium.org/1119923002

Cr-Commit-Position: refs/heads/master@{#328333}
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java
content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java