зеркало из https://github.com/mozilla/gecko-dev.git
Bug 413716. Repetitive warning in a11y, not supported for frames. r+sr=roc, a=beltzner
This commit is contained in:
Родитель
995066f693
Коммит
5bcaf32f32
|
@ -857,29 +857,22 @@ nsHTMLTableAccessible::GetTableNode(nsIDOMNode **_retval)
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsHTMLTableAccessible::GetTableLayout(nsITableLayout **aLayoutObject)
|
||||
nsHTMLTableAccessible::GetTableLayout(nsITableLayout **aTableLayout)
|
||||
{
|
||||
*aLayoutObject = nsnull;
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
*aTableLayout = nsnull;
|
||||
|
||||
nsCOMPtr<nsIDOMNode> tableNode;
|
||||
rv = GetTableNode(getter_AddRefs(tableNode));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
GetTableNode(getter_AddRefs(tableNode));
|
||||
nsCOMPtr<nsIContent> tableContent(do_QueryInterface(tableNode));
|
||||
if (!tableContent) {
|
||||
return NS_ERROR_FAILURE; // Table shut down
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(tableNode));
|
||||
NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsIPresShell> shell = GetPresShell();
|
||||
NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE);
|
||||
|
||||
nsIDocument *doc = content->GetDocument();
|
||||
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
|
||||
|
||||
nsIPresShell *presShell = doc->GetPrimaryShell();
|
||||
|
||||
nsCOMPtr<nsISupports> layoutObject;
|
||||
rv = presShell->GetLayoutObjectFor(content, getter_AddRefs(layoutObject));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return CallQueryInterface(layoutObject, aLayoutObject);
|
||||
nsIFrame *frame = shell->GetPrimaryFrameFor(tableContent);
|
||||
return frame ? CallQueryInterface(frame, aTableLayout) : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -341,7 +341,7 @@ public:
|
|||
* Returns a layout object associated with the primary frame for the content object.
|
||||
*
|
||||
* @param aContent the content object for which we seek a layout object
|
||||
* @param aResult the resulting layout object as an nsISupports, if found. Refcounted.
|
||||
* @param aResult the resulting layout object as an nsISupports, if found.
|
||||
*/
|
||||
NS_IMETHOD GetLayoutObjectFor(nsIContent* aContent,
|
||||
nsISupports** aResult) const = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче