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

18 Коммитов

Автор SHA1 Сообщение Дата
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 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
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
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
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Masayuki Nakano e376af4b27 Bug 1425412 - part 12: Create factory methods for DeleteRangeTransaction, EditAggregateTransaction and PlaceholderTransaction for consistency with the other transaction classes r=m_kato
Although, we don't need factory methods for DeleteRangeTransaction,
EditAggregateTransaction nor PlaceholderTransaction, for consistency with the
other transaction classes, they should have factory methods for making easier
to write the code.

For not making the performance slow down, they should be inline methods.

MozReview-Commit-ID: 7jl5yZNFYmP

--HG--
extra : rebase_source : 7cd5b5e268a670b3c8855407cc72dec12d34d8ff
2017-12-18 18:08:43 +09:00
Masayuki Nakano dacd109e2f Bug 1423835 - part 2: Rename EditorDOMPointBase::Container() to EditorDOMPointBase::GetContainer() and add some useful methods to access its container r=m_kato
EditorDOMPointBase::Container() may return nullptr.  So, it should be renamed
to GetContainer().

Then, the method name becomes longer and a lot of callers access the result
directly.  So, there should be following methods to make the callers shorter:

- GetContainerAsContent() to return the container as nsIContent*.
- GetContainerAsElement() to return the container as dom::Element*.
- GetContainerAsText() to return the container as dom::Text.
- GetContainerAsDOMNode() to return the container as nsIDOMNode*.
- CanContainerHaveChildren() to check if the container can have child nodes.
- IsInDataNode() to check if the point is in a data node including text node.
- IsInTextNode() to check if the point is in a text node.
- IsContainerHTMLElement() to check if the container is specific HTML element.
- IsContainerAnyOfHTMLElements() to check if the container is one of the
  specified HTML elements.

MozReview-Commit-ID: LkN2WBbCPj0

--HG--
extra : rebase_source : 9da1e70d4c74f7ad573e244cf6c7b21a0c7b4410
2017-12-07 18:45:52 +09:00
Masayuki Nakano 7c53b094a1 Bug 1415414 - Make DeleteRangeTransaction::CreateTxnsToDeleteBetween() and DeleteRangeTransaction::CreateTxnsToDeleteContent() use RawRangeBoundary as their arguments r=m_kato
By the fix of bug 1407352, DeleteRangeTransaction::CreateTxnsToDeleteBetween()
starts to use child node instead of a set of container node and offset in it.
However, this is ugly and using RawRangeBoundary may reduce computing offset
more.  So, they should use RawRangeBoundary to refer delete points.

MozReview-Commit-ID: pwDHOxpz0E

--HG--
extra : rebase_source : 3871ba4fa3cfb174d5dac57822ae69c40a305323
2017-11-08 15:01:23 +09:00
Ehsan Akhgari 959b55b795 Bug 1407352 - Avoid calling GetChildAt() in DeleteRangeTransaction::CreateTxnsToDeleteBetween(); r=masayuki 2017-10-11 01:49:55 -04:00
Boris Zbarsky 15cb86a93f Bug 1349940. DeleteRangeTransaction should not keep its range alive longer than it needs to. r=masayuki, a=kwierso
MozReview-Commit-ID: 283P59EDFPW
2017-03-24 16:07:11 -04:00
Masayuki Nakano e877ded333 Bug 1349138 Edit transactions should store their editor instance with strong reference r=smaug
Edit transactions should store their editor instance with strong reference and they should be released at destroying the editor.

MozReview-Commit-ID: D67KU8WFxyo

--HG--
extra : rebase_source : 28c8a37498cad9f2e308eb4416cef76cf395bb9c
2017-03-21 19:00:36 +09:00
Masayuki Nakano 22a5d6332f Bug 1345690 part.2 Make the constructor of DeleteRangeTransaction initialize all members instead of Init() r=m_kato
Similar to DeleteNodeTransaction, DeleteRangeTransaction should take all necessary information as its arguments.  However, different from DeleteNodeTransaction, this doesn't need to implement CanDoIt() since nobody checks the state.

MozReview-Commit-ID: 2Z9fNtGeJ9c

--HG--
extra : rebase_source : fe3f75126a8975a0edb00a6c0709134b0a0f4d87
2017-03-09 11:19:39 +09:00
Masayuki Nakano f382711dc3 Bug 1260651 part.59 Rename nsEditor to mozilla::EditorBase (and also their file names) r=mccr8
This patch also renames:

EditorInputEventDispatcher -> mozilla::EditorInputEventDispatcher

And some variable names are renamed from aEditor or mEditor to aEditorBase or mEditorBase for making their types clearer.

MozReview-Commit-ID: 2FCXWpLMn8e

--HG--
rename : editor/libeditor/nsEditor.cpp => editor/libeditor/EditorBase.cpp
rename : editor/libeditor/nsEditor.h => editor/libeditor/EditorBase.h
2016-07-08 13:10:13 +09:00
Masayuki Nakano 452819e0f2 Bug 1260651 part.39 Rename nsRangeUpdater to mozilla::RangeUpdater r=mccr8
MozReview-Commit-ID: 8xPhGbSSOjx
2016-06-24 15:01:40 +09:00
Masayuki Nakano 5fb3db78b5 Bug 1260651 part.32 Rename EditTxn to mozilla::EditTransactionBase r=mccr8
This patch also renames NS_DECL_EDITTXN to NS_DECL_EDIT_TRANSACTION_BASE.

MozReview-Commit-ID: 29TQbKBBEhD

--HG--
rename : editor/libeditor/EditTxn.cpp => editor/libeditor/EditTransactionBase.cpp
rename : editor/libeditor/EditTxn.h => editor/libeditor/EditTransactionBase.h
2016-07-08 09:48:34 +09:00
Masayuki Nakano 68abedfd73 Bug 1260651 part.30 Rename EditAggregateTxn to mozilla::EditAggregateTransaction (and their files too) r=mccr8
MozReview-Commit-ID: TPiBS0eEI4

--HG--
rename : editor/libeditor/EditAggregateTxn.cpp => editor/libeditor/EditAggregateTransaction.cpp
rename : editor/libeditor/EditAggregateTxn.h => editor/libeditor/EditAggregateTransaction.h
2016-07-07 17:11:30 +09:00
Masayuki Nakano aab723f475 Bug 1260651 part.21 Rename DeleteRangeTxn to mozilla::DeleteRangeTransaction (and their files too) r=mccr8
MozReview-Commit-ID: IYFkzr95E6U

--HG--
rename : editor/libeditor/DeleteRangeTxn.cpp => editor/libeditor/DeleteRangeTransaction.cpp
rename : editor/libeditor/DeleteRangeTxn.h => editor/libeditor/DeleteRangeTransaction.h
2016-07-07 14:56:53 +09:00