Add stubs for AudioWorklet: - https://www.w3.org/TR/webaudio/#audioworklet
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].
<rdar://problem/69751498>