Since the test goes through all moz.build files disregarding DIRS and
the conditions that may disable directories, in some cases, moz.builds
can fail to be evaluated properly because of missing variables in
config.status. This time (because it's not the first), it's
LLVM_DLLTOOL.
After fixing that, it turns out many of the files/directories pointed to
by Files() directives were removed or moved.
While here, make the test script python3-ready.
Differential Revision: https://phabricator.services.mozilla.com/D70157
--HG--
extra : moz-landing-system : lando
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
--HG--
rename : editor/libeditor/HTMLEditRules.cpp => editor/libeditor/HTMLEditSubActionHandler.cpp
rename : editor/libeditor/TextEditRules.cpp => editor/libeditor/TextEditSubActionHandler.cpp
extra : moz-landing-system : lando
Since bug 1577443 is landed in comm-central, no one uses `nsIHTMLEditor.getLinkedObject`.
Differential Revision: https://phabricator.services.mozilla.com/D44361
--HG--
extra : moz-landing-system : lando
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
When declaring a common base class of all editor command classes in
EditorCommands.h, we need to declare some useful macro to declare its
subclasses. However, such macro should be `#undef`ed in the header file.
Therefore, this patch moves all contents in HTMLEditorCommands.h to
EditorCommands.h and removes it from the tree.
Differential Revision: https://phabricator.services.mozilla.com/D28682
--HG--
extra : moz-landing-system : lando
Since bug 1491173 is landed, there is no users of dumpContentTree,
debugDumpContent and debugUnitTests. So Let's remove these methods from
nsIEditor.
Differential Revision: https://phabricator.services.mozilla.com/D10029
--HG--
extra : moz-landing-system : lando
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
HTMLEditorController and HTMLEditorCommands is for execCommand, so we should
move from composer to libeditor since HTML editor code is in libeditor.
MozReview-Commit-ID: DEBoTqUsQnw
--HG--
rename : editor/composer/HTMLEditorCommands.cpp => editor/libeditor/HTMLEditorCommands.cpp
rename : editor/composer/HTMLEditorCommands.h => editor/libeditor/HTMLEditorCommands.h
rename : editor/composer/HTMLEditorController.cpp => editor/libeditor/HTMLEditorController.cpp
rename : editor/composer/HTMLEditorController.h => editor/libeditor/HTMLEditorController.h
rename : editor/composer/HTMLEditorDocumentCommands.cpp => editor/libeditor/HTMLEditorDocumentCommands.cpp
extra : rebase_source : 0b9627ac89803212da3377db3dfefedc3b57ce73
We should not use nsIDOMDocument if unnecessary. Because it needs QI to access
nsIDocument.
MozReview-Commit-ID: CMF3tmvBTB9
--HG--
extra : rebase_source : e832023be8d59a2c1e01bd423e6f058b0708dfe9
Then, all classes in editor/txmgr is now in mozilla namespace and all
headers which are included by other directory are now exposed. So,
we can remote local includes from other directories now.
MozReview-Commit-ID: Kdb1c4Hp9Sy
--HG--
rename : editor/txmgr/nsTransactionStack.cpp => editor/txmgr/TransactionStack.cpp
rename : editor/txmgr/nsTransactionStack.h => editor/txmgr/TransactionStack.h
extra : rebase_source : 75035e9e618680af9188820595ab050b612a456f
For calling some methods of mRules from EditorBase, let's move mRules member
from TextEditor to EditorBase.
Unfortunately, TextEditRules.h depends on EditAction which is declared in
EditorBase.h and that caused unnecessary include hell of EditorBase.h. So,
let's move it to an independent header file.
MozReview-Commit-ID: 5HiSZLP9WHH
--HG--
extra : rebase_source : 3e2c40385a6f3d6d1e03ef4e213434383bb37d5f
nsIEditRules is a super class of only mozilla::TextEditRules and not scriptable.
So, we can get rid of it.
This patch merges RulesInfo with TextRulesInfo and name new class is RulesInfo
for minimizing the code change.
Additionally, adds two methods AsHTMLEditRules() and its const version.
They make existing cast code safer.
MozReview-Commit-ID: KwWH3ADj3Bv
--HG--
extra : rebase_source : 4517bdc95b530530e9756e07c4b6cce78c002073
A lot of methods in editor returns a child offset with an out param when it
returns its container and offset in the container. This is ugly hack for
performance of nsINode::IndexOf(). However, there are a lot of regression
since the relation between offset and child node can be broken really easily.
So, we should make EditorDOMPoint as a subclass of RangeBoundary and manage
a set of container, reference child and its offset in it (e.g.,
SetNextSibling() added by this patch).
Note that RangeBoundary's performance is not good for temporary use if we set
a point with offset, it immediately retrieves mRef. The following patch will
improve this performance.
MozReview-Commit-ID: 7mcJ1P1OjVr
--HG--
rename : editor/libeditor/EditorUtils.h => editor/libeditor/EditorDOMPoint.h
extra : rebase_source : 785094fcfc592d9e5b48cbc36ed225dbb8bb4111
Besides some unnecessary copying and malloc overhead that this removes, it
also removes a call to dom::Text::GetData() which we used to only make to
get the old length of the text node before modifying it. Turns out that
this old length was already obtained once in SetTextImpl().
Actually, input.value setter behaviour (when editor has focus) is the following.
- select all
- delete selection
- delete text node
- insert text
- create text node
- create nsIFrame since we don't support lazy construction for editable element
It is too expensive to change text. So I would like to change like the following when there is 1 text node only (normal case). If child nodes isn't 1 text node only, use original way.
- set text on existed text node
So, for this fast path, I would like to add SetText transaction API.
MozReview-Commit-ID: A7bjXtCtSoB
--HG--
extra : rebase_source : ff6348d7a3304e676a0a4b897f91623962961ae0
Now, nobody (including add-ons) uses nsIHTMLEditor::SetDocumentTitle(), so, we can remove it.
Additionally, mozilla::SetDocumentTitleTransaction is created only when nsIHMLEditor::SetDocumentTitle(), so, we can remove this class too.
MozReview-Commit-ID: HK7G9u7HUlh
--HG--
extra : rebase_source : da68cabbf929a684d26f6316fdc7f58b8e32ab02
This removes the unnecessary setting of c-basic-offset from all
python-mode files.
This was automatically generated using
perl -pi -e 's/; *c-basic-offset: *[0-9]+//'
... on the affected files.
The bulk of these files are moz.build files but there a few others as
well.
MozReview-Commit-ID: 2pPf3DEiZqx
--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
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
Perhaps, there may be better name like WhitespaceRunObject or something, however, for now keep using the term because I don't understand well what it does.
With this patch, following objects are renamed:
nsWSRunObject -> mozilla::WSRunObject
WSType -> mozilla::WSType
nsWSRunObject::WSFragment -> mozilla::WSRunObject::WSFragment
nsWSRunObject::WSPoint -> mozilla::WSRunObject::WSPoint
MozReview-Commit-ID: JgAWiPjOtMW
--HG--
rename : editor/libeditor/nsWSRunObject.cpp => editor/libeditor/WSRunObject.cpp
rename : editor/libeditor/nsWSRunObject.h => editor/libeditor/WSRunObject.h
This patch also fixes new bustage of nsHTMLEditRules.cpp and nsWSRunObject.cpp.
MozReview-Commit-ID: 5xgZDP7d6wy
--HG--
rename : editor/libeditor/nsHTMLURIRefObject.cpp => editor/libeditor/HTMLURIRefObject.cpp
rename : editor/libeditor/nsHTMLURIRefObject.h => editor/libeditor/HTMLURIRefObject.h
Note that this fixes some new bustage of nsHTMLEditor.
nbsp is conflict with nsWSRunObject.cpp's same name constant. Therefore, I moved it into nsHTMLEditor and rename it to kNBSP.
And including some missing header files.
MozReview-Commit-ID: hwL8BIbSMQ
--HG--
rename : editor/libeditor/nsSelectionState.cpp => editor/libeditor/SelectionState.cpp
rename : editor/libeditor/nsSelectionState.h => editor/libeditor/SelectionState.h
This patch also moves ImplCycleCollectionTraverse() and ImplCycleCollectionUnlink() to mozilla namespace for avoiding bustage due to confusion caused by "using namespace" in other unified cpp files.
MozReview-Commit-ID: GekPlZnqLs9
--HG--
rename : editor/libeditor/nsStyleSheetTxns.cpp => editor/libeditor/StyleSheetTransactions.cpp
rename : editor/libeditor/nsStyleSheetTxns.h => editor/libeditor/StyleSheetTransactions.h
This patch renames IMETextTxn to CompositionTransaction. "Composition" is now used in some web standard specs, e.g., CompositionEvent defined by UI Events.
This patch also renames nsEditor::CreateTxnForIMEText() to nsEditor::CreateTxnForComposition().
MozReview-Commit-ID: JN0GgGdpAWG
--HG--
rename : editor/libeditor/IMETextTxn.cpp => editor/libeditor/CompositionTransaction.cpp
rename : editor/libeditor/IMETextTxn.h => editor/libeditor/CompositionTransaction.h