Commit Graph

8731 Commits

Author SHA1 Message Date
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
Margareta Eliza Balazs
bf81d741ff Merge inbound to mozilla-central. a=merge 2018-06-11 12:36:11 +03:00
Joel Maher
50b91c0a14 Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04: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
Bogdan Tara
04b9cbbc2b Merge autoland to mozilla-central. a=merge 2018-06-09 18:34:58 +03: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
Masayuki Nakano
bb000aa73b Bug 1467690 - Make HTMLEditor use MaybeCollapseSelectionAtFirstEditableNode(false) instead of BeginningOfDocument() r=m_kato
HTMLEditor::BeginningOfDocument() is an XPCOM method and it just calls
MaybeCollapseSelectionAtFirstEditableNode(false).  So, HTMLEditor can call
MaybeCollapseSelectionAtFirstEditableNode(false) directly.

MozReview-Commit-ID: 8x4j0AwzISl

--HG--
extra : rebase_source : 40a9e9eea95b22c59dc007f6babfc518205702ea
2018-06-05 21:18:05 +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
Makoto Kato
b027fd188e Bug 1423776 - Return error when splitted node might be orphan. r=masayuki
This crash occurs when start container of range for range updater is nullptr
in GetNodesForOperation.

Splitted node by SplitNodeDeepWithTransaction can return orphan node, so we
should return error when splitted node is orphan node.

MozReview-Commit-ID: 3ySdzc9FAzL

--HG--
extra : rebase_source : 3c6f37e81641751d32b8a9777b8362baad301ecb
2018-06-04 16:31:38 +09:00
Makoto Kato
35f52b478b Bug 1466469 - Devirtialize nsIHTMLEditor.GetActiveEditingHost. r=masayuki
Since GetActiveEditingHost is noscript method, we should move this from
nsIHTMLEditor to HTMLEditor.

MozReview-Commit-ID: 3jLHSstixxk

--HG--
extra : rebase_source : 72e992a6c5643e1d0f0f5454f803139716c6309c
2018-06-04 17:45:34 +09:00
Miko Mynttinen
4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab
7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen
8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Boris Zbarsky
15b087c696 Bug 1465875 part 4. Eliminate random mentions of nsIDOMNSEditableElement. r=qdot 2018-06-01 22:35:23 -04:00
Boris Zbarsky
0cf65db1d3 Bug 1465875 part 2. Eliminate use of "instanceof nsIDOMNSEditablElement". r=qdot 2018-06-01 22:35:22 -04:00
Boris Zbarsky
c7f378d7ab Bug 1465875 part 1. Eliminate pointless QIs to nsIDOMNSEditableElement. r=qdot
We expose the relevant APIs on textarea and input elements anyway
(chromeonly).  The QIs will throw on a non-input or non-textarea element, but
none of these consumers expect that to happen.
2018-06-01 22:35:22 -04:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Nazım Can Altınova
361380987c Bug 1464496 - Part 1: Merge ServoDeclarationBlock and DeclarationBlock r=emilio
MozReview-Commit-ID: By9fV70Oq0K

--HG--
extra : rebase_source : 837afe9c33b21d7db41ff19d3aaf6cf3e9eedbdf
2018-05-30 18:15:25 +02:00
Andreea Pavel
38bcf897f1 Merge mozilla-inbound to mozilla-central. a=merge 2018-05-31 13:04:21 +03:00
Emilio Cobos Álvarez
fe09ffd3af Bug 1465478: Introduce Element::FromNode. r=smaug
And use it in a couple places I noticed.

MozReview-Commit-ID: 8baSMrbdEbF
2018-05-31 02:46:10 +02:00
Masayuki Nakano
908dbbfada Bug 1463985 - part 27: Replace EditSubAction::ignore with EditSubAction::eReplaceHeadWithHTMLSource and EditSubAction::eCreateBogusNode r=m_kato
EditSubAction::ignore is declared for making HTMLEditRules::AfterEditInner()
ignores post-processing of handling edit action.  Currently, this is used only
by TextEditRules::CreateBogusNodeIfNeeded() and
HTMLEditor::ReplaceHeadContentsWithHTML().  So, we should make them use
specific EditSubAction values which explain what they do and make
HTMLEditRules::AfterEditInner() ignore both of them.

MozReview-Commit-ID: JSHcgPfTrOE

--HG--
extra : rebase_source : c054c2db257dda7e1e3ace01f8e8831e07268f7e
2018-05-29 00:06:24 +09:00
Masayuki Nakano
cc803498e8 Bug 1463985 - part 26: Rename EditSubAction::decreaseZIndex and EditSubAction::increaseZIndex to EditSubAction::eDecreaseZIndex and EditSubAction::eIncreaseZIndex r=m_kato
MozReview-Commit-ID: 87Pux0xZOM

--HG--
extra : rebase_source : cc89eb98558b32e31867ef9f6b1ab74acabadea5
2018-05-28 23:52:16 +09:00
Masayuki Nakano
0fe0c32b1a Bug 1463985 - part 25: Rename EditSubAction::setAbsolutePosition and EditSubAction::removeAbsolutePosition to EditSubAction::eSetPositionToAbsolute and EditSubAction::eSetPositionToStatic r=m_kato
MozReview-Commit-ID: DiyCAkGw2uo

--HG--
extra : rebase_source : e10f7af40ac3a21350526f803801683de5696182
2018-05-28 23:48:39 +09:00
Masayuki Nakano
a48c9c34aa Bug 1463985 - part 24: Rename EditSubAction::resetTextProperties to EditSubAction::eRemoveAllTextProperties r=m_kato
MozReview-Commit-ID: 1QKUg361MSY

--HG--
extra : rebase_source : 7ed2f41e20e498e105fac8a88be90157dd812fa1
2018-05-28 23:40:45 +09:00
Masayuki Nakano
a9c4b1bc58 Bug 1463985 - part 23: Rename EditSubAction::htmlPaste and EditSubAction::loadHTML to EditSubAction::ePasteHTMLContent and EditSubAction::eInsertHTMLSource r=m_kato
MozReview-Commit-ID: B1Ag1yP5PXl

--HG--
extra : rebase_source : 47b20d72c53f8c97c4ccbb20960d5bf571d9cde6
2018-05-28 23:37:12 +09:00
Masayuki Nakano
4db8c8a594 Bug 1463985 - part 22: Rename EditSubAction::insertQuotation to EditSubAction::eInsertQuotation r=m_kato
According to this usage, perhaps, we can remove this from EditSubAction and
this should be moved to new EditAction.

MozReview-Commit-ID: HzfcC051rNB

--HG--
extra : rebase_source : e42cade8436b082b4dc2adfcbbac75e17779cfd7
2018-05-28 23:22:19 +09:00
Masayuki Nakano
84aca99c88 Bug 1463985 - part 21: Rename EditSubAction::insertElement to EditSubAction::eInsertElement r=m_kato
MozReview-Commit-ID: 6nrm1zJ968f

--HG--
extra : rebase_source : 633824e9564dddd9d9b80414ab07e7aa960b8fb1
2018-05-28 23:13:41 +09:00
Masayuki Nakano
1affc933f7 Bug 1463985 - part 20: Rename EditSubAction::makeDefListItem to EditSubAction::eCreateOrChangeDefinitionList r=m_kato
MozReview-Commit-ID: 1ucTdFEjasz

--HG--
extra : rebase_source : 1c00f4b480ebc8c30ef5d6979319f6db01235dc9
2018-05-28 23:08:50 +09:00
Masayuki Nakano
220ec91e25 Bug 1463985 - part 19: Rename EditSubAction::removeList to EditSubAction::eRemoveList r=m_kato
MozReview-Commit-ID: DgsZwANcEdF

--HG--
extra : rebase_source : e0032e957ccc4448e210783a67ef83c1257c0a3b
2018-05-28 23:05:00 +09:00
Masayuki Nakano
7d6ea95d32 Bug 1463985 - part 18: Rename EditSubAction::makeBasicBlock to EditSubAction::eCreateOrRemoveBlock r=m_kato
MozReview-Commit-ID: 3GuscIcaWe9

--HG--
extra : rebase_source : 3f580a1d60296c232a70156d68a18a7b13c9d640
2018-05-28 23:01:19 +09:00
Masayuki Nakano
9a8bb4d35e Bug 1463985 - part 17: Rename EditSubAction::align to EditSubAction::eSetOrClearAlignment r=m_kato
MozReview-Commit-ID: KausJ4mihk9

--HG--
extra : rebase_source : 48fd37f2578714f46c0fcbf84788f9b0c69d3608
2018-05-28 22:51:31 +09:00
Masayuki Nakano
b43f12de7f Bug 1463985 - part 16: Rename EditSubAction::indent and EditSubAction::outdent to EditSubAction::eIndent and EditSubAction::eOutdent r=m_kato
MozReview-Commit-ID: 2JDyYLT8V7Q

--HG--
extra : rebase_source : 5b0ebe706e8144fa6cbdf1ee16573d5166ef8028
2018-05-28 22:42:31 +09:00
Masayuki Nakano
004c690a96 Bug 1463985 - part 15: Rename EditSubAction::makeList to EditSubAction::eCreateOrChangeList r=m_kato
MozReview-Commit-ID: 4Mkh3Mfm6fY

--HG--
extra : rebase_source : 5509f3f2e05ce4fe25965ca69334309a9109a791
2018-05-28 22:36:19 +09:00
Masayuki Nakano
54321db367 Bug 1463985 - part 14: Rename EditSubAction::insertBreak to EditSubAction::eInsertParagraphSeparator r=m_kato
MozReview-Commit-ID: DhEzqhLxMme

--HG--
extra : rebase_source : 87e482478b881ba9c9fbc99562fce5e5a576e0ab
2018-05-28 22:27:47 +09:00