Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r243863 - [ATK] Cleanup WebPageAccessibilityObjectAtk
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):
- Loading branch information
1 parent
25c9bc6
commit 4ff3d26
Showing
10 changed files
with
161 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
Source/WebKit/WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
67 changes: 0 additions & 67 deletions
67
Source/WebKit/WebProcess/WebPage/atk/WebPageAccessibilityObject.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.