Closed Bug 1920622 Opened 1 month ago Closed 25 days ago

Make style setters of `HTMLEditor` stop working if the editing host is for plaintext-only

Categories

(Core :: DOM: Editor, task)

task

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.

Unfortunately, (even tough we're the last implementor of this feature,) there are not editing behavior tests in web-platform tests. Therefore, this patch creates newplaintext-onlydirectory intoeditingand make the feature enabled in itsdir.ini` to check the implementing behavior with new tests.

This patch also changes how to compute the editing host (whether using <body>
or not when selection is outside it), but the new behavior (not limited in the
<body>) should work fine in the most cases and I believe that it's better
than current implementation in some methods.

Note that Chrome considers whether the style should be updated or not with
the closest inclusive ancestor of the focus node of Selection. However,
it's odd and aligning to the behavior requires bigger change. Therefore, I'd
like to implement this feature only with checking the focused editing host.

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/e22a2bcef302 Make the style setter public methods of `HTMLEditor` stop handling their jobs if the editing host is `plaintext-only` r=m_kato
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/48396 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 25 days ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: