Open Bug 1600267 Opened 2 years ago Updated 15 days ago

Adapt `nsContentUtils::ComparePoints` to return `Maybe<int32_t>`

Categories

(Core :: DOM: Selection, enhancement, P2)

enhancement

Tracking

()

People

(Reporter: mbrodesser, Assigned: mbrodesser, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: leave-open)

Attachments

(19 files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

This allows to drop the aDisconnected argument and forces callers to handle that case.

Assignee: nobody → mbrodesser

In a follow-up commit a new ComparePoints method with cleaner
arguments and return value will be added.

Enforces callers to handle the case when the points are incomparable.

Depends on D55295

Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bf11fb46bd73
part 1) Rename `nsContentUtils::ComparePoints` to `ComparePoints_Deprecated`. r=smaug
https://hg.mozilla.org/integration/autoland/rev/bfc2e43909cd
part 2) Add `Maybe<int32_t> nsContentUtils::ComparePoints`. r=smaug
https://hg.mozilla.org/integration/autoland/rev/4459ef04ad8e
part 3) Call `ComparePoints` instead of `ComparePoints_Deprecated` in `Abstractrange::SetStartAndEndInternal`. r=smaug
https://hg.mozilla.org/integration/autoland/rev/2434dce2e742
part 4) Call `ComparePoints` instead of `ComparePoints_Deprecated` in FilteredContentIterator. r=smaug
https://hg.mozilla.org/integration/autoland/rev/71b50a4b6a86
part 5) Call `ComparePoints` instead of `ComparePoints_Deprecated` in HyperTextAccessible. r=smaug
https://hg.mozilla.org/integration/autoland/rev/cc05e6b3edd9
part 6) Call `ComparePoints` instead of `ComparePoints_Deprecated` in ContentIterator. r=smaug
https://hg.mozilla.org/integration/autoland/rev/a054102f2019
part 7) Call `ComparePoints` instead of `ComparePoints_Deprecated` in RangeUtils. r=smaug

The remaining callers of ComparePoints_Deprecated in nsRange
presumably require changing the semantics of ComparePoints to support
comparison across Shadow DOM boundary.

Depends on D57615

Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ec5181104e87
part 8) Call `ComparePoints` instead of `ComparePoints_Deprecated` in Selection. r=smaug
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/655c310bdfe0
part 9) Call `ComparePoints` instead of `ComparePoints_Deprecated` in parts of `nsRange`. r=smaug
https://hg.mozilla.org/integration/autoland/rev/053e37a2547f
part 10) Call `ComparePoints` instead of `ComparePoints_Deprecated` in `ContentEventHandler`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/f6d4c4f8fca3
part 11) Call `ComparePoints` instead of `ComparePoints_Deprecated` in `TextComposition`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/c1747d1fcad0
part 12) Call `ComparePoints` instead of `ComparePoints_Deprecated` in `EditorBase`. r=masayuki
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/62e8c57a960a
part 13) Call `ComparePoints` instead of `ComparePoints_Deprecated` in `HTMLEditor`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/9bae40cbd9f5
part 14) Call `ComparePoints` instead of `ComparePoints_Deprecated` in `WSRunScanner`. r=masayuki
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7dd17065086d
part 15) Call `ComparePoints` instead of `ComparePoints_Deprecated` in `TextServicesDocument`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/f24ecfbfbc12
part 16) Call `ComparePoints` instead of `ComparePoints_Deprecated` in `AccessibleCaretManager`. r=emilio
https://hg.mozilla.org/integration/autoland/rev/2ab2b8aef97d
part 17) Call `ComparePoints` instead of `ComparePoints_Deprecated` in `nsFrameSelection`. r=emilio
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8bbcbc15b9c3
part 18) Remove remaining `ComparePoints_Deprecated` calls in Selection. r=smaug
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e5dfbbf7d29d
part 19) Emit warnings when `Selection` couldn't compare nodes and pretends some order. r=smaug

The leave-open keyword is there and there is no activity for 6 months.
:mbrodesser, maybe it's time to close this bug?

Flags: needinfo?(mbrodesser)

No, this will still be implemented, sometime.

Flags: needinfo?(mbrodesser)

The leave-open keyword is there and there is no activity for 6 months.
:mbrodesser, maybe it's time to close this bug?

Flags: needinfo?(mbrodesser)

No, this will still be implemented, sometime.

Flags: needinfo?(mbrodesser)

The leave-open keyword is there and there is no activity for 6 months.
:mbrodesser, maybe it's time to close this bug?

Flags: needinfo?(mbrodesser)
You need to log in before you can comment on or make changes to this bug.