Skip to content

Commit 9b75a97

Browse files
committed
Fix developer mode build for configuration with Accessibility without ATK
1 parent 4cec170 commit 9b75a97

7 files changed

Lines changed: 21 additions & 9 deletions

File tree

Tools/MiniBrowser/wpe/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ int main(int argc, char *argv[])
309309
g_object_unref(settings);
310310

311311
backendPtr->setInputClient(std::make_unique<InputClient>(loop, webView));
312-
#if defined(ENABLE_ACCESSIBILITY) && ENABLE_ACCESSIBILITY
312+
#if defined(ENABLE_ACCESSIBILITY) && ENABLE_ACCESSIBILITY && defined(USE_ATK) && USE_ATK
313313
auto* accessible = wpe_view_backend_dispatch_get_accessible(wpeBackend);
314314
if (ATK_IS_OBJECT(accessible))
315315
backendPtr->setAccessibleChild(ATK_OBJECT(accessible));

Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
#include "config.h"
2727
#include "InjectedBundle.h"
2828

29+
#if ENABLE(ACCESSIBILITY)
30+
#include "AccessibilityController.h"
31+
#endif
2932
#include "ActivateFonts.h"
3033
#include "DictionaryFunctions.h"
3134
#include "InjectedBundlePage.h"

Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@
3737
#include <wtf/RefPtr.h>
3838
#include <wtf/Vector.h>
3939

40-
#if ENABLE(ACCESSIBILITY)
41-
#include "AccessibilityController.h"
42-
#endif
43-
4440
namespace WTR {
4541

4642
class InjectedBundlePage;
4743

44+
#if ENABLE(ACCESSIBILITY)
45+
class AccessibilityController;
46+
#endif
47+
4848
class InjectedBundle {
4949
public:
5050
static InjectedBundle& singleton();

Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
#include "config.h"
2727
#include "InjectedBundlePage.h"
2828

29+
#if ENABLE(ACCESSIBILITY)
30+
#include "AccessibilityController.h"
31+
#endif
2932
#include "ActivateFonts.h"
3033
#include "InjectedBundle.h"
3134
#include "StringFunctions.h"

Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "AccessibilityUIElement.h"
2828

2929
#if USE(ATSPI)
30+
#include "AccessibilityController.h"
3031
#include "AccessibilityNotificationHandler.h"
3132
#include "InjectedBundle.h"
3233
#include "InjectedBundlePage.h"

Tools/wpe/backends/PlatformWPE.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ list(APPEND WPEToolingBackends_PUBLIC_HEADERS
1111
list(APPEND WPEToolingBackends_SOURCES
1212
${WPEToolingBackends_DERIVED_SOURCES_DIR}/xdg-shell-unstable-v6-protocol.c
1313

14-
atk/ViewBackendAtk.cpp
1514
atk/WebKitAccessibleApplication.cpp
1615

1716
fdo/HeadlessViewBackendFdo.cpp
@@ -64,5 +63,11 @@ if (ENABLE_ACCESSIBILITY)
6463
list(APPEND WPEToolingBackends_PRIVATE_DEFINITIONS
6564
GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40
6665
)
67-
list(APPEND WPEToolingBackends_LIBRARIES ATK::Bridge)
66+
if (USE_ATK)
67+
list(APPEND WPEToolingBackends_DEFINITIONS USE_ATK=1)
68+
list(APPEND WPEToolingBackends_LIBRARIES ATK::Bridge)
69+
list(APPEND WPEToolingBackends_SOURCES
70+
atk/ViewBackendAtk.cpp
71+
)
72+
endif ()
6873
endif ()

Tools/wpe/backends/ViewBackend.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ ViewBackend::ViewBackend(uint32_t width, uint32_t height)
3636

3737
ViewBackend::~ViewBackend() = default;
3838

39-
#if !(defined(ENABLE_ACCESSIBILITY) && ENABLE_ACCESSIBILITY)
39+
#if !(defined(ENABLE_ACCESSIBILITY) && ENABLE_ACCESSIBILITY && defined(USE_ATK) && USE_ATK)
4040
void ViewBackend::initializeAccessibility()
4141
{
4242
}
@@ -81,7 +81,7 @@ void ViewBackend::dispatchInputAxisEvent(struct wpe_input_axis_event* event)
8181

8282
void ViewBackend::dispatchInputKeyboardEvent(struct wpe_input_keyboard_event* event)
8383
{
84-
#if defined(ENABLE_ACCESSIBILITY) && ENABLE_ACCESSIBILITY
84+
#if defined(ENABLE_ACCESSIBILITY) && ENABLE_ACCESSIBILITY && defined(USE_ATK) && USE_ATK
8585
notifyAccessibilityKeyEventListeners(event);
8686
#endif
8787

0 commit comments

Comments
 (0)