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)
Core
DOM: Editor
Tracking
()
NEW
People
(Reporter: ehsan.akhgari, Unassigned)
Details
Attachments
(1 file)
2.01 KB,
patch
|
masayuki
:
review-
|
Details | Diff | Splinter Review |
No code ever reads the result of these assignments.
Reporter | ||
Comment 1•8 years ago
|
||
Attachment #8905342 -
Flags: review?(masayuki)
Comment 2•8 years ago
|
||
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-
Comment 3•8 years ago
|
||
I forget to omit |both|. only parentNode may be referred.
Updated•8 years ago
|
Priority: -- → P3
Comment 4•4 years ago
|
||
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.
Description
•