mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 762430 - Fix uninitialized nsresult in nsHTMLEditor::AbsolutelyPositionElement; r=ehsan
This commit is contained in:
parent
19175c3318
commit
8f33d48265
@ -489,7 +489,6 @@ nsHTMLEditor::AbsolutelyPositionElement(nsIDOMElement * aElement,
|
||||
return NS_OK;
|
||||
|
||||
nsAutoEditBatch batchIt(this);
|
||||
nsresult res;
|
||||
|
||||
if (aEnabled) {
|
||||
PRInt32 x, y;
|
||||
@ -512,11 +511,11 @@ nsHTMLEditor::AbsolutelyPositionElement(nsIDOMElement * aElement,
|
||||
nsINode* parentNode = element->GetNodeParent();
|
||||
if (parentNode->GetChildCount() == 1) {
|
||||
nsCOMPtr<nsIDOMNode> brNode;
|
||||
res = CreateBR(parentNode->AsDOMNode(), 0, address_of(brNode));
|
||||
nsresult res = CreateBR(parentNode->AsDOMNode(), 0, address_of(brNode));
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
}
|
||||
}
|
||||
else {
|
||||
res = NS_OK;
|
||||
mHTMLCSSUtils->RemoveCSSProperty(aElement,
|
||||
nsEditProperty::cssPosition,
|
||||
EmptyString(), false);
|
||||
@ -543,12 +542,13 @@ nsHTMLEditor::AbsolutelyPositionElement(nsIDOMElement * aElement,
|
||||
if (element && element->IsHTML(nsGkAtoms::div) && !HasStyleOrIdOrClass(element)) {
|
||||
nsHTMLEditRules* htmlRules = static_cast<nsHTMLEditRules*>(mRules.get());
|
||||
NS_ENSURE_TRUE(htmlRules, NS_ERROR_FAILURE);
|
||||
res = htmlRules->MakeSureElemStartsOrEndsOnCR(aElement);
|
||||
nsresult res = htmlRules->MakeSureElemStartsOrEndsOnCR(aElement);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
res = RemoveContainer(aElement);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
Loading…
Reference in New Issue
Block a user