mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 762430 - Fix uninitialized nsresult in nsHTMLEditor::AbsolutelyPositionElement; r=ehsan
This commit is contained in:
parent
a9cd8feaa1
commit
83c8a8199f
@ -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