[EFL][GTK] Get EFL and GTK compiling with ACCESSIBILITY disabled
authorthiago.lacerda@openbossa.org <thiago.lacerda@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Jan 2014 19:21:55 +0000 (19:21 +0000)
committerthiago.lacerda@openbossa.org <thiago.lacerda@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Jan 2014 19:21:55 +0000 (19:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=127119

Reviewed by Mario Sanchez Prada.

Source/WebCore:

At build time, the compiler was not able to determine which Timer's constructor to call in AXObjectCache when
ACCESSIBILITY is not enabled, fixing that.
Also guarding some members in AccessibilityObject that are only being used by EFL and GTK with ACCESSIBILITY.

* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::AXObjectCache):
* accessibility/AccessibilityObject.h:

Source/WebKit/gtk:

Guarding ACCESSIBILITY code with HAVE(ACCESSIBILITY).

* webkit/webkitwebview.cpp:
(webkit_web_view_class_init):

Source/WebKit2:

Guarding ACCESSIBILITY code with HAVE(ACCESSIBILITY).

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformInitialize):

Tools:

Guarding ACCESSIBILITY code in DumpRenderTree and WebKitTestRunner with HAVE(ACCESSIBILITY).

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
* DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues):
(webViewWindowObjectCleared):
(main):
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
(WTR::AccessibilityController::platformName):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::isIndeterminate):

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

15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AXObjectCache.h
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/webkit/webkitwebview.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/gtk/WebPageGtk.cpp
Tools/ChangeLog
Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp
Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp
Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp

index 2f727b3..e0c7f21 100644 (file)
@@ -1,3 +1,18 @@
+2014-01-22  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
+
+        [EFL][GTK] Get EFL and GTK compiling with ACCESSIBILITY disabled
+        https://bugs.webkit.org/show_bug.cgi?id=127119
+
+        Reviewed by Mario Sanchez Prada.
+
+        At build time, the compiler was not able to determine which Timer's constructor to call in AXObjectCache when
+        ACCESSIBILITY is not enabled, fixing that.
+        Also guarding some members in AccessibilityObject that are only being used by EFL and GTK with ACCESSIBILITY.
+
+        * accessibility/AXObjectCache.h:
+        (WebCore::AXObjectCache::AXObjectCache):
+        * accessibility/AccessibilityObject.h:
+
 2014-01-22  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
 
         Refactor calculation of hasRx and hasRy values in SVGPathData
index 251000a..c07ccf1 100644 (file)
@@ -264,7 +264,7 @@ bool isNodeAriaVisible(Node*);
 #if !HAVE(ACCESSIBILITY)
 inline AccessibilityObjectInclusion AXComputedObjectAttributeCache::getIgnored(AXID) const { return DefaultBehavior; }
 inline void AXComputedObjectAttributeCache::setIgnored(AXID, AccessibilityObjectInclusion) { }
-inline AXObjectCache::AXObjectCache(Document& document) : m_document(document), m_notificationPostTimer(this, 0) { }
+inline AXObjectCache::AXObjectCache(Document& document) : m_document(document), m_notificationPostTimer(this, (Timer<AXObjectCache>::TimerFiredFunction) nullptr) { }
 inline AXObjectCache::~AXObjectCache() { }
 inline AccessibilityObject* AXObjectCache::focusedUIElementForPage(const Page*) { return 0; }
 inline AccessibilityObject* AXObjectCache::get(RenderObject*) { return 0; }
index 761df3d..959fbca 100644 (file)
@@ -924,7 +924,7 @@ protected:
     virtual AccessibilityRole buttonRoleType() const;
     bool isOnscreen() const;
     
-#if PLATFORM(GTK) || (PLATFORM(EFL) && HAVE(ACCESSIBILITY))
+#if (PLATFORM(GTK) || PLATFORM(EFL)) && HAVE(ACCESSIBILITY)
     bool allowsTextRanges() const;
     unsigned getLengthForTextRange() const;
 #else
index db97aea..f55e8db 100644 (file)
@@ -1,3 +1,15 @@
+2014-01-22  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
+
+        [EFL][GTK] Get EFL and GTK compiling with ACCESSIBILITY disabled
+        https://bugs.webkit.org/show_bug.cgi?id=127119
+
+        Reviewed by Mario Sanchez Prada.
+
+        Guarding ACCESSIBILITY code with HAVE(ACCESSIBILITY).
+
+        * webkit/webkitwebview.cpp:
+        (webkit_web_view_class_init):
+
 2014-01-18  Brian Burg  <bburg@apple.com>
 
         Web Inspector: Page should use std::unique_ptr for InspectorController
index b4f9a9c..32965e0 100644 (file)
@@ -1417,6 +1417,7 @@ static gboolean webkit_navigation_request_handled(GSignalInvocationHint* ihint,
     return TRUE;
 }
 
+#if HAVE(ACCESSIBILITY)
 static AtkObject* webkit_web_view_get_accessible(GtkWidget* widget)
 {
     WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
@@ -1448,6 +1449,7 @@ static AtkObject* webkit_web_view_get_accessible(GtkWidget* widget)
 
     return axRoot;
 }
+#endif
 
 static double screenDPI(GdkScreen* screen)
 {
@@ -3107,7 +3109,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
     widgetClass->grab_focus = webkit_web_view_grab_focus;
     widgetClass->focus_in_event = webkit_web_view_focus_in_event;
     widgetClass->focus_out_event = webkit_web_view_focus_out_event;
+#if HAVE(ACCESSIBILITY)
     widgetClass->get_accessible = webkit_web_view_get_accessible;
+#endif
     widgetClass->screen_changed = webkit_web_view_screen_changed;
 #if ENABLE(DRAG_SUPPORT)
     widgetClass->drag_end = webkit_web_view_drag_end;
index 6a9d862..4cd4b07 100644 (file)
@@ -1,3 +1,18 @@
+2014-01-22  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
+
+        [EFL][GTK] Get EFL and GTK compiling with ACCESSIBILITY disabled
+        https://bugs.webkit.org/show_bug.cgi?id=127119
+
+        Reviewed by Mario Sanchez Prada.
+
+        Guarding ACCESSIBILITY code with HAVE(ACCESSIBILITY).
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/gtk/WebPageGtk.cpp:
+        (WebKit::WebPage::platformInitialize):
+
 2014-01-22  Martin Robinson  <mrobinson@igalia.com>
 
         [GTK][CMake] Add support for building the NetworkProcess
index 716edbe..6508405 100644 (file)
@@ -248,7 +248,7 @@ WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
     , m_hasCachedWindowFrame(false)
     , m_keyboardEventBeingInterpreted(0)
     , m_viewGestureGeometryCollector(*this)
-#elif PLATFORM(GTK)
+#elif PLATFORM(GTK) && HAVE(ACCESSIBILITY)
     , m_accessibilityObject(0)
 #endif
     , m_setCanStartMediaTimer(RunLoop::main(), this, &WebPage::setCanStartMediaTimerFired)
index 6f04d63..f76c656 100644 (file)
@@ -948,12 +948,12 @@ private:
 
 #elif HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
     GRefPtr<WebPageAccessibilityObject> m_accessibilityObject;
+#endif
 
-#if USE(TEXTURE_MAPPER_GL)
+#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
     // Our view's window in the UI process.
     uint64_t m_nativeWindowHandle;
 #endif
-#endif
 
 #if !PLATFORM(IOS)
     RefPtr<PageBanner> m_headerBanner;
index bf11f41..87c555b 100644 (file)
@@ -49,6 +49,7 @@ namespace WebKit {
 
 void WebPage::platformInitialize()
 {
+#if HAVE(ACCESSIBILITY)
     // Create the accessible object (the plug) that will serve as the
     // entry point to the Web process, and send a message to the UI
     // process to connect the two worlds through the accessibility
@@ -56,12 +57,14 @@ void WebPage::platformInitialize()
     m_accessibilityObject = adoptGRef(webPageAccessibilityObjectNew(this));
     GOwnPtr<gchar> plugID(atk_plug_get_id(ATK_PLUG(m_accessibilityObject.get())));
     send(Messages::WebPageProxy::BindAccessibilityTree(String(plugID.get())));
+#endif
 
 #if USE(TEXTURE_MAPPER_GL)
     m_nativeWindowHandle = 0;
 #endif
 }
 
+#if HAVE(ACCESSIBILITY)
 void WebPage::updateAccessibilityTree()
 {
     if (!m_accessibilityObject)
@@ -69,6 +72,7 @@ void WebPage::updateAccessibilityTree()
 
     webPageAccessibilityObjectRefresh(m_accessibilityObject.get());
 }
+#endif
 
 void WebPage::platformPreferencesDidChange(const WebPreferencesStore&)
 {
index 7f6868e..c4821f3 100644 (file)
@@ -1,3 +1,23 @@
+2014-01-22  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
+
+        [EFL][GTK] Get EFL and GTK compiling with ACCESSIBILITY disabled
+        https://bugs.webkit.org/show_bug.cgi?id=127119
+
+        Reviewed by Mario Sanchez Prada.
+
+        Guarding ACCESSIBILITY code in DumpRenderTree and WebKitTestRunner with HAVE(ACCESSIBILITY).
+
+        * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+        * DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
+        * DumpRenderTree/gtk/DumpRenderTree.cpp:
+        (resetDefaultsToConsistentValues):
+        (webViewWindowObjectCleared):
+        (main):
+        * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
+        (WTR::AccessibilityController::platformName):
+        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
+        (WTR::AccessibilityUIElement::isIndeterminate):
+
 2014-01-22  Carlos Garcia Campos  <cgarcia@igalia.com>
 
 
index 5bf316a..3aaecef 100644 (file)
@@ -33,6 +33,7 @@
 #include "EditingCallbacks.h"
 #include "EventSender.h"
 #include "GCController.h"
+#include "JSRetainPtr.h"
 #include "URL.h"
 #include "NotImplemented.h"
 #include "TestRunner.h"
index d89a8d2..4dcd2b5 100644 (file)
@@ -25,6 +25,9 @@
  */
 
 #include "config.h"
+
+#if HAVE(ACCESSIBILITY)
+
 #include "AccessibilityController.h"
 
 #include "AccessibilityCallbacks.h"
@@ -72,3 +75,5 @@ AccessibilityUIElement AccessibilityController::accessibleElementById(JSStringRe
     return 0;
 
 }
+
+#endif // HAVE(ACCESSIBILITY)
index 15f2f61..40c35c4 100644 (file)
@@ -81,7 +81,9 @@ static bool dumpPixelsForCurrentTest;
 static int dumpTree = 1;
 static int useTimeoutWatchdog = 1;
 
+#if HAVE(ACCESSIBILITY)
 AccessibilityController* axController = 0;
+#endif
 RefPtr<TestRunner> gTestRunner;
 static GCController* gcController = 0;
 static WebKitWebView* webView;
@@ -529,8 +531,10 @@ static void resetDefaultsToConsistentValues()
     DumpRenderTreeSupportGtk::setDefersLoading(webView, false);
     DumpRenderTreeSupportGtk::setSerializeHTTPLoads(false);
 
+#if HAVE(ACCESSIBILITY)
     if (axController)
         axController->resetToConsistentState();
+#endif
 
     DumpRenderTreeSupportGtk::clearOpener(mainFrame);
     DumpRenderTreeSupportGtk::setTracksRepaints(mainFrame, false);
@@ -921,8 +925,10 @@ static void webViewWindowObjectCleared(WebKitWebView* view, WebKitWebFrame* fram
     gcController->makeWindowObject(context, windowObject, &exception);
     ASSERT(!exception);
 
+#if HAVE(ACCESSIBILITY)
     axController->makeWindowObject(context, windowObject, &exception);
     ASSERT(!exception);
+#endif
 
     addControllerToWindow(context, windowObject, "eventSender", makeEventSender(context, !webkit_web_frame_get_parent(frame)));
     addControllerToWindow(context, windowObject, "textInputController", makeTextInputController(context));
@@ -1524,7 +1530,9 @@ int main(int argc, char* argv[])
     setDefaultsToConsistentStateValuesForTesting();
 
     gcController = new GCController();
+#if HAVE(ACCESSIBILITY)
     axController = new AccessibilityController();
+#endif
 
     if (useLongRunningServerMode(argc, argv)) {
         printSeparators = true;
@@ -1538,8 +1546,10 @@ int main(int argc, char* argv[])
     delete gcController;
     gcController = 0;
 
+#if HAVE(ACCESSIBILITY)
     delete axController;
     axController = 0;
+#endif
 
     gtk_widget_destroy(window);
 
index c8ad406..f5d1bd5 100644 (file)
@@ -93,6 +93,7 @@ bool AccessibilityController::removeNotificationListener() { return false; }
 PassRefPtr<AccessibilityUIElement> AccessibilityController::accessibleElementById(JSStringRef attribute) { return nullptr; }
 void AccessibilityController::logAccessibilityEvents() { }
 void AccessibilityController::resetToConsistentState() { }
+JSRetainPtr<JSStringRef> AccessibilityController::platformName() { return JSRetainPtr<JSStringRef>(Adopt, JSStringCreateWithUTF8CString("")); }
 #endif
 
 #if !HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
index 4072ff5..dd811de 100644 (file)
@@ -129,6 +129,7 @@ unsigned AccessibilityUIElement::selectedChildrenCount() const { return 0; }
 PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::selectedChildAtIndex(unsigned) const { return 0; }
 bool AccessibilityUIElement::isExpanded() const { return false; }
 bool AccessibilityUIElement::isChecked() const { return false; }
+bool AccessibilityUIElement::isIndeterminate() const { return false; }
 bool AccessibilityUIElement::isVisible() const { return false; }
 bool AccessibilityUIElement::isOffScreen() const { return false; }
 bool AccessibilityUIElement::isCollapsed() const { return false; }