Closed Bug 1740847 Opened 4 years ago Closed 4 years ago

Make methods in `WhiteSpaceVisibilityKeeper` track DOM points in smaller block as far as possible

Categories

(Core :: DOM: Editor, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox-esr91 --- fixed
firefox96 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(4 files)

I found some points in the class do not track cached DOM points/ranges for each DOM change. So they could cause deleting unexpected characters or inserting new character to unexpected position.

It pointToSplit should be tracked at replacing text, but I have no idea how
to test this because it replaces the text after the split point.

And also invisible white-space range and replacing white-space position should
also be tracked too.

Depends on D131036

Similar to the previous patch, this patch also make it track invisible
white-space ranges and clear outdated things.

And this makes it cache some information instead of tracking some changes
because of performance reason.

Depends on D131037

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/addb07ae8de0 part 1: Track split point at replacing collapsible white-spaces r=m_kato
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/7f1d3fd39a93 part 2: Make `WhiteSpaceVisibilityKeeper::InsertBRElement()` track insert position in smaller block r=m_kato
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/17076719bbf2 part 3: Make `WhiteSpaceVisibilityKeeper::ReplaceText()` track insert position in smaller block r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch

We've gotten some reports of this fixing other crashes in the wild. What do you think about nominating this for ESR uplift, Masayuki?

Flags: needinfo?(masayuki)

(In reply to Ryan VanderMeulen [:RyanVM] from comment #8)

We've gotten some reports of this fixing other crashes in the wild. What do you think about nominating this for ESR uplift, Masayuki?

Sure, but we need to port the part 3 patch.
https://treeherder.mozilla.org/jobs?repo=try&selectedTaskRun=Y5DR197hSfSc7EKSWflxKw.0&revision=1201346db134cacfae33874a53bb14c64dd3cb26

Flags: needinfo?(masayuki)

Comment on attachment 9250476 [details]
Bug 1740847 - part 1: Track split point at replacing collapsible white-spaces r=m_kato!

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: These patches fix some random crashes in the wild.
  • User impact if declined: Users will see crash in some editor apps.
  • Fix Landed on Version: 96
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): The patches touch a lot of lines, but each line's change is simple. And the fix has already been tested by a lot of testers.
Attachment #9250476 - Flags: approval-mozilla-esr91?
Attachment #9250478 - Flags: approval-mozilla-esr91?
Attachment #9256671 - Flags: approval-mozilla-esr91?

Comment on attachment 9250476 [details]
Bug 1740847 - part 1: Track split point at replacing collapsible white-spaces r=m_kato!

Approved for 91.5esr. Thanks for attaching the rebased patch.

Attachment #9250476 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+
Attachment #9250478 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+
Attachment #9256671 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: