mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 413716. Repetitive warning in a11y, not supported for frames. r+sr=roc, a=beltzner
This commit is contained in:
parent
995066f693
commit
5bcaf32f32
@ -857,29 +857,22 @@ nsHTMLTableAccessible::GetTableNode(nsIDOMNode **_retval)
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsHTMLTableAccessible::GetTableLayout(nsITableLayout **aLayoutObject)
|
nsHTMLTableAccessible::GetTableLayout(nsITableLayout **aTableLayout)
|
||||||
{
|
{
|
||||||
*aLayoutObject = nsnull;
|
*aTableLayout = nsnull;
|
||||||
|
|
||||||
nsresult rv = NS_OK;
|
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMNode> tableNode;
|
nsCOMPtr<nsIDOMNode> tableNode;
|
||||||
rv = GetTableNode(getter_AddRefs(tableNode));
|
GetTableNode(getter_AddRefs(tableNode));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
nsCOMPtr<nsIContent> tableContent(do_QueryInterface(tableNode));
|
||||||
|
if (!tableContent) {
|
||||||
|
return NS_ERROR_FAILURE; // Table shut down
|
||||||
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIContent> content(do_QueryInterface(tableNode));
|
nsCOMPtr<nsIPresShell> shell = GetPresShell();
|
||||||
NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
nsIDocument *doc = content->GetDocument();
|
nsIFrame *frame = shell->GetPrimaryFrameFor(tableContent);
|
||||||
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
|
return frame ? CallQueryInterface(frame, aTableLayout) : 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
|
@ -341,7 +341,7 @@ public:
|
|||||||
* Returns a layout object associated with the primary frame for the content object.
|
* 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 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,
|
NS_IMETHOD GetLayoutObjectFor(nsIContent* aContent,
|
||||||
nsISupports** aResult) const = 0;
|
nsISupports** aResult) const = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user