Closed Bug 1407352 Opened 7 years ago Closed 7 years ago

Avoid calling GetChildAt() in DeleteRangeTransaction::CreateTxnsToDeleteBetween()

Categories

(Core :: DOM: Editor, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → ehsan
Blocks: 651120
Comment on attachment 8917083 [details] [diff] [review] Avoid calling GetChildAt() in DeleteRangeTransaction::CreateTxnsToDeleteBetween() >@@ -148,17 +151,17 @@ DeleteRangeTransaction::CreateTxnsToDeleteBetween(nsINode* aNode, > // So, the transaction shouldn't be recorded. > if (NS_WARN_IF(!deleteTextTransaction->CanDoIt())) { > return NS_ERROR_FAILURE; > } > AppendChild(deleteTextTransaction); > return NS_OK; > } > >- nsCOMPtr<nsIContent> child = aNode->GetChildAt(aStartOffset); >+ nsCOMPtr<nsIContent> child = aChildAtStartOffset; |child| is used only for initializing DeleteNodeTransaction() and calling GetNextSibling(). So, this can be nsIContent*.
Attachment #8917083 - Flags: review?(masayuki) → review+
Pushed by eakhgari@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/ccda121ca4b1 Avoid calling GetChildAt() in DeleteRangeTransaction::CreateTxnsToDeleteBetween(); r=masayuki
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: