Bug 633750 - deCOM nsIHTMLEditRules and move methods to nsHTMLEditRules. r=ehsan

This commit is contained in:
Sebastian Kromp
2011-05-07 10:04:56 +02:00
parent 367ad1e63f
commit 6132418058
5 changed files with 23 additions and 91 deletions

View File

@@ -50,7 +50,7 @@
#include "nsEditorUtils.h"
#include "nsHTMLEditUtils.h"
#include "nsTextEditRules.h"
#include "nsIHTMLEditRules.h"
#include "nsHTMLEditRules.h"
#include "nsIDOMHTMLElement.h"
#include "nsIDOMNSHTMLElement.h"
@@ -595,7 +595,7 @@ nsHTMLEditor::AbsolutelyPositionElement(nsIDOMElement * aElement,
res = HasStyleOrIdOrClass(aElement, &hasStyleOrIdOrClass);
NS_ENSURE_SUCCESS(res, res);
if (!hasStyleOrIdOrClass && nsHTMLEditUtils::IsDiv(aElement)) {
nsCOMPtr<nsIHTMLEditRules> htmlRules = do_QueryInterface(mRules);
nsHTMLEditRules* htmlRules = static_cast<nsHTMLEditRules*>(mRules.get());
NS_ENSURE_TRUE(htmlRules, NS_ERROR_FAILURE);
res = htmlRules->MakeSureElemStartsOrEndsOnCR(aElement);
NS_ENSURE_SUCCESS(res, res);