mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
fa7ceedfb7
There are 3 bugs. One is, `PendingStyles::TakeAllPreservedStyles` returns styles in reversed order of setting styles, this unexpected order causes that `<font>` element is placed innermost instead of outermost, thus, background color may be applied to shorter area than text. Unfortunately, Chrome applies the style in fixed order, but using same order as setting the styles is reasonable for us because we use same code to apply multiple styles once. Another is, `AutoInlineStyleSetter` extends the range to apply new style to parents even if the given point is not in start or end of the first container. Current code works fine if there is only one text node in an inline element, but after un-setting a style, text nodes may be keep split. And also when we apply new style, we create an empty text node for a placeholder of new text, therefore, the range may be extended from the empty text node to before/after its previous/next text node. Note that the latter case needs to work with invisible things more, but this bug needs to be fixed ASAP due to the dead line, and invisible things not so appear in inline elements. Therefore, it's okay to leave it. The other is, the delete handlers do not clear the cached styles (cached when `HTMLEditor` starts handling it). If it's caused by a `Backspace` key press in start of a block, `HTMLEditor` caches the style at caret (right paragraph), then, collapse `Selection` to end of the ex-left block where may have different style, then, when user types new text there, the cached style is applied into to the new text **too**. Therefore, if `Selection` was collapsed and handling a `Backspace` key press, the cached styles should be forgotten. Depends on D168640 Differential Revision: https://phabricator.services.mozilla.com/D168865 |
||
---|---|---|
.. | ||
composer | ||
docs | ||
libeditor | ||
reftests | ||
spellchecker | ||
txmgr | ||
AsyncSpellCheckTestHelper.jsm | ||
moz.build | ||
nsIDocumentStateListener.idl | ||
nsIEditActionListener.idl | ||
nsIEditor.idl | ||
nsIEditorMailSupport.idl | ||
nsIEditorSpellCheck.idl | ||
nsIHTMLAbsPosEditor.idl | ||
nsIHTMLEditor.idl | ||
nsIHTMLInlineTableEditor.idl | ||
nsIHTMLObjectResizer.idl | ||
nsITableEditor.idl |