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
Родитель 654799ac3b
Коммит 1e74e69eff
3 изменённых файлов: 12 добавлений и 8 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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,

Просмотреть файл

@ -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',