Commit Graph

9407 Commits

Author SHA1 Message Date
Masayuki Nakano
2271a1a433 Bug 1574852 - part 18: Move HTMLEditRules::BustUpInlinesAtBRs() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42789

--HG--
extra : moz-landing-system : lando
2019-08-23 04:14:56 +00:00
Masayuki Nakano
6cb490583d Bug 1574852 - part 17: Move HTMLEditRules::GetInnerContent() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42788

--HG--
extra : moz-landing-system : lando
2019-08-23 03:35:40 +00:00
Masayuki Nakano
9cd140da4a Bug 1574852 - part 16: Move HTMLEditRules::BustUpInlinesAtRangeEndpoints() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42787

--HG--
extra : moz-landing-system : lando
2019-08-23 01:28:26 +00:00
Mirko Brodesser
460b937f0b Bug 1575584: prevent reading uninitialized variable in TextEditor::ComputeValueInternal. r=masayuki
The fix here is to first check `NS_FAILED(rv)`, because if that's the
case, `cancel` wasn't necessarily set to a value.

As best practice I initialized `cancel` and `handled` with default
values.

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

--HG--
extra : moz-landing-system : lando
2019-08-23 09:25:00 +00:00
Masayuki Nakano
495df615e7 Bug 1574852 - part 15: Move HTMLEditUtils::GetHighestInlineParent() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42786

--HG--
extra : moz-landing-system : lando
2019-08-22 08:47:50 +00:00
Masayuki Nakano
bee148c761 Bug 1574852 - part 14: Move HTMLEditRules::InsertBRElement() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42785

--HG--
extra : moz-landing-system : lando
2019-08-22 08:33:28 +00:00
Masayuki Nakano
6c17e180aa Bug 1574852 - part 13: Move HTMLEditRules::CanContainParagraph() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42784

--HG--
extra : moz-landing-system : lando
2019-08-22 08:29:38 +00:00
Masayuki Nakano
d0797846a4 Bug 1574852 - part 12: Move HTMLEditRules::SplitMailCites() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42783

--HG--
extra : moz-landing-system : lando
2019-08-22 08:29:16 +00:00
Masayuki Nakano
ba9cfcb2a7 Bug 1574852 - part 11: Move HTMLEditRules::GetTopEnclosingMailCite() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42782

--HG--
extra : moz-landing-system : lando
2019-08-22 13:11:16 +00:00
Masayuki Nakano
f23c09bbd0 Bug 1574852 - part 10: Move HTMLEditRules::WillInsertText() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42781

--HG--
extra : moz-landing-system : lando
2019-08-22 08:01:39 +00:00
Masayuki Nakano
3822de5442 Bug 1574852 - part 9: Move HTMLEditRules::CreateStyleForInsertText() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42780

--HG--
extra : moz-landing-system : lando
2019-08-22 07:33:41 +00:00
Masayuki Nakano
7ed950a31c Bug 1574852 - part 8: Move HTMLEditRules::WillInsert() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42778

--HG--
extra : moz-landing-system : lando
2019-08-22 07:08:19 +00:00
Masayuki Nakano
ed5707df5b Bug 1574852 - part 7: Get rid of HTMLEditRules::ClearCachedStyles() r=m_kato
It's declared, but not defined.

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

--HG--
extra : moz-landing-system : lando
2019-08-22 06:03:52 +00:00
Masayuki Nakano
f135e00456 Bug 1574852 - part 6: Move HTMLEditRules::CacheInlineStyles() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42776

--HG--
extra : moz-landing-system : lando
2019-08-22 05:13:50 +00:00
Masayuki Nakano
ab4e7103b0 Bug 1574852 - part 5: Move HTMLEditRules::ReapplyCachedStyles() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42775

--HG--
extra : source : 6456b7a6cc679d744637e639d37cb73e795c1357
2019-08-22 05:12:28 +00:00
Noemi Erli
8586a20580 Backed out changeset 6456b7a6cc67 (bug 1574852) for failing in browser_html_tooltip-05.js 2019-08-22 11:41:29 +03:00
Masayuki Nakano
df6c33c509 Bug 1574852 - part 5: Move HTMLEditRules::ReapplyCachedStyles() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42775

--HG--
extra : moz-landing-system : lando
2019-08-22 05:12:28 +00:00
Masayuki Nakano
0d08551fbd Bug 1574852 - part 4: Move HTMLEditRules::GetInlineStyles() to HTMLEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42774

--HG--
extra : moz-landing-system : lando
2019-08-22 01:10:30 +00:00
Makoto Kato
b4d246692c Bug 1574596 - Keep editing UI until PresShell is really gone. r=masayuki
This is regression by bug 1543312.

By bug 1543312, we destroy editor when destroying PresShell. But when destroying PresShell, editor doesn't remove anonymous content of editing UI from PresShell. Then, when destroying the frame manager in `PresShell::Destroy`, it hits assertion due to uncomposed doc.

We shouldn't hide editing UI during destroying PresShell and we should hide it after destroyed.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 06:05:16 +00:00
Masayuki Nakano
3e52c98a82 Bug 1574852 - part 3: Get rid of HTMLEditRules::InitFields() r=m_kato
It's called immediately before setting `mHTMLEditor` and sets `mHTMLEditor` to
`nullptr`.  So, it does nothing actually.  We can get rid of it.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 07:14:09 +00:00
Masayuki Nakano
d22d8c911e Bug 1574852 - part 2: Replace HTMLEditRules::IsInlineNode() with HTMLEditor::NodeIsInlineStatic() r=m_kato
`HTMLEditRules::IsInlineNode()` is a wrapper of
`HTMLEditor::NodeIsInlineStatic()`, but returns opposite value.

This patch moves it into `HTMLEditor` and names it with same rule as
`NodeIsBlockStatic()`.

Note that this method may return true if given node is unexpected node type.
E.g., comment node, CDATA node, etc.  However, it's not scope of this bug.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 07:13:41 +00:00
Masayuki Nakano
24e7c7235d Bug 1574852 - part 1: Get rid of HTMLEditRules::IsBlockNode() r=m_kato
`HTMLEditRules::IsBlockNode()` just wraps `HTMLEditor::NodeIsBlockStatic()`
and all its users will be moved into `HTMLEditor`.  Therefore, we should
unwrap it.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 06:21:05 +00:00
Masayuki Nakano
eeb6d0434a Bug 1572685 - part 13: Get rid of HTMLEditRules::mReturnInEmptyLIKillsList r=m_kato
`HTMLEditRules::mReturnInEmptyLIKillsList` stores value of
`editor.html.typing.returnInEmptyListItemClosesList` at construction, and it's
set to true unless the pref value is `"false"`.  However, this pref isn't
registered in anywhere (all.js, firefox.js, etc) nor used in comm-central
and BlueGriffon.

Even if I search the pref in the web, I don't see any information so that
this hidden pref must not be used anybody.  Therefore, this patch just removes
this member.

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

--HG--
extra : moz-landing-system : lando
2019-08-20 01:53:35 +00:00
Masayuki Nakano
47e3467fa6 Bug 1572685 - part 12: Move HTMLEditRules::mListenerEnabled to EditSubActionData r=m_kato
This patch includes a logic change.  `HTMLEditRules::mListenerEnabled` is used
for storing 2 state.  One is that whether `HTMLEditRules` can handle the legacy
listener methods (they came from `nsIEditActionListener`) with `mHTMLEditor` or
not.  The other is that whether current edit sub-action handler temporarily
disables the listeners for performance or not.

For the former, we can check same result with `HTMLEditRules::mInitialized`
and `HTMLEditRules::mHTMLEditor`.

However, the latter, current design is obviously wrong.  Currently,
`HTMLEditRules::mListenerEnabled` is set only to `false` temporarily from
`WillInsertText()`, but the state will be affected to other edit sub-actions
which are nested by mutation event listeners.  So, currently,
`HTMLEditRules::mDocChangeRange` may not contain modified range caused by
nested edit sub-actions.

For solving this bug, this patch moves it into `EditSubActionData` rather
than `HTMLEditor` and `TopLevelEditSubActionData`.

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

--HG--
extra : moz-landing-system : lando
2019-08-20 01:53:02 +00:00
Masayuki Nakano
d741d7dbe7 Bug 1572685 - part 11: Move HTMLEditRules::JoinOffset to EditorBase::EditSubActionData r=m_kato
The members of `HTMLEditRules` which are used only while `WillDoAction()` and
`DidDoAction()` are called should be moved to specific stack only struct
`EditorBase::EditSubActionData`.

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

--HG--
extra : moz-landing-system : lando
2019-08-20 01:52:50 +00:00
Masayuki Nakano
f3a6c9590b Bug 1572685 - part 10: Get rid of HTMLEditRules::mUtilRange r=m_kato
`HTMLEditRules::mUtilRange` is used only for the argument of
`HTMLEditRules::UpdateDocChangeRange()`.  However, it does not need to be
a range instance since it compares its start and
`TopLevelEditSubAction::mChangedRange->StartRef()`, and its end and
`TopLevelEditSubAction::mChangedRange->EndRef()`.  Therefore, with rewriting
it as taking 2 `EditorRawDOMPoint`s, we don't need `mUtilRange`.

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

--HG--
extra : moz-landing-system : lando
2019-08-20 01:52:23 +00:00
Masayuki Nakano
0cc09df825 Bug 1572685 - part 9: Move HTMLEditRules::mDocChangeRange to TopLevelEditSubActionData r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42104

--HG--
extra : moz-landing-system : lando
2019-08-20 01:51:59 +00:00
Masayuki Nakano
a2367ac28f Bug 1572685 - part 8: Move HTMLEditRules::mCachedStyles to TopLevelEditSubAction r=m_kato
This patch makes `StyleCache` not inherit `ItemProp` because `MOZ_COUNT_CTOR`
and `MOZ_COUNT_DTOR` do not work well with `AutoTArray` and there is no reason
to do that since nobody treat `StyleCache` instance with `ItemProp` pointer.

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

--HG--
extra : moz-landing-system : lando
2019-08-20 01:51:36 +00:00
Masayuki Nakano
d696ee098d Bug 1572685 - part 7: Move HTMLEditRules::mRangeItem to TopLevelEditSubActionData r=m_kato
For avoiding allocation cost of `RangeItem`, it should be stored by `HTMLEditor`
and reused by all `TopLevelEditSubActionData` instances for the editor instance.

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

--HG--
extra : moz-landing-system : lando
2019-08-20 01:51:19 +00:00
Masayuki Nakano
5f2af66e4b Bug 1572685 - part 6: Move HTMLEditRules::mNewBlock to TopLevelEditSubActionData r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42101

--HG--
extra : moz-landing-system : lando
2019-08-20 01:50:56 +00:00
Masayuki Nakano
0bc1ae3058 Bug 1572685 - part 5: Move HTMLEditRules::mRestoreContentEditableCount to TopLevelEditSubActionData r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42100

--HG--
extra : moz-landing-system : lando
2019-08-20 01:50:34 +00:00
Masayuki Nakano
7b09e44b5c Bug 1572685 - part 4: Move HTMLEditRules::mDidEmptyParentBlocksRemoved to TopLevelEditSubActionData r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42099

--HG--
extra : moz-landing-system : lando
2019-08-20 01:50:21 +00:00
Masayuki Nakano
8f2394e050 Bug 1572685 - part 3: Move HTMLEditRules::mDidRangedDelete to TopLevelEditSubActionData r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42098

--HG--
extra : moz-landing-system : lando
2019-08-20 01:50:04 +00:00
Masayuki Nakano
396a69a2bc Bug 1572685 - part 2: Move HTMLEditRules::mDidExplicitlySetInterLine to TopLevelEditSubActionData r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D42097

--HG--
extra : moz-landing-system : lando
2019-08-20 01:50:02 +00:00
Masayuki Nakano
992c1c0972 Bug 1572685 - part 1: Move HTMLEditRules::mDidDeleteSelection into AutoEditActionDataSetter r=m_kato
Most member variables of `HTMLEditRules` are temporary used while between
`BeforeEdit()` and `AfterEdit()` are called or `WillDoAction()` and
`DidDoAction()` are called.

The former means the data should be stored during top-level edit sub-action
is set.  Therefore, this patch creates a struct, `TopLevelEditSubActionData`
and make it a member of `AutoEditActionDataSetter`.  Then, makes
`EditorBase::TopLevelEditActionDataRef()` return reference of it.

And also this patch moves `HTMLEditRules::mDidDeleteSelection` into it.

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

--HG--
extra : moz-landing-system : lando
2019-08-20 01:50:00 +00:00
Mark Banner
ca74b508b7 Bug 1574915 - Fix some instances of using async functions as promise executors. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D42508

--HG--
extra : moz-landing-system : lando
2019-08-19 16:26:31 +00:00
Emilio Cobos Álvarez
bfcf9b881b Bug 1574544 - Remove now-unnecessary condition that makes the frame constructor get confused with editor anonymous nodes. r=mats
This condition was needed when FindInsertionPrevSibling and co didn't understand
display: contents.

Editor is pretty broken (and calls into PresShell::ContentRemoved directly, and
incorrectly, using anonymous nodes).

In this case we were taking the XBL path because of display: contents, which
means that we tried to seek to the editor anonymous node, and crash (since it's
not an explicit kid).

Editor needs to get fixed, but this is technically more correct and fixes the
crash, so we may as well take it in the interim.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 12:16:28 +00:00
Emilio Cobos Álvarez
6779b66f01 Bug 1571530 - Remove various bool arguments in sheet loader APIs. r=heycam
They're bad, specially if they do vastly different thing in overloaded
functions, like aUseSystemPrincipal and aIsPreload. :)

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

--HG--
extra : moz-landing-system : lando
2019-08-16 10:56:05 +00:00
Emilio Cobos Álvarez
2353359865 Bug 1571530 - Make Loader APIs return a Result. r=heycam
On the fence on this one, but I do think it's nicer.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 10:56:03 +00:00
Masayuki Nakano
0e763a968a Bug 1572681 - part 6: Move TextEditRules::mDidExplicitlySetInterline to HTMLEditRules r=m_kato
`TextEditRules::mDidExplicitlySetInterline` is set to true only by
`HTMLEditRules`, but `TextEditRules::DidDeleteSelection()` refers it.
So, it's enough to make `TextEditRules::DidDeleteSelection()` take the
value and we can move it into `HTMLEditRules`.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 08:53:45 +00:00
Masayuki Nakano
8870cb5d53 Bug 1572681 - part 5: Get rid of TextEditRules::mDeleteBidiImmediately r=m_kato
`TextEditRules::mDeleteBidiImmediately` is cache of
`bidi.edit.delete_immediately` pref value at creation time of `TextEditRules`.
However, this is referred when user removes selection.  So, there is no
reason to keep same behavior starting from editor creation.  In other words,
it must be better to take same behavior in all editor instances.

Therefore, we should remove it and the pref value should be referred directly
when user tries to remove selection.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 04:41:51 +00:00
Masayuki Nakano
7759842058 Bug 1572681 - part 4: Get rid of arguments of TextEditRules::BeforeEdit() and TextEditRules::AfterEdit() r=m_kato
`TextEditRules::BeforeEdit()`, `TextEditRules::AfterEdit()`,
`HTMLEditRules::BeforeEdit()` and `HTMLEditRules::AfterEdit()` are always
called with same values as the result of
`EditorBase::GetTopLevelEditSubAction()` and
`EditorBase::GetDirectionOfTopLevelEditSubAction()`.

For making what they do clearer, we should make them access with those
`EditorBase` members for now.  This makes those methods ugly due to increasing
number of long lines.  However, this issue should be solved when we move them
into `TextEditor` and `HTMLEditor`.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 04:41:18 +00:00
Masayuki Nakano
726b15369f Bug 1572681 - part 3: Change TextEditRules::mLockRulesSniffing to HTMLEditRules::mInitialized r=m_kato
`TextEditRules::mLockRulesSniffing` is set by `AutoLockRulesSniffing`.
It's created during `BeforeEdit()` and `AfterEdit()` are called, and
`HTMLEditRules::Init()` is initializing `mDocChangeRange`.

The purpose of it is, preventing `BeforeEdit()` and `AfterEdit()` to do
something in that time.  For the former cases, we don't need this member
anymore since they won't be nested.  Therefore, we need to manage
`HTMLEditRules::BeforeEdit()` and `HTMLEditRules::AfterEdit()` won't do
anything only while `HTMLEditRules::Init()` is called.  Therefore,
there should be only `HTMLEditRules::mInitialized` instead.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 04:26:52 +00:00
Masayuki Nakano
a866a356da Bug 1572681 - part 2: Get rid of TextEditRules::mTopLevelEditSubAction and TextEditRules::mActionNesting r=m_kato
`TextEditRules::BeforeEdit()`, `TextEditRules::AfterEdit()`,
`HTMLEditRules::BeforeEdit()` and `HTMLEditRules::AfterEdit()` manages
`TextEditRules::mActionNesting` for preventing that they won't do same thing
per top-level edit sub-action.  However, this has already been checked by
their caller, `AutoTopLevelEditSubActionNotifier`.  So, we can get rid of it.
Then, `TextEditRules::mTopLevelEditSubAction` is also always same as
`EditorBase::GetTopLevelEditSubAction()`.  Therefore, we can get rid of it
too.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 02:42:25 +00:00
Masayuki Nakano
13b14b9b2f Bug 1572681 - part 1: Move TextEditRules::mCachedSelection* to EditorBase::AutoEditActionDataSetter r=m_kato
Despite of their names, `TextEditRules::mCachedSelectionNode` and
`TextEditRules::mCachedSelectionOffset` are used only for calling
`EditorBase::HandleInlineSpellCheck()` so that they should be renamed to
explain the purpose.

Additionally, they are not necessary to be in the heap since they are
necessary until `TextEditRules::AfterEdit()` is called.  Therefore, we can
move them into `EditorBase::HandleInlineSpellCheck()`.

Finally, `TextEditRules::BeforeEdit()` and `TextEditRules::AfterEdit()` are
called only by `TextEditor::OnStartToHandleTopLevelEditSubAction()` and
`TextEditor::OnEndHandlingTopLevelEditSubAction()`.  Therefore, we can move
the setter to `TextEditor::OnStartToHandleTopLevelEditSubAction()`.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 01:24:01 +00:00
Mirko Brodesser
81a41b2d7d Bug 1573119: declare more methods around HTMLEditor const/static. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D41524

--HG--
extra : moz-landing-system : lando
2019-08-13 07:34:11 +00:00
Makoto Kato
609348ba4d Bug 1543312 - Tear down editor when PresShell is destroyed. r=masayuki
When browsing reported site (https://minecraft.curseforge.com/), user that uses Android cannot set caret on some editable contents.

GV's IME code uses `NOTIFY_IME_OF_SELECTION_CHANGE` to update selection on native IME.  But GV doesn't receives this notification on this reported site. This notification is fired by editor's selection listener, but when this occurs, this notification is no logner fired unfortunately.  Because selection listener isn't registered by current selection.

At first, editor registers selection listener by `EditorBase::Init`. But like test case, if PresShell is destroyed after editor is created, this registration is no longer used, and we have to register it by new selection again. So we should tear down editor when PresShell is destroyed. (or we have to add a way to re-initialize selection listener?)

This isn't related to Android. Android's IME code depends on this notification, so this occurs easily.

Also, `PresShell::SetCaretEnabled` only works when caret is valid (`PresShell::GetCaret` has caret).  If caret is nothing, it hits assertion.

And, attached test case is reproduced sample.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 02:00:00 +00:00
Masayuki Nakano
ede2ddb459 Bug 1572375 - part 8: Wrap EditorBase::mPaddingBRElementForEmptyEditor with an inline method r=m_kato
`TextEditRules` and `HTMLEditRules` still refer
`EditorBase::mPaddingBRElementForEmptyEditor` directly but this is really ugly.
Therefore, this patch creates `EditorBase::HasPaddingBRElementForEmptyEditor()`
for wrapping its access.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 00:57:38 +00:00
Masayuki Nakano
485a59c303 Bug 1572375 - part 7: Get rid of HTMLEditRules::OnModifyDocument() r=m_kato
`HTMLEditRules::OnModifyDocument()` is same as just calling
`EditorBase::EnsureNoPaddingBRElementForEmptyEditor()` and
`EditorBase::MaybeCreatePaddingBRElementForEmptyEditor()` so that this patch
gets rid of the method, then, creates `HTMLEditor::OnModifyDocumentInternal()`
and makes it do same thing.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 00:56:57 +00:00
Masayuki Nakano
1df80236d6 Bug 1572375 - part 6: Get rid of HTMLEditRules::WillLoadHTML() r=m_kato
`HTMLEditRules::WillLoadHTML()` does exactly same thing as
`EditorBase::EnsureNoPaddingBRElementForEmptyEditor()`.  Therefore, we can
get rid of it and make `HTMLEditor::LoadHTML()` not use `HTMLEditRules`.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 00:09:46 +00:00