Bug 935572 - remove nsIAccessibleHyperLink::selected, r=tbsaunde

This commit is contained in:
Alexander Surkov 2013-11-06 21:07:10 -05:00
parent 851bde9eb2
commit 5a9b5f173a
4 changed files with 1 additions and 45 deletions

View File

@ -13,7 +13,7 @@ interface nsIAccessible;
* A cross-platform interface that supports hyperlink-specific properties and
* methods. Anchors, image maps, xul:labels with class="text-link" implement this interface.
*/
[scriptable, uuid(38c60bfa-6040-4bfe-93f2-acd6a909bb60)]
[scriptable, uuid(883643d4-93a5-4f32-922c-6f06e01363c1)]
interface nsIAccessibleHyperLink : nsISupports
{
/**
@ -38,16 +38,6 @@ interface nsIAccessibleHyperLink : nsISupports
*/
readonly attribute boolean valid;
/**
* Determines whether the element currently has the focus, e. g. after
* returning from the destination page.
*
* @note ARIA links can only be focused if they have the tabindex
* attribute set. Also, state_focused should then be set on the accessible
* for this link.
*/
readonly attribute boolean selected;
/**
* The numbber of anchors within this Hyperlink. Is normally 1 for anchors.
* This anchor is, for example, the visible output of the html:a tag.

View File

@ -2425,21 +2425,6 @@ Accessible::GetValid(bool *aValid)
return NS_OK;
}
// readonly attribute boolean nsIAccessibleHyperLink::selected
NS_IMETHODIMP
Accessible::GetSelected(bool *aSelected)
{
NS_ENSURE_ARG_POINTER(aSelected);
*aSelected = false;
if (IsDefunct())
return NS_ERROR_FAILURE;
*aSelected = IsLinkSelected();
return NS_OK;
}
void
Accessible::AppendTextTo(nsAString& aText, uint32_t aStartOffset,
uint32_t aLength)
@ -2779,14 +2764,6 @@ Accessible::EndOffset()
return hyperText ? (hyperText->GetChildOffset(this) + 1) : 0;
}
bool
Accessible::IsLinkSelected()
{
NS_PRECONDITION(IsLink(),
"IsLinkSelected() called on something that is not a hyper link!");
return FocusMgr()->IsFocused(this);
}
uint32_t
Accessible::AnchorCount()
{

View File

@ -629,11 +629,6 @@ public:
return (0 == (State() & mozilla::a11y::states::INVALID));
}
/**
* Return true if the link currently has the focus.
*/
bool IsLinkSelected();
/**
* Return the number of anchors within the link.
*/

View File

@ -21,9 +21,6 @@ function focusLink(aID, aSelectedAfter)
this.invoke = function focusLink_invoke()
{
is(this.accessible.selected, false,
"Wrong selected state before focus for ID " + prettyName(aID) + "!");
var expectedStates = (aSelectedAfter ? STATE_FOCUSABLE : 0);
var unexpectedStates = (!aSelectedAfter ? STATE_FOCUSABLE : 0) | STATE_FOCUSED;
testStates(aID, expectedStates, 0, unexpectedStates, 0);
@ -33,9 +30,6 @@ function focusLink(aID, aSelectedAfter)
this.finalCheck = function focusLink_finalCheck()
{
is(this.accessible.selected, aSelectedAfter,
"Wrong seleccted state after focus for ID " + prettyName(aID) + "!");
var expectedStates = (aSelectedAfter ? STATE_FOCUSABLE | STATE_FOCUSED : 0);
var unexpectedStates = (!aSelectedAfter ? STATE_FOCUSABLE | STATE_FOCUSED : 0);
testStates(aID, expectedStates, 0, unexpectedStates, 0);