Commit Graph

9932 Commits

Author SHA1 Message Date
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
Masayuki Nakano
6cbea10c99 Bug 1632724 - part 1: Move common methods for handling delete selection to EditorBase r=m_kato
`DeleteSelection*()` are members of `TextEditor`, but they are also used by
`HTMLEditor`.  Therefore, they and pref cache members for them should be
in `EditorBase` too.

Depends on D71911

Differential Revision: https://phabricator.services.mozilla.com/D72290
2020-04-24 14:55:09 +00:00
sanketh
b2456e6ee7 Bug 1320229 - allow user pastes longer than input maxlength r=masayuki
Currently, all input (including user pastes) to an input field is truncated to
`maxlength`. This diff disables truncation for user pastes.

When (1) `GetEditAction` is `ePaste`, `ePasteAsQuotation`, `eDrop`, or
`eReplaceText` (ie we are dealing with a paste) and (2) `GetEditActionPrincipal`
is `nullptr` (ie we are dealing with a user edit and not a JS edit), allow a
paste without truncation. That means that, in this case, we will return
`EditActionIgnored` instead of trying to truncate the string.

This behavior is controlled by a new preference `editor.truncate_user_pastes`
which is `false` by default (set in `StaticPrefList.yaml`).

We also modify `editor/libeditor/tests/test_bug603556.html` which currently
expects the output of a paste longer than maxlength to be truncated.

Testing: Created
`editor/libeditor/tests/test_pasting_text_longer_than_maxlength.html` which
checks if a user can paste a password longer than `maxlength` and if the field
is then marked as `tooLong` (this was the original concern of the reporter of
Bug 1320229), and
`editor/libeditor/tests/test_setting_value_longer_than_maxlength_with_setUserInput.html`
which checks if `eReplaceText` has consistent behavior regardless of whether the
field has an associated editor (this test works by calling `setUserInput()`
before and after the element gets focus.) `./mach test editor/libeditor` tests
pass.

Differential Revision: https://phabricator.services.mozilla.com/D71689
2020-04-27 01:29:43 +00:00
Simon Giesecke
9cc891f41f Bug 1628715 - Part 5: Add MOZ_NONNULL_RETURN to infallible nsTArray::InsertElementsAt. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D70403
2020-04-24 13:26:13 +00:00
Masayuki Nakano
09160b3e7b Bug 1632021 - part 4: Get rid of IID of InsertTextTransaction and CompositionTransaction r=m_kato
`EditTransactionBase::GetAs*Transaction()` should be used instead.

Differential Revision: https://phabricator.services.mozilla.com/D71911
2020-04-23 12:28:39 +00:00
Masayuki Nakano
14c56a78ab Bug 1632021 - part 3: Get rid of nsIAbsorbingTransaction r=m_kato
It's inherited only by `PlaceholderTransaction` and used only for QI.
Therefore, we can get rid of it.

Additionally, this makes storing `PlaceholderTransaction` and
`CompositionTransaction` in `PlaceholderTransaction` faster and safer with
`WeakPtr`.

Finally, this makes `PlaceholderTransaction` always have non-null name
because it caused a lot of useless warnings in
`EditAggregationTransaction::GetName()` and
`PlaceholderTransaction::GetTxnName()`.

Differential Revision: https://phabricator.services.mozilla.com/D71910
2020-04-23 10:46:55 +00:00
Masayuki Nakano
47acd7e8de Bug 1632021 - part 2: Add nsITransaction::GetAsEditTransactionBase() r=m_kato
In a lot of places in libeditor, we do nothing if given transaction is not
our edit transaction classes' instance.  Therefore, it's better to have
casting virtual method in `nsITransaction` for performance because QI cost
may not be cheap.

Differential Revision: https://phabricator.services.mozilla.com/D71908
2020-04-23 07:02:16 +00:00
Masayuki Nakano
3aa3b37a40 Bug 1632021 - part 1: Add GetAs*Transaction() methods to every subclasses of EditTransactionBase r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D71907
2020-04-23 05:46:43 +00:00
Jonathan Kew
d0c11aa6d1 Bug 425915 - Add Thai movement-by-word testcases. r=m_kato
Depends on D71206

Differential Revision: https://phabricator.services.mozilla.com/D71621
2020-04-23 14:19:44 +00:00
Mark Banner
91b65009eb Bug 1549945 - Avoid the need for import-globals-from when (x)html files load scripts via /tests/. r=mossop
When loading from /tests/ we can strip off the /tests/ part and find the file with the rest of the path.

Differential Revision: https://phabricator.services.mozilla.com/D71411
2020-04-20 16:15:11 +00:00
Emilio Cobos Álvarez
31821e1fc4 Bug 1449522 - Remove nsIEditorStyleSheets. r=masayuki,m_kato
Users have much better, easier alternatives, like
DOMWindowUtils.{loadSheetUsingURIString,removeSheet}, which we use to
replace the only caller that exists in mozilla-central (the editor
element, which loads EditorOverride.css).

This allows to clean up the style system and editor. There are other
callers in comm-central, but it seems they can switch to DOMWindowUtils
trivially, as the DOMWindowUtils APIs also use the system principal and
thus they can load any URL.

I'll make sure to give them some time with the migration and/or help
out of course.

Differential Revision: https://phabricator.services.mozilla.com/D71263
2020-04-17 22:54:48 +00:00
Masayuki Nakano
9f7fb5bb0f Bug 1630168 - Make HTMLEditor stop adding same runnable method into the queue r=m_kato
When `HTMLEditor` is notified of content changes, it may add a runnable method
`HTMLEditor::OnModifyDocument` or `HTMLEditor::NotifyRootChanged` for each
notification. However, their code do not need running twice nor more. This
could cause performance issues on complicated web apps which sets `innerHTML`
at every key press.

Differential Revision: https://phabricator.services.mozilla.com/D71001
2020-04-16 15:15:26 +00:00
Masayuki Nakano
5a3a0d40e7 Bug 1627175 - part 10: Move HTMLEditor::GetEnclosingTable() to HTMLEditUtils r=m_kato
Depends on D70883

Differential Revision: https://phabricator.services.mozilla.com/D70884
2020-04-16 14:53:54 +00:00
Masayuki Nakano
29b0030c60 Bug 1627175 - part 9: Move HTMLEditor::GetBlock() and HTMLEditor::GetBlockNodeParent() to HTMLEditUtils r=m_kato
This patch also names the former to `GetInclusiveAncestorBlockElement()` and
the latter to `GetAncestorBlockElement()` for consistency with modern DOM
API names.

Depends on D70882

Differential Revision: https://phabricator.services.mozilla.com/D70883
2020-04-16 14:19:18 +00:00
Masayuki Nakano
1ee4f00529 Bug 1627175 - part 8: Move EditorBase::IsContainer() to HTMLEditUtils r=m_kato
It's a virtual method which always returns true if `TextEditor`.  Therefore,
we can move it into `HTMLEditUtils` and we can make the only caller of
`EditorBase` check `IsTextEditor()` instead.

Depends on D70880

Differential Revision: https://phabricator.services.mozilla.com/D70882
2020-04-16 10:32:26 +00:00
Masayuki Nakano
5bcef30e8b Bug 1627175 - part 7: Move EditorBase::IsPaddingBRElementForEmptyLastLine() to EditorUtils r=m_kato
It's also used in `<textarea>` so that it should be in `EditorUtils` rather
than `HTMLEditUtils`.

Depends on D70879

Differential Revision: https://phabricator.services.mozilla.com/D70880
2020-04-16 05:07:13 +00:00
Masayuki Nakano
73992aad12 Bug 1627175 - part 6: Move "can contain" utility methods to HTMLEditUtils r=m_kato
Actually, they are used only by `HTMLEditor` because `TextEditor` finally
returns `true` for any cases in `TextEditor`, but the users are overridden by
`HTMLEditor` and never used by `HTMLEditor`.  Therefore, we cam move them
into `HTMLEditUtils`.

Depends on D70878

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

--HG--
extra : moz-landing-system : lando
2020-04-16 04:38:40 +00:00
Masayuki Nakano
aeeb323f57 Bug 1627175 - part 5: Get rid of EditorBase::GetChildOffset() and EditorBase::GetNodeLocation() r=m_kato
Their users should use `EditorDOMPoint` or something instead.

This patch cleans up `EditorBase::DoJoinNodes()` too because of their heavy
user.  It requires only joined nodes because `aParent` is used only for
removing `aContentToJoin`, but we now have `nsINode::Remove()` which does
not require parent node and never fails.

Depends on D70877

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

--HG--
extra : moz-landing-system : lando
2020-04-16 01:21:17 +00:00
Masayuki Nakano
8b3995f814 Bug 1627175 - part 4: Get rid of EditorBase::IsText() r=m_kato
A lot of editor code refers `nsINode::IsText()` directly so that we don't
need to keep the too simple editor API anymore.

Depends on D70876

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

--HG--
extra : moz-landing-system : lando
2020-04-15 16:05:30 +00:00
Masayuki Nakano
7d9227e497 Bug 1627175 - part 3: Move EditorBase::AreNodesSameType() to HTMLEditUtils r=m_kato
It's only non-`HTMLEditor` user is `EditorBase::JoinNodesDeepWithTransaction()`,
but it's called only by `HTMLEditor`.  Therefore, we can move it into
`HTMLEditUtils` and move `EditorBase::JoinNodesDeepWithTransaction()` to
`HTMLEditor`.

Depends on D70875

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

--HG--
extra : moz-landing-system : lando
2020-04-15 15:55:20 +00:00
Masayuki Nakano
4cc133b568 Bug 1627175 - part 2: Move EditorBase::IsModifiableNode(), EditorBase::IsEditable(), EditorBase::IsTextElementOrText() and EditorBase::IsPaddingBRElementForEmptyEditor() to EditorUtils r=m_kato
Due to the include hell, `EditorBase.h` cannot include `EditorUtils.h`.
Therefore we need these 3 methods once.  Additionally, `IsModifiableNode()`
is really odd method and looks like that it's used for the following 2 purposes:
1. Simply can be editable.
2. Can be removed from parent.

For the former case, we should sort out it with
`EditorUtils::IsEditableContent()`, but for now, this patch moves it to
`HTMLEditUtils::IsSimplyEditable()`.  On the other hand, for the latter case,
we obviously has a bug.  Therefore, this patch creates
`HTMLEditUtils::IsRemovableFromParentNode()` and make it check whether the
removing node is also editable.

Unfortunately, `EditorUtils::IsEditableContent()` needs to take editor type.
But it's most callers are in `HTMLEditor` and most of remains are in
common methods of `EditorBase`.  I guess we could remove this ugly argument
in the future.

Depends on D70874

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

--HG--
extra : moz-landing-system : lando
2020-04-15 15:27:38 +00:00
Masayuki Nakano
7ae8033ee1 Bug 1627175 - part 1: Move HTMLEditor::IsBlockNode() into HTMLEditUtils r=m_kato
`HTMLEditor::IsBlockNode()` is a virtual method derived from
`EditorBase::IsBlockNode()`.  For the performance, `EditorBase`'s one just
return false for text node and `<br>` element.  However, these check cost
is really cheap in these days.  Therefore, we can make `TextEditor` also
use rich API.

This patch moves `HTMLEditor::NodeIsBlockStatic()` and
`HTMLEditor::NodeIsInlineStatic()` to `HTMLEditUtils`, and removes the wrapper
of the fommer, `HTMLEditor::IsBlockNode()` and `WSRunScanner::IsBlockNode()`.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 13:55:36 +00:00
Cameron McCormack
9e9b510199 Bug 1629474 - Avoid warnings when initializing empty editors. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D70669

--HG--
extra : moz-landing-system : lando
2020-04-13 08:55:41 +00:00
Makoto Kato
67f4ec1ac0 Bug 1628192 - Use more const declarations on editor classes. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D70146

--HG--
extra : moz-landing-system : lando
2020-04-13 01:43:41 +00:00
Masayuki Nakano
39b3ec6675 Bug 1624007 - Don't check IsSelectionRangeContainerNotContent() for/in GetElementOrParentElement*() r=m_kato
We can relax about `GetElementOrParentElement*()` because they just return
`nullptr` when selection anchor is a `Document` node.

Additionally, this patch renames the internal APIs to the names similar to
modern DOM API.

Finally, this adds automated test for
`nsIHTMLEditor.getElementOrParentByTagName()`.

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

--HG--
extra : moz-landing-system : lando
2020-04-09 10:10:36 +00:00
Masayuki Nakano
9f10b2a2a0 Bug 1627573 - part 4: Mark CSSEditUtils methods which refer computed style as MOZ_CAN_RUN_SCRIPT r=m_kato
When it refers computed value of style, it may flush pending notifications.
Therefore, they should be marked as `MOZ_CAN_RUN_SCRIPT`.

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

--HG--
extra : moz-landing-system : lando
2020-04-09 10:10:34 +00:00
Masayuki Nakano
32e8f30b27 Bug 1627573 - part 3: Get rid of CSSEditUtils::GetSpecifiedCSSEquivalentToHTMLInlineStyleSet() because of unused r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D70150

--HG--
extra : moz-landing-system : lando
2020-04-09 10:08:52 +00:00
Masayuki Nakano
ea92dfc783 Bug 1627573 - part 2: Split public methods of CSSEditUtils which work with both specified values and computed values r=m_kato
Some methods take `StyleType` to work them with specified values or computed
values.  This method hides `StyleType` into `CSSEditUtils` and splits the
public methods which took `StyleType` to 2 methods, one is for working with
specified values, the other is for working with computed values.

Additionally, this patch fixes some argument name and type.

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

--HG--
extra : moz-landing-system : lando
2020-04-09 10:08:37 +00:00
Masayuki Nakano
ac60892e7d Bug 1627573 - part 1: Remove unused CSSEditUtils::IsCSSEquivalentToHTMLInlineStyleSet() overload r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D70148

--HG--
extra : moz-landing-system : lando
2020-04-09 10:08:09 +00:00
Bogdan Tara
a81dc418ef Backed out 4 changesets (bug 1627573) for bustages complaining about CSSEditUtils.cpp CLOSED TREE
Backed out changeset 8ced0e6ed31e (bug 1627573)
Backed out changeset 07b5b67c32c2 (bug 1627573)
Backed out changeset 04734d17e8d0 (bug 1627573)
Backed out changeset 77486fd073af (bug 1627573)
2020-04-09 10:58:46 +03:00
Masayuki Nakano
1142d3105a Bug 1627573 - part 4: Mark CSSEditUtils methods which refer computed style as MOZ_CAN_RUN_SCRIPT r=m_kato
When it refers computed value of style, it may flush pending notifications.
Therefore, they should be marked as `MOZ_CAN_RUN_SCRIPT`.

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

--HG--
extra : moz-landing-system : lando
2020-04-08 15:51:17 +00:00
Masayuki Nakano
2f8cf1135d Bug 1627573 - part 3: Get rid of CSSEditUtils::GetSpecifiedCSSEquivalentToHTMLInlineStyleSet() because of unused r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D70150

--HG--
extra : moz-landing-system : lando
2020-04-08 13:33:12 +00:00
Masayuki Nakano
024ef5568b Bug 1627573 - part 2: Split public methods of CSSEditUtils which work with both specified values and computed values r=m_kato
Some methods take `StyleType` to work them with specified values or computed
values.  This method hides `StyleType` into `CSSEditUtils` and splits the
public methods which took `StyleType` to 2 methods, one is for working with
specified values, the other is for working with computed values.

Additionally, this patch fixes some argument name and type.

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

--HG--
extra : moz-landing-system : lando
2020-04-08 13:32:28 +00:00
Masayuki Nakano
b07119c5f5 Bug 1627573 - part 1: Remove unused CSSEditUtils::IsCSSEquivalentToHTMLInlineStyleSet() overload r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D70148

--HG--
extra : moz-landing-system : lando
2020-04-08 12:08:02 +00:00
Mike Hommey
ac5b6e6cd0 Bug 1628200 - Fix config/tests/test_mozbuild_reading.py. r=rstewart
Since the test goes through all moz.build files disregarding DIRS and
the conditions that may disable directories, in some cases, moz.builds
can fail to be evaluated properly because of missing variables in
config.status. This time (because it's not the first), it's
LLVM_DLLTOOL.

After fixing that, it turns out many of the files/directories pointed to
by Files() directives were removed or moved.

While here, make the test script python3-ready.

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

--HG--
extra : moz-landing-system : lando
2020-04-09 00:24:29 +00:00
Boris Chiou
3830098b51 Bug 1625970 - Compare isSet flags between first value and others for text-decoration related HTML properties. r=masayuki
underline and strike use `text-decoration` property, which is a
shorthand and may include other longhand property values, e.g.
`text-decoration-color`. In order to set `aAll` flag correctly, we
should not just compare the computed values between `firstValue` and
`theValue`. This patch makes the HTMLStyleEditor more independent of
the serializations of the computed values on text-decoration.

If https://github.com/w3c/editing/issues/241 is accepted, we can just
replace `text-decoration` with `text-decoration-line` and drop this
patch.

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

--HG--
extra : moz-landing-system : lando
2020-04-04 09:29:08 +00:00
Masayuki Nakano
5252248a15 Bug 1496320 - part 1: Make TypeInState clear "link style" when it detects caret coming from outside of current link r=m_kato
Only `TypeInState` stores last caret position.  So, only it can detect the
case caret is moved from outside of `<a href>` element and is now at start
or end of it.

Note that this patch does not assume `<a href>` has an empty text node with
another inline element.  If we supported it, the loop would be more complicated
and it's really unrealistic edge case.  Therefore, it's reasonable to ignore
the case.

And also this patch works with `ArrowUp`/`ArrowDown`/`PageUp`/`PageDown`
cases.  However, I have no idea to reject such cases.  But I guess that
it does not so bad behavior for users because caret does not moved in
a text node in `<a href>`.

Depends on D69479

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

--HG--
extra : moz-landing-system : lando
2020-04-06 03:52:53 +00:00
Masayuki Nakano
6be7ff90be Bug 1496320 - part 0: Add automated test r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D69479

--HG--
extra : moz-landing-system : lando
2020-04-06 01:20:00 +00:00
Masayuki Nakano
8390d2e8bc Bug 1619914 - part 2: Mark transaction class methods and their caller methods as `MOZ_CAN_RUN_SCRIPT r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D69303

--HG--
extra : moz-landing-system : lando
2020-04-03 08:32:01 +00:00
Masayuki Nakano
3f95e60b07 Bug 1619914 - part 1: Make each transaction class grab their members with local variable before touching the DOM tree r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D69302

--HG--
extra : moz-landing-system : lando
2020-04-03 08:30:37 +00:00
Mihai Alexandru Michis
2f9f34de0e Backed out 2 changesets (bug 1619914) for causing gtest failures regarding TransactionManager.
CLOSED TREE

Backed out changeset d3816f82c0b9 (bug 1619914)
Backed out changeset 876b1031a6ae (bug 1619914)
2020-04-03 07:57:06 +03:00
Masayuki Nakano
eb881aff87 Bug 1619914 - part 2: Mark transaction class methods and their caller methods as `MOZ_CAN_RUN_SCRIPT r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D69303

--HG--
extra : moz-landing-system : lando
2020-04-03 01:39:36 +00:00
Masayuki Nakano
5fb2cba97c Bug 1619914 - part 1: Make each transaction class grab their members with local variable before touching the DOM tree r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D69302

--HG--
extra : moz-landing-system : lando
2020-04-03 01:38:22 +00:00
Masayuki Nakano
54d761893e Bug 1625531 - Make HTMLEditor::GetParagraphState() not check selection r=m_kato
The selection validation should be checked in the constructor of
`ParagraphStateAtSelection` because
`EditorBase::IsSelectionRangeContainerNotContent()` needs edit action data.

Additionally, this patch adds a test for `nsIHTMLEditor.getParagraphState()`.

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

--HG--
extra : moz-landing-system : lando
2020-04-03 00:49:43 +00:00
Masayuki Nakano
80c22749bc Bug 1625755 - Make HTMLEditor::DoInsertHTMLWithContext() check whether inserted content stays at expected point before modifying next insertion point r=m_kato
I'm still not sure how the crash occurs especially on Thunderbird.  However,
it could be possible if `pointToInsert` is modified with an orphan node (i.e.,
when `pointToInsert.GetContainer()` returns `nullptr`).  Therefore, this patch
makes it check whether the inserted node stays at expected position or not,
and if it's not, make it keep inserting next content nodes to previous position
because it must look like odd that inserting to different position.

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

--HG--
extra : moz-landing-system : lando
2020-04-02 14:03:14 +00:00
Chris Peterson
589528cb8d Bug 1625834 - Replace MOZ_MUST_USE with [[nodiscard]] in editor. r=masayuki
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.

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

--HG--
extra : moz-landing-system : lando
2020-04-02 05:43:31 +00:00
Masayuki Nakano
72cf6dc13d Bug 1624011 - Make constructor of AlignStateAtSelection not assert when there is no selection ranges r=m_kato
`AlignStateAtSelection` class is instantiated outside of editor class so that
we shouldn't make each user guarantee that there is selection range
(fortunately, the putting off cost is really low).

And as far as I tested, Blink and WebKit does not throw exception when
`Document.qeuryCommand*("justify*")` is called without selection ranges.
So, this patch also prevents exception in this situation.

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

--HG--
extra : moz-landing-system : lando
2020-04-01 06:38:16 +00:00
Masayuki Nakano
37f3ac6663 Bug 1625633 - part 4: Move WSType into WSRunScanner to hide it from HTMLEditor r=m_kato
Now, `WSType` is used only by `WSRunScanner`, `WSRunObject` and `WSScanResult`.
We should hide this mysterious `enum` from other classes for making other
developers easier to understand.  Therefore, this patch moves `WSType` into
`WSScanResult` and share it with `WSRunScanner` with making them friends.

Depends on D68675

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

--HG--
extra : moz-landing-system : lando
2020-03-31 15:46:56 +00:00
Masayuki Nakano
85e5b5f208 Bug 1625633 - part 3: Get rid of WSFragment::mType r=m_kato
Surprisingly, each value meaning of `WSFragment::mType` is different from
`WSFragment::mRightType` and `WSFragment::mLeftType`.  It uses only 3 bits,
`WSType::normalWS`, `WSType::leadingWS` and `WSType::trailingWS`.
According to the second `if` block of `WSRunScanner::GetRuns()`, the latter
2 values mean whether the fragment starts from and/or ends by a hard line.
And also, according to there, `normalWS` means the run is visible or not.
(However, according to the first `if` block, `Visible::Yes` might be set to
for empty fragment too, but I have no better idea of its name.)

Therefore, `mType & WSType::leadningWS` can call "is start of hard line",
`mType & WSType::trailingWS` can call "is end of hard line",
`mType == WSType::normalWS` can call "is visible and not edges of hard line"
and `mType & WSType::normalWS` can call "is not edges of hard line".

So, 3 `bool` members can represent all of their status.  Therefore, we should
get rid of this odd use case of `WSType`.

Depends on D68674

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

--HG--
extra : moz-landing-system : lando
2020-03-31 12:15:53 +00:00
Masayuki Nakano
d7856a0043 Bug 1625633 - part 2: Encapsulate WSFragment::mLeftType r=m_kato
Similarly, it indicates the previous content type of the fragment.

Depends on D68673

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

--HG--
extra : moz-landing-system : lando
2020-03-30 09:22:21 +00:00
Masayuki Nakano
2135d8a449 Bug 1625633 - part 1: Encapsulate WSFragment::mRightType r=m_kato
It means why the `WSFragment` ends by.  I.e., it tells next content type of
the fragment.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 09:13:49 +00:00
Arthur Iakab
7e869be20c Backed out changeset 5e89020502f7 (bug 1625834) for causing build bustages
CLOSED TREE
2020-04-01 04:32:11 +03:00
Chris Peterson
b469a9d9db Bug 1625834 - Replace MOZ_MUST_USE with [[nodiscard]] in editor. r=masayuki
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 06:45:40 +00:00
Emilio Cobos Álvarez
bf84528d4f Bug 1098151 - Make empty editable blocks at least one line-height tall. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D68586

--HG--
extra : moz-landing-system : lando
2020-03-30 17:20:06 +00:00
Cosmin Sabou
0f415974f2 Backed out 2 changesets (bug 1098151) for refrest failures on overflow.html. CLOSED TREE
Backed out changeset 1893ec9ff2de (bug 1098151)
Backed out changeset 66e5251cc1e2 (bug 1098151)
2020-03-30 19:10:13 +03:00
Emilio Cobos Álvarez
0bd5a5bb55 Bug 1098151 - Make the test a bit more forgiving to pass on Mac, like the following test.
MANUAL PUSH: Fix orange.

CLOSED TREE
2020-03-30 18:03:10 +02:00
Emilio Cobos Álvarez
f846b9b159 Bug 1098151 - Make empty editable blocks at least one line-height tall. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D68586

--HG--
extra : moz-landing-system : lando
2020-03-30 13:50:04 +00:00
Masayuki Nakano
fc75118988 Bug 1618091 - Make editor dispatch beforeinput event when Document.execCommand() is called by addon r=smaug
Discussion in
* https://github.com/w3c/input-events/issues/91
* https://github.com/w3c/editing/issues/200

Web developers must want to handle `beforeinput` events which are caused by
addons because addon's behavior is exactly same as default action of browser
from point of view of web apps.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 01:47:53 +00:00
Simon Giesecke
d3deabac64 Bug 1613363 - Maybe<T> should preserve trivial copy-constructability and destructability of T. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68173

--HG--
extra : moz-landing-system : lando
2020-03-27 14:22:51 +00:00
Masayuki Nakano
46be890959 Bug 1623913 - Make WSRunObject::PrepareToDeleteRangePriv() invalidate child of mScanStartPoint before reusing it r=m_kato
I give up to write a clean patch for this bug with current design.  The trigger
is indeed bug 1618089, but this is a hidden regression of bug 1530649.

Starting from bug 1530649, `WSRunObject` started to use `EditorDOMPoint` for
storing the specified point.  And it may store (or only store) child node.
Therefore, if it points a text node and it's removed by
`WSRunObject::DeleteRange()`, the point becomes invalid even if its offset
is still valid.  Therefore, we should make `mStartScanPoint` and `mEndScanPoint`
forget their child before DOM tree change ideally, but it means that we need
to compute offset of the child every time before changing the DOM tree.  We
cannot accept this safest approach due to performance reason.

Therefore, this patch just invalidates `mStartScanPoint`'s child node only when
it's reused after the DOM tree is modified.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 05:53:22 +00:00
Masayuki Nakano
0ccabd567d Bug 1620504 - part 23: Fix some inconsistent coding style in editor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D67132

--HG--
extra : moz-landing-system : lando
2020-03-22 10:46:39 +00:00