зеркало из https://github.com/mozilla/pjs.git
Bug 705280 - (2/2) Custom quickstub nsIDOMHTMLDocument.head and change nsIDOMHTMLDocument.body custom quickstub. r=mrbkap
This commit is contained in:
Родитель
41700a0a6d
Коммит
f30b4e424f
|
@ -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',
|
||||
|
|
Загрузка…
Ссылка в новой задаче