Mirko Brodesser
7b4bef2edf
Bug 1624633: part 9) Move FindRangeData. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D68225
2020-03-27 11:05:48 +00:00
Mirko Brodesser
4ca56926b2
Bug 1624633: part 8) Move GetCommonEditingHostForAllRanges. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D68224
2020-03-27 11:05:43 +00:00
Mirko Brodesser
ab81e8c7a3
Bug 1624633: part 7) Move MaybeAddRangeAndTruncateOverlaps. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D68223
2020-03-27 11:26:25 +00:00
Mirko Brodesser
cf4857243e
Bug 1624633: part 6) Annotate nsRange::RegisterSelection with MOZ_CAN_RUN_SCRIPT. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D68222
2020-03-27 11:11:02 +00:00
Mirko Brodesser
40b881656a
Bug 1624633: part 5) Move HasEqualRangeBoundariesAt. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D68221
2020-03-27 11:03:57 +00:00
Mirko Brodesser
6781b8ab98
Bug 1624633: part 4) Move GetIndicesForInterval. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D68220
2020-03-27 11:19:50 +00:00
Mirko Brodesser
6fd24e539e
Bug 1624633: part 3) Move FindInsertionPoint. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D68219
2020-03-27 11:25:16 +00:00
Mirko Brodesser
143a1044d7
Bug 1624633: part 2) Move Selection::RemoveRangeInternal to StyledRanges::RemoveRangeAndUnregisterSelection. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D68218
2020-03-27 11:02:37 +00:00
Mirko Brodesser
7d343d9f19
Bug 1624633: part 1) Move Selection::mRanges to StyledRanges struct. r=hsivonen
...
This allows methods operating on the ranges to be moved to that struct.
To see where this leads to, consider the following reviews.
Differential Revision: https://phabricator.services.mozilla.com/D68217
2020-03-27 11:21:25 +00:00
Mirko Brodesser
d23dd7c8e6
Bug 1623858: part 11) Split Selection::AddRangesForSelectableNodes. r=smaug
...
Depends on D67848
Differential Revision: https://phabricator.services.mozilla.com/D68008
2020-03-25 15:36:54 +00:00
Mirko Brodesser
c0b7a5a8cb
Bug 1623858: part 10) Simplify Selection::AddRangesForSelectableNodes's signature. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D67848
2020-03-25 14:28:40 +00:00
Mirko Brodesser
9544770963
Bug 1622752: annotate Selection::ScrollIntoView with MOZ_CAN_RUN_SCRIPT. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D67002
2020-03-16 21:04:46 +00:00
Mirko Brodesser
323fcfaf15
Bug 1621620: part 3) Annotate nsFrameSelection::MoveCaret with MOZ_CAN_RUN_SCRIPT. r=jfkthame
...
Differential Revision: https://phabricator.services.mozilla.com/D66396
2020-03-19 13:58:33 +00:00
Mirko Brodesser
933c34a5bf
Bug 1623333: part 2) Declare Selection::mSelectionType const. r=smaug
...
Simplifies reasoning about it.
Differential Revision: https://phabricator.services.mozilla.com/D67328
2020-03-19 09:25:02 +00:00
Mirko Brodesser
8a481a1be9
Bug 1622199: annotate Selection::AddRangeAndSelectFramesAndNotifyListeners with MOZ_CAN_RUN_SCRIPT. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D66759
2020-03-13 15:46:13 +00:00
Mirko Brodesser
990ea47014
Bug 1619617: part 1) Annotate RemoveRangeAndUnselectFramesAndNotifyListeners with MOZ_CAN_RUN_SCRIPT. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D65511
2020-03-06 12:03:23 +00:00
Mirko Brodesser
b10c0dee5f
Bug 1617141: part 2) Add MOZ_CAN_RUN_SCRIPT to Selection::MaybeAddTableCellRange. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D63645
2020-03-03 13:42:56 +00:00
Mirko Brodesser
b1ce2a956d
Bug 1617141: part 1) Simplify code around Selection::MaybeAddTableCellRange. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D63644
2020-03-03 13:42:49 +00:00
Mirko Brodesser
f878d8d407
Bug 1615581: part 1) Rename TableSelection to TableSelectionMode. r=jfkthame
...
See part 2) why this is necessary.
Differential Revision: https://phabricator.services.mozilla.com/D62902
2020-02-18 12:28:45 +00:00
Mirko Brodesser
bbf6b5d7f3
Bug 1615304: part 1) Move nsFrameSelection::DeleteFromDocument to Selection. r=smaug
...
Helps to clarify the role of `nsFrameSelection`.
Differential Revision: https://phabricator.services.mozilla.com/D62879
2020-02-14 10:58:06 +00:00
Mirko Brodesser
660ce238cf
Bug 1613378: part 10) Declare some table/Selection related method arguments const. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D62258
2020-02-12 12:27:39 +00:00
Mirko Brodesser
303b4cab8f
Bug 1613378: part 9) Clarify dependency to mFrameSelection in Selection when adding/removing ranges. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D62198
2020-02-12 12:27:32 +00:00
Mirko Brodesser
6987d4de09
Bug 1613378: part 7) Remove Selection's default constructor. r=smaug
...
Removes duplicated code and reveals the dependency to frame selection.
Differential Revision: https://phabricator.services.mozilla.com/D62040
2020-02-11 10:50:54 +00:00
Brindusan Cristian
145328323c
Backed out 5 changesets (bug 1613378) for mochitest failures at test_general.html. CLOSED TREE
...
Backed out changeset f38b806ee78b (bug 1613378)
Backed out changeset cee4bbabc4b5 (bug 1613378)
Backed out changeset e3a2ab6d7267 (bug 1613378)
Backed out changeset 6fe76439f1d3 (bug 1613378)
Backed out changeset f3baf3407cbe (bug 1613378)
2020-02-11 12:27:49 +02:00
Mirko Brodesser
61c92f2396
Bug 1613378: part 10) Declare some table/Selection related method arguments const. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D62258
2020-02-11 09:25:27 +00:00
Mirko Brodesser
e6f168dee2
Bug 1613378: part 7) Remove Selection's default constructor. r=smaug
...
Removes duplicated code and reveals the dependency to frame selection.
Differential Revision: https://phabricator.services.mozilla.com/D62040
2020-02-11 09:26:07 +00:00
Emilio Cobos Álvarez
3feee5b0af
Bug 1614208 - Remove nsStyleConsts usage from TextRange.h. r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D62172
2020-02-11 01:23:12 +00:00
Emilio Cobos Álvarez
1c221fea7d
Bug 1614208 - Stop including AccessibleCaretEventHub and PresShell.h from Selection.h. r=TYLin
...
And fix a bunch of fallout as we now don't include nsDocShell.h everywhere.
Differential Revision: https://phabricator.services.mozilla.com/D62169
2020-02-11 01:22:29 +00:00
Mirko Brodesser
99c81d1a4d
Bug 1613378: part 5) Decouple UserSelectRangesToAdd from Selection class. r=smaug
...
Depends on D62037
Differential Revision: https://phabricator.services.mozilla.com/D62038
2020-02-07 16:16:36 +00:00
Mirko Brodesser
052900bbdb
Bug 1613378: part 3) Remove Selection::GetTableCellLocationFromRange's dependency to mFrameSelection and declare it static. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D61693
2020-02-07 09:24:53 +00:00
Mirko Brodesser
b3397c6d4f
Bug 1613378: part 1) Decouple Selection::GetTableSelectionType from Selection class. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D61691
2020-02-07 09:24:34 +00:00
Mirko Brodesser
7c8f46210a
Bug 1612828: part 3) Remove nsresult return type from Selection::FindInsertionPoint. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D61533
2020-02-05 12:22:08 +00:00
Mirko Brodesser
a251c4d152
Bug 1612828: part 2) Remove nsresult return type fromSelection::FindInsertionPoint's comparator`. r=smaug
...
Will allow to replace the hand-crafted binary search from the method.
Differential Revision: https://phabricator.services.mozilla.com/D61532
2020-02-05 12:21:59 +00:00
Mirko Brodesser
b03ce1dd0e
Bug 1612828: part 1) Change signature of Selection::SubtractRange. r=smaug
...
Preparatory step to remove `nsresult` from
`Selection::FindInsertionPoint`, as that requires certain arguments to
be non-null.
Differential Revision: https://phabricator.services.mozilla.com/D61531
2020-02-05 12:21:46 +00:00
Mirko Brodesser
a9637d3829
Bug 1613071: rename RangeData to StyledRange and move it to separate file. r=smaug
...
Breaks the dependency from Selection.h. Allows reuse for Selection
across the Shadow DOM boundary, which will require styled ranges to be
stored in `DocumentOrShadowRoot` too.
Differential Revision: https://phabricator.services.mozilla.com/D61549
2020-02-05 09:12:23 +00:00
Cosmin Sabou
aaccd3328f
Backed out changeset 6c68992f760e (bug 1613071) for build bustages on XPathGenerator.cpp
...
CLOSED TREE
2020-02-04 16:40:28 +02:00
Mirko Brodesser
e8e6350a14
Bug 1613071: rename RangeData to StyledRange and move it to separate file. r=smaug
...
Breaks the dependency from Selection.h. Allows reuse for Selection
across the Shadow DOM boundary, which will require styled ranges to be
stored in `DocumentOrShadowRoot` too.
Differential Revision: https://phabricator.services.mozilla.com/D61549
2020-02-04 14:14:03 +00:00
Mirko Brodesser
c89d6901d7
Bug 1611853: return early in Selection::AddRangeAndSelectFramesAndNotifyListeners when it didn't add a range. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D61448
2020-02-04 08:43:06 +00:00
Masayuki Nakano
da5eb5e37c
Bug 1612085 - part 3: Remove dirty hack of Selection::mCachedRange r=smaug
...
Previously, I added `Selection::mCachedRange` to save allocation cost of
`nsRange`. However, with the previous patch, we don't need the hack anymore
since ranges removed by `Selection::RemoveAllRanges()` are always kept in
the global cache of `nsRange`. Therefore, we can remove the ugly hack right
now.
Differential Revision: https://phabricator.services.mozilla.com/D61239
2020-01-30 12:44:33 +00:00
Mirko Brodesser
1bfd8fedac
Bug 1609662: part 19) Change Selection::EqualsRangeAtPoint to HasEqualRangeBoundariesAt. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60950
2020-01-24 14:40:35 +00:00
Mirko Brodesser
d502ba2cd7
Bug 1609662: part 15) Rename some methods in Selection. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60256
2020-01-21 16:02:20 +00:00
Mirko Brodesser
1358417fac
Bug 1609662: part 13) Declare some methods in Selection const. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60254
2020-01-21 16:01:59 +00:00
Mirko Brodesser
3a641864f9
Bug 1609662: part 10) Update documentation of Selection::MaybeAddTableCellRange. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60134
2020-01-20 12:39:33 +00:00
Mirko Brodesser
9bddaca092
Bug 1609662: part 9) Update documentation of Selection::AddRangesForSelectableNodes. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60133
2020-01-20 12:39:26 +00:00
Mirko Brodesser
9acf16b628
Bug 1609662: part 7) Extend documentation of MaybeAddRangeAndTruncateOverlaps. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60131
2020-01-20 12:39:11 +00:00
Mirko Brodesser
5944f81262
Bug 1609662: part 6) Update documentation of Selection::GetIndicesForInterval. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60130
2020-01-20 12:39:04 +00:00
Mirko Brodesser
5a963356fa
Bug 1609662: part 5) Update documentation of Selection::FindInsertionPoint. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60129
2020-01-20 12:38:56 +00:00
Mirko Brodesser
4a2ddcf017
Bug 1609662: part 4) Move documentation of Selection::FindInsertionPoint. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60128
2020-01-20 12:38:49 +00:00
Mirko Brodesser
729f28d82f
Bug 1609662: part 3) Rename Selection::AddTableCellRange to Selection::MaybeAddTableCellRange. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60127
2020-01-20 12:38:42 +00:00
Mirko Brodesser
6246f7c68b
Bug 1609662: part 1) Add minimal documentation to Selection::GetRangeAt. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60125
2020-01-20 12:38:22 +00:00