Mirko Brodesser
803698911f
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
--HG--
extra : moz-landing-system : lando
2020-03-27 11:21:25 +00:00
Mirko Brodesser
5b963b4881
Bug 1623858: part 11) Split Selection::AddRangesForSelectableNodes
. r=smaug
...
Depends on D67848
Differential Revision: https://phabricator.services.mozilla.com/D68008
--HG--
extra : moz-landing-system : lando
2020-03-25 15:36:54 +00:00
Mirko Brodesser
ec7cb2f8d3
Bug 1623858: part 10) Simplify Selection::AddRangesForSelectableNodes
's signature. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D67848
--HG--
extra : moz-landing-system : lando
2020-03-25 14:28:40 +00:00
Mirko Brodesser
ad4d7454de
Bug 1622752: annotate Selection::ScrollIntoView
with MOZ_CAN_RUN_SCRIPT
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D67002
--HG--
extra : moz-landing-system : lando
2020-03-16 21:04:46 +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
d252ed1175
Bug 1623333: part 2) Declare Selection::mSelectionType
const
. r=smaug
...
Simplifies reasoning about it.
Differential Revision: https://phabricator.services.mozilla.com/D67328
--HG--
extra : moz-landing-system : lando
2020-03-19 09:25:02 +00:00
Mirko Brodesser
ec9cb4d8ef
Bug 1622199: annotate Selection::AddRangeAndSelectFramesAndNotifyListeners
with MOZ_CAN_RUN_SCRIPT
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D66759
--HG--
extra : moz-landing-system : lando
2020-03-13 15:46:13 +00:00
Mirko Brodesser
4be580237d
Bug 1619617: part 1) Annotate RemoveRangeAndUnselectFramesAndNotifyListeners
with MOZ_CAN_RUN_SCRIPT
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D65511
--HG--
extra : moz-landing-system : lando
2020-03-06 12:03:23 +00:00
Mirko Brodesser
939aa616ca
Bug 1617141: part 2) Add MOZ_CAN_RUN_SCRIPT
to Selection::MaybeAddTableCellRange
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D63645
--HG--
extra : moz-landing-system : lando
2020-03-03 13:42:56 +00:00
Mirko Brodesser
f1f584f689
Bug 1617141: part 1) Simplify code around Selection::MaybeAddTableCellRange
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D63644
--HG--
extra : moz-landing-system : lando
2020-03-03 13:42:49 +00:00
Mirko Brodesser
f170973369
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
--HG--
extra : moz-landing-system : lando
2020-02-18 12:28:45 +00:00
Mirko Brodesser
3d79d25cdf
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
--HG--
extra : moz-landing-system : lando
2020-02-14 10:58:06 +00:00
Mirko Brodesser
b257e520ee
Bug 1613378: part 10) Declare some table/Selection related method arguments const. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D62258
--HG--
extra : moz-landing-system : lando
2020-02-12 12:27:39 +00:00
Mirko Brodesser
36437a9d2d
Bug 1613378: part 9) Clarify dependency to mFrameSelection
in Selection
when adding/removing ranges. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D62198
--HG--
extra : moz-landing-system : lando
2020-02-12 12:27:32 +00:00
Mirko Brodesser
e7ed18f679
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
--HG--
extra : moz-landing-system : lando
2020-02-11 10:50:54 +00:00
Brindusan Cristian
a68356b907
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
b5693e486b
Bug 1613378: part 10) Declare some table/Selection related method arguments const. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D62258
--HG--
extra : moz-landing-system : lando
2020-02-11 09:25:27 +00:00
Mirko Brodesser
931ef1e3fa
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
--HG--
extra : moz-landing-system : lando
2020-02-11 09:26:07 +00:00
Emilio Cobos Álvarez
49abab29a5
Bug 1614208 - Remove nsStyleConsts usage from TextRange.h. r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D62172
--HG--
extra : moz-landing-system : lando
2020-02-11 01:23:12 +00:00
Emilio Cobos Álvarez
6615ff9fad
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
--HG--
extra : moz-landing-system : lando
2020-02-11 01:22:29 +00:00
Mirko Brodesser
067c1b95c6
Bug 1613378: part 5) Decouple UserSelectRangesToAdd
from Selection
class. r=smaug
...
Depends on D62037
Differential Revision: https://phabricator.services.mozilla.com/D62038
--HG--
extra : moz-landing-system : lando
2020-02-07 16:16:36 +00:00
Mirko Brodesser
cc5ff82f69
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
--HG--
extra : moz-landing-system : lando
2020-02-07 09:24:53 +00:00
Mirko Brodesser
f3af81d6e9
Bug 1613378: part 1) Decouple Selection::GetTableSelectionType
from Selection
class. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D61691
--HG--
extra : moz-landing-system : lando
2020-02-07 09:24:34 +00:00
Mirko Brodesser
09e3040bc2
Bug 1612828: part 3) Remove nsresult
return type from Selection::FindInsertionPoint
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D61533
--HG--
extra : moz-landing-system : lando
2020-02-05 12:22:08 +00:00
Mirko Brodesser
cc85009b5f
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
--HG--
extra : moz-landing-system : lando
2020-02-05 12:21:59 +00:00
Mirko Brodesser
a834f5c878
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
--HG--
extra : moz-landing-system : lando
2020-02-05 12:21:46 +00:00
Mirko Brodesser
a205cfcd91
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
--HG--
extra : moz-landing-system : lando
2020-02-05 09:12:23 +00:00
Cosmin Sabou
8833c36c14
Backed out changeset 6c68992f760e (bug 1613071) for build bustages on XPathGenerator.cpp
...
CLOSED TREE
2020-02-04 16:40:28 +02:00
Mirko Brodesser
b6e8bf3ef9
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
--HG--
extra : moz-landing-system : lando
2020-02-04 14:14:03 +00:00
Mirko Brodesser
fcd2fa44a5
Bug 1611853: return early in Selection::AddRangeAndSelectFramesAndNotifyListeners
when it didn't add a range. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D61448
--HG--
extra : moz-landing-system : lando
2020-02-04 08:43:06 +00:00
Masayuki Nakano
083d7d9809
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
--HG--
extra : moz-landing-system : lando
2020-01-30 12:44:33 +00:00
Mirko Brodesser
3375237ea1
Bug 1609662: part 19) Change Selection::EqualsRangeAtPoint
to HasEqualRangeBoundariesAt
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60950
--HG--
extra : moz-landing-system : lando
2020-01-24 14:40:35 +00:00
Mirko Brodesser
eed3b8d8ab
Bug 1609662: part 15) Rename some methods in Selection
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60256
--HG--
extra : moz-landing-system : lando
2020-01-21 16:02:20 +00:00
Mirko Brodesser
37eb82cb25
Bug 1609662: part 13) Declare some methods in Selection
const. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60254
--HG--
extra : moz-landing-system : lando
2020-01-21 16:01:59 +00:00
Mirko Brodesser
b81c405274
Bug 1609662: part 10) Update documentation of Selection::MaybeAddTableCellRange
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60134
--HG--
extra : moz-landing-system : lando
2020-01-20 12:39:33 +00:00
Mirko Brodesser
dc2c479f0e
Bug 1609662: part 9) Update documentation of Selection::AddRangesForSelectableNodes
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60133
--HG--
extra : moz-landing-system : lando
2020-01-20 12:39:26 +00:00
Mirko Brodesser
639cedc77f
Bug 1609662: part 7) Extend documentation of MaybeAddRangeAndTruncateOverlaps
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60131
--HG--
extra : moz-landing-system : lando
2020-01-20 12:39:11 +00:00
Mirko Brodesser
7fca9557d2
Bug 1609662: part 6) Update documentation of Selection::GetIndicesForInterval
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60130
--HG--
extra : moz-landing-system : lando
2020-01-20 12:39:04 +00:00
Mirko Brodesser
0996bebd47
Bug 1609662: part 5) Update documentation of Selection::FindInsertionPoint
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60129
--HG--
extra : moz-landing-system : lando
2020-01-20 12:38:56 +00:00
Mirko Brodesser
91911cded2
Bug 1609662: part 4) Move documentation of Selection::FindInsertionPoint
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60128
--HG--
extra : moz-landing-system : lando
2020-01-20 12:38:49 +00:00
Mirko Brodesser
dd5adc7ab5
Bug 1609662: part 3) Rename Selection::AddTableCellRange
to Selection::MaybeAddTableCellRange
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60127
--HG--
extra : moz-landing-system : lando
2020-01-20 12:38:42 +00:00
Mirko Brodesser
553a3b8cc8
Bug 1609662: part 1) Add minimal documentation to Selection::GetRangeAt
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D60125
--HG--
extra : moz-landing-system : lando
2020-01-20 12:38:22 +00:00
Mirko Brodesser
0752331fc7
Bug 1587433: part 7.2) Adapt callers of RangeBoundaryBase::Offset()
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D54459
--HG--
extra : moz-landing-system : lando
2019-12-16 11:31:52 +00:00
Mirko Brodesser
b5ca283bb6
Bug 1587433: part 4) In Selection::SetBaseAndExtent
check offsets are valid before constructing range boundaries. r=smaug
...
Avoid warnings.
Differential Revision: https://phabricator.services.mozilla.com/D54277
--HG--
extra : moz-landing-system : lando
2019-12-16 11:31:37 +00:00
Csoregi Natalia
2bfeaf7cb5
Backed out 11 changesets (bug 1587433) for bustages on RangeBoundary.h. CLOSED TREE
...
Backed out changeset 18f8d61039b0 (bug 1587433)
Backed out changeset 69ad70a4f85e (bug 1587433)
Backed out changeset 79ec11ba7fde (bug 1587433)
Backed out changeset f8a7e23843b8 (bug 1587433)
Backed out changeset f9255884980f (bug 1587433)
Backed out changeset 50a798e664a1 (bug 1587433)
Backed out changeset b225586edea6 (bug 1587433)
Backed out changeset b1d9e55ece86 (bug 1587433)
Backed out changeset 7ebbcb2da488 (bug 1587433)
Backed out changeset 4032df295a67 (bug 1587433)
Backed out changeset 0e1577031add (bug 1587433)
2019-12-16 13:25:51 +02:00
Mirko Brodesser
2ce540d13e
Bug 1587433: part 7.2) Adapt callers of RangeBoundaryBase::Offset()
. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D54459
--HG--
extra : moz-landing-system : lando
2019-12-16 11:04:01 +00:00
Mirko Brodesser
ed7f8d448f
Bug 1587433: part 4) In Selection::SetBaseAndExtent
check offsets are valid before constructing range boundaries. r=smaug
...
Avoid warnings.
Differential Revision: https://phabricator.services.mozilla.com/D54277
--HG--
extra : moz-landing-system : lando
2019-12-11 12:24:40 +00:00
Gabriele Svelto
ace6d1063f
Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
...
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.
find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
if [ -n "$interfaces" ]; then
if [[ "$interfaces" == *$'\n'* ]]; then
regexp="\("
for i in $interfaces; do regexp="$regexp$i\|"; done
regexp="${regexp%%\\\|}\)"
else
regexp="$interfaces"
fi
interface=$(basename "$path")
rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
if [ $hits -eq 0 ]; then
echo "Removing ${interface} from ${path2}"
grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
mv -f "$path2".tmp "$path2"
fi
done
fi
done
Differential Revision: https://phabricator.services.mozilla.com/D55442
--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca
a381d5c96d
Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE
2019-12-04 17:32:27 +02:00
Gabriele Svelto
bc9290f767
Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
...
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.
find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
if [ -n "$interfaces" ]; then
if [[ "$interfaces" == *$'\n'* ]]; then
regexp="\("
for i in $interfaces; do regexp="$regexp$i\|"; done
regexp="${regexp%%\\\|}\)"
else
regexp="$interfaces"
fi
interface=$(basename "$path")
rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
if [ $hits -eq 0 ]; then
echo "Removing ${interface} from ${path2}"
grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
mv -f "$path2".tmp "$path2"
fi
done
fi
done
Differential Revision: https://phabricator.services.mozilla.com/D55442
--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00