Changeset 243861 in webkit
- Timestamp:
- Apr 3, 2019 10:50:22 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r243860 r243861 1 2019-04-03 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [ATK] Embed the AtkSocket as soon as we receive the plug ID 4 https://bugs.webkit.org/show_bug.cgi?id=196534 5 6 Reviewed by Michael Catanzaro. 7 8 We are currently storing the ID and waiting for the next time get_accessible is called to embed the socket. We 9 can simply embed the socket when the plug ID is received. 10 11 * UIProcess/API/gtk/WebKitWebViewBase.cpp: 12 (webkitWebViewBaseGetAccessible): 13 * UIProcess/WebPageProxy.h: 14 * UIProcess/gtk/WebPageProxyGtk.cpp: 15 (WebKit::WebPageProxy::bindAccessibilityTree): 16 1 17 2019-04-03 Carlos Garcia Campos <cgarcia@igalia.com> 2 18 -
trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
r242346 r243861 1229 1229 static AtkObject* webkitWebViewBaseGetAccessible(GtkWidget* widget) 1230 1230 { 1231 // If the socket has already been created and embedded a plug ID, return it.1232 1231 WebKitWebViewBasePrivate* priv = WEBKIT_WEB_VIEW_BASE(widget)->priv; 1233 if (priv->accessible && atk_socket_is_occupied(ATK_SOCKET(priv->accessible.get())))1234 return priv->accessible.get();1235 1236 // Create the accessible object and associate it to the widget.1237 1232 if (!priv->accessible) { 1233 // Create the accessible object and associate it to the widget. 1238 1234 priv->accessible = adoptGRef(ATK_OBJECT(webkitWebViewBaseAccessibleNew(widget))); 1239 1235 1240 // Set the parent not to break bottom-up navigation. 1241 GtkWidget* parentWidget = gtk_widget_get_parent(widget); 1242 AtkObject* axParent = parentWidget ? gtk_widget_get_accessible(parentWidget) : 0; 1243 if (axParent) 1244 atk_object_set_parent(priv->accessible.get(), axParent); 1245 } 1246 1247 // Try to embed the plug in the socket, if posssible. 1248 String plugID = priv->pageProxy->accessibilityPlugID(); 1249 if (plugID.isNull()) 1250 return priv->accessible.get(); 1251 1252 atk_socket_embed(ATK_SOCKET(priv->accessible.get()), const_cast<gchar*>(plugID.utf8().data())); 1236 // Set the parent to not break bottom-up navigation. 1237 if (auto* parentWidget = gtk_widget_get_parent(widget)) { 1238 if (auto* axParent = gtk_widget_get_accessible(parentWidget)) 1239 atk_object_set_parent(priv->accessible.get(), axParent); 1240 } 1241 } 1253 1242 1254 1243 return priv->accessible.get(); -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r243847 r243861 1124 1124 #endif 1125 1125 1126 #if PLATFORM(GTK)1127 String accessibilityPlugID() const { return m_accessibilityPlugID; }1128 #endif1129 1130 1126 void setCanRunModal(bool); 1131 1127 bool canRunModal(); … … 2305 2301 #endif 2306 2302 2307 #if PLATFORM(GTK)2308 String m_accessibilityPlugID;2309 #endif2310 2311 2303 Optional<WebCore::Color> m_backgroundColor; 2312 2304 -
trunk/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp
r243327 r243861 58 58 void WebPageProxy::bindAccessibilityTree(const String& plugID) 59 59 { 60 m_accessibilityPlugID = plugID; 60 auto* accessible = gtk_widget_get_accessible(viewWidget()); 61 atk_socket_embed(ATK_SOCKET(accessible), const_cast<char*>(plugID.utf8().data())); 61 62 } 62 63
Note: See TracChangeset
for help on using the changeset viewer.