Title: [159925] trunk
Revision
159925
Author
commit-qu...@webkit.org
Date
2013-12-02 02:40:07 -0800 (Mon, 02 Dec 2013)

Log Message

[ATK] Support active state for listbox elements.
https://bugs.webkit.org/show_bug.cgi?id=125009

Patch by Andrzej Badowski <a.badow...@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:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (159924 => 159925)


--- trunk/LayoutTests/ChangeLog	2013-12-02 10:24:29 UTC (rev 159924)
+++ trunk/LayoutTests/ChangeLog	2013-12-02 10:40:07 UTC (rev 159925)
@@ -1,3 +1,16 @@
+2013-12-02  Andrzej Badowski  <a.badow...@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.pak...@samsung.com>
 
         Unreviewed EFL gardening

Added: trunk/LayoutTests/platform/efl/multiselect-list-reports-active-option-expected.txt (0 => 159925)


--- trunk/LayoutTests/platform/efl/multiselect-list-reports-active-option-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/efl/multiselect-list-reports-active-option-expected.txt	2013-12-02 10:40:07 UTC (rev 159925)
@@ -0,0 +1,27 @@
+
+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
+

Modified: trunk/LayoutTests/platform/efl-wk1/TestExpectations (159924 => 159925)


--- trunk/LayoutTests/platform/efl-wk1/TestExpectations	2013-12-02 10:24:29 UTC (rev 159924)
+++ trunk/LayoutTests/platform/efl-wk1/TestExpectations	2013-12-02 10:40:07 UTC (rev 159925)
@@ -136,7 +136,6 @@
 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 ]

Modified: trunk/LayoutTests/platform/efl-wk2/TestExpectations (159924 => 159925)


--- trunk/LayoutTests/platform/efl-wk2/TestExpectations	2013-12-02 10:24:29 UTC (rev 159924)
+++ trunk/LayoutTests/platform/efl-wk2/TestExpectations	2013-12-02 10:40:07 UTC (rev 159925)
@@ -171,7 +171,6 @@
 
 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 ]

Modified: trunk/Source/WebCore/ChangeLog (159924 => 159925)


--- trunk/Source/WebCore/ChangeLog	2013-12-02 10:24:29 UTC (rev 159924)
+++ trunk/Source/WebCore/ChangeLog	2013-12-02 10:40:07 UTC (rev 159925)
@@ -1,3 +1,15 @@
+2013-12-02  Andrzej Badowski  <a.badow...@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  <seo...@webkit.org>
 
         Web Inspector: Remove unused functions from InspectorAgent

Modified: trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp (159924 => 159925)


--- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp	2013-12-02 10:24:29 UTC (rev 159924)
+++ trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp	2013-12-02 10:40:07 UTC (rev 159925)
@@ -706,6 +706,9 @@
     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);
 

Modified: trunk/Tools/ChangeLog (159924 => 159925)


--- trunk/Tools/ChangeLog	2013-12-02 10:24:29 UTC (rev 159924)
+++ trunk/Tools/ChangeLog	2013-12-02 10:40:07 UTC (rev 159925)
@@ -1,3 +1,23 @@
+2013-12-02  Andrzej Badowski  <a.badow...@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  <zdober...@igalia.com>
 
         Unreviewed GTK gardening.

Modified: trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp (159924 => 159925)


--- trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp	2013-12-02 10:24:29 UTC (rev 159924)
+++ trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp	2013-12-02 10:40:07 UTC (rev 159925)
@@ -1346,8 +1346,7 @@
 
 bool AccessibilityUIElement::isSelectedOptionActive() const
 {
-    // FIXME: implement
-    return false;
+    return checkElementState(m_element, ATK_STATE_ACTIVE);
 }
 
 bool AccessibilityUIElement::isVisible() const

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp (159924 => 159925)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp	2013-12-02 10:24:29 UTC (rev 159924)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp	2013-12-02 10:40:07 UTC (rev 159925)
@@ -114,6 +114,7 @@
 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 { }

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h (159924 => 159925)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h	2013-12-02 10:24:29 UTC (rev 159924)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h	2013-12-02 10:40:07 UTC (rev 159925)
@@ -136,6 +136,7 @@
     bool isFocused() const;
     bool isFocusable() const;
     bool isSelected() const;
+    bool isSelectedOptionActive() const;
     bool isSelectable() const;
     bool isMultiSelectable() const;
     void setSelectedChild(AccessibilityUIElement*) const;

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl (159924 => 159925)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl	2013-12-02 10:24:29 UTC (rev 159924)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl	2013-12-02 10:40:07 UTC (rev 159925)
@@ -76,6 +76,7 @@
     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;

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (159924 => 159925)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2013-12-02 10:24:29 UTC (rev 159924)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2013-12-02 10:40:07 UTC (rev 159925)
@@ -1063,6 +1063,11 @@
     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);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (159924 => 159925)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm	2013-12-02 10:24:29 UTC (rev 159924)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm	2013-12-02 10:40:07 UTC (rev 159925)
@@ -797,6 +797,12 @@
     return false;
 }
 
+bool AccessibilityUIElement::isSelectedOptionActive() const
+{
+    // FIXME: implement
+    return false;
+}
+
 bool AccessibilityUIElement::isExpanded() const
 {
     BEGIN_AX_OBJC_EXCEPTIONS
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to