Commit Graph

9261 Commits

Author SHA1 Message Date
Razvan Maries
234389cf17 Backed out changeset 82b18d61da00 (bug 1553378) for build bustages. CLOSED TREE 2019-05-24 06:50:14 +03:00
Cameron McCormack
f5dd691a74 Bug 1553378 - Devirtualize calls to GetText() / TextLength() when we know we have a Text node. r=smaug,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D32100

--HG--
extra : moz-landing-system : lando
2019-05-24 03:18:44 +00:00
Masayuki Nakano
c6ffcedbf2 Bug 1534394 - Make WSRunObject::InsertText() set aPointAfterInsertedString by itself when HTMLEditor::InsertTextWithTransaction() returns error r=m_kato
Oddly, `WSRunObject::InsertText()` returns `NS_OK` even when
`HTMLEditor::InsertTextWithTransaction()` returns error.  However,
it fails if insertion point is not editable like `<noscript>` element.
In such case, `aPointAfterInsertedString` isn't modified and its caller,
`HTMLEditRules::WillInsertText()` keep handling inserting remaining text
with non-positioned `EditorDOMPoint`.  Therefore, at the next time,
`WSRunObject` fails to do anything since it requires positioned
`EditorDOMPoint`.

For making uplift safer, this patch makes `WSRunObject::InsertText()` set
`aPointAfterInsertedString` by itself when
`HTMLEditor::InsertTextWithTransaction()` returns error.

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

--HG--
extra : moz-landing-system : lando
2019-05-23 06:06:18 +00:00
Masayuki Nakano
fc57d9bf0f Bug 1549661 - part 7: Make GetInternalCommand() take nsCommandParams instead of nsAString r=m_kato
`GetInternalCommand()` is currently used only by `EditorCommand` and it
treats the additional parameter only when given command is `cmd_align`.
However, the value is complicated since `AlignCommand` allows both `CString`
value and `String` value.  Therefore, `EditorCommand::DoCommandParams()` may
fail to solve `cmd_align` to a `Command` value without checking both of them.

Therefore, it must make sense that `GetInternalCommand()` take `nsCommandParams`
as optional argument and check it only when given command matches `cmd_align`.
Then, we don't need to waste unnecessary run-time cost.

Note that this bug has been hidden since `AlignCommand` class does not refer
the `Command` value but refers only `nsCommandParams`.  However, the previous
patch makes `EditorCommand::GetParamType()` not allow `Command::DoNothing`.
Therefore, we need this follow-up fix now.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 07:47:51 +00:00
Masayuki Nakano
29dd5c8e74 Bug 1549661 - part 6: Create EditorCommand::DoCommandParam(Command aCommand, nsITransferable* aTransferableParam, TextEditor& aTextEditor) r=m_kato
If `nsIControllerCommand::DoCommandParams()` is called without aParams or
`nsITransferable` pointer, this patch sets nullptr to `aTransferableParam` for
`DoCommandParam()`.  This allows each implementation to choose ignore or
return error.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 07:47:49 +00:00
Masayuki Nakano
276f23b02c Bug 1549661 - part 5: Make commands for MultiStateCommandBase take both CString and String r=m_kato
Only `MultiStateCommandBase::DoCommandParams()` allows `CString` param and
`String` param (the former is preferred).  This patch makes
`EditorCommand::DoCommandParams()` aware of this case.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 07:47:47 +00:00
Masayuki Nakano
3e190307e7 Bug 1549661 - part 4: Create EditorCommand::DoCommandParam(Command aCommand, const nsAString& aStringParam, TextEditor& aTextEditor) r=m_kato
If `nsIControllerCommand::DoCommandParams()` is called with `nullptr` for its
`aParams`, this patch sets `VoidString()` to `DoCommandParam()` for making
each implementation be able to consider whether the case is an error or
treat it as specific default value.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 07:45:55 +00:00
Masayuki Nakano
723ebc93fe Bug 1549661 - part 3: Create EditorCommand::DoCommandParam(Command aCommand, const nsACString& aCStringParam, TextEditor& aTextEditor) r=m_kato
If `nsIControllerCommand::DoCommandParams()` is called with `nullptr` for its
`aParams`, this patch sets `VoidCString()` to `DoCommandParam()` for making
each implementation be able to consider whether the case is an error or
treat it as specific default value.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 07:45:22 +00:00
Masayuki Nakano
2b5a319f77 Bug 1549661 - part 2: Create EditorCommand::DoCommandParam(Command aCommand, const Maybe<bool>& aBoolParam, TextEditor& aTextEditor) r=m_kato
We should use `Maybe` for `bool` because some command may treat the default
value when the parameter is omitted as `true` or `false.  Although, current
implementation does not do that.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 07:44:39 +00:00
Masayuki Nakano
ef7e3647d8 Bug 1549661 - part 1: Create EditorCommand::DoCommandParam(Command aCommand, TextEditor& aTextEditor) and make it just call DoCommand() r=m_kato
Most `EditorCommand` classes don't require additional params for executing
a command.  All of them just calls their `DoCommand()` or returns same result.
So, we can create new virtual method,
`EditorCommand::DoCommandParam(Command aCommand, TextEditor& aTextEditor)`,
which just delegates to `DoCommand()`.

This patch adds some undeclared commands but which are handled by
`EditorCommand` subclasses, and changes `CommandInt` type from `int8_t` to
`uint8_t` since the count of `Command` items becomes over 128.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 07:44:11 +00:00
Tim Nguyen
c1f5b7a338 Bug 1521280 - Convert search-textbox to a custom element. r=dao,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D23045

--HG--
rename : toolkit/content/widgets/textbox.xml => toolkit/content/widgets/search-textbox.js
extra : moz-landing-system : lando
2019-05-13 18:12:37 +00:00
Coroiu Cristina
cc280c4be9 Backed out changeset c5798de806e2 (bug 1521280) for crashing when searching about:config for upcoming beta (bug 1551013)
--HG--
extra : rebase_source : 8f936159c23d09bf227ce4f5eb6f2d96d33bbff1
2019-05-13 08:50:28 +03:00
Tim Nguyen
1a57aab68e Bug 1521280 - Convert search-textbox to a custom element. r=dao,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D23045

--HG--
rename : toolkit/content/widgets/textbox.xml => toolkit/content/widgets/search-textbox.js
extra : moz-landing-system : lando
2019-05-10 11:46:49 +00:00
Masayuki Nakano
19fbb1a392 Bug 1549925 - Mark all methods of nsIDocumentStateListener as can_run_script r=m_kato
`nsIDocumentStateListener` is a scriptable interface and each method may run
any script.  So, we should mark them as `can_run_script`.  Then, we need to
mark a lot of editing methods because we need to mark
`EditorBase::EndTransactionInternal()` and `EditorBase::DoTransactionInternal()`
as `MOZ_CAN_RUN_SCRIPT`.

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

--HG--
extra : moz-landing-system : lando
2019-05-09 07:37:51 +00:00
Makoto Kato
bda6300874 Bug 1418629 - Single quotation mark shouldn't always separator. r=Ehsan
This seems to be regression by bug 1362858.

Actually, single quotation mark is always separator for spellchecker after
landing bug 1462858. When user tries to input "doesn't",  "'" becomes separator
for spellchecker. Then "doesn" will be misspell word.

So we shouldn't mark single quotation mark as separator if user is inputting
word.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 09:36:05 +00:00
Masayuki Nakano
4579004eac Bug 1549319 - Make template methods marked as MOZ_CAN_RUN_SCRIPT take only EditorDOMPoint (i.e., not allow EditorRawDOMPoint) r=m_kato
It'd be better to change copy constructor of `EditorDOMPointBase` to explicit,
but it'd require too many changes in editor code.  So, this patch just changes
each method callers only.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 09:40:17 +00:00
Masayuki Nakano
8eddd573c6 Bug 1549306 - Mark EditorBase::CreateNodeWithTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D30052

--HG--
extra : moz-landing-system : lando
2019-05-08 07:00:45 +00:00
Masayuki Nakano
f761cbd2bc Bug 1549302 - Mark EditorBase::DeleteTextWithTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D30049

--HG--
extra : moz-landing-system : lando
2019-05-08 06:31:48 +00:00
Masayuki Nakano
ed4cc22661 Bug 1549270 - part 3: Mark EditorBase::SetAttributeWithTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D30047

--HG--
extra : moz-landing-system : lando
2019-05-08 06:26:25 +00:00
Masayuki Nakano
6d224d7259 Bug 1549270 - part 2: Mark EditorBase::RemoveAttributeWithTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D30044

--HG--
extra : moz-landing-system : lando
2019-05-08 05:09:56 +00:00
Masayuki Nakano
e4c46a73ce Bug 1549270 - part 1: Mark EditorBase::CloneAttributeWithTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D30043

--HG--
extra : moz-landing-system : lando
2019-05-08 04:46:56 +00:00
Masayuki Nakano
48d2fce863 Bug 1549268 - Mark EditorBase::JoinNodesWithTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D30041

--HG--
extra : moz-landing-system : lando
2019-05-08 02:29:43 +00:00
Masayuki Nakano
f440ac739a Bug 1549264 - Mark EditorBase::SplitNodeWithTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D30039

--HG--
extra : moz-landing-system : lando
2019-05-07 22:34:28 +00:00
Masayuki Nakano
0925cb9a70 Bug 1549155 - Mark EditorBase::DeleteNodeWithTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D30038

--HG--
extra : moz-landing-system : lando
2019-05-07 22:27:29 +00:00
Masayuki Nakano
a337925c38 Bug 1549148 - Mark EditorBase::InsertTextIntoTextNodeWithTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D30036

--HG--
extra : moz-landing-system : lando
2019-05-07 10:58:08 +00:00
Masayuki Nakano
387c2c8b25 Bug 1547898 - part 2: Make HTMLEditRules::NormalizeSelection() use EditorDOMPoint r=m_kato
For guaranteeing the sets of container node, offset in it, and the node
referred by the offset, the method should use `EditorDOMPoint` instead of
managing them separately.

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

--HG--
extra : moz-landing-system : lando
2019-05-07 10:21:43 +00:00
Masayuki Nakano
33d3bc7789 Bug 1547898 - part 1: The constructor of EditorDOMPointBase which takes all information should allow non-end point of text node r=m_kato
This is a simple mistake of `MOZ_ASSERTION()` in it. When `mParent` is a node
which can have children, `mChild` should be non-`nullptr` or `mOffset` should
/ be set to the end of `mParent`.  But when `mParent` is not a container, any
`mOffset` value should be allowed.

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

--HG--
extra : moz-landing-system : lando
2019-05-07 07:44:04 +00:00
Masayuki Nakano
12fcf328aa Bug 1548751 - Make TextEditRules::WillSetText() use fast path even if it's for <textarea> element r=m_kato
As far as I've tested, `TextEditor` has the following structure patterns:
1. If it's for a non-empty `<input>` element, it has only one text node.
2. If it's for an empty `<input>` element, it has only bogus node.
3. If it's for a non-empty `<textarea>` element, it has a text node and
   `moz-<br>` element.  Additionally they are followed by `<scrollbar>` and
   `<resizer>` elements.
4. If it's for an empty `<textarea>` element, it has a `moz-<br>` element
   followed by `<scrollbar>` and `<resizer>` elements.

Additionally, `TextEditRules::WillInsert()` always removes bogus node if
there is.  So, in the case #2, there is no children.

Fortunately, we don't support XUL addons anymore on Firefox.  However, in
other products like Thunderbird, the tree may be changed as unexpected.
Therefore, we still need to keep checking the tree, but we can use the fast
path for `<textarea>` element too.

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

--HG--
extra : moz-landing-system : lando
2019-05-07 05:07:14 +00:00
Masayuki Nakano
006066d2ee Bug 1546888 - Make editor public methods which may be canceled by clipboard event listener return NS_SUCCESS_DOM_NO_OPERATION when it's canceled r=m_kato
This patch makes editors return new error code internally when clipboard event
is dispatched and canceled by script.  This is for making each caller stop
handling the edit action.  However, it's not actual failure.  Therefore, making
public methods return `NS_SUCCESS_DOM_NO_OPERATION` instead via
`EditorBase::ToGenericNSResult()`.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 08:39:53 +00:00
Masayuki Nakano
ad65eafe7c Bug 1547869 - Make IsCommandEnabled() of HTML editor command classes return false if given editor is TextEditor r=smaug
Currently, this bug does not occur actually because nobody has not accessed
these command classes directly and they are registered only in command table
for HTML editor.  However, once rewriting `nsHTMLDocument::ExecCommand()` with
these classes, its `IsCommandEnabled()` should return false if given editor
is `TextEditor`.  The reason why we need this fix is, when we make
`ExecCommand()` call `IsCommandEnabled()` and it returns `true`, `ExecCommand()`
needs to call `DoCommand()`.  Then, it throws exception if given editor is not
an `HTMLEditor` but the command class is only for `HTMLEditor`.

This patch adds new WPT for testing whether `document.execCommand()` works
with `<input>` and `<textarea>`.  The behavior has not been standardized, but
Chromium handles some commands even in it.  So, I write the expectations from
the point of view of web developers.  (Chrome fails in "cut", "copy" and
"removeformat" cases.)

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

--HG--
extra : moz-landing-system : lando
2019-05-03 02:15:18 +00:00
Sylvestre Ledru
e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Joel Maher
6611f95ab0 Bug 1546459 - remove subsuite=clipboard from manifests. r=ahal
remove subsuite=clipboard from manifests

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:16:44 +00:00
Masayuki Nakano
6da5cf38da Bug 1546839 - part 4: Make all editor command classes use Command instead of command name r=smaug
`strcmp` may be slow due to checking null character.  Therefore, internal
methods of them should use command as far as possible.  This patch makes
them take/use `Command` instead of `const char*`.

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

--HG--
extra : moz-landing-system : lando
2019-04-30 04:24:49 +00:00
Masayuki Nakano
36e5df54ec Bug 1547621 - Move all inline methods of nsIPresShell into mozilla::PresShell r=smaug
And also this patch moves some related methods which use the inline methods
and member variables used only by them.

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

--HG--
rename : layout/base/nsIPresShellInlines.h => layout/base/PresShellInlines.h
extra : moz-landing-system : lando
2019-04-30 01:52:53 +00:00
Jamie Nicol
9fd3bd8252 Bug 1530195 - Call restoreNormalRefresh before closing window. r=kats
A test was intermittently crashing because it was calling
restoreNormalRefresh after closing the window. This meant
LayerTransactionParent::RecvLeaveTestMode fired after the
CompositorBridgeParent had been destroyed.

This fixes the test by calling restoreNormalRefresh before
win.close. It also checks mDestroyed in RecvLeaveTestMode (for both
LayerTransactionParent and WebRenderBridgeParent).

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

--HG--
extra : moz-landing-system : lando
2019-04-29 17:06:35 +00:00
Joel Maher
6e318fef99 Bug 1546493 - fixed editor/libeditor mochitests to work outside of isolated clipboard job. r=masayuki
fixed editor/libeditor mochitests to work outside of isolated clipboard job.

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

--HG--
extra : moz-landing-system : lando
2019-04-28 00:07:39 +00:00
Masayuki Nakano
28714c6be2 Bug 1546578 - part 10: Mark methods of editor command classes as far as possible r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D28698

--HG--
extra : moz-landing-system : lando
2019-04-27 07:37:19 +00:00
Masayuki Nakano
143cfe7fde Bug 1546578 - part 9: Make GetCurrentState() of editor command classes take nsCommandParams& instead of nsICommandParams* r=m_kato
Now, all callers of `GetCurrentState()` have reference or pointer to
`nsCommandParam`.  So, taking the concrete class makes sense.

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

--HG--
extra : moz-landing-system : lando
2019-04-27 07:36:30 +00:00
Masayuki Nakano
0592829433 Bug 1546578 - part 8: Make EditorCommand implement nsIControllerCommand::GetCommandStateParams() and call internal GetCommandStateParams() method which take TextEditor directly r=m_kato
This patch makes `EditorCommand` implement
`nsIControllerCommand::GetCommandStateParams()` and then, makes it call internal
`GetCommandStateParams()` method which takes `TextEditor` or `nsIEditingSession`
instead.

This makes each implementation really simpler.

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

--HG--
extra : moz-landing-system : lando
2019-04-27 07:35:56 +00:00
Masayuki Nakano
cae2231fcc Bug 1546578 - part 7: Make EditorCommand implement nsIControllerCommand::DoCommandParams() and call internal DoCommandParams() method which take TextEditor directly r=m_kato
This patch makes `EditorCommand` implement
`nsIControllerCommand::DoCommandParams()` and then, makes it call internal
`DoCommandParams()` method which takes `TextEditor` instead.

This makes each implementation really simpler.

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

--HG--
extra : moz-landing-system : lando
2019-04-26 15:32:06 +00:00
Masayuki Nakano
c4b1e41c47 Bug 1546578 - part 6: Make EditorCommand implement nsIControllerCommand::DoCommand() and call internal DoCommand() method which take TextEditor directly r=m_kato
This patch makes `EditorCommand` implement `nsIControllerCommand::DoCommand()`
and then, makes it call internal `DoCommand()` method which takes `TextEditor`
instead.

Note that `DoCommand()` of some command classes have not returned error when
given context is not editor.  However, it does not make sense to do that only
for some commands.  Therefore, this patch makes `EditorCommand::DoCommand()`
return error when given context is not an editor.

This makes each implementation really simpler.

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

--HG--
extra : moz-landing-system : lando
2019-04-26 14:00:47 +00:00
Masayuki Nakano
2c962c8575 Bug 1546578 - part 5: Make EditorCommand implement nsIControllerCommand::IsCommandEnabled() and call internal IsCommandEnabled() method which return bool directly r=m_kato
This patch makes `EditorCommand` implement
`nsIControllerCommand::IsCommandEnabled()` and then, makes it call internal
`IsCommandEnabled()` method which returns `bool` directly and takes `TextEditor`
instead.

This makes each implementation really simpler.

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

--HG--
extra : moz-landing-system : lando
2019-04-26 13:11:24 +00:00
Masayuki Nakano
dc5aeff4d8 Bug 1546578 - part 4: Merge AbsolutePositioningCommand::IsCommandEnabled() with StateUpdatingCommandBase::IsCommandEnabled() r=m_kato
[`AbsolutePositioningCommand::IsCommandEnabled()`](https://searchfox.org/mozilla-central/rev/f46e2bf881d522a440b30cbf5cf8d76fc212eaf4/editor/libeditor/HTMLEditorCommands.cpp#1038-1056) overrides
[`StateUpdatingCommandBase::IsCommandEnabled()`](https://searchfox.org/mozilla-central/rev/f46e2bf881d522a440b30cbf5cf8d76fc212eaf4/editor/libeditor/HTMLEditorCommands.cpp#65-77).

There are only 2 differences between them:
1. `AbsolutePositioningCommand::IsCommandEnabled()` never returns true if given
   context is not an HTMLEditor instance.
2. `AbsolutePositioningCommand::IsCommandEnabled()` checks
   `HTMLEditor::IsAbsolutePositionEditorEnabled()` additionally.

So, we can get rid of it if we make
`StateUpdatingCommandBase::IsCommandEnabled()` check given command name is
"cmd_absPos" or not.  The mapping is here:
https://searchfox.org/mozilla-central/rev/ec489aa170b6486891cf3625717d6fa12bcd11c1/editor/libeditor/HTMLEditorController.cpp#102

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

--HG--
extra : moz-landing-system : lando
2019-04-26 11:06:45 +00:00
Masayuki Nakano
b8709cc5da Bug 1546578 - part 3: Get rid of HighlightColorStateCommand::IsCommandEnabled() because of it's exactly same as its superclass's definition r=m_kato
[`HighlightColorStateCommand::IsCommandEnabled()`](https://searchfox.org/mozilla-central/rev/f46e2bf881d522a440b30cbf5cf8d76fc212eaf4/editor/libeditor/HTMLEditorCommands.cpp#930-942) is exactly same as
[its superclass's implementation](https://searchfox.org/mozilla-central/rev/f46e2bf881d522a440b30cbf5cf8d76fc212eaf4/editor/libeditor/HTMLEditorCommands.cpp#586-599).

So, we can get rid of it.

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

--HG--
extra : moz-landing-system : lando
2019-04-26 03:20:45 +00:00
Masayuki Nakano
39220c722f Bug 1546578 - part 2: Make all editor command classes derived from EditorCommand class r=m_kato
This patch makes all editor command classes derived from `EditorCommand` class.
So, this allows `nsHTMLEditor::ExecCommand()` to access them directly in the
future.

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

--HG--
extra : moz-landing-system : lando
2019-04-26 03:20:02 +00:00
Masayuki Nakano
129a809380 Bug 1546578 - part 1: Get rid of HTMLEditorCommands.h r=m_kato
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
2019-04-26 02:20:22 +00:00
Masayuki Nakano
9405d61cb8 Bug 1546577 - Make overloads of CanCut(), CanCopy(), CanDelete() and CanPaste() which return bool instead of nsresult r=m_kato
`CanCut()`, `CanCopy()` and `CanPaste()` return error only when the editor has
already been destroyed or not been initialized yet, or when failed to access
clipboard when the document is not HTML/XHTML.

`CanDelete()` returns error only when the editor has already been destroyed or
not been initialized yet.

So, these error result won't be exposed to the web in most cases and such
exception shouldn't stop any content script because Chrome basically does not
throw exception in such situation as far as I know.

Therefore, there should be overloads of them to return `bool` result directly
for making their callers simpler.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 07:14:39 +00:00
Ryan Hunt
0eeced87be Bug 1534395 - Rename TabParent to BrowserParent. r=nika
This commit renames TabParent to BrowserParent.

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

--HG--
rename : dom/ipc/TabParent.cpp => dom/ipc/BrowserParent.cpp
rename : dom/ipc/TabParent.h => dom/ipc/BrowserParent.h
extra : rebase_source : d2706b9f42177d8de16068b7b1d088a44b8720a4
extra : histedit_source : a617ddac45c58050ef799116a67d2d983f2a8f6d%2C1d1dabd8761a32d548a6fbf1027be960698f6a5e
2019-04-09 16:38:15 -05:00
Andreea Pavel
6d71ad8258 Bug 1535792 - disabled test_richtext2.html on linux32 debug r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D27441

--HG--
extra : moz-landing-system : lando
2019-04-21 13:03:24 +00:00
Daniel Varga
2b1837cc6d Backed out changeset 2ef93e029730 (bug 1535792) for ParseError: could not parse: (os == 'android') || ((debug && (os == 'linux') && (bits == 32)). On a CLOSED TREE 2019-04-23 10:59:21 +03:00