⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243862 in webkit


Ignore:
Timestamp:
Apr 3, 2019, 10:51:37 PM (7 years ago)
Author:
Carlos Garcia Campos
Message:

[ATK] Set ATK_STATE_TRANSIENT on the atk socket until it's embedded
https://bugs.webkit.org/show_bug.cgi?id=196535

Reviewed by Michael Catanzaro.

This way the properties are not cached. Right now, if number of children is queried before the socket is
embedded, 0 is returned and cached, so ATs don't see the child even after the socket has been embedded.

  • UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp:

(webkitWebViewBaseAccessibleRefStateSet): Set ATK_STATE_TRANSIENT is the socket is not occupied.

  • UIProcess/gtk/WebPageProxyGtk.cpp:

(WebKit::WebPageProxy::bindAccessibilityTree): Unset ATK_STATE_TRANSIENT.

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r243861 r243862  
     12019-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [ATK] Set ATK_STATE_TRANSIENT on the atk socket until it's embedded
     4        https://bugs.webkit.org/show_bug.cgi?id=196535
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        This way the properties are not cached. Right now, if number of children is queried before the socket is
     9        embedded, 0 is returned and cached, so ATs don't see the child even after the socket has been embedded.
     10
     11        * UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp:
     12        (webkitWebViewBaseAccessibleRefStateSet): Set ATK_STATE_TRANSIENT is the socket is not occupied.
     13        * UIProcess/gtk/WebPageProxyGtk.cpp:
     14        (WebKit::WebPageProxy::bindAccessibilityTree): Unset ATK_STATE_TRANSIENT.
     15
    1162019-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
    217
  • trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp

    r218332 r243862  
    6060        // Use the implementation of AtkSocket if the widget is still alive.
    6161        stateSet = ATK_OBJECT_CLASS(webkit_web_view_base_accessible_parent_class)->ref_state_set(atkObject);
     62        if (!atk_socket_is_occupied(ATK_SOCKET(atkObject)))
     63            atk_state_set_add_state(stateSet, ATK_STATE_TRANSIENT);
    6264    } else {
    6365        // If the widget is no longer alive, save some remote calls
  • trunk/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp

    r243861 r243862  
    6060    auto* accessible = gtk_widget_get_accessible(viewWidget());
    6161    atk_socket_embed(ATK_SOCKET(accessible), const_cast<char*>(plugID.utf8().data()));
     62    atk_object_notify_state_change(accessible, ATK_STATE_TRANSIENT, FALSE);
    6263}
    6364
Note: See TracChangeset for help on using the changeset viewer.