[ATK] Cleanup WebPageAccessibilityObjectAtk
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Apr 2019 05:52:44 +0000 (05:52 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Apr 2019 05:52:44 +0000 (05:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196537

Reviewed by Michael Catanzaro.

Source/WebKit:

Several changes and cleanups:

 - Add WebKit prefix so that style checker doesn't complain about GObject conventions.
 - Rename the header to remove the Atk prefix to match the cpp file and class name.
 - Use pragma once.
 - Use nullptr instead of 0.
 - Use WEBKIT_DEFINE_TYPE instead of G_DEFINE_TYPE.
 - Return generic AtkObject* from constructor.

* SourcesGTK.txt:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp: Renamed from Source/WebKit/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp.
(accessibilityRootObjectWrapper):
(webkitWebPageAccessibilityObjectInitialize):
(webkitWebPageAccessibilityObjectGetIndexInParent):
(webkitWebPageAccessibilityObjectGetNChildren):
(webkitWebPageAccessibilityObjectRefChild):
(webkit_web_page_accessibility_object_class_init):
(webkitWebPageAccessibilityObjectNew):
(webkitWebPageAccessibilityObjectRefresh):
* WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.h: Added.
* WebProcess/WebPage/atk/WebPageAccessibilityObject.h: Removed.
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformInitialize):
(WebKit::WebPage::updateAccessibilityTree):

Tools:

Also consider files under atk directories as exceptions for GObject conventions.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_identifier_name_in_declaration):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243863 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/SourcesGTK.txt
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp [moved from Source/WebKit/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp with 58% similarity]
Source/WebKit/WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.h [new file with mode: 0644]
Source/WebKit/WebProcess/WebPage/atk/WebPageAccessibilityObject.h [deleted file]
Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp
Tools/ChangeLog
Tools/Scripts/webkitpy/style/checkers/cpp.py

index 091f1ad..720429b 100644 (file)
@@ -1,5 +1,38 @@
 2019-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
 
+        [ATK] Cleanup WebPageAccessibilityObjectAtk
+        https://bugs.webkit.org/show_bug.cgi?id=196537
+
+        Reviewed by Michael Catanzaro.
+
+        Several changes and cleanups:
+
+         - Add WebKit prefix so that style checker doesn't complain about GObject conventions.
+         - Rename the header to remove the Atk prefix to match the cpp file and class name.
+         - Use pragma once.
+         - Use nullptr instead of 0.
+         - Use WEBKIT_DEFINE_TYPE instead of G_DEFINE_TYPE.
+         - Return generic AtkObject* from constructor.
+
+        * SourcesGTK.txt:
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp: Renamed from Source/WebKit/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp.
+        (accessibilityRootObjectWrapper):
+        (webkitWebPageAccessibilityObjectInitialize):
+        (webkitWebPageAccessibilityObjectGetIndexInParent):
+        (webkitWebPageAccessibilityObjectGetNChildren):
+        (webkitWebPageAccessibilityObjectRefChild):
+        (webkit_web_page_accessibility_object_class_init):
+        (webkitWebPageAccessibilityObjectNew):
+        (webkitWebPageAccessibilityObjectRefresh):
+        * WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.h: Added.
+        * WebProcess/WebPage/atk/WebPageAccessibilityObject.h: Removed.
+        * WebProcess/WebPage/gtk/WebPageGtk.cpp:
+        (WebKit::WebPage::platformInitialize):
+        (WebKit::WebPage::updateAccessibilityTree):
+
+2019-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
+
         [ATK] Set ATK_STATE_TRANSIENT on the atk socket until it's embedded
         https://bugs.webkit.org/show_bug.cgi?id=196535
 
index ccc43a0..6b688e6 100644 (file)
@@ -410,7 +410,7 @@ WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp
 WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
 WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp
 
-WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp
+WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp
 
 WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp
 
index dad5d92..9ab010b 100644 (file)
@@ -85,7 +85,7 @@
 #include <wtf/text/WTFString.h>
 
 #if HAVE(ACCESSIBILITY) && PLATFORM(GTK)
-#include "WebPageAccessibilityObject.h"
+typedef struct _AtkObject AtkObject;
 #include <wtf/glib/GRefPtr.h>
 #endif
 
@@ -1634,7 +1634,7 @@ private:
 #endif
 
 #if HAVE(ACCESSIBILITY) && PLATFORM(GTK)
-    GRefPtr<WebPageAccessibilityObject> m_accessibilityObject;
+    GRefPtr<AtkObject> m_accessibilityObject;
 #endif
 
 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Igalia S.L.
+ * Copyright (C) 2012, 2019 Igalia S.L.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -24,7 +24,7 @@
  */
 
 #include "config.h"
-#include "WebPageAccessibilityObject.h"
+#include "WebKitWebPageAccessibilityObject.h"
 
 #if HAVE(ACCESSIBILITY)
 
 #include <WebCore/Document.h>
 #include <WebCore/Frame.h>
 #include <WebCore/Page.h>
+#include <wtf/glib/WTFGType.h>
 
 using namespace WebKit;
 using namespace WebCore;
 
-G_DEFINE_TYPE(WebPageAccessibilityObject, web_page_accessibility_object, ATK_TYPE_PLUG)
+struct _WebKitWebPageAccessibilityObjectPrivate {
+    WebPage* page;
+};
+
+WEBKIT_DEFINE_TYPE(WebKitWebPageAccessibilityObject, webkit_web_page_accessibility_object, ATK_TYPE_PLUG)
 
 static AtkObject* accessibilityRootObjectWrapper(AtkObject* atkObject)
 {
     if (!AXObjectCache::accessibilityEnabled())
         AXObjectCache::enableAccessibility();
 
-    WebPageAccessibilityObject* accessible = WEB_PAGE_ACCESSIBILITY_OBJECT(atkObject);
-    if (!accessible->m_page)
-        return 0;
+    auto* accessible = WEBKIT_WEB_PAGE_ACCESSIBILITY_OBJECT(atkObject);
+    if (!accessible->priv->page)
+        return nullptr;
 
-    Page* corePage = accessible->m_page->corePage();
+    Page* corePage = accessible->priv->page->corePage();
     if (!corePage)
-        return 0;
+        return nullptr;
 
     Frame& coreFrame = corePage->mainFrame();
     if (!coreFrame.document())
-        return 0;
+        return nullptr;
 
     AXObjectCache* cache = coreFrame.document()->axObjectCache();
     if (!cache)
@@ -62,48 +67,44 @@ static AtkObject* accessibilityRootObjectWrapper(AtkObject* atkObject)
 
     AccessibilityObject* coreRootObject = cache->rootObject();
     if (!coreRootObject)
-        return 0;
+        return nullptr;
 
     AtkObject* rootObject = coreRootObject->wrapper();
     if (!rootObject || !ATK_IS_OBJECT(rootObject))
-        return 0;
+        return nullptr;
 
     return rootObject;
 }
 
-static void webPageAccessibilityObjectInitialize(AtkObject* atkObject, gpointer data)
+static void webkitWebPageAccessibilityObjectInitialize(AtkObject* atkObject, gpointer data)
 {
-    if (ATK_OBJECT_CLASS(web_page_accessibility_object_parent_class)->initialize)
-        ATK_OBJECT_CLASS(web_page_accessibility_object_parent_class)->initialize(atkObject, data);
+    if (ATK_OBJECT_CLASS(webkit_web_page_accessibility_object_parent_class)->initialize)
+        ATK_OBJECT_CLASS(webkit_web_page_accessibility_object_parent_class)->initialize(atkObject, data);
 
-    WEB_PAGE_ACCESSIBILITY_OBJECT(atkObject)->m_page = reinterpret_cast<WebPage*>(data);
+    WEBKIT_WEB_PAGE_ACCESSIBILITY_OBJECT(atkObject)->priv->page = reinterpret_cast<WebPage*>(data);
     atk_object_set_role(atkObject, ATK_ROLE_FILLER);
 }
 
-static gint webPageAccessibilityObjectGetIndexInParent(AtkObject*)
+static gint webkitWebPageAccessibilityObjectGetIndexInParent(AtkObject*)
 {
     // An AtkPlug is the only child an AtkSocket can have.
     return 0;
 }
 
-static gint webPageAccessibilityObjectGetNChildren(AtkObject* atkObject)
+static gint webkitWebPageAccessibilityObjectGetNChildren(AtkObject* atkObject)
 {
-    AtkObject* rootObject = accessibilityRootObjectWrapper(atkObject);
-    if (!rootObject)
-        return 0;
-
-    return 1;
+    return accessibilityRootObjectWrapper(atkObject) ? 1 : 0;
 }
 
-static AtkObject* webPageAccessibilityObjectRefChild(AtkObject* atkObject, gint index)
+static AtkObject* webkitWebPageAccessibilityObjectRefChild(AtkObject* atkObject, gint index)
 {
     // It's supposed to have either one child or zero.
     if (index && index != 1)
-        return 0;
+        return nullptr;
 
     AtkObject* rootObject = accessibilityRootObjectWrapper(atkObject);
     if (!rootObject)
-        return 0;
+        return nullptr;
 
     atk_object_set_parent(rootObject, atkObject);
     g_object_ref(rootObject);
@@ -111,39 +112,32 @@ static AtkObject* webPageAccessibilityObjectRefChild(AtkObject* atkObject, gint
     return rootObject;
 }
 
-static void web_page_accessibility_object_init(WebPageAccessibilityObject*)
-{
-}
-
-static void web_page_accessibility_object_class_init(WebPageAccessibilityObjectClass* klass)
+static void webkit_web_page_accessibility_object_class_init(WebKitWebPageAccessibilityObjectClass* klass)
 {
     AtkObjectClass* atkObjectClass = ATK_OBJECT_CLASS(klass);
-
     // No need to implement get_parent() here since this is a subclass
     // of AtkPlug and all the logic related to that function will be
     // implemented by the ATK bridge.
-    atkObjectClass->initialize = webPageAccessibilityObjectInitialize;
-    atkObjectClass->get_index_in_parent = webPageAccessibilityObjectGetIndexInParent;
-    atkObjectClass->get_n_children = webPageAccessibilityObjectGetNChildren;
-    atkObjectClass->ref_child = webPageAccessibilityObjectRefChild;
+    atkObjectClass->initialize = webkitWebPageAccessibilityObjectInitialize;
+    atkObjectClass->get_index_in_parent = webkitWebPageAccessibilityObjectGetIndexInParent;
+    atkObjectClass->get_n_children = webkitWebPageAccessibilityObjectGetNChildren;
+    atkObjectClass->ref_child = webkitWebPageAccessibilityObjectRefChild;
 }
 
-WebPageAccessibilityObject* webPageAccessibilityObjectNew(WebPage* page)
+AtkObject* webkitWebPageAccessibilityObjectNew(WebPage* page)
 {
-    AtkObject* object = ATK_OBJECT(g_object_new(WEB_TYPE_PAGE_ACCESSIBILITY_OBJECT, NULL));
+    AtkObject* object = ATK_OBJECT(g_object_new(WEBKIT_TYPE_WEB_PAGE_ACCESSIBILITY_OBJECT, nullptr));
     atk_object_initialize(object, page);
-    return WEB_PAGE_ACCESSIBILITY_OBJECT(object);
+    return object;
 }
 
-void webPageAccessibilityObjectRefresh(WebPageAccessibilityObject* accessible)
+void webkitWebPageAccessibilityObjectRefresh(WebKitWebPageAccessibilityObject* accessible)
 {
     // We just need to ensure that there's a connection in the ATK
     // world between this accessibility object and the AtkObject of
     // the accessibility object for the root of the DOM tree.
-    AtkObject* rootObject = accessibilityRootObjectWrapper(ATK_OBJECT(accessible));
-    if (!rootObject)
-        return;
-    atk_object_set_parent(rootObject, ATK_OBJECT(accessible));
+    if (auto* rootObject = accessibilityRootObjectWrapper(ATK_OBJECT(accessible)))
+        atk_object_set_parent(rootObject, ATK_OBJECT(accessible));
 }
 
-#endif
+#endif // HAVE(ACCESSIBILITY)
diff --git a/Source/WebKit/WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.h b/Source/WebKit/WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.h
new file mode 100644 (file)
index 0000000..3e9f327
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2012, 2019 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if HAVE(ACCESSIBILITY)
+
+#include <atk/atk.h>
+
+namespace WebKit {
+class WebPage;
+}
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_WEB_PAGE_ACCESSIBILITY_OBJECT              (webkit_web_page_accessibility_object_get_type())
+#define WEBKIT_WEB_PAGE_ACCESSIBILITY_OBJECT(object)           (G_TYPE_CHECK_INSTANCE_CAST((object), WEBKIT_TYPE_WEB_PAGE_ACCESSIBILITY_OBJECT, WebKitWebPageAccessibilityObject))
+#define WEBKIT_WEB_PAGE_ACCESSIBILITY_OBJECT_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_WEB_PAGE_ACCESSIBILITY_OBJECT, WebKitWebPageAccessibilityObjectClass))
+#define WEBKIT_IS_WEB_PAGE_ACCESSIBILITY_OBJECT(object)        (G_TYPE_CHECK_INSTANCE_TYPE((object), WEBKIT_TYPE_WEB_PAGE_ACCESSIBILITY_OBJECT))
+#define WEBKIT_IS_WEB_PAGE_ACCESSIBILITY_OBJECT_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_WEB_PAGE_ACCESSIBILITY_OBJECT))
+#define WEBKIT_WEB_PAGE_ACCESSIBILITY_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), WEBKIT_TYPE_WEB_PAGE_ACCESSIBILITY_OBJECT, WebKitWebPageAccessibilityObjectClass))
+
+typedef struct _WebKitWebPageAccessibilityObject WebKitWebPageAccessibilityObject;
+typedef struct _WebKitWebPageAccessibilityObjectClass WebKitWebPageAccessibilityObjectClass;
+typedef struct _WebKitWebPageAccessibilityObjectPrivate WebKitWebPageAccessibilityObjectPrivate;
+
+struct _WebKitWebPageAccessibilityObject {
+    AtkPlug parent;
+
+    WebKitWebPageAccessibilityObjectPrivate* priv;
+};
+
+struct _WebKitWebPageAccessibilityObjectClass {
+    AtkPlugClass parentClass;
+};
+
+GType webkit_web_page_accessibility_object_get_type();
+
+AtkObject* webkitWebPageAccessibilityObjectNew(WebKit::WebPage*);
+
+void webkitWebPageAccessibilityObjectRefresh(WebKitWebPageAccessibilityObject*);
+
+G_END_DECLS
+
+#endif // HAVE(ACCESSIBILITY)
diff --git a/Source/WebKit/WebProcess/WebPage/atk/WebPageAccessibilityObject.h b/Source/WebKit/WebProcess/WebPage/atk/WebPageAccessibilityObject.h
deleted file mode 100644 (file)
index 8abc0e5..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebPageAccessibilityObject_h
-#define WebPageAccessibilityObject_h
-
-#if HAVE(ACCESSIBILITY)
-
-#include <atk/atk.h>
-
-namespace WebKit {
-class WebPage;
-}
-
-G_BEGIN_DECLS
-
-#define WEB_TYPE_PAGE_ACCESSIBILITY_OBJECT              (web_page_accessibility_object_get_type())
-#define WEB_PAGE_ACCESSIBILITY_OBJECT(object)           (G_TYPE_CHECK_INSTANCE_CAST((object), WEB_TYPE_PAGE_ACCESSIBILITY_OBJECT, WebPageAccessibilityObject))
-#define WEB_PAGE_ACCESSIBILITY_OBJECT_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), WEB_TYPE_PAGE_ACCESSIBILITY_OBJECT, WebPageAccessibilityObjectClass))
-#define WEB_IS_PAGE_ACCESSIBILITY_OBJECT(object)        (G_TYPE_CHECK_INSTANCE_TYPE((object), WEB_TYPE_PAGE_ACCESSIBILITY_OBJECT))
-#define WEB_IS_PAGE_ACCESSIBILITY_OBJECT_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), WEB_TYPE_PAGE_ACCESSIBILITY_OBJECT))
-#define WEB_PAGE_ACCESSIBILITY_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), WEB_TYPE_PAGE_ACCESSIBILITY_OBJECT, WebPageAccessibilityObjectClass))
-
-typedef struct _WebPageAccessibilityObject WebPageAccessibilityObject;
-typedef struct _WebPageAccessibilityObjectClass WebPageAccessibilityObjectClass;
-
-struct _WebPageAccessibilityObject {
-    AtkPlug parent;
-    WebKit::WebPage* m_page;
-};
-
-struct _WebPageAccessibilityObjectClass {
-    AtkPlugClass parentClass;
-};
-
-GType web_page_accessibility_object_get_type();
-
-WebPageAccessibilityObject* webPageAccessibilityObjectNew(WebKit::WebPage*);
-
-void webPageAccessibilityObjectRefresh(WebPageAccessibilityObject*);
-
-G_END_DECLS
-
-#endif
-#endif // WebPageAccessibilityObject_h
index efdf6e0..2e21ed8 100644 (file)
@@ -31,7 +31,7 @@
 #include "EditorState.h"
 #include "WebEvent.h"
 #include "WebFrame.h"
-#include "WebPageAccessibilityObject.h"
+#include "WebKitWebPageAccessibilityObject.h"
 #include "WebPageProxyMessages.h"
 #include "WebProcess.h"
 #include <WebCore/BackForwardController.h>
@@ -61,7 +61,7 @@ void WebPage::platformInitialize()
     // entry point to the Web process, and send a message to the UI
     // process to connect the two worlds through the accessibility
     // object there specifically placed for that purpose (the socket).
-    m_accessibilityObject = adoptGRef(webPageAccessibilityObjectNew(this));
+    m_accessibilityObject = adoptGRef(webkitWebPageAccessibilityObjectNew(this));
     GUniquePtr<gchar> plugID(atk_plug_get_id(ATK_PLUG(m_accessibilityObject.get())));
     send(Messages::WebPageProxy::BindAccessibilityTree(String(plugID.get())));
 #endif
@@ -117,7 +117,7 @@ void WebPage::updateAccessibilityTree()
     if (!m_accessibilityObject)
         return;
 
-    webPageAccessibilityObjectRefresh(m_accessibilityObject.get());
+    webkitWebPageAccessibilityObjectRefresh(WEBKIT_WEB_PAGE_ACCESSIBILITY_OBJECT(m_accessibilityObject.get()));
 }
 #endif
 
index b351823..bce8538 100644 (file)
@@ -1,3 +1,15 @@
+2019-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [ATK] Cleanup WebPageAccessibilityObjectAtk
+        https://bugs.webkit.org/show_bug.cgi?id=196537
+
+        Reviewed by Michael Catanzaro.
+
+        Also consider files under atk directories as exceptions for GObject conventions.
+
+        * Scripts/webkitpy/style/checkers/cpp.py:
+        (check_identifier_name_in_declaration):
+
 2019-04-03  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         The page's focusedFrame / frameSetLargestFrame do not get cleared on process swap or crash
index 9cf394b..a197220 100644 (file)
@@ -3585,7 +3585,7 @@ def check_identifier_name_in_declaration(filename, line_number, line, file_state
         if not file_state.is_objective_c_or_objective_cpp() and modified_identifier.find('_') >= 0:
             # Various exceptions to the rule: JavaScript op codes functions, const_iterator.
             if (not (filename.find('JavaScriptCore') >= 0 and (modified_identifier.find('op_') >= 0 or modified_identifier.find('intrinsic_') >= 0))
-                and not (('gtk' in filename or 'glib' in filename or 'wpe' in filename) and modified_identifier.startswith('webkit_'))
+                and not (('gtk' in filename or 'glib' in filename or 'wpe' in filename or 'atk' in filename) and modified_identifier.startswith('webkit_'))
                 and not modified_identifier.startswith('tst_')
                 and not modified_identifier.startswith('webkit_dom_object_')
                 and not modified_identifier.startswith('webkit_soup')