Bug 572618 - Make debugging the editor easier - Part 3: multiline version of part 2; r=roc

This commit is contained in:
Ehsan Akhgari
2010-06-17 16:40:48 -04:00
parent f32700d4f7
commit ea32707944
41 changed files with 487 additions and 968 deletions

View File

@@ -147,8 +147,7 @@ nsHTMLEditor::CreateAnonymousElement(const nsAString & aTag, nsIDOMNode * aPare
*aReturn = nsnull;
nsCOMPtr<nsIContent> parentContent( do_QueryInterface(aParentNode) );
if (!parentContent)
return NS_OK;
NS_ENSURE_TRUE(parentContent, NS_OK);
// Get the document
nsCOMPtr<nsIDOMDocument> domDoc;
@@ -166,8 +165,7 @@ nsHTMLEditor::CreateAnonymousElement(const nsAString & aTag, nsIDOMNode * aPare
NS_ENSURE_SUCCESS(res, res);
nsCOMPtr<nsIDOMElement> newElement = do_QueryInterface(newContent);
if (!newElement)
return NS_ERROR_FAILURE;
NS_ENSURE_TRUE(newElement, NS_ERROR_FAILURE);
// add the "hidden" class if needed
if (aIsCreatedHidden) {
@@ -279,10 +277,9 @@ nsHTMLEditor::CheckSelectionStateForAnonymousButtons(nsISelection * aSelection)
NS_ENSURE_ARG_POINTER(aSelection);
// early way out if all contextual UI extensions are disabled
if (!mIsObjectResizingEnabled &&
!mIsAbsolutelyPositioningEnabled &&
!mIsInlineTableEditingEnabled)
return NS_OK;
NS_ENSURE_TRUE(mIsObjectResizingEnabled ||
mIsAbsolutelyPositioningEnabled ||
mIsInlineTableEditingEnabled, NS_OK);
// Don't change selection state if we're moving.
if (mIsMoving) {