зеркало из https://github.com/mozilla/pjs.git
Bug 356829. Do not expose table layout-guess=true when table is inside editable area. r=ginn.chen
This commit is contained in:
Родитель
8a65d9ef26
Коммит
538103114f
|
@ -228,6 +228,9 @@ nsDocAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
|
|||
if (!editor) {
|
||||
*aState |= nsIAccessibleStates::STATE_READONLY;
|
||||
}
|
||||
else if (aExtraState) {
|
||||
*aExtraState |= nsIAccessibleStates::EXT_STATE_EDITABLE;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -785,6 +785,15 @@ NS_IMETHODIMP nsHTMLTableAccessible::IsProbablyForLayout(PRBool *aIsProbablyForL
|
|||
return NS_ERROR_FAILURE; // Table shut down
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAccessible> docAccessible = do_QueryInterface(nsCOMPtr<nsIAccessibleDocument>(GetDocAccessible()));
|
||||
if (docAccessible) {
|
||||
PRUint32 state, extState;
|
||||
docAccessible->GetFinalState(&state, &extState);
|
||||
if (extState & nsIAccessibleStates::EXT_STATE_EDITABLE) { // Need to see all elements while document is being edited
|
||||
RETURN_LAYOUT_ANSWER(PR_FALSE, "In editable document");
|
||||
}
|
||||
}
|
||||
|
||||
// Check role and role attribute
|
||||
PRBool hasNonTableRole = (Role(this) != nsIAccessibleRole::ROLE_TABLE);
|
||||
if (hasNonTableRole) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче