Title: [156530] trunk
- Revision
- 156530
- Author
- ma...@webkit.org
- Date
- 2013-09-27 01:58:08 -0700 (Fri, 27 Sep 2013)
Log Message
[ATK] accessibility/aria-sort.html is failing after r156409
https://bugs.webkit.org/show_bug.cgi?id=121947
Reviewed by Chris Fleizach.
Source/WebCore:
The WAI-ARIA spec says to translate the value as is from the
attribute, so do just that instead of mapping values from the
AccessibilitySortDirection enumeration into strings.
http://www.w3.org/TR/wai-aria-implementation/#mapping_state-property
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes): Do the right mapping for aria-sort.
Tools:
Implement AccessibilityUIElement::isSupported for the ATK
platforms, just by checking whether we have an associated object
attribute exposed for the wrapper object matching the required
attribute in the layout test (e.g "AXSortDirection" -> "sort").
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::isAttributeSupported): Implemented.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::isAttributeSupported): Implemented.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (156529 => 156530)
--- trunk/Source/WebCore/ChangeLog 2013-09-27 07:48:50 UTC (rev 156529)
+++ trunk/Source/WebCore/ChangeLog 2013-09-27 08:58:08 UTC (rev 156530)
@@ -1,3 +1,18 @@
+2013-09-27 Mario Sanchez Prada <mario.pr...@samsung.com>
+
+ [ATK] accessibility/aria-sort.html is failing after r156409
+ https://bugs.webkit.org/show_bug.cgi?id=121947
+
+ Reviewed by Chris Fleizach.
+
+ The WAI-ARIA spec says to translate the value as is from the
+ attribute, so do just that instead of mapping values from the
+ AccessibilitySortDirection enumeration into strings.
+ http://www.w3.org/TR/wai-aria-implementation/#mapping_state-property
+
+ * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+ (webkitAccessibleGetAttributes): Do the right mapping for aria-sort.
+
2013-09-26 Gyuyoung Kim <gyuyoung....@samsung.com>
Sync toWebKitCSSShaderValue() behavior with other toCSSFooValue()
Modified: trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp (156529 => 156530)
--- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp 2013-09-27 07:48:50 UTC (rev 156529)
+++ trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp 2013-09-27 08:58:08 UTC (rev 156530)
@@ -497,8 +497,9 @@
AccessibilitySortDirection sortDirection = coreObject->sortDirection();
if (sortDirection != SortDirectionNone) {
- attributeSet = addToAtkAttributeSet(attributeSet, "sort",
- sortDirection == SortDirectionAscending ? "ascending" : "descending");
+ // WAI-ARIA spec says to translate the value as is from the attribute.
+ const AtomicString& sortAttribute = coreObject->getAttribute(HTMLNames::aria_sortAttr);
+ attributeSet = addToAtkAttributeSet(attributeSet, "sort", sortAttribute.string().utf8().data());
}
return attributeSet;
Modified: trunk/Tools/ChangeLog (156529 => 156530)
--- trunk/Tools/ChangeLog 2013-09-27 07:48:50 UTC (rev 156529)
+++ trunk/Tools/ChangeLog 2013-09-27 08:58:08 UTC (rev 156530)
@@ -1,3 +1,20 @@
+2013-09-27 Mario Sanchez Prada <mario.pr...@samsung.com>
+
+ [ATK] accessibility/aria-sort.html is failing after r156409
+ https://bugs.webkit.org/show_bug.cgi?id=121947
+
+ Reviewed by Chris Fleizach.
+
+ Implement AccessibilityUIElement::isSupported for the ATK
+ platforms, just by checking whether we have an associated object
+ attribute exposed for the wrapper object matching the required
+ attribute in the layout test (e.g "AXSortDirection" -> "sort").
+
+ * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
+ (AccessibilityUIElement::isAttributeSupported): Implemented.
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::AccessibilityUIElement::isAttributeSupported): Implemented.
+
2013-09-26 Eric Carlson <eric.carl...@apple.com>
[MediaStream] make MediaStream testable
Modified: trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp (156529 => 156530)
--- trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp 2013-09-27 07:48:50 UTC (rev 156529)
+++ trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp 2013-09-27 08:58:08 UTC (rev 156530)
@@ -948,7 +948,15 @@
bool AccessibilityUIElement::isAttributeSupported(JSStringRef attribute)
{
- return false;
+ if (!ATK_IS_OBJECT(m_element))
+ return false;
+
+ String atkAttributeName = coreAttributeToAtkAttribute(attribute);
+ if (atkAttributeName.isEmpty())
+ return false;
+
+ String attributeValue = getAttributeSetValueForId(ATK_OBJECT(m_element), atkAttributeName.utf8().data());
+ return !attributeValue.isEmpty();
}
static void alterCurrentValue(PlatformUIElement element, int factor)
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (156529 => 156530)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp 2013-09-27 07:48:50 UTC (rev 156529)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp 2013-09-27 08:58:08 UTC (rev 156530)
@@ -615,8 +615,15 @@
bool AccessibilityUIElement::isAttributeSupported(JSStringRef attribute)
{
- // FIXME: implement
- return false;
+ if (!ATK_IS_OBJECT(m_element.get()))
+ return false;
+
+ String atkAttributeName = coreAttributeToAtkAttribute(attribute);
+ if (atkAttributeName.isEmpty())
+ return false;
+
+ String attributeValue = getAttributeSetValueForId(ATK_OBJECT(m_element.get()), atkAttributeName.utf8().data());
+ return !attributeValue.isEmpty();
}
JSRetainPtr<JSStringRef> AccessibilityUIElement::parameterizedAttributeNames()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes