mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 380669. More states for HTML option accessibles. r=surkov
This commit is contained in:
parent
21495439b2
commit
01b65aa1a4
@ -593,15 +593,11 @@ nsIFrame* nsHTMLSelectOptionAccessible::GetBoundsFrame()
|
||||
NS_IMETHODIMP
|
||||
nsHTMLSelectOptionAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
|
||||
{
|
||||
*aState = 0;
|
||||
if (aExtraState) {
|
||||
*aExtraState = 0;
|
||||
}
|
||||
if (!mDOMNode) {
|
||||
if (aExtraState) {
|
||||
*aExtraState = nsIAccessibleStates::EXT_STATE_DEFUNCT;
|
||||
}
|
||||
return NS_OK;
|
||||
// Upcall to nsAccessible, but skip nsHyperTextAccessible impl
|
||||
// because we don't want EXT_STATE_EDITABLE or EXT_STATE_SELECTABLE_TEXT
|
||||
nsresult rv = nsAccessible::GetState(aState, aExtraState);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
PRUint32 selectState;
|
||||
@ -632,6 +628,9 @@ nsHTMLSelectOptionAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
|
||||
*aState |= nsIAccessibleStates::STATE_OFFSCREEN;
|
||||
}
|
||||
else {
|
||||
// XXX list frames are weird, don't rely on nsAccessible's general
|
||||
// visibility implementation unless they get reimplemented in layout
|
||||
*aState &= ~nsIAccessibleStates::STATE_OFFSCREEN;
|
||||
// <select> is not collapsed: compare bounds to calculate STATE_OFFSCREEN
|
||||
nsCOMPtr<nsIAccessible> listAccessible = GetParent();
|
||||
if (listAccessible) {
|
||||
|
Loading…
Reference in New Issue
Block a user