Bug 218631 - DOMStringList, TextMetrics & ImageBitmapRenderingContext should be exposed to workers
Summary: DOMStringList, TextMetrics & ImageBitmapRenderingContext should be exposed to...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-11-05 11:45 PST by Chris Dumez
Modified: 2020-11-05 14:40 PST (History)
12 users (show)

See Also:


Attachments
Patch (14.94 KB, patch)
2020-11-05 11:47 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (16.09 KB, patch)
2020-11-05 13:24 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>