mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 20:01:50 +00:00

Chrome and Safari splits ancestors when `document.execCommand("insertImage")` inserts an `<img>`, but we insert into the closest inline element. For example, ```html <b>A[]B</b> ``` Chrome and Safari make it to: ```html <b>A</b><img><b>B</b> ``` But Firefox makes it to: ```html <b>A<img>B</b> ``` I think that we should not change the behavior on Thunderbird. Therefore, the behavior is controlled with the new `options` argument and the new behavior runs only when the `HTMLEditor` works for content document and it's not caused by the XPCOM method. Differential Revision: https://phabricator.services.mozilla.com/D225037