[ATK] Support active state for listbox elements.

https://bugs.webkit.org/show_bug.cgi?id=125009

Patch by Andrzej Badowski <a.badowski@samsung.com> on 2013-12-02
Reviewed by Chris Fleizach.

Source/WebCore:

Added support for ATK_STATE_ACTIVE for listbox elements.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(setAtkStateSetFromCoreObject):

Tools:

Supplement WebKitTestRunner and DumpRenderTree to support isSelectedOptionActive.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::isSelectedOptionActive):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::isSelectedOptionActive):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::isSelectedOptionActive):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::isSelectedOptionActive):

LayoutTests:

Establish expectations for the test (all PASS).

* accessibility/multiselect-list-reports-active-option-expected.txt: Added.
* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f966db34
2013-12-02 Andrzej Badowski <a.badowski@samsung.com>
[ATK] Support active state for listbox elements.
https://bugs.webkit.org/show_bug.cgi?id=125009
Reviewed by Chris Fleizach.
Establish expectations for the test (all PASS).
* accessibility/multiselect-list-reports-active-option-expected.txt: Added.
* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:
2013-11-29 Michał Pakuła vel Rutka <m.pakula@samsung.com>
Unreviewed EFL gardening
......
......@@ -136,7 +136,6 @@ accessibility/aria-checkbox-sends-notification.html [ Skip ]
accessibility/deleting-iframe-destroys-axcache.html [ Skip ]
accessibility/img-fallsback-to-title.html [ Skip ]
accessibility/internal-link-anchors2.html [ Skip ]
accessibility/multiselect-list-reports-active-option.html [ Skip ]
accessibility/radio-button-group-members.html [ Skip ]
accessibility/table-cell-spans.html [ Skip ]
accessibility/table-cells.html [ Skip ]
......
......@@ -171,7 +171,6 @@ webkit.org/b/117182 accessibility/text-role-with-aria-hidden-inside.html [ Failu
webkit.org/b/118418 accessibility/img-fallsback-to-title.html [ Missing ]
webkit.org/b/98348 accessibility/internal-link-anchors2.html [ Missing ]
webkit.org/b/116970 accessibility/multiselect-list-reports-active-option.html [ Missing ]
webkit.org/b/98348 accessibility/radio-button-group-members.html [ Missing ]
accessibility/negative-tabindex-does-not-expose-label.html [ Missing ]
......
This tests that navigating in a multiselect list updates selection and the active selected option and sends a notification.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS accessibleOne.isSelected is true
PASS accessibleOne.isSelectedOptionActive is true
PASS accessibleTwo.isSelected is false
PASS accessibleTwo.isSelectedOptionActive is false
PASS accessibleThree.isSelected is false
PASS accessibleThree.isSelectedOptionActive is false
PASS accessibleOne.isSelected is false
PASS accessibleOne.isSelectedOptionActive is false
PASS accessibleTwo.isSelected is true
PASS accessibleTwo.isSelectedOptionActive is true
PASS accessibleThree.isSelected is false
PASS accessibleThree.isSelectedOptionActive is false
PASS accessibleOne.isSelected is false
PASS accessibleOne.isSelectedOptionActive is false
PASS accessibleTwo.isSelected is true
PASS accessibleTwo.isSelectedOptionActive is false
PASS accessibleThree.isSelected is true
PASS accessibleThree.isSelectedOptionActive is true
TEST COMPLETE
2013-12-02 Andrzej Badowski <a.badowski@samsung.com>
[ATK] Support active state for listbox elements.
https://bugs.webkit.org/show_bug.cgi?id=125009
Reviewed by Chris Fleizach.
Added support for ATK_STATE_ACTIVE for listbox elements.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(setAtkStateSetFromCoreObject):
2013-12-02 Seokju Kwon <seokju@webkit.org>
Web Inspector: Remove unused functions from InspectorAgent
......@@ -706,6 +706,9 @@ static void setAtkStateSetFromCoreObject(AccessibilityObject* coreObject, AtkSta
bool isListBoxOption = parent && parent->isListBox();
// Please keep the state list in alphabetical order
if (isListBoxOption && coreObject->isSelectedOptionActive())
atk_state_set_add_state(stateSet, ATK_STATE_ACTIVE);
if (coreObject->isChecked())
atk_state_set_add_state(stateSet, ATK_STATE_CHECKED);
......
2013-12-02 Andrzej Badowski <a.badowski@samsung.com>
[ATK] Support active state for listbox elements.
https://bugs.webkit.org/show_bug.cgi?id=125009
Reviewed by Chris Fleizach.
Supplement WebKitTestRunner and DumpRenderTree to support isSelectedOptionActive.
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::isSelectedOptionActive):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::isSelectedOptionActive):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::isSelectedOptionActive):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::isSelectedOptionActive):
2013-12-02 Zan Dobersek <zdobersek@igalia.com>
Unreviewed GTK gardening.
......
......@@ -1346,8 +1346,7 @@ bool AccessibilityUIElement::isMultiSelectable() const
bool AccessibilityUIElement::isSelectedOptionActive() const
{
// FIXME: implement
return false;
return checkElementState(m_element, ATK_STATE_ACTIVE);
}
bool AccessibilityUIElement::isVisible() const
......
......@@ -114,6 +114,7 @@ bool AccessibilityUIElement::isRequired() const { return false; }
bool AccessibilityUIElement::isFocused() const { return false; }
bool AccessibilityUIElement::isFocusable() const { return false; }
bool AccessibilityUIElement::isSelected() const { return false; }
bool AccessibilityUIElement::isSelectedOptionActive() const { return false; }
bool AccessibilityUIElement::isSelectable() const { return false; }
bool AccessibilityUIElement::isMultiSelectable() const { return false; }
void AccessibilityUIElement::setSelectedChild(AccessibilityUIElement*) const { }
......
......@@ -136,6 +136,7 @@ public:
bool isFocused() const;
bool isFocusable() const;
bool isSelected() const;
bool isSelectedOptionActive() const;
bool isSelectable() const;
bool isMultiSelectable() const;
void setSelectedChild(AccessibilityUIElement*) const;
......
......@@ -76,6 +76,7 @@ interface AccessibilityUIElement {
readonly attribute boolean isFocusable;
readonly attribute boolean isSelectable;
readonly attribute boolean isSelected;
readonly attribute boolean isSelectedOptionActive;
readonly attribute boolean isMultiSelectable;
readonly attribute boolean isExpanded;
readonly attribute boolean isChecked;
......
......@@ -1063,6 +1063,11 @@ bool AccessibilityUIElement::isSelected() const
return checkElementState(m_element.get(), ATK_STATE_SELECTED);
}
bool AccessibilityUIElement::isSelectedOptionActive() const
{
return checkElementState(m_element.get(), ATK_STATE_ACTIVE);
}
bool AccessibilityUIElement::isExpanded() const
{
return checkElementState(m_element.get(), ATK_STATE_EXPANDED);
......
......@@ -797,6 +797,12 @@ bool AccessibilityUIElement::isSelected() const
return false;
}
bool AccessibilityUIElement::isSelectedOptionActive() const
{
// FIXME: implement
return false;
}
bool AccessibilityUIElement::isExpanded() const
{
BEGIN_AX_OBJC_EXCEPTIONS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment