Closed Bug 828169 Opened 11 years ago Closed 11 years ago

Don't use nsIDOMNode in editor transactions

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: dzbarsky, Assigned: dzbarsky)

References

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
      No description provided.
Attachment #699603 - Flags: review?(ehsan)
Comment on attachment 699603 [details] [diff] [review]
Patch

Review of attachment 699603 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for doing this!

::: editor/libeditor/base/CreateElementTxn.cpp
@@ +12,5 @@
>  #include "nsEditor.h"
>  #include "nsError.h"
>  #include "nsIContent.h"
>  #include "nsIDOMCharacterData.h"
> +#include "nsEditor.h"

nsEditor.h is already #included 5 lines above.  :-)

::: editor/libeditor/base/InsertElementTxn.cpp
@@ +9,5 @@
>  #include "nsAString.h"
>  #include "nsDebug.h"                    // for NS_ENSURE_TRUE, etc
>  #include "nsError.h"                    // for NS_ERROR_NULL_POINTER, etc
>  #include "nsIContent.h"                 // for nsIContent
> +#include "nsEditor.h"                   // for nsEditor

Nit: please sort alphabetically.

::: editor/libeditor/base/JoinElementTxn.cpp
@@ +11,5 @@
>  #include "nsEditor.h"                   // for nsEditor
>  #include "nsError.h"                    // for NS_ERROR_NULL_POINTER, etc
>  #include "nsIDOMCharacterData.h"        // for nsIDOMCharacterData
>  #include "nsIEditor.h"                  // for nsEditor::IsModifiableNode
> +#include "nsIContent.h"                 // for nsIContent

Nit: please sort alphabetically.

::: editor/libeditor/base/SplitElementTxn.cpp
@@ +10,5 @@
>  #include "nsDebug.h"                    // for NS_ASSERTION, etc
>  #include "nsEditor.h"                   // for nsEditor
>  #include "nsError.h"                    // for NS_ERROR_NOT_INITIALIZED, etc
>  #include "nsIDOMCharacterData.h"        // for nsIDOMCharacterData
> +#include "nsIContent.h"                 // for nsIContent

Nit: please sort alphabetically.

::: editor/libeditor/base/nsEditor.h
@@ +172,5 @@
>    void NotifyEditorObservers();
>  
>    /* ------------ nsIEditor methods -------------- */
>    NS_DECL_NSIEDITOR
> +  nsresult MarkNodeDirty(nsINode* aNode);

Nit: please move this further down, so that it doesn't get confused with other nsIEditor members.
Attachment #699603 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/c0f31a982bd4
https://hg.mozilla.org/mozilla-central/rev/d871d0b90977
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Depends on: 1015433
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: