Unreviewed, rolling out r155851.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Sep 2013 14:00:35 +0000 (14:00 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Sep 2013 14:00:35 +0000 (14:00 +0000)
http://trac.webkit.org/changeset/155851
https://bugs.webkit.org/show_bug.cgi?id=121429

checkbox states should be exposed through AtkState, not
AtkValue (Requested by msanchez on #webkit).

Source/WebCore:

* accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
(webkitAccessibleValueGetCurrentValue):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(getInterfaceMaskFromObject):

LayoutTests:

* platform/mac/accessibility/mixed-checkbox-expected.txt: Renamed from LayoutTests/accessibility/mixed-checkbox-expected.txt.
* platform/mac/accessibility/mixed-checkbox.html: Renamed from LayoutTests/accessibility/mixed-checkbox.html.
* platform/mac/accessibility/native-vs-nonnative-checkboxes-expected.txt: Renamed from LayoutTests/accessibility/native-vs-nonnative-checkboxes-expected.txt.
* platform/mac/accessibility/native-vs-nonnative-checkboxes.html: Renamed from LayoutTests/accessibility/native-vs-nonnative-checkboxes.html.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155854 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/mixed-checkbox-expected.txt [moved from LayoutTests/accessibility/mixed-checkbox-expected.txt with 100% similarity]
LayoutTests/platform/mac/accessibility/mixed-checkbox.html [moved from LayoutTests/accessibility/mixed-checkbox.html with 93% similarity]
LayoutTests/platform/mac/accessibility/native-vs-nonnative-checkboxes-expected.txt [moved from LayoutTests/accessibility/native-vs-nonnative-checkboxes-expected.txt with 100% similarity]
LayoutTests/platform/mac/accessibility/native-vs-nonnative-checkboxes.html [moved from LayoutTests/accessibility/native-vs-nonnative-checkboxes.html with 89% similarity]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceValue.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp

index 873132a54003c4ee07e0a82007248536ffca9ab4..1c79316044cd9d99d174f089246919123515a12c 100644 (file)
@@ -1,3 +1,17 @@
+2013-09-16  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r155851.
+        http://trac.webkit.org/changeset/155851
+        https://bugs.webkit.org/show_bug.cgi?id=121429
+
+        checkbox states should be exposed through AtkState, not
+        AtkValue (Requested by msanchez on #webkit).
+
+        * platform/mac/accessibility/mixed-checkbox-expected.txt: Renamed from LayoutTests/accessibility/mixed-checkbox-expected.txt.
+        * platform/mac/accessibility/mixed-checkbox.html: Renamed from LayoutTests/accessibility/mixed-checkbox.html.
+        * platform/mac/accessibility/native-vs-nonnative-checkboxes-expected.txt: Renamed from LayoutTests/accessibility/native-vs-nonnative-checkboxes-expected.txt.
+        * platform/mac/accessibility/native-vs-nonnative-checkboxes.html: Renamed from LayoutTests/accessibility/native-vs-nonnative-checkboxes.html.
+
 2013-09-16  Gabor Abraham  <abrhm@inf.u-szeged.hu>
 
         [Qt] Unreviewed gardening. Skipping and rebase failing tests on Qt bots.
similarity index 93%
rename from LayoutTests/accessibility/mixed-checkbox.html
rename to LayoutTests/platform/mac/accessibility/mixed-checkbox.html
index d1c33535974f625a70e97a20138b400516faaa6d..09f29223035a197ace4e7ff792e3d86f5ae1acc3 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../../../resources/js-test-pre.js"></script>
 </head>
 <body id="body">
 
@@ -44,6 +44,6 @@
 
 </script>
 
-<script src="../resources/js-test-post.js"></script>
+<script src="../../../resources/js-test-post.js"></script>
 </body>
 </html>
similarity index 89%
rename from LayoutTests/accessibility/native-vs-nonnative-checkboxes.html
rename to LayoutTests/platform/mac/accessibility/native-vs-nonnative-checkboxes.html
index 53bb577d3885b3d9a1938d117ba0e6faa799656f..a7e1ffd2138df9bcc9c6f2e464964c3b902e10ca 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../resources/js-test-pre.js"></script>
+<script src="../../../resources/js-test-pre.js"></script>
 </head>
 <body id="body">
 
@@ -34,6 +34,6 @@
 
 </script>
 
-<script src="../resources/js-test-post.js"></script>
+<script src="../../../resources/js-test-post.js"></script>
 </body>
 </html>
index 68277c4c1e3dbe9fda4bab3d0c2c14e211a5d433..9e25dca10ebbe20ee25ce3221c1a6ea444d99dc8 100644 (file)
@@ -1,3 +1,17 @@
+2013-09-16  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r155851.
+        http://trac.webkit.org/changeset/155851
+        https://bugs.webkit.org/show_bug.cgi?id=121429
+
+        checkbox states should be exposed through AtkState, not
+        AtkValue (Requested by msanchez on #webkit).
+
+        * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
+        (webkitAccessibleValueGetCurrentValue):
+        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+        (getInterfaceMaskFromObject):
+
 2013-09-16  Krzysztof Czech  <k.czech@samsung.com>
 
         [ATK] Extends atk value interface to return proper checkbox states
index ba61d24d5cb7d4da7da825483f7a5036fb6ebfaa..6ba7424aabadb7516974ad90ba215dcb98d59633 100644 (file)
@@ -36,33 +36,11 @@ static AccessibilityObject* core(AtkValue* value)
     return webkitAccessibleGetAccessibilityObject(WEBKIT_ACCESSIBLE(value));
 }
 
-static float webkitAccessibleValueValueForAccessibilityObject(AccessibilityObject* coreObject)
-{
-    if (!coreObject)
-        return 0;
-
-    if (coreObject->supportsRangeValue())
-        return coreObject->valueForRange();
-
-    if (coreObject->isCheckboxOrRadio()) {
-        switch (coreObject->checkboxOrRadioValue()) {
-        case ButtonStateOff:
-            return 0;
-        case ButtonStateOn:
-            return 1;
-        case ButtonStateMixed:
-            return 2;
-        }
-    }
-
-    return 0;
-}
-
 static void webkitAccessibleValueGetCurrentValue(AtkValue* value, GValue* gValue)
 {
     memset(gValue,  0, sizeof(GValue));
     g_value_init(gValue, G_TYPE_FLOAT);
-    g_value_set_float(gValue, webkitAccessibleValueValueForAccessibilityObject(core(value)));
+    g_value_set_float(gValue, core(value)->valueForRange());
 }
 
 static void webkitAccessibleValueGetMaximumValue(AtkValue* value, GValue* gValue)
index 9e63a22bc85c0e09d1149e4cf3b6f2f79bd3cea0..7cab81b8fcf0357cd5052c5c698245827af6fc1f 100644 (file)
@@ -1035,7 +1035,7 @@ static guint16 getInterfaceMaskFromObject(AccessibilityObject* coreObject)
         interfaceMask |= 1 << WAI_DOCUMENT;
 
     // Value
-    if (coreObject->supportsRangeValue() || coreObject->isCheckboxOrRadio())
+    if (role == SliderRole || role == SpinButtonRole || role == ScrollBarRole || role == ProgressIndicatorRole)
         interfaceMask |= 1 << WAI_VALUE;
 
 #if ENABLE(INPUT_TYPE_COLOR)