Diff
Modified: trunk/LayoutTests/ChangeLog (145013 => 145014)
--- trunk/LayoutTests/ChangeLog 2013-03-07 01:24:42 UTC (rev 145013)
+++ trunk/LayoutTests/ChangeLog 2013-03-07 01:27:49 UTC (rev 145014)
@@ -1,3 +1,15 @@
+2013-03-06 Krzysztof Czech <[email protected]>
+
+ [EFL] Missing implementation of AccessibilityControllerEfl and AccessibilityUIElementEfl files
+ https://bugs.webkit.org/show_bug.cgi?id=110584
+
+ Reviewed by Gyuyoung Kim.
+
+ Unskipping LayoutTests/accessibility folder.
+ Added failure tests. Skipping those with missing expected results.
+
+ * platform/efl-wk1/TestExpectations:
+
2013-03-06 Benjamin Poulain <[email protected]>
WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
Modified: trunk/LayoutTests/platform/efl-wk1/TestExpectations (145013 => 145014)
--- trunk/LayoutTests/platform/efl-wk1/TestExpectations 2013-03-07 01:24:42 UTC (rev 145013)
+++ trunk/LayoutTests/platform/efl-wk1/TestExpectations 2013-03-07 01:27:49 UTC (rev 145014)
@@ -108,9 +108,78 @@
webkit.org/b/99183 svg/dynamic-updates/SVGFETurbulenceElement-dom-stitchTiles-attr.html [ ImageOnlyFailure ]
webkit.org/b/99183 svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop.html [ ImageOnlyFailure ]
-# The EFL port has no support for accessibility features in wk1
-Bug(EFL) accessibility [ Skip ]
+accessibility/aria-hidden-updates-alldescendants.html [ Failure ]
+accessibility/aria-invalid.html [ Failure ]
+accessibility/aria-link-supports-press.html [ Failure ]
+accessibility/aria-readonly.html [ Failure ]
+accessibility/aria-scrollbar-role.html [ Failure ]
+accessibility/aria-text-role.html [ Failure ]
+accessibility/aria-used-on-image-maps.html [ Failure ]
+accessibility/button-press-action.html [ Failure ]
+accessibility/canvas-accessibilitynodeobject.html [ Failure ]
+accessibility/canvas-fallback-content-2.html [ Failure ]
+accessibility/canvas-fallback-content.html [ Failure ]
+accessibility/disabled-controls-not-focusable.html [ Failure ]
+accessibility/heading-level.html [ Failure ]
+accessibility/ignore-spacer-elements.html [ Failure ]
+accessibility/inline-continuations.html [ Failure ]
+accessibility/loading-iframe-sends-notification.html [ Failure ]
+accessibility/loading-iframe-updates-axtree.html [ Failure ]
+accessibility/onclick-handlers.html [ Failure ]
+accessibility/secure-textfield-title-ui.html [ Failure ]
+accessibility/selection-states.html [ Failure ]
+accessibility/spinbutton-value.html [ Failure ]
+accessibility/svg-bounds.html [ Failure ]
+accessibility/svg-remote-element.html [ Failure ]
+accessibility/textarea-insertion-point-line-number.html [ Failure ]
+accessibility/textarea-line-for-index.html [ Failure ]
+accessibility/textarea-selected-text-range.html [ Failure ]
+accessibility/textbox-role-reports-selection.html [ Failure ]
+accessibility/th-as-title-ui.html [ Failure ]
+accessibility/title-ui-element-correctness.html [ Failure ]
+accessibility/transformed-element.html [ Failure ]
+accessibility/visible-elements.html [ Failure ]
+accessibility/adjacent-continuations-cause-assertion-failure.html [ Skip ]
+accessibility/aria-checkbox-sends-notification.html [ Skip ]
+accessibility/aria-checkbox-text.html [ Skip ]
+accessibility/aria-combobox.html [ Skip ]
+accessibility/aria-fallback-roles.html [ Skip ]
+accessibility/aria-labelledby-overrides-aria-label.html [ Skip ]
+accessibility/aria-menubar-menuitems.html [ Skip ]
+accessibility/aria-option-role.html [ Skip ]
+accessibility/aria-roles.html [ Skip ]
+accessibility/aria-tables.html [ Skip ]
+accessibility/aria-toggle-button-with-title.html [ Skip ]
+accessibility/canvas-description-and-role.html [ Skip ]
+accessibility/color-well.html [ Skip ]
+accessibility/deleting-iframe-destroys-axcache.html [ Skip ]
+accessibility/div-within-anchors-causes-crash.html [ Skip ]
+accessibility/image-link.html [ Skip ]
+accessibility/image-map1.html [ Skip ]
+accessibility/image-map2.html [ Skip ]
+accessibility/img-alt-tag-only-whitespace.html [ Skip ]
+accessibility/img-fallsback-to-title.html [ Skip ]
+accessibility/internal-link-anchors2.html [ Skip ]
+accessibility/legend.html [ Skip ]
+accessibility/lists.html [ Skip ]
+accessibility/media-element.html [ Skip ]
+accessibility/menu-list-sends-change-notification.html [ Skip ]
+accessibility/multiselect-list-reports-active-option.html [ Skip ]
+accessibility/notification-listeners.html [ Skip ]
+accessibility/platform-name.html [ Skip ]
+accessibility/plugin.html [ Skip ]
+accessibility/radio-button-group-members.html [ Skip ]
+accessibility/svg-image.html [ Skip ]
+accessibility/table-attributes.html [ Skip ]
+accessibility/table-cell-spans.html [ Skip ]
+accessibility/table-cells.html [ Skip ]
+accessibility/table-detection.html [ Skip ]
+accessibility/table-one-cell.html [ Skip ]
+accessibility/table-sections.html [ Skip ]
+accessibility/table-with-aria-role.html [ Skip ]
+accessibility/table-with-rules.html [ Skip ]
+
# Frame flattening does not work properly for EFL port
Bug(EFL) fast/frames/flattening/frameset-flattening-advanced.html [ Failure ]
Bug(EFL) fast/frames/flattening/frameset-flattening-grid.html [ Failure ]
Modified: trunk/Source/WebKit/efl/ChangeLog (145013 => 145014)
--- trunk/Source/WebKit/efl/ChangeLog 2013-03-07 01:24:42 UTC (rev 145013)
+++ trunk/Source/WebKit/efl/ChangeLog 2013-03-07 01:27:49 UTC (rev 145014)
@@ -1,3 +1,16 @@
+2013-03-06 Krzysztof Czech <[email protected]>
+
+ [EFL] Missing implementation of AccessibilityControllerEfl and AccessibilityUIElementEfl files
+ https://bugs.webkit.org/show_bug.cgi?id=110584
+
+ Reviewed by Gyuyoung Kim.
+
+ Adds support for help text in DumpRenderTree.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::accessibilityHelpText):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
2013-03-06 Benjamin Poulain <[email protected]>
WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
Modified: trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp (145013 => 145014)
--- trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp 2013-03-07 01:24:42 UTC (rev 145013)
+++ trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp 2013-03-07 01:27:49 UTC (rev 145014)
@@ -757,6 +757,18 @@
}
#if HAVE(ACCESSIBILITY)
+String DumpRenderTreeSupportEfl::accessibilityHelpText(const AtkObject* axObject)
+{
+ if (!axObject || !WEBKIT_IS_ACCESSIBLE(axObject))
+ return String();
+
+ WebCore::AccessibilityObject* coreObject = webkitAccessibleGetAccessibilityObject(WEBKIT_ACCESSIBLE(axObject));
+ if (!coreObject)
+ return String();
+
+ return coreObject->helpText();
+}
+
AtkObject* DumpRenderTreeSupportEfl::rootAccessibleElement(const Evas_Object* ewkFrame)
{
DRT_SUPPORT_FRAME_GET_OR_RETURN(ewkFrame, frame, 0);
Modified: trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h (145013 => 145014)
--- trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h 2013-03-07 01:24:42 UTC (rev 145013)
+++ trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h 2013-03-07 01:27:49 UTC (rev 145014)
@@ -129,6 +129,7 @@
static int numberOfPendingGeolocationPermissionRequests(const Evas_Object*);
#if HAVE(ACCESSIBILITY)
+ static String accessibilityHelpText(const AtkObject* axObject);
static AtkObject* focusedAccessibleElement(const Evas_Object*);
static AtkObject* rootAccessibleElement(const Evas_Object*);
#endif
Modified: trunk/Tools/ChangeLog (145013 => 145014)
--- trunk/Tools/ChangeLog 2013-03-07 01:24:42 UTC (rev 145013)
+++ trunk/Tools/ChangeLog 2013-03-07 01:27:49 UTC (rev 145014)
@@ -1,3 +1,36 @@
+2013-03-06 Krzysztof Czech <[email protected]>
+
+ [EFL] Missing implementation of AccessibilityControllerEfl and AccessibilityUIElementEfl files
+ https://bugs.webkit.org/show_bug.cgi?id=110584
+
+ Reviewed by Gyuyoung Kim.
+
+ Adds missing implementation of AccessibilityControllerEfl
+ and AccessibilityUIElementEfl files. Modify DumpRenderTreeChrome
+ so that it can make accessibilityController as a js object.
+
+ * DumpRenderTree/AccessibilityController.h:
+ (AccessibilityController):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/atk/AccessibilityControllerAtk.cpp:
+ (AccessibilityController::childElementById): Moved declaration to base class.
+ Implementation can be shared among other ports.
+ * DumpRenderTree/efl/AccessibilityControllerEfl.cpp: Copied from Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp.
+ (AccessibilityController::focusedElement):
+ (AccessibilityController::rootElement):
+ (AccessibilityController::accessibleElementById):
+ * DumpRenderTree/efl/AccessibilityUIElementEfl.cpp: Copied from Tools/DumpRenderTree/atk/AccessibilityControllerAtk.cpp.
+ (AccessibilityUIElement::helpText):
+ * DumpRenderTree/efl/CMakeLists.txt:
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::DumpRenderTreeChrome):
+ (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
+ (DumpRenderTreeChrome::onWindowObjectCleared):
+ (DumpRenderTreeChrome::accessibilityController):
+ * DumpRenderTree/efl/DumpRenderTreeChrome.h:
+ (DumpRenderTreeChrome):
+ * DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
+
2013-03-06 Benjamin Poulain <[email protected]>
WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
Modified: trunk/Tools/DumpRenderTree/AccessibilityController.h (145013 => 145014)
--- trunk/Tools/DumpRenderTree/AccessibilityController.h 2013-03-07 01:24:42 UTC (rev 145013)
+++ trunk/Tools/DumpRenderTree/AccessibilityController.h 2013-03-07 01:27:49 UTC (rev 145014)
@@ -34,6 +34,9 @@
#if PLATFORM(WIN)
#include <windows.h>
#endif
+#if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
+#include <atk/atk.h>
+#endif
class AccessibilityController {
public:
@@ -65,6 +68,10 @@
void winNotificationReceived(PlatformUIElement, const std::string& eventName);
#endif
+#if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
+ AtkObject* childElementById(AtkObject* parent, const char* id);
+#endif
+
private:
static JSClassRef getJSClass();
Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.h (145013 => 145014)
--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.h 2013-03-07 01:24:42 UTC (rev 145013)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.h 2013-03-07 01:27:49 UTC (rev 145014)
@@ -45,7 +45,7 @@
#include <oleacc.h>
typedef COMPtr<IAccessible> PlatformUIElement;
-#elif PLATFORM(GTK)
+#elif HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
#include <atk/atk.h>
typedef AtkObject* PlatformUIElement;
#else
Modified: trunk/Tools/DumpRenderTree/atk/AccessibilityControllerAtk.cpp (145013 => 145014)
--- trunk/Tools/DumpRenderTree/atk/AccessibilityControllerAtk.cpp 2013-03-07 01:24:42 UTC (rev 145013)
+++ trunk/Tools/DumpRenderTree/atk/AccessibilityControllerAtk.cpp 2013-03-07 01:27:49 UTC (rev 145014)
@@ -88,4 +88,29 @@
{
}
+AtkObject* AccessibilityController::childElementById(AtkObject* parent, const char* id)
+{
+ if (!ATK_IS_OBJECT(parent))
+ return 0;
+
+ AtkAttributeSet* attributeSet = atk_object_get_attributes(parent);
+ for (GSList* attributes = attributeSet; attributes; attributes = attributes->next) {
+ AtkAttribute* attribute = static_cast<AtkAttribute*>(attributes->data);
+ if (!strcmp(attribute->name, "html-id")) {
+ if (!strcmp(attribute->value, id))
+ return parent;
+ break;
+ }
+ }
+
+ int childCount = atk_object_get_n_accessible_children(parent);
+ for (int i = 0; i < childCount; i++) {
+ AtkObject* result = childElementById(atk_object_ref_accessible_child(parent, i), id);
+ if (ATK_IS_OBJECT(result))
+ return result;
+ }
+
+ return 0;
+}
+
#endif
Copied: trunk/Tools/DumpRenderTree/efl/AccessibilityControllerEfl.cpp (from rev 145013, trunk/Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp) (0 => 145014)
--- trunk/Tools/DumpRenderTree/efl/AccessibilityControllerEfl.cpp (rev 0)
+++ trunk/Tools/DumpRenderTree/efl/AccessibilityControllerEfl.cpp 2013-03-07 01:27:49 UTC (rev 145014)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2009 Jan Michael Alonzo
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
+ *
+ * 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. ``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
+ * 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.
+ */
+
+#include "config.h"
+#include "AccessibilityController.h"
+
+#if HAVE(ACCESSIBILITY)
+
+#include "AccessibilityCallbacks.h"
+#include "AccessibilityUIElement.h"
+#include "DumpRenderTree.h"
+#include "DumpRenderTreeChrome.h"
+#include "WebCoreSupport/DumpRenderTreeSupportEfl.h"
+
+#include <atk/atk.h>
+#include <wtf/gobject/GOwnPtr.h>
+
+AccessibilityUIElement AccessibilityController::focusedElement()
+{
+ AtkObject* accessible = DumpRenderTreeSupportEfl::focusedAccessibleElement(browser->mainFrame());
+ if (!accessible)
+ return 0;
+
+ return AccessibilityUIElement(accessible);
+}
+
+AccessibilityUIElement AccessibilityController::rootElement()
+{
+ AtkObject* accessible = DumpRenderTreeSupportEfl::rootAccessibleElement(browser->mainFrame());
+ if (!accessible)
+ return 0;
+
+ return AccessibilityUIElement(accessible);
+}
+
+AccessibilityUIElement AccessibilityController::accessibleElementById(JSStringRef id)
+{
+ AtkObject* root = DumpRenderTreeSupportEfl::rootAccessibleElement(browser->mainFrame());
+ if (!root)
+ return 0;
+
+ size_t bufferSize = JSStringGetMaximumUTF8CStringSize(id);
+ GOwnPtr<gchar> idBuffer(static_cast<gchar*>(g_malloc(bufferSize)));
+ JSStringGetUTF8CString(id, idBuffer.get(), bufferSize);
+
+ AtkObject* result = childElementById(root, idBuffer.get());
+ if (ATK_IS_OBJECT(result))
+ return AccessibilityUIElement(result);
+
+ return 0;
+}
+
+#endif
Copied: trunk/Tools/DumpRenderTree/efl/AccessibilityUIElementEfl.cpp (from rev 145013, trunk/Tools/DumpRenderTree/atk/AccessibilityControllerAtk.cpp) (0 => 145014)
--- trunk/Tools/DumpRenderTree/efl/AccessibilityUIElementEfl.cpp (rev 0)
+++ trunk/Tools/DumpRenderTree/efl/AccessibilityUIElementEfl.cpp 2013-03-07 01:27:49 UTC (rev 145014)
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2009 Jan Michael Alonzo
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
+ *
+ * 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. ``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
+ * 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.
+ */
+
+#include "config.h"
+#include "AccessibilityUIElement.h"
+
+#if HAVE(ACCESSIBILITY)
+
+#include "WebCoreSupport/DumpRenderTreeSupportEfl.h"
+#include <_javascript_Core/JSStringRef.h>
+#include <atk/atk.h>
+#include <wtf/Assertions.h>
+#include <wtf/gobject/GOwnPtr.h>
+#include <wtf/gobject/GRefPtr.h>
+#include <wtf/text/WTFString.h>
+#include <wtf/unicode/CharacterNames.h>
+
+JSStringRef AccessibilityUIElement::helpText() const
+{
+ if (!m_element)
+ return JSStringCreateWithCharacters(0, 0);
+
+ ASSERT(ATK_IS_OBJECT(m_element));
+
+ String helpText = DumpRenderTreeSupportEfl::accessibilityHelpText(ATK_OBJECT(m_element));
+ GOwnPtr<gchar> axHelpText(g_strdup_printf("AXHelp: %s", helpText.utf8().data()));
+ return JSStringCreateWithUTF8CString(axHelpText.get());
+}
+
+#endif
Modified: trunk/Tools/DumpRenderTree/efl/CMakeLists.txt (145013 => 145014)
--- trunk/Tools/DumpRenderTree/efl/CMakeLists.txt 2013-03-07 01:24:42 UTC (rev 145013)
+++ trunk/Tools/DumpRenderTree/efl/CMakeLists.txt 2013-03-07 01:27:49 UTC (rev 145014)
@@ -1,12 +1,19 @@
set(DumpRenderTree_SOURCES
- ${TOOLS_DIR}/DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp
+ ${TOOLS_DIR}/DumpRenderTree/AccessibilityController.cpp
+ ${TOOLS_DIR}/DumpRenderTree/AccessibilityTextMarker.cpp
+ ${TOOLS_DIR}/DumpRenderTree/AccessibilityUIElement.cpp
${TOOLS_DIR}/DumpRenderTree/DumpRenderTreeCommon.cpp
${TOOLS_DIR}/DumpRenderTree/CyclicRedundancyCheck.cpp
${TOOLS_DIR}/DumpRenderTree/GCController.cpp
${TOOLS_DIR}/DumpRenderTree/TestRunner.cpp
${TOOLS_DIR}/DumpRenderTree/PixelDumpSupport.cpp
${TOOLS_DIR}/DumpRenderTree/WorkQueue.cpp
+ ${TOOLS_DIR}/DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp
+ ${TOOLS_DIR}/DumpRenderTree/atk/AccessibilityControllerAtk.cpp
+ ${TOOLS_DIR}/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp
${TOOLS_DIR}/DumpRenderTree/cairo/PixelDumpSupportCairo.cpp
+ ${TOOLS_DIR}/DumpRenderTree/efl/AccessibilityControllerEfl.cpp
+ ${TOOLS_DIR}/DumpRenderTree/efl/AccessibilityUIElementEfl.cpp
${TOOLS_DIR}/DumpRenderTree/efl/DumpHistoryItem.cpp
${TOOLS_DIR}/DumpRenderTree/efl/DumpRenderTree.cpp
${TOOLS_DIR}/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
@@ -115,6 +122,7 @@
if (ENABLE_ACCESSIBILITY)
list(APPEND DumpRenderTree_INCLUDE_DIRECTORIES
+ ${TOOLS_DIR}/DumpRenderTree/atk
${ATK_INCLUDE_DIRS}
)
list(APPEND DumpRenderTree_LIBRARIES
Modified: trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp (145013 => 145014)
--- trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp 2013-03-07 01:24:42 UTC (rev 145013)
+++ trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp 2013-03-07 01:27:49 UTC (rev 145014)
@@ -50,6 +50,10 @@
#include <wtf/NotFound.h>
#include <wtf/text/StringBuilder.h>
+#if HAVE(ACCESSIBILITY)
+#include "AccessibilityController.h"
+#endif
+
using namespace WebCore;
HashMap<unsigned long, CString> DumpRenderTreeChrome::m_dumpAssignedUrls;
@@ -70,6 +74,7 @@
, m_mainFrame(0)
, m_evas(evas)
, m_gcController(adoptPtr(new GCController))
+ , m_axController(adoptPtr(new AccessibilityController))
{
}
@@ -297,6 +302,10 @@
ewk_security_policy_whitelist_origin_reset();
+#if HAVE(ACCESSIBILITY)
+ browser->accessibilityController()->resetToConsistentState();
+#endif
+
DumpRenderTreeSupportEfl::clearFrameName(mainFrame());
DumpRenderTreeSupportEfl::clearOpener(mainFrame());
DumpRenderTreeSupportEfl::clearUserScripts(mainView());
@@ -430,6 +439,11 @@
JSValueRef exception = 0;
ASSERT(gTestRunner);
+#if HAVE(ACCESSIBILITY)
+ browser->accessibilityController()->makeWindowObject(objectClearedInfo->context, objectClearedInfo->windowObject, &exception);
+ ASSERT(!exception);
+#endif
+
GCController* gcController = static_cast<GCController*>(userData);
ASSERT(gcController);
@@ -850,3 +864,8 @@
browser->m_extraViews.append(newView);
}
+
+AccessibilityController* DumpRenderTreeChrome::accessibilityController() const
+{
+ return m_axController.get();
+}
Modified: trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h (145013 => 145014)
--- trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h 2013-03-07 01:24:42 UTC (rev 145013)
+++ trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h 2013-03-07 01:27:49 UTC (rev 145014)
@@ -38,6 +38,10 @@
#include <wtf/Vector.h>
#include <wtf/text/CString.h>
+#if HAVE(ACCESSIBILITY)
+#include "AccessibilityController.h"
+#endif
+
class DumpRenderTreeChrome {
public:
~DumpRenderTreeChrome();
@@ -64,10 +68,12 @@
Evas_Object* createView() const;
bool initialize();
+ AccessibilityController* accessibilityController() const;
Evas_Object* m_mainFrame;
Evas_Object* m_mainView;
Evas* m_evas;
+ OwnPtr<AccessibilityController> m_axController;
OwnPtr<GCController> m_gcController;
Vector<Evas_Object*> m_extraViews;
static HashMap<unsigned long, CString> m_dumpAssignedUrls;
Modified: trunk/Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp (145013 => 145014)
--- trunk/Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp 2013-03-07 01:24:42 UTC (rev 145013)
+++ trunk/Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp 2013-03-07 01:27:49 UTC (rev 145014)
@@ -37,31 +37,6 @@
#include <webkit/webkit.h>
#include <wtf/gobject/GOwnPtr.h>
-static AtkObject* childElementById(AtkObject* parent, const char* id)
-{
- if (!ATK_IS_OBJECT(parent))
- return 0;
-
- AtkAttributeSet* attributeSet = atk_object_get_attributes(parent);
- for (GSList* attributes = attributeSet; attributes; attributes = attributes->next) {
- AtkAttribute* attribute = static_cast<AtkAttribute*>(attributes->data);
- if (!strcmp(attribute->name, "html-id")) {
- if (!strcmp(attribute->value, id))
- return parent;
- break;
- }
- }
-
- int childCount = atk_object_get_n_accessible_children(parent);
- for (int i = 0; i < childCount; i++) {
- AtkObject* result = childElementById(atk_object_ref_accessible_child(parent, i), id);
- if (ATK_IS_OBJECT(result))
- return result;
- }
-
- return 0;
-}
-
AccessibilityUIElement AccessibilityController::focusedElement()
{
AtkObject* accessible = DumpRenderTreeSupportGtk::getFocusedAccessibleElement(mainFrame);