Bug 218631

Summary: DOMStringList, TextMetrics & ImageBitmapRenderingContext should be exposed to workers
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, changseok, darin, esprehn+autocc, ews-watchlist, ggaren, gyuyoung.kim, hi, kangil.han, kondapallykalyan, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Comment 1 Chris Dumez 2020-11-05 11:47:50 PST
Created attachment 413336 [details]
Patch
Comment 2 Chris Dumez 2020-11-05 13:24:46 PST
Created attachment 413347 [details]
Patch
Comment 3 Geoffrey Garen 2020-11-05 13:31:00 PST
Comment on attachment 413347 [details]
Patch

How does ImageBitmapRenderingContext.canvas work on a worker? Is it always null?

Do we have any tests that exercise ImageBitmapRenderingContext in more detail on a worker?
Comment 4 Chris Dumez 2020-11-05 13:36:24 PST
(In reply to Geoffrey Garen from comment #3)
> Comment on attachment 413347 [details]
> Patch
> 
> How does ImageBitmapRenderingContext.canvas work on a worker? Is it always
> null?
> 
> Do we have any tests that exercise ImageBitmapRenderingContext in more
> detail on a worker?

To be clear, this patch is not about exposing a particular functionality to workers. It merely exposes properties on the global WorkerGlobalScope.

To answer your question about ImageBitmapRenderingContext.canvas (although not really in the scope of this patch), the property can return either an HTMLCanvasElement or an OffscreenCanvas. In the case of workers, it would return an OffscreenCanvas. There is an implementation of OffscreenCanvas in WebKit but as far as I know is not enabled for Apple ports yet (not sure if the feature is complete or not).
Comment 5 EWS 2020-11-05 14:39:46 PST
Committed r269476: <https://trac.webkit.org/changeset/269476>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 413347 [details].
Comment 6 Radar WebKit Bug Importer 2020-11-05 14:40:20 PST
<rdar://problem/71095192>