Bug 266897 - Exposing navigator.language to web workers
Summary: Exposing navigator.language to web workers
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar, WPTImpact
Depends on:
Blocks:
 
Reported: 2023-12-26 11:03 PST by Ahmad Saleem
Modified: 2024-01-02 11:04 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-12-26 11:03:45 PST
Hi Team,

While investigating WPT failures, I noticed that we fail two tests here:

WPT Test Case: https://wpt.fyi/results/html/dom/idlharness.worker.html?label=master&label=experimental&aligned=&q=safari%3Afail

> WorkerGlobalScope interface: attribute onlanguagechange	
> WorkerGlobalScope interface: self must inherit property "onlanguagechange" with the proper type

WebKit / Safari is only browser currently failing these (so I will add 'BrowserCompat' tag - in addition to 'WPTImpact').

Blink Commit (for reference) - https://chromium.googlesource.com/chromium/src.git/+/6c688717fa4d50920ebcb0ab80e95023ff562656

FIXME in WebKit Source: https://searchfox.org/wubkat/rev/2cb2f84b68df8a519e252d535de43e7d19567883/Source/WebCore/workers/WorkerGlobalScope.idl#39

I didn't manage to find similar bug so I thought to raise for better tracking.

Thanks!
Comment 1 Ahmad Saleem 2023-12-26 11:11:07 PST
NOTE - just uncommenting in IDL file (FIXME) leads to test progression. So we might have already necessary implementation. Although, will wait for more context or input from others.
Comment 2 Alexey Proskuryakov 2023-12-26 12:20:09 PST
Language.cpp has some locking added for OffscreenCanvas thread safety, so Navigator.language may indeed be trivial to enable in workers at this point. Careful verification would still be needed, of course.

However onlanguagechange clearly doesn't have an implementation, so uncommenting the line in IDL won't make it work.
Comment 3 Radar WebKit Bug Importer 2024-01-02 11:04:14 PST
<rdar://problem/120378717>