Changeset 53220 in webkit


Ignore:
Timestamp:
Jan 13, 2010 5:16:15 PM (14 years ago)
Author:
jhoneycutt@apple.com
Message:

MSAA: selected, selectable, extended selectable, and multiple
selectable states are not reported

https://bugs.webkit.org/show_bug.cgi?id=33574
<rdar://problem/7536826>

Reviewed by Darin Adler.

WebCore:

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::isMultiSelectable):
Use the correct function name - the function name overriden by
and used in AccessiblityRenderObject.

  • accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:

(setAtkStateSetFromCoreObject):
Update for function rename.
(webkit_accessible_selection_select_all_selection):
Ditto.

WebKit/chromium:

  • public/WebAccessibilityObject.h:

Update for WebCore::AccessibilityObject function rename.

  • src/WebAccessibilityObject.cpp:

(WebKit::WebAccessibilityObject::isMultiSelectable):
Ditto.

WebKit/win:

  • AccessibleBase.cpp:

(AccessibleBase::get_accState):
Remove the call to isMultiSelect(). Call the correctly-named
isMultiSelectable(), and if it returns true, set both the "extended
selectable" and "multiple selectable" states. Check whether the object
is selected or selectable, and report those states.

WebKitTools:

  • DumpRenderTree/AccessibilityUIElement.cpp:

(getIsSelectableCallback):
Return the result of calling isSelectable().
(getIsMultiSelectableCallback):
Return the result of calling isMultiSelectable().
(AccessibilityUIElement::getJSClass):
Add isSelected and isMultiSelectable properties to the JSClass
definition.

  • DumpRenderTree/AccessibilityUIElement.h:

Declare isSelectable() and isMultiSelectable().

  • DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:

(AccessibilityUIElement::isSelectable):
Stubbed.
(AccessibilityUIElement::isMultiSelectable):
Stubbed.

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(AccessibilityUIElement::isSelectable):
Stubbed.
(AccessibilityUIElement::isMultiSelectable):
Stubbed.

  • DumpRenderTree/win/AccessibilityUIElementWin.cpp:

(accessibilityState):
Get the object's state, and return it.
(AccessibilityUIElement::isSelected):
Check the object's selected state.
(AccessibilityUIElement::isSelectable):
Check the object's selectable state.
(AccessibilityUIElement::isMultiSelectable):
Check the object's extended/multiple selectable state.

LayoutTests:

  • accessibility/selection-states-expected.txt: Added.
  • accessibility/selection-states.html: Added.
  • platform/gtk/Skipped:

Add new test to skipped list due to stubbed AccessibilityUIElement
functions.

  • platform/mac/Skipped:

Ditto.

Location:
trunk
Files:
2 added
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r53214 r53220  
     12010-01-13  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        MSAA: selected, selectable, extended selectable, and multiple
     4        selectable states are not reported
     5
     6        https://bugs.webkit.org/show_bug.cgi?id=33574
     7        <rdar://problem/7536826>
     8
     9        Reviewed by Darin Adler.
     10
     11        * accessibility/selection-states-expected.txt: Added.
     12
     13        * accessibility/selection-states.html: Added.
     14
     15        * platform/gtk/Skipped:
     16        Add new test to skipped list due to stubbed AccessibilityUIElement
     17        functions.
     18
     19        * platform/mac/Skipped:
     20        Ditto.
     21
    1222010-01-13  Dumitru Daniliuc  <dumi@chromium.org>
    223
  • trunk/LayoutTests/platform/gtk/Skipped

    r53153 r53220  
    7272accessibility/radio-button-title-label.html
    7373accessibility/secure-textfield-title-ui.html
     74accessibility/selection-states.html
    7475accessibility/textarea-insertion-point-line-number.html
    7576accessibility/textarea-line-for-index.html
  • trunk/LayoutTests/platform/mac/Skipped

    r53182 r53220  
    8585accessibility/document-attributes.html
    8686
     87# Accessibility tests with missing AccessibilityController functionality.
     88accessibility/selection-states.html
     89
    8790# Need to add functionality to DumpRenderTree to handle error pages
    8891fast/history/back-forward-reset-after-error-handling.html
  • trunk/WebCore/ChangeLog

    r53218 r53220  
     12010-01-12  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        MSAA: selected, selectable, extended selectable, and multiple
     4        selectable states are not reported
     5
     6        https://bugs.webkit.org/show_bug.cgi?id=33574
     7        <rdar://problem/7536826>
     8
     9        Reviewed by Darin Adler.
     10
     11        * accessibility/AccessibilityObject.h:
     12        (WebCore::AccessibilityObject::isMultiSelectable):
     13        Use the correct function name - the function name overriden by
     14        and used in AccessiblityRenderObject.
     15
     16        * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
     17        (setAtkStateSetFromCoreObject):
     18        Update for function rename.
     19        (webkit_accessible_selection_select_all_selection):
     20        Ditto.
     21
    1222010-01-13  Darin Adler  <darin@apple.com>
    223
  • trunk/WebCore/accessibility/AccessibilityObject.h

    r52819 r53220  
    300300    virtual bool isIndeterminate() const { return false; }
    301301    virtual bool isLoaded() const { return false; }
    302     virtual bool isMultiSelect() const { return false; }
     302    virtual bool isMultiSelectable() const { return false; }
    303303    virtual bool isOffScreen() const { return false; }
    304304    virtual bool isPressed() const { return false; }
  • trunk/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp

    r53124 r53220  
    494494        atk_state_set_add_state(stateSet, ATK_STATE_INDETERMINATE);
    495495
    496     if (coreObject->isMultiSelect())
     496    if (coreObject->isMultiSelectable())
    497497        atk_state_set_add_state(stateSet, ATK_STATE_MULTISELECTABLE);
    498498
     
    788788{
    789789    AccessibilityObject* coreSelection = core(selection);
    790     if (!coreSelection || !coreSelection->isMultiSelect())
     790    if (!coreSelection || !coreSelection->isMultiSelectable())
    791791        return false;
    792792
  • trunk/WebKit/chromium/ChangeLog

    r53210 r53220  
     12010-01-13  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        MSAA: selected, selectable, extended selectable, and multiple
     4        selectable states are not reported
     5
     6        https://bugs.webkit.org/show_bug.cgi?id=33574
     7        <rdar://problem/7536826>
     8
     9        Reviewed by Darin Adler.
     10
     11        * public/WebAccessibilityObject.h:
     12        Update for WebCore::AccessibilityObject function rename.
     13
     14        * src/WebAccessibilityObject.cpp:
     15        (WebKit::WebAccessibilityObject::isMultiSelectable):
     16        Ditto.
     17
    1182010-01-13  Jeremy Orlow  <jorlow@chromium.org>
    219
  • trunk/WebKit/chromium/public/WebAccessibilityObject.h

    r51402 r53220  
    8686    bool isHovered() const;
    8787    bool isIndeterminate() const;
    88     bool isMultiSelect() const;
     88    bool isMultiSelectable() const;
    8989    bool isOffScreen() const;
    9090    bool isPasswordField() const;
  • trunk/WebKit/chromium/src/WebAccessibilityObject.cpp

    r51402 r53220  
    232232}
    233233
    234 bool WebAccessibilityObject::isMultiSelect() const
    235 {
    236     if (!m_private)
    237         return 0;
    238 
    239     m_private->updateBackingStore();
    240     return m_private->isMultiSelect();
     234bool WebAccessibilityObject::isMultiSelectable() const
     235{
     236    if (!m_private)
     237        return 0;
     238
     239    m_private->updateBackingStore();
     240    return m_private->isMultiSelectable();
    241241}
    242242
  • trunk/WebKit/win/AccessibleBase.cpp

    r53163 r53220  
    253253        pvState->lVal |= STATE_SYSTEM_OFFSCREEN;
    254254
    255     if (childObj->isMultiSelect())
    256         pvState->lVal |= STATE_SYSTEM_MULTISELECTABLE;
    257 
    258255    if (childObj->isPasswordField())
    259256        pvState->lVal |= STATE_SYSTEM_PROTECTED;
     
    277274        pvState->lVal |= STATE_SYSTEM_FOCUSABLE;
    278275
    279     // TODO: Add selected and selectable states.
     276    if (childObj->isSelected())
     277        pvState->lVal |= STATE_SYSTEM_SELECTED;
     278
     279    if (childObj->canSetSelectedAttribute())
     280        pvState->lVal |= STATE_SYSTEM_SELECTABLE;
     281
     282    if (childObj->isMultiSelectable())
     283        pvState->lVal |= STATE_SYSTEM_EXTSELECTABLE | STATE_SYSTEM_MULTISELECTABLE;
    280284
    281285    return S_OK;
  • trunk/WebKit/win/ChangeLog

    r53202 r53220  
     12010-01-12  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        MSAA: selected, selectable, extended selectable, and multiple
     4        selectable states are not reported
     5
     6        https://bugs.webkit.org/show_bug.cgi?id=33574
     7        <rdar://problem/7536826>
     8
     9        Reviewed by Darin Adler.
     10
     11        * AccessibleBase.cpp:
     12        (AccessibleBase::get_accState):
     13        Remove the call to isMultiSelect(). Call the correctly-named
     14        isMultiSelectable(), and if it returns true, set both the "extended
     15        selectable" and "multiple selectable" states. Check whether the object
     16        is selected or selectable, and report those states.
     17
    1182010-01-13  Steve Falkenburg  <sfalken@apple.com>
    219
  • trunk/WebKitTools/ChangeLog

    r53217 r53220  
     12010-01-12  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        MSAA: selected, selectable, extended selectable, and multiple
     4        selectable states are not reported
     5
     6        https://bugs.webkit.org/show_bug.cgi?id=33574
     7        <rdar://problem/7536826>
     8
     9        Reviewed by Darin Adler.
     10
     11        * DumpRenderTree/AccessibilityUIElement.cpp:
     12        (getIsSelectableCallback):
     13        Return the result of calling isSelectable().
     14        (getIsMultiSelectableCallback):
     15        Return the result of calling isMultiSelectable().
     16        (AccessibilityUIElement::getJSClass):
     17        Add isSelected and isMultiSelectable properties to the JSClass
     18        definition.
     19
     20        * DumpRenderTree/AccessibilityUIElement.h:
     21        Declare isSelectable() and isMultiSelectable().
     22
     23        * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
     24        (AccessibilityUIElement::isSelectable):
     25        Stubbed.
     26        (AccessibilityUIElement::isMultiSelectable):
     27        Stubbed.
     28
     29        * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
     30        (AccessibilityUIElement::isSelectable):
     31        Stubbed.
     32        (AccessibilityUIElement::isMultiSelectable):
     33        Stubbed.
     34
     35        * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
     36        (accessibilityState):
     37        Get the object's state, and return it.
     38        (AccessibilityUIElement::isSelected):
     39        Check the object's selected state.
     40        (AccessibilityUIElement::isSelectable):
     41        Check the object's selectable state.
     42        (AccessibilityUIElement::isMultiSelectable):
     43        Check the object's extended/multiple selectable state.
     44
    1452010-01-13  Adam Barth  <abarth@webkit.org>
    246
  • trunk/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp

    r52809 r53220  
    493493}
    494494
     495static JSValueRef getIsSelectableCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
     496{
     497    return JSValueMakeBoolean(context, toAXElement(thisObject)->isSelectable());
     498}
     499
     500static JSValueRef getIsMultiSelectableCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
     501{
     502    return JSValueMakeBoolean(context, toAXElement(thisObject)->isMultiSelectable());
     503}
     504
    495505static JSValueRef getIsExpandedCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
    496506{
     
    588598        { "isRequired", getIsRequiredCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    589599        { "isSelected", getIsSelectedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     600        { "isSelectable", getIsSelectableCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     601        { "isMultiSelectable", getIsMultiSelectableCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    590602        { "isExpanded", getIsExpandedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    591603        { "isChecked", getIsCheckedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
  • trunk/WebKitTools/DumpRenderTree/AccessibilityUIElement.h

    r52994 r53220  
    114114    bool isRequired() const;
    115115    bool isSelected() const;
     116    bool isSelectable() const;
     117    bool isMultiSelectable() const;
    116118    bool isExpanded() const;
    117119    bool isChecked() const;
  • trunk/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp

    r52809 r53220  
    559559}
    560560
     561bool AccessibilityUIElement::isSelectable() const
     562{
     563    // FIXME: implement
     564    return false;
     565}
     566
     567bool AccessibilityUIElement::isMultiSelectable() const
     568{
     569    // FIXME: implement
     570    return false;
     571}
  • trunk/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm

    r52994 r53220  
    781781}
    782782
     783bool AccessibilityUIElement::isSelectable() const
     784{
     785    // FIXME: implement
     786    return false;
     787}
     788
     789bool AccessibilityUIElement::isMultiSelectable() const
     790{
     791    // FIXME: implement
     792    return false;
     793}
  • trunk/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp

    r52809 r53220  
    264264    return 0;
    265265}
     266
     267static DWORD accessibilityState(COMPtr<IAccessible> element)
     268{
     269    VARIANT state;
     270    element->get_accState(self(), &state);
     271
     272    ASSERT(V_VT(&state) == VT_I4);
     273
     274    DWORD result = state.lVal;
     275    VariantClear(&state);
     276
     277    return result;
     278}
     279
    266280bool AccessibilityUIElement::isSelected() const
    267281{
    268     return false;
     282    DWORD state = accessibilityState(m_element);
     283    return (state & STATE_SYSTEM_SELECTED) == STATE_SYSTEM_SELECTED;
    269284}
    270285
     
    513528}
    514529
    515 
     530bool AccessibilityUIElement::isSelectable() const
     531{
     532    DWORD state = accessibilityState(m_element);
     533    return (state & STATE_SYSTEM_SELECTABLE) == STATE_SYSTEM_SELECTABLE;
     534}
     535
     536bool AccessibilityUIElement::isMultiSelectable() const
     537{
     538    DWORD multiSelectable = STATE_SYSTEM_EXTSELECTABLE | STATE_SYSTEM_MULTISELECTABLE;
     539    DWORD state = accessibilityState(m_element);
     540    return (state & multiSelectable) == multiSelectable;
     541}
     542
     543
Note: See TracChangeset for help on using the changeset viewer.