Fix for LayoutTests/accessibility/mac/value-change/value-change-user-info-contentedit...
authorandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Mar 2020 04:07:42 +0000 (04:07 +0000)
committerandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Mar 2020 04:07:42 +0000 (04:07 +0000)
commit3de1d63783b84edbc3fbbd5691c201c2e727b094
treee39ef1106b6fb511c4e4d6ab41c52c87efea1687
parent6d9e94c9d3cf383e05f112d2db2fddf7f1d1bc0d
Fix for LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html in IsolatedTree mode.
https://bugs.webkit.org/show_bug.cgi?id=208462

Reviewed by Chris Fleizach.

Covered by LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html.

- Updates the IsolatedTree on the TextStateChange notification.
- Renamed isAccessibilityScrollView to isAccessibilityScrollViewInstance
and used isScrollView instead everywhere it's appropriate. This makes
code like AXObjectCache::rootWebArea work for both AXObjects and IsolatedObjects.
- Moved several utility functions from WebAccessibilityObjectWrapperMac.mm
to AXObjectCacheMac.mm where they belong, so that they can be used by
AXObjectCache implementation in addition to by the wrapper.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::postTextStateChangeNotification):
(WebCore::AXObjectCache::rootWebArea):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isOnScreen const):
(WebCore::AccessibilityObject::scrollToGlobalPoint const):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityObjectInterface.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable const):
* accessibility/AccessibilityScrollView.h:
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityContainer]):
* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::isAccessibilityScrollViewInstance const):
(WebCore::AXIsolatedObject::isAccessibilityScrollView const): Renamed.
* accessibility/isolatedtree/AXIsolatedObject.h:
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postTextStateChangePlatformNotification): Uses
TextMarker utilities instead of calling into the wrapper. This fixes
the crash caused by the wrapper updating the backingObject that in turn
may change the wrapper.
(WebCore::AXTextMarkerRange): Moved from WebAccessibilityObjectWrapperMac.mm.
(WebCore::textMarkerRangeFromMarkers): Moved from WebAccessibilityObjectWrapperMac.mm.
(WebCore::textMarkerForVisiblePosition): Moved from WebAccessibilityObjectWrapperMac.mm.
(WebCore::textMarkerRangeFromVisiblePositions): Moved from WebAccessibilityObjectWrapperMac.mm.
* accessibility/mac/WebAccessibilityObjectWrapperMac.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXTextMarkerRange): Moved.
(textMarkerForVisiblePosition): Moved.
(textMarkerRangeFromMarkers): Moved.
(textMarkerRangeFromVisiblePositions): Moved.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityObjectInterface.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityScrollView.h
Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.h
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm