Changeset 155851 in webkit


Ignore:
Timestamp:
Sep 16, 2013 5:38:50 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[ATK] Extends atk value interface to return proper checkbox states
https://bugs.webkit.org/show_bug.cgi?id=121413

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-09-16
Reviewed by Mario Sanchez Prada.

Source/WebCore:

Tests: accessibility/mixed-checkbox.html

accessibility/native-vs-nonnative-checkboxes.html

  • accessibility/atk/WebKitAccessibleInterfaceValue.cpp:

(webkitAccessibleValueValueForAccessibilityObject):
(webkitAccessibleValueGetCurrentValue):

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(getInterfaceMaskFromObject):

LayoutTests:

Sharing mac tests with other ports (GTK/EFL).

  • accessibility/mixed-checkbox-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/mixed-checkbox-expected.txt.
  • accessibility/mixed-checkbox.html: Renamed from LayoutTests/platform/mac/accessibility/mixed-checkbox.html.
  • accessibility/native-vs-nonnative-checkboxes-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/native-vs-nonnative-checkboxes-expected.txt.
  • accessibility/native-vs-nonnative-checkboxes.html: Renamed from LayoutTests/platform/mac/accessibility/native-vs-nonnative-checkboxes.html.
Location:
trunk
Files:
4 edited
4 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r155848 r155851  
     12013-09-16  Krzysztof Czech  <k.czech@samsung.com>
     2
     3        [ATK] Extends atk value interface to return proper checkbox states
     4        https://bugs.webkit.org/show_bug.cgi?id=121413
     5
     6        Reviewed by Mario Sanchez Prada.
     7
     8        Sharing mac tests with other ports (GTK/EFL).
     9
     10        * accessibility/mixed-checkbox-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/mixed-checkbox-expected.txt.
     11        * accessibility/mixed-checkbox.html: Renamed from LayoutTests/platform/mac/accessibility/mixed-checkbox.html.
     12        * accessibility/native-vs-nonnative-checkboxes-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/native-vs-nonnative-checkboxes-expected.txt.
     13        * accessibility/native-vs-nonnative-checkboxes.html: Renamed from LayoutTests/platform/mac/accessibility/native-vs-nonnative-checkboxes.html.
     14
    1152013-09-16  Mario Sanchez Prada  <mario.prada@samsung.com>
    216
  • trunk/LayoutTests/accessibility/mixed-checkbox.html

    r155850 r155851  
    22<html>
    33<head>
    4 <script src="../../../resources/js-test-pre.js"></script>
     4<script src="../resources/js-test-pre.js"></script>
    55</head>
    66<body id="body">
     
    4545</script>
    4646
    47 <script src="../../../resources/js-test-post.js"></script>
     47<script src="../resources/js-test-post.js"></script>
    4848</body>
    4949</html>
  • trunk/LayoutTests/accessibility/native-vs-nonnative-checkboxes.html

    r155850 r155851  
    22<html>
    33<head>
    4 <script src="../../../resources/js-test-pre.js"></script>
     4<script src="../resources/js-test-pre.js"></script>
    55</head>
    66<body id="body">
     
    3535</script>
    3636
    37 <script src="../../../resources/js-test-post.js"></script>
     37<script src="../resources/js-test-post.js"></script>
    3838</body>
    3939</html>
  • trunk/Source/WebCore/ChangeLog

    r155850 r155851  
     12013-09-16  Krzysztof Czech  <k.czech@samsung.com>
     2
     3        [ATK] Extends atk value interface to return proper checkbox states
     4        https://bugs.webkit.org/show_bug.cgi?id=121413
     5
     6        Reviewed by Mario Sanchez Prada.
     7
     8        Tests: accessibility/mixed-checkbox.html
     9               accessibility/native-vs-nonnative-checkboxes.html
     10
     11        * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
     12        (webkitAccessibleValueValueForAccessibilityObject):
     13        (webkitAccessibleValueGetCurrentValue):
     14        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
     15        (getInterfaceMaskFromObject):
     16
    1172013-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
    218
  • trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceValue.cpp

    r139159 r155851  
    3737}
    3838
     39static float webkitAccessibleValueValueForAccessibilityObject(AccessibilityObject* coreObject)
     40{
     41    if (!coreObject)
     42        return 0;
     43
     44    if (coreObject->supportsRangeValue())
     45        return coreObject->valueForRange();
     46
     47    if (coreObject->isCheckboxOrRadio()) {
     48        switch (coreObject->checkboxOrRadioValue()) {
     49        case ButtonStateOff:
     50            return 0;
     51        case ButtonStateOn:
     52            return 1;
     53        case ButtonStateMixed:
     54            return 2;
     55        }
     56    }
     57
     58    return 0;
     59}
     60
    3961static void webkitAccessibleValueGetCurrentValue(AtkValue* value, GValue* gValue)
    4062{
    4163    memset(gValue,  0, sizeof(GValue));
    4264    g_value_init(gValue, G_TYPE_FLOAT);
    43     g_value_set_float(gValue, core(value)->valueForRange());
     65    g_value_set_float(gValue, webkitAccessibleValueValueForAccessibilityObject(core(value)));
    4466}
    4567
  • trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp

    r155518 r155851  
    10361036
    10371037    // Value
    1038     if (role == SliderRole || role == SpinButtonRole || role == ScrollBarRole || role == ProgressIndicatorRole)
     1038    if (coreObject->supportsRangeValue() || coreObject->isCheckboxOrRadio())
    10391039        interfaceMask |= 1 << WAI_VALUE;
    10401040
Note: See TracChangeset for help on using the changeset viewer.