mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-23 19:09:49 +00:00

Oddly, `WSRunObject::InsertText()` returns `NS_OK` even when `HTMLEditor::InsertTextWithTransaction()` returns error. However, it fails if insertion point is not editable like `<noscript>` element. In such case, `aPointAfterInsertedString` isn't modified and its caller, `HTMLEditRules::WillInsertText()` keep handling inserting remaining text with non-positioned `EditorDOMPoint`. Therefore, at the next time, `WSRunObject` fails to do anything since it requires positioned `EditorDOMPoint`. For making uplift safer, this patch makes `WSRunObject::InsertText()` set `aPointAfterInsertedString` by itself when `HTMLEditor::InsertTextWithTransaction()` returns error. Differential Revision: https://phabricator.services.mozilla.com/D32131 --HG-- extra : moz-landing-system : lando