⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Feb 21, 2021:

9:20 PM Changeset in webkit [273229] by Lauro Moura
  • 2 edits in trunk/Source/JavaScriptCore

Fix warning after r273225
https://bugs.webkit.org/show_bug.cgi?id=222257

Reviewed by Keith Miller.

The UNLIKELY condition raises a warn with "suggest parentheses around

‘&&’ within ‘
’" for the last pair.
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseUnaryExpression):

7:13 PM Changeset in webkit [273228] by Lauro Moura
  • 8 edits
    1 delete in trunk/LayoutTests

[GLIB] Gardening and updating baselines

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/glib/webaudio/audioworklet-addModule-failure-expected.txt: Removed.
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
  • platform/wpe/fast/text/international/bidi-LDB-2-CSS-expected.txt:
  • platform/wpe/fast/text/international/bidi-LDB-2-HTML-expected.txt:
  • platform/wpe/fast/text/international/bidi-LDB-2-formatting-characters-expected.txt:
  • platform/wpe/fast/text/international/bidi-ignored-for-first-child-inline-expected.txt:
6:13 PM Changeset in webkit [273227] by Andres Gonzalez
  • 15 edits
    2 adds in trunk

Add [WebAccessibilityObjectWrapper textMarkerRangeForNSRange] to allow clients to efficiently get a TextMarkerRange from an NSRange.
https://bugs.webkit.org/show_bug.cgi?id=222154

Reviewed by Chris Fleizach and Darin Adler.

Source/WebCore:

Test: accessibility/mac/textmarker-range-for-range.html

Clients like VoiceOver often need the ability to convert a text range
into an accessibility TextMarkerRange.
This patch adds [WebAccessibilityObjectWrapper textMarkerRangeForNSRange]
to allow clients to efficiently perform this conversion.
This is the Mac implementation, iOS implementation is pending.

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::allowsTextRanges const):

  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:

(WebCore::AXIsolatedObject::textMarkerRangeForNSRange const):

  • accessibility/mac/AccessibilityObjectMac.mm:

(WebCore::AccessibilityObject::textMarkerRangeForNSRange const):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper textMarkerRangeForNSRange:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

  • editing/Editing.cpp:

(WebCore::visiblePositionForIndexUsingCharacterIterator):
Only advance the CharacterIterator if not atEnd yet.

Tools:

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:

(WTR::AccessibilityUIElement::textMarkerRangeForRange):

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::textMarkerRangeForRange):

LayoutTests:

  • accessibility/mac/textmarker-range-for-range-expected.txt: Added.
  • accessibility/mac/textmarker-range-for-range.html: Added.
5:04 PM Changeset in webkit [273226] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix CMake build.

  • CMakeLists.txt:
4:41 PM Changeset in webkit [273225] by keith_miller@apple.com
  • 48 edits in trunk

Implement the Top-level await proposal
https://bugs.webkit.org/show_bug.cgi?id=202484

Reviewed by Yusuke Suzuki.

JSTests:

  • test262/config.yaml:

Source/JavaScriptCore:

This patch adds support for the TLA proposal. The bulk of this patch is adding a couple of main parts.

1) converting the AbstractModuleRecord to contain many of same internal fields as JSGenerator so much of the async codegen can be shared.

2) having the link phase of the module loader record whether a module subgraph is async.
3) teaching the module loader that evaluating a module may require more than one vm entry and forwarding the awaited value as well as the resume mode to the VM.

One thing particularly interesting about this patch is that moduleEvaluation now *sometimes* (when a strongly connected subgraph is async) will return a promise. This happened to already be awaited when called from loadAndEvaluateModule (unnecessarily before) but now also needs to be handled by requestImportModule.

No new tests because every test I came up with was subsumed by tests already in test262.

  • API/JSAPIGlobalObject.h:
  • API/JSAPIGlobalObject.mm:

(JSC::JSAPIGlobalObject::moduleLoaderEvaluate):

(globalPrivate.newRegistryEntry):
(link):
(async requestImportModule):
(moduleEvaluation): Deleted.
(requestImportModule): Deleted.

  • bytecode/BytecodeGeneratorification.cpp:

(JSC::BytecodeGeneratorification::run):
(JSC::performGeneratorification):

  • bytecode/BytecodeIntrinsicRegistry.cpp:

(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeUseDef.cpp:

(JSC::computeUsesForBytecodeIndexImpl):

  • bytecode/UnlinkedModuleProgramCodeBlock.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitWillLeaveCallFrameDebugHook):
(JSC::BytecodeGenerator::emitGenericEnumeration):
(JSC::BytecodeGenerator::emitYieldPoint):
(JSC::BytecodeGenerator::emitYield):
(JSC::BytecodeGenerator::emitDelegateYield):
(JSC::BytecodeGenerator::emitGeneratorStateChange):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::generatorStateRegister):
(JSC::BytecodeGenerator::generatorValueRegister):
(JSC::BytecodeGenerator::generatorResumeModeRegister):
(JSC::BytecodeGenerator::generatorFrameRegister):

  • bytecompiler/NodesCodegen.cpp:

(JSC::abstractModuleRecordInternalFieldIndex):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_getAbstractModuleRecordInternalField):
(JSC::FunctionNode::emitBytecode):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::executeModuleProgram):

  • interpreter/Interpreter.h:
  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createAwait):
(JSC::ASTBuilder::usesAwait):

  • parser/Nodes.cpp:

(JSC::ModuleProgramNode::ModuleProgramNode):

  • parser/Nodes.h:
  • parser/Parser.cpp:

(JSC::JSToken::dump const):
(JSC::Parser<LexerType>::parseForStatement):
(JSC::Parser<LexerType>::parseAwaitExpression):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseUnaryExpression):

  • parser/ParserModes.h:
  • parser/ParserTokens.h:
  • runtime/AbstractModuleRecord.cpp:

(JSC::AbstractModuleRecord::finishCreation):
(JSC::AbstractModuleRecord::link):
(JSC::AbstractModuleRecord::evaluate):

  • runtime/AbstractModuleRecord.h:

(JSC::AbstractModuleRecord::initialValues):
(JSC::AbstractModuleRecord::internalField):
(JSC::AbstractModuleRecord::internalField const):

  • runtime/JSAsyncGenerator.h:
  • runtime/JSGenerator.h:
  • runtime/JSGlobalObject.h:
  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::evaluate):
(JSC::JSModuleLoader::evaluateNonVirtual):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/JSModuleLoader.h:
  • runtime/JSModuleRecord.cpp:

(JSC::JSModuleRecord::link):
(JSC::JSModuleRecord::evaluate):

  • runtime/JSModuleRecord.h:
  • runtime/ModuleProgramExecutable.h:
  • runtime/OptionsList.h:
  • runtime/SymbolTable.cpp:

(JSC::SymbolTable::dump const):

  • runtime/SymbolTable.h:
  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::linkImpl):

  • wasm/js/WebAssemblyModuleRecord.h:

Source/WebCore:

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::moduleLoaderEvaluate):

  • bindings/js/JSDOMGlobalObject.h:
  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::evaluateModule):

  • bindings/js/ScriptController.h:
  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::ScriptModuleLoader::evaluate):

  • bindings/js/ScriptModuleLoader.h:
  • workers/WorkerOrWorkletScriptController.cpp:

(WebCore::WorkerOrWorkletScriptController::evaluateModule):

  • workers/WorkerOrWorkletScriptController.h:
1:54 PM Changeset in webkit [273224] by ysuzuki@apple.com
  • 17 edits in trunk

Support modules in service workers
https://bugs.webkit.org/show_bug.cgi?id=222155

Reviewed by Saam Barati.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/json-module-service-worker-test.https.tentative-expected.txt:
  • web-platform-tests/service-workers/service-worker/clients-matchall-client-types.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/import-module-scripts.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/performance-timeline.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/update-registration-with-type.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/update.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/worker-client-id.https-expected.txt:

Source/WebCore:

This patch adds module support to service-workers. Basically this just plumbs the type: "module" information to
service worker's job as described in the spec[1]: Each SW job should have workerType, and this is passed.
And we sometimes compare newestWorker->type() with this job.workerType (as defined in the spec). And we spawn
the SW with this job.workerType. Since Worker already supports "module" evaluation, this is automatically evaluated
as modules if we spawn SW thread with "module" type.

When using, we can pass "module" type to the register method as follows.

navigator.serviceWorker.register('script.mjs', {

type: "module"

});

[1]: https://w3c.github.io/ServiceWorker/

  • workers/service/ServiceWorker.h:
  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::addRegistration):
(WebCore::ServiceWorkerContainer::updateRegistration):

  • workers/service/ServiceWorkerJobData.cpp:

(WebCore::ServiceWorkerJobData::isolatedCopy const):
(WebCore::ServiceWorkerJobData::isEquivalent const):

  • workers/service/ServiceWorkerJobData.h:

(WebCore::ServiceWorkerJobData::encode const):
(WebCore::ServiceWorkerJobData::decode):

  • workers/service/ServiceWorkerRegistration.cpp:

(WebCore::ServiceWorkerRegistration::update):

  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::ServiceWorkerThread::ServiceWorkerThread):

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::softUpdate):

  • workers/service/server/SWServerJobQueue.cpp:

(WebCore::SWServerJobQueue::scriptFetchFinished):
(WebCore::SWServerJobQueue::runRegisterJob):
(WebCore::SWServerJobQueue::runUpdateJob):

1:38 PM Changeset in webkit [273223] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC][IFC] Hittest should be using the border box (and not the margin box)
https://bugs.webkit.org/show_bug.cgi?id=222249

Reviewed by Antti Koivisto.

This patch fixes the cases when the inline box (e.g. <span>) has horizontal
margins and we find those inline boxes instead of their containing blocks.
e.g.
<div><span style="margin-left: 100px;">border box starts at 100px</span></div>
document.elementFromPoint(50, 10) should not find the <span>.

Let's simplify LineBox interface so that it returns the border box. Clients
are mainly interested in the border box.
(LineBox is mostly there to support vertical alignment and the vertical
alignment uses the margin box height. The inline level boxes on the line now have
this seemingly odd combination of border box width and margin box height, but
that's required to keep the alignment logic clean and simple.)

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):

  • layout/inlineformatting/InlineLineBox.cpp:

(WebCore::Layout::LineBox::logicalBorderBoxForAtomicInlineLevelBox const):
(WebCore::Layout::LineBox::logicalBorderBoxForInlineBox const):
(WebCore::Layout::LineBox::logicalMarginRectForAtomicInlineLevelBox const): Deleted.
(WebCore::Layout::LineBox::logicalRectForInlineBox const): Deleted.

  • layout/inlineformatting/InlineLineBox.h:
  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLineRuns const):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayNonRootInlineBoxes const):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::showInlineTreeAndRuns):

1:08 PM Changeset in webkit [273222] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] JSInternalPromise::then can fail if execution is terminated
https://bugs.webkit.org/show_bug.cgi?id=222244

Reviewed by Mark Lam.

JSInternalPromise::then assumed that call's result is always JSInternalPromise.
But this is wrong if termination exception is thrown. In that case, this call fails.
This patch makes it robust against this behavior.

  • runtime/JSInternalPromise.cpp:

(JSC::JSInternalPromise::then):

12:49 PM Changeset in webkit [273221] by Simon Fraser
  • 2 edits in trunk/Source/WTF

Re-enable Paint Timing
https://bugs.webkit.org/show_bug.cgi?id=211736

Reviewed by Noam Rosenthal.

Now that bug 222245 is fixed in r273220, re-enable Paint Timing
(aka First Contentful Paint.)

  • Scripts/Preferences/WebPreferencesEfxperimental.yaml:
11:07 AM Changeset in webkit [273220] by Noam Rosenthal
  • 4 edits in trunk/Source/WebCore

[Paint Timing] Return early from contentful paint check when no contentful pixels/characters at all
https://bugs.webkit.org/show_bug.cgi?id=222245

Reviewed by Simon Fraser.

Bail from recursive contenful-paint check if there are no pixels/text characters in the entire document.

Covered by existing tests, an optimization only.

  • dom/Document.cpp:

(WebCore::Document::enqueuePaintTimingEntryIfNeeded):

  • page/FrameView.cpp:

(WebCore::FrameView::hasContenfulDescendants const):

  • page/FrameView.h:
9:20 AM Changeset in webkit [273219] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Small improvements to r273073
https://bugs.webkit.org/show_bug.cgi?id=222179

Patch by Martin Robinson <mrobinson@igalia.com> on 2021-02-21
Reviewed by Darin Adler.

No new tests, because this should not change behavior.

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::enclosingScrollableContainerForSnapping const): Replace
a while loop with a for loop and prefer downcast<> to static_cast<>.

4:51 AM Changeset in webkit [273218] by ysuzuki@apple.com
  • 7 edits
    16 adds in trunk/JSTests

[JSC] Upgrade test262
https://bugs.webkit.org/show_bug.cgi?id=222243

Reviewed by Alexey Shvayka.

  • test262/config.yaml:
  • test262/expectations.yaml:
  • test262/latest-changes-summary.txt:
  • test262/test/built-ins/Object/assign/target-is-frozen-accessor-property-set-succeeds.js: Added.

(target1.set foo):
(target2.Object.freeze.set sym):

  • test262/test/built-ins/Object/assign/target-is-frozen-data-property-set-throws.js: Added.
  • test262/test/built-ins/Object/assign/target-is-non-extensible-existing-accessor-property.js: Added.

(target1.Object.preventExtensions.set foo):
(target2.set sym):

  • test262/test/built-ins/Object/assign/target-is-non-extensible-existing-data-property.js: Added.
  • test262/test/built-ins/Object/assign/target-is-non-extensible-property-creation-throws.js: Added.

(get bar):

  • test262/test/built-ins/Object/assign/target-is-sealed-existing-accessor-property.js: Added.

(target1.Object.seal.set foo):
(target2.set sym):

  • test262/test/built-ins/Object/assign/target-is-sealed-existing-data-property.js: Added.
  • test262/test/built-ins/Object/assign/target-is-sealed-property-creation-throws.js: Added.

(get bar):

  • test262/test/built-ins/Object/freeze/proxy-with-defineProperty-handler.js: Added.

(proxy.new.Proxy.get foo):
(proxy.new.Proxy.set foo):
(set foo.defineProperty):
(set foo):

  • test262/test/built-ins/Object/seal/proxy-with-defineProperty-handler.js: Added.

(proxy.new.Proxy.get foo):
(proxy.new.Proxy.set foo):
(set foo.defineProperty):
(set foo):

  • test262/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js:

(testWithBigIntTypedArrayConstructors):

  • test262/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js:

(testWithBigIntTypedArrayConstructors):

  • test262/test/intl402/DateTimeFormat/constructor-no-instanceof.js: Added.
  • test262/test/intl402/DateTimeFormat/prototype/format/no-instanceof.js: Added.
  • test262/test/intl402/DateTimeFormat/prototype/resolvedOptions/no-instanceof.js: Added.
  • test262/test/intl402/NumberFormat/constructor-no-instanceof.js: Added.
  • test262/test/intl402/NumberFormat/prototype/format/no-instanceof.js: Added.
  • test262/test/intl402/NumberFormat/prototype/resolvedOptions/no-instanceof.js: Added.
  • test262/test262-Revision.txt:
4:35 AM Changeset in webkit [273217] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Remove vm.topCallFrame storing in Baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=222162

Reviewed by Mark Lam.

This patch removes vm.topCallFrame storing in the Baseline JIT for ports that can USE(BUILTIN_FRAME_ADDRESS).
Also refactored some CommonSlowPath functions so that they can start using builtin_frame_address later
instead of requiring that CallFrame be passed in.

  • jit/JITInlines.h:

(JSC::JIT::updateTopCallFrame):

  • runtime/CommonSlowPaths.cpp:

(JSC::iteratorOpenTryFastImpl):
(JSC::JSC_DEFINE_COMMON_SLOW_PATH):
(JSC::iteratorNextTryFastImpl):

Feb 20, 2021:

11:27 PM Changeset in webkit [273216] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[Cocoa] Update WebCoreArgumentCodersMac with some new additions
https://bugs.webkit.org/show_bug.cgi?id=222242
<rdar://problem/74562457>

Reviewed by Tim Horton.

Will be tested by new API Tests in a subsequent patch.

  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::ArgumentCoder<WebCore::ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<WebCore::ResourceRequest>::decodePlatformData):

8:24 PM Changeset in webkit [273215] by BJ Burg
  • 4 edits in trunk/Source/WebKit

[Cocoa] Web Inspector: expose the WKBrowsingContextHandle associated with Web Inspector's page
https://bugs.webkit.org/show_bug.cgi?id=222226

Reviewed by Timothy Hatcher.

In order to implement browser.devtools.inspectedWindow.tabId for Web Extensions,
we need a way to do a reverse lookup of the tabId using the current browsing context
controller (WKWebProcessPlugInBrowserContextController) in the injected bundle.

This patch exposes the browsing context handle for the underlying WKWebView that
hosts the inspector page. Clients can use this to precompute a tabId for each
inspector browsing context that may be encountered by injected bundle code.

  • UIProcess/API/Cocoa/_WKInspectorPrivate.h:
  • UIProcess/API/Cocoa/_WKInspector.mm:

(-[_WKInspector handle]): Added.

  • WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:

(WebKit::InjectedBundle::classesForCoder):
Drive-by, make it possible to use WKBrowsingContextHandle in injected bundle parameters.
This is easy because it conforms to NSSecureCoding and is simply a pageId + frameId.

8:15 PM Changeset in webkit [273214] by Chris Fleizach
  • 40 edits
    4 adds in trunk

AX: Image should report the embedded accessibility description if available
https://bugs.webkit.org/show_bug.cgi?id=221875
<rdar://problem/74320584>

Reviewed by Jer Noble.

Source/WebCore:

Check if images have accessibility description metadata and expose that to the AX API.

Test: accessibility/embedded-image-description.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::embeddedImageDescription const):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _accessibilityPhotoDescription]):

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/isolatedtree/AXIsolatedTree.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

  • platform/cf/MediaAccessibilitySoftLink.cpp:
  • platform/cf/MediaAccessibilitySoftLink.h:
  • platform/graphics/BitmapImage.h:
  • platform/graphics/Image.h:

(WebCore::Image::accessibilityDescription const):

  • platform/graphics/ImageDecoder.h:
  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::accessibilityDescription):

  • platform/graphics/ImageSource.h:
  • platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::ImageDecoderCG::accessibilityDescription const):

  • platform/graphics/cg/ImageDecoderCG.h:
  • rendering/RenderImage.h:

(WebCore::RenderImage::accessibilityDescription const):

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/spi/cocoa/MediaAccessibilitySPI.h: Added.

Source/WebKit:

  • WebProcess/GPU/media/RemoteImageDecoderAVF.h:

Tools:

  • DumpRenderTree/AccessibilityUIElement.cpp:

(getEmbeddedImageDescription):
(AccessibilityUIElement::getJSClass):

  • DumpRenderTree/AccessibilityUIElement.h:
  • DumpRenderTree/ios/AccessibilityUIElementIOS.mm:

(AccessibilityUIElement::embeddedImageDescription const):

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(AccessibilityUIElement::embeddedImageDescription const):

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::embeddedImageDescription const):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::embeddedImageDescription const):

LayoutTests:

  • accessibility/embedded-image-description-expected.txt: Added.
  • accessibility/embedded-image-description.html: Added.
  • accessibility/resources/embedded-image-description-example.jpg: Added.
  • platform/ios-simulator/TestExpectations:
  • platform/win/TestExpectations:
6:05 PM Changeset in webkit [273213] by Peng Liu
  • 24 edits in trunk

Video elements do not work as sources for TexImage2D calls in GPU Process
https://bugs.webkit.org/show_bug.cgi?id=218184

Reviewed by Jer Noble.

Source/WebCore:

Add a function GraphicsContextGL::copyTextureFromMedia() which can be used by the graphics
context to copy video texture from a video element (player).

This patch also replaces MediaPlayer::copyVideoTextureToPlatformTexture() with
MediaPlayer::pixelBufferForCurrentTime() on Cocoa ports. The motivation is that
RemoteGraphicsContextGL::copyTextureFromMedia() will run in a background thread
("RemoteGraphicsContextGL work queue") and it is difficult to make
MediaPlayer::copyVideoTextureToPlatformTexture() thread-safe. In addition, we cannot
simply run it on the main thread because it uses graphic context internally. Adding a
function MediaPlayer::pixelBufferForCurrentTime() solves the problem.

Manually tested.
We need to enable both "GPU Process: Media" and "GPU Process: WebGL" to test the feature.

  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::copyVideoTextureToPlatformTexture): Deleted.

  • html/HTMLVideoElement.h:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::texImageSourceHelper):

  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::pixelBufferForCurrentTime):

  • platform/graphics/MediaPlayer.h:
  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::pixelBufferForCurrentTime):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::pixelBufferForCurrentTime):
(WebCore::MediaPlayerPrivateAVFoundationObjC::copyVideoTextureToPlatformTexture): Deleted.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pixelBufferForCurrentTime):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::copyVideoTextureToPlatformTexture): Deleted.

  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:

(WebCore::GraphicsContextGLOpenGL::copyTextureFromMedia):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:

Source/WebKit:

Add an IPC message RemoteGraphicsContextGL::CopyTextureFromMedia to implement
RemoteGraphicsContextGLProxy::copyTextureFromMedia() in the Web process.

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::copyTextureFromMedia):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:

We should use m_gpuConnectionToWebProcess in the main thread only.

  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::copyTextureFromMedia):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:

Tools:

  • Scripts/generate-gpup-webgl:
5:06 PM Changeset in webkit [273212] by youenn@apple.com
  • 9 edits in trunk

Add support for adding/removing/clearing mock devices in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=222174

Reviewed by Eric Carlson.

Source/WebKit:

Make sure to forward mock device orders to GPU process so that it is kept in sync with UIProcess.
Covered by updated test.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::addMockMediaDevice):
(WebKit::GPUProcess::clearMockMediaDevices):
(WebKit::GPUProcess::removeMockMediaDevice):
(WebKit::GPUProcess::resetMockMediaDevices):

  • GPUProcess/GPUProcess.h:
  • GPUProcess/GPUProcess.messages.in:
  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::addMockMediaDevice):
(WebKit::GPUProcessProxy::clearMockMediaDevices):
(WebKit::GPUProcessProxy::removeMockMediaDevice):
(WebKit::GPUProcessProxy::resetMockMediaDevices):

  • UIProcess/GPU/GPUProcessProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::addMockMediaDevice):
(WebKit::WebProcessPool::clearMockMediaDevices):
(WebKit::WebProcessPool::removeMockMediaDevice):
(WebKit::WebProcessPool::resetMockMediaDevices):

LayoutTests:

  • fast/mediastream/device-change-event-2.html:
4:47 PM Changeset in webkit [273211] by weinig@apple.com
  • 14 edits in trunk

color(lab ...) should serialize as color(lab ...) not lab() according to latest CSS Color 4 spec
https://bugs.webkit.org/show_bug.cgi?id=222110

Reviewed by Dean Jackson.

Source/WebCore:

To make this work it was necessary to make it so that extended colors, like Lab,
could store an extra bit of data on Color to indicate that it should use the
color() function for serialization when parsed using the color() form.

To do that, Color was reworked to allow extra metadata flags for both inline and
extended colors. Previously, only inline colors could make use of the extra bits.
Now, we take advantage of the fact that we have the high 16 bits available to us
for pointers to also store that metadata for extended colors. Rather than using a
union, we encode the pointer / inline color into a uint64_t, and use the extra bits
for the flags we need. Currently we only use 6, so there is quite a bit more that
could be used here.

Finally, the color serialization code has been updated to check for the new bit,
called UseColorFunctionSerialization, and to serialize using color() notation
if it is set.

We are currently only taking advantage of this for differentiating between lab(...)
and color(lab ...), but in the future we should be able to also optimize color(srgb ...)
values that can be represented fully by SRGBA<uint8_t>.

Since we can now add flags for extended colors, the semantic bit is also now usable
for extended colors, though none currently exist.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseColorFunctionForRGBTypes):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForLabParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForXYZParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):

  • platform/graphics/Color.cpp:

(WebCore::Color::Color):
(WebCore::Color::operator=):
(WebCore::Color::colorWithAlpha const):
(WebCore::Color::semanticColor const):

  • platform/graphics/Color.h:

(WebCore::Color::isHashTableDeletedValue const):
(WebCore::Color::Color):
(WebCore::Color::toAllFlags):
(WebCore::Color::setColor):
(WebCore::Color::setExtendedColor):
(WebCore::operator==):
(WebCore::extendedColorsEqual):
(WebCore::extendedColorsEqualIgnoringSemanticColor):
(WebCore::equalIgnoringSemanticColor):
(WebCore::Color::~Color):
(WebCore::Color::hash const):
(WebCore::Color::isValid const):
(WebCore::Color::isSemantic const):
(WebCore::Color::usesColorFunctionSerialization const):
(WebCore::Color::flags const):
(WebCore::Color::isExtended const):
(WebCore::Color::isInline const):
(WebCore::Color::asExtended const):
(WebCore::Color::asExtendedRef const):
(WebCore::Color::asInline const):
(WebCore::Color::asPackedInline const):
(WebCore::Color::encodedFlags):
(WebCore::Color::encodedInlineColor):
(WebCore::Color::encodedPackedInlineColor):
(WebCore::Color::encodedExtendedColor):
(WebCore::Color::decodedFlags):
(WebCore::Color::decodedInlineColor):
(WebCore::Color::decodedPackedInlineColor):
(WebCore::Color::decodedExtendedColor):
(WebCore::Color::setInvalid):
(WebCore::Color::encode const):
(WebCore::Color::decode):
(WebCore::Color::tagAsSemantic): Deleted.
(WebCore::Color::tagAsValid): Deleted.

  • platform/graphics/ColorBlending.cpp:

(WebCore::blendWithWhite):

  • platform/graphics/ColorSerialization.cpp:

(WebCore::serializationForCSS):
(WebCore::serializationForHTML):
(WebCore::serializationForRenderTreeAsText):
(WebCore::serializationUsingColorFunction):

  • platform/graphics/cg/ColorCG.cpp:

(WebCore::Color::Color):

  • platform/graphics/mac/ColorMac.mm:

(WebCore::semanticColorFromNSColor):

  • rendering/RenderThemeIOS.mm:

(WebCore::systemColorFromCSSValueIDSelector):
(WebCore::systemColorFromCSSValueID):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::systemColor const):

LayoutTests:

  • fast/css/parsing-lab-colors-expected.txt:
  • fast/css/parsing-lab-colors.html:

Update test and results for new serialization of color(lab ...).

4:38 PM Changeset in webkit [273210] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Fix the build when TREE_DEBUGGING is enabled in release builds
https://bugs.webkit.org/show_bug.cgi?id=222238

Reviewed by Zalan Bujtas.

FloatingObjects logging needs to use ENABLE(TREE_DEBUGGING) not #ifndef NDEBUG.

  • rendering/FloatingObjects.cpp:
  • rendering/FloatingObjects.h:
3:17 PM Changeset in webkit [273209] by jiewen_tan@apple.com
  • 32 edits in trunk

PCM: Store and report source unlinkable tokens
https://bugs.webkit.org/show_bug.cgi?id=222208
<rdar://problem/73582032>

Reviewed by John Wilander.

Source/WebCore:

This patch hooks up the network process with the PCM fraud prevention feature to
enable the generation, storing and reporting the source unlinkable token.

Existing tests updated.

  • loader/PrivateClickMeasurement.h:

(WebCore::PrivateClickMeasurement::setSourceSecretTokenValue):
Adds infrastructure to mock the crypto operations such that layout tests can be
conducted without the server side crypto support.

  • loader/PrivateClickMeasurement.cpp:

(WebCore::PrivateClickMeasurement::attributionReportJSON const):
(WebCore::PrivateClickMeasurement::tokenSignatureJSON const):
(WebCore::PrivateClickMeasurement::setSourceUnlinkableToken):
(WebCore::PrivateClickMeasurement::tokenSignatureJSON): Deleted.

  • loader/PrivateClickMeasurement.h:

(WebCore::PrivateClickMeasurement::sourceUnlinkableToken const):

  • loader/cocoa/PrivateClickMeasurementCocoa.mm:

(WebCore::PrivateClickMeasurement::calculateAndUpdateSourceSecretToken):
(WebCore::PrivateClickMeasurement::calculateAndUpdateSourceUnlinkableToken):
(WebCore::PrivateClickMeasurement::sourceSecretToken): Deleted.
(WebCore::PrivateClickMeasurement::calculateSourceUnlinkableToken): Deleted.
Update interfaces to service the use cases in the Networking process better.

Source/WebKit:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::setFraudPreventionValuesForTesting):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::setFraudPreventionValuesForTesting):

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::storeUnattributed):
(WebKit::PrivateClickMeasurementManager::getSignedSecretToken):
(WebKit::PrivateClickMeasurementManager::setFraudPreventionValuesForTesting):

  • NetworkProcess/PrivateClickMeasurementManager.h:
  • UIProcess/API/C/WKPage.cpp:

(WKPageSetFraudPreventionValuesForTesting):

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::markPrivateClickMeasurementsAsExpiredForTesting):
(WebKit::WebPageProxy::setFraudPreventionValuesForTesting):

  • UIProcess/WebPageProxy.h:

Adds infrastructure to mock the crypto operations such that layout tests can be
conducted without the server side crypto support.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::buildPrivateClickMeasurementFromDatabase):
(WebKit::ResourceLoadStatisticsDatabaseStore::insertPrivateClickMeasurement):

  • NetworkProcess/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::storeUnattributed):
(WebKit::PrivateClickMeasurementManager::getTokenPublicKey):
(WebKit::PrivateClickMeasurementManager::getSignedSecretToken):
(WebKit::PrivateClickMeasurementManager::fireConversionRequest):
(WebKit::PrivateClickMeasurementManager::fireConversionRequestImpl):

  • NetworkProcess/PrivateClickMeasurementManager.h:

Connects the fraud prevention feature in PCM to generate, store, and report the unlinkable token.

Tools:

  • TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:

(TestWebKitAPI::TEST):

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setFraudPreventionValuesForTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::setFraudPreventionValuesForTesting):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
Rebases some test cases.

LayoutTests:

  • http/tests/privateClickMeasurement/expired-attribution-report-gets-sent-on-session-start-expected.txt:
  • http/tests/privateClickMeasurement/resources/signToken.php:
  • http/tests/privateClickMeasurement/send-attribution-conversion-request-expected.txt:
  • http/tests/privateClickMeasurement/store-private-click-measurement-with-source-nonce-expected.txt:
  • http/tests/privateClickMeasurement/store-private-click-measurement-with-source-nonce.html:

Modifies the test to mock the whole round trip.

3:01 PM Changeset in webkit [273208] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WTF

PCM: Turn the fraud prevention on by default
https://bugs.webkit.org/show_bug.cgi?id=222224
<rdar://problem/73588234>

Reviewed by John Wilander.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
2:43 PM Changeset in webkit [273207] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WTF

Make PaintTimingEnabled default to false
https://bugs.webkit.org/show_bug.cgi?id=222186

Reviewed by Simon Fraser.

PaintTiming causes about 4% regression in the MotionMark sub-tests:
Multiply and Focus. Do disable it for now.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
2:40 PM Changeset in webkit [273206] by commit-queue@webkit.org
  • 6 edits in trunk

"min-content" & "max-content" keywords should behave as initial value in block axis (but WebKit improperly treats them as the content-size)
https://bugs.webkit.org/show_bug.cgi?id=191390

Patch by Rob Buis <rbuis@igalia.com> on 2021-02-20
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update improved test expectation.

  • web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/min-inline-size-expected.txt:

Source/WebCore:

"min-content" & "max-content" should use automatic size in block direction [1].

This behavior matches Gecko and Blink.

[1] https://drafts.csswg.org/css-sizing-3/#valdef-width-min-content

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::constrainLogicalHeightByMinMax const):

LayoutTests:

Adapt test to new behavior.

  • fast/css-intrinsic-dimensions/height-expected.html: Removed.
  • fast/css-intrinsic-dimensions/height.html: Removed.
2:22 PM Changeset in webkit [273205] by Lauro Moura
  • 3 edits in trunk/Source/WebCore

Unreviewed. GLib buildfix after r273203

  • bindings/js/WorkerModuleScriptLoader.h:
  • bindings/js/WorkerScriptFetcher.h:
12:33 PM Changeset in webkit [273204] by Peng Liu
  • 42 edits
    4 copies
    14 adds in trunk

WebGL GPU process IPC should use shared memory for asynchronous messages
https://bugs.webkit.org/show_bug.cgi?id=219641
<rdar://problem/72340651>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-02-20
Reviewed by Geoff Garen.

Source/WebKit:

Implement a concept of a message buffer. This is a similar concept as
"command buffer" or "display list" in some graphics APIs. Messages
can be added to the buffer by a client and then played back by a
server.

Current implementation adds a specific pseudo-infinite,
semi-duplex message buffer type IPC::StreamConnectionBuffer. This
is a buffer that can be attached to stream connection, an object
that can deliver IPC messages either through the message buffer
or through normal IPC::Connection. The stream connection is
implemented as IPC::StreamClientConnection and IPC::StreamServerConnection.
The connection has server and client distinction, similar to
IPC::Connection. Unlike IPC::Connection, a stream connection is asymmetric
in features: the client can send messages and receive replies, where
as the server can receive messages and send replies.

Messages received through IPC::StreamServerConnection can be
processed by StreamConnectionWorkQueue.

Currently asynchronous messages are added to the stream. Synchronous messages
and their replies are dispatched through normal IPC.

WebGL is implemented by having one StreamConnectionWorkQueue for all WebGL
in the browser. Currently each web process WebGL context in has one
StreamClientConnection attached to one 2mb StreamConnectionBuffer.

Later on, there will be only one WebGL stream connection and connection
buffer shared between all contexts in particular thread in Web process.
The implementation is "optimized" for the later on case. Due to single-
process nature of each page, it does not make much sense to have buffer
per context. However, it is anticipated that many of the successive calls
are to same context. The SHM message format implements an optimization
where the destination id is maintained as part of the stream connection
state.

In GPU process side, all WebGL is processed in one task queue,
"RemoteGraphicsContextGL task queue". It will process up to 1000 commands
per connection per iteration.

Implemented as follows:
Sender shares the shared memory area with the destination when creating
the destination.

If the message fits to the stream shared memory area, write it there.
Otherwise send it via normal IPC as out of line message.

Messages to the destination arrive as before, in order. For each out of line
message, an entry is pushed to the stream. Receiver will stop processing the
stream and processing will continue once the out-of-line
message has been processed.

Sender can write messages to the stream simultaneous to the receiver reading
the messages. This is implemented as a ring buffer with atomic sender and receiver
pointers.

Stream connection processing is implemented as a shared semaphore. This semaphore
is notified if the receiver is waiting on it.

Performance impact (iMac Pro):

  • MotionMark triangles: 300 points -> 4000 points (~7000 points no-GPUP)
  • WebGL samples Aquarium: 1000 fish ~60fps -> 5000 fish ~60fps (~5000 fish with no-GPUP)

No new tests, tested by existing tests.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::createGraphicsContextGL):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/GPUConnectionToWebProcess.messages.in:
  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::remoteGraphicsContextGLStreamWorkQueue):
(WebKit::RemoteGraphicsContextGL::create):
(WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL):
(WebKit::RemoteGraphicsContextGL::~RemoteGraphicsContextGL):
(WebKit::RemoteGraphicsContextGL::initialize):
(WebKit::RemoteGraphicsContextGL::connectWebProcessConnection):
(WebKit::RemoteGraphicsContextGL::disconnectWebProcessConnection):
(WebKit::RemoteGraphicsContextGL::workQueueInitialize):
(WebKit::RemoteGraphicsContextGL::workQueueUninitialize):
Initialize the OpenGL context in the work queue, since OpenGL
has various limitations wrt thread mobility.

(WebKit::RemoteGraphicsContextGL::forceContextLost):
(WebKit::RemoteGraphicsContextGL::dispatchContextChangedNotification):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:

(WebKit::RemoteGraphicsContextGL::platformWorkQueueInitialize):
(WebKit::RemoteGraphicsContextGL::send const):

  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:

(WebKit::RemoteGraphicsContextGL::create):
(WebKit::RemoteGraphicsContextGLCocoa::RemoteGraphicsContextGLCocoa):
(WebKit::RemoteGraphicsContextGLCocoa::platformWorkQueueInitialize):

  • NetworkProcess/webrtc/NetworkRTCProvider.h:
  • Platform/IPC/ArgumentCoder.h:
  • Platform/IPC/ArgumentCoders.cpp:
  • Platform/IPC/ArgumentCoders.h:

Make it possible to use multiple different Encoder classes to encode
the IPC data.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::processIncomingMessage):
(IPC::Connection::dispatchDidReceiveInvalidMessage):

  • Platform/IPC/Connection.h:

Add possibility for the stream decoding logic to send the didReceiveInvalidMessage
notification to the connection client.

  • Platform/IPC/Decoder.cpp:

(IPC::Decoder::Decoder):
(IPC::m_bufferDeallocator):
(IPC::m_destinationID):

  • Platform/IPC/Decoder.h:

Add a constructor for Decoder for constructing a decoder in place in
the stream buffer.

  • Platform/IPC/HandleMessage.h:

(IPC::handleMessageSynchronous):
Adds a stream-specific handleMessageSynchronous.
The old ones are unneccessarily complex, as they need redundant calls through redundant
generated send functions.
The old ones need the reply encoder passed in, which is redundant and problematic
for the upcoming case where the stream messaging will mainly reply through the stream itself,
constructing the IPC::StreamConnectionEncoder instead of normal IPC::Encoder.

  • Platform/IPC/StreamClientConnection.cpp: Copied from Source/WebKit/Platform/IPC/cocoa/MachPort.h.

(IPC::StreamClientConnection::StreamClientConnection):
(IPC::StreamClientConnection::setWakeUpSemaphore):
Add function to set the connection receive side wakeup semaphore.
Currently the semaphore is the semaphore that StreamConnectionWorkQueue
waits on. All streams processed by the same work queue will receive the same
semaphore and will notify it when they have written new data.

(IPC::StreamClientConnection::wakeUpReceiver):

  • Platform/IPC/StreamClientConnection.h: Added.

(IPC::StreamClientConnection::send):
(IPC::StreamClientConnection::sendSync):
(IPC::StreamClientConnection::trySendDestinationIDIfNeeded):
(IPC::StreamClientConnection::sendProcessOutOfStreamMessage):
(IPC::StreamClientConnection::tryAcquire):
(IPC::StreamClientConnection::release):
(IPC::StreamClientConnection::alignedSpan):
(IPC::StreamClientConnection::size):
(IPC::StreamClientConnection::clampedLimit const):
Add the implementation for sending data through the shared memory.

  • Platform/IPC/StreamConnectionBuffer.cpp: Added.

(IPC::createMemory):
(IPC::StreamConnectionBuffer::StreamConnectionBuffer):
(IPC::StreamConnectionBuffer::operator=):
(IPC::StreamConnectionBuffer::encode const):
(IPC::StreamConnectionBuffer::decode):

  • Platform/IPC/StreamConnectionBuffer.h: Added.

(IPC::StreamConnectionBuffer::wrapOffset const):
(IPC::StreamConnectionBuffer::alignOffset const):
(IPC::StreamConnectionBuffer::senderOffset):
(IPC::StreamConnectionBuffer::receiverOffset):
(IPC::StreamConnectionBuffer::data const):
(IPC::StreamConnectionBuffer::dataSize const):
(IPC::StreamConnectionBuffer::senderWaitSemaphore):
(IPC::StreamConnectionBuffer::header const):
(IPC::StreamConnectionBuffer::headerSize):
Add the common implementation for the shared memory ring buffer.
This is the common implementation used by both the sender side
as well as the receiver side.
Due to the selection of how the size is marked up, the
common implementation does not contain all the non-trivial code.
The "algorithm" uses a "hole indicator" to differentiate between
cases of "buffer is empty" and "buffer is full". The other
alternative could be better and maybe explored later.

  • Platform/IPC/StreamConnectionEncoder.h: Added.
  • Platform/IPC/StreamConnectionWorkQueue.cpp: Added.

(IPC::StreamConnectionWorkQueue::StreamConnectionWorkQueue):
(IPC::StreamConnectionWorkQueue::dispatch):
(IPC::StreamConnectionWorkQueue::addStreamConnection):
(IPC::StreamConnectionWorkQueue::removeStreamConnection):
(IPC::StreamConnectionWorkQueue::stop):
(IPC::StreamConnectionWorkQueue::wakeUp):
(IPC::StreamConnectionWorkQueue::wakeUpSemaphore):
(IPC::StreamConnectionWorkQueue::wakeUpProcessingThread):
(IPC::StreamConnectionWorkQueue::processStreams):
Work queue contains multiple StreamServerConnection instances.
For each iteration of the work queue thread, it will process
1000 items from each connection. If none of the connections contain
work, the queue will sleep on the work queue semaphore.
The senders will send through StreamClientConnection which
will wake up the work queue by signaling the semaphore.

  • Platform/IPC/StreamConnectionWorkQueue.h: Copied from Source/WebKit/Platform/IPC/cocoa/MachPort.h.
  • Platform/IPC/StreamServerConnection.cpp: Added.

(IPC::StreamServerConnectionBase::StreamServerConnectionBase):
(IPC::StreamServerConnectionBase::startReceivingMessagesImpl):
(IPC::StreamServerConnectionBase::stopReceivingMessagesImpl):
(IPC::StreamServerConnectionBase::enqueueMessage):
(IPC::StreamServerConnectionBase::tryAquire):
(IPC::StreamServerConnectionBase::release):
(IPC::StreamServerConnectionBase::alignedSpan):
(IPC::StreamServerConnectionBase::size):
(IPC::StreamServerConnectionBase::clampedLimit const):

  • Platform/IPC/StreamServerConnection.h: Added.

(IPC::StreamServerConnectionBase::connection):
(IPC::StreamServerConnectionBase::wrapOffset const):
(IPC::StreamServerConnectionBase::alignOffset const):
(IPC::StreamServerConnectionBase::sharedSenderOffset):
(IPC::StreamServerConnectionBase::sharedReceiverOffset):
(IPC::StreamServerConnectionBase::data const):
(IPC::StreamServerConnectionBase::dataSize const):
(IPC::StreamServerConnectionBase::sendSyncReply):
(IPC::StreamServerConnection<Receiver>::startReceivingMessages):
(IPC::StreamServerConnection<Receiver>::stopReceivingMessages):
(IPC::StreamServerConnection<Receiver>::dispatchStreamMessages):
(IPC::StreamServerConnection<Receiver>::processSetStreamDestinationID):
(IPC::StreamServerConnection<Receiver>::dispatchStreamMessage):
(IPC::StreamServerConnection<Receiver>::dispatchOutOfStreamMessage):
StreamServerConnection will process the message buffer and dispatch
messages based on the buffer contents. The class is a template so
that the message data decode switch (generated by the normal IPC
generator) is perhaps inlined to the message unpack loop.

  • Platform/IPC/cocoa/MachPort.h:
  • Scripts/webkit/messages.py:
  • Scripts/webkit/messages_unittest.py:

Implements a 'Stream' attribute for the message receiver. When marked as
'Stream', the receiver message handler is didReceiveStreamMessage and it
will be called for all messages, stream or normal IPC, sync or async.

  • Scripts/webkit/model.py:

Adds IPC control message ProcessOutOfStreamMessage that is acted on if
it is part of the stream messages. It means that the stream processing
should stop until one normal IPC message, sync or non-synch, should be
processed.

Adds IPC control message SetStreamDestinationID that is acted on if it
is part of the stream messages. It will set the destination ID for all
the subsequent stream messages, until another SetStreamDestinationID
message is seen.

  • Scripts/webkit/tests/Makefile:
  • Scripts/webkit/tests/MessageNames.cpp:

(IPC::description):
(IPC::receiverName):
(IPC::isValidMessageName):

  • Scripts/webkit/tests/MessageNames.h:
  • Scripts/webkit/tests/TestWithStream.messages.in: Copied from Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in.
  • Scripts/webkit/tests/TestWithStreamBuffer.messages.in: Copied from Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in.
  • Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp: Added.

(WebKit::TestWithStreamBuffer::didReceiveMessage):

  • Scripts/webkit/tests/TestWithStreamBufferMessages.h: Added.

(Messages::TestWithStreamBuffer::messageReceiverName):
(Messages::TestWithStreamBuffer::SendStreamBuffer::name):
(Messages::TestWithStreamBuffer::SendStreamBuffer::SendStreamBuffer):
(Messages::TestWithStreamBuffer::SendStreamBuffer::arguments const):

  • Scripts/webkit/tests/TestWithStreamBufferMessagesReplies.h: Added.
  • Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp: Added.

(WebKit::TestWithStream::didReceiveStreamMessage):

  • Scripts/webkit/tests/TestWithStreamMessages.h: Added.

(Messages::TestWithStream::messageReceiverName):
(Messages::TestWithStream::SendString::name):
(Messages::TestWithStream::SendString::SendString):
(Messages::TestWithStream::SendString::arguments const):
(Messages::TestWithStream::SendStringSynchronized::name):
(Messages::TestWithStream::SendStringSynchronized::SendStringSynchronized):
(Messages::TestWithStream::SendStringSynchronized::arguments const):

  • Scripts/webkit/tests/TestWithStreamMessagesReplies.h: Added.
  • Sources.txt:
  • UIProcess/Downloads/DownloadProxy.h:
  • UIProcess/ProvisionalPageProxy.cpp:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::RemoteGraphicsContextGLProxy):
(WebKit::RemoteGraphicsContextGLProxy::wasCreated):
Send the work queue wakeup semaphore as a result of the context creation.

  • Platform/IPC/ScopedActiveMessageReceiveQueue.h: Added.

(IPC::ScopedActiveMessageReceiveQueue::ScopedActiveMessageReceiveQueue):
(IPC::ScopedActiveMessageReceiveQueue::operator=):
(IPC::ScopedActiveMessageReceiveQueue::~ScopedActiveMessageReceiveQueue):
(IPC::ScopedActiveMessageReceiveQueue::reset):
(IPC::ScopedActiveMessageReceiveQueue::get const):
(IPC::ScopedActiveMessageReceiveQueue::stopListeningForIPCAndRelease):
Add a holder to replace previous RemoteRenderingBackendWrapper.
Now other classes can be held similarly.

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in:
  • WebProcess/Network/webrtc/LibWebRTCNetwork.h:

Tools:

Mark RemoteGraphicsContextGL message receiver as "Stream",
a new variant of receiver.

  • Scripts/generate-gpup-webgl:

LayoutTests:

Mark few tests as not timing out now that the implementation is not so slow.

  • gpu-process/TestExpectations:
12:28 PM Changeset in webkit [273203] by ysuzuki@apple.com
  • 108 edits
    2 copies
    1 move
    2 adds in trunk

JS Modules in Workers
https://bugs.webkit.org/show_bug.cgi?id=164860

Reviewed by Saam Barati.

LayoutTests/imported/w3c:

Some of worklet failures in WPT is because,

  1. Previously, worklet does not support module. These tests are passing incorrectly when modules are not supported. Now, modules are supported, and some edge features are missing, so start failing
  2. WPT is using www1.localhost in some tests (CSP tests), and this is not supported in WebKit's WPT testing. So failing incorrectly.
  • web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.tentative.any.worker-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-workerglobalscope-onerror-module-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker-importScripts-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker.sub-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-1-nothrow-worker-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-1-worker-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-2-import-worker-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-3-dynamic-worker-expected.txt:
  • web-platform-tests/service-workers/service-worker/import-module-scripts.https-expected.txt:
  • web-platform-tests/workers/baseurl/alpha/import-in-moduleworker-expected.txt:
  • web-platform-tests/workers/baseurl/alpha/importScripts-in-worker-expected.txt:
  • web-platform-tests/workers/baseurl/alpha/xhr-in-moduleworker-expected.txt:
  • web-platform-tests/workers/baseurl/alpha/xhr-in-worker-expected.txt:
  • web-platform-tests/workers/constructors/Worker/same-origin-expected.txt:
  • web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-expected.txt:
  • web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-module-expected.txt:
  • web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any-expected.txt:
  • web-platform-tests/workers/modules/dedicated-worker-import-csp-expected.txt:
  • web-platform-tests/workers/modules/dedicated-worker-import-failure-expected.txt:
  • web-platform-tests/workers/modules/dedicated-worker-import-meta-expected.txt:
  • web-platform-tests/workers/modules/dedicated-worker-import-meta.html:
  • web-platform-tests/workers/modules/dedicated-worker-import-referrer-expected.txt:
  • web-platform-tests/workers/modules/dedicated-worker-import.any-expected.txt:
  • web-platform-tests/workers/modules/dedicated-worker-options-type-expected.txt:
  • web-platform-tests/workers/modules/dedicated-worker-parse-error-failure-expected.txt:
  • web-platform-tests/workers/name-property-expected.txt:
  • web-platform-tests/worklets/audio-worklet-credentials.https-expected.txt:
  • web-platform-tests/worklets/audio-worklet-csp.https-expected.txt:
  • web-platform-tests/worklets/audio-worklet-import.https-expected.txt:
  • web-platform-tests/worklets/audio-worklet-referrer.https-expected.txt:
  • web-platform-tests/xhr/open-url-redirected-worker-origin-expected.txt:

Source/JavaScriptCore:

Add error information to extract this in WebCore's module loader.
Currently, we are using Promise pipeline, and this makes it a bit difficult to extract error information.
This error information attached in this patch allows us to extract SyntaxError in WebCore, and throwing
JS SyntaxError instead of AbortError.

We are planning to update our module pipieline not using Promises in the future. The current design derived
from the original module loader pipeline where using Promises is critical. But now, that proposal was abandoned,
so we can just simplify the module loader.

  • runtime/AggregateError.cpp:

(JSC::AggregateError::AggregateError):

  • runtime/Error.cpp:

(JSC::createError):
(JSC::createEvalError):
(JSC::createRangeError):
(JSC::createReferenceError):
(JSC::createSyntaxError):
(JSC::createTypeError):
(JSC::createURIError):
(JSC::createGetterTypeError):
(JSC::throwSyntaxError):

  • runtime/Error.h:
  • runtime/ErrorConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::ErrorInstance):
(JSC::ErrorInstance::create):
(JSC::ErrorInstance::sanitizedMessageString):
(JSC::ErrorInstance::sanitizedNameString):
(JSC::ErrorInstance::sanitizedToString):

  • runtime/ErrorInstance.h:

(JSC::ErrorInstance::create):
(JSC::ErrorInstance::errorType const):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/NativeErrorConstructor.cpp:

(JSC::NativeErrorConstructor<errorType>::constructImpl):
(JSC::NativeErrorConstructor<errorType>::callImpl):

  • runtime/NullSetterFunction.cpp:

(JSC::NullSetterFunctionInternal::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/JSWebAssemblyCompileError.cpp:

(JSC::JSWebAssemblyCompileError::JSWebAssemblyCompileError):

  • wasm/js/JSWebAssemblyLinkError.cpp:

(JSC::JSWebAssemblyLinkError::JSWebAssemblyLinkError):

  • wasm/js/JSWebAssemblyRuntimeError.cpp:

(JSC::JSWebAssemblyRuntimeError::JSWebAssemblyRuntimeError):

  • wasm/js/WebAssemblyCompileErrorConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyLinkErrorConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

Source/WebCore:

This patch implements JS modules in Workers and Worklets. We are not supporting modules in ServiceWorkers' initialization yet.
But service-worker can import modules via JS import().

The worker can be executed as a module if we pass, type: "module" to worker options. Worklet is executed as modules by default.

  1. In Worker, we first fetch the initial code. And then, analyze the dependencies and load subsequent modules. We iterate run-loop to load all the dependent modules in the module loader. At that time, we annotate run-loop tasks with special taskMode to iterate tasks with this taskMode. This prevents us from discarding different tasks in this run-loop driving phase. (e.g. postMessage can be called from the main thread while loading module graph, in that case, we should not discard this task.)
  1. In Worklet, we just request module loading to ScriptModuleLoader, and run it after loading module graph. This is OK since worklet thread is already running. So we can just request modules and worklet thread automatically drives module loading via run-loop.
  • Headers.cmake:
  • Modules/webaudio/AudioWorkletGlobalScope.h:

(WebCore::AudioWorkletGlobalScope::currentFrame const): Deleted.
(WebCore::AudioWorkletGlobalScope::sampleRate const): Deleted.
(WebCore::AudioWorkletGlobalScope::currentTime const): Deleted.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/CachedModuleScriptLoader.cpp:

(WebCore::CachedModuleScriptLoader::create):
(WebCore::CachedModuleScriptLoader::CachedModuleScriptLoader):
(WebCore::CachedModuleScriptLoader::load):
(WebCore::CachedModuleScriptLoader::notifyFinished):

  • bindings/js/CachedModuleScriptLoader.h:
  • bindings/js/CachedScriptFetcher.cpp:
  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::retrieveErrorMessageWithoutName):
(WebCore::createDOMException):

  • bindings/js/JSDOMExceptionHandling.h:
  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::scriptModuleLoader):
(WebCore::JSDOMGlobalObject::moduleLoaderResolve):
(WebCore::JSDOMGlobalObject::moduleLoaderFetch):
(WebCore::JSDOMGlobalObject::moduleLoaderEvaluate):
(WebCore::JSDOMGlobalObject::moduleLoaderImportModule):
(WebCore::JSDOMGlobalObject::moduleLoaderCreateImportMetaProperties):

  • bindings/js/JSDOMGlobalObject.h:
  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::moduleLoaderResolve): Deleted.
(WebCore::JSDOMWindowBase::moduleLoaderFetch): Deleted.
(WebCore::JSDOMWindowBase::moduleLoaderEvaluate): Deleted.
(WebCore::JSDOMWindowBase::moduleLoaderImportModule): Deleted.
(WebCore::JSDOMWindowBase::moduleLoaderCreateImportMetaProperties): Deleted.

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:
  • bindings/js/JSWorkletGlobalScopeBase.cpp:
  • bindings/js/ModuleScriptLoader.h: Copied from Source/WebCore/dom/ModuleFetchParameters.h.

(WebCore::ModuleScriptLoader::clearClient):
(WebCore::ModuleScriptLoader::scriptFetcher):
(WebCore::ModuleScriptLoader::parameters):
(WebCore::ModuleScriptLoader::ModuleScriptLoader):

  • bindings/js/ModuleScriptLoaderClient.h: Renamed from Source/WebCore/bindings/js/CachedModuleScriptLoaderClient.h.
  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::ScriptModuleLoader::ScriptModuleLoader):
(WebCore::resolveModuleSpecifier):
(WebCore::ScriptModuleLoader::resolve):
(WebCore::ScriptModuleLoader::fetch):
(WebCore::ScriptModuleLoader::moduleURL):
(WebCore::ScriptModuleLoader::responseURLFromRequestURL):
(WebCore::ScriptModuleLoader::evaluate):
(WebCore::ScriptModuleLoader::importModule):
(WebCore::ScriptModuleLoader::notifyFinished):

  • bindings/js/ScriptModuleLoader.h:
  • bindings/js/ScriptSourceCode.h:

(WebCore::ScriptSourceCode::ScriptSourceCode):

  • bindings/js/WorkerModuleScriptLoader.cpp: Added.

(WebCore::WorkerModuleScriptLoader::create):
(WebCore::WorkerModuleScriptLoader::WorkerModuleScriptLoader):
(WebCore::WorkerModuleScriptLoader::~WorkerModuleScriptLoader):
(WebCore::WorkerModuleScriptLoader::load):
(WebCore::WorkerModuleScriptLoader::referrerPolicy):
(WebCore::WorkerModuleScriptLoader::notifyFinished):
(WebCore::WorkerModuleScriptLoader::taskMode):

  • bindings/js/WorkerModuleScriptLoader.h: Copied from Source/WebCore/dom/ModuleFetchParameters.h.
  • bindings/js/WorkerScriptFetcher.h: Added.
  • dom/Document.cpp:
  • dom/ExceptionCode.h:
  • dom/LoadableModuleScript.cpp:

(WebCore::LoadableModuleScript::LoadableModuleScript):
(WebCore::LoadableModuleScript::load): Deleted.

  • dom/LoadableModuleScript.h:
  • dom/ModuleFetchParameters.h:

(WebCore::ModuleFetchParameters::create):
(WebCore::ModuleFetchParameters::isTopLevelModule const):
(WebCore::ModuleFetchParameters::ModuleFetchParameters):

  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::requestModuleScript):

  • loader/ThreadableLoader.cpp:

(WebCore::ThreadableLoader::create):

  • loader/ThreadableLoader.h:

(WebCore::ThreadableLoader::create):

  • workers/DedicatedWorkerGlobalScope.h:
  • workers/Worker.cpp:

(WebCore::Worker::Worker):
(WebCore::Worker::create):
(WebCore::Worker::notifyFinished):

  • workers/Worker.h:
  • workers/Worker.idl:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::WorkerGlobalScope):
(WebCore::WorkerGlobalScope::importScripts):

  • workers/WorkerGlobalScope.h:

(WebCore::WorkerGlobalScope::credentials const):

  • workers/WorkerGlobalScopeProxy.h:
  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):

  • workers/WorkerMessagingProxy.h:
  • workers/WorkerOrWorkletGlobalScope.cpp:

(WebCore::WorkerOrWorkletGlobalScope::WorkerOrWorkletGlobalScope):

  • workers/WorkerOrWorkletGlobalScope.h:

(WebCore::WorkerOrWorkletGlobalScope::moduleLoader):

  • workers/WorkerOrWorkletScriptController.cpp:

(WebCore::jsValueToModuleKey):
(WebCore::WorkerOrWorkletScriptController::evaluateModule):
(WebCore::WorkerOrWorkletScriptController::loadModuleSynchronously):
(WebCore::WorkerOrWorkletScriptController::linkAndEvaluateModule):
(WebCore::WorkerOrWorkletScriptController::loadAndEvaluateModule):

  • workers/WorkerOrWorkletScriptController.h:
  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::loadAsynchronously):
(WebCore::WorkerScriptLoader::didReceiveResponse):

  • workers/WorkerScriptLoader.h:

(WebCore::WorkerScriptLoader::responseSource const):
(WebCore::WorkerScriptLoader::isRedirected const):

  • workers/WorkerThread.cpp:

(WebCore::WorkerParameters::isolatedCopy const):
(WebCore::WorkerThread::evaluateScriptIfNecessary):

  • workers/WorkerThread.h:
  • workers/WorkerType.h:
  • workers/service/ServiceWorkerContainer.h:
  • workers/service/ServiceWorkerGlobalScope.h:
  • workers/service/ServiceWorkerJob.cpp:

(WebCore::ServiceWorkerJob::fetchScriptWithContext):

  • workers/service/ServiceWorkerRegistrationOptions.h:
  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::ServiceWorkerThread::ServiceWorkerThread):

  • workers/service/server/SWServerWorker.h:
  • worklets/PaintWorkletGlobalScope.h:

(WebCore::PaintWorkletGlobalScope::paintDefinitionMap): Deleted.
(WebCore::PaintWorkletGlobalScope::paintDefinitionLock): Deleted.
(WebCore::PaintWorkletGlobalScope::~PaintWorkletGlobalScope): Deleted.

  • worklets/WorkletGlobalScope.cpp:

(WebCore::WorkletGlobalScope::fetchAndInvokeScript):
(WebCore::WorkletGlobalScope::processNextScriptFetchJobIfNeeded): Deleted.
(WebCore::WorkletGlobalScope::didReceiveResponse): Deleted.
(WebCore::WorkletGlobalScope::notifyFinished): Deleted.
(WebCore::WorkletGlobalScope::didCompleteScriptFetchJob): Deleted.

  • worklets/WorkletGlobalScope.h:

LayoutTests:

  • TestExpectations:
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt:
  • http/tests/subresource-integrity/sri-module-expected.txt:
  • webaudio/audioworklet-addModule-failure-expected.txt:
  • webaudio/worklet-crash-expected.txt:
10:17 AM Changeset in webkit [273202] by Wenson Hsieh
  • 5 edits in trunk

Unreviewed, reverting r273115.

Breaks autocorrect without the accompanying change in
rdar://problem/74211293

Reverted changeset:

"Unconditionally return information in _autofillContext SPI
when a field is focused"
https://bugs.webkit.org/show_bug.cgi?id=221828
https://commits.webkit.org/r273115

10:13 AM Changeset in webkit [273201] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix regression from r273194 that was spotted by Darin Adler after landing.

  • Platform/cocoa/WKPaymentAuthorizationDelegate.mm:

(-[WKPaymentAuthorizationDelegate completePaymentMethodSelection:]):
(-[WKPaymentAuthorizationDelegate completeShippingContactSelection:]):
(-[WKPaymentAuthorizationDelegate completeShippingMethodSelection:]):

10:11 AM Changeset in webkit [273200] by dino@apple.com
  • 19 edits
    4 adds in trunk/Source/ThirdParty/ANGLE

Fix a number of functional regressions caused by enabling the Metal ANGLE backend by default.
https://bugs.webkit.org/show_bug.cgi?id=220895
<rdar://problem/73539537>

Patch by Kyle Piddington <Kyle Piddington> on 2021-02-19
Reviewed by Kenneth Russell.

Take two of this patch - this time with the new files FixTypeConstructors and NameEmbeddedUniformStructsMetal

Fixed webgl/1.0.3/conformance/context/context-hidden-alpha.html

MTL Translator direct fixes for webgl/1.0.3/conformance/glsl/constructors/glsl-construct-*vec2 tests, Plus fix for GL_VertexIndex

Fix EmitMetal crash for missing function textureRect.

Additional fixes for 73675990, shaders-with-invariance.html, shaders-with-uniform-structs.html, struct-specifiers-in-uniforms.html, framebuffer-object-attachment.html

Fixed clamping of array elements.

  • ANGLE.xcodeproj/project.pbxproj:
  • src/compiler/translator/TranslatorMetalDirect.cpp:

(sh::TranslatorMetalDirect::translateImpl):

  • src/compiler/translator/TranslatorMetalDirect/EmitMetal.cpp:

(GenMetalTraverser::emitPostQualifier):
(GenMetalTraverser::visitBinary):
(GenMetalTraverser::BuildFuncToName):

  • src/compiler/translator/TranslatorMetalDirect/FixTypeConstructors.cpp: Added.

(sh::FixTypeTraverser::FixTypeTraverser):
(sh::FixTypeConstructors):

  • src/compiler/translator/TranslatorMetalDirect/FixTypeConstructors.h: Added.
  • src/compiler/translator/TranslatorMetalDirect/NameEmbeddedUniformStructsMetal.cpp: Added.

(sh::NameEmbeddedStructUniformsMetal):

  • src/compiler/translator/TranslatorMetalDirect/NameEmbeddedUniformStructsMetal.h: Added.
  • src/compiler/translator/TranslatorMetalDirect/Pipeline.cpp:

(SaturateVectorOf):

  • src/compiler/translator/TranslatorMetalDirect/ProgramPrelude.cpp:

(sh::ProgramPrelude::ProgramPrelude):

  • src/compiler/translator/TranslatorMetalDirect/ReduceInterfaceBlocks.cpp:

(sh::Reducer::Reducer):
(sh::ReduceInterfaceBlocks):

  • src/compiler/translator/TranslatorMetalDirect/ReduceInterfaceBlocks.h:
  • src/compiler/translator/TranslatorMetalDirect/SeparateCompoundStructDeclarations.cpp:
  • src/libANGLE/renderer/load_functions_table_autogen.cpp:
  • src/libANGLE/renderer/metal/ContextMtl.mm:

(rx::ContextMtl::drawElementsImpl):

  • src/libANGLE/renderer/metal/IOSurfaceSurfaceMtl.h:
  • src/libANGLE/renderer/metal/IOSurfaceSurfaceMtl.mm:

(rx::IOSurfaceSurfaceMtl::IOSurfaceSurfaceMtl):
(rx::IOSurfaceSurfaceMtl::createBackingTexture):

  • src/libANGLE/renderer/metal/RenderBufferMtl.mm:

(rx::RenderbufferMtl::setStorageImpl):

  • src/libANGLE/renderer/metal/VertexArrayMtl.h:
  • src/libANGLE/renderer/metal/VertexArrayMtl.mm:

(rx::VertexArrayMtl::getIndexBuffer):
(rx::VertexArrayMtl::convertIndexBuffer):
(rx::VertexArrayMtl::streamIndexBufferFromClient):

  • src/libANGLE/renderer/metal/mtl_utils.mm:

(rx::mtl::InitializeDepthStencilTextureContentsGPU):

  • src/libANGLE/renderer/metal/shaders/blit.metal:
  • src/libANGLE/renderer/metal/shaders/mtl_default_shaders_src_autogen.inc:
9:00 AM Changeset in webkit [273199] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Revert r272384 [Python-3] Change shebang in git-webkit
https://bugs.webkit.org/show_bug.cgi?id=221412

Unreviewed infrastructure fix.

Revert to Python 2 for git-webkit command because of auto-install issues.

  • CISupport/ews-build/steps.py:
  • CISupport/ews-build/steps_unittest.py:
6:18 AM Changeset in webkit [273198] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][Integration] Enclosing top and bottom value are relative to the containing block's border box
https://bugs.webkit.org/show_bug.cgi?id=222220

Reviewed by Antti Koivisto.

This patch ensures that the enclosing top and bottom values are in the same coordinate space
as the line top and bottom values are.
See fast/scrolling/scroll-to-anchor-zoomed-header.html.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):

  • layout/inlineformatting/InlineLineGeometry.h:
  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::operator+):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):

2:39 AM Changeset in webkit [273197] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove unused isGoogle function
https://bugs.webkit.org/show_bug.cgi?id=222227

Patch by Rob Buis <rbuis@igalia.com> on 2021-02-20
Reviewed by Frédéric Wang.

Remove unused (after r273084) isGoogle function.

  • platform/UserAgentQuirks.cpp:

(WebCore::isGoogle): Deleted.

Note: See TracTimeline for information about the timeline view.