Commit Graph

18 Commits

Author SHA1 Message Date
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
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
85a0bd9a61 Bug 1620135 - Clean up trivial constructor and destructor under libeditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D65448

--HG--
extra : moz-landing-system : lando
2020-03-06 04:38:25 +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
537b829474 Bug 1447213 - Change editor methods which take |const EditorRawDOMPoint&| but called with EditorDOMPoint.AsRaw() to template methods r=m_kato
A lot of methods take |const EditorRawDOMPoint&| as their argument.  However,
some of them are called with EditorDOMPoint::AsRaw(). This is not good for
performance because:
1. Needs to create temporary instance of EditorRawDOMPoint.
2. EditorRawDOMPoint::AsRaw() may be used by simple mistake.
3. Such methods may call EditorRawDOMPoint::Offset(), however, it's not copied
   to the original EditorDOMPoint instance.  So, callers may need to compute
   offset again.

So, such methods should be changed to template methods if they are not virtual
method and AsRaw() should be gotten rid of for prevent it looking not expensive.

MozReview-Commit-ID: DAqqW4a2EMS

--HG--
extra : rebase_source : 120b920477fe6e7231271411a00994325acdb842
2018-03-20 14:05:47 +09:00
Masayuki Nakano
2b43d139dd Bug 1425412 - part 7: Create SplitNodeTransaction::Create() and remove EditorBase::CreateTxnForSplitNode() r=m_kato
SplitNodeTransaction::Create() just hides what it does.  For making its caller
clearer, let's create a factory method, SplitNodeTransaction::Create().

MozReview-Commit-ID: KDiC8dDrLuQ

--HG--
extra : rebase_source : ac04544e10644b8a73375fb2b786e0bc86eb56ae
2017-12-15 21:37:23 +09:00
Masayuki Nakano
f989a6c4d5 Bug 1419745 - part 3: CreateElementTransaction and SplitNodeTransaction should store DOM point with EditorDOMPoint rather than RangeBoundary r=m_kato
CreateElementTransaction and SplitNodeTransaction store DOM point with
RangeBoundary now.  However, it refers next child of referring point.
Therefore, if it's moved to different container or removed from the DOM
tree, they cannot do undo/redo.  We can say for the child node, however,
it doesn't make sense depending on a node which is not directly referring.

MozReview-Commit-ID: Baohbub3RNZ

--HG--
extra : rebase_source : 6776420271cdaf91aae6213fb6e1bcf1841112b1
2017-11-28 17:13:15 +09:00
Masayuki Nakano
9f55e71184 Bug 1413181 - part 2: SplitNodeTransaction should store start of existing right node with RangeBoundary r=m_kato
Make SplitNodeTransaction stores start of existing right node (which will be
split) instead of split point as a pair of the right node and offset in it.

MozReview-Commit-ID: 2DIpJGSuNaC

--HG--
extra : rebase_source : 13949bdddc30c59462e7fea7fadf29f015ab8d3a
2017-11-12 09:27:19 +09: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
fb4dd2591f Bug 1260651 part.61 Replace "etc" with "etc." r=mccr8
MozReview-Commit-ID: JFgd0t2bqzu
2016-07-08 14:15:21 +09:00
Masayuki Nakano
7f30e926b8 Bug 1260651 part.60 editor/libeditor should export some headers which are required by other modules and other modules shouldn't use local include for them r=mccr8
MozReview-Commit-ID: FZSExwkHH2B
2016-07-08 14:03:31 +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
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
15b7d9237f Bug 1260651 part.29 Rename mozilla::dom::SplitNodeTxn to mozilla::SplitNodeTransaction (and their files too) r=mccr8
MozReview-Commit-ID: 5guZsO9XGLY

--HG--
rename : editor/libeditor/SplitNodeTxn.cpp => editor/libeditor/SplitNodeTransaction.cpp
rename : editor/libeditor/SplitNodeTxn.h => editor/libeditor/SplitNodeTransaction.h
2016-07-07 16:59:55 +09:00