Closed Bug 1730429 Opened 3 years ago Closed 3 years ago

Strip inline parents if an inline element becomes empty

Categories

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

defect

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Blink removes inline parent elements when an inline element becomes empty. However, Gecko does not do it. For web-compat, we should align the behavior to Blink.

Currently, Blink/WebKit strip an inline element becoming empty and its parents
which also becomes empty. However, some tests in editing/run/delete.js and
editing/run/forwarddelete.js are not consistent with the fact.

Additionally, even after deleting parent inline elements, the style should be
preserved for next edit, but there are no tests for it. Therefore, this patch
adds tests for the case into multitest.js.

This change makes deletion of all contents in inline elements compatible with
the other browsers.

Depends on D125368

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/53cd8ff916d5
part 1: Update WPT in the case that an inline element becomes empty r=m_kato
https://hg.mozilla.org/integration/autoland/rev/f895a0b6c0e3
part 2: Delete empty inline elements which become newly empty but preserve the styles for next editing r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/30878 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Regressions: 1747008
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: