Closed Bug 1774317 Opened 4 years ago Closed 3 years ago

[TSF] Support `GUID_PROP_URL`

Categories

(Core :: DOM: UI Events & Focus Handling, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
107 Branch
Tracking Status
relnote-firefox --- 107+
firefox107 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(3 files)

TSF has new attribute GUID_PROP_URL to make TIP (IME) be able to retrieve the URL of focused document. Chromium has already supported (the commit).

Although I feel it has some concerns about privacy. However, TIP (IME) can access other private things. So I think that we need a new pref to unsupport it, but it should be enabled by default for the compatibility of IME behavior between browsers on Windows.

The purpose of this property is explained as (by the commit message of Chromium):

TSF is used in various scenarios to enable intelligent services, such as autocorrection, text suggestions as you type, shapewriting etc. The URL GUID will be used by accessibility via TSF services in the OS. For example, accessibility experiences can be optimized for specific URLs, such as a screen reader reading "microsoft.com" or "YouTube at google.com".

TSFTextStore needs to expose the document URL for supporting new feature
of Windows 11 22H2 update. Therefore, the InputContext should have the
document URL.

Assignee: nobody → masayuki
Status: NEW → ASSIGNED

GUID_PROP_URL is defined here:
https://learn.microsoft.com/en-us/windows/win32/tsf/predefined-properties

Contains a BSTR value representing the URL of the text control source, where
applicable.

The URL may contain sensitive information, e.g., user name, password, query
string. However, they are already leaked via MSAA/UIA.
https://searchfox.org/mozilla-central/rev/b1e5f2c7c96be36974262551978d54f457db2cae/accessible/generic/DocAccessible.cpp#350

Therefore, this patch just has prefs to completely prevent to expose the URL
for users who don't like this feature.

Depends on D157893

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/329666086b40 part 1: Make `IMEStateManager` notify `nsIWidget` of the document URL r=smaug https://hg.mozilla.org/integration/autoland/rev/418dec4ac3f9 part 2: Make `TSFTextStore` support `GUID_PROP_URL` r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 107 Branch → ---

The crash tracked in bug 1792767 is caused by uninitialized member of
TSFTextStore. Therefore, it runs the cleaning up the TSF objects at
setting focus to new TSFTextStore, but MS-IME didn't grab the necessary
objects and thus, the crash occurs.

Depends on D158244

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/a7c4336fcf3e part 1: Make `IMEStateManager` notify `nsIWidget` of the document URL r=smaug https://hg.mozilla.org/integration/autoland/rev/6dcffe73045a part 2: Make `TSFTextStore` support `GUID_PROP_URL` r=m_kato https://hg.mozilla.org/integration/autoland/rev/55825a1bc9fd part 3: Fix forgotten member initializing of `TSFTextStore` r=m_kato
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch

I think this is noticeable enough to put into the release note, would you agree? If so, could you be kind enough to nominate relnote-firefox? for this one? thank you.

Flags: needinfo?(masayuki)

Sure.

Release Note Request (optional, but appreciated)
[Why is this notable]: This may improve some web pages performance on Win11 22H2 unless user disables a11y module.
[Affects Firefox for Android]: No.
[Suggested wording]: Improved the performance of the case when Microsoft's IME and Defender retrieve URL of focused document in Win11 22H2.
[Links (documentation, blog post, etc)]: nothing special.

relnote-firefox: --- → ?
Flags: needinfo?(masayuki)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: