Closed Bug 1453872 Opened 3 years ago Closed 3 years ago

HTMLEditRules::JoinNodesSmart() doesn't set initial result correctly

Categories

(Core :: DOM: Editor, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox-esr52 --- unaffected
firefox59 --- wontfix
firefox60 --- fixed
firefox61 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: regression)

Attachments

(2 files)

This is regression of bug 1423835.

If HTMLEditRules::JoinNodesSmart() joins aLeftNode and aRightNode actually, children of aLeftNode are inserted before first child of aRightNode and returns the point of old first node of aRightNode as its result.

However, after fixing bug 1423835, it returns point at nth child of new aRightNode, nth is length of old right node children.

I'm not sure how to get actual symptom though.
Fortunately, we've already gotten an actual bug report with STR. I'll add automated test for this.
Attachment #8967664 - Flags: review?(m_kato) → review-
Comment on attachment 8967664 [details]
Bug 1453872 - Make HTMLEditRules::JoinNodesSmart() return { aRightNode - aLeftNode.Length() } by default

https://reviewboard.mozilla.org/r/236394/#review242494
Attachment #8967664 - Flags: review?(m_kato) → review+
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/bc6e8d505359
Make HTMLEditRules::JoinNodesSmart() return { aRightNode - aLeftNode.Length() } by default r=m_kato
Priority: -- → P1
Duplicate of this bug: 1451662
https://hg.mozilla.org/mozilla-central/rev/bc6e8d505359
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Approval Request Comment
[Feature/Bug causing the regression]:
Regression of bug 1423835.

[User impact if declined]:
User will see odd crate position when removing <br> element with Delete or Backspace.

[Is this code covered by automated tests?]:
Yes.

[Has the fix been verified in Nightly?]:
Not yet, but new automated test passed on m-c.

[Needs manual test from QE? If yes, steps to reproduce]: 
No.

[List of other uplifts needed for the feature/fix]:
None.

[Is the change risky?]:
No.

[Why is the change risky/not risky?]:
This is one line backing out.

[String changes made/needed]:
No.
Attachment #8968139 - Flags: approval-mozilla-beta?
Comment on attachment 8968139 [details] [diff] [review]
Patch for Beta (only changes manifest file of wpt)

editor regression fix, approved for 60.0b13
Attachment #8968139 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Duplicate of this bug: 1460273
You need to log in before you can comment on or make changes to this bug.