- Revision
- 146312
- Author
- commit-qu...@webkit.org
- Date
- 2013-03-20 01:12:15 -0700 (Wed, 20 Mar 2013)
Log Message
[GTK] accessibility/aria-scrollbar-role.html is failing
https://bugs.webkit.org/show_bug.cgi?id=98358
Patch by Krzysztof Czech <k.cz...@samsung.com> on 2013-03-20
Reviewed by Martin Robinson.
Source/WebCore:
Adds support for checking an orientation attribute of accessibility object.
AccessibilityObject that represents ScrollBar element should be ATK_VALUE type.
ScrollBar element can be considered as a Range Widget that is able to expose some
range values.
Test: accessibility/aria-scrollbar-role.html
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(setAtkStateSetFromCoreObject):
(getInterfaceMaskFromObject):
Tools:
Adds support for checking accessibility object's orientation.
Orientation is checked by retrieving proper state of accessibility object.
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(checkElementState):
(AccessibilityUIElement::orientation):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::orientation):
LayoutTests:
Fixed failing test.
* platform/gtk/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (146311 => 146312)
--- trunk/LayoutTests/ChangeLog 2013-03-20 08:07:19 UTC (rev 146311)
+++ trunk/LayoutTests/ChangeLog 2013-03-20 08:12:15 UTC (rev 146312)
@@ -1,3 +1,14 @@
+2013-03-20 Krzysztof Czech <k.cz...@samsung.com>
+
+ [GTK] accessibility/aria-scrollbar-role.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=98358
+
+ Reviewed by Martin Robinson.
+
+ Fixed failing test.
+
+ * platform/gtk/TestExpectations:
+
2013-03-20 Zan Dobersek <zdober...@igalia.com>
Unreviewed GTK gardening. Rebaselining after r146305.
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (146311 => 146312)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2013-03-20 08:07:19 UTC (rev 146311)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2013-03-20 08:12:15 UTC (rev 146312)
@@ -790,7 +790,6 @@
webkit.org/b/98355 accessibility/aria-link-supports-press.html [ Failure ]
webkit.org/b/98357 accessibility/aria-readonly.html [ Failure ]
-webkit.org/b/98358 accessibility/aria-scrollbar-role.html [ Failure ]
webkit.org/b/98359 accessibility/aria-text-role.html [ Failure ]
webkit.org/b/98360 accessibility/aria-used-on-image-maps.html [ Failure ]
webkit.org/b/98361 accessibility/button-press-action.html [ Failure ]
Modified: trunk/Source/WebCore/ChangeLog (146311 => 146312)
--- trunk/Source/WebCore/ChangeLog 2013-03-20 08:07:19 UTC (rev 146311)
+++ trunk/Source/WebCore/ChangeLog 2013-03-20 08:12:15 UTC (rev 146312)
@@ -1,3 +1,21 @@
+2013-03-20 Krzysztof Czech <k.cz...@samsung.com>
+
+ [GTK] accessibility/aria-scrollbar-role.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=98358
+
+ Reviewed by Martin Robinson.
+
+ Adds support for checking an orientation attribute of accessibility object.
+ AccessibilityObject that represents ScrollBar element should be ATK_VALUE type.
+ ScrollBar element can be considered as a Range Widget that is able to expose some
+ range values.
+
+ Test: accessibility/aria-scrollbar-role.html
+
+ * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+ (setAtkStateSetFromCoreObject):
+ (getInterfaceMaskFromObject):
+
2013-03-20 Zan Dobersek <zdober...@igalia.com>
Unreviewed. Fixing a typo in libLevelDB_la_CFLAGS assignment - cxflags -> cflags.
Modified: trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp (146311 => 146312)
--- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp 2013-03-20 08:07:19 UTC (rev 146311)
+++ trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp 2013-03-20 08:12:15 UTC (rev 146312)
@@ -695,7 +695,10 @@
if (coreObject->isFocused() || isTextWithCaret(coreObject))
atk_state_set_add_state(stateSet, ATK_STATE_FOCUSED);
- // TODO: ATK_STATE_HORIZONTAL
+ if (coreObject->orientation() == AccessibilityOrientationHorizontal)
+ atk_state_set_add_state(stateSet, ATK_STATE_HORIZONTAL);
+ else if (coreObject->orientation() == AccessibilityOrientationVertical)
+ atk_state_set_add_state(stateSet, ATK_STATE_VERTICAL);
if (coreObject->isIndeterminate())
atk_state_set_add_state(stateSet, ATK_STATE_INDETERMINATE);
@@ -745,8 +748,6 @@
// TODO: ATK_STATE_SENSITIVE
- // TODO: ATK_STATE_VERTICAL
-
if (coreObject->isVisited())
atk_state_set_add_state(stateSet, ATK_STATE_VISITED);
}
@@ -977,7 +978,7 @@
interfaceMask |= 1 << WAI_DOCUMENT;
// Value
- if (role == SliderRole || role == SpinButtonRole)
+ if (role == SliderRole || role == SpinButtonRole || role == ScrollBarRole)
interfaceMask |= 1 << WAI_VALUE;
return interfaceMask;
Modified: trunk/Tools/ChangeLog (146311 => 146312)
--- trunk/Tools/ChangeLog 2013-03-20 08:07:19 UTC (rev 146311)
+++ trunk/Tools/ChangeLog 2013-03-20 08:12:15 UTC (rev 146312)
@@ -1,3 +1,19 @@
+2013-03-20 Krzysztof Czech <k.cz...@samsung.com>
+
+ [GTK] accessibility/aria-scrollbar-role.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=98358
+
+ Reviewed by Martin Robinson.
+
+ Adds support for checking accessibility object's orientation.
+ Orientation is checked by retrieving proper state of accessibility object.
+
+ * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
+ (checkElementState):
+ (AccessibilityUIElement::orientation):
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::AccessibilityUIElement::orientation):
+
2013-03-19 Jochen Eisinger <joc...@chromium.org>
[chromium] move WebThemeEngine implementations to TestRunner library
Modified: trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp (146311 => 146312)
--- trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp 2013-03-20 08:07:19 UTC (rev 146311)
+++ trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp 2013-03-20 08:12:15 UTC (rev 146312)
@@ -175,6 +175,15 @@
return g_strdup(uString.utf8().data());
}
+static bool checkElementState(PlatformUIElement element, AtkStateType stateType)
+{
+ if (!ATK_IS_OBJECT(element))
+ return false;
+
+ GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(element)));
+ return atk_state_set_contains_state(stateSet.get(), stateType);
+}
+
AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element)
: m_element(element)
{
@@ -490,7 +499,19 @@
JSStringRef AccessibilityUIElement::orientation() const
{
- return 0;
+ if (!m_element || !ATK_IS_OBJECT(m_element))
+ return JSStringCreateWithCharacters(0, 0);
+
+ const char* axOrientation = 0;
+ if (checkElementState(m_element, ATK_STATE_HORIZONTAL))
+ axOrientation = "AXOrientation: AXHorizontalOrientation";
+ else if (checkElementState(m_element, ATK_STATE_VERTICAL))
+ axOrientation = "AXOrientation: AXVerticalOrientation";
+
+ if (!axOrientation)
+ return JSStringCreateWithCharacters(0, 0);
+
+ return JSStringCreateWithUTF8CString(axOrientation);
}
double AccessibilityUIElement::intValue() const
@@ -539,15 +560,6 @@
return JSStringCreateWithCharacters(0, 0);
}
-static bool checkElementState(PlatformUIElement element, AtkStateType stateType)
-{
- if (!ATK_IS_OBJECT(element))
- return false;
-
- GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(element)));
- return atk_state_set_contains_state(stateSet.get(), stateType);
-}
-
bool AccessibilityUIElement::isEnabled()
{
return checkElementState(m_element, ATK_STATE_ENABLED);
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (146311 => 146312)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp 2013-03-20 08:07:19 UTC (rev 146311)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp 2013-03-20 08:12:15 UTC (rev 146312)
@@ -541,8 +541,19 @@
JSRetainPtr<JSStringRef> AccessibilityUIElement::orientation() const
{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
+ if (!m_element || !ATK_IS_OBJECT(m_element))
+ return JSStringCreateWithCharacters(0, 0);
+
+ const gchar* axOrientation = 0;
+ if (checkElementState(m_element, ATK_STATE_HORIZONTAL))
+ axOrientation = "AXOrientation: AXHorizontalOrientation";
+ else if (checkElementState(m_element, ATK_STATE_VERTICAL))
+ axOrientation = "AXOrientation: AXVerticalOrientation";
+
+ if (!axOrientation)
+ return JSStringCreateWithCharacters(0, 0);
+
+ return JSStringCreateWithUTF8CString(axOrientation);
}
JSRetainPtr<JSStringRef> AccessibilityUIElement::stringValue()