Commit Graph

8767 Commits

Author SHA1 Message Date
Boris Zbarsky
75abc43e0d Bug 1476145 part 8. Stop using getInterface(nsIDOMWindowUtils) in various test code. r=kmag 2018-07-24 19:47:43 -04:00
Masayuki Nakano
77fdd1508b Bug 1476897 - part 7: Drop nsIEditorMailSupport interface from TextEditor r=m_kato
Nobody uses nsIEditorMailSupport interface with TextEditor instances.
Therefore, stopping nsIEditorMailSupport interface support of TextEditor
saves memory of TextEditor which may be created a lot even in a document.

MozReview-Commit-ID: BJ4ucCaeYHl

--HG--
extra : rebase_source : 2c932df04d00a4453428dc3b7fd64d338c6963eb
2018-07-23 16:45:07 +09:00
Masayuki Nakano
5e98e38c30 Bug 1476897 - part 6: Move implementation of both TextEditor::PasteAsQuotation() and HTMLEditor::PasteAsQuotation() to new virtual methods r=m_kato
Neither TextEditor::PasteAsQuotation() nor HTMLEditor::PasteAsQuotation()
is used via nsIEditorMailSupport.  So, perhaps, we can remove this method
from the interface.  But for now, we should move each implementation to
new virtual methods and make only HTMLEditor::PasteAsQuotation() calls
new method since nobody uses nsIEditorMailSupport with TextEditor instances.

MozReview-Commit-ID: Eilxk74VHwT

--HG--
extra : rebase_source : 15abe305d9f332ecd521d9115a71443665a8c9fe
2018-07-23 16:34:03 +09:00
Masayuki Nakano
a2ecad4a67 Bug 1476897 - part 5: Move implementation of TextEditor::InsertAsQuotation() to new method r=m_kato
TextEditor::InsertAsQuotation() is not used as a method of nsIEditorMailSupport,
however, this is used internally.  So, we need to keep this method's function
as a non-virtual method but we can make the method just return
NS_ERROR_NOT_IMPLEMENTED.

MozReview-Commit-ID: 2CcY4SZGwyr

--HG--
extra : rebase_source : d490145b571bea465be5379872b9ea01daa633cc
2018-07-23 16:05:30 +09:00
Masayuki Nakano
b195745b15 Bug 1476897 - part 4: Make TextEditor::InsertTextWithQuotations() returns NS_ERROR_NOT_IMPLEMENTED since it's never used r=m_kato
InsertTextWithQuotations() is called only by HTMLEditor::Rewrap().  So,
HTMLEditor::InsertTextWithQuotations() is always called.  Therefore, we can
make it just return NS_ERROR_NOT_IMPLEMENTED.

MozReview-Commit-ID: FvmY2x3OOn7

--HG--
extra : rebase_source : be567c3882f81c83d2c07955c07202bb9ce2d797
2018-07-23 15:25:18 +09:00
Masayuki Nakano
69e0b4e72b Bug 1476897 - part 3: Make TextEditor::InsertAsCitedQuotation() return NS_ERROR_NOT_IMPLEMENTED since nobody uses this method with TextEditor instances r=m_kato
MozReview-Commit-ID: 487sf6d2wrt

--HG--
extra : rebase_source : dfacb64768de3eab11b7e11478be4c297641f2a0
2018-07-23 15:17:03 +09:00
Masayuki Nakano
edd6613c92 Bug 1476897 - part 2: Make TextEditor::GetEmbeddedObjects() just return NS_ERROR_NOT_IMPLEMENTED since it's never used r=m_kato
TextEditor::GetEmbeddedObjects() is never called unless
nsIEditorMailSupport::GetEmbeddedObjects() is used with TextEditor instance.
However, nobody uses nsIEditorMailSupport interface with TextEditor instance.

MozReview-Commit-ID: 4HTnL7KsNGf

--HG--
extra : rebase_source : ceb4f895192b9518c02364c8a317d6c941ac9cc2
2018-07-23 15:07:35 +09:00
Masayuki Nakano
ddfc315822 Bug 1476897 - part 1: Implement nsIEditorMailSupport in HTMLEditor since it's never used with TextEditor instance r=m_kato
MozReview-Commit-ID: 5JT4m0IftXY

--HG--
extra : rebase_source : d805fe53c11b01c3aba4578a5b934d6c66490c8e
2018-07-23 14:40:05 +09:00
Masayuki Nakano
1764b38048 Bug 1476294 - Make HTMLEditorDocumentCommands.cpp use non-virtual methods of nsCommandParams instead of virtual methods of nsICommandParams r=Ehsan
This is remaining part of bug 1450882.  I forgot to update
HTMLEditorDocumentCommands.cpp when I work on the bug.

This patch makes HTMLEditorDocumentCommands.cpp use non-virtual methods of
nsCommandParams instead of virtual methods of nsICommandParams.

MozReview-Commit-ID: 12AjXbeYNOa

--HG--
extra : rebase_source : 8d73866b21f6dd1c436244a771fb39bbe2debd40
2018-07-18 00:30:05 +09:00
Masayuki Nakano
905e9bda47 Bug 1476906 - Change nsIHTMLEditor::ReplaceHeadContentsWithHTML() to a non-virtual method of HTMLEditor r=m_kato
nsIHTMLEditor::ReplaceHeadContentsWithHTML() is used only by HTMLEditor
internally. So, it shouldn't be an nsIHTMLEditor's method.  This patch
changes it as a non-virtual method of HTMLEditor and rename it to
ReplaceHeadContentsWithSourceWithTransaction() for consistency with other
methods.

MozReview-Commit-ID: GT3maKEbZuP

--HG--
extra : rebase_source : 2dc8c682f0dd82d3fc9032fbf5195de121975c32
2018-07-19 21:31:19 +09:00
Makoto Kato
b870a3fcf3 Bug 358033 - Part 2. Add test. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D2260

--HG--
extra : moz-landing-system : lando
2018-07-23 02:46:24 +00:00
Makoto Kato
414c3e8695 Bug 358033 - Part 1. Restore direction of Selection. r=masayuki
SelectionState doesn't save and restore current selection's direction.  So the
direction of selection is always default after undoing.

So we should restore direction of selection.

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

--HG--
extra : moz-landing-system : lando
2018-07-23 02:44:42 +00:00
Masayuki Nakano
8245258aa0 Bug 1264876 - Remove StripCites() from nsIEditorMailSupport r=m_kato
nsIEditorMailSupport::StripCites() is used only by QA addon of Seamonkey.
So, this is not necessary API now.  This patch removes it and removes its
helper classes in InternetCiter.

MozReview-Commit-ID: 4Esl3GXzo0U

--HG--
extra : rebase_source : 8f5fa85b18613726bfa7e21e5a6312cbd42af7c2
2018-07-19 16:55:31 +09:00
Masayuki Nakano
25f3d21b8d Bug 1337247 - Remove PasteAsCitedQuotation() from nsIEditorMailSupport r=m_kato
nsIEditorMailSupport::PasteAsCitedQuotation() is only used by
HTMLEditor::PasteAsQuotation().  So, we can get rid of the method from the
interface and merge current implementation with HTMLEditor::PasteAsQuotation().

MozReview-Commit-ID: II5ExMAIOhP

--HG--
extra : rebase_source : e40b9b676358a09642e16c73e702e04ac192cb18
2018-07-19 16:08:00 +09:00
Masayuki Nakano
3a1344255b Bug 1467802 - part 4: Create TextEditor::ComputeValueInternal() for internal use of nsIPlaintextEditor::OutputToString() r=m_kato
For reducing virtual calls of nsIPlaintextEditor::OutputToString(),
TextEditor should have new non-virtual public method, ComputeTextValue() and
shared code between it and OutputToString() as ComputeValueInternal().

MozReview-Commit-ID: KFeovQ568bf

--HG--
extra : rebase_source : a5cfb24cefe44f7c60e649959ed49350ed00d4d6
2018-07-18 21:27:30 +09: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
Masayuki Nakano
9da3ea2d22 Bug 1467802 - part 1: Create TextEditor::WrapWidth() for internal use of nsIPlaintextEditor::GetWrapWidth() r=m_kato
Let's create non-virtual and simple accessor for TextEditor::mWrapColumn.

MozReview-Commit-ID: 97LhhOgkx4A

--HG--
extra : rebase_source : bd57d7fbcc8da5e00fe71b81a6a2a9ef2f92e939
2018-07-18 20:31:17 +09:00
Masayuki Nakano
2fa716ed4d Bug 1467799 - part 2: Stop using nsIEditor::GetDocumentIsEmpty() from C++ code r=m_kato
nsIEditor::GetDocumentIsEmpty() is a virtual code and there is non-virtual
method, TextEditor::IsEmpty().  So, any callers in C++ should use
TextEditor::IsEmpty() instead.

MozReview-Commit-ID: CQE8LP6XI96

--HG--
extra : rebase_source : e0027c3d71856adcd5fa7820bf936a6b405560c5
2018-07-18 17:51:49 +09:00
Masayuki Nakano
0d09e1a26a Bug 1467799 - part 1: Remove implementation of EditorBase::GetDocumentIsEmpty() and rename TextEditor::DocumentIsEmpty() to TextEditor::IsEmpty() r=m_kato
EditorBase::GetDocumentIsEmpty() is never called since it's overridden by
TextEditor::GetDocumentIsEmtpy() and never called directly.  So, we can remove
its implementation.

Additionally, DocumentIsEmpty() is redundant. We can make it just IsEmpty().

MozReview-Commit-ID: CGsNzCHyVf

--HG--
extra : rebase_source : 3a8eeaf108bb387ea559e0643acfa96e26768577
2018-07-18 17:44:14 +09:00
Masayuki Nakano
b98777fe41 Bug 1462257 - TextComposition should dispatch eCompositionChange event when eCompositionCommit is being fired immediately after eCompositionStart r=m_kato
TextEditor modifies composition string or selected string when first
eCompositionChange event is received.  However, TextComposition dispatches
eCompositionChange event ("text" event of DOM) only when composition string
becomes non-empty if current composition string is empty.  So, when IME
dispatches only eCompositionStart and eCompositionCommit events for removing
selected text, TextEditor does nothing.  This hacky behavior is used by
MS Pinyin on Windows 10 at least.

For supporting this behavior, we need to make TextComposition dispatch
eCompositionChange event when eCompositionChange(AsIs) event is fired
even before dispatching eCompositionChange event.

Although from point of view of web apps, the hacky composition should be
merged into the previous composition if it's possible but it's out of scope
of this bug.

MozReview-Commit-ID: 7QfeBJamGTU

--HG--
extra : rebase_source : 8de1353021f2961ae9f8bdf17ddded1058175339
2018-07-11 23:05:39 +09:00
Masayuki Nakano
7581aff013 Bug 1450882 - part 4: Make C++ users of nsICommandParams use nsCommandParams directly r=Ehsan
nsICommandParams is implemented only by nsCommandParams.  So, all C++ users
can treat all instances of nsICommandParams as nsCommandParams.  Therefore,
this patch makes all set/get value calls use non-virtual methods and all
constructors directly create nsCommandParams instance.

MozReview-Commit-ID: CscgK0gKp5g

--HG--
extra : rebase_source : 62eb0f60aada795a44cf5496cdafbff6cba80013
2018-07-10 20:04:21 +09:00
Masayuki Nakano
5a2332692a Bug 1450882 - part 2: Make nsICommandParams::GetCStringValue() and nsICommandParams::SetCStringValue() treat nsACString instead of char r=Ehsan
nsICommandParams::GetCStringValue() and nsICommandParams::SetCStringValue()
treat char.  However, this makes their callers complicated.  So, they should
be rewritten as treating nsACString.

MozReview-Commit-ID: DWO9veSyzyG

--HG--
extra : rebase_source : fbea13f6d7116ea1887434c0842b7768a7dc59ec
2018-07-10 18:04:46 +09:00
Makoto Kato
a3492f7faa Bug 1443902 - Part 2. Update spellcheck status on focused element after turning off contenteditable. r=masayuki
Spellchecker of <input> element is off by default, however, if it's in a
contenteditable element, spellchecker is on by default.

When turning off contenteditable, we have to update spellcheck status if
focused editor is in this contenteditable.

MozReview-Commit-ID: 6Y9mUWTIWRn

--HG--
extra : rebase_source : 80951a0389d429d781d359b05bfa6b4046d9e641
2018-07-10 14:17:50 +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
Masayuki Nakano
98a833407e Bug 1467794 - Split TextEditor::DeleteSelectionAsAction() to itself and TextEditor::DeleteSelectionAsSubAction() r=m_kato
TextEditor::DeleteSelectionAsAction() is called even if it's a part of edit
action.  For example, it's called to prepare for inserting text.

For bug 1465702, editor itself and edit rules classes should not call
public DeleteSelectionAsAction() directly.  Therefore, this patch creates
DeleteSelectionAsSubAction() for internal use.

Note that this patch adds NS_ASSERTION() to detect wrong caller.  However,
it cannot distinguish if the call is valid, for example, it's allowed to
call DeleteSelectionAsSelection() even if it's handling an edit action but
the method is called via mutation event listener.  So, we need to allow
some assertions with some tests.  But unfortunately, 1405747.html uses
mutation event listener too many times (about 1,000 times) and the number
of assertion isn't stable.  Therefore, this patch makes the test stop using
the mutation event listener 2nd time since I can reproduce the crash with
ESR 52 at the 2nd time.

MozReview-Commit-ID: 1TWaypmnoCC

--HG--
extra : rebase_source : a6a4fb1cbcaf2ab6f10c5f3e7168a6bc0fcb02ed
2018-06-29 20:16:50 +09:00
Makoto Kato
afbbfcc910 Bug 1405897 - Move assertion before setting resizer attribute. r=masayuki
This assertion was added by review comment of bug 1487945. Since mutation event
handler of this test case hides resizer, this case hits this assertion.

Although 4th parameter of SetAttr can control mutation event, if this event
isn't fired, another test case (layout/base/tests/test_bug558663.html) becomes
failure.

So we should move the assertion before setting resizer attribute.

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

--HG--
extra : moz-landing-system : lando
2018-06-29 04:47:21 +00:00
Sylvestre Ledru
6dd1af0903 Bug 1471596 - Simplify the code in HTMLEditor::GetSelectedOrParentTableElement r=m_kato
the first branch of the if was useless

MozReview-Commit-ID: GgKYOcI3sGX

--HG--
extra : rebase_source : eacfa0e86ae259e7940f92e1ad8e765949e9412e
2018-06-27 15:40:43 +02:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Margareta Eliza Balazs
14cb8f1c23 Merge inbound to mozilla-central. a=merge 2018-06-26 17:53:19 +03:00
Chris Peterson
2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Makoto Kato
8bd7e4fabf Bug 1471115 - Remove unused methods in nsIHTMLEditor. r=masayuki
insertHTMLWithContext, getIndentState, setBodyAttribute and
getSelectionContainer are unused from script (inc. c-c and bluegriffon).

Differential Revision: https://phabricator.services.mozilla.com/D1822
2018-06-26 04:29:36 +00: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
Dorel Luca
b595d82310 Merge mozilla-central to mozilla-inbound 2018-06-20 01:06:23 +03:00
Dorel Luca
e06ba10d0b Merge mozilla-inbound to mozilla-central. a=merge 2018-06-20 00:54:45 +03:00
Makoto Kato
12c210e67e Bug 1421510 - Part 3. Make nsITextServicesFilter.skip noscript access. r=masayuki
nsITextServicesFilter.skip isn't accessed from JavaScript (including c-c and
bluegriffon), so we can remove it from IDL.

Also, skip method should use early return style for clean up.

MozReview-Commit-ID: qjZS54ZeoT

--HG--
extra : rebase_source : 45c302e3f3b893a8b4eec796890c43d5d8894230
2018-06-04 12:32:39 +09:00
Makoto Kato
51e4d2154d Bug 1421510 - Part 2. Use nsComposeTxtSrvFilter directly. r=masayuki
nsITextServicesFilter is builtin class, so we can store nsComposeTxtSrvFilter
instead of nsITextServicesFilter.

MozReview-Commit-ID: ErZQwWC0Wjx

--HG--
extra : rebase_source : 7b327a0dbdf12e2e085d109e66e5140ac6d18773
2018-06-19 16:00:35 +09:00
Makoto Kato
98b51e91ce Bug 1421510 - Part 1. Make nsITextServicesFilter builtinclass. r=masayuki
There is no JavaScript implementation (including c-c and bluegriffon) for
nsITextServicesFilter, so we make this builtin to access builtin C++
implementation directly.

MozReview-Commit-ID: BGZlDzsKT6N

--HG--
extra : rebase_source : 1a0e328b84f1a71638425bb4dfba756a211faa74
2018-06-04 11:15:05 +09:00
Joel Maher
8324126795 Bug 1405428 - annotate crashtests and reftests which fail in test-verify mode. r=gbrown 2018-06-19 11:38:25 -04:00
Markus Stange
2fa0e26050 Bug 426246 - cmd_deleteToBeginningOfLine should delete to the beginning of the line, not the whole line. r=masayuki
MozReview-Commit-ID: 3OTOSz8u9Co

--HG--
extra : rebase_source : a2f9619c41add013e09cbb10b8ea21206f5709b4
2018-06-14 15:42:16 -04:00
Makoto Kato
d7d2ea2a38 Bug 1468708 - Part 6. Move HTMLEditorCommands and HTMLEditorController to libeditor. r=masayuki
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
2018-06-13 14:49:06 -07:00
Makoto Kato
5c774c32b5 Bug 1468708 - Part 5. Rename nsComposer*Commands to HTMLEditor*Commands. r=masayuki
Rename nsComposerCommands to mozilla::*Command

Base class
- nsBaseComposerCommand -> mozilla::HTMLEditorCommandBase
- nsBaseStateUpdatingCommand -> mozilla::StateUpdatingCommandBase
- nsMultiStateCommand -> mozilla::MultiStateCommandBase

Command class
(HTMLEditorCommands)
- nsPasteNoFormattingCommand -> mozilla::PasteNoFormattingCommand
- nsStyleUpdatingCommand -> mozilla::StyleUpdatingCommand
- nsListCommand -> mozilla::ListCommand
- nsListItemCommand -> mozilla::ListItemCommand
- nsRemoveListCommand -> mozilla::RemoveListCommand
- nsIndentCommand -> mozilla::IndentCommand
- nsOutdentCommand -> mozilla::OutdentCommand
- nsParagraphStateCommand -> mozilla::ParagraphStateCommand
- nsFontFaceStateCommand -> mozilla::FontFaceStateCommand
- nsFontSizeStateCommand -> mozilla::FontSizeStateCommand
- nsFontColorStateCommand -> mozilla::FontColorStateCommand
- nsHighlightColorStateCommand -> mozilla::HighlightColorStateCommand
- nsBackgroundColorStateCommand -> mozilla::BackgroundColorStateCommand
- nsAlignCommand -> mozilla::AlignCommand
- nsAbsolutePositioningCommand -> mozilla::AbsolutePositioningCommand
- nsDecreaseZIndexCommand -> mozilla::DecreaseZIndexCommand
- nsIncreaseZIndexCommand -> mozilla::IncreaseZIndexCommand
- nsRemoveStylesCommand -> mozilla::RemoveStylesCommand
- nsIncreaseFontSizeCommand -> mozilla::IncreaseFontSizeCommand
- nsDecreaseFontSizeCommand -> mozilla::DecreaseFontSizeCommand
- nsInsertHTMLCommand -> mozilla::InsertHTMLCommand
- nsInsertTagCommand -> mozilla::InsertTagCommand

(HTMLEditorDocumentCommands)
- nsSetDocumentOptionsCommand -> mozilla::SetDocumentOptionsCommand
- nsSetDocumentStateCommand -> mozilla::SetDocumentStateCommand
- nsDocumentStateCommand -> mozilla::DocumentStateCommand

MozReview-Commit-ID: ImCLDU2JpXT

--HG--
rename : editor/composer/nsComposerCommands.cpp => editor/composer/HTMLEditorCommands.cpp
rename : editor/composer/nsComposerCommands.h => editor/composer/HTMLEditorCommands.h
rename : editor/composer/nsComposerDocumentCommands.cpp => editor/composer/HTMLEditorDocumentCommands.cpp
extra : rebase_source : a9cf88e9efe9f00dc63cca4e3e4fa1f25df9de14
2018-06-15 09:13:31 -07:00
Makoto Kato
bedfd9166e Bug 1468708 - Part 4. Use EditorBase::GetPresContext to get nsPresContext in nsComposerDocumentCommands. r=masayuki
MozReview-Commit-ID: 5ubcYtk5Ylj

--HG--
extra : rebase_source : a83029c7f5c3b20d57ed367292baed2641f3a8bf
2018-06-12 16:55:34 -07:00
Makoto Kato
7b8d3f391a Bug 1468708 - Part 3. Clean up local functions not to calculate atom again. r=masayuki
nsComposerCommands has unnecessary atom calculation, so we should remove it.
Also, since nsStyleUpdatingCommand doesn't hava "all" tag names, we don't need
to support it.

MozReview-Commit-ID: Q0EBsK2mxr

--HG--
extra : rebase_source : eecf3314f416e0f77cc364eefc008deb81933ddf
2018-06-15 08:56:25 -07:00
Makoto Kato
e4a357f9ab Bug 1468708 - Part 2. Remove unimplemented commands. r=masayuki
Some commands are C++ header only, so we should remove unnecessary headers.

MozReview-Commit-ID: IXP5rLTkW5v

--HG--
extra : rebase_source : 993b90abc00072bb125a066b5fe6d16c4523f2f2
2018-06-12 15:05:56 -07:00
Makoto Kato
95d99759d1 Bug 1468708 - Part 1. Rename nsComposerController to HTMLEditorController. r=masayuki
nsComposerController is execCommand's command controller now.  So it is better
to use mozilla::HTMLEditorController class name instead of nsComposerController.

MozReview-Commit-ID: 7QNFO2dV5Zd

--HG--
rename : editor/composer/nsComposerController.cpp => editor/composer/HTMLEditorController.cpp
rename : editor/composer/nsComposerController.h => editor/composer/HTMLEditorController.h
extra : rebase_source : 413caf298b8583b5de3c6ac011b96ccebf24341e
2018-06-08 16:34:28 +09:00
Andi-Bogdan Postelnicu
d6e2c6a0f3 Bug 1453795 - Editor - Initialize member fields in classes/ structures. r=masayuki 2018-06-13 23:14:16 +03:00