Closed
Bug 1401225
Opened 9 years ago
Closed 9 years ago
EditorBase::SetTextImpl() uses the wrong length when collapsing the selection
Categories
(Core :: DOM: Editor, defect)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
mozilla57
| Tracking | Status | |
|---|---|---|
| firefox-esr52 | --- | unaffected |
| firefox55 | --- | unaffected |
| firefox56 | --- | unaffected |
| firefox57 | + | fixed |
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
(Keywords: regression)
Attachments
(1 file)
|
1.09 KB,
patch
|
masayuki
:
review+
|
Details | Diff | Splinter Review |
I discovered this because of try server failures of my patch for bug 1399722. Before that patch we didn't run this block of code, but the length I was passing here is wrong: <https://searchfox.org/mozilla-central/rev/1c13d5cf85f904afb8976c02a80daa252b893fca/editor/libeditor/EditorBase.cpp#2749>
This length is set in the beginning of the function to the length of the old text content of the text node <https://searchfox.org/mozilla-central/rev/1c13d5cf85f904afb8976c02a80daa252b893fca/editor/libeditor/EditorBase.cpp#2716>
But then we modify the text content here: <https://searchfox.org/mozilla-central/rev/1c13d5cf85f904afb8976c02a80daa252b893fca/editor/libeditor/EditorBase.cpp#2741>
The old code used to do the right thing: <https://hg.mozilla.org/integration/mozilla-inbound/rev/baeb2b439c08#l3.61>
Comment 1•9 years ago
|
||
tracking as new regression in 57
| Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8909905 -
Flags: review?(masayuki)
Updated•9 years ago
|
Attachment #8909905 -
Flags: review?(masayuki) → review+
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4d924f659b8c
Pass the correct length when collapsing the selection in EditorBase::SetTextImpl(); r=masayuki
Comment 4•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•