[ATK] Use a smart pointer for AccessibilityObject wrapper and remove GTK specific...
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Apr 2019 07:35:24 +0000 (07:35 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Apr 2019 07:35:24 +0000 (07:35 +0000)
commitb1138d0ee3d10884dbc2cfef6103e92c64ce61cc
treeec386629367b8a1cbfdc176aff0fe9e8f0ccb75c
parentecd90de44b1d1a7997e6f96ef4fec9709bdbcc4a
[ATK] Use a smart pointer for AccessibilityObject wrapper and remove GTK specific code
https://bugs.webkit.org/show_bug.cgi?id=196593
<rdar://problem/49599153>

Reviewed by Michael Catanzaro.

Source/WebCore:

We have specific code for GTK to get/set the wrapper only because we don't use smart pointers. Also use
WebKitAccessible as AccessibilityObjectWrapper instead of generic AtkObject, to enforce wrappers to be
WebKitAccessible instances. This requires a few casts to AtkObject.

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::setWrapper):
* accessibility/AccessibilityObjectInterface.h:
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::detachWrapper):
(WebCore::AXObjectCache::attachWrapper):
(WebCore::notifyChildrenSelectionChange):
(WebCore::AXObjectCache::postPlatformNotification):
(WebCore::AXObjectCache::nodeTextChangePlatformNotification):
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
(WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
* accessibility/atk/AccessibilityObjectAtk.cpp:
* accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
(webkitAccessibleComponentRefAccessibleAtPoint):
* accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
(webkitAccessibleHypertextGetLink):
(webkitAccessibleHypertextGetNLinks):
* accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
(webkitAccessibleSelectionRefSelection):
* accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(webkitAccessibleTableRefAt):
(webkitAccessibleTableGetColumnHeader):
(webkitAccessibleTableGetRowHeader):
(webkitAccessibleTableGetCaption):
* accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
(convertToGPtrArray):
(webkitAccessibleTableCellGetTable):
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(accessibilityObjectLength):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(setAtkRelationSetFromCoreObject):
(atkParentOfRootObject):
(webkitAccessibleGetParent):
(webkitAccessibleRefChild):
(isTextWithCaret):
* editing/atk/FrameSelectionAtk.cpp:
(WebCore::emitTextSelectionChange):
(WebCore::maybeEmitTextFocusChange):

Source/WebKit:

* WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp:
(accessibilityRootObjectWrapper): Cast wrapper() as AtkObject.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityObjectInterface.h
Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp
Source/WebCore/accessibility/atk/AccessibilityObjectAtk.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceComponent.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTable.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
Source/WebCore/editing/atk/FrameSelectionAtk.cpp
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp