github web-platform-tests/wpt merge_pr_48396

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
11 months ago

Make the style setter public methods of HTMLEditor stop handling their jobs if the editing host is `plaintext-only

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 new plaintext-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.

Differential Revision: https://phabricator.services.mozilla.com/D223277

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1920622
gecko-commit: e22a2bcef3024b1d2e78db9bba0a5db0387ba07f
gecko-reviewers: m_kato

Don't miss a new wpt release

NewReleases is sending notifications on new releases.