Bug 705280 - (2/2) Custom quickstub nsIDOMHTMLDocument.head and change nsIDOMHTMLDocument.body custom quickstub. r=mrbkap

This commit is contained in:
Boris Zbarsky 2011-11-29 17:32:31 +01:00
parent 477f1cb570
commit 947ce13fde
3 changed files with 12 additions and 8 deletions

View File

@ -1293,12 +1293,10 @@ nsHTMLDocument::GetURL(nsAString& aURL)
}
nsIContent*
nsHTMLDocument::GetBody(nsresult *aResult)
nsHTMLDocument::GetBody()
{
Element* body = GetBodyElement();
*aResult = NS_OK;
if (body) {
// There is a body element, return that as the body.
return body;
@ -1317,10 +1315,9 @@ nsHTMLDocument::GetBody(nsIDOMHTMLElement** aBody)
{
*aBody = nsnull;
nsresult rv;
nsIContent *body = GetBody(&rv);
nsIContent *body = GetBody();
return body ? CallQueryInterface(body, aBody) : rv;
return body ? CallQueryInterface(body, aBody) : NS_OK;
}
NS_IMETHODIMP

View File

@ -135,7 +135,8 @@ public:
nsWrapperCache **aCache,
nsresult *aResult);
nsIContent *GetBody(nsresult *aResult);
nsIContent *GetBody();
Element *GetHead() { return GetHeadElement(); }
already_AddRefed<nsContentList> GetElementsByName(const nsAString & aName)
{
return NS_GetFuncStringContentList(this, MatchNameAttribute, nsnull,

View File

@ -651,7 +651,13 @@ customMethodCalls = {
},
'nsIDOMHTMLDocument_GetBody': {
'thisType': 'nsHTMLDocument',
'code': ' nsIContent *result = self->GetBody(&rv);'
'code': ' nsIContent *result = self->GetBody();',
'canFail': False
},
'nsIDOMHTMLDocument_GetHead': {
'thisType': 'nsHTMLDocument',
'code': ' nsIContent *result = self->GetHead();',
'canFail': False
},
'nsIDOMHTMLDocument_GetElementsByName': {
'thisType': 'nsHTMLDocument',