<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[283304] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/283304">283304</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2021-09-30 00:37:58 -0700 (Thu, 30 Sep 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>[GTK][a11y] Connect UI process a11y tree with the web process when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=230255

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Add AccessibilityAtspi class to connect to the ATSPI DBus service using the address provided. Also add
AccessibilityRootAtspi class that will be the parent object of the accessibility root wrapper, and the children
of the UI process web view. In ATK the AtkSocket and AtkPlug use a private DBus message to send the unique name
of the UI process connection to the web process. That's not possible with GDBus, so we wait for the first
GetState message to be received (which is called right after atk_socket_embed() is called in the UI process) to
get the unique name of the UI process connection. PlatformDisplay has now API to get the DBus address of the
ATSPI service. This is used only in the UI process that sends the address to the web process, so that we don't
need to get it on every web process again.

* PlatformGTK.cmake:
* SourcesGTK.txt:
* accessibility/atspi/AccessibilityAtspi.cpp: Added.
(WebCore::AccessibilityAtspi::AccessibilityAtspi):
(WebCore::AccessibilityAtspi::uniqueName const):
(WebCore::AccessibilityAtspi::nullReference const):
(WebCore::AccessibilityAtspi::registerRoot):
* accessibility/atspi/AccessibilityAtspi.h: Added.
* accessibility/atspi/AccessibilityRootAtspi.cpp: Added.
(WebCore::AccessibilityRootAtspi::create):
(WebCore::AccessibilityRootAtspi::AccessibilityRootAtspi):
(WebCore::AccessibilityRootAtspi::registerObject):
(WebCore::AccessibilityRootAtspi::setPath):
(WebCore::AccessibilityRootAtspi::setParentPath):
(WebCore::AccessibilityRootAtspi::applicationReference const):
(WebCore::AccessibilityRootAtspi::reference const):
* accessibility/atspi/AccessibilityRootAtspi.h: Added.
(WebCore::AccessibilityRootAtspi::atspi const):
* accessibility/atspi/xml/Accessibility.xml: Added.
* accessibility/atspi/xml/Accessible.xml: Added.
* accessibility/atspi/xml/Action.xml: Added.
* accessibility/atspi/xml/Application.xml: Added.
* accessibility/atspi/xml/Cache.xml: Added.
* accessibility/atspi/xml/Collection.xml: Added.
* accessibility/atspi/xml/Component.xml: Added.
* accessibility/atspi/xml/DeviceEventController.xml: Added.
* accessibility/atspi/xml/DeviceEventListener.xml: Added.
* accessibility/atspi/xml/Document.xml: Added.
* accessibility/atspi/xml/EditableText.xml: Added.
* accessibility/atspi/xml/Event.xml: Added.
* accessibility/atspi/xml/Hyperlink.xml: Added.
* accessibility/atspi/xml/Hypertext.xml: Added.
* accessibility/atspi/xml/Image.xml: Added.
* accessibility/atspi/xml/Registry.xml: Added.
* accessibility/atspi/xml/Selection.xml: Added.
* accessibility/atspi/xml/Socket.xml: Added.
* accessibility/atspi/xml/Table.xml: Added.
* accessibility/atspi/xml/TableCell.xml: Added.
* accessibility/atspi/xml/Text.xml: Added.
* accessibility/atspi/xml/Value.xml: Added.
* platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::createPlatformDisplay):
(WebCore::PlatformDisplay::accessibilityBusAddress const):
* platform/graphics/PlatformDisplay.h:
(WebCore::PlatformDisplay::setAccessibilityBusAddress):
(WebCore::PlatformDisplay::plartformAccessibilityBusAddress const):
* platform/graphics/x11/PlatformDisplayX11.cpp:
(WebCore::PlatformDisplayX11::plartformAccessibilityBusAddress const):
* platform/graphics/x11/PlatformDisplayX11.h:

Source/WebKit:

Change BindAccessibilityTree IPC message API to have an async reply. When using ATSPI the UI process replies to
the message including the object path of the AtkSocket, to be used by the web process root object as its parent
property (building the reference with the UI process unique name we get from GetState message).

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const): Encode accessibilityBusAddress.
(WebKit::WebProcessCreationParameters::decode): Decode accessibilityBusAddress.
* Shared/WebProcessCreationParameters.h:
* UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::bindA11y): Set the accessibilityBusAddress to the shared PlatformDisplay so that it doesn't need to be
get again.
* UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
(WebKit::ProvisionalPageProxy::bindAccessibilityTree):
(WebKit::ProvisionalPageProxy::didReceiveMessage):
* UIProcess/ProvisionalPageProxy.h:
(WebKit::ProvisionalPageProxy::CompletionHandler<void):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::swapToProvisionalPage):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/glib/WebProcessPoolGLib.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess): Set the accessibilityBusAddress parameter.
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::bindAccessibilityTree): Call atk_object_ref_state_set() right after atk_socket_embed() to
make sure that's the first GetState message received by the web process root object. Then build the AtkSocket
path and send the async reply.
* UIProcess/wpe/WebPageProxyWPE.cpp:
(WebKit::WebPageProxy::bindAccessibilityTree):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::accessibilityRootObject const):
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformInitialize): Create the root object and send BindAccessibilityTree to the UI process,
setting the root object parent path using the socket path received from the UI process.
* WebProcess/WebPage/wpe/WebPageWPE.cpp:
(WebKit::WebPage::platformInitialize):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::accessibilityAtspi const):
* WebProcess/glib/WebProcessGLib.cpp:
(WebKit::WebProcess::platformInitializeWebProcess): Create the AccessibilityAtspi instance for the given address.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorePlatformGTKcmake">trunk/Source/WebCore/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebCoreSourcesGTKtxt">trunk/Source/WebCore/SourcesGTK.txt</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspiAccessibilityObjectAtspih">trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsPlatformDisplaycpp">trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsPlatformDisplayh">trunk/Source/WebCore/platform/graphics/PlatformDisplay.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsx11PlatformDisplayX11cpp">trunk/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsx11PlatformDisplayX11h">trunk/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.h</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitSharedWebProcessCreationParameterscpp">trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp</a></li>
<li><a href="#trunkSourceWebKitSharedWebProcessCreationParametersh">trunk/Source/WebKit/Shared/WebProcessCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessLauncherglibBubblewrapLaunchercpp">trunk/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessProvisionalPageProxycpp">trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessProvisionalPageProxyh">trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxycpp">trunk/Source/WebKit/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxyh">trunk/Source/WebKit/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxymessagesin">trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKitUIProcessglibWebProcessPoolGLibcpp">trunk/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessgtkWebPageProxyGtkcpp">trunk/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcesswpeWebPageProxyWPEcpp">trunk/Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPageWebPageh">trunk/Source/WebKit/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPagegtkWebPageGtkcpp">trunk/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPagewpeWebPageWPEcpp">trunk/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebProcessh">trunk/Source/WebKit/WebProcess/WebProcess.h</a></li>
<li><a href="#trunkSourceWebKitWebProcessglibWebProcessGLibcpp">trunk/Source/WebKit/WebProcess/glib/WebProcessGLib.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreaccessibilityatspiAccessibilityAtspicpp">trunk/Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspiAccessibilityAtspih">trunk/Source/WebCore/accessibility/atspi/AccessibilityAtspi.h</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspiAccessibilityRootAtspicpp">trunk/Source/WebCore/accessibility/atspi/AccessibilityRootAtspi.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspiAccessibilityRootAtspih">trunk/Source/WebCore/accessibility/atspi/AccessibilityRootAtspi.h</a></li>
<li>trunk/Source/WebCore/accessibility/atspi/xml/</li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlAccessibilityxml">trunk/Source/WebCore/accessibility/atspi/xml/Accessibility.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlAccessiblexml">trunk/Source/WebCore/accessibility/atspi/xml/Accessible.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlActionxml">trunk/Source/WebCore/accessibility/atspi/xml/Action.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlApplicationxml">trunk/Source/WebCore/accessibility/atspi/xml/Application.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlCachexml">trunk/Source/WebCore/accessibility/atspi/xml/Cache.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlCollectionxml">trunk/Source/WebCore/accessibility/atspi/xml/Collection.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlComponentxml">trunk/Source/WebCore/accessibility/atspi/xml/Component.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlDeviceEventControllerxml">trunk/Source/WebCore/accessibility/atspi/xml/DeviceEventController.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlDeviceEventListenerxml">trunk/Source/WebCore/accessibility/atspi/xml/DeviceEventListener.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlDocumentxml">trunk/Source/WebCore/accessibility/atspi/xml/Document.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlEditableTextxml">trunk/Source/WebCore/accessibility/atspi/xml/EditableText.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlEventxml">trunk/Source/WebCore/accessibility/atspi/xml/Event.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlHyperlinkxml">trunk/Source/WebCore/accessibility/atspi/xml/Hyperlink.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlHypertextxml">trunk/Source/WebCore/accessibility/atspi/xml/Hypertext.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlImagexml">trunk/Source/WebCore/accessibility/atspi/xml/Image.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlRegistryxml">trunk/Source/WebCore/accessibility/atspi/xml/Registry.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlSelectionxml">trunk/Source/WebCore/accessibility/atspi/xml/Selection.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlSocketxml">trunk/Source/WebCore/accessibility/atspi/xml/Socket.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlTablexml">trunk/Source/WebCore/accessibility/atspi/xml/Table.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlTableCellxml">trunk/Source/WebCore/accessibility/atspi/xml/TableCell.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlTextxml">trunk/Source/WebCore/accessibility/atspi/xml/Text.xml</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityatspixmlValuexml">trunk/Source/WebCore/accessibility/atspi/xml/Value.xml</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebCore/ChangeLog      2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -1,3 +1,69 @@
</span><ins>+2021-09-30  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK][a11y] Connect UI process a11y tree with the web process when building with ATSPI
+        https://bugs.webkit.org/show_bug.cgi?id=230255
+
+        Reviewed by Adrian Perez de Castro.
+
+        Add AccessibilityAtspi class to connect to the ATSPI DBus service using the address provided. Also add
+        AccessibilityRootAtspi class that will be the parent object of the accessibility root wrapper, and the children
+        of the UI process web view. In ATK the AtkSocket and AtkPlug use a private DBus message to send the unique name
+        of the UI process connection to the web process. That's not possible with GDBus, so we wait for the first
+        GetState message to be received (which is called right after atk_socket_embed() is called in the UI process) to
+        get the unique name of the UI process connection. PlatformDisplay has now API to get the DBus address of the
+        ATSPI service. This is used only in the UI process that sends the address to the web process, so that we don't
+        need to get it on every web process again.
+
+        * PlatformGTK.cmake:
+        * SourcesGTK.txt:
+        * accessibility/atspi/AccessibilityAtspi.cpp: Added.
+        (WebCore::AccessibilityAtspi::AccessibilityAtspi):
+        (WebCore::AccessibilityAtspi::uniqueName const):
+        (WebCore::AccessibilityAtspi::nullReference const):
+        (WebCore::AccessibilityAtspi::registerRoot):
+        * accessibility/atspi/AccessibilityAtspi.h: Added.
+        * accessibility/atspi/AccessibilityRootAtspi.cpp: Added.
+        (WebCore::AccessibilityRootAtspi::create):
+        (WebCore::AccessibilityRootAtspi::AccessibilityRootAtspi):
+        (WebCore::AccessibilityRootAtspi::registerObject):
+        (WebCore::AccessibilityRootAtspi::setPath):
+        (WebCore::AccessibilityRootAtspi::setParentPath):
+        (WebCore::AccessibilityRootAtspi::applicationReference const):
+        (WebCore::AccessibilityRootAtspi::reference const):
+        * accessibility/atspi/AccessibilityRootAtspi.h: Added.
+        (WebCore::AccessibilityRootAtspi::atspi const):
+        * accessibility/atspi/xml/Accessibility.xml: Added.
+        * accessibility/atspi/xml/Accessible.xml: Added.
+        * accessibility/atspi/xml/Action.xml: Added.
+        * accessibility/atspi/xml/Application.xml: Added.
+        * accessibility/atspi/xml/Cache.xml: Added.
+        * accessibility/atspi/xml/Collection.xml: Added.
+        * accessibility/atspi/xml/Component.xml: Added.
+        * accessibility/atspi/xml/DeviceEventController.xml: Added.
+        * accessibility/atspi/xml/DeviceEventListener.xml: Added.
+        * accessibility/atspi/xml/Document.xml: Added.
+        * accessibility/atspi/xml/EditableText.xml: Added.
+        * accessibility/atspi/xml/Event.xml: Added.
+        * accessibility/atspi/xml/Hyperlink.xml: Added.
+        * accessibility/atspi/xml/Hypertext.xml: Added.
+        * accessibility/atspi/xml/Image.xml: Added.
+        * accessibility/atspi/xml/Registry.xml: Added.
+        * accessibility/atspi/xml/Selection.xml: Added.
+        * accessibility/atspi/xml/Socket.xml: Added.
+        * accessibility/atspi/xml/Table.xml: Added.
+        * accessibility/atspi/xml/TableCell.xml: Added.
+        * accessibility/atspi/xml/Text.xml: Added.
+        * accessibility/atspi/xml/Value.xml: Added.
+        * platform/graphics/PlatformDisplay.cpp:
+        (WebCore::PlatformDisplay::createPlatformDisplay):
+        (WebCore::PlatformDisplay::accessibilityBusAddress const):
+        * platform/graphics/PlatformDisplay.h:
+        (WebCore::PlatformDisplay::setAccessibilityBusAddress):
+        (WebCore::PlatformDisplay::plartformAccessibilityBusAddress const):
+        * platform/graphics/x11/PlatformDisplayX11.cpp:
+        (WebCore::PlatformDisplayX11::plartformAccessibilityBusAddress const):
+        * platform/graphics/x11/PlatformDisplayX11.h:
+
</ins><span class="cx"> 2021-09-29  Kimmo Kinnunen  <kkinnunen@apple.com>
</span><span class="cx"> 
</span><span class="cx">         GPUP Cocoa GraphicsContextGLOpenGL should check for ANGLE presence
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformGTK.cmake (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformGTK.cmake   2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebCore/PlatformGTK.cmake      2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -54,7 +54,9 @@
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><span class="cx"> list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
</span><ins>+    accessibility/atspi/AccessibilityAtspi.h
</ins><span class="cx">     accessibility/atspi/AccessibilityObjectAtspi.h
</span><ins>+    accessibility/atspi/AccessibilityRootAtspi.h
</ins><span class="cx"> 
</span><span class="cx">     platform/adwaita/ScrollbarThemeAdwaita.h
</span><span class="cx"> 
</span><span class="lines">@@ -174,3 +176,41 @@
</span><span class="cx">         platform/ScrollAnimationSmooth.cpp
</span><span class="cx">     )
</span><span class="cx"> endif ()
</span><ins>+
+if (USE_ATSPI)
+    set(WebCore_AtspiInterfaceFiles
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Accessible.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Action.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Application.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Cache.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Collection.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Component.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/DeviceEventController.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/DeviceEventListener.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Document.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/EditableText.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Event.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Hyperlink.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Hypertext.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Image.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Registry.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Selection.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Socket.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/TableCell.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Table.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Text.xml
+        ${WEBCORE_DIR}/accessibility/atspi/xml/Value.xml
+    )
+
+    add_custom_command(
+        OUTPUT ${WebCore_DERIVED_SOURCES_DIR}/AccessibilityAtspiInterfaces.h ${WebCore_DERIVED_SOURCES_DIR}/AccessibilityAtspiInterfaces.c
+        DEPENDS ${WebCore_AtspiInterfaceFiles}
+        COMMAND gdbus-codegen --interface-prefix=org.a11y.atspi --c-namespace=webkit --pragma-once --interface-info-header --output=${WebCore_DERIVED_SOURCES_DIR}/AccessibilityAtspiInterfaces.h ${WebCore_AtspiInterfaceFiles}
+        COMMAND gdbus-codegen --interface-prefix=org.a11y.atspi --c-namespace=webkit --interface-info-body --output=${WebCore_DERIVED_SOURCES_DIR}/AccessibilityAtspiInterfaces.c ${WebCore_AtspiInterfaceFiles}
+        VERBATIM
+    )
+
+    list(APPEND WebCore_SOURCES
+        ${WebCore_DERIVED_SOURCES_DIR}/AccessibilityAtspiInterfaces.c
+    )
+endif ()
</ins></span></pre></div>
<a id="trunkSourceWebCoreSourcesGTKtxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/SourcesGTK.txt (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/SourcesGTK.txt      2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebCore/SourcesGTK.txt 2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -39,7 +39,9 @@
</span><span class="cx"> accessibility/atk/WebKitAccessibleInterfaceValue.cpp
</span><span class="cx"> accessibility/atk/WebKitAccessibleUtil.cpp
</span><span class="cx"> 
</span><ins>+accessibility/atspi/AccessibilityAtspi.cpp
</ins><span class="cx"> accessibility/atspi/AccessibilityObjectAtspi.cpp
</span><ins>+accessibility/atspi/AccessibilityRootAtspi.cpp
</ins><span class="cx"> accessibility/atspi/AXObjectCacheAtspi.cpp
</span><span class="cx"> 
</span><span class="cx"> accessibility/isolatedtree/atspi/AXIsolatedObjectAtspi.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspiAccessibilityAtspicpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp                          (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp     2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,87 @@
</span><ins>+/*
+ * Copyright (C) 2021 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "AccessibilityAtspi.h"
+
+#if ENABLE(ACCESSIBILITY) && USE(ATSPI)
+#include "AccessibilityAtspiInterfaces.h"
+#include "AccessibilityRootAtspi.h"
+#include <gio/gio.h>
+#include <glib/gi18n-lib.h>
+#include <wtf/MainThread.h>
+#include <wtf/UUID.h>
+#include <wtf/glib/GUniquePtr.h>
+
+namespace WebCore {
+
+AccessibilityAtspi::AccessibilityAtspi(const String& busAddress)
+    : m_queue(WorkQueue::create("org.webkit.a11y"))
+{
+    RELEASE_ASSERT(isMainThread());
+    if (busAddress.isEmpty())
+        return;
+    m_queue->dispatch([this, busAddress = busAddress.isolatedCopy()] {
+        GUniqueOutPtr<GError> error;
+        m_connection = adoptGRef(g_dbus_connection_new_for_address_sync(busAddress.utf8().data(),
+            static_cast<GDBusConnectionFlags>(G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT | G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION),
+            nullptr, nullptr, &error.outPtr()));
+        if (!m_connection)
+            g_warning("Can't connect to a11y bus: %s", error->message);
+    });
+}
+
+const char* AccessibilityAtspi::uniqueName() const
+{
+    RELEASE_ASSERT(!isMainThread());
+    return m_connection ? g_dbus_connection_get_unique_name(m_connection.get()) : nullptr;
+}
+
+GVariant* AccessibilityAtspi::nullReference() const
+{
+    RELEASE_ASSERT(!isMainThread());
+    return g_variant_new("(so)", uniqueName(), "/org/a11y/atspi/null");
+}
+
+void AccessibilityAtspi::registerRoot(AccessibilityRootAtspi& rootObject, Vector<std::pair<GDBusInterfaceInfo*, GDBusInterfaceVTable*>>&& interfaces, CompletionHandler<void(const String&)>&& completionHandler)
+{
+    RELEASE_ASSERT(isMainThread());
+    m_queue->dispatch([this, rootObject = makeRef(rootObject), interfaces = WTFMove(interfaces), completionHandler = WTFMove(completionHandler)]() mutable {
+        String reference;
+        if (m_connection) {
+            String path = makeString("/org/a11y/webkit/accessible/", createCanonicalUUIDString().replace('-', '_'));
+            Vector<unsigned, 2> registeredObjects;
+            registeredObjects.reserveInitialCapacity(interfaces.size());
+            for (const auto& interface : interfaces) {
+                auto id = g_dbus_connection_register_object(m_connection.get(), path.utf8().data(), interface.first, interface.second, rootObject.ptr(), nullptr, nullptr);
+                registeredObjects.uncheckedAppend(id);
+            }
+            m_rootObjects.add(rootObject.ptr(), WTFMove(registeredObjects));
+            reference = makeString(uniqueName(), ':', path);
+            rootObject->setPath(WTFMove(path));
+        }
+        RunLoop::main().dispatch([reference = reference.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
+            completionHandler(reference);
+        });
+    });
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ACCESSIBILITY) && USE(ATSPI)
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspiAccessibilityAtspihfromrev283303trunkSourceWebCoreaccessibilityatspiAccessibilityObjectAtspih"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/accessibility/atspi/AccessibilityAtspi.h (from rev 283303, trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.h) (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/AccessibilityAtspi.h                            (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/AccessibilityAtspi.h       2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+/*
+ * Copyright (C) 2021 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#pragma once
+
+#if ENABLE(ACCESSIBILITY) && USE(ATSPI)
+#include <wtf/CompletionHandler.h>
+#include <wtf/FastMalloc.h>
+#include <wtf/HashMap.h>
+#include <wtf/Vector.h>
+#include <wtf/WorkQueue.h>
+#include <wtf/glib/GRefPtr.h>
+
+typedef struct _GDBusConnection GDBusConnection;
+typedef struct _GDBusInterfaceInfo GDBusInterfaceInfo;
+typedef struct _GDBusInterfaceVTable GDBusInterfaceVTable;
+
+namespace WebCore {
+class AccessibilityObjectAtspi;
+class AccessibilityRootAtspi;
+
+class AccessibilityAtspi {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    AccessibilityAtspi(const String&);
+    ~AccessibilityAtspi() = default;
+
+    const char* uniqueName() const;
+    GVariant* nullReference() const;
+
+    void registerRoot(AccessibilityRootAtspi&, Vector<std::pair<GDBusInterfaceInfo*, GDBusInterfaceVTable*>>&&, CompletionHandler<void(const String&)>&&);
+
+private:
+    Ref<WorkQueue> m_queue;
+    GRefPtr<GDBusConnection> m_connection;
+    HashMap<AccessibilityRootAtspi*, Vector<unsigned, 2>> m_rootObjects;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ACCESSIBILITY) && USE(ATSPI)
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspiAccessibilityObjectAtspih"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.h (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.h      2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.h 2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> class AXCoreObject;
</span><span class="cx"> 
</span><del>-class AccessibilityObjectAtspi: public ThreadSafeRefCounted<AccessibilityObjectAtspi> {
</del><ins>+class AccessibilityObjectAtspi: final public ThreadSafeRefCounted<AccessibilityObjectAtspi> {
</ins><span class="cx"> public:
</span><span class="cx">     static Ref<AccessibilityObjectAtspi> create(AXCoreObject*);
</span><span class="cx">     ~AccessibilityObjectAtspi() = default;
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspiAccessibilityRootAtspicpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/AccessibilityRootAtspi.cpp (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/AccessibilityRootAtspi.cpp                              (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/AccessibilityRootAtspi.cpp 2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,167 @@
</span><ins>+/*
+ * Copyright (C) 2021 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "AccessibilityRootAtspi.h"
+
+#if ENABLE(ACCESSIBILITY) && USE(ATSPI)
+#include "AccessibilityAtspiInterfaces.h"
+#include "Page.h"
+#include <glib/gi18n-lib.h>
+#include <wtf/MainThread.h>
+
+namespace WebCore {
+
+Ref<AccessibilityRootAtspi> AccessibilityRootAtspi::create(const Page& page, AccessibilityAtspi& atspi)
+{
+    return adoptRef(*new AccessibilityRootAtspi(page, atspi));
+}
+
+AccessibilityRootAtspi::AccessibilityRootAtspi(const Page& page, AccessibilityAtspi& atspi)
+    : m_atspi(atspi)
+    , m_page(makeWeakPtr(page))
+{
+    RELEASE_ASSERT(isMainThread());
+}
+
+GDBusInterfaceVTable AccessibilityRootAtspi::s_accessibleFunctions = {
+    // method_call
+    [](GDBusConnection*, const gchar* sender, const gchar*, const gchar*, const gchar* methodName, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer userData) {
+        RELEASE_ASSERT(!isMainThread());
+
+        auto& rootObject = *static_cast<AccessibilityRootAtspi*>(userData);
+        if (!g_strcmp0(methodName, "GetRole"))
+            g_dbus_method_invocation_return_value(invocation, g_variant_new("(u)", 0));
+        else if (!g_strcmp0(methodName, "GetRoleName"))
+            g_dbus_method_invocation_return_value(invocation, g_variant_new("(s)", "filler"));
+        else if (!g_strcmp0(methodName, "GetLocalizedRoleName"))
+            g_dbus_method_invocation_return_value(invocation, g_variant_new("(s)", _("filler")));
+        else if (!g_strcmp0(methodName, "GetState")) {
+#if USE(GTK4)
+            // FIXME: we need a way to get the parent atspi reference in GTK4.
+#else
+            // Since we don't have a way to know the unique name of the UI process, right after calling
+            // atk_socket_embed() the UI process calls atk_object_ref_state_set() to force a GetState message.
+            // We use this first GetState message to set the sender as the parent unique name.
+            if (rootObject.m_parentUniqueName.isNull())
+                rootObject.m_parentUniqueName = sender;
+#endif
+            GVariantBuilder builder = G_VARIANT_BUILDER_INIT(G_VARIANT_TYPE("(au)"));
+
+            g_variant_builder_open(&builder, G_VARIANT_TYPE("au"));
+            g_variant_builder_add(&builder, "u", 0);
+            g_variant_builder_add(&builder, "u", 0);
+            g_variant_builder_close(&builder);
+
+            g_dbus_method_invocation_return_value(invocation, g_variant_builder_end(&builder));
+        } else if (!g_strcmp0(methodName, "GetAttributes")) {
+            GVariantBuilder builder = G_VARIANT_BUILDER_INIT(G_VARIANT_TYPE("(a{ss})"));
+
+            g_variant_builder_open(&builder, G_VARIANT_TYPE("a{ss}"));
+#if PLATFORM(GTK)
+            g_variant_builder_add(&builder, "{ss}", "toolkit", "WebKitGTK");
+#elif PLATFORM(WPE)
+            g_variant_builder_add(&builder, "{ss}", "toolkit", "WPEWebKit");
+#endif
+            g_variant_builder_close(&builder);
+
+            g_dbus_method_invocation_return_value(invocation, g_variant_builder_end(&builder));
+        } else if (!g_strcmp0(methodName, "GetApplication"))
+            g_dbus_method_invocation_return_value(invocation, g_variant_new("(@(so))", rootObject.applicationReference()));
+        else if (!g_strcmp0(methodName, "GetChildAtIndex"))
+            g_dbus_method_invocation_return_value(invocation, g_variant_new("(@(so))", rootObject.atspi().nullReference()));
+        else if (!g_strcmp0(methodName, "GetChildren")) {
+            GVariantBuilder builder = G_VARIANT_BUILDER_INIT(G_VARIANT_TYPE("a(so)"));
+            g_dbus_method_invocation_return_value(invocation, g_variant_new("(a(so))", &builder));
+        } else if (!g_strcmp0(methodName, "GetIndexInParent")) {
+            g_dbus_method_invocation_return_value(invocation, g_variant_new("(i)", 0));
+        } else if (!g_strcmp0(methodName, "GetRelationSet")) {
+            GVariantBuilder builder = G_VARIANT_BUILDER_INIT(G_VARIANT_TYPE("a(ua(so))"));
+            g_dbus_method_invocation_return_value(invocation, g_variant_new("(a(ua(so)))", &builder));
+        } else if (!g_strcmp0(methodName, "GetInterfaces")) {
+            GVariantBuilder builder = G_VARIANT_BUILDER_INIT(G_VARIANT_TYPE("as"));
+
+            g_variant_builder_add(&builder, "s", webkit_accessible_interface.name);
+            g_dbus_method_invocation_return_value(invocation, g_variant_new("(as)", &builder));
+        }
+    },
+    // get_property
+    [](GDBusConnection*, const gchar* sender, const gchar*, const gchar*, const gchar* propertyName, GError** error, gpointer userData) -> GVariant* {
+        RELEASE_ASSERT(!isMainThread());
+
+        auto& rootObject = *static_cast<AccessibilityRootAtspi*>(userData);
+        if (!g_strcmp0(propertyName, "Name"))
+            return g_variant_new_string("");
+        if (!g_strcmp0(propertyName, "Description"))
+            return g_variant_new_string("");
+        if (!g_strcmp0(propertyName, "Locale"))
+            return g_variant_new_string(setlocale(LC_MESSAGES, nullptr));
+        if (!g_strcmp0(propertyName, "AccessibleId"))
+            return g_variant_new_string("");
+        if (!g_strcmp0(propertyName, "Parent"))
+            return g_variant_new("(so)", rootObject.m_parentUniqueName.utf8().data(), rootObject.m_parentPath.utf8().data());
+        if (!g_strcmp0(propertyName, "ChildCount"))
+            return g_variant_new_int32(0);
+
+        g_set_error(error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "Unknown property '%s'", propertyName);
+        return nullptr;
+    },
+    // set_property,
+    nullptr,
+    // padding
+    nullptr
+};
+
+void AccessibilityRootAtspi::registerObject(CompletionHandler<void(const String&)>&& completionHandler)
+{
+    RELEASE_ASSERT(isMainThread());
+    Vector<std::pair<GDBusInterfaceInfo*, GDBusInterfaceVTable*>> interfaces;
+    interfaces.append({ const_cast<GDBusInterfaceInfo*>(&webkit_accessible_interface), &s_accessibleFunctions });
+    m_atspi.registerRoot(*this, WTFMove(interfaces), WTFMove(completionHandler));
+}
+
+void AccessibilityRootAtspi::setPath(String&& path)
+{
+    RELEASE_ASSERT(!isMainThread());
+    m_path = WTFMove(path);
+}
+
+void AccessibilityRootAtspi::setParentPath(String&& path)
+{
+    RELEASE_ASSERT(isMainThread());
+    m_parentPath = WTFMove(path);
+}
+
+GVariant* AccessibilityRootAtspi::applicationReference() const
+{
+    RELEASE_ASSERT(!isMainThread());
+    if (m_parentUniqueName.isNull())
+        return m_atspi.nullReference();
+    return g_variant_new("(so)", m_parentUniqueName.utf8().data(), "/org/a11y/atspi/accessible/root");
+}
+
+GVariant* AccessibilityRootAtspi::reference() const
+{
+    RELEASE_ASSERT(!isMainThread());
+    return g_variant_new("(so)", m_atspi.uniqueName(), m_path.utf8().data());
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ACCESSIBILITY) && USE(ATSPI)
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspiAccessibilityRootAtspihfromrev283303trunkSourceWebCoreaccessibilityatspiAccessibilityObjectAtspih"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/accessibility/atspi/AccessibilityRootAtspi.h (from rev 283303, trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.h) (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/AccessibilityRootAtspi.h                                (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/AccessibilityRootAtspi.h   2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) 2021 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#pragma once
+
+#if ENABLE(ACCESSIBILITY) && USE(ATSPI)
+#include "AccessibilityAtspi.h"
+#include <wtf/FastMalloc.h>
+#include <wtf/ThreadSafeRefCounted.h>
+#include <wtf/WeakPtr.h>
+
+typedef struct _GVariant GVariant;
+
+namespace WebCore {
+class AccessibilityObjectAtspi;
+class Page;
+
+class AccessibilityRootAtspi final : public ThreadSafeRefCounted<AccessibilityRootAtspi> {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    static Ref<AccessibilityRootAtspi> create(const Page&, AccessibilityAtspi&);
+    ~AccessibilityRootAtspi() = default;
+
+    void registerObject(CompletionHandler<void(const String&)>&&);
+    void setPath(String&&);
+    void setParentPath(String&&);
+
+    GVariant* reference() const;
+    GVariant* applicationReference() const;
+    AccessibilityAtspi& atspi() const { return m_atspi; }
+
+private:
+    AccessibilityRootAtspi(const Page&, AccessibilityAtspi&);
+
+    static GDBusInterfaceVTable s_accessibleFunctions;
+
+    AccessibilityAtspi& m_atspi;
+    WeakPtr<Page> m_page;
+    String m_path;
+    String m_parentUniqueName;
+    String m_parentPath;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ACCESSIBILITY) && USE(ATSPI)
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlAccessibilityxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Accessibility.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Accessibility.xml                           (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Accessibility.xml      2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<spec xmlns:xi="http://www.w3.org/2001/XInclude">
+  <xi:include href="Accessible.xml" parse="xml"/>
+  <xi:include href="Action.xml" parse="xml"/>
+  <xi:include href="Application.xml" parse="xml"/>
+  <xi:include href="Collection.xml" parse="xml"/>
+  <xi:include href="Component.xml" parse="xml"/>
+  <xi:include href="Document.xml" parse="xml"/>
+  <xi:include href="Hypertext.xml" parse="xml"/>
+  <xi:include href="Hyperlink.xml" parse="xml"/>
+  <xi:include href="Image.xml" parse="xml"/>
+  <xi:include href="Selection.xml" parse="xml"/>
+  <xi:include href="Table.xml" parse="xml"/>
+  <xi:include href="TableCell.xml" parse="xml"/>
+  <xi:include href="Text.xml" parse="xml"/>
+  <xi:include href="EditableText.xml" parse="xml"/>
+  <xi:include href="Cache.xml" parse="xml"/>
+  <xi:include href="Value.xml" parse="xml"/>
+  <xi:include href="Registry.xml" parse="xml"/>
+  <xi:include href="DeviceEventController.xml" parse="xml"/>
+  <xi:include href="DeviceEventListener.xml" parse="xml"/>
+</spec>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlAccessiblexml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Accessible.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Accessible.xml                              (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Accessible.xml 2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Accessible">
+
+  <property name="Name" type="s" access="read"/>
+
+  <property name="Description" type="s" access="read"/>
+
+  <property name="Parent" type="(so)" access="read">
+    <annotation name="org.qtproject.QtDBus.QtTypeName" value="QSpiObjectReference"/>
+  </property>
+
+  <property name="ChildCount" type="i" access="read"/>
+
+  <property name="Locale" type="s" access="read"/>
+
+  <property name="AccessibleId" type="s" access="read"/>
+
+  <method name="GetChildAtIndex">
+    <arg direction="in" name="index" type="i"/>
+    <arg direction="out" type="(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
+  </method>
+
+  <method name="GetChildren">
+    <arg direction="out" type="a(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReferenceArray"/>
+  </method>
+
+  <method name="GetIndexInParent">
+    <arg direction="out" type="i"/>
+  </method>
+
+  <method name="GetRelationSet">
+    <arg direction="out" type="a(ua(so))"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiRelationArray"/>
+  </method>
+
+  <method name="GetRole">
+    <arg direction="out" type="u"/>
+  </method>
+
+  <method name="GetRoleName">
+    <arg direction="out" type="s"/>
+  </method>
+
+  <method name="GetLocalizedRoleName">
+    <arg direction="out" type="s"/>
+  </method>
+
+  <method name="GetState">
+    <arg direction="out" type="au"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiIntList"/>
+  </method>
+
+  <method name="GetAttributes">
+    <arg direction="out" type="a{ss}"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiAttributeSet"/>
+  </method>
+
+  <method name="GetApplication">
+    <arg direction="out" type="(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
+  </method>
+
+  <method name="GetInterfaces">
+    <arg direction="out" type="as"/>
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlActionxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Action.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Action.xml                          (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Action.xml     2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Action">
+
+  <property name="NActions" type="i" access="read"/>
+
+  <method name="GetDescription">
+    <arg type="i" name="index" direction="in"/>
+    <arg type="s" direction="out"/>
+  </method>
+
+  <method name="GetName">
+    <arg type="i" name="index" direction="in"/>
+    <arg type="s" direction="out"/>
+  </method>
+
+  <method name="GetLocalizedName">
+    <arg type="i" name="index" direction="in"/>
+    <arg type="s" direction="out"/>
+  </method>
+
+  <method name="GetKeyBinding">
+    <arg type="i" name="index" direction="in"/>
+    <arg type="s" direction="out"/>
+  </method>
+
+  <method name="GetActions">
+    <arg direction="out" type="a(sss)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiActionArray"/>
+  </method>
+
+  <method name="DoAction">
+    <arg direction="in" name="index" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlApplicationxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Application.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Application.xml                             (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Application.xml        2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Application">
+
+  <property name="ToolkitName" type="s" access="read"/>
+
+  <property name="Version" type="s" access="read"/>
+
+  <property name="AtspiVersion" type="s" access="read"/>
+  <property name="Id" type="i" access="readwrite"/>
+
+  <method name="GetLocale">
+    <arg direction="in" name="lctype" type="u"/>
+    <arg direction="out" type="s"/>
+  </method>
+
+  <method name="RegisterEventListener">
+    <arg direction="in" name="event" type="s"/>
+  </method>
+
+  <method name="DeregisterEventListener">
+    <arg direction="in" name="event" type="s"/>
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlCachexml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Cache.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Cache.xml                           (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Cache.xml      2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Cache">
+
+  <method name="GetItems">
+    <arg direction="out" name="nodes" type="a((so)(so)(so)iiassusau)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiAccessibleCacheArray"/>
+  </method>
+
+  <signal name="AddAccessible">
+    <arg direction="in" name="nodeAdded" type="((so)(so)(so)iiassusau)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiAccessibleCacheItem"/>
+  </signal>
+
+  <signal name="RemoveAccessible">
+    <arg direction="in" name="nodeRemoved" type="(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiObjectReference"/>
+  </signal>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlCollectionxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Collection.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Collection.xml                              (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Collection.xml 2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Collection">
+
+  <method name="GetMatches">
+    <arg direction="in" name="rule" type="(auuasuauusub)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiMatchRule"/>
+    <arg direction="in" name="sortby" type="u"/>
+    <arg direction="in" name="count" type="i"/>
+    <arg direction="in" name="traverse" type="b"/>
+    <arg direction="out" type="a(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiReferenceSet"/>
+  </method>
+
+  <method name="GetMatchesTo">
+    <arg direction="in" name="current_object" type="o"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiObjectReference"/>
+    <arg direction="in" name="rule" type="(auuasuauusub)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QSpiMatchRule"/>
+    <arg direction="in" name="sortby" type="u"/>
+    <arg direction="in" name="tree" type="u"/>
+    <arg direction="in" name="limit_scope" type="b"/>
+    <arg direction="in" name="count" type="i"/>
+    <arg direction="in" name="traverse" type="b"/>
+    <arg direction="out" type="a(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiReferenceSet"/>
+  </method>
+
+  <method name="GetMatchesFrom">
+    <arg direction="in" name="current_object" type="o"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiObjectReference"/>
+    <arg direction="in" name="rule" type="(auuasuauusub)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QSpiMatchRule"/>
+    <arg direction="in" name="sortby" type="u"/>
+    <arg direction="in" name="tree" type="u"/>
+    <arg direction="in" name="count" type="i"/>
+    <arg direction="in" name="traverse" type="b"/>
+    <arg direction="out" type="a(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiReferenceSet"/>
+  </method>
+
+  <method name="GetActiveDescendant">
+    <arg direction="out" type="(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiReferenceSet"/>
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlComponentxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Component.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Component.xml                               (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Component.xml  2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,86 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Component">
+
+  <method name="Contains">
+    <arg direction="in" name="x" type="i"/>
+    <arg direction="in" name="y" type="i"/>
+    <arg direction="in" name="coord_type" type="u"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="GetAccessibleAtPoint">
+    <arg direction="in" name="x" type="i"/>
+    <arg direction="in" name="y" type="i"/>
+    <arg direction="in" name="coord_type" type="u"/>
+    <arg direction="out" type="(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
+  </method>
+
+  <method name="GetExtents">
+    <arg direction="in" name="coord_type" type="u"/>
+    <arg direction="out" type="(iiii)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiRect"/>
+  </method>
+
+  <method name="GetPosition">
+    <arg direction="in" name="coord_type" type="u"/>
+    <arg direction="out" name="x" type="i"/>
+    <arg direction="out" name="y" type="i"/>
+  </method>
+
+  <method name="GetSize">
+    <arg direction="out" name="width" type="i"/>
+    <arg direction="out" name="height" type="i"/>
+  </method>
+
+  <method name="GetLayer">
+    <arg direction="out" type="u"/>
+  </method>
+
+  <method name="GetMDIZOrder">
+    <arg direction="out" type="n"/>
+  </method>
+
+  <method name="GrabFocus">
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="GetAlpha">
+    <arg direction="out" type="d"/>
+  </method>
+
+  <method name="SetExtents">
+    <arg direction="in" name="x" type="i"/>
+    <arg direction="in" name="y" type="i"/>
+    <arg direction="in" name="width" type="i"/>
+    <arg direction="in" name="height" type="i"/>
+    <arg direction="in" name="coord_type" type="u"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="SetPosition">
+    <arg direction="in" name="x" type="i"/>
+    <arg direction="in" name="y" type="i"/>
+    <arg direction="in" name="coord_type" type="u"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="SetSize">
+    <arg direction="in" name="width" type="i"/>
+    <arg direction="in" name="height" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="ScrollTo">
+    <arg direction="in" name="type" type="u"/>
+  </method>
+
+  <method name="ScrollToPoint">
+    <arg direction="in" name="type" type="u"/>
+    <arg direction="in" name="x" type="i"/>
+    <arg direction="in" name="y" type="i"/>
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlDeviceEventControllerxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/DeviceEventController.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/DeviceEventController.xml                           (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/DeviceEventController.xml      2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.DeviceEventController">
+
+  <method name="RegisterKeystrokeListener">
+    <arg direction="in" name="listener" type="o"/>
+    <arg direction="in" name="keys" type="a(iisi)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QSpiKeyTypeArray"/>
+    <arg direction="in" name="mask" type="u"/>
+    <arg direction="in" name="type" type="au"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QSpiEventTypeArray"/>
+    <arg direction="in" name="mode" type="(bbb)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QSpiEventMode"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="DeregisterKeystrokeListener">
+    <arg direction="in" name="listener" type="o"/>
+    <arg direction="in" name="keys" type="a(iisi)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QSpiKeyTypeArray"/>
+    <arg direction="in" name="mask" type="u"/>
+    <arg direction="in" name="type" type="u"/>
+  </method>
+
+  <method name="RegisterDeviceEventListener">
+    <arg direction="in" name="listener" type="o"/>
+    <arg direction="in" name="types" type="u"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="DeregisterDeviceEventListener">
+    <arg direction="in" name="listener" type="o"/>
+    <arg direction="in" name="types" type="u"/>
+  </method>
+
+  <method name="GenerateKeyboardEvent">
+    <arg direction="in" name="keycode" type="i"/>
+    <arg direction="in" name="keystring" type="s"/>
+    <arg direction="in" name="type" type="u"/>
+  </method>
+
+  <method name="GenerateMouseEvent">
+    <arg direction="in" name="x" type="i"/>
+    <arg direction="in" name="y" type="i"/>
+    <arg direction="in" name="eventName" type="s"/>
+  </method>
+
+  <method name="NotifyListenersSync">
+    <arg direction="in" name="event" type="(uiuuisb)"/>
+    <arg direction="out" type="b"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiDeviceEvent"/>
+  </method>
+
+  <method name="NotifyListenersAsync">
+    <arg direction="in" name="event" type="(uiuuisb)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiDeviceEvent"/>
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlDeviceEventListenerxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/DeviceEventListener.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/DeviceEventListener.xml                             (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/DeviceEventListener.xml        2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.DeviceEventListener">
+
+  <method name="NotifyEvent">
+    <arg direction="in" name="event" type="(uiuuisb)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiDeviceEvent"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlDocumentxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Document.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Document.xml                                (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Document.xml   2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Document">
+
+  <property name="CurrentPageNumber" type="i" access="read"/>
+
+  <property name="PageCount" type="i" access="read"/>
+
+  <method name="GetLocale">
+    <arg direction="out" type="s"/>
+  </method>
+
+  <method name="GetAttributeValue">
+    <arg direction="in" name="attributename" type="s"/>
+    <arg direction="out" type="s"/>
+  </method>
+
+  <method name="GetAttributes">
+    <arg direction="out" type="a{ss}"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiAttributeSet"/>
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlEditableTextxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/EditableText.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/EditableText.xml                            (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/EditableText.xml       2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.EditableText">
+
+  <method name="SetTextContents">
+    <arg direction="in" name="newContents" type="s"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="InsertText">
+    <arg direction="in" name="position" type="i"/>
+    <arg direction="in" name="text" type="s"/>
+    <arg direction="in" name="length" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="CopyText">
+    <arg direction="in" name="startPos" type="i"/>
+    <arg direction="in" name="endPos" type="i"/>
+  </method>
+
+  <method name="CutText">
+    <arg direction="in" name="startPos" type="i"/>
+    <arg direction="in" name="endPos" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="DeleteText">
+    <arg direction="in" name="startPos" type="i"/>
+    <arg direction="in" name="endPos" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="PasteText">
+    <arg direction="in" name="position" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlEventxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Event.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Event.xml                           (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Event.xml      2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,193 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+
+<interface name="org.a11y.atspi.Event.Object">
+       <signal name="PropertyChange"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="BoundsChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="LinkSelected"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="StateChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="ChildrenChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="VisibleDataChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="SelectionChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="ModelChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="ActiveDescendantChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="RowInserted"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="RowReordered"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="RowDeleted"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="ColumnInserted"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="ColumnReordered"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="ColumnDeleted"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="TextBoundsChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="TextSelectionChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="TextChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="TextAttributesChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="TextCaretMoved"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="AttributesChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+</interface>
+
+<interface name="org.a11y.atspi.Event.Window">
+       <signal name="PropertyChange"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Minimize"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Maximize"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Restore"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Close"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Create"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Reparent"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="DesktopCreate"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="DesktopDestroy"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Destroy"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Activate"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Deactivate"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Raise"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Lower"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Move"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Resize"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Shade"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="uUshade"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Restyle"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+</interface>
+
+<interface name="org.a11y.atspi.Event.Mouse">
+       <signal name="Abs"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Rel"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Button"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+</interface>
+
+<interface name="org.a11y.atspi.Event.Keyboard">
+       <signal name="Modifiers"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+</interface>
+
+<interface name="org.a11y.atspi.Event.Terminal">
+       <signal name="LineChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="ColumncountChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="LinecountChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="ApplicationChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="CharwidthChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+</interface>
+
+<interface name="org.a11y.atspi.Event.Document">
+       <signal name="LoadComplete"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="Reload"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="LoadStopped"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="ContentChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="AttributesChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+       <signal name="PageChanged"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+</interface>
+
+<interface name="org.a11y.atspi.Event.Focus">
+       <signal name="Focus"><arg direction="in" type="(suuv)"/>
+          <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
+        </signal>
+</interface>
+
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlHyperlinkxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Hyperlink.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Hyperlink.xml                               (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Hyperlink.xml  2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Hyperlink">
+
+  <property name="NAnchors" type="n" access="read"/>
+
+  <property name="StartIndex" type="i" access="read"/>
+
+  <property name="EndIndex" type="i" access="read"/>
+
+  <method name="GetObject">
+    <arg direction="in" name="i" type="i"/>
+    <arg direction="out" type="(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
+  </method>
+
+  <method name="GetURI">
+    <arg direction="in" name="i" type="i"/>
+    <arg direction="out" type="s"/>
+  </method>
+
+  <method name="IsValid">
+    <arg direction="out" type="b"/>
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlHypertextxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Hypertext.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Hypertext.xml                               (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Hypertext.xml  2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Hypertext">
+
+  <method name="GetNLinks">
+    <arg direction="out" type="i"/>
+  </method>
+
+  <method name="GetLink">
+    <arg direction="in" name="linkIndex" type="i"/>
+    <arg direction="out" type="(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
+  </method>
+
+  <method name="GetLinkIndex">
+    <arg direction="in" name="characterIndex" type="i"/>
+    <arg direction="out" type="i"/>
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlImagexml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Image.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Image.xml                           (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Image.xml      2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Image">
+
+  <property name="ImageDescription" type="s" access="read"/>
+
+  <property name="ImageLocale" type="s" access="read"/>
+
+  <method name="GetImageExtents">
+    <arg direction="in" name="coordType" type="u"/>
+    <arg direction="out" type="(iiii)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiRect"/>
+  </method>
+
+  <method name="GetImagePosition">
+    <arg direction="out" name="x" type="i"/>
+    <arg direction="out" name="y" type="i"/>
+    <arg direction="in" name="coordType" type="u"/>
+  </method>
+
+  <method name="GetImageSize">
+    <arg direction="out" name="width" type="i"/>
+    <arg direction="out" name="height" type="i"/>
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlRegistryxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Registry.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Registry.xml                                (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Registry.xml   2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Registry">
+
+  <method name="RegisterEvent">
+    <arg direction="in" name="event" type="s">
+    </arg>
+  </method>
+
+  <method name="DeregisterEvent">
+    <arg direction="in" name="event" type="s">
+    </arg>
+  </method>
+
+  <method name="GetRegisteredEvents">
+    <arg direction="out" name="events" type="a(ss)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiEventListenerArray"/>
+  </method>
+
+  <signal name="EventListenerRegistered">
+    <arg direction="out" name="bus" type="s"/>
+    <arg direction="out" name="path" type="s"/>
+  </signal>
+
+  <signal name="EventListenerDeregistered">
+    <arg direction="out" name="bus" type="s"/>
+    <arg direction="out" name="path" type="s"/>
+  </signal>
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlSelectionxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Selection.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Selection.xml                               (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Selection.xml  2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Selection">
+
+  <property name="NSelectedChildren" type="i" access="read"/>
+
+  <method name="GetSelectedChild">
+    <arg direction="in" name="selectedChildIndex" type="i"/>
+    <arg direction="out" type="(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
+  </method>
+
+  <method name="SelectChild">
+    <arg direction="in" name="childIndex" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="DeselectSelectedChild">
+    <arg direction="in" name="selectedChildIndex" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="IsChildSelected">
+    <arg direction="in" name="childIndex" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="SelectAll">
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="ClearSelection">
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="DeselectChild">
+    <arg direction="in" name="childIndex" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlSocketxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Socket.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Socket.xml                          (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Socket.xml     2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Socket">
+
+  <method name="Embed">
+    <arg direction="in" name="plug" type="(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiObjectReference"/>
+    <arg direction="out" name="socket" type="(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
+  </method>
+
+  <method name="Unembed">
+    <arg direction="in" name="plug" type="(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiObjectReference"/>
+  </method>
+
+  <signal name="Available">
+    <arg direction="in" name="socket" type="(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiObjectReference"/>
+  </signal>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlTablexml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Table.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Table.xml                           (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Table.xml      2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,135 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Table">
+
+  <property name="NRows" type="i" access="read"/>
+
+  <property name="NColumns" type="i" access="read"/>
+
+  <property name="Caption" type="(so)" access="read">
+    <annotation name="org.qtproject.QtDBus.QtTypeName" value="QSpiObjectReference"/>
+  </property>
+
+  <property name="Summary" type="(so)" access="read">
+    <annotation name="org.qtproject.QtDBus.QtTypeName" value="QSpiObjectReference"/>
+  </property>
+
+  <property name="NSelectedRows" type="i" access="read"/>
+
+  <property name="NSelectedColumns" type="i" access="read"/>
+
+  <method name="GetAccessibleAt">
+    <arg direction="in" name="row" type="i"/>
+    <arg direction="in" name="column" type="i"/>
+    <arg direction="out" type="(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
+  </method>
+
+  <method name="GetIndexAt">
+    <arg direction="in" name="row" type="i"/>
+    <arg direction="in" name="column" type="i"/>
+    <arg direction="out" type="i"/>
+  </method>
+
+  <method name="GetRowAtIndex">
+    <arg direction="in" name="index" type="i"/>
+    <arg direction="out" type="i"/>
+  </method>
+
+  <method name="GetColumnAtIndex">
+    <arg direction="in" name="index" type="i"/>
+    <arg direction="out" type="i"/>
+  </method>
+
+  <method name="GetRowDescription">
+    <arg direction="in" name="row" type="i"/>
+    <arg direction="out" type="s"/>
+  </method>
+
+  <method name="GetColumnDescription">
+    <arg direction="in" name="column" type="i"/>
+    <arg direction="out" type="s"/>
+  </method>
+
+  <method name="GetRowExtentAt">
+    <arg direction="in" name="row" type="i"/>
+    <arg direction="in" name="column" type="i"/>
+    <arg direction="out" type="i"/>
+  </method>
+
+  <method name="GetColumnExtentAt">
+    <arg direction="in" name="row" type="i"/>
+    <arg direction="in" name="column" type="i"/>
+    <arg direction="out" type="i"/>
+  </method>
+
+  <method name="GetRowHeader">
+    <arg direction="in" name="row" type="i"/>
+    <arg direction="out" type="(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
+  </method>
+
+  <method name="GetColumnHeader">
+    <arg direction="in" name="column" type="i"/>
+    <arg direction="out" type="(so)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
+  </method>
+
+  <method name="GetSelectedRows">
+    <arg direction="out" type="ai"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiIntList"/>
+  </method>
+
+  <method name="GetSelectedColumns">
+    <arg direction="out" type="ai"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiIntList"/>
+  </method>
+
+  <method name="IsRowSelected">
+    <arg direction="in" name="row" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="IsColumnSelected">
+    <arg direction="in" name="column" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="IsSelected">
+    <arg direction="in" name="row" type="i"/>
+    <arg direction="in" name="column" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="AddRowSelection">
+    <arg direction="in" name="row" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="AddColumnSelection">
+    <arg direction="in" name="column" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="RemoveRowSelection">
+    <arg direction="in" name="row" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="RemoveColumnSelection">
+    <arg direction="in" name="column" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="GetRowColumnExtentsAtIndex">
+    <arg direction="in" name="index" type="i"/>
+    <arg direction="out" type="b"/>
+    <arg direction="out" name="row" type="i"/>
+    <arg direction="out" name="col" type="i"/>
+    <arg direction="out" name="row_extents" type="i"/>
+    <arg direction="out" name="col_extents" type="i"/>
+    <arg direction="out" name="is_selected" type="b"/>
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlTableCellxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/TableCell.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/TableCell.xml                               (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/TableCell.xml  2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.TableCell">
+
+  <property access="read" name="ColumnSpan" type="i" />
+
+  <property access="read" name="Position" type="(ii)">
+    <annotation name="org.qtproject.QtDBus.QtTypeName" value="QPoint"/>
+  </property>
+
+  <property access="read" name="RowSpan" type="i" />
+
+  <property access="read" name="Table" type="(so)">
+    <annotation name="org.qtproject.QtDBus.QtTypeName" value="QSpiObjectReference"/>
+  </property>
+
+  <method name="GetRowColumnSpan">
+    <arg direction="out" type="b" />
+    <arg direction="out" name="row" type="i" />
+    <arg direction="out" name="col" type="i" />
+    <arg direction="out" name="row_extents" type="i" />
+    <arg direction="out" name="col_extents" type="i" />
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlTextxml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Text.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Text.xml                            (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Text.xml       2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,173 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Text">
+
+  <property name="CharacterCount" type="i" access="read"/>
+
+  <property name="CaretOffset" type="i" access="read"/>
+
+  <method name="GetStringAtOffset">
+    <arg direction="in" name="offset" type="i"/>
+    <arg direction="in" name="granularity" type="u"/>
+    <arg direction="out" type="s"/>
+    <arg direction="out" name="startOffset" type="i"/>
+    <arg direction="out" name="endOffset" type="i"/>
+  </method>
+
+  <method name="GetText">
+    <arg direction="in" name="startOffset" type="i"/>
+    <arg direction="in" name="endOffset" type="i"/>
+    <arg direction="out" type="s"/>
+  </method>
+
+  <method name="SetCaretOffset">
+    <arg direction="in" name="offset" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="GetTextBeforeOffset">
+    <arg direction="in" name="offset" type="i"/>
+    <arg direction="in" name="type" type="u"/>
+    <arg direction="out" type="s"/>
+    <arg direction="out" name="startOffset" type="i"/>
+    <arg direction="out" name="endOffset" type="i"/>
+  </method>
+
+  <method name="GetTextAtOffset">
+    <arg direction="in" name="offset" type="i"/>
+    <arg direction="in" name="type" type="u"/>
+    <arg direction="out" type="s"/>
+    <arg direction="out" name="startOffset" type="i"/>
+    <arg direction="out" name="endOffset" type="i"/>
+  </method>
+
+  <method name="GetTextAfterOffset">
+    <arg direction="in" name="offset" type="i"/>
+    <arg direction="in" name="type" type="u"/>
+    <arg direction="out" type="s"/>
+    <arg direction="out" name="startOffset" type="i"/>
+    <arg direction="out" name="endOffset" type="i"/>
+  </method>
+
+  <method name="GetCharacterAtOffset">
+    <arg name="offset" type="i" direction="in"/>
+    <arg type="i" direction="out"/>
+  </method>
+
+  <method name="GetAttributeValue">
+    <arg direction="in" name="offset" type="i"/>
+    <arg direction="in" name="attributeName" type="s"/>
+    <arg direction="out" type="s"/>
+  </method>
+
+  <method name="GetAttributes">
+    <arg direction="in" name="offset" type="i"/>
+    <arg direction="out" type="a{ss}"/>
+    <arg direction="out" name="startOffset" type="i"/>
+    <arg direction="out" name="endOffset" type="i"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiAttributeSet"/>
+  </method>
+
+  <method name="GetDefaultAttributes">
+    <arg direction="out" type="a{ss}"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiAttributeSet"/>
+  </method>
+
+  <method name="GetCharacterExtents">
+    <arg direction="in" name="offset" type="i"/>
+    <arg direction="out" name="x" type="i"/>
+    <arg direction="out" name="y" type="i"/>
+    <arg direction="out" name="width" type="i"/>
+    <arg direction="out" name="height" type="i"/>
+    <arg direction="in" name="coordType" type="u"/>
+  </method>
+
+  <method name="GetOffsetAtPoint">
+    <arg direction="in" name="x" type="i"/>
+    <arg direction="in" name="y" type="i"/>
+    <arg direction="in" name="coordType" type="u"/>
+    <arg direction="out" type="i"/>
+  </method>
+
+  <method name="GetNSelections">
+    <arg direction="out" type="i"/>
+  </method>
+
+  <method name="GetSelection">
+    <arg direction="in" name="selectionNum" type="i"/>
+    <arg direction="out" name="startOffset" type="i"/>
+    <arg direction="out" name="endOffset" type="i"/>
+  </method>
+
+  <method name="AddSelection">
+    <arg direction="in" name="startOffset" type="i"/>
+    <arg direction="in" name="endOffset" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="RemoveSelection">
+    <arg direction="in" name="selectionNum" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="SetSelection">
+    <arg direction="in" name="selectionNum" type="i"/>
+    <arg direction="in" name="startOffset" type="i"/>
+    <arg direction="in" name="endOffset" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="GetRangeExtents">
+    <arg direction="in" name="startOffset" type="i"/>
+    <arg direction="in" name="endOffset" type="i"/>
+    <arg direction="out" name="x" type="i"/>
+    <arg direction="out" name="y" type="i"/>
+    <arg direction="out" name="width" type="i"/>
+    <arg direction="out" name="height" type="i"/>
+    <arg direction="in" name="coordType" type="u"/>
+  </method>
+
+  <method name="GetBoundedRanges">
+    <arg direction="in" name="x" type="i"/>
+    <arg direction="in" name="y" type="i"/>
+    <arg direction="in" name="width" type="i"/>
+    <arg direction="in" name="height" type="i"/>
+    <arg direction="in" name="coordType" type="u"/>
+    <arg direction="in" name="xClipType" type="u"/>
+    <arg direction="in" name="yClipType" type="u"/>
+    <arg direction="out" type="a(iisv)"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiRangeList"/>
+  </method>
+
+  <method name="GetAttributeRun">
+    <arg direction="in" name="offset" type="i"/>
+    <arg direction="in" name="includeDefaults" type="b"/>
+    <arg direction="out" type="a{ss}"/>
+    <arg direction="out" name="startOffset" type="i"/>
+    <arg direction="out" name="endOffset" type="i"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiAttributeSet"/>
+  </method>
+
+  <method name="GetDefaultAttributeSet">
+    <arg direction="out" type="a{ss}"/>
+    <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiAttributeSet"/>
+  </method>
+
+  <method name="ScrollSubstringTo">
+    <arg direction="in" name="startOffset" type="i"/>
+    <arg direction="in" name="endOffset" type="i"/>
+    <arg direction="in" name="type" type="u"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+  <method name="ScrollSubstringToPoint">
+    <arg direction="in" name="startOffset" type="i"/>
+    <arg direction="in" name="endOffset" type="i"/>
+    <arg direction="in" name="type" type="u"/>
+    <arg direction="in" name="x" type="i"/>
+    <arg direction="in" name="y" type="i"/>
+    <arg direction="out" type="b"/>
+  </method>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatspixmlValuexml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/accessibility/atspi/xml/Value.xml (0 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atspi/xml/Value.xml                           (rev 0)
+++ trunk/Source/WebCore/accessibility/atspi/xml/Value.xml      2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/node">
+<interface name="org.a11y.atspi.Value">
+
+        <property name="MinimumValue" type="d" access="read"/>
+
+        <property name="MaximumValue" type="d" access="read"/>
+
+        <property name="MinimumIncrement" type="d" access="read"/>
+
+        <property name="CurrentValue" type="d" access="readwrite"/>
+
+</interface>
+</node>
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsPlatformDisplaycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp       2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp  2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -84,6 +84,10 @@
</span><span class="cx"> #include <lcms2.h>
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if USE(ATSPI)
+#include <wtf/glib/GUniquePtr.h>
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr<PlatformDisplay> PlatformDisplay::createPlatformDisplay()
</span><span class="lines">@@ -92,13 +96,25 @@
</span><span class="cx">     if (gtk_init_check(nullptr, nullptr)) {
</span><span class="cx">         GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get());
</span><span class="cx"> #if PLATFORM(X11)
</span><del>-        if (GDK_IS_X11_DISPLAY(display))
-            return PlatformDisplayX11::create(GDK_DISPLAY_XDISPLAY(display));
</del><ins>+        if (GDK_IS_X11_DISPLAY(display)) {
+            auto platformDisplay = PlatformDisplayX11::create(GDK_DISPLAY_XDISPLAY(display));
+#if USE(ATSPI) && USE(GTK4)
+            if (const char* atspiBusAddress = static_cast<const char*>(g_object_get_data(G_OBJECT(display), "-gtk-atspi-bus-address")))
+                platformDisplay->m_accessibilityBusAddress = String::fromUTF8(atspiBusAddress);
</ins><span class="cx"> #endif
</span><ins>+            return platformDisplay;
+        }
+#endif
</ins><span class="cx"> #if PLATFORM(WAYLAND)
</span><del>-        if (GDK_IS_WAYLAND_DISPLAY(display))
-            return PlatformDisplayWayland::create(gdk_wayland_display_get_wl_display(display));
</del><ins>+        if (GDK_IS_WAYLAND_DISPLAY(display)) {
+            auto platformDisplay = PlatformDisplayWayland::create(gdk_wayland_display_get_wl_display(display));
+#if USE(ATSPI) && USE(GTK4)
+            if (const char* atspiBusAddress = static_cast<const char*>(g_object_get_data(G_OBJECT(display), "-gtk-atspi-bus-address")))
+                platformDisplay->m_accessibilityBusAddress = String::fromUTF8(atspiBusAddress);
</ins><span class="cx"> #endif
</span><ins>+            return platformDisplay;
+        }
+#endif
</ins><span class="cx">     }
</span><span class="cx"> #endif // PLATFORM(GTK)
</span><span class="cx"> 
</span><span class="lines">@@ -281,4 +297,48 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if USE(ATSPI)
+const String& PlatformDisplay::accessibilityBusAddress() const
+{
+    if (m_accessibilityBusAddress)
+        return m_accessibilityBusAddress.value();
+
+    const char* address = g_getenv("AT_SPI_BUS_ADDRESS");
+    if (address && *address) {
+        m_accessibilityBusAddress = String::fromUTF8(address);
+        return m_accessibilityBusAddress.value();
+    }
+
+    auto platformAddress = plartformAccessibilityBusAddress();
+    if (!platformAddress.isEmpty()) {
+        m_accessibilityBusAddress = platformAddress;
+        return m_accessibilityBusAddress.value();
+    }
+
+    GRefPtr<GDBusConnection> sessionBus = adoptGRef(g_bus_get_sync(G_BUS_TYPE_SESSION, nullptr, nullptr));
+    if (sessionBus.get()) {
+        GRefPtr<GDBusMessage> message = adoptGRef(g_dbus_message_new_method_call("org.a11y.Bus", "/org/a11y/bus", "org.a11y.Bus", "GetAddress"));
+        g_dbus_message_set_body(message.get(), g_variant_new("()"));
+        GRefPtr<GDBusMessage> reply = adoptGRef(g_dbus_connection_send_message_with_reply_sync(sessionBus.get(), message.get(),
+            G_DBUS_SEND_MESSAGE_FLAGS_NONE, 30000, nullptr, nullptr, nullptr));
+        if (reply) {
+            GUniqueOutPtr<GError> error;
+            if (g_dbus_message_to_gerror(reply.get(), &error.outPtr())) {
+                if (!g_error_matches(error.get(), G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN))
+                    WTFLogAlways("Can't find a11y bus: %s", error->message);
+            } else {
+                GUniqueOutPtr<char> a11yAddress;
+                g_variant_get(g_dbus_message_get_body(reply.get()), "(s)", &a11yAddress.outPtr());
+                m_accessibilityBusAddress = String::fromUTF8(a11yAddress.get());
+                return m_accessibilityBusAddress.value();
+            }
+        }
+    }
+
+    WTFLogAlways("Could not determine the accessibility bus address");
+    m_accessibilityBusAddress = String();
+    return m_accessibilityBusAddress.value();
+}
+#endif
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsPlatformDisplayh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/PlatformDisplay.h (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/PlatformDisplay.h 2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebCore/platform/graphics/PlatformDisplay.h    2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -23,11 +23,11 @@
</span><span class="cx">  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef PlatformDisplay_h
-#define PlatformDisplay_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><span class="cx"> #include <wtf/TypeCasts.h>
</span><ins>+#include <wtf/text/WTFString.h>
</ins><span class="cx"> 
</span><span class="cx"> #if USE(EGL)
</span><span class="cx"> typedef void *EGLDisplay;
</span><span class="lines">@@ -90,6 +90,11 @@
</span><span class="cx">     virtual cmsHPROFILE colorProfile() const;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if USE(ATSPI)
+    void setAccessibilityBusAddress(String&& address) { m_accessibilityBusAddress = WTFMove(address); }
+    const String& accessibilityBusAddress() const;
+#endif
+
</ins><span class="cx"> protected:
</span><span class="cx">     enum class NativeDisplayOwned { No, Yes };
</span><span class="cx">     explicit PlatformDisplay(NativeDisplayOwned);
</span><span class="lines">@@ -112,6 +117,12 @@
</span><span class="cx">     mutable cmsHPROFILE m_iccProfile { nullptr };
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if USE(ATSPI)
+    virtual String plartformAccessibilityBusAddress() const { return { }; }
+
+    mutable std::optional<String> m_accessibilityBusAddress;
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx">     static std::unique_ptr<PlatformDisplay> createPlatformDisplay();
</span><span class="cx"> 
</span><span class="lines">@@ -137,5 +148,3 @@
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::ToClassName) \
</span><span class="cx">     static bool isType(const WebCore::PlatformDisplay& display) { return display.type() == WebCore::PlatformDisplay::Type::DisplayType; } \
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_END()
</span><del>-
-#endif // PltformDisplay_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsx11PlatformDisplayX11cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp        2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp   2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #include "PlatformDisplayX11.h"
</span><span class="cx"> 
</span><span class="cx"> #include "GLContext.h"
</span><ins>+#include "XErrorTrapper.h"
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(X11)
</span><span class="cx"> #include <X11/Xatom.h>
</span><span class="lines">@@ -220,6 +221,25 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if USE(ATSPI)
+String PlatformDisplayX11::plartformAccessibilityBusAddress() const
+{
+    Atom atspiBusAtom = XInternAtom(m_display, "AT_SPI_BUS", False);
+    Atom type;
+    int format;
+    unsigned long itemCount, bytesAfter;
+    unsigned char* data = nullptr;
+    XErrorTrapper trapper(m_display, XErrorTrapper::Policy::Ignore);
+    XGetWindowProperty(m_display, RootWindowOfScreen(DefaultScreenOfDisplay(m_display)), atspiBusAtom, 0L, 8192, False, XA_STRING, &type, &format, &itemCount, &bytesAfter, &data);
+
+    String atspiBusAddress = String::fromUTF8(reinterpret_cast<char*>(data));
+    if (data)
+        XFree(data);
+
+    return atspiBusAddress;
+}
+#endif
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // PLATFORM(X11)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsx11PlatformDisplayX11h"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.h (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.h  2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.h     2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -64,6 +64,10 @@
</span><span class="cx">     cmsHPROFILE colorProfile() const override;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if USE(ATSPI)
+    String plartformAccessibilityBusAddress() const override;
+#endif
+
</ins><span class="cx">     ::Display* m_display { nullptr };
</span><span class="cx">     mutable std::optional<bool> m_supportsXComposite;
</span><span class="cx">     mutable std::optional<bool> m_supportsXDamage;
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/ChangeLog       2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -1,3 +1,51 @@
</span><ins>+2021-09-30  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK][a11y] Connect UI process a11y tree with the web process when building with ATSPI
+        https://bugs.webkit.org/show_bug.cgi?id=230255
+
+        Reviewed by Adrian Perez de Castro.
+
+        Change BindAccessibilityTree IPC message API to have an async reply. When using ATSPI the UI process replies to
+        the message including the object path of the AtkSocket, to be used by the web process root object as its parent
+        property (building the reference with the UI process unique name we get from GetState message).
+
+        * Shared/WebProcessCreationParameters.cpp:
+        (WebKit::WebProcessCreationParameters::encode const): Encode accessibilityBusAddress.
+        (WebKit::WebProcessCreationParameters::decode): Decode accessibilityBusAddress.
+        * Shared/WebProcessCreationParameters.h:
+        * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
+        (WebKit::bindA11y): Set the accessibilityBusAddress to the shared PlatformDisplay so that it doesn't need to be
+        get again.
+        * UIProcess/ProvisionalPageProxy.cpp:
+        (WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
+        (WebKit::ProvisionalPageProxy::bindAccessibilityTree):
+        (WebKit::ProvisionalPageProxy::didReceiveMessage):
+        * UIProcess/ProvisionalPageProxy.h:
+        (WebKit::ProvisionalPageProxy::CompletionHandler<void):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::swapToProvisionalPage):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * UIProcess/glib/WebProcessPoolGLib.cpp:
+        (WebKit::WebProcessPool::platformInitializeWebProcess): Set the accessibilityBusAddress parameter.
+        * UIProcess/gtk/WebPageProxyGtk.cpp:
+        (WebKit::WebPageProxy::bindAccessibilityTree): Call atk_object_ref_state_set() right after atk_socket_embed() to
+        make sure that's the first GetState message received by the web process root object. Then build the AtkSocket
+        path and send the async reply.
+        * UIProcess/wpe/WebPageProxyWPE.cpp:
+        (WebKit::WebPageProxy::bindAccessibilityTree):
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::accessibilityRootObject const):
+        * WebProcess/WebPage/gtk/WebPageGtk.cpp:
+        (WebKit::WebPage::platformInitialize): Create the root object and send BindAccessibilityTree to the UI process,
+        setting the root object parent path using the socket path received from the UI process.
+        * WebProcess/WebPage/wpe/WebPageWPE.cpp:
+        (WebKit::WebPage::platformInitialize):
+        * WebProcess/WebProcess.h:
+        (WebKit::WebProcess::accessibilityAtspi const):
+        * WebProcess/glib/WebProcessGLib.cpp:
+        (WebKit::WebProcess::platformInitializeWebProcess): Create the AccessibilityAtspi instance for the given address.
+
</ins><span class="cx"> 2021-09-29  Ada Chan  <ada.chan@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [WebXR] Hold a foreground assertion for the duration of the immersive session
</span></span></pre></div>
<a id="trunkSourceWebKitSharedWebProcessCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp      2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp 2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -214,10 +214,15 @@
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(WPE)
</span><span class="cx">     encoder << memoryPressureHandlerConfiguration;
</span><span class="cx"> #endif
</span><ins>+
</ins><span class="cx"> #if USE(GLIB)
</span><span class="cx">     encoder << applicationID;
</span><span class="cx">     encoder << applicationName;
</span><span class="cx"> #endif
</span><ins>+
+#if USE(ATSPI)
+    encoder << accessibilityBusAddress;
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebProcessCreationParameters::decode(IPC::Decoder& decoder, WebProcessCreationParameters& parameters)
</span><span class="lines">@@ -598,6 +603,14 @@
</span><span class="cx">         return false;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if USE(ATSPI)
+    std::optional<String> accessibilityBusAddress;
+    decoder >> accessibilityBusAddress;
+    if (!accessibilityBusAddress)
+        return false;
+    parameters.accessibilityBusAddress = WTFMove(*accessibilityBusAddress);
+#endif
+
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitSharedWebProcessCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.h (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.h        2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.h   2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -265,6 +265,10 @@
</span><span class="cx">     String applicationID;
</span><span class="cx">     String applicationName;
</span><span class="cx"> #endif
</span><ins>+
+#if USE(ATSPI)
+    String accessibilityBusAddress;
+#endif
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessLauncherglibBubblewrapLaunchercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp       2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp  2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -514,6 +514,9 @@
</span><span class="cx">                 GUniqueOutPtr<char> a11yAddress;
</span><span class="cx">                 g_variant_get(g_dbus_message_get_body(reply.get()), "(s)", &a11yAddress.outPtr());
</span><span class="cx">                 proxy.setAddress(a11yAddress.get(), DBusAddressType::Abstract);
</span><ins>+#if USE(ATSPI)
+                PlatformDisplay::sharedDisplay().setAccessibilityBusAddress(makeString("unix:path=", proxy.proxyPath().data()));
+#endif
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessProvisionalPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp   2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp      2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -103,6 +103,11 @@
</span><span class="cx"> 
</span><span class="cx"> ProvisionalPageProxy::~ProvisionalPageProxy()
</span><span class="cx"> {
</span><ins>+#if PLATFORM(GTK) || PLATFORM(WPE)
+    if (m_accessibilityBindCompletionHandler)
+        m_accessibilityBindCompletionHandler({ });
+#endif
+
</ins><span class="cx">     if (!m_wasCommitted) {
</span><span class="cx">         m_page.inspectorController().willDestroyProvisionalPage(*this);
</span><span class="cx"> 
</span><span class="lines">@@ -422,9 +427,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(WPE)
</span><del>-void ProvisionalPageProxy::bindAccessibilityTree(const String& plugID)
</del><ins>+void ProvisionalPageProxy::bindAccessibilityTree(const String& plugID, CompletionHandler<void(String&&)>&& completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     m_accessibilityPlugID = plugID;
</span><ins>+    m_accessibilityBindCompletionHandler = WTFMove(completionHandler);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -489,7 +495,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(WPE)
</span><span class="cx">     if (decoder.messageName() == Messages::WebPageProxy::BindAccessibilityTree::name()) {
</span><del>-        IPC::handleMessage<Messages::WebPageProxy::BindAccessibilityTree>(connection, decoder, this, &ProvisionalPageProxy::bindAccessibilityTree);
</del><ins>+        IPC::handleMessageAsync<Messages::WebPageProxy::BindAccessibilityTree>(connection, decoder, this, &ProvisionalPageProxy::bindAccessibilityTree);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessProvisionalPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.h (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.h     2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.h        2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -96,6 +96,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(WPE)
</span><span class="cx">     const String& accessibilityPlugID() { return m_accessibilityPlugID; }
</span><ins>+    CompletionHandler<void(String&&)> takeAccessibilityBindCompletionHandler() { return std::exchange(m_accessibilityBindCompletionHandler, nullptr); }
</ins><span class="cx"> #endif
</span><span class="cx"> #if HAVE(VISIBILITY_PROPAGATION_VIEW)
</span><span class="cx">     LayerHostingContextID contextIDForVisibilityPropagationInWebProcess() const { return m_contextIDForVisibilityPropagationInWebProcess; }
</span><span class="lines">@@ -148,7 +149,7 @@
</span><span class="cx">     void registerWebProcessAccessibilityToken(const IPC::DataReference&);
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(WPE)
</span><del>-    void bindAccessibilityTree(const String&);
</del><ins>+    void bindAccessibilityTree(const String&, CompletionHandler<void(String&&)>&&);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(CONTENT_FILTERING)
</span><span class="cx">     void contentFilterDidBlockLoadForFrame(const WebCore::ContentFilterUnblockHandler&, WebCore::FrameIdentifier);
</span><span class="lines">@@ -178,6 +179,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(WPE)
</span><span class="cx">     String m_accessibilityPlugID;
</span><ins>+    CompletionHandler<void(String&&)> m_accessibilityBindCompletionHandler;
</ins><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(IOS_FAMILY)
</span><span class="cx">     UniqueRef<ProcessThrottler::ForegroundActivity> m_provisionalLoadActivity;
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp   2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp      2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -974,9 +974,8 @@
</span><span class="cx">         registerWebProcessAccessibilityToken({ accessibilityToken.data(), accessibilityToken.size() });
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(WPE)
</span><del>-    auto accessibilityPlugID = provisionalPage->accessibilityPlugID();
-    if (!accessibilityPlugID.isEmpty())
-        bindAccessibilityTree(accessibilityPlugID);
</del><ins>+    if (auto completionHandler = provisionalPage->takeAccessibilityBindCompletionHandler())
+        bindAccessibilityTree(provisionalPage->accessibilityPlugID(), WTFMove(completionHandler));
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.h     2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h        2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -2235,7 +2235,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(WPE)
</span><del>-    void bindAccessibilityTree(const String&);
</del><ins>+    void bindAccessibilityTree(const String&, CompletionHandler<void(String&&)>&&);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in   2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in      2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -185,7 +185,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(WPE)
</span><span class="cx">     # Support for connecting the Accessibility worlds of the UI and the Web processes
</span><del>-    BindAccessibilityTree(String plugID)
</del><ins>+    BindAccessibilityTree(String plugID) -> (String socketPath) Async
</ins><span class="cx"> 
</span><span class="cx">     SetInputMethodState(std::optional<WebKit::InputMethodState> state);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessglibWebProcessPoolGLibcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp        2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp   2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -114,6 +114,11 @@
</span><span class="cx">     if (app)
</span><span class="cx">         parameters.applicationID = g_application_get_application_id(app);
</span><span class="cx">     parameters.applicationName = g_get_application_name();
</span><ins>+
+#if USE(ATSPI)
+    static const char* accessibilityBusAddress = getenv("WEBKIT_A11Y_BUS_ADDRESS");
+    parameters.accessibilityBusAddress = accessibilityBusAddress ? String::fromUTF8(accessibilityBusAddress) : WebCore::PlatformDisplay::sharedDisplay().accessibilityBusAddress();
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebProcessPool::platformInvalidateContext()
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessgtkWebPageProxyGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp    2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp       2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -49,11 +49,23 @@
</span><span class="cx">     return static_cast<PageClientImpl&>(pageClient()).viewWidget();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::bindAccessibilityTree(const String& plugID)
</del><ins>+void WebPageProxy::bindAccessibilityTree(const String& plugID, CompletionHandler<void(String&&)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-#if !USE(GTK4)
</del><ins>+#if USE(GTK4)
+    // FIXME: We need a way to override accessible interface of WebView and send the atspi reference to the web process.
+    RELEASE_ASSERT_NOT_REACHED();
+#else
</ins><span class="cx">     auto* accessible = gtk_widget_get_accessible(viewWidget());
</span><span class="cx">     atk_socket_embed(ATK_SOCKET(accessible), const_cast<char*>(plugID.utf8().data()));
</span><ins>+#if USE(ATSPI)
+    // ATK doesn't have API to get the atspi reference of an object, but we know the id is stored
+    // as an object user data as "spi-dbus-id". To let the web process know about the unique name, we call
+    // atk_object_ref_state_set() that sends a GetState message to the web process root object.
+    g_object_unref(atk_object_ref_state_set(accessible));
+    completionHandler(makeString("/org/a11y/atspi/accessible/", GPOINTER_TO_INT(g_object_get_data(G_OBJECT(accessible), "spi-dbus-id"))));
+#else
+    completionHandler({ });
+#endif
</ins><span class="cx">     atk_object_notify_state_change(accessible, ATK_STATE_TRANSIENT, FALSE);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcesswpeWebPageProxyWPEcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp    2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp       2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -45,12 +45,13 @@
</span><span class="cx">     return static_cast<PageClientImpl&>(pageClient()).viewBackend();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::bindAccessibilityTree(const String& plugID)
</del><ins>+void WebPageProxy::bindAccessibilityTree(const String& plugID, CompletionHandler<void(String&&)>&& completionHandler)
</ins><span class="cx"> {
</span><span class="cx"> #if USE(ATK)
</span><span class="cx">     auto* accessible = static_cast<PageClientImpl&>(pageClient()).accessible();
</span><span class="cx">     atk_socket_embed(ATK_SOCKET(accessible), const_cast<char*>(plugID.utf8().data()));
</span><span class="cx">     atk_object_notify_state_change(accessible, ATK_STATE_TRANSIENT, FALSE);
</span><ins>+    completionHandler({ });
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h    2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -106,10 +106,14 @@
</span><span class="cx"> #include <wtf/WallTime.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx"> 
</span><del>-#if ENABLE(ACCESSIBILITY) && USE(ATK)
</del><ins>+#if ENABLE(ACCESSIBILITY)
+#if USE(ATK)
</ins><span class="cx"> typedef struct _AtkObject AtkObject;
</span><span class="cx"> #include <wtf/glib/GRefPtr.h>
</span><ins>+#elif USE(ATSPI)
+#include <WebCore/AccessibilityRootAtspi.h>
</ins><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx"> #include "ArgumentCodersGtk.h"
</span><span class="lines">@@ -1488,6 +1492,10 @@
</span><span class="cx"> 
</span><span class="cx">     void prepareToRunModalJavaScriptDialog();
</span><span class="cx"> 
</span><ins>+#if USE(ATSPI)
+    const WebCore::AccessibilityRootAtspi& accessibilityRootObject() const { return *m_accessibilityRootObject; }
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx">     WebPage(WebCore::PageIdentifier, WebPageCreationParameters&&);
</span><span class="cx"> 
</span><span class="lines">@@ -2015,9 +2023,13 @@
</span><span class="cx">     RetainPtr<NSDictionary> m_dataDetectionContext;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if ENABLE(ACCESSIBILITY) && USE(ATK)
</del><ins>+#if ENABLE(ACCESSIBILITY)
+#if USE(ATK)
</ins><span class="cx">     GRefPtr<AtkObject> m_accessibilityObject;
</span><ins>+#elif USE(ATSPI)
+    RefPtr<WebCore::AccessibilityRootAtspi> m_accessibilityRootObject;
</ins><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     uint64_t m_nativeWindowHandle { 0 };
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPagegtkWebPageGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp        2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp   2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -56,15 +56,33 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPage::platformInitialize()
</span><span class="cx"> {
</span><del>-#if ENABLE(ACCESSIBILITY) && USE(ATK)
</del><ins>+#if ENABLE(ACCESSIBILITY)
</ins><span class="cx">     // Create the accessible object (the plug) that will serve as the
</span><span class="cx">     // entry point to the Web process, and send a message to the UI
</span><span class="cx">     // process to connect the two worlds through the accessibility
</span><span class="cx">     // object there specifically placed for that purpose (the socket).
</span><ins>+#if USE(ATK)
</ins><span class="cx">     m_accessibilityObject = adoptGRef(webkitWebPageAccessibilityObjectNew(this));
</span><span class="cx">     GUniquePtr<gchar> plugID(atk_plug_get_id(ATK_PLUG(m_accessibilityObject.get())));
</span><del>-    send(Messages::WebPageProxy::BindAccessibilityTree(String(plugID.get())));
</del><ins>+    sendWithAsyncReply(Messages::WebPageProxy::BindAccessibilityTree(String(plugID.get())), [](String&&) { });
+#elif USE(ATSPI)
+#if USE(GTK4)
+    // FIXME: we need a way to connect DOM and app a11y tree in GTK4.
+#else
+    if (auto* page = corePage()) {
+        m_accessibilityRootObject = AccessibilityRootAtspi::create(*page, WebProcess::singleton().accessibilityAtspi());
+        m_accessibilityRootObject->registerObject([&](const String& plugID) {
+            // ATK uses a custom DBus message to send the socket path to the AtkPlug object. GDBus doesn't allow
+            // to send a message that is not defined in the interface, so we use the WebKit IPC to get the socket
+            // path from the UI process.
+            sendWithAsyncReply(Messages::WebPageProxy::BindAccessibilityTree(plugID), [&](String&& socketPath) {
+                m_accessibilityRootObject->setParentPath(WTFMove(socketPath));
+            });
+        });
+    }
</ins><span class="cx"> #endif
</span><ins>+#endif
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPage::platformReinitialize()
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPagewpeWebPageWPEcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp        2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp   2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx">     // object there specifically placed for that purpose (the socket).
</span><span class="cx">     m_accessibilityObject = adoptGRef(webkitWebPageAccessibilityObjectNew(this));
</span><span class="cx">     GUniquePtr<gchar> plugID(atk_plug_get_id(ATK_PLUG(m_accessibilityObject.get())));
</span><del>-    send(Messages::WebPageProxy::BindAccessibilityTree(String::fromUTF8(plugID.get())));
</del><ins>+    sendWithAsyncReply(Messages::WebPageProxy::BindAccessibilityTree(String(plugID.get())), [](String&&) { });
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebProcess.h (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebProcess.h      2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/WebProcess/WebProcess.h 2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -76,6 +76,10 @@
</span><span class="cx"> #include <WebCore/CaptionUserPreferences.h>
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if USE(ATSPI)
+#include <WebCore/AccessibilityAtspi.h>
+#endif
+
</ins><span class="cx"> namespace API {
</span><span class="cx"> class Object;
</span><span class="cx"> }
</span><span class="lines">@@ -400,6 +404,10 @@
</span><span class="cx">     SpeechRecognitionRealtimeMediaSourceManager& ensureSpeechRecognitionRealtimeMediaSourceManager();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if USE(ATSPI)
+    WebCore::AccessibilityAtspi& accessibilityAtspi() const { return *m_accessibility; }
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx">     WebProcess();
</span><span class="cx">     ~WebProcess();
</span><span class="lines">@@ -774,6 +782,10 @@
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><span class="cx">     std::unique_ptr<SpeechRecognitionRealtimeMediaSourceManager> m_speechRecognitionRealtimeMediaSourceManager;
</span><span class="cx"> #endif
</span><ins>+
+#if USE(ATSPI)
+    std::unique_ptr<WebCore::AccessibilityAtspi> m_accessibility;
+#endif
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessglibWebProcessGLibcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/glib/WebProcessGLib.cpp (283303 => 283304)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/glib/WebProcessGLib.cpp   2021-09-30 05:41:18 UTC (rev 283303)
+++ trunk/Source/WebKit/WebProcess/glib/WebProcessGLib.cpp      2021-09-30 07:37:58 UTC (rev 283304)
</span><span class="lines">@@ -115,6 +115,10 @@
</span><span class="cx"> 
</span><span class="cx">     if (!parameters.applicationName.isEmpty())
</span><span class="cx">         WebCore::setApplicationName(parameters.applicationName);
</span><ins>+
+#if USE(ATSPI)
+    m_accessibility = makeUnique<AccessibilityAtspi>(parameters.accessibilityBusAddress);
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebProcess::platformSetWebsiteDataStoreParameters(WebProcessDataStoreParameters&&)
</span></span></pre>
</div>
</div>

</body>
</html>