MSAA: accSelect() is not implemented
authorjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jan 2010 22:31:19 +0000 (22:31 +0000)
committerjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jan 2010 22:31:19 +0000 (22:31 +0000)
commit1c372d40cb4b43dc885b59bc912cd75bfd02ea1f
treeb0cc5e8029a341ecbc772884b5f3b158a555f4e4
parent02ccd3ff88836274a018def9ccbc0fc0fef9497e
MSAA: accSelect() is not implemented

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

Reviewed by Darin Adler.

WebCore:

Test: platform/win/accessibility/selection-and-focus.html

* accessibility/AccessibilityMenuListOption.cpp:
(WebCore::AccessibilityMenuListOption::setSelected):
Return early if the object is not selectable.

WebKit/win:

* AccessibleBase.cpp:
(AccessibleBase::accSelect):
If there is an invalid combination of state flags, return early. If the
caller passed the "take focus" flag, focus the object. If the "take
selection" flag was passed, check whether the parent object is an
AccessibilityListBox; if so, call the object's setSelectedChildren()
function. If the parent is an AccessibilityMenuListPopup, call the
child object's setSelected() function. Otherwise, if the parent is some
other, unsupported object, return early.
If the selection flags include "add", "remove", or "extend" selection,
and the parent object is not multi-selectable, return early. Otherwise,
set or unset the child's selected flag based on the passed flag.

WebKitTools:

* DumpRenderTree/AccessibilityUIElement.cpp:
(takeFocusCallback):
Call the object's takeFocus() function.
(takeSelectionCallback):
Call its takeSelection() function.
(addSelectionCallback):
Call its addSelection() function.
(removeSelectionCallback):
Call its removeSelection() function.
(AccessibilityUIElement::getJSClass):
Add new functions to the JS class definition.

* DumpRenderTree/AccessibilityUIElement.h:
Declare new functions.

* DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
(AccessibilityUIElement::takeFocus):
Stubbed.
(AccessibilityUIElement::takeSelection):
Stubbed.
(AccessibilityUIElement::addSelection):
Stubbed.
(AccessibilityUIElement::removeSelection):
Stubbed.

* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::takeFocus):
Stubbed.
(AccessibilityUIElement::takeSelection):
Stubbed.
(AccessibilityUIElement::addSelection):
Stubbed.
(AccessibilityUIElement::removeSelection):
Stubbed.

* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::takeFocus):
Call the object's accSelect() function, passing the appropriate flag.
(AccessibilityUIElement::takeSelection):
Ditto.
(AccessibilityUIElement::addSelection):
Ditto.
(AccessibilityUIElement::removeSelection):
Ditto.

LayoutTests:

* platform/win/accessibility/selection-and-focus-expected.txt: Added.
* platform/win/accessibility/selection-and-focus.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@53567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/win/accessibility/selection-and-focus-expected.txt [new file with mode: 0644]
LayoutTests/platform/win/accessibility/selection-and-focus.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/accessibility/AccessibilityMenuListOption.cpp
WebKit/win/AccessibleBase.cpp
WebKit/win/ChangeLog
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
WebKitTools/DumpRenderTree/AccessibilityUIElement.h
WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp