Commit c344ece4 authored by jhoneycutt@apple.com's avatar jhoneycutt@apple.com

MSAA: The child <option> elements of a non-multiple <select> are not

exposed

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

WebCore:

Reviewed by Alice Liu.

This exposes the child <option> elements in a format similar to
Firefox's: the <select> element has one child, a hidden list object,
and this list has as its children the <option> elements.

* GNUmakefile.am:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
Add new files to project.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::getOrCreate):
If the element is a RenderMenuList, create an AccessibilityMenuList.
(WebCore::AXObjectCache::getOrCreate):
Add new types to create by role value.

* accessibility/AccessibilityMenuList.cpp: Added.
(WebCore::AccessibilityMenuList::AccessibilityMenuList):
Call the base class constructor. Assert that the RenderObject passed
is a RenderMenuList.
(WebCore::AccessibilityMenuList::press):
Show or hide the popup menu.
(WebCore::AccessibilityMenuList::addChildren):
Create an AccessibilityMenuListPopup. If the platform ignores its
accessibility, remove it from the object cache and return early.
Otherwise, set its parent object to this object, add it to our list of
children, and tell it to add its children.
(WebCore::AccessibilityMenuList::childrenChanged):
Tell our child hidden list that its children changed.
(WebCore::AccessibilityMenuList::isCollapsed):
Return whether the popup menu is visible.

* accessibility/AccessibilityMenuList.h: Added.
(WebCore::AccessibilityMenuList::create):
Adopt and return a new RenderMenuList.
(WebCore::AccessibilityMenuList::isMenuList):
(WebCore::AccessibilityMenuList::roleValue):
(WebCore::AccessibilityMenuList::accessibilityIsIgnored):
(WebCore::AccessibilityMenuList::canSetFocusAttribute):

* accessibility/AccessibilityMenuListOption.cpp: Added.
(WebCore::AccessibilityMenuListOption::AccessibilityMenuListOption):
Initialize the pointer to our parent popup menu.
(WebCore::AccessibilityMenuListOption::setElement):
Assert that the element is an <option> element.
(WebCore::AccessibilityMenuListOption::actionElement):
Return our element.
(WebCore::AccessibilityMenuListOption::parentObject):
Return our parent popup menu.
(WebCore::AccessibilityMenuListOption::isEnabled):
Return true if the element itself is enabled.
(WebCore::AccessibilityMenuListOption::isVisible):
Return true if the popup is visible, or return true if the popup is
collapsed but the element is selected.
(WebCore::AccessibilityMenuListOption::isOffScreen):
Return true if the object is invisible.
(WebCore::AccessibilityMenuListOption::isSelected):
(WebCore::AccessibilityMenuListOption::setSelected):
(WebCore::AccessibilityMenuListOption::nameForMSAA):
Return the <option> element's text.
(WebCore::AccessibilityMenuListOption::canSetSelectedAttribute):
Return true if enabled.
(WebCore::AccessibilityMenuListOption::elementRect):
Return the AccessibilityMenuList's rect.

* accessibility/AccessibilityMenuListOption.h: Added.
(WebCore::AccessibilityMenuListOption::create):
Adopt and return a new AccessibilityMenuListOption.
(WebCore::AccessibilityMenuListOption::setParent):
(WebCore::AccessibilityMenuListOption::isMenuListOption):
(WebCore::AccessibilityMenuListOption::roleValue):
(WebCore::AccessibilityMenuListOption::canHaveChildren):
(WebCore::AccessibilityMenuListOption::size):

* accessibility/AccessibilityMenuListPopup.cpp: Added.
(WebCore::AccessibilityMenuListPopup::AccessibilityMenuListPopup):
Initialize the pointer to our parent list.
(WebCore::AccessibilityMenuListPopup::isVisible):
Return false; we're never considered visible.
(WebCore::AccessibilityMenuListPopup::isOffScreen):
Return true if the popup is collapsed.
(WebCore::AccessibilityMenuListPopup::parentObject):
Return our parent AccessibilityMenuList.
(WebCore::AccessibilityMenuListPopup::isEnabled):
Return true if our parent is enabled.
(WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
If the element is an <option> element, create a list item for it, and
set the object's element to this element.
(WebCore::AccessibilityMenuListPopup::press):
Call our parent's press() function to show or hide the popup menu.
(WebCore::AccessibilityMenuListPopup::addChildren):
Walk the select element's children, and create list items for them. Add
them to our list of children.
(WebCore::AccessibilityMenuListPopup::childrenChanged):
If any of our children have been detached from the document, remove
them from the AXObjectCache and from our child list.
(WebCore::AccessibilityMenuListPopup::setMenuList):

* accessibility/AccessibilityMenuListPopup.h: Added.
(WebCore::AccessibilityMenuListPopup::create):
Adopt and return an AccessibilityMenuListPopup.
(WebCore::AccessibilityMenuListPopup::isMenuListPopup):
(WebCore::AccessibilityMenuListPopup::elementRect):
(WebCore::AccessibilityMenuListPopup::size):
(WebCore::AccessibilityMenuListPopup::roleValue):

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::actionVerb):
Add the menuListAction and menuListPopupAction verbs.

* accessibility/AccessibilityObject.h:
(WebCore::):
Add new roles.
(WebCore::AccessibilityObject::isMenuList):
Stubbed.
(WebCore::AccessibilityObject::isMenuListHiddenList):
Stubbed.
(WebCore::AccessibilityObject::isMenuListOption):
Stubbed.
(WebCore::AccessibilityObject::isVisible):
Stubbed.

* accessibility/chromium/AccessibilityObjectChromium.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Ignore the new object type.

* accessibility/gtk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Ditto.

* accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Ditto.

* accessibility/qt/AccessibilityObjectQt.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Ditto.

* accessibility/win/AccessibilityObjectWin.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Allow the new object types.

* accessibility/wx/AccessibilityObjectWx.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Ignore the new object type.

* accessibility/win/AccessibilityObjectWin.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
If the object is an AccessibilityMenuListHiddenList or
AccessibilityMenuListOption, include it.

* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::disabled):
Call ownElementDisabled().

* html/HTMLOptionElement.h:
(WebCore::HTMLOptionElement::ownElementDisabled):
Return the base class implementation of disabled, which returns
whether this <option> itself is disabled.

* platform/LocalizedStrings.h:
Declare new localized string functions.

* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::AXMenuListPopupActionVerb):
Stubbed.
(WebCore::AXMenuListActionVerb):
Stubbed.

* platform/haiku/LocalizedStringsHaiku.cpp:
(WebCore::AXMenuListPopupActionVerb):
Stubbed.
(WebCore::AXMenuListActionVerb):
Stubbed.

* platform/mac/LocalizedStringsMac.mm:
(WebCore::AXMenuListPopupActionVerb):
Call the view factory's method.
(WebCore::AXMenuListActionVerb):
Ditto.

* platform/qt/Localizations.cpp:
(WebCore::AXMenuListPopupActionVerb):
Stubbed.
(WebCore::AXMenuListActionVerb):
Stubbed.

* platform/wx/LocalizedStringsWx.cpp:
(WebCore::AXMenuListPopupActionVerb):
Stubbed.
(WebCore::AXMenuListActionVerb):
Stubbed.

WebKit:

Reviewed by Alice Liu.

* English.lproj/Localizable.strings:
Add new localized strings.

WebKit/mac:

* WebCoreSupport/WebViewFactory.mm:
(-[WebViewFactory AXMenuListPopupActionVerb]):
Stubbed.
(-[WebViewFactory AXMenuListActionVerb]):
Stubbed.

WebKit/win:

Reviewed by Alice Liu.

* AccessibleBase.cpp:
(AccessibleBase::get_accState):
If the object is invisible, set the invisible state flag. If the object
is collapsed, set the collapsed state. If the object is a combo box,
set the has popup flag, and if it's not collapsed, set the expanded
flag.
(MSAARole):
Add new WebCore to MSAA role mappings.

* WebCoreLocalizedStrings.cpp:
(WebCore::AXMenuListActionVerb):
Return the action verb that Firefox uses for <select> elements with
popups.
(WebCore::AXMenuListPopupActionVerb):
Return the verb that Firefox uses for a popup list.

WebKitTools:

Reviewed by Alice Liu.

* DumpRenderTree/AccessibilityUIElement.cpp:
(getIsVisibleCallback):
Call the object's isVisible() function.
(getIsOffScreenCallback):
Ditto, for isOffScreen().
(getIsCollapsedCallback):
Ditto, for isCollapsed().
(getHasPopupCallback):
Ditto, for hasPopup().
(AccessibilityUIElement::getJSClass):
Add isVisible and isOffScreen attributes.

* DumpRenderTree/AccessibilityUIElement.h:
Declare new functions.

* DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
(AccessibilityUIElement::isVisible):
Stubbed.
(AccessibilityUIElement::isOffScreen):
Stubbed.
(AccessibilityUIElement::isCollapsed):
Stubbed.
(AccessibilityUIElement::hasPopup):
Stubbed.

* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::isVisible):
Stubbed.
(AccessibilityUIElement::isOffScreen):
Stubbed.
(AccessibilityUIElement::isCollapsed):
Stubbed.
(AccessibilityUIElement::hasPopup):
Stubbed.

* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::showMenu):
Call the object's accDoDefaultAction() to show its popup menu.
(AccessibilityUIElement::isEnabled):
Check that the object does not have the "unavailable" state.
(AccessibilityUIElement::isVisible):
Check that the object does not have the "invisible" state.
(AccessibilityUIElement::isOffScreen):
Check whether the object has the "offscreen" state.
(AccessibilityUIElement::isCollapsed):
Check whether the object has the "collapsed" state.
(AccessibilityUIElement::hasPopup):
Check whether the object has the "has popup" state.

LayoutTests:

Reviewed by Alice Liu.

* platform/win/accessibility/single-select-children-expected.txt: Added.
* platform/win/accessibility/single-select-children.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b9c7a3b9
2010-01-17 Jon Honeycutt <jhoneycutt@apple.com>
MSAA: The child <option> elements of a non-multiple <select> are not
exposed
https://bugs.webkit.org/show_bug.cgi?id=33773
<rdar://problem/7550556>
Reviewed by Alice Liu.
* platform/win/accessibility/single-select-children-expected.txt: Added.
* platform/win/accessibility/single-select-children.html: Added.
2010-01-19 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dan Bernstein.
This tests that non-multiple select elements expose their list options.
PASS selectElement.role is "combo box"
PASS selectElement.isMultiSelectable is false
PASS selectElement.isCollapsed is true
PASS selectElement.hasPopup is true
PASS list.role is "list"
PASS list.isVisible is false
PASS list.isOffScreen is true
option.title: Option 1
option.role: list item
option.width: 78
option.height: 22
option.x: -790
option.y: -591
option.isOffScreen: false
option.isEnabled: true
option.isVisible: true
option.isSelected: true
option.isSelectable: true
option.title: Option 2
option.role: list item
option.width: 78
option.height: 22
option.x: -790
option.y: -591
option.isOffScreen: true
option.isEnabled: true
option.isVisible: false
option.isSelected: false
option.isSelectable: true
option.title: Option 3
option.role: list item
option.width: 78
option.height: 22
option.x: -790
option.y: -591
option.isOffScreen: true
option.isEnabled: false
option.isVisible: false
option.isSelected: false
option.isSelectable: false
---
option.title: Option 1
option.role: list item
option.width: 78
option.height: 22
option.x: -790
option.y: -591
option.isOffScreen: true
option.isEnabled: true
option.isVisible: false
option.isSelected: false
option.isSelectable: true
option.title: Option 2
option.role: list item
option.width: 78
option.height: 22
option.x: -790
option.y: -591
option.isOffScreen: false
option.isEnabled: true
option.isVisible: true
option.isSelected: true
option.isSelectable: true
option.title: Option 3
option.role: list item
option.width: 78
option.height: 22
option.x: -790
option.y: -591
option.isOffScreen: true
option.isEnabled: false
option.isVisible: false
option.isSelected: false
option.isSelectable: false
---
option.title: Option 1
option.role: list item
option.width: 78
option.height: 22
option.x: -790
option.y: -591
option.isOffScreen: false
option.isEnabled: true
option.isVisible: true
option.isSelected: true
option.isSelectable: true
option.title: Option 2
option.role: list item
option.width: 78
option.height: 22
option.x: -790
option.y: -591
option.isOffScreen: true
option.isEnabled: true
option.isVisible: false
option.isSelected: false
option.isSelectable: true
option.title: Option 3
option.role: list item
option.width: 78
option.height: 22
option.x: -790
option.y: -591
option.isOffScreen: true
option.isEnabled: false
option.isVisible: false
option.isSelected: false
option.isSelectable: false
---
PASS selectElement.isCollapsed is false
PASS list.isOffScreen is false
option.title: Option 1
option.role: list item
option.width: 78
option.height: 22
option.x: -790
option.y: -591
option.isOffScreen: false
option.isEnabled: true
option.isVisible: true
option.isSelected: true
option.isSelectable: true
option.title: Option 2
option.role: list item
option.width: 78
option.height: 22
option.x: -790
option.y: -591
option.isOffScreen: false
option.isEnabled: true
option.isVisible: true
option.isSelected: false
option.isSelectable: true
option.title: Option 3
option.role: list item
option.width: 78
option.height: 22
option.x: -790
option.y: -591
option.isOffScreen: false
option.isEnabled: false
option.isVisible: true
option.isSelected: false
option.isSelectable: false
---
PASS option.width != 0 is true
PASS option.width == 0 is true
<html>
<head>
<link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
<script src="../../../fast/js/resources/js-test-pre.js"></script>
</head>
<body id="body">
<select id="selectElement" title="selectElement">
<option SELECTED>Option 1</option>
<option>Option 2</option>
<option DISABLED>Option 3</option>
</select>
<p>This tests that non-multiple select elements expose their list options.</p>
<p id="notDRT">This test should only be run inside of DumpRenderTree.</p>
<p id="console"></p>
<script>
function dumpListOptionAttributes(list) {
for (var i = 0; i < list.childrenCount; ++i) {
var option = list.childAtIndex(i);
debug('option.title: ' + option.title);
debug('option.role: ' + option.role);
debug('option.width: ' + option.width);
debug('option.height: ' + option.height);
debug('option.x: ' + option.x);
debug('option.y: ' + option.y);
debug('option.isOffScreen: ' + option.isOffScreen);
debug('option.isEnabled: ' + option.isEnabled);
debug('option.isVisible: ' + option.isVisible);
debug('option.isSelected: ' + option.isSelected);
debug('option.isSelectable: ' + option.isSelectable);
debug("");
}
debug("---\n");
}
if (window.layoutTestController && window.accessibilityController) {
document.getElementById("notDRT").style.visibility = "hidden";
layoutTestController.dumpAsText();
document.getElementById("selectElement").focus();
var selectElement = accessibilityController.focusedElement;
shouldBe('selectElement.role', '"combo box"');
shouldBeFalse('selectElement.isMultiSelectable');
shouldBeTrue('selectElement.isCollapsed');
shouldBeTrue('selectElement.hasPopup');
debug("");
var list = accessibilityController.focusedElement.childAtIndex(0);
shouldBe('list.role', '"list"');
shouldBeFalse('list.isVisible');
shouldBeTrue('list.isOffScreen');
debug("");
dumpListOptionAttributes(list);
document.getElementById("selectElement").selectedIndex = 1;
dumpListOptionAttributes(list);
document.getElementById("selectElement").selectedIndex = 0;
document.getElementById("selectElement").disabled = true;
dumpListOptionAttributes(list);
document.getElementById("selectElement").disabled = false;
selectElement.showMenu();
shouldBeFalse('selectElement.isCollapsed');
shouldBeFalse('list.isOffScreen');
debug("");
dumpListOptionAttributes(list);
// Test that accessing a detached <option> does not crash.
var option = list.childAtIndex(0);
shouldBeTrue('option.width != 0');
document.getElementById("selectElement").options[0] = null;
shouldBeTrue('option.width == 0');
}
</script>
</body>
</html>
2010-01-17 Jon Honeycutt <jhoneycutt@apple.com>
MSAA: The child <option> elements of a non-multiple <select> are not
exposed
https://bugs.webkit.org/show_bug.cgi?id=33773
<rdar://problem/7550556>
Reviewed by Alice Liu.
This exposes the child <option> elements in a format similar to
Firefox's: the <select> element has one child, a hidden list object,
and this list has as its children the <option> elements.
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
Add new files to project.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::getOrCreate):
If the element is a RenderMenuList, create an AccessibilityMenuList.
(WebCore::AXObjectCache::getOrCreate):
Add new types to create by role value.
* accessibility/AccessibilityMenuList.cpp: Added.
(WebCore::AccessibilityMenuList::AccessibilityMenuList):
Call the base class constructor. Assert that the RenderObject passed
is a RenderMenuList.
(WebCore::AccessibilityMenuList::press):
Show or hide the popup menu.
(WebCore::AccessibilityMenuList::addChildren):
Create an AccessibilityMenuListPopup. If the platform ignores its
accessibility, remove it from the object cache and return early.
Otherwise, set its parent object to this object, add it to our list of
children, and tell it to add its children.
(WebCore::AccessibilityMenuList::childrenChanged):
Tell our child hidden list that its children changed.
(WebCore::AccessibilityMenuList::isCollapsed):
Return whether the popup menu is visible.
* accessibility/AccessibilityMenuList.h: Added.
(WebCore::AccessibilityMenuList::create):
Adopt and return a new RenderMenuList.
(WebCore::AccessibilityMenuList::isMenuList):
(WebCore::AccessibilityMenuList::roleValue):
(WebCore::AccessibilityMenuList::accessibilityIsIgnored):
(WebCore::AccessibilityMenuList::canSetFocusAttribute):
* accessibility/AccessibilityMenuListOption.cpp: Added.
(WebCore::AccessibilityMenuListOption::AccessibilityMenuListOption):
Initialize the pointer to our parent popup menu.
(WebCore::AccessibilityMenuListOption::setElement):
Assert that the element is an <option> element.
(WebCore::AccessibilityMenuListOption::actionElement):
Return our element.
(WebCore::AccessibilityMenuListOption::parentObject):
Return our parent popup menu.
(WebCore::AccessibilityMenuListOption::isEnabled):
Return true if the element itself is enabled.
(WebCore::AccessibilityMenuListOption::isVisible):
Return true if the popup is visible, or return true if the popup is
collapsed but the element is selected.
(WebCore::AccessibilityMenuListOption::isOffScreen):
Return true if the object is invisible.
(WebCore::AccessibilityMenuListOption::isSelected):
(WebCore::AccessibilityMenuListOption::setSelected):
(WebCore::AccessibilityMenuListOption::nameForMSAA):
Return the <option> element's text.
(WebCore::AccessibilityMenuListOption::canSetSelectedAttribute):
Return true if enabled.
(WebCore::AccessibilityMenuListOption::elementRect):
Return the AccessibilityMenuList's rect.
* accessibility/AccessibilityMenuListOption.h: Added.
(WebCore::AccessibilityMenuListOption::create):
Adopt and return a new AccessibilityMenuListOption.
(WebCore::AccessibilityMenuListOption::setParent):
(WebCore::AccessibilityMenuListOption::isMenuListOption):
(WebCore::AccessibilityMenuListOption::roleValue):
(WebCore::AccessibilityMenuListOption::canHaveChildren):
(WebCore::AccessibilityMenuListOption::size):
* accessibility/AccessibilityMenuListPopup.cpp: Added.
(WebCore::AccessibilityMenuListPopup::AccessibilityMenuListPopup):
Initialize the pointer to our parent list.
(WebCore::AccessibilityMenuListPopup::isVisible):
Return false; we're never considered visible.
(WebCore::AccessibilityMenuListPopup::isOffScreen):
Return true if the popup is collapsed.
(WebCore::AccessibilityMenuListPopup::parentObject):
Return our parent AccessibilityMenuList.
(WebCore::AccessibilityMenuListPopup::isEnabled):
Return true if our parent is enabled.
(WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
If the element is an <option> element, create a list item for it, and
set the object's element to this element.
(WebCore::AccessibilityMenuListPopup::press):
Call our parent's press() function to show or hide the popup menu.
(WebCore::AccessibilityMenuListPopup::addChildren):
Walk the select element's children, and create list items for them. Add
them to our list of children.
(WebCore::AccessibilityMenuListPopup::childrenChanged):
If any of our children have been detached from the document, remove
them from the AXObjectCache and from our child list.
(WebCore::AccessibilityMenuListPopup::setMenuList):
* accessibility/AccessibilityMenuListPopup.h: Added.
(WebCore::AccessibilityMenuListPopup::create):
Adopt and return an AccessibilityMenuListPopup.
(WebCore::AccessibilityMenuListPopup::isMenuListPopup):
(WebCore::AccessibilityMenuListPopup::elementRect):
(WebCore::AccessibilityMenuListPopup::size):
(WebCore::AccessibilityMenuListPopup::roleValue):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::actionVerb):
Add the menuListAction and menuListPopupAction verbs.
* accessibility/AccessibilityObject.h:
(WebCore::):
Add new roles.
(WebCore::AccessibilityObject::isMenuList):
Stubbed.
(WebCore::AccessibilityObject::isMenuListHiddenList):
Stubbed.
(WebCore::AccessibilityObject::isMenuListOption):
Stubbed.
(WebCore::AccessibilityObject::isVisible):
Stubbed.
* accessibility/chromium/AccessibilityObjectChromium.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Ignore the new object type.
* accessibility/gtk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Ditto.
* accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Ditto.
* accessibility/qt/AccessibilityObjectQt.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Ditto.
* accessibility/win/AccessibilityObjectWin.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Allow the new object types.
* accessibility/wx/AccessibilityObjectWx.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Ignore the new object type.
* accessibility/win/AccessibilityObjectWin.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
If the object is an AccessibilityMenuListHiddenList or
AccessibilityMenuListOption, include it.
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::disabled):
Call ownElementDisabled().
* html/HTMLOptionElement.h:
(WebCore::HTMLOptionElement::ownElementDisabled):
Return the base class implementation of disabled, which returns
whether this <option> itself is disabled.
* platform/LocalizedStrings.h:
Declare new localized string functions.
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::AXMenuListPopupActionVerb):
Stubbed.
(WebCore::AXMenuListActionVerb):
Stubbed.
* platform/haiku/LocalizedStringsHaiku.cpp:
(WebCore::AXMenuListPopupActionVerb):
Stubbed.
(WebCore::AXMenuListActionVerb):
Stubbed.
* platform/mac/LocalizedStringsMac.mm:
(WebCore::AXMenuListPopupActionVerb):
Call the view factory's method.
(WebCore::AXMenuListActionVerb):
Ditto.
* platform/qt/Localizations.cpp:
(WebCore::AXMenuListPopupActionVerb):
Stubbed.
(WebCore::AXMenuListActionVerb):
Stubbed.
* platform/wx/LocalizedStringsWx.cpp:
(WebCore::AXMenuListPopupActionVerb):
Stubbed.
(WebCore::AXMenuListActionVerb):
Stubbed.
2010-01-19 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dan Bernstein.
......@@ -316,6 +316,12 @@ webcore_sources += \
WebCore/accessibility/AccessibilityListBoxOption.h \
WebCore/accessibility/AccessibilityMediaControls.cpp \
WebCore/accessibility/AccessibilityMediaControls.h \
WebCore/accessibility/AccessibilityMenuList.cpp \
WebCore/accessibility/AccessibilityMenuList.h \
WebCore/accessibility/AccessibilityMenuListPopup.cpp \
WebCore/accessibility/AccessibilityMenuListPopup.h \
WebCore/accessibility/AccessibilityMenuListOption.cpp \
WebCore/accessibility/AccessibilityMenuListOption.h \
WebCore/accessibility/AccessibilityObject.cpp \
WebCore/accessibility/AccessibilityObject.h \
WebCore/accessibility/AccessibilityRenderObject.cpp \
......
......@@ -403,6 +403,12 @@
'accessibility/AccessibilityListBoxOption.h',
'accessibility/AccessibilityMediaControls.cpp',
'accessibility/AccessibilityMediaControls.h',
'accessibility/AccessibilityMenuList.cpp',
'accessibility/AccessibilityMenuList.h',
'accessibility/AccessibilityMenuListPopup.cpp',
'accessibility/AccessibilityMenuListPopup.h',
'accessibility/AccessibilityMenuListOption.cpp',
'accessibility/AccessibilityMenuListOption.h',
'accessibility/AccessibilityObject.cpp',
'accessibility/AccessibilityObject.h',
'accessibility/AccessibilityRenderObject.cpp',
......
......@@ -19936,6 +19936,30 @@
RelativePath="..\accessibility\AccessibilityMediaControls.h"
>
</File>
<File
RelativePath="..\accessibility\AccessibilityMenuList.cpp"
>
</File>
<File
RelativePath="..\accessibility\AccessibilityMenuList.h"
>
</File>
<File
RelativePath="..\accessibility\AccessibilityMenuListOption.cpp"
>
</File>
<File
RelativePath="..\accessibility\AccessibilityMenuListOption.h"
>
</File>
<File
RelativePath="..\accessibility\AccessibilityMenuListPopup.cpp"
>
</File>
<File
RelativePath="..\accessibility\AccessibilityMenuListPopup.h"
>
</File>
<File
RelativePath="..\accessibility\AccessibilityObject.cpp"
>
......@@ -42007,7 +42031,7 @@
RelativePath="..\ForwardingHeaders\runtime\UString.h"
>
</File>
<File
<File
RelativePath="..\ForwardingHeaders\runtime\UStringImpl.h"
>
</File>
......
......@@ -1252,6 +1252,12 @@
7693BAD3106C2DCA007B0823 /* PluginHalter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7693BACF106C2DCA007B0823 /* PluginHalter.cpp */; };
7693BAD4106C2DCA007B0823 /* PluginHalter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7693BAD0106C2DCA007B0823 /* PluginHalter.h */; };
7693BAD5106C2DCA007B0823 /* PluginHalterClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7693BAD1106C2DCA007B0823 /* PluginHalterClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
76CDD2F21103DA6600680521 /* AccessibilityMenuList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76CDD2EC1103DA6600680521 /* AccessibilityMenuList.cpp */; };
76CDD2F31103DA6600680521 /* AccessibilityMenuList.h in Headers */ = {isa = PBXBuildFile; fileRef = 76CDD2ED1103DA6600680521 /* AccessibilityMenuList.h */; };
76CDD2F41103DA6600680521 /* AccessibilityMenuListPopup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76CDD2EE1103DA6600680521 /* AccessibilityMenuListPopup.cpp */; };
76CDD2F51103DA6600680521 /* AccessibilityMenuListPopup.h in Headers */ = {isa = PBXBuildFile; fileRef = 76CDD2EF1103DA6600680521 /* AccessibilityMenuListPopup.h */; };
76CDD2F61103DA6600680521 /* AccessibilityMenuListOption.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76CDD2F01103DA6600680521 /* AccessibilityMenuListOption.cpp */; };
76CDD2F71103DA6600680521 /* AccessibilityMenuListOption.h in Headers */ = {isa = PBXBuildFile; fileRef = 76CDD2F11103DA6600680521 /* AccessibilityMenuListOption.h */; };
79AC9218109945C80021266E /* JSCompositionEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 79AC9216109945C80021266E /* JSCompositionEvent.cpp */; };
79AC9219109945C80021266E /* JSCompositionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 79AC9217109945C80021266E /* JSCompositionEvent.h */; };
79F2F5A11091939A000D87CB /* CompositionEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 79F2F59E1091939A000D87CB /* CompositionEvent.cpp */; };
......@@ -6623,6 +6629,12 @@
7693BACF106C2DCA007B0823 /* PluginHalter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginHalter.cpp; sourceTree = "<group>"; };
7693BAD0106C2DCA007B0823 /* PluginHalter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginHalter.h; sourceTree = "<group>"; };
7693BAD1106C2DCA007B0823 /* PluginHalterClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginHalterClient.h; sourceTree = "<group>"; };
76CDD2EC1103DA6600680521 /* AccessibilityMenuList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityMenuList.cpp; sourceTree = "<group>"; };
76CDD2ED1103DA6600680521 /* AccessibilityMenuList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityMenuList.h; sourceTree = "<group>"; };
76CDD2EE1103DA6600680521 /* AccessibilityMenuListPopup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityMenuListPopup.cpp; sourceTree = "<group>"; };
76CDD2EF1103DA6600680521 /* AccessibilityMenuListPopup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityMenuListPopup.h; sourceTree = "<group>"; };
76CDD2F01103DA6600680521 /* AccessibilityMenuListOption.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityMenuListOption.cpp; sourceTree = "<group>"; };
76CDD2F11103DA6600680521 /* AccessibilityMenuListOption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityMenuListOption.h; sourceTree = "<group>"; };
79AC9216109945C80021266E /* JSCompositionEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCompositionEvent.cpp; sourceTree = "<group>"; };
79AC9217109945C80021266E /* JSCompositionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCompositionEvent.h; sourceTree = "<group>"; };
79F2F59E1091939A000D87CB /* CompositionEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CompositionEvent.cpp; sourceTree = "<group>"; };
......@@ -10605,6 +10617,12 @@
29A812240FBB9C1D00510293 /* AccessibilityListBoxOption.h */,
07B0113C1032241900FBDC33 /* AccessibilityMediaControls.cpp */,
07B0113E1032242200FBDC33 /* AccessibilityMediaControls.h */,
76CDD2EC1103DA6600680521 /* AccessibilityMenuList.cpp */,
76CDD2ED1103DA6600680521 /* AccessibilityMenuList.h */,
76CDD2EE1103DA6600680521 /* AccessibilityMenuListPopup.cpp */,
76CDD2EF1103DA6600680521 /* AccessibilityMenuListPopup.h */,
76CDD2F01103DA6600680521 /* AccessibilityMenuListOption.cpp */,
76CDD2F11103DA6600680521 /* AccessibilityMenuListOption.h */,
29A8121E0FBB9C1D00510293 /* AccessibilityObject.cpp */,
29A812180FBB9C1D00510293 /* AccessibilityObject.h */,
29A812080FBB9C1D00510293 /* AccessibilityRenderObject.cpp */,
......@@ -18376,6 +18394,9 @@
599E759011055A1F00D904FA /* Bridge.h in Headers */,
59EE122E1106080F00885116 /* JNIUtilityPrivate.h in Headers */,
59EE12321106082900885116 /* JNIUtility.h in Headers */,
76CDD2F31103DA6600680521 /* AccessibilityMenuList.h in Headers */,
76CDD2F51103DA6600680521 /* AccessibilityMenuListPopup.h in Headers */,
76CDD2F71103DA6600680521 /* AccessibilityMenuListOption.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -20543,6 +20564,9 @@
599E759211055A2A00D904FA /* Bridge.cpp in Sources */,
59EE122C1106080500885116 /* JNIUtilityPrivate.cpp in Sources */,
59EE12301106081F00885116 /* JNIUtility.cpp in Sources */,
76CDD2F21103DA6600680521 /* AccessibilityMenuList.cpp in Sources */,
76CDD2F41103DA6600680521 /* AccessibilityMenuListPopup.cpp in Sources */,
76CDD2F61103DA6600680521 /* AccessibilityMenuListOption.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -37,6 +37,9 @@
#include "AccessibilityListBox.h"
#include "AccessibilityListBoxOption.h"
#include "AccessibilityMediaControls.h"
#include "AccessibilityMenuList.h"
#include "AccessibilityMenuListPopup.h"
#include "AccessibilityMenuListOption.h"
#include "AccessibilityRenderObject.h"
#include "AccessibilitySlider.h"
#include "AccessibilityTable.h"
......@@ -141,6 +144,8 @@ AccessibilityObject* AXObjectCache::getOrCreate(RenderObject* renderer)
RefPtr<AccessibilityObject> newObj = 0;
if (renderer->isListBox())
newObj = AccessibilityListBox::create(renderer);
else if (renderer->isMenuList())
newObj = AccessibilityMenuList::create(renderer);
// If the node is aria role="list" or the aria role is empty and its a ul/ol/dl type (it shouldn't be a list if aria says otherwise).
else if (node && ((nodeIsAriaType(node, "list") || nodeIsAriaType(node, "directory"))
......@@ -209,6 +214,12 @@ AccessibilityObject* AXObjectCache::getOrCreate(AccessibilityRole role)
case SliderThumbRole: