Cleanup DeleteRangeTxn::CreateTxnsToDeleteBetween

RESOLVED FIXED in mozilla16

Status

()

Core
Editor
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

Trunk
mozilla16
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 629903 [details] [diff] [review]
Patch v1
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-
(Assignee)

Comment 2

5 years ago
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+
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/42c17eb4789a
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
You need to log in before you can comment on or make changes to this bug.