Commit Graph

9892 Commits

Author SHA1 Message Date
Masayuki Nakano
a97bc5aea1 Bug 1639074 - Don't call EditorDOMPoint::GetPreviousSiblingOfChild() if the container is not a container element r=m_kato
For warning the potential of callers' bug, `GetPreviousSiblingOfChild()` outputs
warning into the console when its container is not a container element, e.g.,
it's odd trying to get previous sibling of child if the container is a text
node.  Therefore, this patch makes the new caller,
`WSRunScanner::GetPreviousEditableCharPoint()`, check
`CanContainerHaveChildren()` before calling it.

Differential Revision: https://phabricator.services.mozilla.com/D75888
2020-05-20 07:11:17 +00:00
Masayuki Nakano
89060f115e Bug 1637865 - part 5: Clean up WSRunObject::CheckTrailingNBSPOfRun() r=m_kato
This patch makes it use early-return style and adds some comments.  Its behavior
should be changed as soon as possible for web-compat.  Therefore, I don't
write current behavior as comment at declaration.

Differential Revision: https://phabricator.services.mozilla.com/D75476
2020-05-19 01:17:10 +00:00
Masayuki Nakano
0fa915de33 Bug 1637865 - part 4: Rename rightCheck in WSRunObject::CheckTrailingNBSPOfRun() r=m_kato
Although the new name is not true when neither
`maybeNBSPFollowingVisibleContent` nor `isPreviousCharASCIIWhitespace` is true.

Differential Revision: https://phabricator.services.mozilla.com/D75475
2020-05-18 13:00:25 +00:00
Masayuki Nakano
0ff40045be Bug 1637865 - part 3: Rename leftCheck in WSRunObject::CheckTrailingNBSPOfRun() r=m_kato
Then, the last `if` block runs obviously only when the preceding `if` block
runs.  Therefore, this patch moves it.

Differential Revision: https://phabricator.services.mozilla.com/D75474
2020-05-18 12:59:26 +00:00
Masayuki Nakano
b42c1f1076 Bug 1637865 - part 2: Rename spaceNBSP in WSRUnObject::CheckTrailingNBSPOfRun() r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D75473
2020-05-18 11:37:37 +00:00
Masayuki Nakano
dafe3c5aa7 Bug 1637865 - part 1: Clean up WSRunObject::ReplacePreviousNBSPIfUnnecessary() and WSRunObject::CheckLeadingNBSP() r=m_kato
They are complicated because of not using early-return style.

Differential Revision: https://phabricator.services.mozilla.com/D75472
2020-05-18 08:33:10 +00:00
Masayuki Nakano
c7249ef506 Bug 1637856 - part 2: Get rid of WSRunScanner::mNodeArray r=m_kato
`WSRunScanner` scans around given point in `GetWSNodes()` at construction with
using `HTMLEditUtils` methods and caches editable text nodes between
`mStartReasonContent` and `mEndReasonContent`.  However, it's used only by
`GetNextCharPoint()` and `GetPreviousCharPoint()`, and they shouldn't be
referred after changing the DOM tree.  Therefore, we can scan it directly
only when it needs to scan.

The patch rewrites `GetNextCharPoint()` and `GetPreviousCharPoint()` without
`mNodeArray` and removes `mNodeArray` from its member.  This may increase the
cost of scanning next/previous text node, but improves the scan performance
when it does not treat so wide range and they are called with a point whose
container is not a text node.

This patch unexpectedly changes the behavior of them, that causes the fix of
2 failures in `insertlinebreak.html` and `insertparagraph.html`.  According to
debugger, previously GetNextCharPoint()` in
`ScanNextVisibleNodeOrBlockBoundaryFrom()` called point at `<br>` element
returned no next char, then, `ScanNextVisibleNodeOrBlockBoundaryFrom()` returned
end point which is block boundary of `<listing>` element (it is legacy HTML2
element and treated as `<pre>` element internally).  Therefore, the inserted
`<br>` element was misunderstood as invisible `<br>` at end of a block and
inserted another `<br>` element for making it visible.  However, the redesigned
one fixed this bug with searching correct text node.  Therefore, I cannot
keep the buggy behavior in the new designed methods.

Depends on D75470

Differential Revision: https://phabricator.services.mozilla.com/D75471
2020-05-18 06:46:00 +00:00
Masayuki Nakano
714518769f Bug 1637856 - part 1: Move WSRunObject::DeleteRange() to HTMLEditor r=m_kato
`WSRunObject::DeleteRange()` removes only text nodes which are stored when
`WSRunObject` is created.  Although it removes text nodes if it's removed,
this patch does not take care about it in the new method.  The reason is
the following patch will remove `mNodeArray` and anyway DOM tree modifiers
can check whether they are in proper position before access if it's needed.

Differential Revision: https://phabricator.services.mozilla.com/D75470
2020-05-18 05:12:16 +00:00
Honza Bambas
ba42858183 Bug 1535792 - Remove no longer applicable condition disabling test_richtext2.html on linux32 debug, r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D75162
2020-05-13 18:22:13 +00:00
Emilio Cobos Álvarez
b9c1bf761c Bug 312971 - Unprefix -moz-read-write / -moz-read-only. r=edgar
And remove some duplicated tests from WPT.

Differential Revision: https://phabricator.services.mozilla.com/D75231
2020-05-14 16:46:08 +00:00
Mirko Brodesser
91fe215251 Bug 1635709: part 17) Annotate CellIndexes's methods with MOZ_CAN_RUN_SCRIPT. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D75099
2020-05-14 10:08:44 +00:00
Mirko Brodesser
1f8f4485a5 Bug 1635709: part 16) Replace GetTableCellLocationFromRange with GetTableSelectionMode. r=masayuki
The location wasn't used from the caller of
`GetTableCellLocationFromRange`.

However, `GetTableCellLocationFromRange`
included flushing frames, this is now done in
`HTMLEditor::CellIndexes::Update`.

Differential Revision: https://phabricator.services.mozilla.com/D75098
2020-05-14 10:08:32 +00:00
Masayuki Nakano
6644f1805c Bug 1627175 - part 18: Move WSRunScanner::GetNextWSNode() and WSRunScanner::GetPreviousWSNode() to HTMLEditUtils r=m_kato
They are returning same meaning value as
`HTMLEditUtils::GetNextLeafContentOrNextBlockElement()` and
`HTMLEditUtils::GetPreviousLeafContentOrPreviousBlockElement()` so that
they can be renamed to same name to overload them.

Depends on D74805

Differential Revision: https://phabricator.services.mozilla.com/D74806
2020-05-12 16:23:08 +00:00
Masayuki Nakano
e561b5131a Bug 1627175 - part 17: Move WSRunScanner::GetPreviousWSNodeInner() to HTMLEditUtils r=m_kato
Similar to the previous patch, this patch moves it into `HTMLEditUtils` with
renaming it to `GetPreviousLeafContentOrPreviousBlockElement()`.

Depends on D74804

Differential Revision: https://phabricator.services.mozilla.com/D74805
2020-05-12 16:14:32 +00:00
Masayuki Nakano
79f63fcc8b Bug 1636747 - Backout the 1st patch of bug 503838 r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D75032
2020-05-13 09:09:32 +00:00
Masayuki Nakano
b75955132b Bug 1627175 - part 16: Move WSRunScanner::GetNextWSNodeInner() to HTMLEditUtils r=m_kato
It looks for next leaf content or next block element for finding "end reason
node" of `WSRunScanner`.  Especially for clearing the latter case, this
patch renames it to `GetNextLeafContentOrNextBlockElement()`.

Differential Revision: https://phabricator.services.mozilla.com/D74804
2020-05-12 15:43:06 +00:00
Masayuki Nakano
e317a8bfb7 Bug 1622231 - Make HTMLEditor::SetInlinePropertyAsAction() override property if it's called for XUL cmd_fontFace with a magic value "tt" r=m_kato
`FontFaceStateCommand::SetState()` called
`HTMLEditor::SetInlinePropertyAsAction()` with `nsGkAtoms::tt` when given value
is "tt".
https://searchfox.org/mozilla-central/rev/bc5737c51b8da4e758cf4db0ddb606f0aea81a7d/editor/libeditor/HTMLEditorCommands.cpp#626-627

However, I accidentally not ported this to
`HTMLEditor::SetInlinePropertyAsAction()`.  Therefore, this patch restores the
old code for the magic value.

Differential Revision: https://phabricator.services.mozilla.com/D74379
2020-05-11 07:30:47 +00:00
Masayuki Nakano
8c859f8589 Bug 1627175 - part 15: Create HTMLEditUtils::GetFirstLeafChild() instead of EditorBase::GetLeftmostChild() r=m_kato
This is used by `TextEditor::UndoAsAction()` too, so, it might be better to be
in `EditorUtils`.  However, it is completely designed for `HTMLEditor` and
ideally, `UndoAsAction` should be overridden by `HTMLEditor` too and
`TextEditor` should use faster path because of its content is in anonymous
subtree. But we don't have any merit to do that instead of avoiding virtual
call.

Differential Revision: https://phabricator.services.mozilla.com/D74362
2020-05-08 09:49:19 +00:00
Masayuki Nakano
5f4a29365e Bug 1627175 - part 14: Create HTMLEditUtils::GetLastLeafChild() instead of EditorBase::GetRightmostChild() r=m_kato
Depends on D74204

Differential Revision: https://phabricator.services.mozilla.com/D74361
2020-05-08 04:18:54 +00:00
Masayuki Nakano
f358298706 Bug 1627175 - part 13: Get rid of EditorBase::CreateRange() r=m_kato
It's currently enough simple and there is only one user.  So, we can get rid
of it.

Differential Revision: https://phabricator.services.mozilla.com/D74204
2020-05-08 01:55:53 +00:00
Masayuki Nakano
8c3ba237c6 Bug 503838 - part 1: Remove following <br> element for empty line when it becomes unnecessary with inserting text r=m_kato
`HTMLEditor` does not remove padding `<br>` element for last empty line when
it becomes unnecessary.

This patch removes it when inserting some text into a text node and it's
followed by a padding <br> element.

Differential Revision: https://phabricator.services.mozilla.com/D74203
2020-05-08 01:55:31 +00:00
Mirko Brodesser
193ee7189e Bug 1635709: part 1) Rename nsFrameSelection::SetCaretBidiLevel to SetCaretBidiLevelAndMaybeSchedulePaint. r=hsivonen
The old name was misleading.

Differential Revision: https://phabricator.services.mozilla.com/D74051
2020-05-06 15:26:07 +00:00
Masayuki Nakano
5ba34b8230 Bug 1633700 - Make CreateElementTransaction::InsertNewNode() check the relation between container and child only when the point has child node r=m_kato
I guess that this crash may occur in these conditions:

1. It pointed end of a node, but the node has fewer children at redo.
2. The storing point has already been reset by cycle collector.

So, anyway, the check should be tested only when the point stores a
child node.

This adds WPT tests for related situation.  Although "insertLineBreak" of
Blink and WebKit behave odd when selection is collapsed between 2 elements.

Differential Revision: https://phabricator.services.mozilla.com/D73416
2020-05-07 02:25:03 +00:00
Masayuki Nakano
214c31ebcb Bug 1633797 - Make callers of EditorBase::DeleteSelectionWithTransaction() stop calling it if selection is collapsed but the caller tries to delete non-collapsed range r=m_kato
Our editor's deletion code removes nodes step-by-step.  Therefore, even when
somebodies call `DeleteSelectionWithTransaction()` for removing non-collapsed
ranges, they may have already removed all contents in the range.  In such
case, all callers shouldn't call `DeleteSelectionWithTransaction()`.

This makes `test_bug1425997.html` allow to run nexted `execCommand`.  It'll be
disabled even in the release channel, but we should keep testing it for
detecting bug of edge cases (like this bug).  Note that all crashtests which
test nested `execCommand` calls run with allowing it with the pref for same
reason.

Differential Revision: https://phabricator.services.mozilla.com/D73402
2020-05-07 01:23:21 +00:00
Simon Giesecke
5ab15e9640 Bug 1626570 - Improve handling of copying arrays in editor/. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D73631
2020-05-06 11:15:49 +00:00
Mirko Brodesser
653bcbdc22 Bug 1634663: part 3) Declare callers of Selection::GetRangeAt in spellchecking code const. r=masayuki
Depends on D73445

Differential Revision: https://phabricator.services.mozilla.com/D73446
2020-05-02 23:45:59 +00:00
Mirko Brodesser
b880ce0b21 Bug 1634663: part 2) Declare callers of GetRangeAt around EditorBase const. r=masayuki
Depends on D73444

Differential Revision: https://phabricator.services.mozilla.com/D73445
2020-05-02 23:44:46 +00:00
Masayuki Nakano
2afa55c660 Bug 1540037 - part 15: Rename HTMLEditor::MoveChildren() and HTMLEditor::MoveNodeOrChildren() to *WithTransaction() r=m_kato
The other `Move*()` are not move nodes without transactions.  For making
developers to distinguish the difference, this patch appends `WithTransaction`
postfix like other methods which modify DOM tree with transactions.

Differential Revision: https://phabricator.services.mozilla.com/D72847
2020-04-30 17:47:20 +00:00
Masayuki Nakano
5ae5e8d616 Bug 1540037 - part 14: Move EditorBase::MoveNodeWithTransaction() and EditorBase::MoveNodeToEndWithTransaction() r=m_kato
They are used only by `HTMLEditor` so that we can move them.

Differential Revision: https://phabricator.services.mozilla.com/D72846
2020-04-30 17:46:37 +00:00
Masayuki Nakano
481f9750ed Bug 1540037 - part 13: Move EditorBase::MoveChildren() to HTMLEditor r=m_kato
And this patch renames it to `MoveChildrenBetween()` for avoiding overload.

Differential Revision: https://phabricator.services.mozilla.com/D72845
2020-04-30 16:24:20 +00:00
Masayuki Nakano
59230aed04 Bug 1540037 - part 12: Move EditorBase::MovePreviousSiblings() to HTMLEditor r=m_kato
It's used only by `HTMLEditor` so that we can move it.

Differential Revision: https://phabricator.services.mozilla.com/D72844
2020-04-30 15:52:20 +00:00
Masayuki Nakano
0b304fcbc0 Bug 1540037 - part 11: Move EditorBase::MoveAllChilren() to HTMLEditor r=m_kato
It's used only by `HTMLEditor` so that we can move it.

Differential Revision: https://phabricator.services.mozilla.com/D72836
2020-04-30 15:31:33 +00:00
Masayuki Nakano
42b619b62e Bug 1540037 - part 10: Move EditorBase::DoJoinNodes() to HTMLEditor r=m_kato
Then, we can make `JoinNodeTransaction` store `HTMLEditor` instead of
`EditorBase`.

Differential Revision: https://phabricator.services.mozilla.com/D72835
2020-04-30 15:26:09 +00:00
Masayuki Nakano
f8a25cc58e Bug 1540037 - part 9: Move EditorBase::DoSplitNode() to HTMLEditor r=m_kato
And then, `SplitNodeTransaction` needs to be store `HTMLEditor` instead of
`EditorBase`.

Differential Revision: https://phabricator.services.mozilla.com/D72833
2020-04-30 13:33:40 +00:00
Masayuki Nakano
63f8d6da50 Bug 1540037 - part 8: Move EditorBase::SplitNodeWithTransaction() to HTMLEditor r=m_kato
Now, it's used only by `HTMLEditor` so that we can move it.

Differential Revision: https://phabricator.services.mozilla.com/D72832
2020-04-30 11:27:33 +00:00
Masayuki Nakano
ec22b93111 Bug 1540037 - part 7: Move EditorBase::PrepareToInsertBRElement() r=m_kato
Although this is called by
`EditorBase::InsertPaddingBRElementForEmptyLastLineWithTransaction()`, it's
mainly designed for `HTMLEditor`, but used by `TextEditor` too only when it
puts `<br>` element to the end of its anonymous `<div>` element.  Therefore,
when `TextEditor` calls
`InsertPaddingBRElementForEmptyLastLineWithTransaction()`, `aPointToInsert`
is not in a text node:
https://searchfox.org/mozilla-central/rev/158bac3df3a1890da55bdb6ffdaf9a7ffc0bfb0a/editor/libeditor/TextEditSubActionHandler.cpp#917-918,920

And it means that `PrepareToInsertBRElement()` does nothing:
https://searchfox.org/mozilla-central/rev/158bac3df3a1890da55bdb6ffdaf9a7ffc0bfb0a/editor/libeditor/EditorBase.cpp#1561,1569-1570

Therefore, we can move it into `HTMLEditor` and makes it possible to move
`EditorBase::SplitNodeWithTransaction()` called by `PrepareToInsertBRElement()`.

Differential Revision: https://phabricator.services.mozilla.com/D72831
2020-04-30 10:49:04 +00:00
Masayuki Nakano
6d98bd00c0 Bug 1540037 - part 6: Move TextEditor::DeleteSelectionAndCreateElement() and TextEditor::DeleteSelectionAndPrepareToCreateNode() to HTMLEditor r=m_kato
Both of them are used only by `HTMLEditor` so that we can move them to
`HTMLEditor`.

Differential Revision: https://phabricator.services.mozilla.com/D72830
2020-04-30 09:54:55 +00:00
Masayuki Nakano
fcaf1940d6 Bug 1627175 - part 12: Get rid of HTMLEditor::GetCellFromRange() r=m_kato
Even though the method returns only in specific cases, but the result affects
only one caller, `HTMLEditor::GetNextSelectedTableCellElement()`.  Therefore,
we can create new generic utility method,
`HTMLEditUtils::GetTableCellElementIfOnlyOneSelected()` and get rid of
`HTMLEditor::GetCellFromRange()`.

Note that the warnings in `HTMLEditor::GetCellFromRange()` is just noise for
any callers.  So, this gets rid of the useless spam warnings.

Differential Revision: https://phabricator.services.mozilla.com/D72586
2020-04-30 05:15:38 +00:00
Masayuki Nakano
8a472914a6 Bug 1627175 - part 11: Create HTMLEditUtils::GetElementIfOnlyOneSelected() r=m_kato
As an alternative of `HTMLEditor::GetCellFromRange()`, this patch creates more
generic utility method.

Depends on D72296

Differential Revision: https://phabricator.services.mozilla.com/D72585
2020-04-27 16:44:38 +00:00
Masayuki Nakano
c3e748608d Bug 1540037 - part 5: Move EditorBase::JoinNodesWithTransaction() to HTMLEditor r=m_kato
It's used only by `HTMLEditor` so that we can move it into `HTMLEditor`.

Differential Revision: https://phabricator.services.mozilla.com/D72829
2020-04-30 09:31:11 +00:00
Masayuki Nakano
adf7a304f3 Bug 1632726 - part 1: Create utility methods to compute delete range from collapsed selection in nsFrameSelection r=smaug
Currently, `EditorBase::ExtendSelectionForDelete()` depends on some
`nsISelectionController` methods to compute extended range for deletion
from collapsed selection.  They are implemented by
`nsFrameSelection::MoveCaret()` and `nsFrameSelection::TakeFocus()`.
Ideally, we should split these methods for computation part and performing
part.  However, they change selection with updating other selection state,
for example, table selection state and bidi information.  Therefore, it's
impossible to split them with simple code.  However, I need to change
`EditorBase::ExtendSelectionForDelete()` just return extended range.

Therefore, this patch creates `nsFrameSelection::PeekOffsetForCaretMove()`
which has the main path in `MoveCaret()` for the `EditorBase` method.

Then, `MoveCaret()` and new `nsFrameSelection::CreateRangeExtendedToSomewhere()`
share the computation code of expanding normal selection.

Finally, this patch wraps `nsFrameSelection::CreateRangeExtendedToSomewhere()`
with new public inline methods for `EditorBase`.

The following patch will remove no-user methods of `nsISelectionController`.

Differential Revision: https://phabricator.services.mozilla.com/D72295
2020-04-30 10:05:35 +00:00
Masayuki Nakano
94a85cde62 Bug 1540037 - part 4: Move EditorBase::SplitNodeDeepWithTransaction() to HTMLEditor r=m_kato
It's only used by `HTMLEditor` so that we can move it.

Differential Revision: https://phabricator.services.mozilla.com/D72826
2020-04-30 07:29:27 +00:00
Masayuki Nakano
c803c1d7be Bug 1540037 - part 3: Move EditorBase::InsertContainerWithTransaction() and related methods to HTMLEditor r=m_kato
They are not used by `TextEditor` so that we should move them into `HTMLEditor`.

Differential Revision: https://phabricator.services.mozilla.com/D72825
2020-04-30 06:36:53 +00:00
Masayuki Nakano
878d787eaa Bug 1540037 - part 2: Move EditorBase::RemoveContainerWithTransaction() to HTMLEditor r=m_kato
Its users are only `HTMLEditor` and `CSSEditUtils` so that we should move it
into `HTMLEditor`.

Differential Revision: https://phabricator.services.mozilla.com/D72823
2020-04-30 06:36:41 +00:00
Masayuki Nakano
c24a8d4f1f Bug 1540037 - part 1: Move EditorBase::ReplaceContainerWithTransaction() and related methods to HTMLEditor r=m_kato
They are used only by `HTMLEditor` so that we should hide them from
`TextEditor` for making it clearer that they are not used by `TextEditor`.

Note that there are 2 `DeleteNodeWithTransaction()` in `HTMLEditor` class.
One is `EditorBase`'s method and the other is `HTMLEditor`'s method.
`HTMLEditor`'s one is check whether the removing node is editable or not,
but in some cases, we need to move non-editable nodes.  Therefore, this
patch makes `ReplaceContainerWithTransaction()` call `EditorBase`'s one
for keeping current behavior.

Differential Revision: https://phabricator.services.mozilla.com/D72822
2020-04-30 06:35:38 +00:00
Botond Ballo
ffdcf19a50 Bug 1633014 - Fix non-unified build errors in editor/. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D72470
2020-04-27 03:36:57 +00:00
Masayuki Nakano
0440ea1f97 Bug 1632724 - part 5: Remove out params of EditorBase::CreateTransactionForDelete*() r=m_kato
The out params mean the last collapsed selection range's result (although,
the meaning is odd and offset and length are not overwritten when there is
another collapsed range and it causes `DeleteNodeTransaction`).  Additionally,
when and only when `DeleteNodeTransaction` and `DeleteTextTransaction` are
added to the `EditAggregationTransaction` created by
`CreateTransactionForSelection()`.  Therefore, same result can be looked for
from its only caller, `DeleteSelectionWithTransaction()`.

Note that this makes the method slower if there are too many selection ranges,
but such case must be rare because:

1. We can assume that users rarely use multiple selection ranges for removing
multiple ranges of content except table.
2. Multiple selection is supported only by Gecko.  Therefore, web apps must
not use multiple selection for this purpose.

So, it must be okay to use this slower approach for making the methods simpler.
If it'd become damage to some benchmarks, let's create faster access to get
transaction type.

Depends on D72293

Differential Revision: https://phabricator.services.mozilla.com/D72294
2020-04-27 01:36:02 +00:00
Masayuki Nakano
f3a31a9bda Bug 1632724 - part 4: Rename HTMLEditor::DeleteSelectionWithTransaction() r=m_kato
`HTMLEditor::DeleteSelectionWithTransaction()` calls `EditorBase`'s overridden
method and handles `nsIEditor::eStrip` case.  Therefore, we can rename it with
stop calling the `EditorBase::DeleteSelectionWithTransaction()`, and make it
called by `EditorBase::DeleteSelectionWithTransaction()` only when it's
necessary.

Additionally, we can make all internal method callers of editor classes always
set `nsIEditor::eNoStrip` if the instance is `TextEditor`.  This must make
the code easier to understand.

Depends on D72292

Differential Revision: https://phabricator.services.mozilla.com/D72293
2020-04-27 00:36:10 +00:00
Masayuki Nakano
378eb2888e Bug 1632724 - part 3: Make helper methods of EditorBase::DeleteSelectionWithTransaction() take new enum class instead of nsIEditor::EDirection r=m_kato
The parameter is used only by `EditorBase::CreateTxnForDeleteRange()` to
extend collapsed range, but it accepts only `nsIEditor::eNext` and
`nsIEditor::ePrevious`.  Therefore, using `nsIEditor::EDirection` does not
make sense.  Instead, they should use new `enum class`,
`HowToHandleCollapsedRange`.

Depends on D72291

Differential Revision: https://phabricator.services.mozilla.com/D72292
2020-04-26 15:58:35 +00:00
Masayuki Nakano
b67f6a5763 Bug 1632724 - part 2: Move DeleteSelectionWithTransaction() from TextEditor to EditorBase since it's used by HTMLEditor too r=m_kato
Depends on D72290

Differential Revision: https://phabricator.services.mozilla.com/D72291
2020-04-24 15:22:42 +00:00