Changeset 222787 in webkit


Ignore:
Timestamp:
Oct 3, 2017 10:56:50 AM (6 years ago)
Author:
jdiggs@igalia.com
Message:

AX: [ATK] ARIA drag-and-drop attribute values should be exposed via AtkObject attributes
https://bugs.webkit.org/show_bug.cgi?id=177763

Reviewed by Chris Fleizach.

Source/WebCore:

Expose the values of aria-grabbed and aria-dropeffect via the "grabbed" and "dropeffect"
AtkObject attributes.

Test: accessibility/gtk/aria-drag-and-drop.html

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetAttributes):

Tools:

Implement ariaIsGrabbed() and ariaDropEffects() for ATK.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::ariaIsGrabbed const):
(WTR::AccessibilityUIElement::ariaDropEffects const):

LayoutTests:

  • accessibility/gtk/aria-drag-and-drop-expected.txt: Added.
  • accessibility/gtk/aria-drag-and-drop.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r222784 r222787  
     12017-10-03  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [ATK] ARIA drag-and-drop attribute values should be exposed via AtkObject attributes
     4        https://bugs.webkit.org/show_bug.cgi?id=177763
     5
     6        Reviewed by Chris Fleizach.
     7
     8        * accessibility/gtk/aria-drag-and-drop-expected.txt: Added.
     9        * accessibility/gtk/aria-drag-and-drop.html: Added.
     10
    1112017-10-03  Charles Turner  <cturner@igalia.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r222786 r222787  
     12017-10-03  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [ATK] ARIA drag-and-drop attribute values should be exposed via AtkObject attributes
     4        https://bugs.webkit.org/show_bug.cgi?id=177763
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Expose the values of aria-grabbed and aria-dropeffect via the "grabbed" and "dropeffect"
     9        AtkObject attributes.
     10
     11        Test: accessibility/gtk/aria-drag-and-drop.html
     12
     13        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
     14        (webkitAccessibleGetAttributes):
     15
    1162017-10-03  Brent Fulgham  <bfulgham@apple.com>
    217
  • trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp

    r222765 r222787  
    575575            attributeSet = addToAtkAttributeSet(attributeSet, "atomic", "true");
    576576    }
     577
     578    // The Core AAM states the author-provided value should be exposed as-is.
     579    String dropEffect = coreObject->getAttribute(HTMLNames::aria_dropeffectAttr);
     580    if (!dropEffect.isEmpty())
     581        attributeSet = addToAtkAttributeSet(attributeSet, "dropeffect", dropEffect.utf8().data());
     582
     583    if (coreObject->isARIAGrabbed())
     584        attributeSet = addToAtkAttributeSet(attributeSet, "grabbed", "true");
     585    else if (coreObject->supportsARIADragging())
     586        attributeSet = addToAtkAttributeSet(attributeSet, "grabbed", "false");
    577587
    578588    return attributeSet;
  • trunk/Tools/ChangeLog

    r222770 r222787  
     12017-10-03  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [ATK] ARIA drag-and-drop attribute values should be exposed via AtkObject attributes
     4        https://bugs.webkit.org/show_bug.cgi?id=177763
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Implement ariaIsGrabbed() and ariaDropEffects() for ATK.
     9
     10        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
     11        (WTR::AccessibilityUIElement::ariaIsGrabbed const):
     12        (WTR::AccessibilityUIElement::ariaDropEffects const):
     13
    1142017-10-02  Myles C. Maxfield  <mmaxfield@apple.com>
    215
  • trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp

    r222765 r222787  
    16961696bool AccessibilityUIElement::ariaIsGrabbed() const
    16971697{
    1698     // FIXME: implement
    1699     return false;
     1698    return getAttributeSetValueForId(ATK_OBJECT(m_element.get()), ObjectAttributeType, "grabbed") == "true";
    17001699}
    17011700
    17021701JSRetainPtr<JSStringRef> AccessibilityUIElement::ariaDropEffects() const
    17031702{
    1704     // FIXME: implement
    1705     return JSStringCreateWithCharacters(0, 0);
     1703    String dropEffects = getAttributeSetValueForId(ATK_OBJECT(m_element.get()), ObjectAttributeType, "dropeffect");
     1704    return dropEffects.isEmpty() ? JSStringCreateWithCharacters(0, 0) : JSStringCreateWithUTF8CString(dropEffects.utf8().data());
    17061705}
    17071706
Note: See TracChangeset for help on using the changeset viewer.