gecko-dev/editor
Masayuki Nakano ac74e89b26 Bug 1566795 - part 6: Make HTMLEditor::RemoveInlinePropertyInternal() remove text node style which comes from block parent r=m_kato
Finally, `Document.execCommand()` still does not work fine if selection
starts from very start of block and/or end at very end of block because
`PromoteInlineRange()` extends selection range to contain the
containers, then, `SubtreeContentIterator` won't list up text nodes.

In this case, `RemoveInlinePropertyInternal()` expects that
`RemoveStyleInside()` removes text node style with creating
`<span>` elements.  However, `RemoveStyleInsilde()` only handles
`Element`s and it handles elements from most-descendants.
Therefore, it cannot distinguish whether text node style comes
from removing inline elements or parent block.

This patch makes `RemoveInlinePropertyInternal()` collect
descendant text nodes in the range after handling all nodes in
the range except descendant text nodes, then, check the
final style of descendant text nodes, finally, remove the style
if coming from parent block.

Differential Revision: https://phabricator.services.mozilla.com/D47865

--HG--
extra : moz-landing-system : lando
2019-10-09 08:04:34 +00:00
..
composer Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug 2019-09-30 22:06:47 +00:00
libeditor Bug 1566795 - part 6: Make HTMLEditor::RemoveInlinePropertyInternal() remove text node style which comes from block parent r=m_kato 2019-10-09 08:04:34 +00:00
reftests Bug 1586018 - Remove a11y tree tests, reftests and crashtests only related to textbox. r=surkov,emilio 2019-10-03 18:01:08 +00:00
spellchecker Bug 1581774 - revert part of rev 5e2fad03c885 from bug 1507543 for Thunderbirds since it breaks the spellcheck. r=m_kato 2019-09-26 09:42:42 +02:00
txmgr Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
AsyncSpellCheckTestHelper.jsm Bug 1561435 - Format editor/, a=automatic-formatting 2019-07-05 10:45:46 +02:00
moz.build Bug 1577969 - Get rid of nsIHTMLEditor.getLinkedObject and nsIURIRefObject. r=masayuki 2019-09-02 12:15:41 +00:00
nsIDocumentStateListener.idl Bug 1549925 - Mark all methods of nsIDocumentStateListener as can_run_script r=m_kato 2019-05-09 07:37:51 +00:00
nsIEditActionListener.idl Bug 1545822 - Clean up some whitespace in XPIDL files. r=froydnj 2019-04-21 01:47:00 +00:00
nsIEditor.idl Bug 1568777 - Make first argument of nsIEditor.unmask() optional r=m_kato 2019-07-29 12:21:02 +00:00
nsIEditorMailSupport.idl Bug 1545822 - Clean up some whitespace in XPIDL files. r=froydnj 2019-04-21 01:47:00 +00:00
nsIEditorObserver.idl
nsIEditorSpellCheck.idl Bug 1556922. Stop using [array] in nsIEditorSpellCheck. r=masayuki 2019-06-05 04:07:28 +00:00
nsIEditorStyleSheets.idl Bug 1545822 - Clean up some whitespace in XPIDL files. r=froydnj 2019-04-21 01:47:00 +00:00
nsIHTMLAbsPosEditor.idl Bug 1549925 - Mark all methods of nsIDocumentStateListener as can_run_script r=m_kato 2019-05-09 07:37:51 +00:00
nsIHTMLEditor.idl Bug 1540029 - part 8: Replace HTMLEditRules::GetParagraphState() with new stack only class r=m_kato 2019-09-18 08:20:29 +00:00
nsIHTMLInlineTableEditor.idl Bug 1549925 - Mark all methods of nsIDocumentStateListener as can_run_script r=m_kato 2019-05-09 07:37:51 +00:00
nsIHTMLObjectResizer.idl Bug 1549925 - Mark all methods of nsIDocumentStateListener as can_run_script r=m_kato 2019-05-09 07:37:51 +00:00
nsIPlaintextEditor.idl Bug 1574852 - part 104: Move TextEditRules::WillInsertText() to TextEditor and make HTMLEditor::WillInsertText() override it r=m_kato 2019-09-13 02:40:09 +00:00
nsITableEditor.idl Bug 1533293 - part 3: Make editor and ContentEventHandler not use Selection::Extend() due to too slow r=m_kato 2019-03-26 10:09:47 +00:00