Closed Bug 1548751 Opened 4 months ago Closed 4 months ago

Make TextEditRules::WillSetText() use fast path even with <textarea>

Categories

(Core :: Editor, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox66 --- wontfix
firefox67 --- wontfix
firefox68 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently, TextEditRules::WillSetText() uses fast path only when it's for an <input> element. We should allow it use the fast path even when it's for <textarea> element which puts moz-<br> element after a text node.

This is a simple mistake of MOZ_ASSERTION() in it. When mParent is a node
which can have children, mChild should be non-nullptr or mOffset should
/ be set to the end of mParent. But when mParent is not a container, any
mOffset value should be allowed.

Attachment #9062900 - Attachment description: Bug 1548751 - part 1: The constructor of EditorDOMPointBase which takes all information should allow non-end point of text node → Bug 1548751 - Make TextEditRules::WillSetText() use fast path even if it's for <textarea> element
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/88ce0c2df4d2
Make TextEditRules::WillSetText() use fast path even if it's for <textarea> element r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.