Closed Bug 2014342 Opened 9 months ago Closed 4 months ago

Make `nsContentUtils::ComparePointsWithIndices` a private method

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 external file)

It takes a pair of a set of a container and an offset in it. The method may treat the given points are handled as in a <slot> if the TreeKind is for the flattened tree. However, it's really unclear. So, I think all callers should use nsContentUtils::ComparePoints with temporary created ConstRawRangeBoundary instances since they have TreeKind data.

It does not have the information of TreeKind for the parameters.
Therefore, this API users may set offset in the different kind of the
tree unexpectedly. For example,
nsRange::MayCrossShadowBoundaryStartOffset() returns either offset in
the flattened tree or in the non-flattened tree.

Therefore, all users of this API should use
nsContentUtils::ComparePoints() instead.

Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
Pushed by nfay@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/322b0ac075a8 https://hg.mozilla.org/mozilla-central/rev/fa750a8dd7e6 Revert "Bug 2014342 - Make `nsContentUtils::ComparePointsWithIndices()` private r=jjaschke,dom-core" as it is related to Bug 2009328
Status: RESOLVED → REOPENED
Flags: needinfo?(masayuki)
Resolution: FIXED → ---
Target Milestone: 150 Branch → ---

I think I should fix bug2014622 together because I found a misunderstanding of FlatForSelection tree logic during the review and the misunderstood logic introduces the cases which Selection API do not work with legal parameters. I guess the crash reports are caused by the case.

Flags: needinfo?(masayuki)
Pushed by masayuki@d-toybox.com: https://github.com/mozilla-firefox/firefox/commit/3d6101ee12e9 https://hg.mozilla.org/integration/autoland/rev/1744e75a7c14 Make `nsContentUtils::ComparePointsWithIndices()` private r=jjaschke,dom-core-reviewers
Status: REOPENED → RESOLVED
Closed: 8 months ago → 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
Pushed by ctuns@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/fb7fbabecb28 https://hg.mozilla.org/mozilla-central/rev/4e778b8a5321 Revert "Bug 2014342 - Make `nsContentUtils::ComparePointsWithIndices()` private r=jjaschke,dom-core-reviewers"

Backed out for causing Bug 2052026

Status: RESOLVED → REOPENED
Flags: needinfo?(masayuki)
Resolution: FIXED → ---
Target Milestone: 154 Branch → ---
Status: REOPENED → ASSIGNED
Flags: needinfo?(masayuki)
Pushed by masayuki@d-toybox.com: https://github.com/mozilla-firefox/firefox/commit/ed89d45524fe https://hg.mozilla.org/integration/autoland/rev/d619cbe4a0b2 Make `nsContentUtils::ComparePointsWithIndices()` private r=jjaschke,dom-core-reviewers
Status: ASSIGNED → RESOLVED
Closed: 5 months ago → 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
QA Whiteboard: [qa-triage-done-c155/b154]
No longer regressions: 2054351
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: