Summary: Make HTML editor respect CSS display property when it considers
whether an element is "inline" or "block". The other browsers refer the
style except when they handle specific commands such as "formatBlock",
"removeFormat", "indent", "outdent", "insertOrderedList" and
"insertUnorderedList" which we call "block level action". However, our
editor always refers the HTML default style of the element. Therefore,
for example, our editor cannot insert a new line properly if caret is in
a `<p style="display:inline">` for example (the `<p>` element is
duplicated instead of inserting `<br>` or splitting its parent "block").
This difference caused fixing bugs in the scope of Interop-2023.
This is a risky change. The patch adds a parameter how to consider
"inline" vs. "block", but the number of callers is too many. Therefore,
some callers may use wrong parameter value. Therefore, currently this is
enabled only in nightly builds and early beta builds to collect feedback
from the testers. (However, this changes the behavior of the tricky
cases, therefore, web apps in the wild probably do not use actually.)
*Bug:* Bug 1851951 - Make `insertParagraph` and `delete`/`forwardDelete`
should check the style when looking for a block ancestor
<https://bugzilla.mozilla.org/show_bug.cgi?id=1851951>
*Specification:* None
*Platform coverage:* All platforms
*Preference: *|editor.block_inline_check.use_computed_style
|
*Other browsers:* Both of them use the new behavior
*web-platform-tests:*
editing/other/insertparagraph-with-white-space-style.tentative.html
<https://searchfox.org/mozilla-central/source/testing/web-platform/tests/editing/other/insertparagraph-with-white-space-style.tentative.html>
--
Masayuki Nakano<[email protected]>
Working on DOM, Events, editor and IME handling for Gecko
--
You received this message because you are subscribed to the Google Groups
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/19710564-06cf-4ce6-ae4c-cd49e4b94866%40d-toybox.com.