Summary: | Add stubs for AudioWorklet | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||||||||||
Component: | Web Audio | Assignee: | Chris Dumez <cdumez> | ||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||
Severity: | Normal | CC: | annulen, benjamin, calvaris, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, jer.noble, kangil.han, kondapallykalyan, macpherson, menard, philipj, ryuan.choi, sergio, webkit-bug-importer, youennf | ||||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||
URL: | https://www.w3.org/TR/webaudio/#audioworklet | ||||||||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=217549 | ||||||||||||||||||
Bug Depends on: | |||||||||||||||||||
Bug Blocks: | 217058 | ||||||||||||||||||
Attachments: |
|
Description
Chris Dumez
2020-09-28 11:22:36 PDT
Created attachment 409936 [details]
Patch
Created attachment 409937 [details]
Patch
Created attachment 409942 [details]
Patch
Created attachment 409944 [details]
Patch
Created attachment 409953 [details]
Patch
Comment on attachment 409953 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=409953&action=review > Source/WebCore/css/DOMCSSPaintWorklet.cpp:76 > +void PaintWorklet::addModule(Document& document, const String& moduleURL, WorkletOptions&&, DOMPromiseDeferred<void>&& promise) > +{ > + // FIXME: We should download the source from the URL > + // https://bugs.webkit.org/show_bug.cgi?id=191136 > + auto maybeContext = PaintWorkletGlobalScope::tryCreate(document, ScriptSourceCode(moduleURL)); > + if (UNLIKELY(!maybeContext)) { > + promise.reject(Exception { OutOfMemoryError }); > + return; > + } > + auto context = maybeContext.releaseNonNull(); > + context->evaluate(); > + > + auto locker = holdLock(context->paintDefinitionLock()); > + for (auto& name : context->paintDefinitionMap().keys()) > + document.setPaintWorkletGlobalScopeForName(name, makeRef(context.get())); > + promise.resolve(); > +} > + Did you mean to include PaintWorklet changes in this patch? (In reply to Eric Carlson from comment #6) > Comment on attachment 409953 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=409953&action=review > > > Source/WebCore/css/DOMCSSPaintWorklet.cpp:76 > > +void PaintWorklet::addModule(Document& document, const String& moduleURL, WorkletOptions&&, DOMPromiseDeferred<void>&& promise) > > +{ > > + // FIXME: We should download the source from the URL > > + // https://bugs.webkit.org/show_bug.cgi?id=191136 > > + auto maybeContext = PaintWorkletGlobalScope::tryCreate(document, ScriptSourceCode(moduleURL)); > > + if (UNLIKELY(!maybeContext)) { > > + promise.reject(Exception { OutOfMemoryError }); > > + return; > > + } > > + auto context = maybeContext.releaseNonNull(); > > + context->evaluate(); > > + > > + auto locker = holdLock(context->paintDefinitionLock()); > > + for (auto& name : context->paintDefinitionMap().keys()) > > + document.setPaintWorkletGlobalScopeForName(name, makeRef(context.get())); > > + promise.resolve(); > > +} > > + > > Did you mean to include PaintWorklet changes in this patch? Yes, I moved paint Worklet specific code out of the generic Worklet code and to a PaintWorklet subclass. Created attachment 410003 [details]
Patch
Created attachment 410004 [details]
Patch
Committed r267744: <https://trac.webkit.org/changeset/267744> All reviewed patches have been landed. Closing bug and clearing flags on attachment 410004 [details]. |