mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Try to fix orange from e2c5f6be2148
--HG-- extra : rebase_source : 148d9a1eef794af433373002effd47c12cce6e1c
This commit is contained in:
parent
7caac1e81b
commit
00ea1d430a
@ -1578,10 +1578,12 @@ nsHTMLDocument::GetURL(nsAString& aURL)
|
||||
}
|
||||
|
||||
nsIContent*
|
||||
nsHTMLDocument::GetBody()
|
||||
nsHTMLDocument::GetBody(nsresult *aResult)
|
||||
{
|
||||
Element* body = GetBodyElement();
|
||||
|
||||
*aResult = NS_OK;
|
||||
|
||||
if (body) {
|
||||
// There is a body element, return that as the body.
|
||||
return body;
|
||||
@ -1599,20 +1601,24 @@ nsHTMLDocument::GetBody()
|
||||
NS_LITERAL_STRING("frameset"));
|
||||
}
|
||||
|
||||
return nodeList ? nodeList->GetNodeAt(0) : nsnull;
|
||||
if (!nodeList) {
|
||||
*aResult = NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
return nodeList->GetNodeAt(0);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetBody(nsIDOMHTMLElement** aBody)
|
||||
{
|
||||
nsIContent *body = GetBody();
|
||||
if (!body) {
|
||||
*aBody = nsnull;
|
||||
*aBody = nsnull;
|
||||
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsresult rv;
|
||||
nsIContent *body = GetBody(&rv);
|
||||
|
||||
return CallQueryInterface(body, aBody);
|
||||
return body ? CallQueryInterface(body, aBody) : rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -160,7 +160,7 @@ public:
|
||||
nsIDOMNodeList **_retval);
|
||||
virtual nsresult GetDocumentAllResult(const nsAString& aID,
|
||||
nsISupports** aResult);
|
||||
nsIContent *GetBody();
|
||||
nsIContent *GetBody(nsresult *aResult);
|
||||
already_AddRefed<nsContentList> GetElementsByName(const nsAString & aName)
|
||||
{
|
||||
nsString* elementNameData = new nsString(aName);
|
||||
|
@ -648,8 +648,7 @@ customMethodCalls = {
|
||||
},
|
||||
'nsIDOMHTMLDocument_GetBody': {
|
||||
'thisType': 'nsHTMLDocument',
|
||||
'code': ' nsIContent *result = self->GetBody();',
|
||||
'canFail': False
|
||||
'code': ' nsIContent *result = self->GetBody(&rv);'
|
||||
},
|
||||
'nsIDOMHTMLDocument_GetElementsByName': {
|
||||
'thisType': 'nsHTMLDocument',
|
||||
|
Loading…
Reference in New Issue
Block a user