Closed Bug 1953047 Opened 1 year ago Closed 1 year ago

[TSF] Make `TSFEmptyTextStore` for disabled document manager

Categories

(Core :: DOM: UI Events & Focus Handling, task)

All
Windows
task

Tracking

()

RESOLVED FIXED
139 Branch
Tracking Status
firefox139 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: inputmethod)

Attachments

(4 files)

We should create new TSFEmptyTextStore for avoiding to make TSFTextStore has new paths for disabled cases since TSFTextStore is enough complicated.

I think we should split TSFTextStore to implement common base class with TSFEmptyTextStore and move some utility classes and methods into new file like TSFUtils.h and TSFUtils.cpp. Then, implement TSFEmptyTextStore which won't access actual content.

No longer depends on: 1953046

We want another TSFTextStore class which always has empty content but
allows to reply to retrieving the properties and supports sink.

For avoiding to duplicate some methods and basic parameter checks, we
should have a base class, TSFTextStoreBase.

This should've already been done when creating TSFUtils, though.

Depends on D242679

TSFEmptyTextStore will share them. For making the changes for it clearer in
the previous patch, this patch moves them.

Depends on D242680

Even while IME is disabled (i.e., when non-editable element or nobody has
focus), we'll expose active tab's URL and whether it's in the private browsing
mode via the input scope. Therefore, we need to handle requests for retrieving
attributes. So, we need a TextStore instance for that. However, they may
require special behavior due to its context is marked as empty and not editable.
Unfortunately, TSFTextStore is enough complicated and big even after some
features are moved to TSFUtils and TSFTextStoreBase. Therefore, this patch
creates TSFEmptyTextStore to isolate the implementation from TSFTextStore.

Depends on D242681

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/b8be89d687f0 part 1: Split `TSFTextStore` with new its base class r=m_kato https://hg.mozilla.org/integration/autoland/rev/f2c694bf075d part 2: Move most static staff of `TSFTextStore` to `TSFUtils` r=m_kato https://hg.mozilla.org/integration/autoland/rev/1b2dddf7bbd7 part 3: Move attributes handlers of `TSFTextStore` into `TSFTextStoreBase` r=m_kato https://hg.mozilla.org/integration/autoland/rev/3b54b7bad260 part 4: Implement `TSFEmptyTextStore` for the disabled document manager and context r=m_kato
Regressions: 1958821
Regressions: 1959493
QA Whiteboard: [qa-triage-done-c140/b139]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: