searching for reviewer(m_kato)
bcaada0fa740bf6d07b95df1e1da820e12f990a9: Bug 1581337 - Make `HTMLEditor::DeleteMostAncestorMailCiteElementIfEmpty()` do nothing if found mail-cite element is not empty r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 18 Sep 2019 11:38:35 +0000 - rev 493906
Push 36591 by csabou@mozilla.com at Thu, 19 Sep 2019 03:58:44 +0000
Bug 1581337 - Make `HTMLEditor::DeleteMostAncestorMailCiteElementIfEmpty()` do nothing if found mail-cite element is not empty r=m_kato When rewriting `DeleteMostAncestorMailCiteElementIfEmpty()` with early-return style, I forgot to make it do nothing when found element is empty: https://searchfox.org/mozilla-central/rev/94e642e6036dc694b07cab895c9b5b267f0db065/editor/libeditor/HTMLEditRules.cpp#4078 This patch restores it. Differential Revision: https://phabricator.services.mozilla.com/D46122
71cfe2c9fc79e46e8fe0c360839ca2a5b595c696: Bug 1581034 - part 2: Get rid of `TextEditUtils::IsBreak()` and `TextEditUtils` itself r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 18 Sep 2019 12:37:14 +0000 - rev 493905
Push 36591 by csabou@mozilla.com at Thu, 19 Sep 2019 03:58:44 +0000
Bug 1581034 - part 2: Get rid of `TextEditUtils::IsBreak()` and `TextEditUtils` itself r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45811
4e5e43eefae5f5762a3651b44ea08450fe478d83: Bug 1581034 - part 1: Get rid of `TextEditUtils::IsBody()` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 18 Sep 2019 10:29:01 +0000 - rev 493904
Push 36591 by csabou@mozilla.com at Thu, 19 Sep 2019 03:58:44 +0000
Bug 1581034 - part 1: Get rid of `TextEditUtils::IsBody()` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45810
620fa59408e852fe7cec0e1584ccde64d69e41c9: Bug 1540029 - part 11: Get rid of `AutoEditInitRulesTrigger` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 18 Sep 2019 10:14:40 +0000 - rev 493903
Push 36591 by csabou@mozilla.com at Thu, 19 Sep 2019 03:58:44 +0000
Bug 1540029 - part 11: Get rid of `AutoEditInitRulesTrigger` r=m_kato Only for solving the order of `AutoEditInitRulesTrigger` destruction when `HTMLEditor::Init()` calls `TextEditor::Init()`, `TextEditor` has unnecessary counter and the initialization code is made harder to understand. Therefore, this patch makes `TextEditor::Init()` and `HTMLEditor::Init()` directly call `InitEditorContentAndSelection()` at appropriate time. Additionally, `HTMLEditor::Init()` can call `EditorBase::Init()` instead of `TextEditor::Init()` since `TextEditor::Init()` does nothing for `HTMLEditor` actually. Differential Revision: https://phabricator.services.mozilla.com/D45793
72e2b71294b4b30411516c671382b6fba25cb610: Bug 1540029 - part 10: Get rid of `TextEditRules` and `HTMLEditRules` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 18 Sep 2019 08:40:08 +0000 - rev 493902
Push 36591 by csabou@mozilla.com at Thu, 19 Sep 2019 03:58:44 +0000
Bug 1540029 - part 10: Get rid of `TextEditRules` and `HTMLEditRules` r=m_kato Now, we can get rid of `TextEditRules` and `HTMLEditRules` completely. And also this patch renames their cpp files to `TextEditSubActionHandler` and `HTMLEditSubActionHandler`. `TextEditor::Init()` and `HTMLEditor::Init()` are still complicated due to `AutoEditInitRulesTrigger`. The following patch will remove it. Differential Revision: https://phabricator.services.mozilla.com/D45792
56e0e203c4b991e7612622c8413862207907fe03: Bug 1540029 - part 9: Move `TextEditRules::Init()` and `HTMLEditRules::Init()` to `TextEditor` and `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 18 Sep 2019 08:21:37 +0000 - rev 493744
Push 36589 by nerli@mozilla.com at Wed, 18 Sep 2019 21:49:27 +0000
Bug 1540029 - part 9: Move `TextEditRules::Init()` and `HTMLEditRules::Init()` to `TextEditor` and `HTMLEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45791
3211676536b01866845518ae653e0aa6a449c4f4: Bug 1540029 - part 8: Replace `HTMLEditRules::GetParagraphState()` with new stack only class r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 18 Sep 2019 08:20:29 +0000 - rev 493743
Push 36589 by nerli@mozilla.com at Wed, 18 Sep 2019 21:49:27 +0000
Bug 1540029 - part 8: Replace `HTMLEditRules::GetParagraphState()` with new stack only class r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45790
487bbce291b0dc2d330f9e39bd5d2df2c0a84626: Bug 1581509 - Update encoding_rs to 0.8.20. r=m_kato
Henri Sivonen <hsivonen@hsivonen.fi> - Wed, 18 Sep 2019 08:28:04 +0000 - rev 493739
Push 36589 by nerli@mozilla.com at Wed, 18 Sep 2019 21:49:27 +0000
Bug 1581509 - Update encoding_rs to 0.8.20. r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D46000
2efd63fa591ca58949e45d5d23abbe14278fdedc: Bug 1579393 - Add new encoding_rs methods to Encoding.h. r=m_kato
Henri Sivonen <hsivonen@hsivonen.fi> - Wed, 18 Sep 2019 08:26:38 +0000 - rev 493737
Push 36589 by nerli@mozilla.com at Wed, 18 Sep 2019 21:49:27 +0000
Bug 1579393 - Add new encoding_rs methods to Encoding.h. r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45170
0fbc7a72a7556a777ee18fd16fedb0f9248a84cc: Bug 1579383 - Update encoding_rs to 0.8.19. r=m_kato
Henri Sivonen <hsivonen@hsivonen.fi> - Wed, 18 Sep 2019 08:26:36 +0000 - rev 493736
Push 36589 by nerli@mozilla.com at Wed, 18 Sep 2019 21:49:27 +0000
Bug 1579383 - Update encoding_rs to 0.8.19. r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D44989
e71921b729c6c61c9f2c7b6b84cf0db58543d28f: Bug 1540029 - part 7: Replace `HTMLEditRules::GetAlignment()` with new stack only class r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 18 Sep 2019 06:26:56 +0000 - rev 493709
Push 36585 by malexandru@mozilla.com at Wed, 18 Sep 2019 09:56:40 +0000
Bug 1540029 - part 7: Replace `HTMLEditRules::GetAlignment()` with new stack only class r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45789
f1c646b0f812e911f218e7206b57db27d726caa2: Bug 1540029 - part 6: Replace `HTMLEditRules::GetListItemState()` with new stack only class r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 18 Sep 2019 04:42:55 +0000 - rev 493708
Push 36585 by malexandru@mozilla.com at Wed, 18 Sep 2019 09:56:40 +0000
Bug 1540029 - part 6: Replace `HTMLEditRules::GetListItemState()` with new stack only class r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45788
7442cbe672da9b1d4d3856b1881b0ca2a15ed145: Bug 1540029 - part 5: Replace `HTMLEditRules::GetListState()` with new stack class r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 18 Sep 2019 03:39:00 +0000 - rev 493695
Push 36585 by malexandru@mozilla.com at Wed, 18 Sep 2019 09:56:40 +0000
Bug 1540029 - part 5: Replace `HTMLEditRules::GetListState()` with new stack class r=m_kato It takes a lot of `bool` out arguments. Therefore, we should make it a stack only class and caller should retrieve only necessary information. Differential Revision: https://phabricator.services.mozilla.com/D45787
396a5f6301a3147ba25b447c050d9ff846c56848: Bug 1540029 - part 4: Merge `BeforeEdit()` and `OnStartToHandleTopLevelEditSubAction()`, and `AfterEdit()` and `OnEndHandlingTopLevelEditSubAction()` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 18 Sep 2019 03:01:28 +0000 - rev 493694
Push 36585 by malexandru@mozilla.com at Wed, 18 Sep 2019 09:56:40 +0000
Bug 1540029 - part 4: Merge `BeforeEdit()` and `OnStartToHandleTopLevelEditSubAction()`, and `AfterEdit()` and `OnEndHandlingTopLevelEditSubAction()` r=m_kato And also this patch make each `AutoEditSubActionNotifier` creator check the result of `OnStartToHandleTopLevelEditSubAction()` at least for `NS_ERROR_EDITOR_DESTROYED`. We need to take care of its destructor's result later, though. Differential Revision: https://phabricator.services.mozilla.com/D45786
46c0a2f0acb42bdc85183cbed6fd370ec16ccf8b: Bug 1540029 - part 3: Move `HTMLEditRules::DocumentModified()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 17 Sep 2019 07:22:01 +0000 - rev 493552
Push 36585 by malexandru@mozilla.com at Wed, 18 Sep 2019 09:56:40 +0000
Bug 1540029 - part 3: Move `HTMLEditRules::DocumentModified()` to `HTMLEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45785
c9c5ddab9b1853be0ff6d61d6d0ba9dfc5818a21: Bug 1540029 - part 2: Get rid of `TextEditRules::DocumentIsEmpty()` and `HTMLEditRules::DocumentIsEmpty()` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 17 Sep 2019 06:58:06 +0000 - rev 493521
Push 36585 by malexandru@mozilla.com at Wed, 18 Sep 2019 09:56:40 +0000
Bug 1540029 - part 2: Get rid of `TextEditRules::DocumentIsEmpty()` and `HTMLEditRules::DocumentIsEmpty()` r=m_kato `TextEditRules::DocumentIsEmpty()` is a wrapper of `TextEditor::IsEmpty()` so that we can get rid of it simply. `HTMLEditRules::DocumentIsEmpty()` needs to change. It's oddly checks only `EditorBase::mPaddingBRElementForEmptyEditor` is `nullptr` or not. However, the editor may be completely empty. And the result may be different from `TextEditor::IsEmpty()` which is not overridden by `HTMLEditor`. For partially solving this issue, this patch makes `HTMLEditor` overrides `IsEmpty()` and optimizes `TextEditor::IsEmpty()`. With this change, the caller of `HTMLEditRules::DocumentIsEmpty()` may behave differently in the only caller, `HTMLEditor::SelectEntireDocument()`. And unfortunately, its root called from `SelectAllCommand::DoCommand()`. However, it does just collapse `Selection` into the root element (`<body>` or `Document.documentElement`) if it returns `true`. Therefore, this change must be safe since anyway `SelectionRefPtr()->SelectAllChildren()` with the root element is exactly same as `SelectionRefPtr()->Collapse()` with the empty root element if it's truly empty. Differential Revision: https://phabricator.services.mozilla.com/D45784
862e39a846fe31de69cc2c038d4d553b620ff01a: Bug 1540029 - part 1: Move old edit action listener methods of `HTMLEditRules` to `EditorBase::TopLevelEditSubActionData` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 17 Sep 2019 04:27:59 +0000 - rev 493509
Push 36583 by rgurzau@mozilla.com at Tue, 17 Sep 2019 15:54:53 +0000
Bug 1540029 - part 1: Move old edit action listener methods of `HTMLEditRules` to `EditorBase::TopLevelEditSubActionData` r=m_kato The main purpose of them is modifying `TopLevelEditSubActionData::mChangedRange`. Therefore, they should be in the struct. Differential Revision: https://phabricator.services.mozilla.com/D45783
a4bfd6e22c412a65d558d46c6a3f19da14a03a85: Bug 1574852 - part 113: Move `TextEditRules::CreateTrailingBRIfNeeded()` and `TextEditRules::CollapseSelectionToTrailingBRIfNeeded()` to `TextEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 17 Sep 2019 02:47:49 +0000 - rev 493505
Push 36583 by rgurzau@mozilla.com at Tue, 17 Sep 2019 15:54:53 +0000
Bug 1574852 - part 113: Move `TextEditRules::CreateTrailingBRIfNeeded()` and `TextEditRules::CollapseSelectionToTrailingBRIfNeeded()` to `TextEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45496
a6c31b6a60e01bf50df85bcf2e0434578a032a88: Bug 1574852 - part 112: Make `TextEditor::InsertWithQuotationsAsSubAction()` virtual and `HTMLEditor` override it r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 17 Sep 2019 02:47:26 +0000 - rev 493504
Push 36583 by rgurzau@mozilla.com at Tue, 17 Sep 2019 15:54:53 +0000
Bug 1574852 - part 112: Make `TextEditor::InsertWithQuotationsAsSubAction()` virtual and `HTMLEditor` override it r=m_kato It requires different preparation in `TextEditor` and `HTMLEditor` but it's not split. Therefore, we should make it virtual and override it to use different preparation code. Fortunately, its code is enough simple to duplicate. Additionally, this removes unnecessary code from `TextEditRules` and `HTMLEditRules` including `WillDoAction()` and `DidDoAction()`! Differential Revision: https://phabricator.services.mozilla.com/D45495
c4b35bfd92766b1bcf456d1dcb7b763a42d1b566: Bug 1574852 - part 111: Make methods calling `HTMLEditRules::WillDoAction()` with `EditSubAction::eInsertElement` stop using it r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 17 Sep 2019 03:13:09 +0000 - rev 493503
Push 36583 by rgurzau@mozilla.com at Tue, 17 Sep 2019 15:54:53 +0000
Bug 1574852 - part 111: Make methods calling `HTMLEditRules::WillDoAction()` with `EditSubAction::eInsertElement` stop using it r=m_kato Unfortunately, `EditSubAction::eInsertElement` is used by 4 methods and one of them is too big method. But we should move what old `WillInsert()` does into them for stop making anybody use `HTMLEditRules`. Differential Revision: https://phabricator.services.mozilla.com/D45494
28c561e18cab23dbd54920c1cbfc0f451f69d301: Bug 1574852 - part 110: Split `HTMLEditor::WillInsert()` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 17 Sep 2019 02:21:53 +0000 - rev 493473
Push 36582 by rgurzau@mozilla.com at Tue, 17 Sep 2019 09:36:29 +0000
Bug 1574852 - part 110: Split `HTMLEditor::WillInsert()` r=m_kato It does 4 different things so that it looks like a black-box from the callers. First, only `HTMLEditRules::WillDoAction()` refers `aCancel` out argument. Therefore, it should check whether it's cancelled or not directly. Next, `EnsureNoPaddingBRElementForEmptyEditor()` should be called by each caller directly. Then, the renaming part can be split to 2 methods. One is adjusting caret position and the other preparing inline style for new content. Unfortunately, this patch makes each caller messy. I think that for the 3rd job (i.e., adjusting caret position), each caller should retrieve the adjusted caret position and use it directly instead of handling with `Selection` in the future. Differential Revision: https://phabricator.services.mozilla.com/D45493
e6c2a63934fbb3ec4cb9eafcc231ea4ecf570bb8: Bug 1574852 - part 109: Move `TextEditRules::WillSetText()` to `TextEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 17 Sep 2019 02:21:35 +0000 - rev 493472
Push 36582 by rgurzau@mozilla.com at Tue, 17 Sep 2019 09:36:29 +0000
Bug 1574852 - part 109: Move `TextEditRules::WillSetText()` to `TextEditor` r=m_kato And also renaming `EditorBase::SetTextImpl()`. Differential Revision: https://phabricator.services.mozilla.com/D45492
f54f6af6359dc358b2b91f6870f418462cc31e88: Bug 1574852 - part 110: Split `HTMLEditor::WillInsert()` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Sat, 14 Sep 2019 15:12:03 +0000 - rev 493281
Push 36576 by cbrindusan@mozilla.com at Sun, 15 Sep 2019 09:36:55 +0000
Bug 1574852 - part 110: Split `HTMLEditor::WillInsert()` r=m_kato It does 4 different things so that it looks like a black-box from the callers. First, only `HTMLEditRules::WillDoAction()` refers `aCancel` out argument. Therefore, it should check whether it's cancelled or not directly. Next, `EnsureNoPaddingBRElementForEmptyEditor()` should be called by each caller directly. Then, the renaming part can be split to 2 methods. One is adjusting caret position and the other preparing inline style for new content. Unfortunately, this patch makes each caller messy. I think that for the 3rd job (i.e., adjusting caret position), each caller should retrieve the adjusted caret position and use it directly instead of handling with `Selection` in the future. Differential Revision: https://phabricator.services.mozilla.com/D45493
2b6968592570eeaf009024e8dc1fdd4d28b316a0: Bug 1574852 - part 109: Move `TextEditRules::WillSetText()` to `TextEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Sat, 14 Sep 2019 15:12:03 +0000 - rev 493280
Push 36576 by cbrindusan@mozilla.com at Sun, 15 Sep 2019 09:36:55 +0000
Bug 1574852 - part 109: Move `TextEditRules::WillSetText()` to `TextEditor` r=m_kato And also renaming `EditorBase::SetTextImpl()`. Differential Revision: https://phabricator.services.mozilla.com/D45492
d9f9610b4d248aed5140a0624de71268814e467f: Bug 1574852 - part 108: Move `TextEditRules::WillOutputText()` to `TextEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 13 Sep 2019 03:44:33 +0000 - rev 493000
Push 36571 by btara@mozilla.com at Fri, 13 Sep 2019 15:46:31 +0000
Bug 1574852 - part 108: Move `TextEditRules::WillOutputText()` to `TextEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45491
c915823b6b9392d156b016ba4cb55386ae7e8f14: Bug 1574852 - part 107: Get rid of `TextEditRules::GetTextNodeAroundSelectionStartContainer()` since nobody uses it r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 13 Sep 2019 03:39:13 +0000 - rev 492999
Push 36571 by btara@mozilla.com at Fri, 13 Sep 2019 15:46:31 +0000
Bug 1574852 - part 107: Get rid of `TextEditRules::GetTextNodeAroundSelectionStartContainer()` since nobody uses it r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45490
e5770e71acd5274e4705a378ddf457df7976e71e: Bug 1574852 - part 106-2: Move calling `DeleteSelectionWithTransaction()` and `HTMLEditor` specific post handling into `HandleDeleteSelection()` from `TextEditor::DeleteSelectionAsSubAction()` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 13 Sep 2019 03:20:04 +0000 - rev 492998
Push 36571 by btara@mozilla.com at Fri, 13 Sep 2019 15:46:31 +0000
Bug 1574852 - part 106-2: Move calling `DeleteSelectionWithTransaction()` and `HTMLEditor` specific post handling into `HandleDeleteSelection()` from `TextEditor::DeleteSelectionAsSubAction()` r=m_kato In `TextEditor::HandleDeleteSelection()`, we have only one path of returning `EditActionIgnored()`. Therefore, it should call `DeleteSelectionWithTransaction()` directly. On the other hand, it's not clear in `HTMLEditor::HandleDeleteSelection()` since it may be called recursively by its helper methods. Therefore, this patch creates `HTMLEditor::HandleDeleteSelectionInternal()` for the recursive calls and makes `HTMLEditor::HandleDeleteSelection()` call `DeleteSelectionWithTransaction()` if nobody handled it and to the `HTMLEditor` specific post-process in it. Differential Revision: https://phabricator.services.mozilla.com/D45301
cbec1b8d83edf24146e48d6819dda24d9ab7a57b: Bug 1574852 - part 106-1: Move `TextEditRules::WillDeleteSelection()` and `TextEditRules::DeleteSelectionWithTransaction()` to `TextEditor` and make `HTMLEditor::HandleDeleteSelection()` override the former r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 13 Sep 2019 02:49:43 +0000 - rev 492979
Push 36570 by opoprus@mozilla.com at Fri, 13 Sep 2019 09:28:59 +0000
Bug 1574852 - part 106-1: Move `TextEditRules::WillDeleteSelection()` and `TextEditRules::DeleteSelectionWithTransaction()` to `TextEditor` and make `HTMLEditor::HandleDeleteSelection()` override the former r=m_kato `TextEditor::DeleteSelectionAsSubAction()` starts to handle all "delete selection" sub-actions (i.e., even if the instance is `HTMLEditor`). Therefore, `TextEditRules::WillDeleteSelection()` should be renamed to `TextEditor::HandleDeleteSelection()` and we need to make it virtual. Differential Revision: https://phabricator.services.mozilla.com/D45300
41bc3a403c3125de85b84b60ecf0cd01bd861864: Bug 1574852 - part 105: Get rid of `TextEditRules::WillSetProperty()` and `TextEditRules::WillRemoveProperty()` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Sep 2019 09:13:00 +0000 - rev 492978
Push 36570 by opoprus@mozilla.com at Fri, 13 Sep 2019 09:28:59 +0000
Bug 1574852 - part 105: Get rid of `TextEditRules::WillSetProperty()` and `TextEditRules::WillRemoveProperty()` r=m_kato Oddly, they are used only by `HTMLEditor`, but implemented by `TextEditRules`. They cancels when the editor is in plaintext mode. So, actual things are implemented by each caller. This patch cleans them up too. Differential Revision: https://phabricator.services.mozilla.com/D45299
1bc2978543d1b4ff9e4c3253ff67f7b38af70844: Bug 1574852 - part 104: Move `TextEditRules::WillInsertText()` to `TextEditor` and make `HTMLEditor::WillInsertText()` override it r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 13 Sep 2019 02:40:09 +0000 - rev 492977
Push 36570 by opoprus@mozilla.com at Fri, 13 Sep 2019 09:28:59 +0000
Bug 1574852 - part 104: Move `TextEditRules::WillInsertText()` to `TextEditor` and make `HTMLEditor::WillInsertText()` override it r=m_kato And also this patch moves `TextEditRules::HandleNewLines()` and `TextEditRules::DontEchoPassword()` to `TextEditor`. Differential Revision: https://phabricator.services.mozilla.com/D45298
61cc90ceac61a7b9c3cfb370044576c67ab04cbf: Bug 1574852 - part 103: Move `TextEditRules::WillInsertLineBreak()` to `TextEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Sep 2019 08:03:57 +0000 - rev 492785
Push 36567 by nerli@mozilla.com at Thu, 12 Sep 2019 21:52:31 +0000
Bug 1574852 - part 103: Move `TextEditRules::WillInsertLineBreak()` to `TextEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45297
123b06288aa05c1ba7435e65e005d131b46f092b: Bug 1574852 - part 102: Move `TextEditRules::TruncateInsertionIfNeeded()` to `TextEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Sep 2019 07:48:29 +0000 - rev 492784
Push 36567 by nerli@mozilla.com at Thu, 12 Sep 2019 21:52:31 +0000
Bug 1574852 - part 102: Move `TextEditRules::TruncateInsertionIfNeeded()` to `TextEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45296
b60769450e9db6e7ffcf7c80efa8d037d5004b66: Bug 1574852 - part 101: Move `HTMLEditRules::DidDeleteSelection()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Sep 2019 07:27:30 +0000 - rev 492783
Push 36567 by nerli@mozilla.com at Thu, 12 Sep 2019 21:52:31 +0000
Bug 1574852 - part 101: Move `HTMLEditRules::DidDeleteSelection()` to `HTMLEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45295
886ccc65f1c996ce61a8568971eac4aa86645d0f: Bug 1574852 - part 100: Get rid of `TextEditRules::DidDeleteSelection()` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Sep 2019 06:51:26 +0000 - rev 492771
Push 36566 by ncsoregi@mozilla.com at Thu, 12 Sep 2019 15:24:49 +0000
Bug 1574852 - part 100: Get rid of `TextEditRules::DidDeleteSelection()` r=m_kato There are only 3 callers and it does simple but different 2 things. One of the callers is `HTMLEditRules::DidDeleteSelection()` so that if same things are done by `TextEditor::DeleteSelectionAsSubAction()`, it does not need to duplicate the code. Therefore, we need to duplicate the code into `TextEditor::DeleteSelectionAsSubAction()` and `TextEditRules::WillSetText()`. Then, `TextEditRules::WillSetText()` can avoid accessing `Selection` since it still grabs the modified text node. Note that only when it's called by `TextEditRules::DidDoAction()`, `AutoTransactionsConserveSelection` has been set. However, neither `DeleteNodeWithTransaction()` nor `DeleteNodeTransaction::DoTransaction()` changes `Selection`. Therefore, it hasn't do anything. So, we can remove it right now. Differential Revision: https://phabricator.services.mozilla.com/D45294
dc0f654c9ccdc10edfcbb72fcfddabe3aca66376: Bug 1574852 - part 99: Move `HTMLEditRules::WillRelativeChangeZIndex()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Sep 2019 06:20:49 +0000 - rev 492770
Push 36566 by ncsoregi@mozilla.com at Thu, 12 Sep 2019 15:24:49 +0000
Bug 1574852 - part 99: Move `HTMLEditRules::WillRelativeChangeZIndex()` to `HTMLEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45293
11b6d1bbafe71b695c1930985cea4199e6622d71: Bug 1574852 - part 98: Move `HTMLEditRules::WillAbsolutePosition()` and `HTMLEditRules::WillRemoveAbsolutePosition()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Sep 2019 05:45:13 +0000 - rev 492769
Push 36566 by ncsoregi@mozilla.com at Thu, 12 Sep 2019 15:24:49 +0000
Bug 1574852 - part 98: Move `HTMLEditRules::WillAbsolutePosition()` and `HTMLEditRules::WillRemoveAbsolutePosition()` to `HTMLEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D45292
663df481fcbff090b06c1d8f0736396567e77609: Bug 1574852 - part 97: Move `HTMLEditRules::PrepareToMakeElementAbsolutePosition()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Sep 2019 04:07:30 +0000 - rev 492747
Push 36565 by ncsoregi@mozilla.com at Thu, 12 Sep 2019 09:41:22 +0000
Bug 1574852 - part 97: Move `HTMLEditRules::PrepareToMakeElementAbsolutePosition()` to `HTMLEditor` r=m_kato Only caller of it is `WillRemoveAbsolutePosition()` and it always sets `*aHandled` to true before calling it. Therefore, it does not need to take it as an argument. Differential Revision: https://phabricator.services.mozilla.com/D45291
d85fd47dbcc7b9b52ecacca05ce304cef7368399: Bug 1574852 - part 96: Merge `HTMLEditRules::DidAbsolutePosition()` with `HTMLEditRules::WillAbsolutePosition()` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Sep 2019 01:54:28 +0000 - rev 492745
Push 36565 by ncsoregi@mozilla.com at Thu, 12 Sep 2019 09:41:22 +0000
Bug 1574852 - part 96: Merge `HTMLEditRules::DidAbsolutePosition()` with `HTMLEditRules::WillAbsolutePosition()` r=m_kato Oddly, absolute position is handled as following steps. 1. `WillAbsolutePosition()` calls `PrepareToMakeElementAbsolutePosition()` to consider the target element. 2. Set TopLevelEditSubActionData::mNewBlockElement to it. 3. `DidAbsolutePosition()` makes it absolute-positioned. So that, all of them can be done in `WillAbsolutePosition()` like other edit sub-action handling. Differential Revision: https://phabricator.services.mozilla.com/D45290
f59ebdb53f9ac6a62759c4588904cbe7bc76dc5c: Bug 1574852 - part 95: Move `HTMLEditRules::AfterEditInner()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 11 Sep 2019 10:39:38 +0000 - rev 492632
Push 36562 by aiakab@mozilla.com at Wed, 11 Sep 2019 16:05:23 +0000
Bug 1574852 - part 95: Move `HTMLEditRules::AfterEditInner()` to `HTMLEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D44799
d41ae182072c6cb884ab09f8e39368151f4f6e38: Bug 1574852 - part 94: Move `HTMLEditRules::PinSelectionToNewBlock()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 11 Sep 2019 09:44:39 +0000 - rev 492631
Push 36562 by aiakab@mozilla.com at Wed, 11 Sep 2019 16:05:23 +0000
Bug 1574852 - part 94: Move `HTMLEditRules::PinSelectionToNewBlock()` to `HTMLEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D44798
36ac44ffe67ef9374c05ec9117294e39c396fd47: Bug 1574852 - part 93: Move `HTMLEditRules::CheckInterlinePosition()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 11 Sep 2019 01:07:27 +0000 - rev 492597
Push 36561 by aiakab@mozilla.com at Wed, 11 Sep 2019 09:54:13 +0000
Bug 1574852 - part 93: Move `HTMLEditRules::CheckInterlinePosition()` to `HTMLEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D44797
d76478e79d37ec8d36f41423fc9ca401345bbba4: Bug 1574852 - part 92: Move `HTMLEditRules::RemoveEmptyNodesInChangedRange()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 10 Sep 2019 04:46:55 +0000 - rev 492439
Push 36557 by malexandru@mozilla.com at Tue, 10 Sep 2019 15:48:08 +0000
Bug 1574852 - part 92: Move `HTMLEditRules::RemoveEmptyNodesInChangedRange()` to `HTMLEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D44796
df2f57c5c750ad21fb1eba88d80e1a781cf3529e: Bug 1574852 - part 91: Move `HTMLEditRules::InsertBRElementToEmptyListItemsAndTableCellsInRange()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 10 Sep 2019 04:32:21 +0000 - rev 492438
Push 36557 by malexandru@mozilla.com at Tue, 10 Sep 2019 15:48:08 +0000
Bug 1574852 - part 91: Move `HTMLEditRules::InsertBRElementToEmptyListItemsAndTableCellsInRange()` to `HTMLEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D44795
99edaf54b89f1408916c78e9b3a78101e0fb1efe: Bug 1574852 - part 90: Move `HTMLEditRules::ConfirmSelectionInBody()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 10 Sep 2019 03:52:44 +0000 - rev 492428
Push 36555 by malexandru@mozilla.com at Tue, 10 Sep 2019 09:53:18 +0000
Bug 1574852 - part 90: Move `HTMLEditRules::ConfirmSelectionInBody()` to `HTMLEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D44794
735f520eadfacb348147b81fc8933b1aff31eca0: Bug 1574852 - part 89: Move `HTMLEditRules::AdjustSelection()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 10 Sep 2019 03:38:04 +0000 - rev 492427
Push 36555 by malexandru@mozilla.com at Tue, 10 Sep 2019 09:53:18 +0000
Bug 1574852 - part 89: Move `HTMLEditRules::AdjustSelection()` to `HTMLEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D44793
95684e6acbd31703b03fc986636e6ec0bf4843c4: Bug 1574852 - part 88: Move `HTMLEditRules::FindNearEditableNode()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 09 Sep 2019 10:09:38 +0000 - rev 492422
Push 36555 by malexandru@mozilla.com at Tue, 10 Sep 2019 09:53:18 +0000
Bug 1574852 - part 88: Move `HTMLEditRules::FindNearEditableNode()` to `HTMLEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D44792
8edfd974fc63dcd13bd0b501bebdba963e439da9: Bug 1574852 - part 87: Move `HTMLEditRules::SelectionEndpointInNode()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 09 Sep 2019 05:21:04 +0000 - rev 492421
Push 36555 by malexandru@mozilla.com at Tue, 10 Sep 2019 09:53:18 +0000
Bug 1574852 - part 87: Move `HTMLEditRules::SelectionEndpointInNode()` to `HTMLEditor` r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D44791
a25bf7589eb60de6044b38c8089236ae208c8492: Bug 1574852 - part 86: Move `HTMLEditRules::WillAlign()` and `HTMLEditRules::AlignContentsAtSelection()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 09 Sep 2019 04:57:50 +0000 - rev 492420
Push 36555 by malexandru@mozilla.com at Tue, 10 Sep 2019 09:53:18 +0000
Bug 1574852 - part 86: Move `HTMLEditRules::WillAlign()` and `HTMLEditRules::AlignContentsAtSelection()` to `HTMLEditor` r=m_kato And also this splits large 2 blocks of `HTMLEditRules::AlignContentsAtSelection()` to 2 methods. Differential Revision: https://phabricator.services.mozilla.com/D44790
220c2d3cd5e020d6a693cbc9756d297502ea9e76: Bug 1574852 - part 85: Move `HTMLEditRules::AlignBlock()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 09 Sep 2019 02:48:56 +0000 - rev 492419
Push 36555 by malexandru@mozilla.com at Tue, 10 Sep 2019 09:53:18 +0000
Bug 1574852 - part 85: Move `HTMLEditRules::AlignBlock()` to `HTMLEditor` r=m_kato With guaranteeing the argument element type with `MOZ_ASSERT()`, we can make it really simpler. Differential Revision: https://phabricator.services.mozilla.com/D44789
7a484d560816d3e468d41e67672f6edd99e787e4: Bug 1574852 - part 84: Move `HTMLEditRules::RemoveAlignment()` to `HTMLEditor` r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 09 Sep 2019 10:47:47 +0000 - rev 492212
Push 36550 by shindli@mozilla.com at Mon, 09 Sep 2019 15:36:52 +0000
Bug 1574852 - part 84: Move `HTMLEditRules::RemoveAlignment()` to `HTMLEditor` r=m_kato And also this patch removes unnecessary declarations in `HTMLEditRules.h`. Differential Revision: https://phabricator.services.mozilla.com/D44788