mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
92ead719bd
If selection range is not in **one** text node, `RemoveInlinePropertyInternal()` collects target nodes with `SubtreeContentIterator`. It only collects topmost nodes which are **entirely** contained in the range (it's enough because their descendants will be handled by `RemoveStyleInside()` recursively). The reasons why it uses `SubtreeContentIterator` rather than `PreContentIterator` must be: 1. Performance reason. 2. Assuming there are no multiple text nodes. 3. Not expects that user removes text node styles come from parent block. The reason 2 is wrong because when removing a style, all browsers don't join text nodes which was in removing element with adjacent text nodes. (I.e., we cannot change this behavior for compatibility.) The reason 3 is of course wrong we're struggling with this scenario. Therefore, `RemoveInlinePropertyInternal()` needs to collect partially selected text nodes by itself (if there are). Then, we can merge the single text node selected case with the `for` loop. Differential Revision: https://phabricator.services.mozilla.com/D47864 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
composer | ||
libeditor | ||
reftests | ||
spellchecker | ||
txmgr | ||
AsyncSpellCheckTestHelper.jsm | ||
moz.build | ||
nsIDocumentStateListener.idl | ||
nsIEditActionListener.idl | ||
nsIEditor.idl | ||
nsIEditorMailSupport.idl | ||
nsIEditorObserver.idl | ||
nsIEditorSpellCheck.idl | ||
nsIEditorStyleSheets.idl | ||
nsIHTMLAbsPosEditor.idl | ||
nsIHTMLEditor.idl | ||
nsIHTMLInlineTableEditor.idl | ||
nsIHTMLObjectResizer.idl | ||
nsIPlaintextEditor.idl | ||
nsITableEditor.idl |