deCOMtaminate nsIDocument by changing methods to use return value instead of out-params, eliminating unused nsresult return values, moving some members to nsIDocument and inlining the getters/setters. Bug 222134, r=bzbarsky, sr=jst.

git-svn-id: svn://10.0.0.236/trunk@148257 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%brianryner.com
2003-10-22 06:09:48 +00:00
parent 591ecd0363
commit eeddf02bde
193 changed files with 1493 additions and 2706 deletions

View File

@@ -402,9 +402,7 @@ nsHTMLEditor::ShowResizers(nsIDOMElement *aResizedElement)
nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
if (!doc) return NS_ERROR_NULL_POINTER;
nsCOMPtr<nsIScriptGlobalObject> global;
res = doc->GetScriptGlobalObject(getter_AddRefs(global));
if (NS_FAILED(res)) return res;
nsIScriptGlobalObject *global = doc->GetScriptGlobalObject();
if (!global) { return NS_ERROR_NULL_POINTER; }
mResizeEventListenerP = new DocumentResizeEventListener(this);
@@ -476,9 +474,7 @@ nsHTMLEditor::HideResizers(void)
GetDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
if (!doc) { return NS_ERROR_NULL_POINTER; }
nsCOMPtr<nsIScriptGlobalObject> global;
res = doc->GetScriptGlobalObject(getter_AddRefs(global));
if (NS_FAILED(res)) return res;
nsIScriptGlobalObject *global = doc->GetScriptGlobalObject();
if (!global) { return NS_ERROR_NULL_POINTER; }
nsCOMPtr<nsIDOMEventTarget> target = do_QueryInterface(global);
@@ -686,9 +682,7 @@ nsHTMLEditor::SetResizingInfoPosition(PRInt32 aX, PRInt32 aY, PRInt32 aW, PRInt3
return NS_ERROR_UNEXPECTED;
// get the root content
nsCOMPtr<nsIContent> rootContent;
doc->GetRootContent(getter_AddRefs(rootContent));
nsCOMPtr<nsIDOMNSHTMLElement> nsElement = do_QueryInterface(rootContent);
nsCOMPtr<nsIDOMNSHTMLElement> nsElement = do_QueryInterface(doc->GetRootContent());
if (!nsElement) {return NS_ERROR_NULL_POINTER; }
// let's get the size of the document