Backout Bug 942650 - Some toolbars have unknown accessible role or worse - to fix commit message DONTBUILD

This commit is contained in:
Alexander Surkov 2013-12-05 11:03:48 -05:00
parent dbf14faee2
commit 7a701dfeb9
5 changed files with 16 additions and 19 deletions

View File

@ -1006,8 +1006,8 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
}
}
// XBL bindings may use @role attribute to point the accessible type
// they belong to.
// Elements may implement nsIAccessibleProvider via XBL. This allows them to
// say what kind of accessible to create.
newAcc = CreateAccessibleByType(content, document);
// Any XUL box can be used as tabpanel, make sure we create a proper

View File

@ -178,7 +178,8 @@ private:
void Shutdown();
/**
* Create accessible for the element having XBL bindings.
* Create accessible for the element implementing nsIAccessibleProvider
* interface.
*/
already_AddRefed<Accessible>
CreateAccessibleByType(nsIContent* aContent, DocAccessible* aDoc);

View File

@ -75,7 +75,10 @@ public:
/**
* A tabpanel object, child elements of xul:tabpanels element.
* A tabpanel object, child elements of xul:tabpanels element. Note,the object
* is created from nsAccessibilityService::GetAccessibleForDeckChildren()
* method and we do not use nsIAccessibleProvider interface here because
* all children of xul:tabpanels element acts as xul:tabpanel element.
*
* XXX: we need to move the class logic into generic class since
* for example we do not create instance of this class for XUL textbox used as

View File

@ -3,17 +3,9 @@
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
type="text/css"?>
<!-- Firefox toolbar -->
<?xml-stylesheet href="chrome://browser/content/browser.css"
type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="Accessible XUL checkbox and radio hierarchy tests">
<!-- Firefox toolbar -->
<script type="application/javascript"
src="chrome://browser/content/browser.js"/>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
@ -84,9 +76,6 @@
testAccessibleTree("toolbar2", accTree);
if (!SEAMONKEY)
testAccessibleTree("tb_customizable", { TOOLBAR: [] });
SimpleTest.finish()
}
@ -121,8 +110,6 @@
<toolbar id="toolbar2" toolbarname="2nd" aria-label="My second toolbar">
<toolbarbutton id="button2" label="hello"/>
</toolbar>
<toolbar id="tb_customizable" customizable="true"/>
</vbox>
</hbox>

View File

@ -8,13 +8,19 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="toolbar" role="xul:toolbar">
<binding id="toolbar">
<resources>
<stylesheet src="chrome://global/skin/toolbar.css"/>
</resources>
<implementation>
<implementation implements="nsIAccessibleProvider">
<field name="overflowedDuringConstruction">null</field>
<property name="accessibleType" readonly="true">
<getter>
return Components.interfaces.nsIAccessibleProvider.XULToolbar;
</getter>
</property>
<constructor><![CDATA[
let scope = {};
Cu.import("resource:///modules/CustomizableUI.jsm", scope);