Title: [243861] trunk/Source/WebKit
- Revision
- 243861
- Author
- [email protected]
- Date
- 2019-04-03 22:50:22 -0700 (Wed, 03 Apr 2019)
Log Message
[ATK] Embed the AtkSocket as soon as we receive the plug ID
https://bugs.webkit.org/show_bug.cgi?id=196534
Reviewed by Michael Catanzaro.
We are currently storing the ID and waiting for the next time get_accessible is called to embed the socket. We
can simply embed the socket when the plug ID is received.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseGetAccessible):
* UIProcess/WebPageProxy.h:
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::bindAccessibilityTree):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (243860 => 243861)
--- trunk/Source/WebKit/ChangeLog 2019-04-04 05:48:20 UTC (rev 243860)
+++ trunk/Source/WebKit/ChangeLog 2019-04-04 05:50:22 UTC (rev 243861)
@@ -1,5 +1,21 @@
2019-04-03 Carlos Garcia Campos <[email protected]>
+ [ATK] Embed the AtkSocket as soon as we receive the plug ID
+ https://bugs.webkit.org/show_bug.cgi?id=196534
+
+ Reviewed by Michael Catanzaro.
+
+ We are currently storing the ID and waiting for the next time get_accessible is called to embed the socket. We
+ can simply embed the socket when the plug ID is received.
+
+ * UIProcess/API/gtk/WebKitWebViewBase.cpp:
+ (webkitWebViewBaseGetAccessible):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/gtk/WebPageProxyGtk.cpp:
+ (WebKit::WebPageProxy::bindAccessibilityTree):
+
+2019-04-03 Carlos Garcia Campos <[email protected]>
+
[ATK] Don't touch accessibility tree in WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld
https://bugs.webkit.org/show_bug.cgi?id=193914
Modified: trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp (243860 => 243861)
--- trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp 2019-04-04 05:48:20 UTC (rev 243860)
+++ trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp 2019-04-04 05:50:22 UTC (rev 243861)
@@ -1228,29 +1228,18 @@
static AtkObject* webkitWebViewBaseGetAccessible(GtkWidget* widget)
{
- // If the socket has already been created and embedded a plug ID, return it.
WebKitWebViewBasePrivate* priv = WEBKIT_WEB_VIEW_BASE(widget)->priv;
- if (priv->accessible && atk_socket_is_occupied(ATK_SOCKET(priv->accessible.get())))
- return priv->accessible.get();
-
- // Create the accessible object and associate it to the widget.
if (!priv->accessible) {
+ // Create the accessible object and associate it to the widget.
priv->accessible = adoptGRef(ATK_OBJECT(webkitWebViewBaseAccessibleNew(widget)));
- // Set the parent not to break bottom-up navigation.
- GtkWidget* parentWidget = gtk_widget_get_parent(widget);
- AtkObject* axParent = parentWidget ? gtk_widget_get_accessible(parentWidget) : 0;
- if (axParent)
- atk_object_set_parent(priv->accessible.get(), axParent);
+ // Set the parent to not break bottom-up navigation.
+ if (auto* parentWidget = gtk_widget_get_parent(widget)) {
+ if (auto* axParent = gtk_widget_get_accessible(parentWidget))
+ atk_object_set_parent(priv->accessible.get(), axParent);
+ }
}
- // Try to embed the plug in the socket, if posssible.
- String plugID = priv->pageProxy->accessibilityPlugID();
- if (plugID.isNull())
- return priv->accessible.get();
-
- atk_socket_embed(ATK_SOCKET(priv->accessible.get()), const_cast<gchar*>(plugID.utf8().data()));
-
return priv->accessible.get();
}
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (243860 => 243861)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2019-04-04 05:48:20 UTC (rev 243860)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2019-04-04 05:50:22 UTC (rev 243861)
@@ -1123,10 +1123,6 @@
void setSmartInsertDeleteEnabled(bool);
#endif
-#if PLATFORM(GTK)
- String accessibilityPlugID() const { return m_accessibilityPlugID; }
-#endif
-
void setCanRunModal(bool);
bool canRunModal();
@@ -2304,10 +2300,6 @@
bool m_isSmartInsertDeleteEnabled { false };
#endif
-#if PLATFORM(GTK)
- String m_accessibilityPlugID;
-#endif
-
Optional<WebCore::Color> m_backgroundColor;
unsigned m_pendingLearnOrIgnoreWordMessageCount { 0 };
Modified: trunk/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp (243860 => 243861)
--- trunk/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp 2019-04-04 05:48:20 UTC (rev 243860)
+++ trunk/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp 2019-04-04 05:50:22 UTC (rev 243861)
@@ -57,7 +57,8 @@
void WebPageProxy::bindAccessibilityTree(const String& plugID)
{
- m_accessibilityPlugID = plugID;
+ auto* accessible = gtk_widget_get_accessible(viewWidget());
+ atk_socket_embed(ATK_SOCKET(accessible), const_cast<char*>(plugID.utf8().data()));
}
void WebPageProxy::saveRecentSearches(const String&, const Vector<WebCore::RecentSearch>&)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes