Patch by Anton Obzhirov <a.obzhirov@samsung.com> on 2013-09-02
Reviewed by Mario Sanchez Prada.
Source/WebCore:
The patch exposes aria-invalid attribute to ATK.
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::postPlatformNotification):
Added emitting state-change signal for aria-invalid event.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):
Added aria-invalid attribute.
Tools:
Added few mappings in DumpRenderTree and WebKitTestRunner for aria-invalid in order to get the tests run properly.
* DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp:
(axObjectEventListener):
Added mapping for invalid-entry event parameter.
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(coreAttributeToAtkAttribute):
Added mapping to aria-invalid.
(AccessibilityUIElement::stringAttributeValue):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::coreAttributeToAtkAttribute):
Added mapping to aria-invalid.
LayoutTests:
Unskipped accessibility/aria-invalid.html which is passing now.
* platform/gtk/TestExpectations: Removed passing test.
* platform/gtk-wk2/TestExpectations: Added test timing out in WK2 only.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154960
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-09-02 Anton Obzhirov <a.obzhirov@samsung.com>
+
+ <https://webkit.org/b/98350> [GTK] accessibility/aria-invalid.html times out
+
+ Reviewed by Mario Sanchez Prada.
+
+ Unskipped accessibility/aria-invalid.html which is passing now.
+
+ * platform/gtk/TestExpectations: Removed passing test.
+ * platform/gtk-wk2/TestExpectations: Added test timing out in WK2 only.
+
2013-09-02 Ádám Kallai <kadam@inf.u-szeged.hu>
[Qt] Unreviewed gardening. Skip some failing tests.
Bug(GTK) animations/play-state-suspend.html [ Failure ]
Bug(GTK) animations/suspend-resume-animation.html [ Failure ]
+# [GTK] Missing WTR AccessibilityUIElement::addNotificationListener implementation
+webkit.org/b/120421 accessibility/aria-invalid.html [ Timeout ]
+
#////////////////////////////////////////////////////////////////////////////////////////
# End of Tests failing
#////////////////////////////////////////////////////////////////////////////////////////
# EventSender::dumpFilenameBeingDragged not implemented.
webkit.org/b/61826 fast/events/drag-image-filename.html [ Timeout ]
-webkit.org/b/98350 accessibility/aria-invalid.html [ Timeout ]
-
Bug(GTK) media/progress-events-generated-correctly.html [ Failure Timeout ]
webkit.org/b/102257 fast/dom/Window/open-window-min-size.html [ Timeout ]
+2013-09-02 Anton Obzhirov <a.obzhirov@samsung.com>
+
+ <https://webkit.org/b/98350> [GTK] accessibility/aria-invalid.html times out
+
+ Reviewed by Mario Sanchez Prada.
+
+ The patch exposes aria-invalid attribute to ATK.
+
+ * accessibility/atk/AXObjectCacheAtk.cpp:
+ (WebCore::AXObjectCache::postPlatformNotification):
+ Added emitting state-change signal for aria-invalid event.
+ * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+ (webkitAccessibleGetAttributes):
+ Added aria-invalid attribute.
+
2013-09-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r154955.
atk_value_get_current_value(ATK_VALUE(axObject), &propertyValues.new_value);
g_signal_emit_by_name(ATK_OBJECT(axObject), "property-change::accessible-value", &propertyValues, NULL);
- }
+ } else if (notification == AXInvalidStatusChanged)
+ g_signal_emit_by_name(axObject, "state-change", "invalid-entry", coreObject->invalidStatus() != "false");
}
void AXObjectCache::nodeTextChangePlatformNotification(AccessibilityObject* object, AXTextChange textChange, unsigned offset, const String& text)
if (coreObject->ariaHasPopup())
attributeSet = addToAtkAttributeSet(attributeSet, "aria-haspopup", "true");
+ String invalidStatus = coreObject->invalidStatus().string();
+ if (!invalidStatus.isEmpty() && invalidStatus != "false")
+ attributeSet = addToAtkAttributeSet(attributeSet, "aria-invalid", coreObject->invalidStatus().string().utf8().data());
+
return attributeSet;
}
+2013-09-02 Anton Obzhirov <a.obzhirov@samsung.com>
+
+ <https://webkit.org/b/98350> [GTK] accessibility/aria-invalid.html times out
+
+ Reviewed by Mario Sanchez Prada.
+
+ Added few mappings in DumpRenderTree and WebKitTestRunner for aria-invalid in order to get the tests run properly.
+
+ * DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp:
+ (axObjectEventListener):
+ Added mapping for invalid-entry event parameter.
+ * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
+ (coreAttributeToAtkAttribute):
+ Added mapping to aria-invalid.
+ (AccessibilityUIElement::stringAttributeValue):
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::coreAttributeToAtkAttribute):
+ Added mapping to aria-invalid.
+
2013-09-02 Nick Diego Yamane <nick.yamane@openbossa.org>
Save md5 correctly when jhbuildPath doesn't exist yet
signalValue.set(g_strdup_printf("%d", g_value_get_boolean(¶mValues[2])));
if (!g_strcmp0(g_value_get_string(¶mValues[1]), "checked"))
notificationName = "CheckedStateChanged";
+ else if (!g_strcmp0(g_value_get_string(¶mValues[1]), "invalid-entry"))
+ notificationName = "AXInvalidStatusChanged";
} else if (!g_strcmp0(signalQuery.signal_name, "focus-event")) {
signalName.set(g_strdup("focus-event"));
signalValue.set(g_strdup_printf("%d", g_value_get_boolean(¶mValues[1])));
JSStringGetUTF8CString(attribute, buffer.get(), bufferSize);
String attributeString = String::fromUTF8(buffer.get());
+ if (attributeString == "AXInvalid")
+ return "aria-invalid";
+
if (attributeString == "AXPlaceholderValue")
return "placeholder-text";
- return "";
+ return String();
}
static String getAttributeSetValueForId(AtkObject* accessible, const char* id)
return JSStringCreateWithCharacters(0, 0);
String attributeValue = getAttributeSetValueForId(ATK_OBJECT(m_element), atkAttributeName.utf8().data());
+
+ // In case of 'aria-invalid' when the attribute empty or has "false" for ATK
+ // according to http://www.w3.org/WAI/PF/aria-implementation/#mapping attribute
+ // is not mapped but layout tests will expect 'false'.
+ if (attributeValue.isEmpty() && atkAttributeName == "aria-invalid")
+ return JSStringCreateWithUTF8CString("false");
+
return JSStringCreateWithUTF8CString(attributeValue.utf8().data());
}
JSStringGetUTF8CString(attribute, buffer.get(), bufferSize);
String attributeString = String::fromUTF8(buffer.get());
- return attributeString == "AXPlaceholderValue" ? "placeholder-text" : String();
+ if (attributeString == "AXInvalid")
+ return "aria-invalid";
+
+ if (attributeString == "AXPlaceholderValue")
+ return "placeholder-text";
+
+ return String();
}
static String getAttributeSetValueForId(AtkObject* accessible, const char* id)