Граф коммитов

188 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano 4bf13b90c7 Bug 1483132 - Make EditorBase::AreNodesSameType() non-virtual r=m_kato
EditorBase::AreNodesSameType() is overridden only by HTMLEditor and the
implementation is enough simple to re-implement in EditorBase.

Additionally, this is called from condition of a loop in
JoinNodesDeepWithTransaction().  So, the virtual call cost may make damage
to the performance.

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

--HG--
extra : moz-landing-system : lando
2018-08-16 10:29:20 +00:00
Masayuki Nakano b8fd63d7b5 Bug 1482020 - Make all callers of CreateElementWithDefaults() use non-virtual method r=m_kato
Fortunately, despite of becoming public method,
HTMLEditor::CreateElementWithDefaults() can be used by internal methods too
since it does not touch undo transactions nor the DOM tree, and does not
refer mRules nor GetSelection().  So, we can make it public and make any
C++ callers use it.
2018-08-10 19:36:24 +09:00
Masayuki Nakano 89e5796790 Bug 1482007 - part 1: Create a helper class to guarantee to call nsIEditor::EndTransaction() after nsIEditor::BeginTransaction() call r=m_kato
This patch also creates non-virtual methods,
EditorBase::BeginTransactionInternal(), EditorBase::EndTransactionInternal(),
TransactionManager::BeginBatchInternal() and
TransactionManager::EndBatchInternal().

Although, this could be replaced with API to use PlaceholderTransaction,
we should investigate it when we have much time.

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

--HG--
extra : moz-landing-system : lando
2018-08-09 11:45:41 +00:00
Masayuki Nakano 2413e81af0 Bug 1480666 - Make EditorBase::EndUpdateViewBatch() non-virtual r=m_kato
Although HTMLEditor::EndUpdateViewBatch() calls a method of nsIHTMLEditor,
the additional work after calling EditorBase::EndUpdateViewBatch() is enough
simple. So, we can move the implementation in HTMLEditor to EditorBase and
make it non-virtual.

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

--HG--
extra : moz-landing-system : lando
2018-08-06 04:42:39 +00:00
Masayuki Nakano 45a67c4b77 Bug 1480663 - Make EditorBase::IsModifiableNode() non-virtual r=m_kato
HTMLEditor::IsModifiableNode() is enough simple and can be checked in
EditorBase. So, we should make it non-virtual and check if instance is
HTMLEditor in EditorBase::IsModifiableNode().

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

--HG--
extra : moz-landing-system : lando
2018-08-03 11:10:46 +00:00
Masayuki Nakano 4292293e8c Bug 1480055 - part 3: Create non-virtual method to set EditorBase::mAllowsTransactionsToChangeSelection r=m_kato
There is no non-virtual method to modify
EditorBase::mAllowsTransactionsToChangeSelection.  Therefore,
AutoTransactionsConserveSelection calls virtual method,
nsIEditor::SetShouldTxnSetSelection() twice (from both constructor and
destructor).  So, we should save this unnecessary cost.

MozReview-Commit-ID: B7TYGnGtuLB

--HG--
extra : rebase_source : 26ce77fb63a1967cca88b002cd65e1105477a63d
2018-08-01 21:11:44 +09:00
Masayuki Nakano a9559a1d82 Bug 1480055 - part 2: Rename EditorBase::GetShouldTxnSetSelection() to EditorBase::AllowsTransactionsToChangeSelection() r=m_kato
For explaining what it does clearer, we should rename it and corresponding
member.

MozReview-Commit-ID: 6U8FgfHBbCL

--HG--
extra : rebase_source : 50bc3ce0d3b9900939c7e6e8a137abe2288cf727
2018-08-01 20:53:57 +09:00
Masayuki Nakano 470feacd31 Bug 1480055 - part 1: Remove nsIEditor::shouldTxnSetSelection() r=m_kato
nsIEditor::ShouldTxnSetSelection() is used only by DeleteRangeTransaction
(even if including comm-central and BlueGriffon) and there is a non-virtual
method EditorBase::GetShouldTxnSetSelection().  So, we can remove this.

MozReview-Commit-ID: JWSCw9k6lI0

--HG--
extra : rebase_source : 2509274216a1493134757a7d106464f06ea0ba57
2018-08-01 20:16:30 +09:00
Makoto Kato a8ca18700d Bug 1479383 - Use const method for some GetEditorRoot methods. r=masayuki
Some methods to get editor root etc has unnecessary refcounting and it isn't
const method.  So we should remove unnecessary refcounting and change to
const method.

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

--HG--
extra : moz-landing-system : lando
2018-07-30 10:35:43 +00:00
Masayuki Nakano 91c0a26b3f Bug 1467802 - part 3: Create EditorBase::GetDocumentCharsetInternal() for internal use of nsIEditor::GetDocumentCharacterSet() r=m_kato
This patch creates non-virtual method, EditorBase::GetDocumentCharsetInternal(),
for internal use of nsIEditor::GetDocumentCharacterSet() since the virtual
call method is redundant and the caller cannot be marked as const.

MozReview-Commit-ID: v6kDo2eKg3

--HG--
extra : rebase_source : 07f6dd8341cb6686835db2ee3ded479323cccca9
2018-07-18 21:11:32 +09:00
Masayuki Nakano 85b94e287c Bug 1467802 - part 2: Mark TextEditor::GetAndInitDocEncoder() as const r=m_kato
TextEditor::GetAndInitDocEncoder() modifies only mCachedDocumentEncoder and
mCachedDocumentEncoderType which are cache of the method to save recreation
cost of document encoder when same type document encoder is requested.

So, with marking them mutable, we can change the method to a const method.

MozReview-Commit-ID: 80W0NtQhJOR

--HG--
extra : rebase_source : 84f4b49fe3a3124c0de99b39a2141a8cee553e54
2018-07-18 20:51:55 +09:00
Makoto Kato 16910a6e95 Bug 1443902 - Reinitilize selection after destroying nsIEditingSession. r=masayuki
When setting contenteditable to false, editing session destroys HTMLEditor.
Destroying HTMLEditor means that selection visibility is reset by
FinalizeSelection.

So after calling TearDownEditorOnWindow on nsHTMLDocument, we should initialize
selection visibility if current focus is text control that has editor.

MozReview-Commit-ID: 4V8kZtOtKO3

--HG--
extra : rebase_source : 9d90c12b3c93e4dfd95095ce29a26e5fdd83f952
2018-07-09 16:53:47 +09:00
Ciure Andrei b37e54e443 Backed out 1 changesets (bug 1443902) for reftest failures reftest/tests/editor/reftests/1443902-2.html CLOSED TREE
Backed out changeset 4c31558d3481 (bug 1443902)
2018-07-10 05:50:31 +03:00
Makoto Kato 98611161ee Bug 1443902 - Reinitilize selection after destroying nsIEditingSession. r=masayuki
When setting contenteditable to false, editing session destroys HTMLEditor.
Destroying HTMLEditor means that selection visibility is reset by
FinalizeSelection.

So after calling TearDownEditorOnWindow on nsHTMLDocument, we should initialize
selection visibility if current focus is text control that has editor.

MozReview-Commit-ID: 4V8kZtOtKO3

--HG--
extra : rebase_source : 773c06bb22cf2da24fd11be9be8d7b0376da3e36
2018-07-09 16:53:47 +09:00
Masayuki Nakano 2b43129579 Bug 1473515 - Make AutoDisableUndo restores enabled state of undo/redo with previous number of maximum transactions r=m_kato
Calling EditorBase::EnableUndoRedo() without argument means that editor supports
unlimited undo/redo stack.  AutoDisableUndo class calls it without argument
when it needs to restore undo/redo feature.

However, <input type="text"> and <textarea> limits number of maximum
transactions up to 1,000, perhaps for footprint.  So, AutoDisableUndo should
store the last number of maximum transactions before disabling undo/redo from
the constructor.

MozReview-Commit-ID: CoI6ZXyTd3X

--HG--
extra : rebase_source : e2b9af17e5857dcc0a6781e254e45fdb790c9a9e
2018-07-05 19:44:23 +09:00
Emilio Cobos Álvarez 6a2e3606ae Bug 1470361: Remove nsIEditorStyleSheets.addStyleSheet / removeStyleSheet / replaceStyleSheet. r=m_kato
These are effectively equivalent to appending a <link> element to the body, are
not unused, and bring in a fair amount of complexity because even though they're
owned by the document and stored in the document's mStyleSheets, they're not
owned by it per se, which causes confusion.

Unless I've missed something, both bluegriffon and common-central use the
*Override APIs, which this patch leaves untouched.

MozReview-Commit-ID: EOSMOHj3A95
2018-06-25 10:46:38 +02:00
Masayuki Nakano 65a183e7d5 Bug 1467692 - Create EditorBase::SelectAllInternal() for internal use r=m_kato
For preparing to fix bug 1465702, we need to split public methods of editor
which are used by both outside and itself or friends.

SelectAll() is used by both outside and TextEditor.  So, we need to create
SelectAllInternal() and make TextEditor use it instead.

MozReview-Commit-ID: JtIlrfBYBSD

--HG--
extra : rebase_source : 5c29a9c1bb99f457f66f320b873b2c7b0f93fcde
2018-06-07 22:30:14 +09:00
Ryan VanderMeulen 8e415eb4c0 Merge m-c to autoland. a=merge 2018-06-09 11:41:36 -04:00
Masayuki Nakano 235de70472 Bug 1467693 - Merge EditorBase::SwitchTextDirection() and EditorBase::SwitchTextDirectionTo() r=m_kato
There are two similar methods, but they are created with copy & paste.
So, the common code should be merged into new method, SetTextDirection().

Additionally, EditorBase::SwitchTextDirection() is a scriptable method but
nobody uses this from JS.  So, we can make it from nsIEditor and this
patch renames it to ToggleTextDirection() since current name is too
similar to SwitchTextDirectionTo().

MozReview-Commit-ID: BX3M1OKxiD5

--HG--
extra : rebase_source : 74a5ff65adc96ba69792f2e63daf14828c505270
2018-06-07 23:26:59 +09:00
Masayuki Nakano a6f0eec408 Bug 1467691 - Make some methods of EditorBase non-public r=m_kato
This moves NotifyEditorObservers() and GetInputEventTargetContent() into
protected member which should not be used by friends.

And also this moves IsModifiableNode() into protected member which can be
used by friends.

MozReview-Commit-ID: AxDBgTVED3V

--HG--
extra : rebase_source : 979c6cb0d075b3fd0106bd1c381aa3ef3b98ba78
2018-06-06 13:30:44 +09:00
Olli Pettay 5dad9cd69b Bug 1467790 - Inline nsINode::IsEditable, r=masayuki 2018-06-08 15:57:13 -04:00
Makoto Kato ef31f52f39 Bug 1467670 - Devirtualize InsertFromDrop. r=masayuki
InsertFromDrop is implemented on TextEditor only, so it can do devirtualize
this method.  Also, this method is only called by drop event handler of
EditorEventListener, so it should rename to better name (OnDrop).

Differential Revision: https://phabricator.services.mozilla.com/D1592
2018-06-08 05:19:51 +00:00
Masayuki Nakano 82c12dc72d Bug 1463985 - part 2: Rename EditSubAction::none to EditSubAction::eNone r=m_kato
MozReview-Commit-ID: 4wJyaNS1P1y

--HG--
extra : rebase_source : 169e2faffa25ed42875c8dccb5c49ae5aaa54ebb
2018-05-28 20:29:34 +09:00
Masayuki Nakano 99341a9445 Bug 1463985 - part 1: Rename EditAction to EditSubAction and related stuff r=m_kato
When we implement InputEvent.inputType, we need to set a stack class to record
which edit action is currently handled.  However, currently, we call smaller
jobs as edit action.  For example, when user types a character at selecting
some characters, then, EditAction::deleteSelection is performed first, then,
EditAction::insertText is performed.  However, for the InputEvent.inputType,
we need inserText information.  So, for making new enum EditAction, we need
to rename current EditAction to EditSubAction.

And also this renames related stuff:

EditorBase::mIsInEditAction -> EditorBase::mIsInEditSubAction
EditorBase::IsInEditAction() -> EditorBase::IsInEditSubAction()
EditorBase::mAction -> EditorBase::mTopLevelEditSubAction
TextEditRules::mTheAction -> TextEditRules::mTopLevelEditSubAction
EditorBase::StartOperation() ->
  EditorBase::OnStartToHandleTopLevelEditSubAction()
EditorBase::EndOperation() ->
  EditorBase::OnEndHandlingTopLevelEditSubAction()
AutoRules -> AutoTopLevelEditSubActionNotifier
RulesInfo -> EditSubActionInfo

MozReview-Commit-ID: cvSkPUjFm1

--HG--
extra : rebase_source : baf527a3e353b7a8ebe9a46be2243b059c500234
2018-05-28 20:12:34 +09:00
Boris Zbarsky c73f664888 Bug 1463981 part 3. Remove nsIDOMNode usage in editor. r=masayuki 2018-05-24 13:18:34 -04:00
Masayuki Nakano 11ae2207cf Bug 1463327 - part 4: Add comments to explain which kind of methods should be public methods r=m_kato
MozReview-Commit-ID: 6l8ZiMWEYCI

--HG--
extra : rebase_source : 024625012c917b17710016b91db10bfbaace2134
2018-05-22 20:15:05 +09:00
Masayuki Nakano 40ab33fe29 Bug 1463327 - part 1: Change scope of some methods of EditorBase which won't be called by non-helper classes of editing to protected r=m_kato
EditorBase (and other editor classes) have 2 type of public methods.  One is
true-public methods.  I.e., they should be able to be called by anybody.
E.g., command handlers, event listeners, or JS via nsIEditor interface.
The other is semi-public methods.  They are not called by the above examples
but called by other classes which are helper classes to handle edit actions.
E.g., TextEditRules, HTMLEditRules, HTMLEditUtils, CSSEditUtils and Transaction
classes.

When we will implement InputEvent.inputType, we need to create new stack
class and create its instance at every true-public methods to manage current
inputType (like TextEditRules::AutoSafeEditorData).  Therefore, it should not
happen that new code starts to call semi-public methods without the new
stack class instance.

For preventing this issue, we should make EditorBase have only the true-public
methods as public.  The other public methods should be protected and their
users should be friend classes.  Then, we can protect such method from external
classes.

Note that this patch just moves the methods without any changes in EditorBase.h
(except removes GetName() since there is no body of this method and removes
IterDirection since it's unused).

MozReview-Commit-ID: HBseKLL6pxx

--HG--
extra : rebase_source : 2251ff659d831d01a6778d38f4e2714fcf2d6ef4
2018-05-22 16:08:43 +09:00
Makoto Kato 71b2579c1e Bug 1463330 - Move CanPasteTransferable and PreDestroy to out of nsIEditor. r=masayuki
CanPasteTransferable and PreDestroy aren't used from script (inc. comm-central
and bluegriffon), so we should move these to out of nsIEditor.

MozReview-Commit-ID: GRfBobAm2qi

--HG--
extra : rebase_source : 812792ff43da24bfd9cb99c4b3127e6acdc43ba1
2018-05-22 18:23:21 +09:00
Masayuki Nakano 5f8ba21730 Bug 1457083 - part 1: Make public methods of TextEditUtils and HTMLEditUtils guarantee that the editor instance and selection instance won't be destroyed while it handles any edit actions r=m_kato
This patch creates a stack class in TextEditRules, its name is
AutoSafeEditorData and make all public methods (except editor observer methods)
which may change DOM tree, fire some DOM events or calling some XPCOM listeners
create its instance in the stack.  Then, it grabs associated editor instance
and its selection instance.

Next patch will make remaining public methods create AutoSafeEditorData.

MozReview-Commit-ID: 8oshdhL3ONQ

--HG--
extra : rebase_source : 591db71e45fe28ca93cbebd9bb7da8c16eae4466
2018-04-26 22:41:34 +09:00
Adrian Wielgosik 3a8ef6cf8a Bug 1460940 - Remove nsIDOMDocument uses in editor/. r=bz
MozReview-Commit-ID: 8doC9drkrG9

--HG--
extra : rebase_source : 24ac8ea960faff10b04ef0f419bc6dc7b6556452
2018-05-11 19:46:15 +02:00
Boris Zbarsky 46cae9462a Bug 1387143 part 3. Stop using nsISelection in nsISelectionController. r=mats 2018-05-08 13:52:36 -04:00
Makoto Kato db7992dc59 Bug 1457431 - Devirtualize mozInlineSpellChecker::SpellCheckAfterEditorChange. r=masayuki
It is unnecessary to keep virtual method for
mozInlineSpellChecker::SpellCheckAfterEditorChange, so we should remove virtual
keyword.

MozReview-Commit-ID: 2ry5uhMTFVC

--HG--
extra : rebase_source : ba86bb7c4e47598f83e3869733a238a740cef6b2
2018-04-27 21:11:31 +09:00
Boris Zbarsky 2348052be1 Bug 1455674 part 3. Stop using nsIDOMElement in nsITableEditor. r=masayuki
The patch is a bit large because all these methods except
SswitchTableCellHeaderType call each other; doing it piecemeal would have
required introducing, then removing, a bunch of QIs.
2018-04-26 23:35:18 -04:00
Boris Zbarsky c9bcb72283 Bug 1455674 part 1. Stop using nsIDOMElement in nsIEditor. r=masayuki 2018-04-26 23:35:18 -04:00
Masayuki Nakano 552423e58f Bug 1456377 - Move composition event handlers from EditorBase to TextEditor r=m_kato
Currently, EditorBase handles most composition events.  However, only
eCompositionChange event handler is in TextEditor and it's the main event
of handling composition.  Therefore, we should make all composition event
handlers in one place for easier to read, and make them non-virtual.

MozReview-Commit-ID: BYDhiPyGKvo

--HG--
extra : rebase_source : ed9db0f49d7ae268c85359e48015e86584f9c999
2018-04-19 00:31:51 +09:00
Makoto Kato da20106275 Bug 1455533 - Part 2. Devirtualize EditorBase::PostCreate. r=masayuki
No one uses postCreate from script even if c-c and BlueGriffon. So we should
devirtualize this

MozReview-Commit-ID: D3FKVEvG7Go

--HG--
extra : rebase_source : 9915a93ea8ae18bee251507a4c94fe66c0f03d0f
2018-04-20 16:40:24 +09:00
Makoto Kato bda5448bb6 Bug 1455533 - Part 1. Devirtualize EditorBase::SyncRealTimeSpell. r=masayuki
No one uses syncRealTimeSpell from script even if c-c and BlueGriffon. So
we should devirtualize this

MozReview-Commit-ID: AoOb165dOFa

--HG--
extra : rebase_source : e1a9dcdfa6cfe6c918a06a2738c38a6cb9441a1d
2018-04-20 16:27:16 +09:00
Masayuki Nakano 5af458988b Bug 1451672 - part 18: Rename EditorBase::CloneAttributes() to EditorBase::CloneAttributesWithTransaction() r=m_kato
MozReview-Commit-ID: 5tL31gRDVc9

--HG--
extra : rebase_source : dede345becde79dd9363f1df1980715713a80ef1
2018-04-13 18:44:08 +09:00
Masayuki Nakano 3da9675a5e Bug 1451672 - part 17: Rename EditorBase::InsertContainerAbove() to EditorBase::InsertContainerWithTransactionInternal() and wraps it with new inline methods, EditorBase::InsertContainerWithTransaction() r=m_kato
Similar to EditorBase::ReplaceContainerWithTransaction(),
EditorBase::InsertContainerAbove() may set an attribute to newly created element
if it's specified.  However, for avoiding the null check, let's make them
as references rather than pointers and treat nsGkAtoms::_empty as nullptr for
making the code safer.

This patch removes "Above" from the method name since it's redundant.
"Insert" sounds like inserting a node, and "Container" means to keep existing
children with new element in EditorBase.

MozReview-Commit-ID: 6EnkKHynYSP

--HG--
extra : rebase_source : d4b4c1a611c46a0f4d86389aab3331af565199d2
2018-04-13 18:17:04 +09:00
Masayuki Nakano 2d04b175d7 Bug 1451672 - part 16: Rename EditorBase::MoveNode() to EditorBase::MoveNodeWithTransaction() and create EditorBase::MoveNodeToEndWithTransaction() r=m_kato
This patch renames EditorBase::MoveNode() to
EditorBase::MoveNodeWithTransaction() and redesign its parameters including
replacing a set of container node and offset in it to EditorDOMPointBase.
However, it takes magic number -1 as meaning end of the container.
Therefore, this patch adds MoveNodeToEndWithTransaction() for keeping the
callers simple.

MozReview-Commit-ID: BeTq5c7GQNN

--HG--
extra : rebase_source : b3a617a5a1a493cb0fcbefe2d9a9708b0257b1a8
2018-04-12 23:58:52 +09:00
Masayuki Nakano 71964e6004 Bug 1451672 - part 15: Rename EditorBase::RemoveContainer() and HTMLEditor::RemoveBlockContainer() with "WithTransaction" postfix and make their argument |Element&| r=m_kato
MozReview-Commit-ID: 2toj48mqHM9

--HG--
extra : rebase_source : 621cb7a3137137dab45c311836b8304e7bd772f2
2018-04-12 22:23:04 +09:00
Masayuki Nakano b7fe9939db Bug 1451672 - part 14: Rename EditorBase::ReplaceContainer() to EditorBase::ReplaceContainerWithTransactionInternal() and create some wrappers of it r=m_kato
The parameters of EditorBase::ReplaceContainer() are complicated.  For example,
if it's specified as cloning all attributes, aAttribute and aValue are ignored
because CloneAttributes() removes all existing attributes but ReplaceContainer()
sets attributes before calling CloneAttributes().  This method has 3 modes:
1. Just replaces aOldContainer with new element.
2. #1 and clones all attributes from aOldContainer to the new element.
3. #1 and sets aAttribute of the new element to aValue.

Therefore, this patch creates 3 inline wrappers of the renamed method.

MozReview-Commit-ID: IsPu2uZuU8f

--HG--
extra : rebase_source : 02a23f48a91e0c9558126552a4c8d4b12c8b76bc
2018-04-12 21:45:55 +09:00
Masayuki Nakano e31bcb6efe Bug 1451672 - part 13: Rename EditorBase::InsertTextImpl() and EditorBase::InsertTextIntoTextNodeImpl() to EditorBase::InsertTextWithTransaction() and EditorBase::InsertTextIntoTextNodeWithTransaction() r=m_kato
MozReview-Commit-ID: DF3HBVyu4P2

--HG--
extra : rebase_source : 1ce6c2b005c06df340524d2d617673f4ce93df07
2018-04-12 17:58:14 +09:00
Masayuki Nakano bd0aa50472 Bug 1451672 - part 11: Rename EditorBase::SetAttribute(), EditorBase::RemoveAttribute() and EditorBase::CloneAttribute() with "WithTransaction" postfix r=m_kato
MozReview-Commit-ID: I8T9MNkY8Yq

--HG--
extra : rebase_source : 767e52098233c5f6a2c0e7efca433ddd9f246749
2018-04-12 16:58:33 +09:00
Masayuki Nakano 80c2ea82ed Bug 1451672 - part 9: Create TextEditor::DeleteSelectionAsAction() as implementation of nsIEditor::DeleteSelection() r=m_kato
First, EditorBase::DeleteSelection() is never used since
TextEditor::DeleteSelection() overrides it but does not call it.  So, this patch
makes EditorBase::DeleteSelection() only returns NS_ERROR_NOT_IMPLEMENTED.

Next, EditorBase::DeleteSelectionImpl() actually removes content for
TextEditor::DeleteSelection().  So, it should be named as
DeleteSelectionWithTransaction().  However, it'll be done in the following
patch.  On the other hand, its callers are EditorBase::HandleKeyPressEvent()
and EditorBase::DeleteSelectionAndPrepareToCreateNode().  Fortunately, they
can be moved to TextEditor simply.  Therefore this patch moves the methods
to TextEditor for making related methods in a place.

Then, we can make the implementation of nsIEditor::TextEditor() as a non-virtual
method, TextEditor::DeleteSelectionAsAction().

MozReview-Commit-ID: KXFDhW3G9lA

--HG--
extra : rebase_source : 15986979279b2cae3b61cda1bf6bf3d9e4987f3f
2018-04-11 17:37:49 +09:00
Masayuki Nakano 526463cade Bug 1451672 - part 8: Rename EditorBase::DeleteText() to EditorBase::DeleteTextWithTransaction() r=m_kato
MozReview-Commit-ID: KK4dTpKbpLc

--HG--
extra : rebase_source : 060e5183efd6570cbdd59429552b318fd3865d54
2018-04-10 16:50:06 +09:00
Masayuki Nakano 0a1cfd5226 Bug 1451672 - part 7: Rename EditorBase::DeleteNode() to EditorBase::DeleteNodeWithTransaction() r=m_kato
MozReview-Commit-ID: AQVVTjfXJv

--HG--
extra : rebase_source : 9678e8f2e16c9ec193e292c577912b6df7782202
2018-04-10 16:23:54 +09:00
Masayuki Nakano 7a1b5de42f Bug 1451672 - part 6: Rename EditorBase::JoinNodesImpl() to EditorBase::DoJoinNodes() r=m_kato
MozReview-Commit-ID: 9fqa4fKkAF5

--HG--
extra : rebase_source : 6ec753824488235a03677ef1238aabe607b7d786
2018-04-10 03:56:46 +09:00
Masayuki Nakano 8b1e0b6b9c Bug 1451672 - part 5: Rename EditorBase::JoinNodes() and related methods with "WithTransaction" postfix r=m_kato
This patch renames:
EditorBase::JoinNodes() -> EditorBase::JoinNodesWithTransaction()
EditorBase::JoinNodeDeep() -> EditorBase::JoinNodesDeepWithTransaction()
HTMLEditRules::JoinNodesSmart() ->
  HTMLEditRules::JoinNearestEditableNodesWithTransaction()
HTMLEditRules::TryToJoinBlocks() ->
  HTMLEditRules::TryToJoinBlocksWithTransaction()

MozReview-Commit-ID: Ao16GhAcyIZ

--HG--
extra : rebase_source : 6746735c339cf2799e94137de87c7a7dce6efded
2018-04-10 03:46:44 +09:00
Masayuki Nakano a1a45ac179 Bug 1451672 - part 4: Rename EditorBase::SplitNodeImpl() to EditorBase::DoSplitNode() r=m_kato
EditorBase::SplitNodeImpl() is called by SplitNodeTransaction::DoTransaction()
for actually splitting a node.  However, "WithoutTransaction" postfix is really
redundant.  Perhaps, just naming DoSplitNode() is better since "Impl" isn't
unclear and not useful if somebody wants to use it as a utility method and
there has already been EditorBase::SplitNode() which is an override of
nsIEditor::SplitNode().  It must not be good to use same name for different
purpose (EditorBase::SplitNode() creates a transaction).

MozReview-Commit-ID: Akjeyp52vVv

--HG--
extra : rebase_source : dcb29cec2749431b59068b670b68e5cd61b18588
2018-04-10 02:32:33 +09:00