Closed Bug 1849080 Opened 1 years ago Closed 1 years ago

Make `HTMLEditor::MaybeCreatePaddingBRElementForEmptyEditor()` does not start handling a top level edit sub-action until it does something

Categories

(Core :: DOM: Editor, task, P3)

task

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

Attachments

(1 file)

In most cases, HTMLEditor::MaybeCreatePaddingBRElementForEmptyEditor() does nothing especially when the <body> does not have contenteditable nor it's in the designMode or the <body> has some meaningful children. Fortunately, it can be considered before stating the top level edit sub-action.

It does nothing in most cases because it inserts a <br> element only when
the editable <body> does not have meaningful content. Therefore, we can
make it put off to create AutoEditSubActionNotifier to save the cost of
some expensive things done by OnStartToHandleTopLevelEditSubAction() and
OnEndHandlingTopLevelEditSubAction().

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/694e22aa7d22 Make `HTMLEditor::MaybeCreatePaddingBRElementForEmptyEditor()` start a top level edit sub-action when it considers to modify the DOM tree r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 1 years ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
Whiteboard: [sp3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: