Diff
Modified: trunk/LayoutTests/ChangeLog (159866 => 159867)
--- trunk/LayoutTests/ChangeLog 2013-11-29 10:51:50 UTC (rev 159866)
+++ trunk/LayoutTests/ChangeLog 2013-11-29 11:38:18 UTC (rev 159867)
@@ -1,3 +1,15 @@
+2013-11-29 Krzysztof Czech <[email protected]>
+
+ [ATK] Added support for isAttributeSettable in AccessibilityUIElementAtk
+ https://bugs.webkit.org/show_bug.cgi?id=124923
+
+ Reviewed by Mario Sanchez Prada.
+
+ Test could be reused by EFL and GTK as well.
+
+ * accessibility/content-editable-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/content-editable-expected.txt.
+ * accessibility/content-editable.html: Renamed from LayoutTests/platform/mac/accessibility/content-editable.html.
+
2013-11-28 Antti Koivisto <[email protected]>
Remove an oddly named css variables test
Copied: trunk/LayoutTests/accessibility/content-editable-expected.txt (from rev 159866, trunk/LayoutTests/platform/mac/accessibility/content-editable-expected.txt) (0 => 159867)
--- trunk/LayoutTests/accessibility/content-editable-expected.txt (rev 0)
+++ trunk/LayoutTests/accessibility/content-editable-expected.txt 2013-11-29 11:38:18 UTC (rev 159867)
@@ -0,0 +1,4 @@
+Text
+Is settable: true
+
+
Copied: trunk/LayoutTests/accessibility/content-editable.html (from rev 159866, trunk/LayoutTests/platform/mac/accessibility/content-editable.html) (0 => 159867)
--- trunk/LayoutTests/accessibility/content-editable.html (rev 0)
+++ trunk/LayoutTests/accessibility/content-editable.html 2013-11-29 11:38:18 UTC (rev 159867)
@@ -0,0 +1,28 @@
+<html>
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+<body id="body" contenteditable>
+
+ <!-- this test should show that the iframe has a writable AXValue because it has a
+ contenteditable attribute -->
+
+ Text
+
+ <div id="result"></div>
+
+
+ <script>
+ if (window.accessibilityController) {
+ var result = document.getElementById("result");
+
+ var body = document.getElementById("body");
+ body.focus();
+ body = accessibilityController.focusedElement;
+
+ result.innerText += "Is settable: " + body.isAttributeSettable("AXValue") + "\n\n";
+ }
+ </script>
+</body>
+</html>
Deleted: trunk/LayoutTests/platform/mac/accessibility/content-editable-expected.txt (159866 => 159867)
--- trunk/LayoutTests/platform/mac/accessibility/content-editable-expected.txt 2013-11-29 10:51:50 UTC (rev 159866)
+++ trunk/LayoutTests/platform/mac/accessibility/content-editable-expected.txt 2013-11-29 11:38:18 UTC (rev 159867)
@@ -1,4 +0,0 @@
-Text
-Is settable: true
-
-
Deleted: trunk/LayoutTests/platform/mac/accessibility/content-editable.html (159866 => 159867)
--- trunk/LayoutTests/platform/mac/accessibility/content-editable.html 2013-11-29 10:51:50 UTC (rev 159866)
+++ trunk/LayoutTests/platform/mac/accessibility/content-editable.html 2013-11-29 11:38:18 UTC (rev 159867)
@@ -1,28 +0,0 @@
-<html>
-<script>
- if (window.testRunner)
- testRunner.dumpAsText();
-</script>
-<body id="body" contenteditable>
-
- <!-- this test should show that the iframe has a writable AXValue because it has a
- contenteditable attribute -->
-
- Text
-
- <div id="result"></div>
-
-
- <script>
- if (window.accessibilityController) {
- var result = document.getElementById("result");
-
- var body = document.getElementById("body");
- body.focus();
- body = accessibilityController.focusedElement;
-
- result.innerText += "Is settable: " + body.isAttributeSettable("AXValue") + "\n\n";
- }
- </script>
-</body>
-</html>
Modified: trunk/Tools/ChangeLog (159866 => 159867)
--- trunk/Tools/ChangeLog 2013-11-29 10:51:50 UTC (rev 159866)
+++ trunk/Tools/ChangeLog 2013-11-29 11:38:18 UTC (rev 159867)
@@ -1,3 +1,18 @@
+2013-11-29 Krzysztof Czech <[email protected]>
+
+ [ATK] Added support for isAttributeSettable in AccessibilityUIElementAtk
+ https://bugs.webkit.org/show_bug.cgi?id=124923
+
+ Reviewed by Mario Sanchez Prada.
+
+ Added missing implementation of isAttributeSettable. Using
+ ATK_STATE_EDITABLE for checking whether attribute is settable.
+
+ * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
+ (AccessibilityUIElement::isAttributeSettable):
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::AccessibilityUIElement::isAttributeSettable):
+
2013-11-28 Commit Queue <[email protected]>
Unreviewed, rolling out r159839.
Modified: trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp (159866 => 159867)
--- trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp 2013-11-29 10:51:50 UTC (rev 159866)
+++ trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp 2013-11-29 11:38:18 UTC (rev 159867)
@@ -81,13 +81,18 @@
{ "AXUnknownSortDirection", "unknown" }
};
-String coreAttributeToAtkAttribute(JSStringRef attribute)
+String jsStringToWTFString(JSStringRef attribute)
{
size_t bufferSize = JSStringGetMaximumUTF8CStringSize(attribute);
GOwnPtr<gchar> buffer(static_cast<gchar*>(g_malloc(bufferSize)));
JSStringGetUTF8CString(attribute, buffer.get(), bufferSize);
- String attributeString = String::fromUTF8(buffer.get());
+ return String::fromUTF8(buffer.get());
+}
+
+String coreAttributeToAtkAttribute(JSStringRef attribute)
+{
+ String attributeString = jsStringToWTFString(attribute);
for (int i = 0; i < NumberOfAttributes; ++i) {
if (attributesMap[i][CoreDomain] == attributeString)
return attributesMap[i][AtkDomain];
@@ -1169,7 +1174,13 @@
bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
{
- // FIXME: implement
+ if (!ATK_IS_OBJECT(m_element))
+ return false;
+
+ String attributeString = jsStringToWTFString(attribute);
+ if (attributeString == "AXValue")
+ return checkElementState(m_element, ATK_STATE_EDITABLE);
+
return false;
}
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (159866 => 159867)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp 2013-11-29 10:51:50 UTC (rev 159866)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp 2013-11-29 11:38:18 UTC (rev 159867)
@@ -85,13 +85,18 @@
{ "AXUnknownSortDirection", "unknown" }
};
-String coreAttributeToAtkAttribute(JSStringRef attribute)
+String jsStringToWTFString(JSStringRef attribute)
{
size_t bufferSize = JSStringGetMaximumUTF8CStringSize(attribute);
GOwnPtr<gchar> buffer(static_cast<gchar*>(g_malloc(bufferSize)));
JSStringGetUTF8CString(attribute, buffer.get(), bufferSize);
- String attributeString = String::fromUTF8(buffer.get());
+ return String::fromUTF8(buffer.get());
+}
+
+String coreAttributeToAtkAttribute(JSStringRef attribute)
+{
+ String attributeString = jsStringToWTFString(attribute);
for (int i = 0; i < NumberOfAttributes; ++i) {
if (attributesMap[i][CoreDomain] == attributeString)
return attributesMap[i][AtkDomain];
@@ -751,7 +756,13 @@
bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
{
- // FIXME: implement
+ if (!ATK_IS_OBJECT(m_element.get()))
+ return false;
+
+ String attributeString = jsStringToWTFString(attribute);
+ if (attributeString == "AXValue")
+ return checkElementState(m_element.get(), ATK_STATE_EDITABLE);
+
return false;
}