Open Bug 1925442 Opened 8 days ago Updated 8 days ago

Make `HTMLEditor::OnEndHandlingTopLevelEditSubActionInternal` stop joining adjacent `Text` nodes

Categories

(Core :: DOM: Editor, task)

task

Tracking

()

ASSIGNED

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 2 open bugs)

Details

When inserting a line break in preformatted text, Chrome inserts new Text node which contains only \n. Although when you type text at an empty line, text is inserted to the \n only text node, but this approach must be reasonable to keep Text nodes smaller as far as possible and keep faster updating of the data. However, currently, we join adjacent Text nodes in OnEndHandlingTopLevelEditSubActionInternal at end of handling the topmost edit subaction except when inserting text. Therefore, the split Text nodes may be joined at deletion, etc. So, we cannot follow Chrome's behavior with keeping this post-processing.

I think that we can simply stop doing this in the post-processing because our handlers do not assume there is only one Text node at each editing target. However, I guess we need to clean it up empty Text nodes for saving the footprint.

Summary: Make `HTMLEditor::OnEndHandlingTopLevelEditSubActionInternal` stop join adjacent `Text` nodes → Make `HTMLEditor::OnEndHandlingTopLevelEditSubActionInternal` stop joining adjacent `Text` nodes
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
You need to log in before you can comment on or make changes to this bug.