Changeset 222640 in webkit


Ignore:
Timestamp:
Sep 28, 2017 5:13:13 PM (7 years ago)
Author:
jdiggs@igalia.com
Message:

AX: [ATK] object:state-changed notifications missing for multiple ARIA attributes
https://bugs.webkit.org/show_bug.cgi?id=177542

Source/WebCore:

Add new notification types to AXObjectCache in order to support the notifications
needed, post the notifications to all platforms, emit the signals for ATK.

Reviewed by Chris Fleizach.

Tests: accessibility/gtk/aria-disabled-changed-notification.html

accessibility/gtk/aria-expanded-changed-notification.html
accessibility/gtk/aria-pressed-changed-notification.html
accessibility/gtk/aria-readonly-changed-notification.html
accessibility/gtk/aria-required-changed-notification.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::handleAttributeChanged):

  • accessibility/AXObjectCache.h:
  • accessibility/atk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

Tools:

Add platform support for the notifications. Also add support for getting the
boolean argument indicating whether the state has been set or unset.

Reviewed by Chris Fleizach.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:

LayoutTests:

Reviewed by Chris Fleizach.

  • accessibility/gtk/aria-disabled-changed-notification-expected.txt: Added.
  • accessibility/gtk/aria-disabled-changed-notification.html: Added.
  • accessibility/gtk/aria-expanded-changed-notification-expected.txt: Added.
  • accessibility/gtk/aria-expanded-changed-notification.html: Added.
  • accessibility/gtk/aria-pressed-changed-notification-expected.txt: Added.
  • accessibility/gtk/aria-pressed-changed-notification.html: Added.
  • accessibility/gtk/aria-readonly-changed-notification-expected.txt: Added.
  • accessibility/gtk/aria-readonly-changed-notification.html: Added.
  • accessibility/gtk/aria-required-changed-notification-expected.txt: Added.
  • accessibility/gtk/aria-required-changed-notification.html: Added.
Location:
trunk
Files:
10 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r222635 r222640  
     12017-09-28  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [ATK] object:state-changed notifications missing for multiple ARIA attributes
     4        https://bugs.webkit.org/show_bug.cgi?id=177542
     5
     6        Reviewed by Chris Fleizach.
     7
     8        * accessibility/gtk/aria-disabled-changed-notification-expected.txt: Added.
     9        * accessibility/gtk/aria-disabled-changed-notification.html: Added.
     10        * accessibility/gtk/aria-expanded-changed-notification-expected.txt: Added.
     11        * accessibility/gtk/aria-expanded-changed-notification.html: Added.
     12        * accessibility/gtk/aria-pressed-changed-notification-expected.txt: Added.
     13        * accessibility/gtk/aria-pressed-changed-notification.html: Added.
     14        * accessibility/gtk/aria-readonly-changed-notification-expected.txt: Added.
     15        * accessibility/gtk/aria-readonly-changed-notification.html: Added.
     16        * accessibility/gtk/aria-required-changed-notification-expected.txt: Added.
     17        * accessibility/gtk/aria-required-changed-notification.html: Added.
     18
    1192017-09-28  Per Arne Vollan  <pvollan@apple.com>
    220
  • trunk/Source/WebCore/ChangeLog

    r222637 r222640  
     12017-09-28  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [ATK] object:state-changed notifications missing for multiple ARIA attributes
     4        https://bugs.webkit.org/show_bug.cgi?id=177542
     5
     6        Add new notification types to AXObjectCache in order to support the notifications
     7        needed, post the notifications to all platforms, emit the signals for ATK.
     8
     9        Reviewed by Chris Fleizach.
     10
     11        Tests: accessibility/gtk/aria-disabled-changed-notification.html
     12               accessibility/gtk/aria-expanded-changed-notification.html
     13               accessibility/gtk/aria-pressed-changed-notification.html
     14               accessibility/gtk/aria-readonly-changed-notification.html
     15               accessibility/gtk/aria-required-changed-notification.html
     16
     17        * accessibility/AXObjectCache.cpp:
     18        (WebCore::AXObjectCache::handleAttributeChanged):
     19        * accessibility/AXObjectCache.h:
     20        * accessibility/atk/AXObjectCacheAtk.cpp:
     21        (WebCore::AXObjectCache::postPlatformNotification):
     22
    1232017-09-28  Daniel Bates  <dabates@apple.com>
    224
  • trunk/Source/WebCore/accessibility/AXObjectCache.cpp

    r222612 r222640  
    14781478    else if (attrName == aria_currentAttr)
    14791479        postNotification(element, AXObjectCache::AXCurrentChanged);
     1480    else if (attrName == aria_disabledAttr)
     1481        postNotification(element, AXObjectCache::AXDisabledStateChanged);
     1482    else if (attrName == aria_pressedAttr)
     1483        postNotification(element, AXObjectCache::AXPressedStateChanged);
     1484    else if (attrName == aria_readonlyAttr)
     1485        postNotification(element, AXObjectCache::AXReadOnlyStatusChanged);
     1486    else if (attrName == aria_requiredAttr)
     1487        postNotification(element, AXObjectCache::AXRequiredStatusChanged);
    14801488    else
    14811489        postNotification(element, AXObjectCache::AXAriaAttributeChanged);
  • trunk/Source/WebCore/accessibility/AXObjectCache.h

    r222612 r222640  
    266266        AXChildrenChanged,
    267267        AXCurrentChanged,
     268        AXDisabledStateChanged,
    268269        AXFocusedUIElementChanged,
    269270        AXLayoutComplete,
     
    285286        AXExpandedChanged,
    286287        AXInvalidStatusChanged,
     288        AXPressedStateChanged,
     289        AXReadOnlyStatusChanged,
     290        AXRequiredStatusChanged,
    287291        AXTextChanged,
    288292        AXAriaAttributeChanged,
  • trunk/Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp

    r215985 r222640  
    248248        break;
    249249
     250    case AXRowExpanded:
     251        atk_object_notify_state_change(axObject, ATK_STATE_EXPANDED, true);
     252        break;
     253
     254    case AXRowCollapsed:
     255        atk_object_notify_state_change(axObject, ATK_STATE_EXPANDED, false);
     256        break;
     257
     258    case AXExpandedChanged:
     259        atk_object_notify_state_change(axObject, ATK_STATE_EXPANDED, coreObject->isExpanded());
     260        break;
     261
     262    case AXDisabledStateChanged: {
     263        bool enabledState = coreObject->isEnabled();
     264        atk_object_notify_state_change(axObject, ATK_STATE_ENABLED, enabledState);
     265        atk_object_notify_state_change(axObject, ATK_STATE_SENSITIVE, enabledState);
     266        break;
     267    }
     268
     269    case AXPressedStateChanged:
     270        atk_object_notify_state_change(axObject, ATK_STATE_PRESSED, coreObject->isPressed());
     271        break;
     272
     273    case AXReadOnlyStatusChanged:
     274        atk_object_notify_state_change(axObject, ATK_STATE_READ_ONLY, !coreObject->canSetValueAttribute());
     275        break;
     276
     277    case AXRequiredStatusChanged:
     278        atk_object_notify_state_change(axObject, ATK_STATE_REQUIRED, coreObject->isRequired());
     279        break;
     280
    250281    default:
    251282        break;
  • trunk/Tools/ChangeLog

    r222639 r222640  
     12017-09-28  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [ATK] object:state-changed notifications missing for multiple ARIA attributes
     4        https://bugs.webkit.org/show_bug.cgi?id=177542
     5
     6        Add platform support for the notifications. Also add support for getting the
     7        boolean argument indicating whether the state has been set or unset.
     8
     9        Reviewed by Chris Fleizach.
     10
     11        * WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
     12
    1132017-09-28  Basuke Suzuki  <Basuke.Suzuki@sony.com>
    214
  • trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp

    r220403 r222640  
    7878        else if (!g_strcmp0(g_value_get_string(&paramValues[1]), "busy"))
    7979            notificationName = "AXElementBusyChanged";
     80        else if (!g_strcmp0(g_value_get_string(&paramValues[1]), "enabled"))
     81            notificationName = "AXDisabledStateChanged";
     82        else if (!g_strcmp0(g_value_get_string(&paramValues[1]), "expanded"))
     83            notificationName = "AXExpandedChanged";
     84        else if (!g_strcmp0(g_value_get_string(&paramValues[1]), "pressed"))
     85            notificationName = "AXPressedStateChanged";
     86        else if (!g_strcmp0(g_value_get_string(&paramValues[1]), "read-only"))
     87            notificationName = "AXReadOnlyStatusChanged";
     88        else if (!g_strcmp0(g_value_get_string(&paramValues[1]), "required"))
     89            notificationName = "AXRequiredStatusChanged";
     90        else if (!g_strcmp0(g_value_get_string(&paramValues[1]), "sensitive"))
     91            notificationName = "AXSensitiveStateChanged";
     92        else
     93            return true;
     94        GUniquePtr<char> signalValue(g_strdup_printf("%d", g_value_get_boolean(&paramValues[2])));
     95        JSRetainPtr<JSStringRef> jsSignalValue(Adopt, JSStringCreateWithUTF8CString(signalValue.get()));
     96        extraArgs.append(JSValueMakeString(jsContext, jsSignalValue.get()));
    8097    } else if (!g_strcmp0(signalQuery.signal_name, "focus-event")) {
    8198        if (g_value_get_boolean(&paramValues[1]))
Note: See TracChangeset for help on using the changeset viewer.