Commit Graph

387 Commits

Author SHA1 Message Date
Neil Deakin
21426e24f4 Bug 1776879, replace text/unicode for clipboard and drag and drop and use text/plain directly, r=edgar,mak,stransky,geckoview-reviewers,extension-reviewers,zombie,m_kato
Most usage is a straight replacement but gtk needs extra changes as it transfers plain text in UTF8 natively and needs to be converted into UTF16, and Windows uses single-byte characters for RTF and CF_HTML formats so we preserve this.

Differential Revision: https://phabricator.services.mozilla.com/D158587
2023-02-01 23:30:55 +00:00
Masayuki Nakano
46ca045ffc Bug 1810655 - Make HTMLEditor check readonly flag when its public methods are called r=m_kato
The readonly flag of `HTMLEditor` can be set by chrome script or
`Document.execCommand("contentReadOnly")`.  However, the XPCOM APIs should keep
working to update the editable content.  E.g., if focused editor is a single
line text field, the app may want to change the value even if it's not editable
by the users.

Note that this patch does not fix all cases of all APIs because this is not
important for Firefox even though the status can be created by web apps (but
Firefox does not use XPCOM APIs basically, instead using XUL commands and it
should not work with readonly state since it may be kicked by user
interactions, e.g., executing a menu item or a shortcut key).
Therefore, it's enough to work it in current Thunderbird for now.

Differential Revision: https://phabricator.services.mozilla.com/D167353
2023-01-24 07:12:19 +00:00
Tom Schuster
70dbdc88df Bug 1808177 - mPointToInsert.GetContainer() in BlobReader::OnError could be nullptr. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D165858
2023-01-04 12:46:27 +00:00
Andrew McCreight
188ac80e29 Bug 1805931, part 2 - Automated removal of uses of ROOT and UNROOT CC macros. r=smaug
As of the prior patch, these are no longer needed. I removed
these with a script, then ran clang-format on the files, then
manually reverted a few unrelated changed from the formatter.

Differential Revision: https://phabricator.services.mozilla.com/D164829
2022-12-15 19:45:01 +00:00
Masayuki Nakano
a52e6adf9a Bug 1801028 - part 4: Make HTMLEditor::ClearStyleAt take EditorInlineStyle r=m_kato
Depends on D162503

Differential Revision: https://phabricator.services.mozilla.com/D162504
2022-11-25 02:15:51 +00:00
Tom Schuster
bef2534cb3 Bug 1778565 - Editor: Handle nsIFile transferable as blob. r=nika,masayuki
Differential Revision: https://phabricator.services.mozilla.com/D155753
2022-10-20 11:11:59 +00:00
Sandor Molnar
6a387fbe72 Backed out 2 changesets (bug 1778565) for causing mochitest plain failures in editor/libeditor/tests/test_bug490879.html CLOSED TREE
Backed out changeset 5f6350cfab61 (bug 1778565)
Backed out changeset 420e02d37505 (bug 1778565)
2022-10-18 22:18:00 +03:00
Tom Schuster
f1f7083ece Bug 1778565 - Editor: Handle nsIFile transferable as blob. r=nika,masayuki
Differential Revision: https://phabricator.services.mozilla.com/D155753
2022-10-18 17:35:33 +00:00
Masayuki Nakano
6a157a88b2 Bug 1793694 - part 1: Move some static inline methods of HTMLEditor to HTMLEditUtils r=m_kato
Depends on D158483

Differential Revision: https://phabricator.services.mozilla.com/D158631
2022-10-12 02:44:17 +00:00
Masayuki Nakano
780135cbb4 Bug 1793381 - part 3: Drop DeleteSelectedContent argument from HTMLEditor::InsertFromTransferable r=m_kato
It's always called with `DeleteSelectedContent::Yes`.  Therefore, the argument
is not required.  Then, its name can be `InsertFromTransferableAtSelection`.

Differential Revision: https://phabricator.services.mozilla.com/D158483
2022-10-09 01:27:35 +00:00
Masayuki Nakano
0102e1c117 Bug 1793381 - part 2: Make HTMLEditor::DoInsertHTMLWithContext as a sub action handler r=m_kato
It just creates `HTMLWithContextInserter` and calls its `Run()`.  Then, `Run()`
works as a sub action handler.  Therefore, we can make `DoInsertHTMLWithContext`
(which sounds like a helper class of a handler method) a sub action handler.

Then, it can handle the optional insertion point in it and
`HTMLWithContextInserter::Run` does not need to handle it.

Differential Revision: https://phabricator.services.mozilla.com/D158482
2022-10-09 01:27:35 +00:00
Masayuki Nakano
d2d1d167aa Bug 1793381 - part 1: Make HTMLEditor::InsertObject and related methods use enum class instead of bool r=m_kato
They use `bool` arguments a lot.  Therefore, some call-sites are hard to read.
They should be replaced with `enum class`es.  Note that this patch does not
make the raw value of new `enum class`es to `bool` unless they are used in the
heap.

Differential Revision: https://phabricator.services.mozilla.com/D158481
2022-10-09 01:27:34 +00:00
Masayuki Nakano
af5b2b3933 Bug 1792642 - Make SplitNodeResult treated as ok type of Result r=m_kato
Depends on D158333

Differential Revision: https://phabricator.services.mozilla.com/D158334
2022-10-04 07:28:10 +00:00
Masayuki Nakano
767307c38d Bug 1791501 - Use EditActionResult as ok type of mozilla::Result r=m_kato
Any callers do not refer "ignored", "handled" and "cancel" state without
checking whether the method returns error or not.  Therefore, error state
can be (and should be) managed by `mozilla::Result`'s error state.

Perhaps, it should store a caret position later because deletion handlers
of `HTMLEditor` use it, but update `Selection` immediately.

Differential Revision: https://phabricator.services.mozilla.com/D158080
2022-09-28 07:21:37 +00:00
Masayuki Nakano
21ac65a3c0 Bug 1791224 - Use CreateNodeResultBase as the ok type of mozilla::Result r=m_kato
Similar to the previous patch, this changes a lot of lines.  However, I think
that it's not so hard to investigate regression point in this patch because
`CreateNodeResultBase` is not used so many times at handling on edit action.

Differential Revision: https://phabricator.services.mozilla.com/D157575
2022-09-28 04:00:19 +00:00
Butkovits Atila
b4aaa49444 Backed out changeset 865c5d292958 (bug 1791224) for causing build bustages at Result.h. CLOSED TREE 2022-09-27 11:55:04 +03:00
Masayuki Nakano
099575b4bf Bug 1791224 - Use CreateNodeResultBase as the ok type of mozilla::Result r=m_kato
Similar to the previous patch, this changes a lot of lines.  However, I think
that it's not so hard to investigate regression point in this patch because
`CreateNodeResultBase` is not used so many times at handling on edit action.

Differential Revision: https://phabricator.services.mozilla.com/D157575
2022-09-27 05:12:05 +00:00
Masayuki Nakano
a31e91fc29 Bug 1784192 - part 9: Rename TypeInState to PendingStyles r=m_kato
Additionally,
* `PropItem` -> `PendingStyle`
* `StyleCache` -> `PendingStyleCache`
* `AutoStyleCacheArray` -> `AutoPendingStyleCacheArray`

And finally, `PendingStyle` (formally `PropItem`) is changed to `class` and
its members are encapsuled.

Differential Revision: https://phabricator.services.mozilla.com/D155318
2022-08-26 03:31:26 +00:00
Masayuki Nakano
6a7b048277 Bug 1781994 - part 1: Make HTMLEditor::SplitAncestorStyledInlineElementsAt and HTMLEditor::ClearStyleAt stop touching Selection directly r=m_kato
I've already made a caller of `HTMLEditor::ClearStyleAt`,
`HTMLEditor::CreateStyleForInsertText`, in bug 1770877, so this fixes a bug of
the patch.

`HTMLEditor::ClearStyleAt` is still updates `Selection` only in some cases.
And one of the caller has not handle the `Selection` update.  Therefore, once
it completely stop touching `Selection`, `ComputeEditingHost` will fail and
the other paths update `Selection`, so it should do it too.  (Without the
change, `test_dragdrop.html` fails.)

Finally, we don't need `EditResult` anymore because we have
`Result<EditorDOMPoint, nsresult>`.

Differential Revision: https://phabricator.services.mozilla.com/D154343
2022-08-16 00:02:25 +00:00
Masayuki Nakano
830bd376e2 Bug 1783402 - part 3: Make result of unsafe getter methods of EditorDOMPointBase templated r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D153842
2022-08-09 01:43:24 +00:00
Masayuki Nakano
eb8aafe328 Bug 1783402 - part 2: Make result of safe getter methods of EditorDOMPointBase templated r=m_kato
Similar to the previous patch, and for consistency between editor helper
classes, we should make result of getter methods of `EditorDOMPointBase` too.

Differential Revision: https://phabricator.services.mozilla.com/D153841
2022-08-09 01:43:24 +00:00
Nika Layzell
63a28ee824 Bug 1772006 - Part 5: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-07-30 00:12:48 +00:00
Magnus Melin
221f645bcd Bug 1779343 - Don't crash rewrapping "> ". r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D151682
2022-07-14 13:12:29 +00:00
criss
c1b045ddda Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE
Backed out changeset f17c7565707b (bug 1772006)
Backed out changeset c725fe1f5882 (bug 1772006)
Backed out changeset d19663161261 (bug 1772006)
Backed out changeset b6611ab002d9 (bug 1772006)
Backed out changeset 790f42b64af9 (bug 1772006)
Backed out changeset 79a734b4e4d9 (bug 1772006)
Backed out changeset 42730aae16ea (bug 1772006)
Backed out changeset b2542aef3054 (bug 1772006)
Backed out changeset 962bfea4a309 (bug 1772006)
2022-06-11 01:13:42 +03:00
Nika Layzell
c1e4a1e52c Bug 1772006 - Part 6: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-06-10 21:12:08 +00:00
Masayuki Nakano
8b7dbfe141 Bug 1772022 - Make EditorBase::DeleteNodeWithTransaction() return NS_ERROR_EDITOR_DESTROYED if so r=m_kato
Its callers check `EditorBase::Destroyed()` with at least adding 4 lines, and
some callers do not check this important state.  So, we should make it check
`Destroyed()` at last and omit the additional error check in the caller sites.

Note that it's a virtual method, but `HTMLEditor` checks whether it's a
removable node or not.  So, we should can merge it into `EditorBase`.  This
patch does it too.

Differential Revision: https://phabricator.services.mozilla.com/D148084
2022-06-03 02:03:47 +00:00
Masayuki Nakano
71411e3fb4 Bug 1771448 - part 4: Rename HTMLEditor::GetActiveEditingHost to ComputeEditingHost r=m_kato
It's currently computes the corresponding editing host from the focus node of
`Selection` with climbing up the DOM tree.  So, it does not just return a stored
element.  Therefore, some callers use it multiple times.  For avoiding it, we
should rename it to explain that it computes the editing host.

Note that I think that we should make it takes a node to compute editing host
without `Selection` for solving the case of no selection ranges.  Therefore,
I don't like to include more information into the name.

Differential Revision: https://phabricator.services.mozilla.com/D147504
2022-05-31 03:41:01 +00:00
John Bieling
06996f933a Bug 1768057 - Make nsIEditorMailSupport::insertTextWithQuotations available to JS callers. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D145646
2022-05-11 14:49:29 +00:00
Masayuki Nakano
fdbdb18b03 Bug 1762115 - part 15: Make HTMLEditor::InsertNodeIntoProperAncestorWithTransaction() stop touching Selection directly r=m_kato
This patch also makes that `HTMLWithContextInserter::InsertContents`
collect moving children first.  Then, move each one with a transaction.
This is standard manner in these days to avoid infinite loop caused by
moving the removed child back by a mutation event listener.

Differential Revision: https://phabricator.services.mozilla.com/D144658
2022-05-03 01:38:57 +00:00
Masayuki Nakano
ed197035df Bug 1762115 - part 13: Make EditorBase::InsertNodeWithTransaction stop touching Selection directly r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D144656
2022-05-03 01:21:51 +00:00
Masayuki Nakano
e67e2e79b6 Bug 1762115 - part 7: Make HTMLEditor::SplitNodeDeepWithTransaction stop touching Selection r=m_kato
Now, it does not require to update selection, and its result may have a point
to put caret it is used to doing.  This patch makes it stop collapsing selection
after each split, and instead, makes all callers of it collapse selection if
it's (probably) necessary.

Note that the method may not split any nodes but return it as "handled".
Therefore, the callers do not check whether a splitting node occurred **but**
suggesting point to put caret is invalid or the other cases.  Therefore, in
strictly speaking, this patch changes the existing behavior, but it should not
affects web apps in the wild because of the low usage of the legacy mutation
event listeners.

Differential Revision: https://phabricator.services.mozilla.com/D144650
2022-05-03 00:19:16 +00:00
Masayuki Nakano
adea39d1ad Bug 1762115 - part 5: Make SplitNodeResult store and suggest new caret position r=m_kato
This patch allows methods which split some nodes to return new candidate
caret position and makes callers of them consider whether applying it to
the selection immediately or not.

Differential Revision: https://phabricator.services.mozilla.com/D144648
2022-05-03 00:06:16 +00:00
Masayuki Nakano
54bb966fad Bug 1765018 - part 7: Make some methods which return an instance (not reference) of EditorDOMPointBase be template methods r=m_kato
For avoiding to use `To<EditorDOMPoint>()` etc from temporary object, such
methods should be templated.

Differential Revision: https://phabricator.services.mozilla.com/D143884
2022-04-20 23:58:04 +00:00
Masayuki Nakano
083c6837d0 Bug 1765018 - part 2: Make EditorBase::Get(Start|End)Point return EditorDOMPoint or EditorRawDOMPoint r=m_kato
This avoids unnecessary conversion at the callers' side, although they should be
omitted by the complier.

Differential Revision: https://phabricator.services.mozilla.com/D143879
2022-04-20 23:35:18 +00:00
Masayuki Nakano
a8350c4163 Bug 1764684 - part 3: Fix and improve warnings of the result of EditorBase::CollapseSelectionTo* r=m_kato
Some of them were `HTMLEditor` so that we need to fix it to `EditorBase`, and
also this patch fixes `NS_ERROR_EDITOR_DESTROYED` handling around them.

Differential Revision: https://phabricator.services.mozilla.com/D143815
2022-04-20 14:36:53 +00:00
Masayuki Nakano
9b8ab5eee6 Bug 1759370 - The lambda in HTMLEditor::InsertAsPlaintextQuotation should not refer inserting new <span> element's parent r=m_kato
It's not been inserted into the DOM tree yet.  Therefore, it should refer the
insertion point instead.

Differential Revision: https://phabricator.services.mozilla.com/D141449
2022-03-18 08:34:44 +00:00
Masayuki Nakano
832b142dc3 Bug 1759885 - Make initializers of new element in HTMLEditor stop capturing everything r=m_kato
Capturing everything causes increasing the binary size especially of debug
build so that we should add more arguments to the callback and make some
lambda methods capture individual variables when they are necessary.

Note that nobody uses the 3rd argument, `aPointToInsert`, it'll be used to
fix bug 1759370 and makes the change smaller.

This decreases the size of xul.dll of debug build on Windows 123MB from 323MB.

I tried to delete all captures from the lambdas, but it does not affect to the
binary size and it makes the code harder to read, killing static analysis.
Therefore, we should not do it.

Depends on D141196

Differential Revision: https://phabricator.services.mozilla.com/D141447
2022-03-18 07:20:52 +00:00
Masayuki Nakano
16c8061d35 Bug 1742933 - part 11: Create a pref to get back the traditional behavior r=m_kato
For avoiding simple back-out of the patches when we get serious regression
reports, we should have a pref to disable the new pref.

Differential Revision: https://phabricator.services.mozilla.com/D140475
2022-03-11 09:21:36 +00:00
Masayuki Nakano
846510e59b Bug 1742933 - part 10: Make HTMLEditor::InsertAsCitedQuotationInternal() set attributes of <blockquote> before connecting it to the DOM tree r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D140474
2022-03-11 09:21:36 +00:00
Masayuki Nakano
5fba23c229 Bug 1742933 - part 9: Make HTMLEditor::InsertAsPlaintextQuotation() set attributes of <span> before connecting to the DOM tree r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D140473
2022-03-11 09:14:37 +00:00
Masayuki Nakano
e407a64697 Bug 1742933 - part 8: Make HTMLEditor::PasteAsQuotationAsAction() set "type" attribute of new blockquote element before connecting it to the DOM tree r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D140472
2022-03-11 09:14:36 +00:00
Masayuki Nakano
22aa786ab3 Bug 1753508 - Add logger of selection batch r=smaug
This was required for debugging the bug.

Differential Revision: https://phabricator.services.mozilla.com/D139350
2022-03-11 02:24:24 +00:00
Norisz Fay
1b38335ea5 Backed out changeset 00f6bd7aa727 (bug 1755481) for causing multiple clipboard related failures CLOSED TREE 2022-02-16 12:14:58 +02:00
Mirko Brodesser
af3e92b960 Bug 1755481: rename nsIClipboard::getData to nsIClipboard::getSomeData and document it. r=mccr8
Before, it was confusing. One could have assumed that the method gets
the data for all flavors.

Differential Revision: https://phabricator.services.mozilla.com/D138776
2022-02-16 09:03:00 +00:00
Masayuki Nakano
40ca36e870 Bug 787434 - part 2: Make HTMLWithContextInserter::FragmentFromPasteCreator delete incomplete list elements in the inserting fragment r=mbrodesser
With the change of the previous patch, `HTMLEditor` won't delete empty elements
in the inserted HTML content.  However, at bug 1123505, it intentionally tried
to delete empty list elements which have no list item elements since such
list elements won't be editable.  Therefore, the following patch makes some
tests in `test_copypaste.html` fail.
https://searchfox.org/mozilla-central/rev/3de56eb5f266f523340e739ae1b53258e0a95dfe/dom/base/test/copypaste.js#343,360
Unfortunately, the broken behavior is compatible with Chrome (Chrome accept
list elements which have no list item elements), but it does not make sense for
Gecko's builtin editor.  Therefore, I think that we should keep our traditional
behavior with deny-list.

This patch makes `FragmentFromPasteCreator` delete list elements which have no
list item elements and are empty from the inserting document fragment.

Differential Revision: https://phabricator.services.mozilla.com/D136211
2022-02-02 00:44:54 +00:00
Masayuki Nakano
df8490248f Bug 787434 - part 1: Make HTMLEditor stop removing empty elements of inserted content r=m_kato
This is same issue as bug 1747008, but the remover is different method, that is
`HTMLEditor::RemoveEmptyNodesIn` called by
`HTMLEditor::OnEndHandlingTopLevelEditSubActionInternal`.  It should be called
only when the flag which was added by bug 1747008 is **not** set to `false`.

Differential Revision: https://phabricator.services.mozilla.com/D136210
2022-02-02 00:44:53 +00:00
Masayuki Nakano
ef75bd0339 Bug 1747008 - Make HTMLEditor::OnEndHandlingTopLevelEditSubActionInternal stop stripping empty inline elements if they may be inserted intentionally r=m_kato
Starting from bug 1730429, we strip empty inline elements at caret for
compatibility with Blink/WebKit.  However, we should not do it for the elements
which are intentionally inserted (from `inserthtml` command, paste and DnD).

All the cases are handled by `HTMLEditor::HTMLWithContextInserter` so that
it should prevent the new clean up with `TopLevelEditSubActionData`.

Note that `inserthtml` command handling of Blink is really odd.  It inserts
the empty inline elements of the adding testcases into different place so that
Chrome does not pass the new tests.  However, it does not make sense and I
believe that it's out of scope of this bug.

Differential Revision: https://phabricator.services.mozilla.com/D135195
2022-01-07 03:08:41 +00:00
Tom Schuster
e27e43753e Bug 1666582 - Remove NeedsSubjectPrincipal/ from chrome-only DataTransfer APIs. r=annyG,emilio
Differential Revision: https://phabricator.services.mozilla.com/D134932
2022-01-05 12:48:23 +00:00
Masayuki Nakano
8ce63d4397 Bug 1740858 - Improve SplitNodeResult r=m_kato
First, left/right node accessors are not used so that we can get rid of them.
However, we should have similar methods which can retrieve original node and
new node.  Therefore, this adds `GetNewContent()` and `GetOriginalContent()`.

Next, `SplitPoint()` should return both `EditorDOMPoint` and `EditorRawDOMPoint`
for avoiding unnecessary conversion from `EditorRawDOMPoint` to
`EditorDOMPoint`.  Therefore, this patch makes it a template method too.

Finally, this patch adds helper methods to get point of each related content.
E.g., `AtNewContent()` corresponding to `GetNewContent()`.

Differential Revision: https://phabricator.services.mozilla.com/D131748
2021-11-24 00:56:33 +00:00
Masayuki Nakano
1e39247e59 Bug 1740859 - part 2: Make HTMLEditor::SplitNodeDeepWithTransaction() callers omit checking whether the editor is destroyed r=m_kato
It touches the DOM tree only with `SplitNodeTransaction()` and it now returns
`NS_ERROR_EDITOR_DESTROYED` so that the callers don't need to check whether
the editor is destroyed or alive by themselves.

Depends on D131043

Differential Revision: https://phabricator.services.mozilla.com/D131044
2021-11-15 02:29:48 +00:00