Greg Tatum
ee2694c97d
Bug 1719546 - Replace nsBidi with mozilla::intl::Bidi; r=platform-i18n-reviewers,dminor
...
Differential Revision: https://phabricator.services.mozilla.com/D128793
2021-10-20 14:01:21 +00:00
Butkovits Atila
01c5e2aed8
Backed out 3 changesets (bug 1719546) for causing SM bustages at Bidi.h. CLOSED TREE
...
Backed out changeset c4d6ffc7e445 (bug 1719546)
Backed out changeset a1f7ed6c4251 (bug 1719546)
Backed out changeset e69fc596f2c3 (bug 1719546)
2021-10-19 21:09:47 +03:00
Greg Tatum
f250d90114
Bug 1719546 - Replace nsBidi with mozilla::intl::Bidi; r=platform-i18n-reviewers,dminor
...
Differential Revision: https://phabricator.services.mozilla.com/D128793
2021-10-19 16:55:36 +00:00
Masayuki Nakano
16f869402f
Bug 1734771 - part 10: Make ContentEventHandler::ExpandToClusterBoundary() take Text& instead of nsIContent* r=m_kato
...
Differential Revision: https://phabricator.services.mozilla.com/D128147
2021-10-13 06:52:04 +00:00
Kagami Sascha Rosylight
41fc1feef9
Bug 1714640 - Add AdjustFrameForLineStart call in Selection::ScrollIntoView r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D117009
2021-06-08 16:21:36 +00:00
Kagami Sascha Rosylight
717d5d2aa5
Bug 1671768 - Part 4: Use MOZ_CAN_RUN_SCRIPT for Selection::RemoveAllRanges r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D103780
2021-02-03 21:52:48 +00:00
Mirko Brodesser
1ea34c359f
Bug 1688832: part 9) Change argument of nsFrameSelection::TakeFocus from pointer to reference. r=smaug
...
Simplification.
Differential Revision: https://phabricator.services.mozilla.com/D103772
2021-02-02 16:16:22 +00:00
Mirko Brodesser
4b75da3596
Bug 1688832: part 8) Declare nsFrameSelection::TakeFocus [[nodiscard]]. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D103616
2021-02-03 08:56:53 +00:00
Mirko Brodesser
0710c52ceb
Bug 1685303: part 15) Move documentation of some methods of nsFrameSelection to the header. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D101931
2021-01-15 15:53:55 +00:00
Mirko Brodesser
c0d32bffc5
Bug 1685303: part 10) Annotate nsFrameSelection::HandleClick with MOZ_CAN_RUN_SCRIPT. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D101598
2021-01-14 13:24:36 +00:00
Mirko Brodesser
f6f7a6f1aa
Bug 1685303: part 8) Annotate nsFrameSelection::SetDragState with MOZ_CAN_RUN_SCRIPT. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D101467
2021-01-14 13:24:16 +00:00
Mirko Brodesser
ab12d717b5
Bug 1685303: part 7) Declare some methods in nsFrameSelection const. r=smaug
...
Simplifie reasoning about them.
Differential Revision: https://phabricator.services.mozilla.com/D101454
2021-01-14 11:06:03 +00:00
Bogdan Tara
0700454a9e
Backed out 4 changesets (bug 1685303) for bustage complaining about offsets CLOSED TREE
...
Backed out changeset a4640aac6619 (bug 1685303)
Backed out changeset bd2020c26531 (bug 1685303)
Backed out changeset 3f2e96b93f19 (bug 1685303)
Backed out changeset 8cf49a7677c9 (bug 1685303)
2021-01-14 12:58:25 +02:00
Mirko Brodesser
c6272f3a54
Bug 1685303: part 10) Annotate nsFrameSelection::HandleClick with MOZ_CAN_RUN_SCRIPT. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D101598
2021-01-14 10:21:17 +00:00
Mirko Brodesser
353996bf27
Bug 1685303: part 8) Annotate nsFrameSelection::SetDragState with MOZ_CAN_RUN_SCRIPT. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D101467
2021-01-14 10:20:30 +00:00
Mirko Brodesser
58ca09b6d6
Bug 1685303: part 7) Declare some methods in nsFrameSelection const. r=smaug
...
Simplifie reasoning about them.
Differential Revision: https://phabricator.services.mozilla.com/D101454
2021-01-13 20:19:47 +00:00
Emilio Cobos Álvarez
a0c580e9a2
Bug 1676785 - Simplify XUL special code-path for <input> value setter. r=masayuki
...
This allows us to remove nsISelectionController.selectAll() and related
code too, and should not change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D97011
2020-12-02 12:48:41 +00:00
Mihai Alexandru Michis
89a2d40ee0
Backed out changeset 93cf5f317f98 (bug 1676785) for causing mochitest failures in test_input_value_set_preserve_undo.xhtml
...
CLOSED TREE
2020-12-02 14:05:18 +02:00
Emilio Cobos Álvarez
2b6c54e6c1
Bug 1676785 - Simplify XUL special code-path for <input> value setter. r=masayuki
...
This allows us to remove nsISelectionController.selectAll() and related
code too, and should not change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D97011
2020-12-02 10:44:25 +00:00
Masayuki Nakano
2fde14a338
Bug 1623918 - part 2: Mark nsINode::GetSelectionRootContent() and its root callers as MOZ_CAN_RUN_SCRIPT as far as possible r=smaug
...
This patch tries to mark root callers of `nsINode::GetSelectionRootContent()`
which calls `nsINode::GetAnonymousRootElementOfTextEditor()` as far as possible
(and reasonable).
It's used by `ContentEventHandler` so that a lot of methods of
`EventStateManager`, `ContentEventHandler`, `IMEContentObserver` which are main
users of it are also marked as `MOZ_CAN_RUN_SCRIPT`. I think that this is
reasonable.
On the other hand, it might not be reasonable to mark `IMEStateManager` methods
as `MOZ_CAN_RUN_SCRIPT` for initializing `IMEContentObserver` because
`IMEStateManager` may be able to initialize `IMEContentObserver` asynchronously
and its root callers are in XUL layout code. Therefore, this patch uses
`MOZ_CAN_RUN_SCRIPT_BOUNDARY` for `IMEStateManager` at least for now.
Differential Revision: https://phabricator.services.mozilla.com/D92730
2020-10-09 02:37:47 +00:00
Narcis Beleuzu
c163b394ef
Backed out 2 changesets (bug 1623918) for crashtest failure on 1623918.html CLOSED TREE
...
Backed out changeset 519ca1b069e5 (bug 1623918)
Backed out changeset d8a09a5fea47 (bug 1623918)
2020-10-08 12:06:58 +03:00
Masayuki Nakano
da386ef224
Bug 1623918 - part 2: Mark nsINode::GetSelectionRootContent() and its root callers as MOZ_CAN_RUN_SCRIPT as far as possible r=smaug
...
This patch tries to mark root callers of `nsINode::GetSelectionRootContent()`
which calls `nsINode::GetAnonymousRootElementOfTextEditor()` as far as possible
(and reasonable).
It's used by `ContentEventHandler` so that a lot of methods of
`EventStateManager`, `ContentEventHandler`, `IMEContentObserver` which are main
users of it are also marked as `MOZ_CAN_RUN_SCRIPT`. I think that this is
reasonable.
On the other hand, it might not be reasonable to mark `IMEStateManager` methods
as `MOZ_CAN_RUN_SCRIPT` for initializing `IMEContentObserver` because
`IMEStateManager` may be able to initialize `IMEContentObserver` asynchronously
and its root callers are in XUL layout code. Therefore, this patch uses
`MOZ_CAN_RUN_SCRIPT_BOUNDARY` for `IMEStateManager` at least for now.
Differential Revision: https://phabricator.services.mozilla.com/D92730
2020-10-08 03:56:51 +00:00
Kagami Sascha Rosylight
1afcf4d621
Bug 1630704 - Part 27: Remove nsFrame from inheritance chain r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D81864
2020-07-06 22:29:42 +00:00
Jonathan Kew
501e5caa97
Bug 1642223 - Fix behavior of AdjustNormalSelection when moving back into the maintained range from before it, to avoid collapsing to the end of the range. r=mbrodesser
...
Differential Revision: https://phabricator.services.mozilla.com/D78545
2020-06-10 08:31:39 +00:00
Kagami Sascha Rosylight
0046c51bb0
Bug 1644511 - Part 1: Make bidi.edit.caret_movement_style a static pref r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D79004
2020-06-10 00:33:51 +00:00
Mirko Brodesser
76dbaf2f21
Bug 1635709: part 29) Factor finding first and last cell of row or column out. r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D77825
2020-06-04 09:04:39 +00:00
Mirko Brodesser
ab2db129d7
Bug 1635709: part 28) Declare some function arguments in nsFrameSelection const. r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D77460
2020-06-04 09:03:47 +00:00
Mirko Brodesser
3b9ea20cb4
Bug 1635709: part 26) Remove some code duplication in HandleDragSelecting. r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D77424
2020-06-02 09:08:34 +00:00
Mirko Brodesser
3e015ac7bf
Bug 1635709: part 25) const qualify arguments of GetCellLayout and GetCellIndexes. r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D77423
2020-06-02 08:42:49 +00:00
Mirko Brodesser
59fe54586f
Bug 1635709: part 24.2) Rename childContent to aChildContent. r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D77254
2020-06-02 09:08:44 +00:00
Mirko Brodesser
ed1b7493ab
Bug 1635709: part 24.1) Factor HandleDragSelecting and HandleMouseUpOrDown out from TableSelection::HandleSelection. r=masayuki
...
`HandleSelection` was too complex.
The arguments of the new methods will be renamed in a separate commit to
simplify reviewing and avoid mistakes.
Differential Revision: https://phabricator.services.mozilla.com/D77253
2020-06-02 09:05:57 +00:00
Mirko Brodesser
17a7e3429d
Bug 1635709: part 23) Factor code out to IsContentInActivelyEditableTableCell. r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D77004
2020-05-27 14:39:11 +00:00
Mirko Brodesser
d5b4e47993
Bug 1635709: part 21) Rename TableSelection::mCellParent to mClosestInclusiveTableCellAncestor. r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D75564
2020-05-25 13:54:20 +00:00
Mirko Brodesser
74d02b07c6
Bug 1635709: part 9) Add DesiredCaretPos::Invalidate. r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D74618
2020-05-12 09:42:08 +00:00
Mirko Brodesser
676b66d20f
Bug 1635709: part 7) Move nsFrameSelection::SetDesiredCaretPos and FetchDesiredCaretPos to DesiredCaretPos. r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D74616
2020-05-12 09:42:16 +00:00
Mirko Brodesser
ca24d8b332
Bug 1635709: part 6) Rename nsFrameSelection::*DesiredPos to *DesiredCaretPos. r=masayuki
...
`nsFrameSelection` has (too) many responsibilites, this adds some
clarification.
Differential Revision: https://phabricator.services.mozilla.com/D74615
2020-05-12 09:42:01 +00:00
Mirko Brodesser
194a3b964e
Bug 1635709: part 5) Annotate Selection::ReplaceAnchorFocusRange with MOZ_CAN_RUN_SCRIPT. r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D74383
2020-05-11 09:39:33 +00:00
Mirko Brodesser
193ee7189e
Bug 1635709: part 1) Rename nsFrameSelection::SetCaretBidiLevel to SetCaretBidiLevelAndMaybeSchedulePaint. r=hsivonen
...
The old name was misleading.
Differential Revision: https://phabricator.services.mozilla.com/D74051
2020-05-06 15:26:07 +00:00
Masayuki Nakano
11af44e544
Bug 1632726 - part 2: Remove some unused nsISelectionController methods r=smaug
...
Even in comm-central and BlueGriffon, `nsISelectionController::*ForDelete()`
are not used. Therefore, we can remove them safely.
Differential Revision: https://phabricator.services.mozilla.com/D72296
2020-04-27 06:20:31 +00:00
Masayuki Nakano
adf7a304f3
Bug 1632726 - part 1: Create utility methods to compute delete range from collapsed selection in nsFrameSelection r=smaug
...
Currently, `EditorBase::ExtendSelectionForDelete()` depends on some
`nsISelectionController` methods to compute extended range for deletion
from collapsed selection. They are implemented by
`nsFrameSelection::MoveCaret()` and `nsFrameSelection::TakeFocus()`.
Ideally, we should split these methods for computation part and performing
part. However, they change selection with updating other selection state,
for example, table selection state and bidi information. Therefore, it's
impossible to split them with simple code. However, I need to change
`EditorBase::ExtendSelectionForDelete()` just return extended range.
Therefore, this patch creates `nsFrameSelection::PeekOffsetForCaretMove()`
which has the main path in `MoveCaret()` for the `EditorBase` method.
Then, `MoveCaret()` and new `nsFrameSelection::CreateRangeExtendedToSomewhere()`
share the computation code of expanding normal selection.
Finally, this patch wraps `nsFrameSelection::CreateRangeExtendedToSomewhere()`
with new public inline methods for `EditorBase`.
The following patch will remove no-user methods of `nsISelectionController`.
Differential Revision: https://phabricator.services.mozilla.com/D72295
2020-04-30 10:05:35 +00:00
Mirko Brodesser
9b384325c1
Bug 1633448: part 2) Rename nsFrameSelection::GetTableCellSelection to IsInTableSelectionMode. r=smaug
...
Depends on D72688
Differential Revision: https://phabricator.services.mozilla.com/D72689
2020-04-27 19:34:53 +00:00
Kristen Wright
05a7022978
Bug 1626388 - Convert dom.select_events.textcontrols.enabled to static pref r=njn
...
Converts dom.select_events.textcontrols.enabled to a static pref.
Differential Revision: https://phabricator.services.mozilla.com/D69614
--HG--
extra : moz-landing-system : lando
2020-04-06 23:30:18 +00:00
Mirko Brodesser
5322c22be3
Bug 1626665: part 5) Declare remaining input-only members of nsPeekOffsetStruct const. r=hsivonen
...
Depends on D69769
Differential Revision: https://phabricator.services.mozilla.com/D69770
--HG--
extra : moz-landing-system : lando
2020-04-06 08:53:15 +00:00
Mirko Brodesser
e5aee55330
Bug 1626665: part 4) Reorder code in nsFrameSelection::MoveCaret to allow nsPeekOffsetStruct::mDirection to become const. r=hsivonen
...
`nsPeekOffsetStruct` contains a mixture or input and output members.
This simplifies reasoning about them.
Depends on D69573
Differential Revision: https://phabricator.services.mozilla.com/D69769
--HG--
extra : moz-landing-system : lando
2020-04-06 08:45:01 +00:00
Mirko Brodesser
e7cdb1cf10
Bug 1623858: part 16) Annotate nsFrameSelection::HandleTableSelection with [[nodiscard]]. r=hsivonen
...
Depends on D68575
Differential Revision: https://phabricator.services.mozilla.com/D68576
--HG--
extra : moz-landing-system : lando
2020-03-30 08:35:36 +00:00
Mirko Brodesser
1c01fc9e89
Bug 1621620: part 4) Replace remaining "unsafe" comments in nsFrameSelection with MOZ_CAN_RUN_SCRIPT_BOUNDARY. r=jfkthame
...
Differential Revision: https://phabricator.services.mozilla.com/D66399
--HG--
extra : moz-landing-system : lando
2020-03-19 13:58:33 +00:00
Mirko Brodesser
e2af57ec37
Bug 1621620: part 3) Annotate nsFrameSelection::MoveCaret with MOZ_CAN_RUN_SCRIPT. r=jfkthame
...
Differential Revision: https://phabricator.services.mozilla.com/D66396
--HG--
extra : moz-landing-system : lando
2020-03-19 13:58:33 +00:00
Mirko Brodesser
f7f372d8a6
Bug 1621620: part 2) Declare nsFrameSelection::ConstrainFrameAndPointToAnchorSubtree const. r=jfkthame
...
Differential Revision: https://phabricator.services.mozilla.com/D66394
--HG--
extra : moz-landing-system : lando
2020-03-18 16:33:13 +00:00
Mirko Brodesser
a09cb7184c
Bug 1621620: part 1) Remove dead code in nsFrameSelection. r=jfkthame
...
Differential Revision: https://phabricator.services.mozilla.com/D66393
--HG--
extra : moz-landing-system : lando
2020-03-18 16:32:48 +00:00
Mirko Brodesser
76ae1d169f
Bug 1620952: part 9) Rename nsFrameSelection::GetBatching to IsBatching. r=jfkthame
...
Differential Revision: https://phabricator.services.mozilla.com/D66061
--HG--
extra : moz-landing-system : lando
2020-03-11 09:18:18 +00:00