Open Bug 2017201 Opened 5 months ago Updated 3 months ago

Make `TextControlState` independent from `nsTextControlFrame`

Categories

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

enhancement

Tracking

()

People

(Reporter: masayuki, Unassigned)

References

(Blocks 4 open bugs)

Details

After bug 2016280, the anonymous nodes in <input> and <textarea> won't be managed by nsTextControlFrame so that they can live as same as the text control element itself. Therefore, TextEditor can be live after TextControlState::UnbindFromFrame call. Thus, I believe that once the text control element has TextEditor, the element does not need to go back to the non-editor mode. Then, TextEditor and its transactions will stay in the memory, i.e., the footprint becomes worse, but that will preserve the undo transactions which may be important data for the users. So, we can fix the traditional dataloss bug.

No longer blocks: 854272

Bug 1826272 changed the lifecycle of TextInputListener.

I need to make TextInputSelectionController live longer, but it causes a crash here because nsFrameSelection::mPresShell is not cleared when the PresShell is destroyed. So, the crash is a UAF.

Depends on: 1826272
Summary: Make `TextControlState` and `TextInputListener` independent from `nsTextControlFrame` → Make `TextControlState` independent from `nsTextControlFrame`
See Also: → 827585
You need to log in before you can comment on or make changes to this bug.