Open Bug 1397580 Opened 8 years ago Updated 4 years ago

Remove some write-only variable assignments in HTMLEditor::DoInsertHTMLWithContext()

Categories

(Core :: DOM: Editor, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: ehsan.akhgari, Unassigned)

Details

Attachments

(1 file)

No code ever reads the result of these assignments.
Comment on attachment 8905342 [details] [diff] [review] Remove some write-only variable assignments in HTMLEditor::DoInsertHTMLWithContext() >@@ -553,20 +553,16 @@ HTMLEditor::DoInsertHTMLWithContext(const nsAString& aInputString, > bDidInsert = true; > insertedContextParent = parent; > lastInsertNode = GetChildAt(parentNode, offsetOfNewNode); > } > } > curNode = parent; > } > } >- if (lastInsertNode) { >- parentNode = GetNodeLocation(lastInsertNode, &offsetOfNewNode); >- offsetOfNewNode++; >- } I don't understand this change. Here is in a for loop: https://searchfox.org/mozilla-central/rev/44c693914255638d74bcf1ec3b0bcd448dfab2fd/editor/libeditor/HTMLEditorDataTransfer.cpp#440,565 And both parentNode may be referred in next time. https://searchfox.org/mozilla-central/rev/44c693914255638d74bcf1ec3b0bcd448dfab2fd/editor/libeditor/HTMLEditorDataTransfer.cpp#440,460,462,483-484 So, looks like that this breaks something.
Attachment #8905342 - Flags: review?(masayuki) → review-
I forget to omit |both|. only parentNode may be referred.
Priority: -- → P3

Bulk-downgrade of unassigned, >=3 years untouched DOM/Storage bug's priority.

If you have reason to believe this is wrong, please write a comment and ni :jstutte.

Severity: normal → S4
Priority: P3 → P5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: