зеркало из https://github.com/mozilla/gecko-dev.git
a56eed4600
In this case, `<font face="monospace">abc []<br></font>`, the range applying new style will be extended as `<font face="monospace">abc [<br>}</font>` first. https://searchfox.org/mozilla-central/rev/29bdf6ff9965a647c6f64d63fed2b5bd094532c7/editor/libeditor/HTMLStyleEditor.cpp#1944 Then, the start point should be shrunken and the range should become `<font face="monospace">abc {<br>}</font>`. https://searchfox.org/mozilla-central/rev/29bdf6ff9965a647c6f64d63fed2b5bd094532c7/editor/libeditor/HTMLStyleEditor.cpp#1977-1978 However, `commonAncestor` is still the text node because it's not updated after extending the range to include the `<br>`. Then, `AutoInlineStyleSetter::GetNextEditableInlineContent` fails to get `<br>` from the text node. https://searchfox.org/mozilla-central/rev/29bdf6ff9965a647c6f64d63fed2b5bd094532c7/editor/libeditor/HTMLStyleEditor.cpp#1576-1578 Finally, the unexpected range computation will reach here with the text editor and adjust the start of the range to start of the text node. https://searchfox.org/mozilla-central/rev/29bdf6ff9965a647c6f64d63fed2b5bd094532c7/editor/libeditor/HTMLStyleEditor.cpp#420-423 Therefore, the new text which the new style should be applied is jumped to start of the text node. Differential Revision: https://phabricator.services.mozilla.com/D190028 |
||
---|---|---|
.. | ||
composer | ||
docs | ||
libeditor | ||
reftests | ||
spellchecker | ||
txmgr | ||
AsyncSpellCheckTestHelper.sys.mjs | ||
moz.build | ||
nsIDocumentStateListener.idl | ||
nsIEditActionListener.idl | ||
nsIEditor.idl | ||
nsIEditorMailSupport.idl | ||
nsIEditorSpellCheck.idl | ||
nsIHTMLAbsPosEditor.idl | ||
nsIHTMLEditor.idl | ||
nsIHTMLInlineTableEditor.idl | ||
nsIHTMLObjectResizer.idl | ||
nsITableEditor.idl |