Closed Bug 761299 Opened 14 years ago Closed 14 years ago

Cleanup DeleteRangeTxn::CreateTxnsToDeleteBetween

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Details

Attachments

(1 file)

Attached patch Patch v1Splinter Review
No description provided.
Attachment #629903 - Flags: review?(ehsan)
Comment on attachment 629903 [details] [diff] [review] Patch v1 Review of attachment 629903 [details] [diff] [review]: ----------------------------------------------------------------- ::: editor/libeditor/base/DeleteRangeTxn.cpp @@ +268,2 @@ > > + child = child->GetNextSibling(); Please loop on |child|, not the child count.
Attachment #629903 - Flags: review?(ehsan) → review-
Comment on attachment 629903 [details] [diff] [review] Patch v1 Review of attachment 629903 [details] [diff] [review]: ----------------------------------------------------------------- ::: editor/libeditor/base/DeleteRangeTxn.cpp @@ +253,5 @@ > + } > + > + nsCOMPtr<nsINode> startParent = do_QueryInterface(aStartParent); > + NS_ENSURE_STATE(startParent); > + NS_ASSERTION(aEndOffset <= startParent->Length(), "bad aEndOffset"); This should actually be GetChildCount() (which doesn't make any difference)
Comment on attachment 629903 [details] [diff] [review] Patch v1 Review of attachment 629903 [details] [diff] [review]: ----------------------------------------------------------------- ::: editor/libeditor/base/DeleteRangeTxn.cpp @@ +253,5 @@ > + } > + > + nsCOMPtr<nsINode> startParent = do_QueryInterface(aStartParent); > + NS_ENSURE_STATE(startParent); > + NS_ASSERTION(aEndOffset <= startParent->Length(), "bad aEndOffset"); Right. @@ +268,2 @@ > > + child = child->GetNextSibling(); NM.
Attachment #629903 - Flags: review- → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: