[EFL][GTK] Get EFL and GTK compiling with ACCESSIBILITY disabled

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: http://svn.webkit.org/repository/webkit/trunk@162538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3bc79669
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
......@@ -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; }
......
......@@ -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
......
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
......
......@@ -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;
......
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
......
......@@ -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)
......
......@@ -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;
......
......@@ -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&)
{
......
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>
......
......@@ -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"
......
......@@ -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)
......@@ -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);
......
......@@ -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))
......
......@@ -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; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment