AX: Going back is broken for VoiceOver
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Oct 2014 19:35:29 +0000 (19:35 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Oct 2014 19:35:29 +0000 (19:35 +0000)
commit11e9c610f61430ed9e6e17a4fc1c06ffbec74ca2
treeb275049f38ee10b556d1dade21fa4e652953a5f7
parent5ca793f32157b8974d98172cd4d96d80788e1980
AX: Going back is broken for VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=137382

Reviewed by Darin Adler.

Source/WebCore:

There were two issues preventing VoiceOver from navigating when using page history to go back/forward.
  1) Existing AXLoadComplete does not get fired when you just move through page history.
       There were existing frameLoad notifications used by GTK. I think we should use those which seem more reliable.
  2) The AccessibilityScrollView cached its children, but on some history page loads, that cache was never cleared out.
       Rather than trying to find those places to clear out the cache, it's easier to just add the elements to the children
       array everytime it's asked for. Since there's only ever 3 elements (web area + 2 scroll bars) this should not be a performance hit.

Tests are not possible since they require monitoring notifications across multiple page loads.

* accessibility/AXObjectCache.h:
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::updateChildrenIfNecessary):
* accessibility/ios/AXObjectCacheIOS.mm:
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
* dom/Document.cpp:
(WebCore::Document::implicitClose):

LayoutTests:

Update tests now that AXLoadComplete is sent more reliably.

* platform/mac/accessibility/aria-expanded-notifications-expected.txt:
* platform/mac/accessibility/aria-expanded-notifications.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/aria-expanded-notifications-expected.txt
LayoutTests/platform/mac/accessibility/aria-expanded-notifications.html
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AXObjectCache.h
Source/WebCore/accessibility/AccessibilityScrollView.cpp
Source/WebCore/accessibility/ios/AXObjectCacheIOS.mm
Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
Source/WebCore/dom/Document.cpp