Timeline



Oct 18, 2021:

11:45 PM Changeset in webkit [284437] by graouts@webkit.org
  • 23 edits
    2 adds in trunk

box-shadow and text-shadow do not yield float values while interpolating
https://bugs.webkit.org/show_bug.cgi?id=230347
<rdar://problem/83319111>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Add some new WPT tests for float and calc() values for box-shadow and text-shadow while
interpolating and update output for still-failing composite operations tests. The new tests
have already landed in WPT with https://github.com/web-platform-tests/wpt/pull/30823.

  • web-platform-tests/css/css-backgrounds/animations/box-shadow-composition-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation.html:
  • web-platform-tests/css/css-backgrounds/box-shadow-calc-expected.html: Added.
  • web-platform-tests/css/css-backgrounds/box-shadow-calc.html: Added.
  • web-platform-tests/css/css-transitions/animations/text-shadow-composition-expected.txt:
  • web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt:
  • web-platform-tests/css/css-transitions/animations/text-shadow-interpolation.html:

Source/WebCore:

ShadowData members used integer values rather than floats and thus could not represent
float values while interpolating. We now use float values.

Test: imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow-calc.html

  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):
(WebCore::shadowForBlending):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForFilter):

  • display/css/DisplayBoxDecorationPainter.cpp:

(WebCore::Display::BoxDecorationPainter::paintBoxShadow const):

  • editing/Editor.cpp:

(WebCore::Editor::fontAttributesAtSelectionStart):

  • platform/LengthPoint.h:

(WebCore::LengthPoint::isZero const):

  • platform/mac/WebCoreNSFontManagerExtras.mm:

(WebCore::computedFontAttributeChanges):

  • rendering/LegacyEllipsisBox.cpp:

(WebCore::LegacyEllipsisBox::paint):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::applyBoxShadowForBackground):
(WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const):
(WebCore::RenderBoxModelObject::paintBoxShadow):

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::debugTextShadow const):

  • rendering/TextDecorationPainter.cpp:

(WebCore::TextDecorationPainter::paintTextDecoration):

  • rendering/TextPainter.cpp:

(WebCore::ShadowApplier::shadowIsCompletelyCoveredByText):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setTextShadow):
(WebCore::RenderStyle::shadowExtent):
(WebCore::RenderStyle::shadowInsetExtent):
(WebCore::RenderStyle::getShadowHorizontalExtent):
(WebCore::RenderStyle::getShadowVerticalExtent):

  • rendering/style/ShadowData.cpp:

(WebCore::ShadowData::ShadowData):
(WebCore::calculateShadowExtent):

  • rendering/style/ShadowData.h:

(WebCore::ShadowData::ShadowData):
(WebCore::ShadowData::x const):
(WebCore::ShadowData::y const):
(WebCore::ShadowData::location const):
(WebCore::ShadowData::radius const):
(WebCore::ShadowData::paintingExtent const):
(WebCore::ShadowData::spread const):

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyTextOrBoxShadowValue):

11:32 PM Changeset in webkit [284436] by Cameron McCormack
  • 6 edits
    4 adds in trunk

Make createImageBitmap() take EXIF orientation into account correctly
https://bugs.webkit.org/show_bug.cgi?id=231063
<rdar://problem/83753956>

Reviewed by Myles Maxfield and Said Abou-Hallawa.

LayoutTests/imported/w3c:

  • web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation.html: Added.
  • web-platform-tests/html/canvas/element/manual/imagebitmap/resources/squares.jpg: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation.html

This makes us treat {imageOrientation:"none"} as meaning "apply EXIF
orientation without any additional transformation", and
{imageOrientation:"flipY"} as meaning "apply EXIF orientation and then
apply an additional vertical flip". This behavior matches Firefox;
https://github.com/whatwg/html/issues/7210 is open on clarifying this
behavior in the HTML spec.

  • html/ImageBitmap.cpp:

(WebCore::ImageBitmap::createPromise):
(WebCore::ImageBitmap::createFromBuffer):
(WebCore::imageOrientationForOrientation): Deleted.

  • html/ImageBitmapOptions.h:

(WebCore::ImageBitmapOptions::resolvedImageOrientation const):

  • html/ImageBitmapOptions.idl:
  • platform/graphics/ImageOrientation.h:

(WebCore::ImageOrientation::withFlippedY const):

9:07 PM Changeset in webkit [284435] by commit-queue@webkit.org
  • 29 edits
    12 adds in trunk

JSTests:
Test coverage for JSC shadow realms implementation
https://bugs.webkit.org/show_bug.cgi?id=230602

Patch by Phillip Mates <Phillip Mates> on 2021-10-18
Reviewed by Yusuke Suzuki.

  • modules/import-meta-syntax.js:

(shouldThrow):

  • stress/eval-indirect.js: Added.

(shouldBe):
(shouldThrow):

  • stress/import-syntax.js:
  • stress/resources/shadow-realm-example-module.js: Added.

(putInGlobal):
(getFromGlobal):
(getAnObject):
(getCallCount):

  • stress/shadow-realm-evaluate.js: Added.

(shouldBe):
(shouldThrow):
(assertionFn):
(shouldBe.String):
(shouldBe.globalObjectFor.doEval):
(shouldBe.globalObjectFor):

  • stress/shadow-realm-import-value.js: Added.

(shouldBe):
(shouldThrow):
(async shouldThrowAsync):
(async const):
(doImport):

  • stress/shadow-realm.js: Added.

(shouldBe):
(throw.new.Error):

  • test262/config.yaml:

Source/JavaScriptCore:
shadow realms implementation
https://bugs.webkit.org/show_bug.cgi?id=230602

Patch by Phillip Mates <Phillip Mates> on 2021-10-18
Reviewed by Yusuke Suzuki.

Implementation of the Shadow Realms proposal (stage 3 in TC39) [1]

Main APIs added are

  • new ShadowRealm() creates an object that has its own global object and module graph.
  • ShadowRealm.prototype.evaluate(sourceText) this allows for evaluating code in the context of the realm, which has its own module graph and global object.
  • ShadowRealm.prototype.importValue(specifier, exportName) this allows importing module exports in the the context of the realm, which has its own module graph and global object.

The main detail of the Shadow Realm implementation is that values
passed between realms must be either primitives or wrapped callables.
Wrapped callables themselves are callables that check that their
arguments and return values are also either primitives or wrapped
callables. This detail is implemented via JS builtins + a few new
intrinsics.

Can be enabled using --useShadowRealm=true

[1]: https://github.com/tc39/proposal-shadowrealm

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • builtins/BuiltinNames.h:
  • builtins/ShadowRealmPrototype.js: Added.

(globalPrivate.wrap.wrapped):
(globalPrivate.wrap):
(evaluate):
(importValue):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecode/LinkTimeConstant.h:
  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitIsShadowRealm):

  • bytecompiler/NodesCodegen.cpp:
  • jsc.cpp:

(JSC_DEFINE_HOST_FUNCTION):

  • parser/Parser.cpp:

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

  • runtime/CommonIdentifiers.h:
  • runtime/IndirectEvalExecutable.cpp:

(JSC::IndirectEvalExecutable::createImpl):
(JSC::IndirectEvalExecutable::create):
(JSC::IndirectEvalExecutable::tryCreate):

  • runtime/IndirectEvalExecutable.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildrenImpl):
(JSC::JSGlobalObject::createWithCustomMethodTable):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::shadowRealmPrototype const):
(JSC::JSGlobalObject::shadowRealmStructure const):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/JSType.cpp:

(WTF::printInternal):

  • runtime/JSType.h:
  • runtime/OptionsList.h:
  • runtime/ShadowRealmConstructor.cpp: Added.

(JSC::ShadowRealmConstructor::ShadowRealmConstructor):
(JSC::ShadowRealmConstructor::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/ShadowRealmConstructor.h: Added.
  • runtime/ShadowRealmObject.cpp: Added.

(JSC::ShadowRealmObject::ShadowRealmObject):
(JSC::ShadowRealmObject::visitChildrenImpl):
(JSC::ShadowRealmObject::create):
(JSC::ShadowRealmObject::finishCreation):

  • runtime/ShadowRealmObject.h: Added.
  • runtime/ShadowRealmPrototype.cpp: Added.

(JSC::ShadowRealmPrototype::ShadowRealmPrototype):
(JSC::ShadowRealmPrototype::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/ShadowRealmPrototype.h: Added.
  • runtime/VM.cpp:
  • runtime/VM.h:
8:51 PM Changeset in webkit [284434] by Jean-Yves Avenard
  • 3 edits
    3 adds in trunk

WebM with invalid size should fail to load with error
https://bugs.webkit.org/show_bug.cgi?id=231886
rdar://77969801

Reviewed by Jer Noble.

Source/WebCore:

libwebm for some elements are using a std::string or a std::vector<uint8_t>
to store their content. Those have infallible memory allocators.
We limit the size we allow the parser to use to some reasonable values.

Test: media/media-webm-invalid-check.html

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::SourceBufferParserWebM::OnElementBegin):

LayoutTests:

  • media/content/invalid-size.webm: Added.
  • media/media-webm-invalid-check-expected.txt: Added.
  • media/media-webm-invalid-check.html: Added.
8:43 PM Changeset in webkit [284433] by Cameron McCormack
  • 3 edits in trunk/Source/ThirdParty/libwebrtc

Always set color space for incoming H.264/265 streams
https://bugs.webkit.org/show_bug.cgi?id=231881
<rdar://problem/84350707>

Reviewed by Youenn Fablet.

Followup from https://bugs.webkit.org/show_bug.cgi?id=231353. In some
configurations, the "ColorInfoGuessedBy" attachment is not set on the
CVPixelBuffers coming out of the VTDecompressionSession, but the
guessed, incorrect color space attachments are still there. Since we
currently always have an sRGB stream, don't bother looking for
"ColorInfoGuessedBy".

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH264.mm:

(overrideColorSpaceAttachments):
(decompressionOutputCallback):
(overrideColorSpaceAttachmentsIfNeeded): Deleted.

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.mm:

(overrideColorSpaceAttachments):
(h265DecompressionOutputCallback):
(overrideColorSpaceAttachmentsIfNeeded): Deleted.

8:36 PM Changeset in webkit [284432] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Adjust the logical right side of the line when box-decoration-break: clone is present
https://bugs.webkit.org/show_bug.cgi?id=231873

Reviewed by Antti Koivisto.

This patch adds support for "box-decoration-break: clone" cases when the inline box is either not line spanning or
it shows up first on the line.

  • layout/formattingContexts/inline/InlineLine.cpp:

(WebCore::Layout::Line::initialize):
(WebCore::Layout::Line::appendInlineBoxStart):
(WebCore::Layout::Line::appendInlineBoxEnd):
(WebCore::Layout::Line::appendTextContent):

  • layout/formattingContexts/inline/InlineLine.h:

(WebCore::Layout::Line::contentLogicalRight const):
(WebCore::Layout::Line::inlineBoxListWithClonedDecorationEnd const):
(WebCore::Layout::Line::lineSpanningInlineBoxRunEnds const): Deleted.

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::LineBoxBuilder::constructAndAlignInlineLevelBoxes):

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::handleInlineContent):

8:31 PM Changeset in webkit [284431] by sihui_liu@apple.com
  • 1 edit in branches/safari-612-branch/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml

Apply patch rdar://84349729

8:30 PM Changeset in webkit [284430] by sihui_liu@apple.com
  • 1 edit in branches/safari-612-branch/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml

Apply patch rdar://84349729

8:16 PM Changeset in webkit [284429] by commit-queue@webkit.org
  • 10 edits in trunk

Unreviewed, reverting r284413.
https://bugs.webkit.org/show_bug.cgi?id=231936

BrokeSafariBuildByAddingANewEnum

Reverted changeset:

"[WebAuthn] Obtain consent to create new credential when
platform authenticator in excludedCredentials"
https://bugs.webkit.org/show_bug.cgi?id=219813
https://commits.webkit.org/r284413

7:55 PM Changeset in webkit [284428] by commit-queue@webkit.org
  • 16 edits
    1 delete in trunk/Source

Unreviewed, reverting r284240.
https://bugs.webkit.org/show_bug.cgi?id=231931

NeedDifferentArchitectureToWorkWithWebpushd

Reverted changeset:

"WebKit Managed Notifications: Skeleton NotificationProvider."
https://bugs.webkit.org/show_bug.cgi?id=231786
https://commits.webkit.org/r284240

7:44 PM Changeset in webkit [284427] by Wenson Hsieh
  • 5 edits in trunk/Source/WebKit

GPU process occasionally crashes under StreamConnectionWorkQueue::processStreams() in layout tests
https://bugs.webkit.org/show_bug.cgi?id=231897

Reviewed by Simon Fraser.

Certain layout tests (e.g. in LayoutTests/compositing) currently cause the GPU process to crash on the remote
rendering backend thread ("RemoteRenderingBackend work queue") in StreamConnectionWorkQueue::processStreams().
This happens because the dispatch() call to delete cached resources underneath ~RemoteRenderingBackend()
may fire after the destructor is finished running (thereby destroying m_workQueue itself). This leaves the
stream work queue in a bad state and causes various crashes when the function is eventually dispatched.

Since StreamConnectionWorkQueue is already ThreadSafeRefCounted, it doesn't make sense to directly store
StreamConnectionWorkQueue as a member of RemoteRenderingBackend; to fix these crashes, we make m_workQueue on
RemoteRenderingBackend a strong Ref, and additionally make StreamConnectionWorkQueue::processStreams() protect
itself to avoid destroying the work queue in the middle of processing.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

Drive-by fix: remove an unnecessary header include.

(WebKit::RemoteRenderingBackend::RemoteRenderingBackend):
(WebKit::RemoteRenderingBackend::~RemoteRenderingBackend):

Ensure that the work queue is protected through the final dispatch call that deletes cached resources, and also
explicitly stop() the work queue when this is done to ensure that the thread permanently stops waiting for
additional work.

(WebKit::RemoteRenderingBackend::dispatch):

  • GPUProcess/graphics/RemoteRenderingBackend.h:

Replace the IPC::StreamConnectionWorkQueue member with a Ref instead, so that it isn't immediately destroyed
when the rendering backend is destroyed, and can instead be protected by strong references on the stack.

  • Platform/IPC/StreamConnectionWorkQueue.cpp:

(IPC::StreamConnectionWorkQueue::processStreams):

  • Platform/IPC/StreamConnectionWorkQueue.h:

Add a boilerplate StreamConnectionWorkQueue::create() function that returns a Ref.

7:18 PM Changeset in webkit [284426] by Russell Epstein
  • 3 edits
    1 add in branches/safari-612-branch

Cherry-pick r284348. rdar://problem/84398090

[JSC] PutByVal's child5 should be KnownInt32Use / Int52RepUse in FTL
https://bugs.webkit.org/show_bug.cgi?id=231884
rdar://84357099

Reviewed by Robin Morisset.

JSTests:

  • stress/put-by-val-known-int32.js: Added. (new.Uint8Array.1000000.map):

Source/JavaScriptCore:

The child5 of PutByVal should be KnownInt32Use or Int52RepUse.

  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284348 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6:55 PM Changeset in webkit [284425] by sihui_liu@apple.com
  • 14 edits
    5 adds in branches/safari-612-branch

Apply patch rdar://84349747

6:55 PM Changeset in webkit [284424] by sihui_liu@apple.com
  • 28 edits
    4 copies
    4 adds in branches/safari-612-branch

Apply patch rdar://84349752

6:54 PM Changeset in webkit [284423] by sihui_liu@apple.com
  • 65 edits
    2 copies
    8 adds in branches/safari-612-branch

Apply patch rdar://84349736

6:43 PM Changeset in webkit [284422] by ddkilzer@apple.com
  • 1 edit
    1 delete in trunk/Source/WebInspectorUI

Web Inspector: Remove Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js.orig
<https://webkit.org/b/231896>

Reviewed by BJ Burg.

  • UserInterface/Controllers/WebInspectorExtensionController.js.orig: Remove.
5:51 PM Changeset in webkit [284421] by eric.carlson@apple.com
  • 5 edits in trunk/Source/WebCore

[macOS] Refactor CGDisplayStreamCaptureSource::createDisplayStream
https://bugs.webkit.org/show_bug.cgi?id=231920
<rdar://problem/84393654>

Reviewed by Jer Noble.

No new tests, no functional change.

  • platform/mediastream/mac/CGDisplayStreamCaptureSource.cpp:

(WebCore::CGDisplayStreamCaptureSource::startDisplayStream): Don't pass the frame
available handler or capture queue to createDisplayStream.
(WebCore::CGDisplayStreamCaptureSource::frameAvailableHandler): Remove a blank line.
(WebCore::CGDisplayStreamCaptureSource::captureQueue): New accessor.

  • platform/mediastream/mac/CGDisplayStreamCaptureSource.h:
  • platform/mediastream/mac/CGDisplayStreamScreenCaptureSource.h:
  • platform/mediastream/mac/CGDisplayStreamScreenCaptureSource.mm:

(WebCore::CGDisplayStreamScreenCaptureSource::createDisplayStream): Parameters removed.

5:49 PM Changeset in webkit [284420] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

Remove "using namespace XPath;" from XPathGrammar.cpp
https://bugs.webkit.org/show_bug.cgi?id=231318

Reviewed by Chris Dumez.

I did this by editing XPathGrammar.y and re-running bison.
We have the output of bison checked in to our repo to not have bison as a build dependency of WebKit.

  • xml/XPathGrammar.cpp:

(xpathyylex):
(xpathyyerror):
(yysyntax_error):

  • xml/XPathGrammar.y:
  • xml/XPathResult.cpp:

(WebCore::XPathResult::XPathResult):

5:48 PM Changeset in webkit [284419] by Jonathan Bedard
  • 14 edits
    1 add
    4 deletes in trunk/Tools

Unreviewed, reverting r284399.

Breaks commit message generation

Reverted changeset:

"[webkitperl] Stop using LoadAsModule.pm"
https://bugs.webkit.org/show_bug.cgi?id=231868
https://commits.webkit.org/r284399

5:44 PM Changeset in webkit [284418] by achristensen@apple.com
  • 11 edits
    2 deletes in trunk

Remove TCPServer
https://bugs.webkit.org/show_bug.cgi?id=231912

Reviewed by Chris Dumez.

Source/WTF:

  • wtf/PlatformHave.h:

Tools:

It has been replaced by HTTPServer, which doesn't time out in its destructor when not everything is perfect,
and which does its logic on the main thread. It also doesn't use boringssl directly, so we can compile it on watchOS and tvOS.

  • TestWebKitAPI/Sources.txt:
  • TestWebKitAPI/TCPServer.cpp: Removed.
  • TestWebKitAPI/TCPServer.h: Removed.
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

(testCertificate):
(testIdentity):

  • TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm:

(TestWebKitAPI::hstsWebViewAndDelegate):
(TestWebKitAPI::hstsServer):
(TestWebKitAPI::TEST):
(TestWebKitAPI::hasRadar80550123): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerTCPServer.h:

(ServiceWorkerTCPServer::respondToRequests):

  • TestWebKitAPI/cocoa/HTTPServer.h:
  • TestWebKitAPI/cocoa/HTTPServer.mm:

(TestWebKitAPI::HTTPServer::testCertificate):
(TestWebKitAPI::HTTPServer::testPrivateKey):

5:35 PM Changeset in webkit [284417] by Jonathan Bedard
  • 2 edits in trunk/Tools

[Python-3] Invoke webkit-patch with Python 3 by default (Revert)
https://bugs.webkit.org/show_bug.cgi?id=231591
<rdar://problem/84153640>

Reverted to fix webkitbot.

  • Scripts/webkit-patch:
5:14 PM Changeset in webkit [284416] by Russell Epstein
  • 1 copy in tags/Safari-613.1.5.1

Tag Safari-613.1.5.1.

5:14 PM Changeset in webkit [284415] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Mac ] inspector/css/modify-css-property.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231924.

Unreviewed test gardening.

  • platform/mac/TestExpectations:
5:12 PM Changeset in webkit [284414] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

Regression(r283935 - r283938): [ macOS wk1 ] imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-multiple-times.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231918

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
5:07 PM Changeset in webkit [284413] by commit-queue@webkit.org
  • 9 edits in trunk

[WebAuthn] Obtain consent to create new credential when platform authenticator in excludedCredentials
https://bugs.webkit.org/show_bug.cgi?id=219813
<rdar://problem/72484635>

Currently, whenever the platform authenticator is within excludedCredentials during makeCredential we
always return NotAllowedError and merely flash a consent screen. This does not match the spec per Step 3.1
of makeCredential (https://w3c.github.io/webauthn/#sctn-op-make-cred). Instead, we should always obtain consent
and return a different error depending on consent was obtained.

Source/WebKit:

A fixme to add this was inadvertently removed in https://bugs.webkit.org/attachment.cgi?id=393180&action=prettypatch

Patch by John Pascoe <J Pascoe> on 2021-10-18
Reviewed by Brent Fulgham.

Added api test TestWebKitAPI.WebAuthenticationPanel.LADuplicateCredentialWithConsent

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:

(WebKit::LocalAuthenticator::makeCredential):

  • UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm:

(WebKit::wkWebAuthenticationPanelUpdate):

  • UIProcess/WebAuthentication/WebAuthenticationFlags.h:

Tools:

This adds a test to confirm a different path is taken whenever consent is obtained.

Patch by John Pascoe <J Pascoe> on 2021-10-18
Reviewed by Brent Fulgham.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(-[TestWebAuthenticationPanelDelegate panel:updateWebAuthenticationPanel:]):
(TestWebKitAPI::TEST):

5:06 PM Changeset in webkit [284412] by Russell Epstein
  • 3 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r284369. rdar://problem/84394405

[JSC] Use USE(LARGE_TYPED_ARRAY)
https://bugs.webkit.org/show_bug.cgi?id=231885

Reviewed by Sam Weinig.

Fix USE(ADDRESS64) with USE(LARGE_TYPED_ARRAY). USE(ADDRESS64) is not correct (it should be CPU(ADDRESS64)).
It is coverted by JSTests/stress/typed-array-large-eventually-oob.js.

  • dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile):
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284369 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:06 PM Changeset in webkit [284411] by Russell Epstein
  • 6 edits
    1 copy in branches/safari-612-branch/Source

Apply patch. rdar://problem/84351866

4:54 PM Changeset in webkit [284410] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Windows EWS ] http/wpt/webxr/xrHandInput_gc.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=231921.

Unreviewed test gardening.

  • platform/win/TestExpectations:
4:53 PM Changeset in webkit [284409] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[ iOS15 ] TestWebKitAPI.WebKit.HTTPSProxy is a flaky, but frequent, timeout
https://bugs.webkit.org/show_bug.cgi?id=231396

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-18
Reviewed by Chris Dumez.

Something was happening that was very timing dependent that was causing this test to time out.
I think it was because the proxy framer was receiving an incomplete HTTP request.
To fix this, I look at the bytes received and if it wasn't a complete HTTP request, wait for the rest of the message.
I was unable to reproduce the timeout after this change and only rarely reproduced the timeout without this change.

  • TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/HTTPServer.mm:

(TestWebKitAPI::proxyDefinition):

4:50 PM Changeset in webkit [284408] by Russell Epstein
  • 2 edits in branches/safari-613.1.5-branch/Source/WebKit

Cherry-pick r284209. rdar://problem/84218823

[macOS] Crash on WP startup
https://bugs.webkit.org/show_bug.cgi?id=231773
<rdar://84218823>

Unreviewed partial revert of https://trac.webkit.org/r283375.

  • WebProcess/com.apple.WebProcess.sb.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284209 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:41 PM Changeset in webkit [284407] by Russell Epstein
  • 8 edits in branches/safari-613.1.5-branch/Source

Versioning.

WebKit-7613.1.5.1

3:21 PM Changeset in webkit [284406] by Chris Dumez
  • 14 edits in trunk

Add a callback to know when the service worker loads via -[WKWebView _loadServiceWorker:]
https://bugs.webkit.org/show_bug.cgi?id=231771
<rdar://problem/84274364>

Reviewed by Alex Christensen.

Source/WebCore:

  • loader/FrameLoaderClient.h:
  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::willSettleRegistrationPromise):
(WebCore::ServiceWorkerContainer::jobFailedWithException):
(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
(WebCore::ServiceWorkerContainer::jobFailedLoadingScript):

  • workers/service/ServiceWorkerContainer.h:

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _loadServiceWorker:completionHandler:]):
(-[WKWebView _loadServiceWorker:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didFinishServiceWorkerPageRegistration):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::WebPageProxy::loadServiceWorker):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::didFinishServiceWorkerPageRegistration):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
3:21 PM Changeset in webkit [284405] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

[webkitperl] Fix webkitperl on Windows
https://bugs.webkit.org/show_bug.cgi?id=231374

Patch by Basuke Suzuki <basuke@mac.com> on 2021-10-18
Reviewed by Fujii Hironori.

Set WEBKIT_LIBRARIES environment variable before run if it is not defined.
Shell-style environment variables settings are not available on Windows. Replace them by setting
%ENV directly.

  • Scripts/test-webkitperl:
  • Scripts/webkitperl/auto-version_unittest/autoVersionTests.pl:
  • Scripts/webkitperl/auto-version_unittest/versionStampTests.pl:
3:20 PM Changeset in webkit [284404] by Chris Dumez
  • 39 edits
    3 adds
    1 delete in trunk/LayoutTests/imported/w3c

Resync web-platform-tests/tools from upstream
https://bugs.webkit.org/show_bug.cgi?id=231907

Reviewed by Alex Christensen.

Resync web-platform-tests/tools from upstream 4250f160c0cb9ef2caba63.

  • web-platform-tests/tools/*: Updated.
2:45 PM Changeset in webkit [284403] by Russell Epstein
  • 83 edits
    8 copies
    40 adds in branches/safari-612-branch

Apply patch. rdar://problem/84351845

2:42 PM Changeset in webkit [284402] by Chris Dumez
  • 10 edits
    10 adds in trunk/LayoutTests/imported/w3c

Resync web-platform-tests/common from upstream
https://bugs.webkit.org/show_bug.cgi?id=231908

Reviewed by Alex Christensen.

Resync web-platform-tests/common from upstream 4250f160c0cb9ef2caba63.

  • web-platform-tests/common/*: Updated.
2:38 PM Changeset in webkit [284401] by Russell Epstein
  • 91 edits
    4 adds in branches/safari-612-branch

Cherry-pick r284230. rdar://problem/84351866

Allow WASM to use up to 4GB
https://bugs.webkit.org/show_bug.cgi?id=229353
rdar://81603447

Reviewed by Yusuke Suzuki.

JSTests:

The big-wasm-memory/wasm-memory-requested... tests used to simply expect an OOM at 2GB.
They now expect success at 4GB, and failure at 4GB+1.
The exceptions they expect are now more specific, as previously there was a rounding issue that was causing the specific exceptions not to be thrown (resulting in the generic OOM exception later in the code).
Finally I made them only run on 64-bit platforms since we don't support typed arrays >=2GB on 32-bits, and I made them only run in one configuration since they can take a little bit of time.

I also added a few new tests, specifically checking our handling of large typed arrays, and especially of indices above INT32_MAX.

  • stress/big-wasm-memory-grow-no-max.js: (test):
  • stress/big-wasm-memory-grow.js: (test):
  • stress/big-wasm-memory.js: (test):
  • stress/typed-array-always-large.js: Added. (getArrayLength): (getByVal): (putByVal): (test):
  • stress/typed-array-eventually-large.js: Added. (getArrayLength): (getByVal): (putByVal): (test):
  • stress/typed-array-large-eventually-oob.js: Added. (getArrayLength): (getByVal): (putByVal): (test):
  • wasm/regress/wasm-memory-requested-more-than-MAX_ARRAY_BUFFER_SIZE-2.js:
  • wasm/regress/wasm-memory-requested-more-than-MAX_ARRAY_BUFFER_SIZE.js:

Source/JavaScriptCore:

While increasing MAX_ARRAY_BUFFER_SIZE to 4GB was easy, it was not remotely the only thing required to get this to work:

  • 4GB is not representable in a uint32_t, so I changed all length of ArrayBuffer/TypedArray/etc.. to being UCPURegister.
  • This also required changing NewTypedArray in all of LLInt/Baseline/DFG/FTL to accept a non-int32 size.

In order to avoid performance regressions, I had to add speculation in the DFG/FTL, which now have two versions of NewTypedArray (one that takes an Int32 and one that takes a StrictInt52)

  • Similarly, GetArrayLength and GetTypedArrayByteOffset now can either return an Int32 or a larger number.

I also had to split them in the DFG/FTL, see GetTypedArrayLengthAsInt52 and GetTypedArrayByteOffsetAsInt52 for examples

  • In turns, I had to add CheckInBoundsInt52 since CheckInBounds could not accept the result of GetTypedArrayLengthAsInt52
  • I modified the runtime functions for GetByVal/PutByVal/DataViewGet/DataViewSet/AtomicsXXX to accept non-Int32 indices, since for {Int8/UInt8/UInt8Clamped}Array, a maximum size of 4GB implies indices > 2B.
  • I added a "mayBeLargeTypedArray" bit to ArrayProfile/UnlinkedArrayProfile/DFG::ArrayMode to track whether such a non-Int32 index was seen to allow proper speculation and specialization of fast paths in the DFG/FTL.

I then updated the runtime functions used by the slow paths to correctly update it.

Unfortunately I ran out of time to add all the speculations/update all the fast paths.
So the following will have to wait for a follow-up patch:

  • Accepting large indices in the fast path of GetByVal in the LLInt
  • Accepting large indices in the fast paths generated by AccessCase/PolymorphicAccess
  • Accepting large indices in the fast paths generated by the DFG/FTL for each of GetByVal/PutByVal/DataViewGet/DataViewSet/AtomicsXXX

The current patch is functional, it will just have dreadful performance if trying to use indices >2B in a {Int8/UInt8/UInt8Clamped}Array.

Other minor changes in this patch:

  • Fixed an undefined behavior in ArrayBuffer::createInternal where memcpy could be called on nullptr (the spec explicitly bans this even when length is 0)
  • Replaced some repetitive and error-prone bounds checking by calls to WTF::isSumSmallerThanOrEqual, which is clearer, shorter, and reuse CheckedArithmetic facilities to avoid overflow issues.
  • Fixed a variety of obsolete comments
  • Added support for branch64(RelationalCondition cond, RegisterID left, Imm64 right)

(there was already support for the same but with TrustedImm64)

  • Made various AbstractMacroAssembler function constexpr as part of the previous point
  • assembler/AbstractMacroAssembler.cpp:
  • assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::TrustedImmPtr::TrustedImmPtr): (JSC::AbstractMacroAssembler::TrustedImmPtr::asIntptr): (JSC::AbstractMacroAssembler::TrustedImmPtr::asPtr): (JSC::AbstractMacroAssembler::ImmPtr::ImmPtr): (JSC::AbstractMacroAssembler::ImmPtr::asTrustedImmPtr): (JSC::AbstractMacroAssembler::TrustedImm32::TrustedImm32): (JSC::AbstractMacroAssembler::Imm32::Imm32): (JSC::AbstractMacroAssembler::Imm32::asTrustedImm32 const): (JSC::AbstractMacroAssembler::TrustedImm64::TrustedImm64): (JSC::AbstractMacroAssembler::Imm64::Imm64): (JSC::AbstractMacroAssembler::Imm64::asTrustedImm64 const): (JSC::AbstractMacroAssembler::canBlind): (JSC::AbstractMacroAssembler::shouldBlindForSpecificArch):
  • assembler/MacroAssembler.h: (JSC::MacroAssembler::branch64):
  • assembler/MacroAssemblerARM64.h: (JSC::MacroAssemblerARM64::shouldBlindForSpecificArch): (JSC::MacroAssemblerARM64::branch64):
  • assembler/MacroAssemblerARM64E.h: (JSC::MacroAssemblerARM64E::untagArrayPtrLength64): (JSC::MacroAssemblerARM64E::untagArrayPtrLength32): Deleted.
  • assembler/MacroAssemblerX86Common.h: (JSC::MacroAssemblerX86Common::canBlind): (JSC::MacroAssemblerX86Common::shouldBlindForSpecificArch):
  • bytecode/AccessCase.cpp: (JSC::AccessCase::needsScratchFPR const): (JSC::AccessCase::generateWithGuard):
  • bytecode/ArrayProfile.h: (JSC::ArrayProfile::setMayBeLargeTypedArray): (JSC::ArrayProfile::mayBeLargeTypedArray const): (JSC::UnlinkedArrayProfile::UnlinkedArrayProfile): (JSC::UnlinkedArrayProfile::update):
  • dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGArrayMode.cpp: (JSC::DFG::ArrayMode::refine const):
  • dfg/DFGArrayMode.h: (JSC::DFG::ArrayMode::ArrayMode): (JSC::DFG::ArrayMode::mayBeLargeTypedArray const): (JSC::DFG::ArrayMode::withType const): (JSC::DFG::ArrayMode::withSpeculation const): (JSC::DFG::ArrayMode::withConversion const): (JSC::DFG::ArrayMode::withTypeAndConversion const): (JSC::DFG::ArrayMode::withArrayClassAndSpeculationAndMayBeLargeTypedArray const): (JSC::DFG::ArrayMode::speculationFromProfile): (JSC::DFG::ArrayMode::withSpeculationFromProfile const): (JSC::DFG::ArrayMode::withProfile const): (JSC::DFG::ArrayMode::operator== const): (JSC::DFG::ArrayMode::withArrayClass const): Deleted.
  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::handleIntrinsicGetter):
  • dfg/DFGClobberize.h: (JSC::DFG::clobberize):
  • dfg/DFGCommon.h: (JSC::DFG::enableInt52):
  • dfg/DFGConstantFoldingPhase.cpp: (JSC::DFG::ConstantFoldingPhase::foldConstants):
  • dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC):
  • dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): (JSC::DFG::FixupPhase::convertToGetArrayLength): (JSC::DFG::FixupPhase::prependGetArrayLength): Deleted.
  • dfg/DFGGenerationInfo.h:
  • dfg/DFGHeapLocation.cpp: (WTF::printInternal):
  • dfg/DFGHeapLocation.h:
  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
  • dfg/DFGNode.h: (JSC::DFG::Node::hasStorageChild const): (JSC::DFG::Node::storageChildIndex): (JSC::DFG::Node::hasArrayMode):
  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp: (JSC::DFG::putByVal): (JSC::DFG::newTypedArrayWithSize): (JSC::DFG::JSC_DEFINE_JIT_OPERATION):
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSSALoweringPhase.cpp: (JSC::DFG::SSALoweringPhase::handleNode): (JSC::DFG::SSALoweringPhase::lowerBoundsCheck):
  • dfg/DFGSafeToExecute.h: (JSC::DFG::safeToExecute):
  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::jumpForTypedArrayOutOfBounds): (JSC::DFG::SpeculativeJIT::emitTypedArrayBoundsCheck): (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray): (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray): (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray): (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray): (JSC::DFG::SpeculativeJIT::cageTypedArrayStorage): (JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset): (JSC::DFG::SpeculativeJIT::compileGetArrayLength): (JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithSize): (JSC::DFG::SpeculativeJIT::emitNewTypedArrayWithSizeInRegister): (JSC::DFG::SpeculativeJIT::compileNewTypedArray):
  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compileGetByVal): (JSC::DFG::SpeculativeJIT::compile):
  • dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithInt52Size): (JSC::DFG::SpeculativeJIT::compileGetTypedArrayLengthAsInt52): (JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffsetAsInt52): (JSC::DFG::SpeculativeJIT::compile):
  • dfg/DFGTypeCheckHoistingPhase.cpp: (JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks): (JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):
  • dfg/DFGValidate.cpp:
  • ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile):
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::validateAIState): (JSC::FTL::DFG::LowerDFGToB3::compileNode): (JSC::FTL::DFG::LowerDFGToB3::emitGetTypedArrayByteOffsetExceptSettingResult): (JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffset): (JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffsetAsInt52): (JSC::FTL::DFG::LowerDFGToB3::compileGetArrayLength): (JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayLengthAsInt52): (JSC::FTL::DFG::LowerDFGToB3::compileCheckInBoundsInt52): (JSC::FTL::DFG::LowerDFGToB3::compilePutByVal): (JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray): (JSC::FTL::DFG::LowerDFGToB3::emitNewTypedArrayWithSize): (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
  • ftl/FTLOutput.h: (JSC::FTL::Output::load64NonNegative):
  • jit/IntrinsicEmitter.cpp: (JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):
  • jit/JITOperations.cpp: (JSC::putByVal): (JSC::getByVal):
  • llint/LLIntOfflineAsmConfig.h:
  • llint/LLIntSlowPaths.cpp: (JSC::LLInt::getByVal): (JSC::LLInt::LLINT_SLOW_PATH_DECL):
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ArrayBuffer.cpp: (JSC::SharedArrayBufferContents::SharedArrayBufferContents): (JSC::ArrayBufferContents::ArrayBufferContents): (JSC::ArrayBufferContents::tryAllocate): (JSC::ArrayBuffer::create): (JSC::ArrayBuffer::createAdopted): (JSC::ArrayBuffer::createFromBytes): (JSC::ArrayBuffer::tryCreate): (JSC::ArrayBuffer::createUninitialized): (JSC::ArrayBuffer::tryCreateUninitialized): (JSC::ArrayBuffer::createInternal): (JSC::ArrayBuffer::clampValue): (JSC::ArrayBuffer::clampIndex const): (JSC::ArrayBuffer::sliceWithClampedIndex const):
  • runtime/ArrayBuffer.h: (JSC::ArrayBufferContents::sizeInBytes const): (JSC::ArrayBuffer::byteLength const): (JSC::ArrayBuffer::gcSizeEstimateInBytes const):
  • runtime/ArrayBufferView.cpp: (JSC::ArrayBufferView::ArrayBufferView):
  • runtime/ArrayBufferView.h: (JSC::ArrayBufferView::byteOffset const): (JSC::ArrayBufferView::byteLength const): (JSC::ArrayBufferView::verifyByteOffsetAlignment): (JSC::ArrayBufferView::verifySubRangeLength): (JSC::ArrayBufferView::clampOffsetAndNumElements): (JSC::ArrayBufferView::setImpl): (JSC::ArrayBufferView::setRangeImpl): (JSC::ArrayBufferView::getRangeImpl): (JSC::ArrayBufferView::zeroRangeImpl): (JSC::ArrayBufferView::calculateOffsetAndLength): Deleted.
  • runtime/AtomicsObject.cpp:
  • runtime/DataView.cpp: (JSC::DataView::DataView): (JSC::DataView::create):
  • runtime/DataView.h:
  • runtime/GenericTypedArrayView.h:
  • runtime/GenericTypedArrayViewInlines.h: (JSC::GenericTypedArrayView<Adaptor>::GenericTypedArrayView): (JSC::GenericTypedArrayView<Adaptor>::create): (JSC::GenericTypedArrayView<Adaptor>::tryCreate): (JSC::GenericTypedArrayView<Adaptor>::createUninitialized): (JSC::GenericTypedArrayView<Adaptor>::tryCreateUninitialized): (JSC::GenericTypedArrayView<Adaptor>::subarray const): Deleted.
  • runtime/JSArrayBufferView.cpp: (JSC::JSArrayBufferView::ConstructionContext::ConstructionContext): (JSC::JSArrayBufferView::byteLength const): (JSC::JSArrayBufferView::slowDownAndWasteMemory): (JSC::JSArrayBufferView::possiblySharedImpl):
  • runtime/JSArrayBufferView.h: (JSC::JSArrayBufferView::sizeOf): (JSC::JSArrayBufferView::ConstructionContext::length const): (JSC::JSArrayBufferView::length const):
  • runtime/JSArrayBufferViewInlines.h: (JSC::JSArrayBufferView::byteOffsetImpl): (JSC::JSArrayBufferView::byteOffset): (JSC::JSArrayBufferView::byteOffsetConcurrently):
  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h: (JSC::JSValue::toIndex const): (JSC::JSValue::toTypedArrayIndex const):
  • runtime/JSDataView.cpp: (JSC::JSDataView::create): (JSC::JSDataView::createUninitialized): (JSC::JSDataView::set): (JSC::JSDataView::setIndex):
  • runtime/JSDataView.h:
  • runtime/JSDataViewPrototype.cpp: (JSC::getData): (JSC::setData):
  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSGenericTypedArrayViewConstructorInlines.h: (JSC::constructGenericTypedArrayViewWithArguments): (JSC::constructGenericTypedArrayViewImpl):
  • runtime/JSGenericTypedArrayViewInlines.h: (JSC::JSGenericTypedArrayView<Adaptor>::create): (JSC::JSGenericTypedArrayView<Adaptor>::createWithFastVector): (JSC::JSGenericTypedArrayView<Adaptor>::createUninitialized): (JSC::JSGenericTypedArrayView<Adaptor>::validateRange): (JSC::JSGenericTypedArrayView<Adaptor>::setWithSpecificType): (JSC::JSGenericTypedArrayView<Adaptor>::set):
  • runtime/JSObject.h: (JSC::JSObject::putByIndexInline): (JSC::JSObject::tryGetIndexQuickly const): (JSC::JSObject::trySetIndexQuickly): (JSC::JSObject::canSetIndexQuickly): Deleted.
  • runtime/JSObjectInlines.h: (JSC::JSObject::getIndexQuicklyForTypedArray const): (JSC::JSObject::setIndexQuicklyForArrayStorageIndexingType): (JSC::JSObject::trySetIndexQuicklyForTypedArray): (JSC::JSObject::canSetIndexQuicklyForTypedArray const): Deleted.
  • runtime/Operations.h: (JSC::getByValWithIndex):
  • wasm/WasmPageCount.h:

Source/WebCore:

Some parts of WebCore use TypedArrays, and would not build after I made the length() function on typed arrays return UCPURegister instead of uint32_t.
Most fixes were trivial, the only exception is SerializedScriptValue.cpp, where I had to increment the version number, as ArrayBuffer (and ArrayBufferViews) now write/read their length in a 64-bit field (and same for the byteOffset of ArrayBufferView).

I also had to add a test in PixelBuffer.cpp that the size of the ArrayBuffer it will try to allocate is < INT32_MAX.
Otherwise, the test LayoutTests/fast/shapes/shape-outside-floats/shape-outside-imagedata-overflow.html which checks that very large images are properly rejected without crashing, would timeout.

No new tests, as the code is already extensively covered by existing tests, and I implemented no new features.

  • Modules/webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::copyFromChannel): (WebCore::AudioBuffer::copyToChannel):
  • Modules/webaudio/RealtimeAnalyser.cpp: (WebCore::RealtimeAnalyser::getByteFrequencyData): (WebCore::RealtimeAnalyser::getFloatTimeDomainData): (WebCore::RealtimeAnalyser::getByteTimeDomainData):
  • bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpArrayBufferView): (WebCore::CloneSerializer::dumpImageBitmap): (WebCore::CloneSerializer::dumpIfTerminal): (WebCore::CloneDeserializer::readArrayBufferImpl): (WebCore::CloneDeserializer::readArrayBuffer): (WebCore::CloneDeserializer::readArrayBufferViewImpl): (WebCore::CloneDeserializer::readArrayBufferView):
  • bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValue::encode const): (WebCore::SerializedScriptValue::decode):
  • fileapi/NetworkSendQueue.cpp: (WebCore::NetworkSendQueue::enqueue):
  • platform/graphics/PixelBuffer.cpp: (WebCore::PixelBuffer::tryCreate):
  • platform/graphics/iso/ISOBox.h:

Source/WTF:

Made some of CheckedArithmetic constexpr, and added isSumSmallerThanOrEqual since it is a commonly used test in ArrayBuffer and easy to get wrong in terms of overflow.

  • wtf/CheckedArithmetic.h: (WTF::isInBounds): (WTF::convertSafely): (WTF::isSumSmallerThanOrEqual):

LayoutTests:

Rebaselined three following tests as different or fewer error messages appear on the console.
Also changed currentVersion in serialized-script-value.html from 9 to 10.

  • fast/canvas/canvas-getImageData-invalid-result-buffer-crash-expected.txt:
  • fast/storage/serialized-script-value.html:
  • webaudio/OfflineAudioContext-bad-buffer-crash-expected.txt:
  • webaudio/OfflineAudioContext/bad-buffer-length-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284230 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2:28 PM Changeset in webkit [284400] by Russell Epstein
  • 13 edits in branches/safari-612-branch

Apply patch. rdar://problem/84313358

2:17 PM Changeset in webkit [284399] by basuke.suzuki@sony.com
  • 14 edits
    2 copies
    3 adds
    1 delete in trunk/Tools

[webkitperl] Stop using LoadAsModule.pm
https://bugs.webkit.org/show_bug.cgi?id=231868

Reviewed by Jonathan Bedard.

This module load a script file as module with a bit tricky way. It prevents the proper
usage of package after all. The purpose of this module is to test routines defined in the
script. It just be wrong with such way. If you have something to test, it should be separated
as a module and be imported to the script. Then unit test can load the module and can test
without any sort of trouble.

  • Scripts/filter-build-webkit:

(setOutputFormatOption):
(shouldShowSubsequentLine): Moved to webkitperl/build/output.pm.
(shouldIgnoreLine): Ditto.

  • Scripts/prepare-ChangeLog:

(generateFunctionLists):
(fetchBugXMLData):
(openChangeLogs):
(method_decl_to_selector):
(diffCommand):
(statusCommand):
(propertyChangeDescription):
(normalizeLineEndings):
(actuallyGenerateFunctionLists): Moved to webkitperl/changelog.
(computeModifiedFunctions): Ditto.
(fetchBugDescriptionFromBugXMLData): Ditto.
(fetchRadarURLFromBugXMLData): Ditto.
(get_function_line_ranges): Ditto.
(get_function_line_ranges_for_cpp): Ditto.
(delete_namespaces_from_ranges_for_cpp): Ditto.
(is_function_in_namespace): Ditto.
(get_function_line_ranges_for_java): Ditto.
(get_function_line_ranges_for_javascript): Ditto.
(get_function_line_ranges_for_perl): Ditto.
(get_function_line_ranges_for_python): Ditto.
(get_selector_line_ranges_for_css): Ditto.
(get_function_line_ranges_for_swift): Ditto.
(parseSwiftFunctionArgs): Ditto.
(attributeCommand): Ditto.
(extractLineRangeAfterChange): Ditto.
(extractLineRangeBeforeChange): Ditto.
(decodeEntities): Ditto.

  • Scripts/run-leaks:

(main):
(removeMatchingRecords):
(runLeaks): Moved to webkitperl/leaks.pm.
(parseLeaksOutput): Ditto.
(reportError): Deleted. Use Carp::croak instead.

  • Scripts/webkitdirs.pm:

(determineBaseProductDir):
(determineCurrentSVNRevision):
(chdirWebKit):
(determineSourceDir): Moved to webkitperl/dirs.pm.
(setSourceDir): Ditto.
(sourceDir): Ditto.

  • Scripts/webkitperl/LoadAsModule.pm: Removed.
  • Scripts/webkitperl/build/output.pm: Extracted from Tools/Scripts/filter-build-webkit.

(shouldShowSubsequentLine):
(shouldIgnoreLine):

  • Scripts/webkitperl/changelog.pm: Extracted from Tools/Scripts/prepare-ChangeLog.

(actuallyGenerateFunctionLists):
(extractLineRangeAfterChange):
(extractLineRangeBeforeChange):
(attributeCommand):
(fetchBugDescriptionFromBugXMLData):
(fetchRadarURLFromBugXMLData):
(computeModifiedFunctions):
(get_function_line_ranges):
(get_function_line_ranges_for_cpp):
(delete_namespaces_from_ranges_for_cpp):
(is_function_in_namespace):
(get_function_line_ranges_for_java):
(get_function_line_ranges_for_javascript):
(get_function_line_ranges_for_perl):
(get_function_line_ranges_for_python):
(get_selector_line_ranges_for_css):
(get_function_line_ranges_for_swift):
(parseSwiftFunctionArgs):
(decodeEntities):

  • Scripts/webkitperl/dirs.pm: Extracted from Tools/Scripts/webkitdirs.

(sourceDir):
(setSourceDir):
(determineSourceDir):

  • Scripts/webkitperl/filter-build-webkit_unittest/shouldIgnoreLine_unittests.pl:
  • Scripts/webkitperl/leaks.pm: Copied from Tools/Scripts/run-leaks.

(runLeaks):
(parseLeaksOutput):

  • Scripts/webkitperl/prepare-ChangeLog_unittest/extractLineRangeBeforeAndAfterChange.pl:
  • Scripts/webkitperl/prepare-ChangeLog_unittest/fetchRadarURLFromBugXMLData.pl:
  • Scripts/webkitperl/prepare-ChangeLog_unittest/filenameWithParentheses.pl:
  • Scripts/webkitperl/prepare-ChangeLog_unittest/generateFunctionLists.pl:
  • Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl:

(convertAbsolutePathToRelativeUnixPath):

  • Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:
  • Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-new.pl:
  • Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-old.pl:
1:51 PM Changeset in webkit [284398] by Jonathan Bedard
  • 4 edits in trunk/Tools

[run-api-tests] Use temporary symlink when listing tests
https://bugs.webkit.org/show_bug.cgi?id=230560

Reviewed by Dewei Zhu.

  • Scripts/webkitpy/api_tests/manager.py:

(Manager._collect_tests): Copy binary when listing tests to make debuging easier.

  • Scripts/webkitpy/common/system/filesystem.py:

(FileSystem.copyfile): Return copyfile result.
(FileSystem.copymode): Invoke shutil.copymode.

  • Scripts/webkitpy/common/system/filesystem_mock.py:

(MockFileSystem.copymode):

1:50 PM Changeset in webkit [284397] by svillar@igalia.com
  • 4 edits in trunk

[css-flexbox] Do not clamp flex base size with {min|max}-{height|width}
https://bugs.webkit.org/show_bug.cgi?id=225590
<rdar://problem/78100329>

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

When computing flex base size we should not clamp it with neither min-{height|width}
nor max-{height|width}. That would be done later and will be called the hypothetical
main size.

For most of the cases we were already doing it, however there are some particular cases
in which we have to call the generic layout code which does clamp the sizes using min
and max sizes. In order to make those code paths work, we reset the min|max values to
their initial ones (so they effectively become inactive) and then we set the original
values back after computing the base size.

This is a reland of r279271 which was pretty similar but caused a visual regression in
GMail. After r284359 this is no longer a problem of this patch.

This fixes 3 WPT flexbox tests.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::ScopedUnboundedBoxWithFlexBasisAsChildMainSize::ScopedUnboundedBoxWithFlexBasisAsChildMainSize):
renamed from ScopedFlexBasisAsChildMainSize. Resets min|max-size to their initial values.
(WebCore::ScopedUnboundedBoxWithFlexBasisAsChildMainSize::~ScopedUnboundedBoxWithFlexBasisAsChildMainSize):
ditto. Restores min|max-size original values.
(WebCore::RenderFlexibleBox::computeFlexBaseSizeForChild):
(WebCore::ScopedFlexBasisAsChildMainSize::ScopedFlexBasisAsChildMainSize): Deleted.
(WebCore::ScopedFlexBasisAsChildMainSize::~ScopedFlexBasisAsChildMainSize): Deleted.

LayoutTests:

1:41 PM Changeset in webkit [284396] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Don't load metadata base pointer in EXTRA_CTI_THUNKS
https://bugs.webkit.org/show_bug.cgi?id=231850

Reviewed by Yusuke Suzuki.

We were loading the metadata table base pointer dynamically. But in
unlinked baseline JIT, it's already pinned in a register. Let's just
use the register instead of recomputing what's already there. This is
a small speedup in throughput of unlinked baseline JIT code for scope
operations.

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::generateOpResolveScopeThunk):
(JSC::JIT::generateOpGetFromScopeThunk):

1:34 PM Changeset in webkit [284395] by Andres Gonzalez
  • 2 edits in trunk/Tools

Set isolated tree mode to secondary AX thread in LayoutTests.
https://bugs.webkit.org/show_bug.cgi?id=231763

Reviewed by Chris Fleizach.

Isolated tree mode was enabled for LayoutTests but set to run on the
main thread. Change it to run on the AX thread.

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:

(WTR::AccessibilityController::updateIsolatedTreeMode):

1:25 PM Changeset in webkit [284394] by Russell Epstein
  • 2 edits in branches/safari-613.1.6-branch/Source/WebKit

Cherry-pick r284382. rdar://problem/84384768

Web process occasionally crashes under RemoteDisplayListRecorderProxy::recordRestore()
https://bugs.webkit.org/show_bug.cgi?id=231900

Reviewed by Tim Horton.

It's apparently possible for a RemoteImageBufferProxy in the web process to outlive RemoteRenderingBackendProxy.
Before the IPC stream refactoring in r284079, we were robust against this possibility because
RemoteImageBufferProxy checked for a null rendering backend in canAppendItemOfType and returned false, which
prevented us from trying to call into the rendering backend. However, I accidentally omitted this null check
in the new RemoteDisplayListRecorderProxy, which currently assumes that m_renderingBackend is always non-null
when sending any IPC stream messages.

Fix this crash by restoring the null check for the weak m_renderingBackend pointer. I only observed this crash
once locally and, unfortunately, haven't been able to come up with a test case that consistently reproduces it.

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h: (WebKit::RemoteDisplayListRecorderProxy::send):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284382 268f45cc-cd09-0410-ab3c-d52691b4dbfc

1:08 PM Changeset in webkit [284393] by Russell Epstein
  • 21 edits
    1 add in branches/safari-612-branch

Cherry-pick r283238. rdar://problem/83955650

MediaStream canvas.captureStream() fails for WebGL
https://bugs.webkit.org/show_bug.cgi?id=230613
<rdar://82307293>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-09-29
Reviewed by Youenn Fablet.

.:

Add a manual test to interact with media stream
captureStream() behavior until the implementation is
testable.

  • ManualTests/mediastream/mediastream-canvas-to-video.html: Added.

Source/WebCore:

Remove previous incorrect behavior of turning on "preservesDrawingBuffer"
and sampling the drawing buffer. The drawing buffer is not what should
ever be touched, rather it's the display buffer that should be available.

Implement sampling of WebGL display buffer for
media stream capture. The upon sampling, obtain a shared
reference to the
display buffer, passes it to media sample consuming process and mark
the WebGL context display buffer non-eligible for recycling as
new drawing buffer.

Currently the implementation is displayed correctly for
WebGL contents that is premultiplied. Unpremultiplied
content is fixed in the associated bugs.

Note: there are bugs preventing robust use of the API,
listed in the associated bugs. As such, testing is not expanded
in this bug.

Tested by
ManualTests/mediastream/mediastream-canvas-to-video.html (added)

https://webrtc.github.io/samples/src/content/capture/canvas-video/
(Refresh the page or hide the window until MediaPlayer initialization
flakyness lets rendering happen)

The test LayoutTests/fast/mediastream/captureStream/canvas3d.html
cannot yet be used to test the implementation as the rest of the
captureStream() and playback implementation is so flaky.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp: (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged):
  • html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::toMediaSample):
  • html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::paintCompositedResultsToMediaSample):
  • html/canvas/WebGLRenderingContextBase.h: (WebCore::WebGLRenderingContextBase::isPreservingDrawingBuffer const):
  • platform/graphics/GraphicsContextGL.cpp:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/RemoteGraphicsContextGLProxyBase.cpp: (WebCore::RemoteGraphicsContextGLProxyBase::paintCompositedResultsToMediaSample):
  • platform/graphics/RemoteGraphicsContextGLProxyBase.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm: (WebCore::MediaSampleAVFObjC::createImageSample):
  • platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp: (WebCore::GraphicsContextGLIOSurfaceSwapChain::present):
  • platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h:
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample):
  • platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm: (WebCore::RemoteGraphicsContextGLProxyBase::paintCompositedResultsToMediaSample):
  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: (WebCore::GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample):
  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:

LayoutTests:

Add new expectations, a warning was removed.
CONSOLE MESSAGE: Turning drawing buffer preservation for the WebGL canvas being captured

  • fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events-expected.txt:
  • fast/mediastream/captureStream/canvas3d-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283238 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:59 PM Changeset in webkit [284392] by Russell Epstein
  • 14 edits
    2 adds
    1 delete in branches/safari-612-branch/Source

Apply patch. rdar://problem/84124701

12:59 PM Changeset in webkit [284391] by Russell Epstein
  • 12 edits in branches/safari-612-branch/Source

Apply patch. rdar://problem/84124706

12:33 PM Changeset in webkit [284390] by sihui_liu@apple.com
  • 32 edits
    3 copies
    4 adds in branches/safari-612-branch

Apply patch rdar://84349756

12:33 PM Changeset in webkit [284389] by sihui_liu@apple.com
  • 1 edit in branches/safari-612-branch/Source/WebKit/NetworkProcess/storage/FileSystemStorageError.h

Apply patch rdar://84351861

12:29 PM Changeset in webkit [284388] by commit-queue@webkit.org
  • 4 edits in trunk

[ iOS15 Monterey ] TestWTF.WTF_URLExtras.URLExtras is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=231454

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-18
Reviewed by Chris Dumez.

Source/WTF:

  • wtf/PlatformHave.h:

Tools:

The behavior of NSURL changed to disallow empty punycode in the host.
This is fine, but we need to update our test expectations.

  • TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:

(TestWebKitAPI::TEST):

11:55 AM Changeset in webkit [284387] by commit-queue@webkit.org
  • 7 edits
    4 adds in trunk

AX: Return AXEmptyGroup subrole for groups with no accessible content
https://bugs.webkit.org/show_bug.cgi?id=231528

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-18
Reviewed by Andres Gonzalez.

Source/WebCore:

Return a subrole of "AXEmptyGroup" for groups without any exposed
children. WebKit can calculate this more efficiently than AX clients,
so it makes more sense to do here.

Test: accessibility/mac/empty-group-computation.html

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper subrole]):

LayoutTests:

  • accessibility/mac/aria-divs-not-ignored-expected.txt:
  • accessibility/mac/aria-divs-not-ignored.html:

Expect a subrole of AXEmptyGroup because this group has no content.

  • accessibility/roles-exposed.html:

Changed some math testcases to use valid MathML markup. Otherwise
they'd be considered to have no children, and therefore be given
a subrole of AXEmptyGroup, which is not what this test is intended
to exercise.

  • accessibility/mac/empty-group-computation-expected.txt: Added.
  • accessibility/mac/empty-group-computation.html: Added.
  • platform/mac/accessibility/lists-expected.txt: Added.
  • platform/mac/accessibility/plugin-expected.txt: Added.

Add these Mac-specific expectations for these tests because this patch
only causes Mac to expose the AXEmptyGroup subrole.

  • platform/mac/accessibility/svg-element-with-aria-role-expected.txt:

Add an expected subrole of AXEmptyGroup.

10:53 AM Changeset in webkit [284386] by Ayumi Kojima
  • 5 edits in trunk/LayoutTests

[ iOS 15 ] Rebaselining 4 fast tests.
https://bugs.webkit.org/show_bug.cgi?id=231901

Unreviewed test gardening.

  • platform/ios/fast/backgrounds/border-radius-split-background-expected.txt:
  • platform/ios/fast/backgrounds/border-radius-split-background-image-expected.txt:
  • platform/ios/fast/borders/border-styles-split-expected.txt:
  • platform/ios/fast/text/basic/015-expected.txt:
10:30 AM Changeset in webkit [284385] by Russell Epstein
  • 14 edits in branches/safari-613.1.6-branch/Source

Cherry-pick r284383. rdar://problem/84377173

Revert r284216
https://webkit.org/b/231523
<rdar://84342878>

Source/WebCore:

  • CMakeLists.txt:
  • Configurations/WebCore.xcconfig:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

There is an internal build configuration that doesn't know how to find libWebCoreStatic.a
and I have reason to believe that this is not necessary anyways.

  • Configurations/adattributiond.xcconfig:
  • Shared/API/Cocoa/WKMain.h:
  • Shared/API/Cocoa/WKMain.mm: (WKAdAttributionDaemonMain):
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284383 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:29 AM Changeset in webkit [284384] by Ayumi Kojima
  • 1 edit
    4 deletes in trunk/LayoutTests

Unreviewed, reverting r284377.

Reverting because the expected.txt files are in the wrong
folders for rebaselining

Reverted changeset:

"[ iOS 15 ] Rebaselining 4 fast tests."
https://bugs.webkit.org/show_bug.cgi?id=231901
https://commits.webkit.org/r284377

10:25 AM Changeset in webkit [284383] by achristensen@apple.com
  • 14 edits in trunk/Source

Revert r284216
https://webkit.org/b/231523
<rdar://84342878>

Source/WebCore:

  • CMakeLists.txt:
  • Configurations/WebCore.xcconfig:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

There is an internal build configuration that doesn't know how to find libWebCoreStatic.a
and I have reason to believe that this is not necessary anyways.

  • Configurations/adattributiond.xcconfig:
  • Shared/API/Cocoa/WKMain.h:
  • Shared/API/Cocoa/WKMain.mm:

(WKAdAttributionDaemonMain):

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
10:19 AM Changeset in webkit [284382] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Web process occasionally crashes under RemoteDisplayListRecorderProxy::recordRestore()
https://bugs.webkit.org/show_bug.cgi?id=231900

Reviewed by Tim Horton.

It's apparently possible for a RemoteImageBufferProxy in the web process to outlive RemoteRenderingBackendProxy.
Before the IPC stream refactoring in r284079, we were robust against this possibility because
RemoteImageBufferProxy checked for a null rendering backend in canAppendItemOfType and returned false, which
prevented us from trying to call into the rendering backend. However, I accidentally omitted this null check
in the new RemoteDisplayListRecorderProxy, which currently assumes that m_renderingBackend is always non-null
when sending any IPC stream messages.

Fix this crash by restoring the null check for the weak m_renderingBackend pointer. I only observed this crash
once locally and, unfortunately, haven't been able to come up with a test case that consistently reproduces it.

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

(WebKit::RemoteDisplayListRecorderProxy::send):

10:18 AM Changeset in webkit [284381] by Russell Epstein
  • 1 copy in branches/safari-613.1.6-branch

New branch.

10:17 AM Changeset in webkit [284380] by Antti Koivisto
  • 7 edits
    2 adds in trunk

background-clip:text doesn't paint correctly for inline box spanning multiple lines
https://bugs.webkit.org/show_bug.cgi?id=231891

Reviewed by Alan Bujtas.

Source/WebCore:

'background-clip: text' paints to a wrong position if the inline box spans multiple lines.

Test: fast/inline/inline-background-clip-text-multiline.html

  • rendering/InlineBoxPainter.cpp:

(WebCore::InlineBoxPainter::paintFillLayer):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paintFillLayer):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::getBackgroundRoundedRect const):
(WebCore::RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance const):

No need to pass box size separately as it now always matches the passed in border rect.

(WebCore::RenderBoxModelObject::paintFillLayerExtended):

The 'rect' parameter used to be either the border box rect of the box being painted or,
in the case of multiline inline box background image, the image strip being painted.

Make the 'rect' parameter to always be the border box and pass the background image strip
separately.

Use the background image strip only during background image painting.

  • rendering/RenderBoxModelObject.h:

(WebCore::RenderBoxModelObject::paintFillLayerExtended):

LayoutTests:

  • fast/inline/inline-background-clip-text-multiline-expected.html: Added.
  • fast/inline/inline-background-clip-text-multiline.html: Added.
10:16 AM Changeset in webkit [284379] by Russell Epstein
  • 8 edits in trunk/Source

Versioning.

WebKit-7613.1.7

10:14 AM Changeset in webkit [284378] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitscmpy] Allow repositories to define custom setup commands (Follow0-up)
https://bugs.webkit.org/show_bug.cgi?id=231345
<rdar://problem/83960249>

Unreviewed follow-up fix.

  • Scripts/git-webkit: Do not specify OpenSource in Tools/Scripts path.
9:21 AM Changeset in webkit [284377] by Ayumi Kojima
  • 1 edit
    4 adds in trunk/LayoutTests

[ iOS 15 ] Rebaselining 4 fast tests.
https://bugs.webkit.org/show_bug.cgi?id=231901

Unreviewed test gardening.

  • fast/backgrounds/border-radius-split-background-expected.txt: Added.
  • fast/backgrounds/border-radius-split-background-image-expected.txt: Added.
  • fast/borders/border-styles-split-expected.txt: Added.
  • fast/text/basic/015-expected.txt: Added.
9:11 AM Changeset in webkit [284376] by achristensen@apple.com
  • 2 edits in trunk/Tools

Regression (r284304) : [ iOS 15 Release ] http/tests/privateClickMeasurement tests are failing
https://bugs.webkit.org/show_bug.cgi?id=231898

Use the SPI I made to keep the tests having old behavior of using the network process instead of the daemon.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::configureWebsiteDataStoreTemporaryDirectories):

9:07 AM Changeset in webkit [284375] by sihui_liu@apple.com
  • 30 edits
    2 copies
    5 adds in branches/safari-612-branch

Apply patch rdar://83954608

8:49 AM Changeset in webkit [284374] by Simon Fraser
  • 2 edits
    1 move
    4 deletes in trunk/LayoutTests

Cleanup css3/filters/backdrop/backdrop-filter-with-clip-path.html expected results
https://bugs.webkit.org/show_bug.cgi?id=217804

Reviewed by Alexey Proskuryakov.

Change the test to use invert() instead of blur() on backdrop-filter.

Test still fails on iOS; looks like some pixel snapping issues.

  • css3/filters/backdrop/backdrop-filter-with-clip-path-expected.html: Renamed from LayoutTests/platform/ios/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.html.
  • css3/filters/backdrop/backdrop-filter-with-clip-path-expected.txt: Removed.
  • css3/filters/backdrop/backdrop-filter-with-clip-path.html:
  • platform/glib/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.txt: Removed.
  • platform/mac/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.png: Removed.
  • platform/wpe/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.txt: Removed.
8:30 AM Changeset in webkit [284373] by ddkilzer@apple.com
  • 4 edits in trunk/Source

Bug 231882: WebKit::GPUConnectionToWebProcess::setTCCIdentity() leaks a tcc_identity_t
<https://webkit.org/b/231882>
<rdar://problem/84350854>

Reviewed by Chris Dumez.

Source/WebCore/PAL:

  • pal/spi/cocoa/TCCSPI.h:
  • Properly declare tcc_identity_t as an OSObject.

Source/WebKit:

  • GPUProcess/cocoa/GPUConnectionToWebProcessCocoa.mm:

(WebKit::GPUConnectionToWebProcess::setTCCIdentity):

  • Use WTF::adoptOSObject() to fix the leak.
  • Expand the scope of !PLATFORM(MACCATALYST) since none of this code needs to run on the MacCatalyst platform.
7:57 AM Changeset in webkit [284372] by Ms2ger@igalia.com
  • 2 edits in trunk

Add my github username to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=231893

Unreviewed.

  • metadata/contributors.json:
7:57 AM Changeset in webkit [284371] by commit-queue@webkit.org
  • 23 edits
    3 adds in trunk/Source

Cocoa GraphicsContextGLOpenGL should not use WebGLLayer
https://bugs.webkit.org/show_bug.cgi?id=231804

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-18
Reviewed by Dean Jackson.

Source/WebCore:

Move the "swap chain", e.g. the display buffer IOSurface
from WebGLLayer to GraphicsContextGLOpenGL.
Instantiate WebGLLayer only in new class WebProcessGraphicsContextGLOpenGL,
which is used when WebGL is run in-process in WebContent process.
Simply set the CALayer.contents when new display buffer is ready and
call "setNeedsDisplay" directly.

No new tests, a refactor.

  • PlatformMac.cmake:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/RemoteGraphicsContextGLProxyBase.h:
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::isValid const):
(WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking):
(WebCore::GraphicsContextGLOpenGL::prepareForDisplay):
(WebCore::GraphicsContextGLOpenGL::readCompositedResults):
(WebCore::GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample):
(WebCore::GraphicsContextGLOpenGL::create): Deleted.
(WebCore::GraphicsContextGLOpenGL::createForGPUProcess): Deleted.
GraphicsContextGLOpenGL for GPUProcess is now a new class, described
in WebKit ChangeLog.

  • platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm:

(WebCore::RemoteGraphicsContextGLProxyBase::platformInitialize):
(WebCore::RemoteGraphicsContextGLProxyBase::paintCompositedResultsToMediaSample):
(WebCore::RemoteGraphicsContextGLProxyBase::platformSwapChain): Deleted.

  • platform/graphics/cocoa/WebGLLayer.h:
  • platform/graphics/cocoa/WebGLLayer.mm:

(-[WebGLLayer initWithDevicePixelRatio:contentsOpaque:]):
(-[WebGLLayer display]):
(-[WebGLLayer swapChain]): Deleted.
(-[WebGLLayer prepareForDisplay]): Deleted.
(WebGLLayerSwapChain::present): Deleted.
CALayer.contents and setNeedsDisplay is called directly when
a graphics context has new display buffer.

  • platform/graphics/cocoa/WebProcessGraphicsContextGLOpenGLCocoa.mm: Added.

(WebCore::GraphicsContextGLOpenGL::create):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:

(WebCore::GraphicsContextGLOpenGL::isValid const):
Add a new function that checks if the constructor exited early.
Before, m_contextObj would be consulted but this is not protected
so it's not so useful. Also it wasn't very accurate, as some constructor
early exists ran after m_contextObj was set. Use m_texture to detect
fully constructed object for now.

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

(WebCore::GraphicsContextGLOpenGL::create):
(WebCore::GraphicsContextGLOpenGL::createForGPUProcess): Deleted.
GraphicsContextGLOpenGL for GPUProcess is now a new class, described
in WebKit ChangeLog. Remove the HostWindow arguments for
GraphicsContextGLOpenGL, it's not used.

Source/WebKit:

Implement changes so that GPU process side GraphicsContextGLOpenGL,
the new class GPUProcessGraphicsContextGL, does not use
WebGLLayer. Instead, the swap chain is in GraphicsContextGLOpenGL
and the GPUProcessGraphicsContextGL exposes a function to extract
the display buffer out to be sent to WebContent process.

  • GPUProcess/graphics/GPUProcessGraphicsContextGL.h: Added.

Add a simpler class for GPUProcess side GraphicsContextGLOpenGL
instance, one that can get the display buffer from the instance.

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:

(WebKit::RemoteGraphicsContextGLCocoa::platformWorkQueueInitialize):
(WebKit::RemoteGraphicsContextGLCocoa::prepareForDisplay):

  • GPUProcess/graphics/RemoteGraphicsContextGLWin.cpp:

(WebKit::RemoteGraphicsContextGLWin::platformWorkQueueInitialize):

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::~RemoteGraphicsContextGLProxy):
(WebKit::RemoteGraphicsContextGLProxy::prepareForDisplay):
Move Cocoa implemenation to an Objective-C++ file.

  • WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm: Added.

(WebKit::RemoteGraphicsContextGLProxy::prepareForDisplay):
Set the display buffer contents directly to the WebGLLayer after
prepare.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
  • WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteModelHosting.mm:

(WebKit::PlatformCALayerRemoteModelHosting::dumpAdditionalProperties):
Unified build fixes.

6:18 AM Changeset in webkit [284370] by Carlos Garcia Campos
  • 8 edits
    2 adds in trunk/Source

[GLIB] Simplify SleepDisabler by checking if we are under sandbox
https://bugs.webkit.org/show_bug.cgi?id=231670

Reviewed by Adrian Perez de Castro.

Source/WebCore/PAL:

Current implementation always tries to connect to ScreenSaver interface and if that fails tries with the portal
one. It's simpler to check if we are under sandbox and it avoids a connection that we know is always going to
fail.

  • pal/system/glib/SleepDisablerGLib.cpp:

(PAL::SleepDisablerGLib::SleepDisablerGLib):
(PAL::SleepDisablerGLib::acquireInhibitor):
(PAL::SleepDisablerGLib::releaseInhibitor):
(PAL::SleepDisablerGLib::acquireInhibitorViaScreenSaverProxy): Deleted.
(PAL::SleepDisablerGLib::acquireInhibitorViaInhibitPortalProxy): Deleted.
(PAL::SleepDisablerGLib::releaseInhibitorViaScreenSaverProxy): Deleted.
(PAL::SleepDisablerGLib::releaseInhibitorViaInhibitPortalProxy): Deleted.

  • pal/system/glib/SleepDisablerGLib.h:

Source/WebKit:

Move functions to check if running inside a sandbox to WTF.

  • UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:

(WebKit::isInsideDocker): Deleted.
(WebKit::isInsideFlatpak): Deleted.
(WebKit::isInsideSnap): Deleted.

Source/WTF:

Move function to check if running inside a sandbox and add shouldUsePortal() to check whether portal sandbox
should be used. WEBKIT_USE_PORTAL environment variable can be used to force the use of portals when not running
under the sandbox.

  • wtf/PlatformGTK.cmake:
  • wtf/PlatformWPE.cmake:
  • wtf/glib/Sandbox.cpp: Added.

(WTF::isInsideFlatpak):
(WTF::isInsideDocker):
(WTF::isInsideSnap):
(WTF::shouldUsePortal):

  • wtf/glib/Sandbox.h: Added.
6:17 AM Changeset in webkit [284369] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Use USE(LARGE_TYPED_ARRAY)
https://bugs.webkit.org/show_bug.cgi?id=231885

Reviewed by Sam Weinig.

Fix USE(ADDRESS64) with USE(LARGE_TYPED_ARRAY). USE(ADDRESS64) is not correct (it should be CPU(ADDRESS64)).
It is coverted by JSTests/stress/typed-array-large-eventually-oob.js.

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

6:07 AM Changeset in webkit [284368] by Philippe Normand
  • 21 edits in trunk

[GStreamer] fast/mediastream/video-rotation tests are failing due to missing TestController::takeViewPortSnapshot
https://bugs.webkit.org/show_bug.cgi?id=231059

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Add video orientation and mirroring support to the GStreamer mock video source, all the way
to the media player. The video sink had to be adapted, to catch tag events and trigger
orientation update in the player.

  • platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:

(webKitGLVideoSinkSetMediaPlayerPrivate):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::getVideoOrientation):
(WebCore::MediaPlayerPrivateGStreamer::updateVideoOrientation):
(WebCore::MediaPlayerPrivateGStreamer::updateVideoSizeAndOrientationFromCaps):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
  • platform/graphics/gstreamer/MediaSampleGStreamer.cpp:

(WebCore::MediaSampleGStreamer::MediaSampleGStreamer):
(WebCore::MediaSampleGStreamer::createImageSample):

  • platform/graphics/gstreamer/MediaSampleGStreamer.h:

(WebCore::MediaSampleGStreamer::create):
(WebCore::MediaSampleGStreamer::createImageSample):

  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp:

(WebCore::MockRealtimeVideoSourceGStreamer::updateSampleBuffer):

Source/WebKit:

Implement setOrientationForMediaCapture for GStreamer ports. Because media capture runs in
the WebProcess for those ports, we need a new IPC message, sent from the UIProcess to the
WebProcess.

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetMockCameraOrientation):
(WKPageIsMockRealtimeMediaSourceCenterEnabled):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setOrientationForMediaCapture):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setOrientationForMediaCapture):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

Implement takeViewPortSnapshot for WPE and GTK, the WebView snapshot is exported to PNG and
serialized as a data URL.

  • WebKitTestRunner/TestController.cpp:
  • WebKitTestRunner/gtk/TestControllerGtk.cpp:

(WTR::TestController::takeViewPortSnapshot):

  • WebKitTestRunner/wpe/TestControllerWPE.cpp:

(WTR::TestController::takeViewPortSnapshot):

LayoutTests:

The video-rotation.html test was prone to flakyness in GStreamer ports, so a few changes were made:

  • don't append canvas to the page, that can "poison" future viewport snapshots
  • wait for a timeupdate before checking the first snapshot, that gives us some margin, so

the player might have repainted

  • catch validation errors so they're not logged to the console, that would introduce result

diffs in case the first validation was not successful

  • try at most 100 validations attempts. Ideally it would be nicer to rely on the

requestVideoFrameCallback API for this.

  • fast/mediastream/video-rotation.html:
  • platform/glib/TestExpectations:
5:43 AM Changeset in webkit [284367] by Carlos Garcia Campos
  • 10 edits
    1 add in trunk

[GTK][a11y] Add implementation of component interface when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=230257

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • SourcesGTK.txt:
  • accessibility/atspi/AccessibilityAtspiEnums.h:
  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::interfacesForObject):
(WebCore::AccessibilityObjectAtspi::path):
(WebCore::AccessibilityObjectAtspi::buildInterfaces const):

  • accessibility/atspi/AccessibilityObjectComponentAtspi.cpp: Added.

(WebCore::AccessibilityObjectAtspi::hitTest const):
(WebCore::AccessibilityObjectAtspi::elementRect const):
(WebCore::AccessibilityObjectAtspi::focus const):
(WebCore::AccessibilityObjectAtspi::opacity const):
(WebCore::AccessibilityObjectAtspi::scrollToMakeVisible const):
(WebCore::AccessibilityObjectAtspi::scrollToPoint const):

  • accessibility/atspi/AccessibilityRootAtspi.cpp:

(WebCore::AccessibilityRootAtspi::registerObject):
(WebCore::AccessibilityRootAtspi::serialize const):
(WebCore::AccessibilityRootAtspi::frameRect const):

  • accessibility/atspi/AccessibilityRootAtspi.h:
  • accessibility/atspi/xml/Component.xml:

Tools:

Add unit tests for component interface.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(testComponentHitTest):
(testComponentScrollTo):
(beforeAll):

5:26 AM Changeset in webkit [284366] by ntim@apple.com
  • 15 edits
    2 adds in trunk

Fix mouse selection on modal <dialog> text nodes
https://bugs.webkit.org/show_bug.cgi?id=231741

Reviewed by Antti Koivisto.

Tests:

  • editing/selection/modal-dialog-select-paragraph.html (tests this bug)
  • imported/w3c/web-platform-tests/inert/inert-node-is-unselectable.tentative.html (tests what

the canStartSelection check was supposed to fix)

The inert check in Node::canStartSelection() was too restrictive, which caused this bug to happen because
we set the root node as inert and then reset it for the modal <dialog> itself, causing the text in the
<dialog> to be unselectable. Instead, just mirror how -webkit-user-select: none; is implemented by
introducing RenderStyle::userSelectIncludingInert().

Source/WebCore:

  • dom/Node.cpp:

(WebCore::computeEditabilityFromComputedStyle):
(WebCore::Node::canStartSelection const):

  • dom/Position.cpp:

(WebCore::Position::nodeIsUserSelectNone):
(WebCore::Position::nodeIsUserSelectAll):
(WebCore::Position::isCandidate const):
(WebCore::Position::nodeIsInertOrUserSelectNone): Deleted.

  • dom/Position.h:
  • dom/PositionIterator.cpp:

(WebCore::PositionIterator::isCandidate const):

  • page/EventHandler.cpp:

(WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
(WebCore::EventHandler::canMouseDownStartSelect):
(WebCore::EventHandler::selectCursor):

  • page/Frame.cpp:

(WebCore::Frame::rangeForPoint):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::selectionColor const):
(WebCore::RenderElement::selectionBackgroundColor const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::collectSelectionGeometriesInternal):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::userSelectIncludingInert const):

Source/WebKit:

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:

(WebKit::InjectedBundleNodeHandle::isSelectableTextNode const):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::selectionPositionInformation):

LayoutTests:

  • editing/selection/modal-dialog-select-paragraph-expected.txt: Added.
  • editing/selection/modal-dialog-select-paragraph.html: Added.
4:33 AM Changeset in webkit [284365] by eocanha@igalia.com
  • 4 edits in trunk

[GLIB][GStreamer] test http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html is a flaky timeout since r278004
https://bugs.webkit.org/show_bug.cgi?id=229219
<rdar://problem/82059333>

Reviewed by Philippe Normand.

Source/WebCore:

Forward EOS from webaudio appsink to the main pipeline. For some reason, some intermediate
GstBin isn't forwarding the GST_MESSAGE_EOS emitted by the appsink added by webaudio, so
the code at MediaPlayerPrivateGStreamer::handleMessage() can't detect EOS properly and signal
it to the player and the HTMLMediaElement.

  • platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:

(WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad): Listen to the EOS signal of each created appsink and forward it to the main pipeline bus as GST_MESSAGE_EOS.
(WebCore::AudioSourceProviderGStreamer::handleRemovedDeinterleavePad): Remove the signal handler on pad destruction.

LayoutTests:

Give some more time to the frequency analyzer to detect activity.

  • http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html:
3:47 AM Changeset in webkit [284364] by ysuzuki@apple.com
  • 4 edits in trunk

Remove AVOID_NATIVE_INT128_T
https://bugs.webkit.org/show_bug.cgi?id=231888

Reviewed by Mark Lam.

Source/WTF:

  • wtf/Int128.h:

Tools:

We can test Int128 without AVOID_NATIVE_INT128_T.

  • TestWebKitAPI/Tests/WTF/Int128.cpp:

(TestWebKitAPI::TestUnary):
(TestWebKitAPI::TestBinary):
(TestWebKitAPI::ToNative):
(TestWebKitAPI::FromNative):
(TestWebKitAPI::TestVsNative):
(TestWebKitAPI::TEST):

3:40 AM Changeset in webkit [284363] by commit-queue@webkit.org
  • 2 edits in trunk

Add my github username to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=231889

Patch by Rob Buis <rbuis@igalia.com> on 2021-10-18
Reviewed by Manuel Rego Casasnovas.

  • metadata/contributors.json:
3:23 AM Changeset in webkit [284362] by commit-queue@webkit.org
  • 2 edits in trunk

Add my github username to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=231887

Unreviewed.

Patch by Xan Lopez <Xan Lopez> on 2021-10-18

  • metadata/contributors.json: add my github username.
3:16 AM Changeset in webkit [284361] by commit-queue@webkit.org
  • 44 edits in trunk

Implement parsing and animation support for offset-distance, offset-position, offset-anchor
https://bugs.webkit.org/show_bug.cgi?id=231491

Patch by Kiet Ho <Kiet Ho> on 2021-10-18
Reviewed by Antoine Quint.

LayoutTests/imported/w3c:

Updated relevant test expectations.

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • web-platform-tests/css/motion/animation/offset-anchor-composition-expected.txt:
  • web-platform-tests/css/motion/animation/offset-anchor-interpolation-expected.txt:
  • web-platform-tests/css/motion/animation/offset-distance-composition-expected.txt:
  • web-platform-tests/css/motion/animation/offset-distance-interpolation-expected.txt:
  • web-platform-tests/css/motion/animation/offset-position-composition-expected.txt:
  • web-platform-tests/css/motion/animation/offset-position-interpolation-expected.txt:
  • web-platform-tests/css/motion/animation/offset-position-interpolation.html: Fixed test to accept other length expressions as equivalent.
  • web-platform-tests/css/motion/inheritance-expected.txt:
  • web-platform-tests/css/motion/offset-supports-calc-expected.txt:
  • web-platform-tests/css/motion/parsing/offset-anchor-computed-expected.txt:
  • web-platform-tests/css/motion/parsing/offset-anchor-parsing-valid-expected.txt:
  • web-platform-tests/css/motion/parsing/offset-anchor-parsing-valid.html: Fixed test to accept "center" as an alternative to "center center", "calc(20% + 10px) center" as an alternative to "calc(10px + 20%) center".
  • web-platform-tests/css/motion/parsing/offset-distance-computed-expected.txt:
  • web-platform-tests/css/motion/parsing/offset-distance-parsing-valid-expected.txt:
  • web-platform-tests/css/motion/parsing/offset-position-computed-expected.txt:
  • web-platform-tests/css/motion/parsing/offset-position-parsing-valid-expected.txt:
  • web-platform-tests/css/motion/parsing/offset-position-parsing-valid.html: Fixed test to accept "center" as an alternative to "center center", "calc(20% + 10px) center" as an alternative to "calc(10px + 20%) center".
  • web-platform-tests/css/motion/parsing/offset-shorthand-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/motion/animation/offset-anchor-composition.html

imported/w3c/web-platform-tests/css/motion/animation/offset-anchor-interpolation.html
imported/w3c/web-platform-tests/css/motion/animation/offset-distance-composition.html
imported/w3c/web-platform-tests/css/motion/animation/offset-distance-interpolation.html
imported/w3c/web-platform-tests/css/motion/animation/offset-position-composition.html
imported/w3c/web-platform-tests/css/motion/animation/offset-position-interpolation.html
imported/w3c/web-platform-tests/css/motion/inheritance.html
imported/w3c/web-platform-tests/css/motion/offset-supports-calc.html
imported/w3c/web-platform-tests/css/motion/parsing/offset-anchor-computed.html
imported/w3c/web-platform-tests/css/motion/parsing/offset-anchor-parsing-valid.html
imported/w3c/web-platform-tests/css/motion/parsing/offset-distance-computed.html
imported/w3c/web-platform-tests/css/motion/parsing/offset-distance-parsing-valid.html
imported/w3c/web-platform-tests/css/motion/parsing/offset-position-computed.html
imported/w3c/web-platform-tests/css/motion/parsing/offset-position-parsing-valid.html

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForPosition):
(WebCore::valueForPositionOrAuto):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumePositionOrAuto):
(WebCore::CSSPropertyParser::parseSingleValue):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::offsetDistance const):
(WebCore::RenderStyle::setOffsetDistance):
(WebCore::RenderStyle::initialOffsetDistance):
(WebCore::RenderStyle::offsetPosition const):
(WebCore::RenderStyle::setOffsetPosition):
(WebCore::RenderStyle::initialOffsetPosition):
(WebCore::RenderStyle::offsetAnchor const):
(WebCore::RenderStyle::setOffsetAnchor):
(WebCore::RenderStyle::initialOffsetAnchor):

  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):

  • rendering/style/StyleRareNonInheritedData.h:
  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertPosition):
(WebCore::Style::BuilderConverter::convertPositionOrAuto):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml: Add new preference for CSS Motion Path support.

LayoutTests:

Update platform-specific test expectations to accommodate for newly added CSS properties.

  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
3:11 AM Changeset in webkit [284360] by ntim@apple.com
  • 8 edits
    6 adds
    2 deletes in trunk/LayoutTests/imported/w3c

Re-import shadow-dom WPT
https://bugs.webkit.org/show_bug.cgi?id=231845

Reviewed by Antoine Quint.

Upstream commit: https://github.com/web-platform-tests/wpt/commit/deaab24d4e359f4264ba8843fa87a558ed9e0b81

The flakiness of focus-pseudo-matches-on-shadow-host.html was due to not waiting for the "update rendering"
steps for autofocus to happen, which is flaky with the new autofocus behavior. This has been fixed by a Gecko
committer who had the issue on their side as well:

https://github.com/web-platform-tests/wpt/commit/7555902a6e5c2b2f285bc6d0e2e05b5f3229af6a

  • resources/resource-files.json:
  • web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html:
  • web-platform-tests/shadow-dom/focus/blur-on-shadow-host-delegatesFocus-expected.txt: Added.
  • web-platform-tests/shadow-dom/focus/blur-on-shadow-host-delegatesFocus.html: Added.
  • web-platform-tests/shadow-dom/focus/click-focus-delegatesFocus-click-method-expected.txt: Removed.
  • web-platform-tests/shadow-dom/focus/click-focus-delegatesFocus-click-method.html: Removed.
  • web-platform-tests/shadow-dom/focus/click-focus-delegatesFocus-click-expected.txt: Added.
  • web-platform-tests/shadow-dom/focus/click-focus-delegatesFocus-click.html: Added.
  • web-platform-tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host.html:
  • web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2.html:
  • web-platform-tests/shadow-dom/focus/focus-selector-delegatesFocus-expected.txt:
  • web-platform-tests/shadow-dom/focus/focus-selector-delegatesFocus.html:
  • web-platform-tests/shadow-dom/focus/focus-tab-on-shadow-host-expected.txt: Added.
  • web-platform-tests/shadow-dom/focus/focus-tab-on-shadow-host.html: Added.
  • web-platform-tests/shadow-dom/focus/w3c-import.log:
3:07 AM Changeset in webkit [284359] by svillar@igalia.com
  • 5 edits in trunk

[css-flexbox] Improve & simplify the flex-basis computation
https://bugs.webkit.org/show_bug.cgi?id=230755

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

The flex-basis computation code was a bit convoluted. It had some pre-computations for items
with intrinsic main size that were causing several issues due to reentrancy. Actually those
computations where not needed at all for the flex basis computation but for a later stage, the
computation of the hyphotetical main size in which we need to compute 'min-{width|height}: auto'.

That's why the code that was executed before the flex-basis computation is now part of
computeFlexItemMinMaxSizes(). As we are no longer doing a layout before computing the flex-basis,
a layout has to be added to those cases in which the main size is the block size of the child. Apart
from that the flex-basis computation uses a newly defined RAII class to set the main size of the item
to the value specified by flex-basis which is what the specs mandate.

Last but not least, the computeInnerFlexBaseSizeForChild() method was renamed to computeFlexBaseSizeForChild()
which fits better with the terminology used in the specs.

Flex basis computation is already covered by the WPT test suite, there is no need for extra tests. This patch
fixes the only flex-basis-* test case that was not passing.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild): Removed obsolete comment. Added
a layoutIfNeeded() as we cannot be sure that the item was already laid out any more.
(WebCore::ScopedFlexBasisAsMainSize::ScopedFlexBasisAsChildMainSize): New RAII class.
(WebCore::ScopedFlexBasisAsMainSize::~ScopedFlexBasisAsChildMainSize):
(WebCore::RenderFlexibleBox::computeFlexBaseSizeForChild): Renamed from computeInnerFlexBaseSizeForChild.
(WebCore::RenderFlexibleBox::computeFlexItemMinMaxSizes): Added relayoutChildren parameter.
(WebCore::RenderFlexibleBox::constructFlexItem): Moved code to computeFlexItemMinMaxSizes().
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::computeInnerFlexBaseSizeForChild): Deleted.

  • rendering/RenderFlexibleBox.h:

LayoutTests:

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

[MediaStream] Mock video source background not fully filled for custom video resolution
https://bugs.webkit.org/show_bug.cgi?id=231863

Patch by Philippe Normand <pnormand@igalia.com> on 2021-10-18
Reviewed by Xabier Rodriguez-Calvar.

The video frame buffer matches the captureSize, so its background should do the same.
this->size() is the final size of the media source, applied to the frame buffer before
notification to observers.

  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::generateFrame):

1:42 AM Changeset in webkit [284357] by sihui_liu@apple.com
  • 28 edits
    4 moves in branches/safari-612-branch/Source

Apply patch rdar://83956117

1:42 AM Changeset in webkit [284356] by sihui_liu@apple.com
  • 44 edits
    1 copy
    1 add in branches/safari-612-branch

Apply patch rdar://83953160

1:42 AM Changeset in webkit [284355] by sihui_liu@apple.com
  • 49 edits
    9 copies
    6 adds in branches/safari-612-branch

Apply patch rdar://83955623

1:41 AM Changeset in webkit [284354] by sihui_liu@apple.com
  • 37 edits
    10 copies
    1 add in branches/safari-612-branch

Apply patch rdar://83952929

1:41 AM Changeset in webkit [284353] by sihui_liu@apple.com
  • 8 edits in branches/safari-612-branch/Source

Apply patch rdar://83955481

1:41 AM Changeset in webkit [284352] by sihui_liu@apple.com
  • 16 edits in branches/safari-612-branch

Apply patch rdar://83953730

1:41 AM Changeset in webkit [284351] by sihui_liu@apple.com
  • 88 edits
    13 copies
    2 adds in branches/safari-612-branch

Apply patch rdar://83955868

1:25 AM Changeset in webkit [284350] by magomez@igalia.com
  • 2 edits in trunk

Add my github username to contributors.json

Unreviewed.

  • metadata/contributors.json:
1:17 AM Changeset in webkit [284349] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

Use-after-move of m_sockets in NetworkRTCProvider::close()
<https://webkit.org/b/231779>
<rdar://problem/84278026>

Reviewed by Youenn Fablet.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::close):

  • Replace WTFMove() with std::exchange() to make it clear that m_sockets will be emptied, then iterate on sockets to close them. Update ASSERT() to check that no sockets were added to m_sockets during the loop.
1:12 AM Changeset in webkit [284348] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] PutByVal's child5 should be KnownInt32Use / Int52RepUse in FTL
https://bugs.webkit.org/show_bug.cgi?id=231884
rdar://84357099

Reviewed by Robin Morisset.

JSTests:

  • stress/put-by-val-known-int32.js: Added.

(new.Uint8Array.1000000.map):

Source/JavaScriptCore:

The child5 of PutByVal should be KnownInt32Use or Int52RepUse.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):

1:05 AM Changeset in webkit [284347] by dino@apple.com
  • 25 edits
    13 copies
    3 adds in trunk

[WebXR] Stubs for WebXR Hand Input Module
https://bugs.webkit.org/show_bug.cgi?id=231123
<rdar://problem/83802135>

Reviewed by Sam Weinig.

Source/WebCore:

Add the IDL and stub implementations for the WebXR
Hand Input module:
https://immersive-web.github.io/webxr-hand-input/

The important class is WebXRHand, which is owned by
and accessible from the WebXRInputSource, which
itself is owned by the WebXRSession.

Test: http/wpt/webxr/xrHandInput_gc.html

  • CMakeLists.txt: Add new files.
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • Modules/webxr/WebXRSession.idl: Add a custom mark function that creates an opaque root.
  • bindings/js/JSWebXRSessionCustom.cpp:
  • Modules/webxr/WebXRFrame+HandInput.idl: Add new hand-related methods.
  • Modules/webxr/WebXRFrame.cpp:

(WebCore::WebXRFrame::getJointPose):
(WebCore::WebXRFrame::fillJointRadii):
(WebCore::WebXRFrame::fillPoses):

  • Modules/webxr/WebXRFrame.h:
  • Modules/webxr/WebXRHand.cpp: New files.

(WebCore::WebXRHand::create):
(WebCore::WebXRHand::WebXRHand):
(WebCore::WebXRHand::get):
(WebCore::WebXRHand::Iterator::Iterator):
(WebCore::WebXRHand::Iterator::next):
(WebCore::WebXRHand::session):

  • Modules/webxr/WebXRHand.h:

(WebCore::WebXRHand::size):
(WebCore::WebXRHand::createIterator):

  • Modules/webxr/WebXRHand.idl:
  • Modules/webxr/WebXRInputSource+HandInput.idl: Add WebXRHand accessor.
  • Modules/webxr/WebXRInputSource.cpp:

(WebCore::WebXRInputSource::update):

  • Modules/webxr/WebXRInputSource.h:

(WebCore::WebXRInputSource::hand const):

  • Modules/webxr/WebXRJointPose.cpp: New files.

(WebCore::WebXRJointPose::create):
(WebCore::WebXRJointPose::WebXRJointPose):

  • Modules/webxr/WebXRJointPose.h:

(WebCore::WebXRJointPose::radius const):

  • Modules/webxr/WebXRJointPose.idl:
  • Modules/webxr/WebXRJointSpace.cpp: New files.

(WebCore::WebXRJointSpace::create):
(WebCore::WebXRJointSpace::WebXRJointSpace):
(WebCore::WebXRJointSpace::nativeOrigin const):

  • Modules/webxr/WebXRJointSpace.h:

(WebCore::WebXRJointSpace::jointName const):

  • Modules/webxr/WebXRJointSpace.idl:
  • Modules/webxr/WebXRSpace.h: New virtual identifier for joint space subclass.

(WebCore::WebXRSpace::isJointSpace const):

  • Modules/webxr/WebXRSystem.cpp: Add a comment regarding the testing of

optional features (where the "hand-tracking" feature should be checked).
(WebCore::WebXRSystem::resolveRequestedFeatures const):

  • Modules/webxr/XRHandJoint.h: New file.
  • Modules/webxr/XRHandJoint.idl:
  • bindings/js/WebCoreBuiltinNames.h: Expose new mappings from published names

to internal names.

  • platform/xr/PlatformXR.h: Add "simulateHands" field to frame data for testing.
  • testing/FakeXRInputSourceInit.h: And similarly to the fake input source.
  • testing/FakeXRInputSourceInit.idl:
  • testing/WebFakeXRInputController.cpp: Allow the test system to fake a hand.

(WebCore::WebFakeXRInputController::WebFakeXRInputController):
(WebCore::WebFakeXRInputController::getFrameData):

  • testing/WebFakeXRInputController.h:

Source/WTF:

Add an ENABLE_WEBXR_HANDS compile time flag and a WebXRHandsEnabled preference.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • wtf/PlatformEnable.h:
  • wtf/PlatformEnableCocoa.h:

LayoutTests:

New test that checks an XRHand object can survive garbage collection.

  • http/wpt/webxr/xrHandInput_gc-expected.txt: Added.
  • http/wpt/webxr/xrHandInput_gc.html: Added.

Oct 17, 2021:

5:22 PM Changeset in webkit [284346] by Kocsen Chung
  • 2 edits in branches/safari-612-branch/Source/JavaScriptCore

Cherry-pick r284212. rdar://problem/84351869

Wasm LLInt should zero bytecodeIndex before throwing
https://bugs.webkit.org/show_bug.cgi?id=231688
<rdar://84207898>

Reviewed by Yusuke Suzuki.

After r283852, the unwinder can now ask WebAssembly frames for their bytecodeIndex.
We do write to the bytecodeIndex when throwing from the wasm throw opcode, but we
failed to write when trapping (e.g. throwing an OOB or Unreachable). The value of
the bytecodeIndex in this is case is not interesting, since these exceptions can't be
caught from Wasm, all we need to know is ensure there isn't an invalid left-over
value in that stack slot, so we zero it.

  • llint/WebAssembly.asm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284212 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:21 PM Changeset in webkit [284345] by Kocsen Chung
  • 3 edits in branches/safari-612-branch/Source/ThirdParty/libwebrtc

Cherry-pick r284082. rdar://problem/84351872

Override guessed color space for incoming H.264/265 streams
https://bugs.webkit.org/show_bug.cgi?id=231353
<rdar://problem/83969311>

Reviewed by Youenn Fablet.

When the VTDecompressionSession decodes incoming H.264/H.265 samples,
it puts guessed color space attachments on the CVPixelBuffer, and the
guesses are based on video resolution. WebRTC streams however default
to being sRGB. So this patch overrides a guess with what we know the
stream will be. (Once we support different color spaces in WebRTC
video streams we'll need to adjust this.)

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH264.mm: (overrideColorSpaceAttachmentsIfNeeded): (decompressionOutputCallback):
  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.mm: (overrideColorSpaceAttachmentsIfNeeded): (h265DecompressionOutputCallback):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284082 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:15 PM Changeset in webkit [284344] by ddkilzer@apple.com
  • 7 edits in trunk/Source

Build fix #3: Adopt attribution AVCaptureSession SPI for GPU process
https://bugs.webkit.org/show_bug.cgi?id=231621
<rdar://problem/80748535>

Unreviewed build fix.

Source/WebCore/PAL:

  • pal/spi/cocoa/TCCSPI.h:
  • Use HAVE(TCC_IOS_14_BIG_SUR_SPI).

Source/WebKit:

  • Shared/Cocoa/TCCSoftLink.h:

(tcc_identity_create):

  • Shared/Cocoa/TCCSoftLink.mm:

(tcc_identity_create):

  • Use HAVE(TCC_IOS_14_BIG_SUR_SPI).

Source/WTF:

  • wtf/PlatformHave.h:

(HAVE_TCC_IOS_14_BIG_SUR_SPI): Add.

  • Used for TCC.framework SPI available in iOS 14 and macOS 11 Big Sur and later.
3:51 PM Changeset in webkit [284343] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

IFC progression (inline box borders).

Unreviewed.

2:19 PM Changeset in webkit [284342] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

Follow-up: WebKit::LocalConnection::createCredentialPrivateKey leaks an NSMutableDictionary
<https://webkit.org/b/231814>
<rdar://problem/84307054>

Unreviewed follow-up to address Darin's comments.

  • UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:

(WebKit::LocalConnection::createCredentialPrivateKey const):

  • Remove need for C-style cast by using a local variable for the mutable copy of the NSDictionary.
1:47 PM Changeset in webkit [284341] by mark.lam@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Make LLIntAssembly.h more readable.
https://bugs.webkit.org/show_bug.cgi?id=231876

Reviewed by Yusuki Suzuki.

In this patch, I did the following:

  1. Changed CodeOrigin to only dump the filename, and not the full path.
  1. Deferred printing the ".loc" metadata in $asm.debugAnnotation till we format the line to dump in $asm.formatDump. This enabled the ".loc" metadata to be dumped on the same line as the asm instruction.
  1. Changed $asm.codeOrigin to not dump multiple codeOrigin comments. The only times when there appears to be "multiple" codeOrigins for any given instruction is if the instruction before it was elided, thereby leaving the elided instruction's codeOrigin to be mis-attributed to the subsequent instruction.
  1. Moved the MIPS Assembler.putStr method to asm.rb. This method was already commonly used in arm.rb and arm64.rb previously. Hence, it belongs in common code.

Also enhanced it to support indenting by the column width of ".loc" debug
annotations if $enableDebugAnnotations is true. This keeps the ".loc" column
on the left clear of other content, thereby making it easy to visually filter
out that column when scanning through the generated asm code.

  1. Changed some code that called outp.puts directly to call $asm.putStr instead. This yields the nice alignment for easy visual filtering described in (4).
  1. Changed $preferredCommentStartColumn to be at column 40 to make the generated asm code more compact. However, if the backend is the C_LOOP, then change it back to 60 because C_LOOP code is more verbose and need the extra space.

Demo time:
Before this patch, LLIntAssembly.h looks like this:
`
#if !OFFLINE_ASM_X86 && !OFFLINE_ASM_X86_WIN && !OFFLINE_ASM_X86_64 && !OFFLINE_ASM_X86_64_WIN && !OFFLINE_ASM_ARMv7 && !OFFLINE_ASM_ARM64 && OFFLINE_ASM_ARM64E && !OFFLINE_ASM_MIPS && !OFFLINE_ASM_RISCV64 && !OFFLINE_ASM_C_LOOP && !OFFLINE_ASM_C_LOOP_WIN && !OFFLINE_ASM_ARMv7k && !OFFLINE_ASM_ARMv7s && OFFLINE_ASM_JSVALUE64 && !OFFLINE_ASM_BIGINT32 && OFFLINE_ASM_GIGACAGE_ENABLED && !OFFLINE_ASM_ASSERT_ENABLED && !OFFLINE_ASM_TRACING && OFFLINE_ASM_ADDRESS64 && OFFLINE_ASM_JIT && OFFLINE_ASM_WEBASSEMBLY && OFFLINE_ASM_HAVE_FAST_TLS && OFFLINE_ASM_WEBASSEMBLY_B3JIT
OFFLINE_ASM_BEGIN
OFFLINE_ASM_GLOBAL_LABEL(llintPCRangeStart)
".file 1 \"/Users/mlam/ws1/OpenSource/Source/JavaScriptCore/llint/LowLevelInterpreter.asm\"\n"
".file 2 \"/Users/mlam/ws1/OpenSource/WebKitBuild/Release/DerivedSources/JavaScriptCore/InitBytecodes.asm\"\n"
".file 3 \"/Users/mlam/ws1/OpenSource/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm\"\n"
".file 4 \"/Users/mlam/ws1/OpenSource/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm\"\n"
".file 5 \"/Users/mlam/ws1/OpenSource/WebKitBuild/Release/DerivedSources/JavaScriptCore/InitWasm.asm\"\n"
".file 6 \"/Users/mlam/ws1/OpenSource/Source/JavaScriptCore/llint/WebAssembly.asm\"\n"
".file 7 \"/Users/mlam/ws1/OpenSource/WebKitBuild/Release/usr/local/include/WebKitAdditions/LowLevelInterpreterAdditions.asm\"\n"
".loc 1 1672\n"

"\tbrk #0xc471\n" JavaScriptCore/llint/LowLevelInterpreter.asm:1672

".loc 1 1681\n"

OFFLINE_ASM_GLOBAL_LABEL(vmEntryToJavaScript)
".loc 1 1066\n"

"\tpacibsp\n" JavaScriptCore/llint/LowLevelInterpreter.asm:1066

".loc 1 1070\n"

"\tstp x29, x30, [sp, #-16]!\n" JavaScriptCore/llint/LowLevelInterpreter.asm:1070

".loc 1 1075\n"

"\tmov x29, sp\n" JavaScriptCore/llint/LowLevelInterpreter.asm:1075

".loc 1 1090\n"

"\tsub sp, x29, #176\n" JavaScriptCore/llint/LowLevelInterpreter.asm:1090

".loc 3 169\n"

"\tmovz x13, #48040, lsl #0\n" JavaScriptCore/llint/LowLevelInterpreter64.asm:169

".loc 3 169\n"

"\tadd x17, x1, x13, lsl #0\n" JavaScriptCore/llint/LowLevelInterpreter64.asm:169

".loc 3 169\n"

"\tldr w4, [x17, #0]\n" JavaScriptCore/llint/LowLevelInterpreter64.asm:169

".loc 3 170\n"

"\tcbnz w4, " LOCAL_LABEL_STRING(_offlineasm_doVMEntrycheckVMEntryPermission) "\n" JavaScriptCore/llint/LowLevelInterpreter64.asm:170

".loc 3 172\n"

"\tstr x1, [sp, #0]\n" JavaScriptCore/llint/LowLevelInterpreter64.asm:172

...

".loc 3 309\n"

"\tmov x3, x0\n" JavaScriptCore/llint/LowLevelInterpreter64.asm:309

".loc 1 1\n"
#if OS(DARWIN)

"\tL_offlineasm_loh_adrp_1:\n" JavaScriptCore/llint/LowLevelInterpreter.asm:1
"\tadrp x2, " LOCAL_REFERENCE(g_config) "@GOTPAGE\n"
"\tL_offlineasm_loh_ldr_1:\n"
"\tldr x2, [x2, " LOCAL_REFERENCE(g_config) "@GOTPAGEOFF]\n"

#elif OS(LINUX)

"\tadrp x2, :got:" LOCAL_REFERENCE(g_config) "\n"
"\tldr x2, [x2, :got_lo12:" LOCAL_REFERENCE(g_config) "]\n"

#else
#error Missing globaladdr implementation
#endif
".loc 1 1\n"

"\tadd x2, x2, #3072\n" JavaScriptCore/llint/LowLevelInterpreter.asm:1

`

After this patch, LLIntAssembly.h looks like this:
`
#if !OFFLINE_ASM_X86 && !OFFLINE_ASM_X86_WIN && !OFFLINE_ASM_X86_64 && !OFFLINE_ASM_X86_64_WIN && !OFFLINE_ASM_ARMv7 && !OFFLINE_ASM_ARM64 && OFFLINE_ASM_ARM64E && !OFFLINE_ASM_MIPS && !OFFLINE_ASM_RISCV64 && !OFFLINE_ASM_C_LOOP && !OFFLINE_ASM_C_LOOP_WIN && !OFFLINE_ASM_ARMv7k && !OFFLINE_ASM_ARMv7s && OFFLINE_ASM_JSVALUE64 && !OFFLINE_ASM_BIGINT32 && OFFLINE_ASM_GIGACAGE_ENABLED && !OFFLINE_ASM_ASSERT_ENABLED && !OFFLINE_ASM_TRACING && OFFLINE_ASM_ADDRESS64 && OFFLINE_ASM_JIT && OFFLINE_ASM_WEBASSEMBLY && OFFLINE_ASM_HAVE_FAST_TLS && OFFLINE_ASM_WEBASSEMBLY_B3JIT

OFFLINE_ASM_BEGIN
OFFLINE_ASM_GLOBAL_LABEL(llintPCRangeStart)
".file 1 \"/Users/mlam/ws1/OpenSource/Source/JavaScriptCore/llint/LowLevelInterpreter.asm\"\n"
".file 2 \"/Users/mlam/ws1/OpenSource/WebKitBuild/Release/DerivedSources/JavaScriptCore/InitBytecodes.asm\"\n"
".file 3 \"/Users/mlam/ws1/OpenSource/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm\"\n"
".file 4 \"/Users/mlam/ws1/OpenSource/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm\"\n"
".file 5 \"/Users/mlam/ws1/OpenSource/WebKitBuild/Release/DerivedSources/JavaScriptCore/InitWasm.asm\"\n"
".file 6 \"/Users/mlam/ws1/OpenSource/Source/JavaScriptCore/llint/WebAssembly.asm\"\n"
".file 7 \"/Users/mlam/ws1/OpenSource/WebKitBuild/Release/usr/local/include/WebKitAdditions/LowLevelInterpreterAdditions.asm\"\n"

".loc 1 1672\n" "brk #0xc471 \n" LowLevelInterpreter.asm:1672

".loc 1 1681\n" OFFLINE_ASM_GLOBAL_LABEL(vmEntryToJavaScript)
".loc 1 1066\n" "pacibsp \n" LowLevelInterpreter.asm:1066
".loc 1 1070\n" "stp x29, x30, [sp, #-16]! \n"
LowLevelInterpreter.asm:1070
".loc 1 1075\n" "mov x29, sp \n" LowLevelInterpreter.asm:1075
".loc 1 1090\n" "sub sp, x29, #176 \n"
LowLevelInterpreter.asm:1090
".loc 3 169\n" "movz x13, #48040, lsl #0 \n" LowLevelInterpreter64.asm:169

"add x17, x1, x13, lsl #0 \n"
"ldr w4, [x17, #0] \n"

".loc 3 170\n" "cbnz w4, " LOCAL_LABEL_STRING(_offlineasm_doVMEntrycheckVMEntryPermission) " \n" LowLevelInterpreter64.asm:170
".loc 3 172\n" "str x1, [sp, #0] \n"
LowLevelInterpreter64.asm:172

...

".loc 3 309\n" "mov x3, x0 \n" LowLevelInterpreter64.asm:309

#if OS(DARWIN)

".loc 1 1\n" "L_offlineasm_loh_adrp_1: \n" LowLevelInterpreter.asm:1

"adrp x2, " LOCAL_REFERENCE(g_config) "@GOTPAGE \n"
"L_offlineasm_loh_ldr_1: \n"
"ldr x2, [x2, " LOCAL_REFERENCE(g_config) "@GOTPAGEOFF] \n"

#elif OS(LINUX)

"adrp x2, :got:" LOCAL_REFERENCE(g_config) " \n"
"ldr x2, [x2, :got_lo12:" LOCAL_REFERENCE(g_config) "] \n"

#else
#error Missing globaladdr implementation
#endif

".loc 1 1\n" "add x2, x2, #3072 \n"
`

  • offlineasm/asm.rb:
  • offlineasm/cloop.rb:
  • offlineasm/config.rb:
  • offlineasm/mips.rb:
  • offlineasm/parser.rb:
1:46 PM Changeset in webkit [284340] by ddkilzer@apple.com
  • 5 edits
    2 copies in trunk

Add tests for WTF::OSObjectPtr/adoptOSObject in Cocoa with and without ARC
<https://webkit.org/b/231819>
<rdar://problem/84312692>

Reviewed by Darin Adler.

Source/WTF:

  • wtf/OSObjectPtr.h:

(WTF::adoptOSObject):

  • Rename when building with ARC enabled to prevent leaks or over-releases when linking ARC and non-ARC code.
  • Add WARN_UNUSED_RETURN attribute to match WTF::adoptNS().

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • Add OSObjectPtrCocoa.mm and OSObjectPtrCocoaARC.mm source files to the project.
  • TestWebKitAPI/Tests/WTF/darwin/OSObjectPtr.cpp:

(TestWebKitAPI::TEST):

  • Make code work when compiled with ARC enabled.
  • Fix a pre-existing leak of dispatch_queue_t in RetainRelease test.
  • TestWebKitAPI/Tests/WTF/darwin/OSObjectPtrCocoa.mm: Add.
  • TestWebKitAPI/Tests/WTF/darwin/OSObjectPtrCocoaARC.mm: Add.
  • Add test files that #include OSObjectPtr.cpp.
1:19 PM Changeset in webkit [284339] by Fujii Hironori
  • 11 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening

  • platform/wincairo/fast/css/font-face-opentype-expected.txt:
  • platform/wincairo/fast/text/basic/015-expected.txt:
  • platform/wincairo/fast/text/whitespace/004-expected.txt:
  • platform/wincairo/fast/text/whitespace/005-expected.txt:
  • platform/wincairo/fast/text/whitespace/006-expected.txt:
  • platform/wincairo/fast/text/whitespace/007-expected.txt:
  • platform/wincairo/fast/text/whitespace/010-expected.txt:
  • platform/wincairo/fast/text/whitespace/011-expected.txt:
  • platform/wincairo/fast/text/whitespace/015-expected.txt:
  • platform/wincairo/fast/text/whitespace/016-expected.txt:
12:30 PM Changeset in webkit [284338] by Kocsen Chung
  • 92 edits
    26 deletes in branches/safari-612-branch

Restore state to r284288 due to build failures.

12:00 PM Changeset in webkit [284337] by BJ Burg
  • 7 edits
    2 deletes in trunk

[Cocoa] Web Inspector: remove _WKInspectorExtensionPrivateForTesting
https://bugs.webkit.org/show_bug.cgi?id=231784
<rdar://problem/84280608>

Reviewed by Timothy Hatcher.

Source/WebKit:

Promote the only method to be API for _WKInspectorExtension. It is needed
to implement some parts of the devtools API.

  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/_WKInspectorExtension.h:
  • UIProcess/API/Cocoa/_WKInspectorExtension.mm:

(-[_WKInspectorExtension evaluateScript:inTabWithIdentifier:completionHandler:]):

  • UIProcess/API/Cocoa/_WKInspectorExtensionPrivateForTesting.h: Removed.
  • UIProcess/API/Cocoa/_WKInspectorExtensionTesting.mm: Removed.
  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm:

(TEST):

9:54 AM Changeset in webkit [284336] by Simon Fraser
  • 5 edits
    6 adds in trunk

REGRESSION (r270850): Reference clip path clips in the wrong place when inside non-visible overflow
https://bugs.webkit.org/show_bug.cgi?id=231852
<rdar://83186229>

Reviewed by Tim Horton.
Source/WebCore:

When clipping CSS boxes with reference clip paths we need to give RenderSVGResourceClipper two
different rectangles; the objectBoundingBox that is used to compute clip path geometry,
and the bounds of the clipped content, so that the buffer-based clipping code path
can create an ImageBuffer of the appropriate size.

Previously, we confounded these two rectangles, resulting in various bugs.

Tests: css3/masking/reference-clip-path-bounds.html

css3/masking/reference-clip-path-objectBoundingBox-buffer-clip.html
css3/masking/reference-clip-path-objectBoundingBox-path-clip.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::setupClipPath):

  • rendering/svg/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::applyResource):
(WebCore::RenderSVGResourceClipper::applyClippingToContext):

  • rendering/svg/RenderSVGResourceClipper.h:

LayoutTests:

Tests for reference clip-path with box-shadows and enclosing oveflow:hidden.

  • css3/masking/reference-clip-path-bounds-expected.html: Added.
  • css3/masking/reference-clip-path-bounds.html: Added.
  • css3/masking/reference-clip-path-objectBoundingBox-buffer-clip-expected.html: Added.
  • css3/masking/reference-clip-path-objectBoundingBox-buffer-clip.html: Added.
  • css3/masking/reference-clip-path-objectBoundingBox-path-clip-expected.html: Added.
  • css3/masking/reference-clip-path-objectBoundingBox-path-clip.html: Added.
9:38 AM Changeset in webkit [284335] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

AX: WebKit should not expose redundant AXGroups with missing role when the label is the same as the contents
https://bugs.webkit.org/show_bug.cgi?id=169924

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-17
Reviewed by Chris Fleizach.

Source/WebCore:

Don't expose groups with redundant accessibility text on the Mac.
Here's an example of one such group:

<div aria-label="1">1</div>

This group is not useful to accessibility clients. Instead, we
expose the text contents directly.

Test: accessibility/ignore-redundant-accessibility-text-groups.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::textUnderElement const):
Instead of asserting when we try to get the text of an element in a
document that needs a style update, return an empty string.

  • accessibility/mac/AccessibilityObjectMac.mm:

(WebCore::shouldIgnoreGroup): Added.
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const):

LayoutTests:

Add a test ensuring WebKit appropriately does and doesn't expose
groups with redundant accessibility text.

  • accessibility/mac/ignore-redundant-accessibility-text-groups-expected.txt: Added.
  • accessibility/mac/ignore-redundant-accessibility-text-groups.html: Added.
7:45 AM Changeset in webkit [284334] by Antti Koivisto
  • 13 edits
    2 adds in trunk

[LFC][Integration] Support background-clip:text on inline boxes
https://bugs.webkit.org/show_bug.cgi?id=231877

Reviewed by Alan Bujtas.

Source/WebCore:

Implement text mask painting.

Test: fast/inline/inline-background-clip-text.html

  • layout/integration/InlineIteratorBoxLegacyPath.h:

(WebCore::InlineIterator::BoxLegacyPath::firstLeafBoxForInlineBox const):
(WebCore::InlineIterator::BoxLegacyPath::lastLeafBoxForInlineBox const):

  • layout/integration/InlineIteratorBoxModernPath.h:

(WebCore::InlineIterator::BoxModernPath::firstLeafBoxForInlineBox const):
(WebCore::InlineIterator::BoxModernPath::lastLeafBoxForInlineBox const):
(WebCore::InlineIterator::BoxModernPath::isWithinInlineBox):

  • layout/integration/InlineIteratorInlineBox.cpp:

(WebCore::InlineIterator::InlineBox::firstLeafBox const):
(WebCore::InlineIterator::InlineBox::lastLeafBox const):
(WebCore::InlineIterator::InlineBox::endLeafBox const):

Add iterator support for getting leaf boxes of an inline box.

  • layout/integration/InlineIteratorInlineBox.h:
  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::printReason):
(WebCore::LayoutIntegration::canUseForRenderInlineChild):

  • layout/integration/LayoutIntegrationCoverage.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):

Paint the mask directly using TextBoxPainter instead of recursing to the general painting code.

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::TextBoxPainter):

  • rendering/TextBoxPainter.h:

LayoutTests:

  • fast/inline/inline-background-clip-text-expected.html: Added.
  • fast/inline/inline-background-clip-text.html: Added.

Oct 16, 2021:

10:58 PM Changeset in webkit [284333] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Adjust the logical right side of the line with line spanning inline boxes
https://bugs.webkit.org/show_bug.cgi?id=231862

Reviewed by Antti Koivisto.

This patch is in preparation for supporting "box-decoration-break: clone".

  1. The line spanning inline box takes up space on the line (see line logical width)
  2. The inline box may be getting closed on the line (do not double account for the end width, see handleInlineContent )
  3. When we commit the inline box closing, turn the ending into just a normal run (see appendInlineBoxEnd )
  • layout/formattingContexts/inline/InlineLine.cpp:

(WebCore::Layout::Line::initialize):
(WebCore::Layout::Line::appendInlineBoxStart):
(WebCore::Layout::Line::appendInlineBoxEnd):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineLevelBox):
(WebCore::Layout::Line::appendLineBreak):
(WebCore::Layout::Line::appendWordBreakOpportunity):

  • layout/formattingContexts/inline/InlineLine.h:

(WebCore::Layout::Line::contentLogicalRight const):
(WebCore::Layout::Line::lineSpanningInlineBoxRunEnds const):
(WebCore::Layout::Line::lastRunLogicalRight const):

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::handleInlineContent):
(WebCore::Layout::LineBuilder::rebuildLineForTrailingSoftHyphen):

9:52 PM Changeset in webkit [284332] by ysuzuki@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Use SourceID in SamplingProfiler
https://bugs.webkit.org/show_bug.cgi?id=231855

Reviewed by Mark Lam.

SamplingProfiler was still using intptr_t. We replace it with SourceID.
We also define internalSourceID and aggregatedExternalSourceID in SourceID.h.
They are special SourceID internally used in SamplingProfiler.

  • bytecode/SourceID.h:
  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::StackFrame::sourceID):
(JSC::SamplingProfiler::reportTopFunctions):

  • runtime/SamplingProfiler.h:
9:03 PM Changeset in webkit [284331] by ddkilzer@apple.com
  • 9 edits in trunk/Source/WebKit

[WebAuthn] Many Objective-C classes leak their instance variables
<https://webkit.org/b/231834>
<rdar://problem/84317190>

Reviewed by Brent Fulgham.

  • UIProcess/API/Cocoa/_WKAuthenticationExtensionsClientInputs.mm:

(-[_WKAuthenticationExtensionsClientInputs dealloc]):

  • UIProcess/API/Cocoa/_WKPublicKeyCredentialCreationOptions.mm:

(-[_WKPublicKeyCredentialCreationOptions dealloc]):

  • UIProcess/API/Cocoa/_WKPublicKeyCredentialDescriptor.mm:

(-[_WKPublicKeyCredentialDescriptor dealloc]):

  • UIProcess/API/Cocoa/_WKPublicKeyCredentialEntity.mm:

(-[_WKPublicKeyCredentialEntity dealloc]):

  • UIProcess/API/Cocoa/_WKPublicKeyCredentialParameters.mm:

(-[_WKPublicKeyCredentialParameters dealloc]):

  • UIProcess/API/Cocoa/_WKPublicKeyCredentialRelyingPartyEntity.mm:

(-[_WKPublicKeyCredentialRelyingPartyEntity dealloc]):

  • UIProcess/API/Cocoa/_WKPublicKeyCredentialRequestOptions.mm:

(-[_WKPublicKeyCredentialRequestOptions dealloc]):

  • UIProcess/API/Cocoa/_WKPublicKeyCredentialUserEntity.mm:

(-[_WKPublicKeyCredentialUserEntity dealloc]):

  • Add -dealloc methods that release instance variables.
9:00 PM Changeset in webkit [284330] by rmorisset@apple.com
  • 91 edits
    3 adds in trunk

Allow WASM to use up to 4GB
https://bugs.webkit.org/show_bug.cgi?id=229353
rdar://81603447

Reviewed by Yusuke Suzuki.

JSTests:

The big-wasm-memory/wasm-memory-requested... tests used to simply expect an OOM at 2GB.
They now expect success at 4GB, and failure at 4GB+1.
The exceptions they expect are now more specific, as previously there was a rounding issue that was causing the specific exceptions not to be thrown (resulting in the generic OOM exception later in the code).
Finally I made them only run on 64-bit platforms since we don't support typed arrays >=2GB on 32-bits, and I made them only run in one configuration since they can take a little bit of time.

I also added a few new tests, specifically checking our handling of large typed arrays, and especially of indices above INT32_MAX.

  • stress/big-wasm-memory-grow-no-max.js:

(test):

  • stress/big-wasm-memory-grow.js:

(test):

  • stress/big-wasm-memory.js:

(test):

  • stress/typed-array-always-large.js: Added.

(getArrayLength):
(getByVal):
(putByVal):
(test):

  • stress/typed-array-eventually-large.js: Added.

(getArrayLength):
(getByVal):
(putByVal):
(test):

  • stress/typed-array-large-eventually-oob.js: Added.

(getArrayLength):
(getByVal):
(putByVal):
(test):

  • wasm/regress/wasm-memory-requested-more-than-MAX_ARRAY_BUFFER_SIZE-2.js:
  • wasm/regress/wasm-memory-requested-more-than-MAX_ARRAY_BUFFER_SIZE.js:

Source/JavaScriptCore:

While increasing MAX_ARRAY_BUFFER_SIZE to 4GB was easy, it was not remotely the only thing required to get this to work:

  • 4GB is not representable in a uint32_t, so I changed all length of ArrayBuffer/TypedArray/etc.. to being size_t.
  • This also required changing NewTypedArray in all of LLInt/Baseline/DFG/FTL to accept a non-int32 size.

In order to avoid performance regressions, I had to add speculation in the DFG/FTL, which now have two versions of NewTypedArray (one that takes an Int32 and one that takes a StrictInt52)

  • Similarly, GetArrayLength and GetTypedArrayByteOffset now can either return an Int32 or a larger number.

I also had to split them in the DFG/FTL, see GetTypedArrayLengthAsInt52 and GetTypedArrayByteOffsetAsInt52 for examples

  • In turns, I had to add CheckInBoundsInt52 since CheckInBounds could not accept the result of GetTypedArrayLengthAsInt52
  • I modified the runtime functions for GetByVal/PutByVal/DataViewGet/DataViewSet/AtomicsXXX to accept non-Int32 indices, since for {Int8/UInt8/UInt8Clamped}Array, a maximum size of 4GB implies indices > 2B.
  • I added a "mayBeLargeTypedArray" bit to ArrayProfile/UnlinkedArrayProfile/DFG::ArrayMode to track whether such a non-Int32 index was seen to allow proper speculation and specialization of fast paths in the DFG/FTL.

I then updated the runtime functions used by the slow paths to correctly update it.

Unfortunately I ran out of time to add all the speculations/update all the fast paths.
So the following will have to wait for a follow-up patch:

  • Accepting large indices in the fast path of GetByVal in the LLInt
  • Accepting large indices in the fast paths generated by AccessCase/PolymorphicAccess
  • Accepting large indices in the fast paths generated by the DFG/FTL for each of GetByVal/PutByVal/DataViewGet/DataViewSet/AtomicsXXX

The current patch is functional, it will just have dreadful performance if trying to use indices >2B in a {Int8/UInt8/UInt8Clamped}Array.

Other minor changes in this patch:

  • Fixed an undefined behavior in ArrayBuffer::createInternal where memcpy could be called on nullptr (the spec explicitly bans this even when length is 0)
  • Replaced some repetitive and error-prone bounds checking by calls to WTF::isSumSmallerThanOrEqual, which is clearer, shorter, and reuse CheckedArithmetic facilities to avoid overflow issues.
  • Fixed a variety of obsolete comments
  • Added support for branch64(RelationalCondition cond, RegisterID left, Imm64 right)

(there was already support for the same but with TrustedImm64)

  • Made various AbstractMacroAssembler function constexpr as part of the previous point
  • assembler/AbstractMacroAssembler.cpp:
  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::TrustedImmPtr::TrustedImmPtr):
(JSC::AbstractMacroAssembler::TrustedImmPtr::asIntptr):
(JSC::AbstractMacroAssembler::TrustedImmPtr::asPtr):
(JSC::AbstractMacroAssembler::ImmPtr::ImmPtr):
(JSC::AbstractMacroAssembler::ImmPtr::asTrustedImmPtr):
(JSC::AbstractMacroAssembler::TrustedImm32::TrustedImm32):
(JSC::AbstractMacroAssembler::Imm32::Imm32):
(JSC::AbstractMacroAssembler::Imm32::asTrustedImm32 const):
(JSC::AbstractMacroAssembler::TrustedImm64::TrustedImm64):
(JSC::AbstractMacroAssembler::Imm64::Imm64):
(JSC::AbstractMacroAssembler::Imm64::asTrustedImm64 const):
(JSC::AbstractMacroAssembler::canBlind):
(JSC::AbstractMacroAssembler::shouldBlindForSpecificArch):

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::branch64):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::shouldBlindForSpecificArch):
(JSC::MacroAssemblerARM64::branch64):

  • assembler/MacroAssemblerARM64E.h:

(JSC::MacroAssemblerARM64E::untagArrayPtrLength64):
(JSC::MacroAssemblerARM64E::untagArrayPtrLength32): Deleted.

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::canBlind):
(JSC::MacroAssemblerX86Common::shouldBlindForSpecificArch):

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::needsScratchFPR const):
(JSC::AccessCase::generateWithGuard):

  • bytecode/ArrayProfile.h:

(JSC::ArrayProfile::setMayBeLargeTypedArray):
(JSC::ArrayProfile::mayBeLargeTypedArray const):
(JSC::UnlinkedArrayProfile::UnlinkedArrayProfile):
(JSC::UnlinkedArrayProfile::update):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGArrayMode.cpp:

(JSC::DFG::ArrayMode::refine const):

  • dfg/DFGArrayMode.h:

(JSC::DFG::ArrayMode::ArrayMode):
(JSC::DFG::ArrayMode::mayBeLargeTypedArray const):
(JSC::DFG::ArrayMode::withType const):
(JSC::DFG::ArrayMode::withSpeculation const):
(JSC::DFG::ArrayMode::withConversion const):
(JSC::DFG::ArrayMode::withTypeAndConversion const):
(JSC::DFG::ArrayMode::withArrayClassAndSpeculationAndMayBeLargeTypedArray const):
(JSC::DFG::ArrayMode::speculationFromProfile):
(JSC::DFG::ArrayMode::withSpeculationFromProfile const):
(JSC::DFG::ArrayMode::withProfile const):
(JSC::DFG::ArrayMode::operator== const):
(JSC::DFG::ArrayMode::withArrayClass const): Deleted.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicGetter):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGCommon.h:

(JSC::DFG::enableInt52):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::convertToGetArrayLength):
(JSC::DFG::FixupPhase::prependGetArrayLength): Deleted.

  • dfg/DFGGenerationInfo.h:
  • dfg/DFGHeapLocation.cpp:

(WTF::printInternal):

  • dfg/DFGHeapLocation.h:
  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
  • dfg/DFGNode.h:

(JSC::DFG::Node::hasStorageChild const):
(JSC::DFG::Node::storageChildIndex):
(JSC::DFG::Node::hasArrayMode):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:

(JSC::DFG::putByVal):
(JSC::DFG::newTypedArrayWithSize):
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSSALoweringPhase.cpp:

(JSC::DFG::SSALoweringPhase::handleNode):
(JSC::DFG::SSALoweringPhase::lowerBoundsCheck):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::jumpForTypedArrayOutOfBounds):
(JSC::DFG::SpeculativeJIT::emitTypedArrayBoundsCheck):
(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
(JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
(JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
(JSC::DFG::SpeculativeJIT::cageTypedArrayStorage):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset):
(JSC::DFG::SpeculativeJIT::compileGetArrayLength):
(JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithSize):
(JSC::DFG::SpeculativeJIT::emitNewTypedArrayWithSizeInRegister):
(JSC::DFG::SpeculativeJIT::compileNewTypedArray):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByVal):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithInt52Size):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayLengthAsInt52):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffsetAsInt52):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGTypeCheckHoistingPhase.cpp:

(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):

  • dfg/DFGValidate.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::validateAIState):
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::emitGetTypedArrayByteOffsetExceptSettingResult):
(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffsetAsInt52):
(JSC::FTL::DFG::LowerDFGToB3::compileGetArrayLength):
(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayLengthAsInt52):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckInBoundsInt52):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):
(JSC::FTL::DFG::LowerDFGToB3::emitNewTypedArrayWithSize):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • ftl/FTLOutput.h:

(JSC::FTL::Output::load64NonNegative):

  • jit/IntrinsicEmitter.cpp:

(JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):

  • jit/JITOperations.cpp:

(JSC::putByVal):
(JSC::getByVal):

  • llint/LLIntOfflineAsmConfig.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::getByVal):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ArrayBuffer.cpp:

(JSC::SharedArrayBufferContents::SharedArrayBufferContents):
(JSC::ArrayBufferContents::ArrayBufferContents):
(JSC::ArrayBufferContents::tryAllocate):
(JSC::ArrayBuffer::create):
(JSC::ArrayBuffer::createAdopted):
(JSC::ArrayBuffer::createFromBytes):
(JSC::ArrayBuffer::tryCreate):
(JSC::ArrayBuffer::createUninitialized):
(JSC::ArrayBuffer::tryCreateUninitialized):
(JSC::ArrayBuffer::createInternal):
(JSC::ArrayBuffer::clampValue):
(JSC::ArrayBuffer::clampIndex const):
(JSC::ArrayBuffer::sliceWithClampedIndex const):

  • runtime/ArrayBuffer.h:

(JSC::ArrayBufferContents::sizeInBytes const):
(JSC::ArrayBuffer::byteLength const):
(JSC::ArrayBuffer::gcSizeEstimateInBytes const):

  • runtime/ArrayBufferView.cpp:

(JSC::ArrayBufferView::ArrayBufferView):

  • runtime/ArrayBufferView.h:

(JSC::ArrayBufferView::byteOffset const):
(JSC::ArrayBufferView::byteLength const):
(JSC::ArrayBufferView::verifyByteOffsetAlignment):
(JSC::ArrayBufferView::verifySubRangeLength):
(JSC::ArrayBufferView::clampOffsetAndNumElements):
(JSC::ArrayBufferView::setImpl):
(JSC::ArrayBufferView::setRangeImpl):
(JSC::ArrayBufferView::getRangeImpl):
(JSC::ArrayBufferView::zeroRangeImpl):
(JSC::ArrayBufferView::calculateOffsetAndLength): Deleted.

  • runtime/AtomicsObject.cpp:
  • runtime/DataView.cpp:

(JSC::DataView::DataView):
(JSC::DataView::create):

  • runtime/DataView.h:
  • runtime/GenericTypedArrayView.h:
  • runtime/GenericTypedArrayViewInlines.h:

(JSC::GenericTypedArrayView<Adaptor>::GenericTypedArrayView):
(JSC::GenericTypedArrayView<Adaptor>::create):
(JSC::GenericTypedArrayView<Adaptor>::tryCreate):
(JSC::GenericTypedArrayView<Adaptor>::createUninitialized):
(JSC::GenericTypedArrayView<Adaptor>::tryCreateUninitialized):
(JSC::GenericTypedArrayView<Adaptor>::subarray const): Deleted.

  • runtime/JSArrayBufferView.cpp:

(JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
(JSC::JSArrayBufferView::byteLength const):
(JSC::JSArrayBufferView::slowDownAndWasteMemory):
(JSC::JSArrayBufferView::possiblySharedImpl):

  • runtime/JSArrayBufferView.h:

(JSC::JSArrayBufferView::sizeOf):
(JSC::JSArrayBufferView::ConstructionContext::length const):
(JSC::JSArrayBufferView::length const):

  • runtime/JSArrayBufferViewInlines.h:

(JSC::JSArrayBufferView::byteOffsetImpl):
(JSC::JSArrayBufferView::byteOffset):
(JSC::JSArrayBufferView::byteOffsetConcurrently):

  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::toIndex const):
(JSC::JSValue::toTypedArrayIndex const):

  • runtime/JSDataView.cpp:

(JSC::JSDataView::create):
(JSC::JSDataView::createUninitialized):
(JSC::JSDataView::set):
(JSC::JSDataView::setIndex):

  • runtime/JSDataView.h:
  • runtime/JSDataViewPrototype.cpp:

(JSC::getData):
(JSC::setData):

  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::constructGenericTypedArrayViewWithArguments):
(JSC::constructGenericTypedArrayViewImpl):

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::create):
(JSC::JSGenericTypedArrayView<Adaptor>::createWithFastVector):
(JSC::JSGenericTypedArrayView<Adaptor>::createUninitialized):
(JSC::JSGenericTypedArrayView<Adaptor>::validateRange):
(JSC::JSGenericTypedArrayView<Adaptor>::setWithSpecificType):
(JSC::JSGenericTypedArrayView<Adaptor>::set):

  • runtime/JSObject.h:

(JSC::JSObject::putByIndexInline):
(JSC::JSObject::tryGetIndexQuickly const):
(JSC::JSObject::trySetIndexQuickly):
(JSC::JSObject::canSetIndexQuickly): Deleted.

  • runtime/JSObjectInlines.h:

(JSC::JSObject::getIndexQuicklyForTypedArray const):
(JSC::JSObject::setIndexQuicklyForArrayStorageIndexingType):
(JSC::JSObject::trySetIndexQuicklyForTypedArray):
(JSC::JSObject::canSetIndexQuicklyForTypedArray const): Deleted.

  • runtime/Operations.h:

(JSC::getByValWithIndex):

  • wasm/WasmPageCount.h:

Source/WebCore:

Some parts of WebCore use TypedArrays, and would not build after I made the length() function on typed arrays return UCPURegister instead of uint32_t.
Most fixes were trivial, the only exception is SerializedScriptValue.cpp, where I had to increment the version number, as ArrayBuffer (and ArrayBufferViews) now write/read their length in a 64-bit field (and same for the byteOffset of ArrayBufferView).

I also had to add a test in PixelBuffer.cpp that the size of the ArrayBuffer it will try to allocate is < INT32_MAX.
Otherwise, the test LayoutTests/fast/shapes/shape-outside-floats/shape-outside-imagedata-overflow.html which checks that very large images are properly rejected without crashing, would timeout.

No new tests, as the code is already extensively covered by existing tests, and I implemented no new features.

  • Modules/webaudio/AudioBuffer.cpp:

(WebCore::AudioBuffer::copyFromChannel):
(WebCore::AudioBuffer::copyToChannel):

  • Modules/webaudio/RealtimeAnalyser.cpp:

(WebCore::RealtimeAnalyser::getByteFrequencyData):
(WebCore::RealtimeAnalyser::getFloatTimeDomainData):
(WebCore::RealtimeAnalyser::getByteTimeDomainData):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::dumpArrayBufferView):
(WebCore::CloneSerializer::dumpImageBitmap):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::readArrayBufferImpl):
(WebCore::CloneDeserializer::readArrayBuffer):
(WebCore::CloneDeserializer::readArrayBufferViewImpl):
(WebCore::CloneDeserializer::readArrayBufferView):

  • bindings/js/SerializedScriptValue.h:

(WebCore::SerializedScriptValue::encode const):
(WebCore::SerializedScriptValue::decode):

  • fileapi/NetworkSendQueue.cpp:

(WebCore::NetworkSendQueue::enqueue):

  • platform/graphics/PixelBuffer.cpp:

(WebCore::PixelBuffer::tryCreate):

  • platform/graphics/iso/ISOBox.h:

Source/WTF:

Made some of CheckedArithmetic constexpr, and added isSumSmallerThanOrEqual since it is a commonly used test in ArrayBuffer and easy to get wrong in terms of overflow.

  • wtf/CheckedArithmetic.h:

(WTF::isInBounds):
(WTF::convertSafely):
(WTF::isSumSmallerThanOrEqual):

LayoutTests:

Rebaselined three following tests as different or fewer error messages appear on the console.
Also changed currentVersion in serialized-script-value.html from 9 to 10.

  • fast/canvas/canvas-getImageData-invalid-result-buffer-crash-expected.txt:
  • fast/storage/serialized-script-value.html:
  • webaudio/OfflineAudioContext-bad-buffer-crash-expected.txt:
  • webaudio/OfflineAudioContext/bad-buffer-length-expected.txt:
8:58 PM Changeset in webkit [284329] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WebKit

_WKRemoteWebInspectorViewController leaks an instance variable and should use a weak delegate
<https://webkit.org/b/231830>
<rdar://problem/84316056>

Reviewed by Brent Fulgham.

  • UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h:
  • Use a weak reference for the delegate.
  • UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:

(-[_WKRemoteWebInspectorViewController dealloc]): Add.

  • Fix leak by releasing _configuration instance variable.
4:41 PM Changeset in webkit [284328] by timothy_horton@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed, revert r284181

No longer needed because the root cause was reverted.

  • platform/mac-wk2/TestExpectations:
4:36 PM Changeset in webkit [284327] by Alan Bujtas
  • 4 edits
    2 adds in trunk

[LFC][IFC] Adjust the logical left side of the line with line spanning inline boxes
https://bugs.webkit.org/show_bug.cgi?id=231851

Reviewed by Antti Koivisto.

Source/WebCore:

This is in preparation for supporting "box-decoration-break: clone", where the
line spanning inline boxes do take up some space on the line with their horizontal margin, border and padding.

Test: fast/inline/inline-box-with-left-decoration-clone.html

  • layout/formattingContexts/inline/InlineLine.cpp:

(WebCore::Layout::Line::initialize):
(WebCore::Layout::Line::Run::Run):

  • layout/formattingContexts/inline/InlineLine.h:

LayoutTests:

  • fast/inline/inline-box-with-left-decoration-clone-expected.html: Added.
  • fast/inline/inline-box-with-left-decoration-clone.html: Added.
4:35 PM Changeset in webkit [284326] by timothy_horton@apple.com
  • 8 edits
    2 deletes in trunk/Source

Unreviewed, reverting r284143.

Caused a series of assertions in layout tests in EWS

Reverted changeset:

"Scroll To Text Fragment directive parsing"
https://bugs.webkit.org/show_bug.cgi?id=231410
https://commits.webkit.org/r284143

3:32 PM Changeset in webkit [284325] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

WebKit ignores inherited GCC_PREPROCESSOR_DEFINITIONS
https://bugs.webkit.org/show_bug.cgi?id=231867

Reviewed by Sam Weinig.

  • Configurations/BaseTarget.xcconfig:

Add a $(inherited) here like in every other project, so that we don't
just drop defines that come from above.

3:18 PM Changeset in webkit [284324] by commit-queue@webkit.org
  • 2 edits in trunk

Add github username for tetsuharuohzeki to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=231864

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2021-10-16
Reviewed by Fujii Hironori.

  • metadata/contributors.json:
2:14 PM Changeset in webkit [284323] by Alan Bujtas
  • 9 edits in trunk/Source/WebCore

[LFC][IFC] Add "line spanning line box start items" to Line
https://bugs.webkit.org/show_bug.cgi?id=231551

Reviewed by Antti Koivisto.

This patch is in preparation for supporting box-decoration-break: clone, where the line spanning
inline boxes may take up space on the line (border/padding).
This patch moves the construction of the spanning inline boxes to an earlier step, from LineBox to Line.

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::initialize):

1:32 PM Changeset in webkit [284322] by Simon Fraser
  • 4 edits in trunk

Page zoom is messed up after navigating back from a PDF
https://bugs.webkit.org/show_bug.cgi?id=231841
<rdar://72666365>

Reviewed by Tim Horton.

Source/WebKit:

A navigation back from a PDF is a FrameLoadType::Back, so resetting
m_mainFramePluginHandlesPageScaleGesture only for FrameLoadType::Standard is wrong.

For all navigations, the plugins seem to call
pluginScaleFactorDidChange/pluginZoomFactorDidChange/
mainFramePluginHandlesPageScaleGestureDidChange so it's safe to reset them for all
navigation types.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didCommitLoadForFrame):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/PageZoom.mm:

(TestWebKitAPI::TEST):

1:16 PM Changeset in webkit [284321] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r284300.
https://bugs.webkit.org/show_bug.cgi?id=231866

broke-apple-silicon-performance

Reverted changeset:

"[macOS] Add telemetry for system calls in WP"
https://bugs.webkit.org/show_bug.cgi?id=231836
https://commits.webkit.org/r284300

11:37 AM Changeset in webkit [284320] by Russell Epstein
  • 16 edits in branches/safari-612-branch

Revert "Apply patch. rdar://problem/83953730"

This reverts commit ee910ccd94f646fb5f318a78cfd6910432830a1e.

11:16 AM Changeset in webkit [284319] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

WebKit::LocalConnection::createCredentialPrivateKey leaks an NSMutableDictionary
<https://webkit.org/b/231814>
<rdar://problem/84307054>

Reviewed by Kate Cheney.

  • UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:

(WebKit::LocalConnection::createCredentialPrivateKey const):

  • Use RetainPtr<> and adoptNS to fix the leak.
10:16 AM Changeset in webkit [284318] by Alan Bujtas
  • 3 edits in trunk/LayoutTests

Undo some rebaseline in r284296.

Unreviewed.

  • platform/mac-bigsur/fast/text/capitalize-boundaries-expected.txt:
  • platform/mac-catalina/fast/text/capitalize-boundaries-expected.txt:
9:14 AM Changeset in webkit [284317] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Move overflowing content creation to LineBuilder::initialize
https://bugs.webkit.org/show_bug.cgi?id=231540

Reviewed by Antti Koivisto.

LineBuilder::initialize is going to handle all overflowing content initialization.
This is in preparation for adding spanning inline box items to the line (to support box-decoration-break: clone).

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::computedIntrinsicWidth):
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::placeInlineContent):
(WebCore::Layout::LineBuilder::candidateContentForLine):

  • layout/formattingContexts/inline/InlineLineBuilder.h:
  • layout/formattingContexts/inline/InlineTextItem.h:

(WebCore::Layout::InlineTextItem::right const):

7:55 AM Changeset in webkit [284316] by Angelos Oikonomopoulos
  • 2 edits in trunk

Add my github username to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=231861

Unreviewed.

  • metadata/contributors.json:
5:39 AM Changeset in webkit [284315] by Antti Koivisto
  • 7 edits in trunk/Source/WebCore

Use inline iterator for SVG reverse BiDI reordering
https://bugs.webkit.org/show_bug.cgi?id=231858

Reviewed by Alan Bujtas.

Share code.

  • layout/integration/InlineIteratorLogicalOrderTraversal.cpp:

(WebCore::InlineIterator::makeLineLogicalOrderCache):
(WebCore::InlineIterator::nextLeafOnLineInLogicalOrder):
(WebCore::InlineIterator::previousLeafOnLineInLogicalOrder):

No need to test for the cache, it is always there.

  • layout/integration/InlineIteratorLogicalOrderTraversal.h:

(WebCore::InlineIterator::leafBoxesInLogicalOrder):

Make template and move to header.

  • rendering/LegacyInlineFlowBox.cpp:

(WebCore::LegacyInlineFlowBox::collectLeafBoxesInLogicalOrder const): Deleted.

Not needed anymore.

  • rendering/LegacyInlineFlowBox.h:
  • rendering/svg/SVGRootInlineBox.cpp:

(WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
(WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
(WebCore::SVGRootInlineBox::reorderValueListsToLogicalOrder):
(WebCore::SVGRootInlineBox::reorderValueLists): Deleted.

Call the generic version.

  • rendering/svg/SVGRootInlineBox.h:
3:35 AM Changeset in webkit [284314] by Simon Fraser
  • 3 edits
    2 adds in trunk

Make sure child layers of top layer elements are rendered and correctly z-ordered (top-layer-stacking.html fails)
https://bugs.webkit.org/show_bug.cgi?id=231832

Reviewed by Antoine Quint.
Source/WebCore:

Top layer elements should create CSS stacking context, per https://fullscreen.spec.whatwg.org/#rendering

I decided to call isInTopLayerOrBackdrop() twice to avoid calling it every time this function
is called. It's a cheap function.

Test: fast/layers/dialog-is-stacking-context.html

  • style/StyleAdjuster.cpp:

(WebCore::Style::Adjuster::adjust const):

LayoutTests:

Ref test that compares a dialog with positioned children and one with children place
with margins.

  • fast/layers/dialog-is-stacking-context-expected.html: Added.
  • fast/layers/dialog-is-stacking-context.html: Added.
3:22 AM Changeset in webkit [284313] by graouts@webkit.org
  • 6 edits in trunk

Accelerated animations on ::backdrop shouldn't affect <dialog> (backdrop-animate-002.html fails)
https://bugs.webkit.org/show_bug.cgi?id=230008
<rdar://problem/82975766>

Reviewed by Simon Fraser and Tim Nguyen.

Source/WebCore:

We did not know how to access the ::backdrop renderer when running accelerated animations. To do so we now
implement full support to access the renderer for known pseudo-elements on Styleable with a new renderer()
method, including ::backdrop. We also make Styleable::fromRenderer() aware of ::backdrop such that the various
call sites for this function that deal with accelerated transform animations access the right element.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::renderer const):

  • style/Styleable.cpp:

(WebCore::Styleable::fromRenderer):
(WebCore::Styleable::renderer const):

  • style/Styleable.h:

(WebCore::Styleable::fromRenderer): Deleted.

LayoutTests:

3:16 AM Changeset in webkit [284312] by graouts@webkit.org
  • 8 edits
    2 adds in trunk

CSS Animations creation and sorting is incorrect and may lead to crash
https://bugs.webkit.org/show_bug.cgi?id=231812
<rdar://problem/82980774>

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark two progressions in a test that now passes entirely.

  • web-platform-tests/css/css-animations/Element-getAnimations-dynamic-changes.tentative-expected.txt:

Source/WebCore:

When we parse CSS properties related to CSS Animations, we create as many Animation objects as the maximum number
of values in one of the CSS Animations properties. These Animation objects are stored in an AnimationList which
is owned by RenderStyle and that we use to store all provided values such that they can be read back through the
computed style.

Upon finishing parsing those CSS properties, RenderStyle::adjustAnimations() is called and does two things that
were not quite correct.

First, it would attempt to remove animations that were in fact created for no good reason using the
Animation::isEmpty() method. That method was not quite right as it was only checking if the animation
name wasn't set but not whether the animation was explicitly marked as a "none" animation. This meant
that "none" animations could be considered as bogus animations and any animations after that one would
be mistakenly cleared.

Second, it would finish process the list of remaning animations by making sure that mis-matched CSS properties,
for instance three values for animation-duration and four values for animation-name, would be correctly represented
throughout the Animation objects. However, the function performing this work, AnimationList::fillUnsetProperties(),
used to reset the animation's name in case it wasn't explicitly set, which meant that Animation objects that did not
have a matching animation-name would end up with a valid one. This meant that further down the line, in
Styleable::updateCSSAnimations(), we couldn't distinguish Animation objects that were created without a
matching animation-name and discard those.

We've fixed those incorrect behaviors and we now have the expected number of animations created resulting in an additional
WPT PASS result.

Additionally, this also showed some issues around sorting CSS Animations in compareCSSAnimations() where we weren't
making a pointer comparison. This is now fixed and we now pass another WPT PASS result.

Test: webanimations/css-animation-sorting-crash.html

  • animation/WebAnimationUtilities.cpp:

(WebCore::compareCSSAnimations):

  • platform/animation/Animation.h:

(WebCore::Animation::isEmpty const):

  • platform/animation/AnimationList.cpp:

(WebCore::AnimationList::fillUnsetProperties):

LayoutTests:

Add a new test that used to crash before the source change.

  • animations/animation-remove-element-crash.html: Remove a line that was now a failure since only a

single animation should be created.

  • webanimations/css-animation-sorting-crash-expected.txt: Added.
  • webanimations/css-animation-sorting-crash.html: Added.
2:07 AM Changeset in webkit [284311] by Lauro Moura
  • 2 edits in trunk/Source/WebKit

[GTK4] Update signal name to monitor window resize
https://bugs.webkit.org/show_bug.cgi?id=231854

Reviewed by Carlos Garcia Campos.

Using size-changed (previous signal name) makes the MiniBrowser crash
running the WebDriver tests.

The signal name was changed in
https://gitlab.gnome.org/GNOME/gtk/-/commit/b7380543449ea679a2c912b66aab4855b2bb41f2,
as part of GTK 3.99.5.

Covered by existing tests.

  • UIProcess/API/glib/WebKitUIClient.cpp:
1:22 AM Changeset in webkit [284310] by caitp@igalia.com
  • 2 edits in trunk

Add github username for myself
https://bugs.webkit.org/show_bug.cgi?id=231857

Reviewed by Yusuke Suzuki.

  • metadata/contributors.json:
12:58 AM Changeset in webkit [284309] by commit-queue@webkit.org
  • 2 edits in trunk/Source/bmalloc

Unreviewed, reverting r284305.
https://bugs.webkit.org/show_bug.cgi?id=231859

webaudio-tests

Reverted changeset:

"[libpas] Enable libpas on macOS"
https://bugs.webkit.org/show_bug.cgi?id=231815
https://commits.webkit.org/r284305

Oct 15, 2021:

11:14 PM Changeset in webkit [284308] by Russell Epstein
  • 37 edits
    10 copies
    2 adds in branches/safari-612-branch

Apply patch rdar://83952929

11:02 PM Changeset in webkit [284307] by Russell Epstein
  • 16 edits in branches/safari-612-branch

Apply patch. rdar://problem/83953730

10:31 PM Changeset in webkit [284306] by basuke.suzuki@sony.com
  • 9 edits in trunk

Add flag to turn off Iso heap
https://bugs.webkit.org/show_bug.cgi?id=231823

Reviewed by Yusuke Suzuki.

.:

Added USE_ISO_MALLOC feature flags which is on by default for most platforms.

  • Source/cmake/OptionsPlayStation.cmake:
  • Source/cmake/WebKitFeatures.cmake:

Source/WTF:

If this flag is off, then all allocations are replaced with FastMalloc.

  • wtf/IsoMalloc.h:
  • wtf/IsoMallocInlines.h:
  • wtf/PlatformUse.h:

Tools:

Added --(no-)iso-malloc feature flag for cmake build.

  • Scripts/webkitperl/FeatureList.pm:
9:38 PM Changeset in webkit [284305] by ysuzuki@apple.com
  • 2 edits in trunk/Source/bmalloc

[libpas] Enable libpas on macOS
https://bugs.webkit.org/show_bug.cgi?id=231815

Reviewed by Saam Barati.

Enabling libpas on x64 macOS. Previously, we enabled it only on AppleSilicon.
This helps stressing libpas on fuzzers more. And it offers large performance
improvement.

  1. Speedometer2 is 2.1% improved on low-end macOS (MBA8,2) and 1.7% improved on high-end macOS (MBP14,1).
  2. JetStream2 is neutral on both.
  • bmalloc/BPlatform.h:
9:11 PM Changeset in webkit [284304] by achristensen@apple.com
  • 6 edits in trunk

Start using adattributiond on iOS
https://bugs.webkit.org/show_bug.cgi?id=231829

Reviewed by Brady Eidson.

Source/WebKit:

This makes one small change to use adattributiond on iOS by default instead of the network process.
The rest of this patch is to keep the tests doing what they used to.

  • UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.cpp:

(WKWebsiteDataStoreConfigurationCopyPCMMachServiceName):
(WKWebsiteDataStoreConfigurationSetPCMMachServiceName):

  • UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.h:
  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::configurationWithoutUsingDaemon):
(TestWebKitAPI::webViewWithoutUsingDaemon):
(TestWebKitAPI::runBasicPCMTest):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:

(webViewWithResourceLoadStatisticsEnabledInNetworkProcess):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::configureWebsiteDataStoreTemporaryDirectories):

8:17 PM Changeset in webkit [284303] by Antti Koivisto
  • 16 edits in trunk

[LFC][Integration] Enable inline boxes with borders
https://bugs.webkit.org/show_bug.cgi?id=231562

Reviewed by Alan Bujtas.

Source/WebCore:

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::printReason):
(WebCore::LayoutIntegration::canUseForRenderInlineChild):

  • layout/integration/LayoutIntegrationCoverage.h:

LayoutTests:

  • fast/css/pseudo-first-line-border-width-expected.txt:
  • fast/text/apply-start-width-after-skipped-text-expected.txt:
  • platform/ios/fast/borders/border-image-outset-split-inline-expected.txt:
  • platform/ios/fast/css/pseudo-first-line-border-width-expected.txt:
  • platform/mac/fast/borders/border-image-outset-split-inline-expected.txt:
  • platform/mac/fast/text/basic/015-expected.txt:
8:03 PM Changeset in webkit [284302] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Rename some keyboard-scrolling-related functions on ScrollingEffectsController for clarity
https://bugs.webkit.org/show_bug.cgi?id=231842

Reviewed by Beth Dakin.

Rename beginKeyboardScrolling/stopKeyboardScrolling to willBegin and didStop to make
it clear that they are responding to KeyboardScrollingAnimator state changes.

Add the imperative ScrollingEffectsController::stopKeyboardScrolling() which will get
hooked up soon.

  • platform/KeyboardScrollingAnimator.cpp:

(WebCore::KeyboardScrollingAnimator::updateKeyboardScrollPosition):
(WebCore::KeyboardScrollingAnimator::beginKeyboardScrollGesture):

  • platform/ScrollingEffectsController.cpp:

(WebCore::ScrollingEffectsController::willBeginKeyboardScrolling):
(WebCore::ScrollingEffectsController::didStopKeyboardScrolling):
(WebCore::ScrollingEffectsController::stopKeyboardScrolling):
(WebCore::ScrollingEffectsController::beginKeyboardScrolling): Deleted.

  • platform/ScrollingEffectsController.h:
7:59 PM Changeset in webkit [284301] by achristensen@apple.com
  • 13 edits in trunk

Use attributedBundleIdentifier instead of applicationBundleIdentifier when present for handling PCM attribution
https://bugs.webkit.org/show_bug.cgi?id=231827

Reviewed by Brady Eidson.

Source/WebKit:

This is the same identifier that SafariViewController uses in _setEphemeralUIEventAttribution:forApplicationWithBundleID:
If we don't do this, then SafariViewController looks in the database for PCMs from com.apple.SafariViewService and doesn't find any and doesn't send any reports.

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::attributedBundleIdentifier):

  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::attributedBundleIdentifier):

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::continueWillSendRedirectedRequest):

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

(WebKit::NetworkSession::handlePrivateClickMeasurementConversion):

  • NetworkProcess/NetworkSession.h:
  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm:

(-[WKWebView _addEventAttributionWithSourceID:destinationURL:sourceDescription:purchaser:reportEndpoint:optionalNonce:applicationBundleID:ephemeral:]):
(-[WKWebView _addEventAttributionWithSourceID:destinationURL:sourceDescription:purchaser:reportEndpoint:optionalNonce:applicationBundleID:]): Deleted.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::runBasicPCMTest):
(TestWebKitAPI::TEST):

6:43 PM Changeset in webkit [284300] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Add telemetry for system calls in WP
https://bugs.webkit.org/show_bug.cgi?id=231836
<rdar://problem/84317842>

Reviewed by Brent Fulgham.

Add telemetry for system calls in WP to understand in which context they are being used.

  • WebProcess/com.apple.WebProcess.sb.in:
5:49 PM Changeset in webkit [284299] by commit-queue@webkit.org
  • 4 edits
    2 deletes in trunk

Unreviewed, reverting r284245.
https://bugs.webkit.org/show_bug.cgi?id=231848

Caused

Reverted changeset:

"AX: WebKit should not expose redundant AXGroups with missing
role when the label is the same as the contents"
https://bugs.webkit.org/show_bug.cgi?id=169924
https://commits.webkit.org/r284245

5:44 PM Changeset in webkit [284298] by Ross Kirsling
  • 20 edits in trunk

Realize Mac CMake build of WebCore and WebKit
https://bugs.webkit.org/show_bug.cgi?id=231749

Reviewed by Alex Christensen.

.:

  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

  • PlatformMac.cmake:
  • shell/PlatformMac.cmake:

Source/ThirdParty/ANGLE:

  • Compiler.cmake:

Source/WebCore:

  • CMakeLists.txt:
  • PlatformMac.cmake:

Source/WebCore/PAL:

  • pal/PlatformMac.cmake:

Source/WebKit:

  • CMakeLists.txt:
  • PlatformMac.cmake:

Source/WTF:

  • wtf/PlatformMac.cmake:

Tools:

  • PlatformMac.cmake:
5:44 PM Changeset in webkit [284297] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REBASELINE: fast/text/capitalize-boundaries.html is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=228200

Uneviewed tes gardening/Removal of no longer needed expectation.

  • platform/ios-wk2/TestExpectations:
5:39 PM Changeset in webkit [284296] by Robert Jenner
  • 5 edits in trunk/LayoutTests

REBASELINE: fast/text/capitalize-boundaries.html is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=228200

Unreviewed test gardening/rebase.

  • platform/ios-wk2/fast/text/capitalize-boundaries-expected.txt:
  • platform/mac-bigsur/fast/text/capitalize-boundaries-expected.txt:
  • platform/mac-catalina/fast/text/capitalize-boundaries-expected.txt:
  • platform/mac/fast/text/capitalize-boundaries-expected.png: Added.
  • platform/mac/fast/text/capitalize-boundaries-expected.txt:
5:34 PM Changeset in webkit [284295] by eric.carlson@apple.com
  • 22 edits
    2 moves
    4 adds in trunk/Source

[iOS] Support getDisplayMedia
https://bugs.webkit.org/show_bug.cgi?id=231455
<rdar://problem/84044495>

Reviewed by Youenn Fablet and Jer Noble.

Source/WebCore:

Implement screen capture for iOS using ReplayKit. ReplayKit only captures when the
host application is in the foreground, so the MediaStream track is muted when the
app is backgrounded.

getDisplayMedia availability to JavaScript is controlled by the ScreenCaptureEnabled
setting, which is disabled by default on iOS.

I haven't figured out how to test this automatically yet because ReplayKit always
shows its own modal user prompt before it allows capture to begin.

  • SourcesCocoa.txt: Add ReplayKitCaptureSource.mm. Rename DisplayCaptureSourceMac.cpp

to DisplayCaptureSourceCocoa.cpp.

  • WebCore.xcodeproj/project.pbxproj: Add new files.
  • en.lproj/Localizable.strings: Add localizable strings for getDisplayMedia prompt.
  • platform/graphics/cv/ImageTransferSessionVT.h:
  • platform/graphics/cv/ImageTransferSessionVT.mm:

(WebCore::ImageTransferSessionVT::convertCMSampleBuffer): Add an optional MediaTime parameter.
(WebCore::ImageTransferSessionVT::createMediaSample): Add a MediaTime parameter.

  • platform/mediastream/ios/ReplayKitCaptureSource.h: Added.
  • platform/mediastream/ios/ReplayKitCaptureSource.mm: Added.

(-[WebCoreReplayKitScreenRecorderHelper initWithCallback:]):
(-[WebCoreReplayKitScreenRecorderHelper disconnect]):
(-[WebCoreReplayKitScreenRecorderHelper observeValueForKeyPath:ofObject:change:context:]):
(WebCore::ReplayKitCaptureSource::isAvailable): Check ReplayKit availability.
(WebCore::ReplayKitCaptureSource::create):
(WebCore::ReplayKitCaptureSource::ReplayKitCaptureSource):
(WebCore::ReplayKitCaptureSource::~ReplayKitCaptureSource):
(WebCore::ReplayKitCaptureSource::start): Start screen capture only.
(WebCore::ReplayKitCaptureSource::screenRecorderDidOutputVideoSample): Retain the
the new frame, set intrinsic size to the image size.
(WebCore::ReplayKitCaptureSource::captureStateDidChange): Update observer if interruption
state or recorder state changes so it can update the track's 'muted' state.
(WebCore::ReplayKitCaptureSource::stop): Stop capture.
(WebCore::ReplayKitCaptureSource::generateFrame):
(WebCore::ReplayKitCaptureSource::verifyCaptureIsActive): ReplayKit doesn't notify
when capture is paused, so watch for changes by monitoring the frame count.
(WebCore::ReplayKitCaptureSource::startCaptureWatchdogTimer): Start the timer that
will monitor for capture pausing/resuming.
(WebCore::screenDeviceUUID):
(WebCore::screenDevice):
(WebCore::ReplayKitCaptureSource::screenCaptureDeviceWithPersistentID):
(WebCore::ReplayKitCaptureSource::screenCaptureDevices):

  • platform/mediastream/mac/CGDisplayStreamCaptureSource.cpp:

(WebCore::CGDisplayStreamCaptureSource::generateFrame): DisplayCaptureSourceMac was
renamed DisplayCaptureSourceCocoa.
(WebCore::CGDisplayStreamCaptureSource::newFrame): Take a RetainPtr<IOSurfaceRef>
instead of a DisplaySurface.
(WebCore::CGDisplayStreamCaptureSource::frameAvailableHandler): Ditto.

  • platform/mediastream/mac/CGDisplayStreamCaptureSource.h:

(WebCore::CGDisplayStreamCaptureSource::DisplaySurface::DisplaySurface): Deleted.
(WebCore::CGDisplayStreamCaptureSource::DisplaySurface::~DisplaySurface): Deleted.
(WebCore::CGDisplayStreamCaptureSource::DisplaySurface::operator=): Deleted.
(WebCore::CGDisplayStreamCaptureSource::DisplaySurface::ioSurface const): Deleted.

  • platform/mediastream/mac/CGDisplayStreamScreenCaptureSource.h:
  • platform/mediastream/mac/CGDisplayStreamScreenCaptureSource.mm:

(WebCore::CGDisplayStreamScreenCaptureSource::create): DisplayCaptureSourceMac was
renamed DisplayCaptureSourceCocoa.

  • platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp:

(WebCore::DisplayCaptureManagerCocoa::updateDisplayCaptureDevices): Use
ReplayKitCaptureSource on iOS.

  • platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp: Renamed from Source/WebCore/platform/mediastream/mac/DisplayCaptureSourceMac.cpp.

(WebCore::DisplayCaptureSourceCocoa::create):
(WebCore::DisplayCaptureSourceCocoa::DisplayCaptureSourceCocoa):
(WebCore::DisplayCaptureSourceCocoa::~DisplayCaptureSourceCocoa):
(WebCore::DisplayCaptureSourceCocoa::capabilities):
(WebCore::DisplayCaptureSourceCocoa::settings):
(WebCore::DisplayCaptureSourceCocoa::settingsDidChange):
(WebCore::DisplayCaptureSourceCocoa::startProducingData):
(WebCore::DisplayCaptureSourceCocoa::stopProducingData):
(WebCore::DisplayCaptureSourceCocoa::elapsedTime):
(WebCore::DisplayCaptureSourceCocoa::updateFrameSize):
(WebCore::DisplayCaptureSourceCocoa::emitFrame): Support capturer returning a CMSampleBuffer.
(WebCore::DisplayCaptureSourceCocoa::setLogger):
(WebCore::DisplayCaptureSourceCocoa::Capturer::setLogger): Set the capturer's logger.
(WebCore::DisplayCaptureSourceCocoa::Capturer::logChannel const):
(WebCore::DisplayCaptureSourceCocoa::Capturer::Observer::~Observer):
(WebCore::DisplayCaptureSourceCocoa::Capturer::setObserver):
(WebCore::DisplayCaptureSourceCocoa::Capturer::capturerIsRunningChanged):

  • platform/mediastream/mac/DisplayCaptureSourceCocoa.h: Renamed from Source/WebCore/platform/mediastream/mac/DisplayCaptureSourceMac.h.
  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::DisplayCaptureSourceFactoryMac::createDisplayCaptureSource): DisplayCaptureSourceMac
renamed to DisplayCaptureSourceCocoa.

  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockDisplayCapturer::generateFrame): Ditto.

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/ios/ReplayKitSoftLink.h: Added.
  • pal/ios/ReplayKitSoftLink.mm: Added.

Source/WebKit:

  • UIProcess/Cocoa/MediaPermissionUtilities.mm:

(WebKit::alertMessageText): Add text for default screen capture prompt.
(WebKit::allowButtonText): Ditto.
(WebKit::doNotAllowButtonText): Ditto.

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): Call
default getDisplayMedia prompt if the delegate doesn't implement the private
prompt selector.

  • UIProcess/MediaPermissionUtilities.h:
  • UIProcess/UserMediaPermissionRequestProxy.cpp:

(WebKit::UserMediaPermissionRequestProxy::promptForGetDisplayMedia): New default
getDisplayMedia prompt.
(WebKit::UserMediaPermissionRequestProxy::promptForGetUserMedia):
(WebKit::UserMediaPermissionRequestProxy::doDefaultAction): Call promptForGetDisplayMedia
or promptForGetUserMedia according to the request type.
(WebKit::UserMediaPermissionRequestProxy::canPromptForGetDisplayMedia):
(WebKit::UserMediaPermissionRequestProxy::prompt): Deleted.

  • UIProcess/UserMediaPermissionRequestProxy.h:

(WebKit::UserMediaPermissionRequestProxy::doDefaultAction): Deleted.

5:00 PM Changeset in webkit [284294] by jer.noble@apple.com
  • 5 edits in trunk/Source/WebKit

[iOS] Screen Sharing doesn't switch to AirPlay when <video> enters fullscreen mode
https://bugs.webkit.org/show_bug.cgi?id=231807
<rdar://82995799>

Reviewed by Eric Carlson.

WebKit will allow AVPlayer to switch to AirPlay Video mode from Screen Sharing when a
<video> element is in fullscreen mode. However, the fullscreen state this code depends on
is not stored in the GPU process.

Implement RemoteMediaPlayerProxy::mediaPlayerFullscreenMode()
and ::mediaPlayerIsVideoFullscreenStandby().

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode):
(WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerFullscreenMode const):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerIsVideoFullscreenStandby const):

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::videoFullscreenStandbyChanged):

4:57 PM Changeset in webkit [284293] by Kyle Piddington
  • 2 edits in trunk/Source/ThirdParty/ANGLE

REGRESSION (r283667): webgl/2.0.0/deqp/functional/gles3/lifetime.html fails
https://bugs.webkit.org/show_bug.cgi?id=231682

Transform feedback should avoid appending _u for
builtin output variables.

Reviewed by Kimmo Kinnunen.

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

(rx::mtl::GenerateTransformFeedbackVaryingOutput):

4:46 PM Changeset in webkit [284292] by Russell Epstein
  • 8 edits in branches/safari-612-branch/Source

Apply patch. rdar://problem/83955481

4:45 PM Changeset in webkit [284291] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Some canvas tests are failing
https://bugs.webkit.org/show_bug.cgi?id=231837
<rdar://problem/84318280>

Reviewed by Brent Fulgham.

To be able to receive the Launch Services database over XPC, a Network process XPC endpoint has to be sent to the
GPU process. This was being sent in GPUProcessProxy::didFinishLaunching, but since the session ID and Website data
store is not always available there, it was sometimes not being sent. Instead, send the endpoint in
GPUProcessProxy::addSession, where the Website data store is always available.

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::didFinishLaunching):
(WebKit::GPUProcessProxy::addSession):

4:44 PM Changeset in webkit [284290] by Ayumi Kojima
  • 1 edit
    6 adds in trunk/LayoutTests

[ iOS 15 ] Rebaselining platform/ios/ios/fast/text/opticalFontWithWeight.html.
https://bugs.webkit.org/show_bug.cgi?id=231380

Unreviewed test gardening.

  • platform/ios-14/platform/ios/ios/fast/text/opticalFontWithWeight-expected.txt: Added.
4:43 PM Changeset in webkit [284289] by Russell Epstein
  • 91 edits
    13 copies
    4 adds in branches/safari-612-branch

Apply patch. rdar://problem/83955868

4:37 PM Changeset in webkit [284288] by Russell Epstein
  • 2 edits
    162 adds in branches/safari-612-branch/LayoutTests/imported/w3c

Cherry-pick r281769. rdar://problem/84234711

Import file-system-access tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=229593

Reviewed by Ryosuke Niwa.

  • resources/import-expectations.json:
  • web-platform-tests/file-system-access/META.yml: Added.
  • web-platform-tests/file-system-access/README.md: Added.
  • web-platform-tests/file-system-access/idlharness.https.any-expected.txt: Added.
  • web-platform-tests/file-system-access/idlharness.https.any.html: Added.
  • web-platform-tests/file-system-access/idlharness.https.any.js: Added.
  • web-platform-tests/file-system-access/idlharness.https.any.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/idlharness.https.any.worker.html: Added.
  • web-platform-tests/file-system-access/opaque-origin.https.window-expected.txt: Added.
  • web-platform-tests/file-system-access/opaque-origin.https.window.html: Added.
  • web-platform-tests/file-system-access/opaque-origin.https.window.js: Added. (add_iframe): (async verify_does_not_exist_in_data_uri_iframe): (async verify_results_from_sandboxed_child_window):
  • web-platform-tests/file-system-access/resources/data/testfile.txt: Added.
  • web-platform-tests/file-system-access/resources/data/w3c-import.log: Added.
  • web-platform-tests/file-system-access/resources/local-fs-test-helpers.js: Added. (const.directory_promise.async await): (const.directory_promise): (directory_test): (async directory_test):
  • web-platform-tests/file-system-access/resources/message-target-dedicated-worker.js: Added.
  • web-platform-tests/file-system-access/resources/message-target-service-worker.js: Added.
  • web-platform-tests/file-system-access/resources/message-target-shared-worker.js: Added.
  • web-platform-tests/file-system-access/resources/message-target.html: Added.
  • web-platform-tests/file-system-access/resources/message-target.js: Added. (async receiver): (add_message_event_handlers):
  • web-platform-tests/file-system-access/resources/messaging-blob-helpers.js: Added. (async create_message_target_blob_url): (async create_message_target_data_uri): (async create_message_target_html_without_subresources): (async fetch_text):
  • web-platform-tests/file-system-access/resources/messaging-helpers.js: Added. (create_dedicated_worker): (async create_service_worker): (async add_iframe): (async open_window): (async wait_for_loaded_message): (create_message_channel): (async create_file_system_handles): (async do_post_message_test): (async do_message_port_test):
  • web-platform-tests/file-system-access/resources/messaging-serialize-helpers.js: Added. (async serialize_handles): (async serialize_handle): (async serialize_file_system_handle): (async serialize_file_system_file_handle): (async serialize_file_system_directory_handle): (async assert_equals_cloned_handles): (assert_equals_serialized_handles): (assert_equals_serialized_handle): (assert_equals_serialized_file_system_handle): (assert_equals_serialized_file_system_file_handle): (assert_equals_serialized_file_system_directory_handle): (serialize_message_error_event): (assert_equals_serialized_message_error_event):
  • web-platform-tests/file-system-access/resources/opaque-origin-sandbox.html: Added.
  • web-platform-tests/file-system-access/resources/sandboxed-fs-test-helpers.js: Added. (async cleanupSandboxedFileSystem):
  • web-platform-tests/file-system-access/resources/sync-access-handle-test.js: Added. (async cleanupSandboxedFileSystem):
  • web-platform-tests/file-system-access/resources/test-helpers.js: Added. (navigator.userAgent.includes): (async getFileSize): (async getFileContents): (async getDirectoryEntryCount): (async getSortedDirectoryEntries): (async createFileWithContents): (garbageCollect):
  • web-platform-tests/file-system-access/resources/w3c-import.log: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-BroadcastChannel.https.window-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-BroadcastChannel.https.window.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-BroadcastChannel.https.window.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-Error.https.window-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-Error.https.window.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-Error.https.window.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-frames.https.window-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-frames.https.window.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-frames.https.window.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-windows.https.window-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-windows.https.window.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-windows.https.window.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-workers.https.window-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-workers.https.window.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-workers.https.window.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-frames.https.window-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-frames.https.window.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-frames.https.window.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-windows.https.window-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-windows.https.window.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-windows.https.window.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-workers.https.window-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-workers.https.window.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-workers.https.window.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-create-sync-access-handle-dedicated-worker.https.tentative.window-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-create-sync-access-handle-dedicated-worker.https.tentative.window.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-create-sync-access-handle-dedicated-worker.https.tentative.window.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-sync-access-handle-lock.https.tentative.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-sync-access-handle-lock.https.tentative.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-sync-access-handle-lock.https.tentative.worker.js: Added. (promise_test.async t):
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker.js: Added. (sync_access_handle_test.async testCase):
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-flush.https.tentative.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-flush.https.tentative.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-flush.https.tentative.worker.js: Added. (sync_access_handle_test.async t): (sync_access_handle_test.async testCase):
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-getSize.https.tentative.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-getSize.https.tentative.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-getSize.https.tentative.worker.js: Added. (sync_access_handle_test.async testCase):
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-read-write.https.tentative.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-read-write.https.tentative.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-read-write.https.tentative.worker.js: Added. (sync_access_handle_test):
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-truncate.https.tentative.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-truncate.https.tentative.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-truncate.https.tentative.worker.js: Added. (sync_access_handle_test.async testCase):
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.worker.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any.html: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any.js: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any.worker-expected.txt: Added.
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any.worker.html: Added.
  • web-platform-tests/file-system-access/script-tests/FileSystemBaseHandle-IndexedDB.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemBaseHandle-isSameEntry.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemBaseHandle-postMessage-BroadcastChannel.js: Added. (async create_broadcast_channel): (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemBaseHandle-postMessage-Error.js: Added. (async do_send_message_error_test): (async do_receive_message_error_test): (async do_send_and_receive_message_error_test): (async do_send_message_port_error_test): (async do_receive_message_port_error_test): (async do_send_and_receive_message_port_error_test): (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemBaseHandle-postMessage-MessagePort-frames.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemBaseHandle-postMessage-MessagePort-windows.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemBaseHandle-postMessage-MessagePort-workers.js: Added. (directory_test.async t): (self.SharedWorker.undefined.directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemBaseHandle-postMessage-frames.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemBaseHandle-postMessage-windows.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemBaseHandle-postMessage-workers.js: Added. (directory_test.async t): (self.SharedWorker.undefined.directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemBaseHandle-remove.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemDirectoryHandle-getDirectoryHandle.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemDirectoryHandle-getFileHandle.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemDirectoryHandle-iteration.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemDirectoryHandle-removeEntry.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemDirectoryHandle-resolve.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemFileHandle-create-sync-access-handle-dedicated-worker.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemFileHandle-getFile.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemSyncAccessHandle-flush.js: Added. (sync_access_handle_test.async handle):
  • web-platform-tests/file-system-access/script-tests/FileSystemWritableFileStream-piped.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemWritableFileStream-write.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/FileSystemWritableFileStream.js: Added. (directory_test.async t):
  • web-platform-tests/file-system-access/script-tests/w3c-import.log: Added.
  • web-platform-tests/file-system-access/showPicker-errors.https.window-expected.txt: Added.
  • web-platform-tests/file-system-access/showPicker-errors.https.window.html: Added.
  • web-platform-tests/file-system-access/showPicker-errors.https.window.js: Added. (promise_test.async t): (define_file_picker_error_tests.async promise_test): (define_file_picker_error_tests.async const): (define_file_picker_error_tests): (define_file_picker_extension_error_test):
  • web-platform-tests/file-system-access/w3c-import.log: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281769 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:35 PM Changeset in webkit [284287] by Aditya Keerthi
  • 9 edits
    6 adds in trunk

[iOS] Support accent-color for button-like controls
https://bugs.webkit.org/show_bug.cgi?id=231764
rdar://84261821

Reviewed by Tim Horton.

Source/WebCore:

Apply accent-color to buttons, date inputs, and <select> elements.

Tests: fast/css/accent-color/button.html

fast/css/accent-color/date.html
fast/css/accent-color/submit.html

  • html/HTMLButtonElement.cpp:

(WebCore::HTMLButtonElement::isExplicitlySetSubmitButton const):

Return true if the author has explicitly made the <button> a
submit button. This is necessary, as submit buttons have an appearance
that is different from a standard button on iOS.

  • html/HTMLButtonElement.h:
  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::adjustMenuListButtonStyle const):
(WebCore::RenderThemeIOS::isSubmitStyleButton const):
(WebCore::RenderThemeIOS::adjustButtonLikeControlStyle const):
(WebCore::RenderThemeIOS::adjustButtonStyle const):
(WebCore::RenderThemeIOS::adjustPressedStyle const): Deleted.

LayoutTests:

Add new tests for iOS and mark newly passing test.

  • TestExpectations:
  • fast/css/accent-color/button-expected-mismatch.html: Added.
  • fast/css/accent-color/button.html: Added.
  • fast/css/accent-color/date-expected-mismatch.html: Added.
  • fast/css/accent-color/date.html: Added.
  • fast/css/accent-color/submit-expected-mismatch.html: Added.
  • fast/css/accent-color/submit.html: Added.
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
4:35 PM Changeset in webkit [284286] by Russell Epstein
  • 2 edits
    78 adds in branches/safari-612-branch/LayoutTests/imported/w3c

Cherry-pick r282088. rdar://problem/84234366

Import storage tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=229965

Reviewed by Youenn Fablet.

  • resources/import-expectations.json:
  • web-platform-tests/storage/META.yml: Added.
  • web-platform-tests/storage/README.md: Added.
  • web-platform-tests/storage/buckets/META.yml: Added.
  • web-platform-tests/storage/buckets/w3c-import.log: Added.
  • web-platform-tests/storage/estimate-indexeddb.https.any-expected.txt: Added.
  • web-platform-tests/storage/estimate-indexeddb.https.any.html: Added.
  • web-platform-tests/storage/estimate-indexeddb.https.any.js: Added. (indexedDbOpenRequest): (promise_test.async t):
  • web-platform-tests/storage/estimate-indexeddb.https.any.worker-expected.txt: Added.
  • web-platform-tests/storage/estimate-indexeddb.https.any.worker.html: Added.
  • web-platform-tests/storage/estimate-parallel.https.any-expected.txt: Added.
  • web-platform-tests/storage/estimate-parallel.https.any.html: Added.
  • web-platform-tests/storage/estimate-parallel.https.any.js: Added. (promise_test.async t):
  • web-platform-tests/storage/estimate-parallel.https.any.worker-expected.txt: Added.
  • web-platform-tests/storage/estimate-parallel.https.any.worker.html: Added.
  • web-platform-tests/storage/estimate-usage-details-application-cache.https.tentative-expected.txt: Added.
  • web-platform-tests/storage/estimate-usage-details-application-cache.https.tentative.html: Added.
  • web-platform-tests/storage/estimate-usage-details-caches.https.tentative.any-expected.txt: Added.
  • web-platform-tests/storage/estimate-usage-details-caches.https.tentative.any.html: Added.
  • web-platform-tests/storage/estimate-usage-details-caches.https.tentative.any.js: Added. (promise_test.async t):
  • web-platform-tests/storage/estimate-usage-details-caches.https.tentative.any.worker-expected.txt: Added.
  • web-platform-tests/storage/estimate-usage-details-caches.https.tentative.any.worker.html: Added.
  • web-platform-tests/storage/estimate-usage-details-indexeddb.https.tentative.any-expected.txt: Added.
  • web-platform-tests/storage/estimate-usage-details-indexeddb.https.tentative.any.html: Added.
  • web-platform-tests/storage/estimate-usage-details-indexeddb.https.tentative.any.js: Added. (promise_test.async t):
  • web-platform-tests/storage/estimate-usage-details-indexeddb.https.tentative.any.worker-expected.txt: Added.
  • web-platform-tests/storage/estimate-usage-details-indexeddb.https.tentative.any.worker.html: Added.
  • web-platform-tests/storage/estimate-usage-details-service-workers.https.tentative.window-expected.txt: Added.
  • web-platform-tests/storage/estimate-usage-details-service-workers.https.tentative.window.html: Added.
  • web-platform-tests/storage/estimate-usage-details-service-workers.https.tentative.window.js: Added. (promise_test.async t):
  • web-platform-tests/storage/estimate-usage-details.https.tentative.any-expected.txt: Added.
  • web-platform-tests/storage/estimate-usage-details.https.tentative.any.html: Added.
  • web-platform-tests/storage/estimate-usage-details.https.tentative.any.js: Added. (promise_test.async t):
  • web-platform-tests/storage/estimate-usage-details.https.tentative.any.worker-expected.txt: Added.
  • web-platform-tests/storage/estimate-usage-details.https.tentative.any.worker.html: Added.
  • web-platform-tests/storage/helpers.js: Added. (createDB):
  • web-platform-tests/storage/idlharness.https.any-expected.txt: Added.
  • web-platform-tests/storage/idlharness.https.any.html: Added.
  • web-platform-tests/storage/idlharness.https.any.js: Added.
  • web-platform-tests/storage/idlharness.https.any.worker-expected.txt: Added.
  • web-platform-tests/storage/idlharness.https.any.worker.html: Added.
  • web-platform-tests/storage/opaque-origin.https.window-expected.txt: Added.
  • web-platform-tests/storage/opaque-origin.https.window.html: Added.
  • web-platform-tests/storage/opaque-origin.https.window.js: Added. (load_iframe): (wait_for_message.return.new.Promise): (forEach.snippet.assert_equals):
  • web-platform-tests/storage/permission-query.https.any-expected.txt: Added.
  • web-platform-tests/storage/permission-query.https.any.html: Added.
  • web-platform-tests/storage/permission-query.https.any.js: Added. (promise_test.async t):
  • web-platform-tests/storage/permission-query.https.any.worker-expected.txt: Added.
  • web-platform-tests/storage/permission-query.https.any.worker.html: Added.
  • web-platform-tests/storage/persisted.https.any-expected.txt: Added.
  • web-platform-tests/storage/persisted.https.any.html: Added.
  • web-platform-tests/storage/persisted.https.any.js: Added. (test): (promise_test):
  • web-platform-tests/storage/persisted.https.any.worker-expected.txt: Added.
  • web-platform-tests/storage/persisted.https.any.worker.html: Added.
  • web-platform-tests/storage/quotachange-in-detached-iframe.tentative.https-expected.txt: Added.
  • web-platform-tests/storage/quotachange-in-detached-iframe.tentative.https.html: Added.
  • web-platform-tests/storage/resources/appcache.manifest: Added.
  • web-platform-tests/storage/resources/iframe_with_appcache_manifest.html: Added.
  • web-platform-tests/storage/resources/w3c-import.log: Added.
  • web-platform-tests/storage/storagemanager-estimate.https.any-expected.txt: Added.
  • web-platform-tests/storage/storagemanager-estimate.https.any.html: Added.
  • web-platform-tests/storage/storagemanager-estimate.https.any.js: Added. (test): (promise_test):
  • web-platform-tests/storage/storagemanager-estimate.https.any.worker-expected.txt: Added.
  • web-platform-tests/storage/storagemanager-estimate.https.any.worker.html: Added.
  • web-platform-tests/storage/storagemanager-persist.https.window-expected.txt: Added.
  • web-platform-tests/storage/storagemanager-persist.https.window.html: Added.
  • web-platform-tests/storage/storagemanager-persist.https.window.js: Added. (promise_test):
  • web-platform-tests/storage/storagemanager-persist.https.worker-expected.txt: Added.
  • web-platform-tests/storage/storagemanager-persist.https.worker.html: Added.
  • web-platform-tests/storage/storagemanager-persist.https.worker.js: Added. (test):
  • web-platform-tests/storage/storagemanager-persisted.https.any-expected.txt: Added.
  • web-platform-tests/storage/storagemanager-persisted.https.any.html: Added.
  • web-platform-tests/storage/storagemanager-persisted.https.any.js: Added. (promise_test):
  • web-platform-tests/storage/storagemanager-persisted.https.any.worker-expected.txt: Added.
  • web-platform-tests/storage/storagemanager-persisted.https.any.worker.html: Added.
  • web-platform-tests/storage/w3c-import.log: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@282088 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:24 PM Changeset in webkit [284285] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Optimize Structure::getConcurrently
https://bugs.webkit.org/show_bug.cgi?id=231825

Reviewed by Filip Pizlo.

From artrace data, we found that Structure::getConcurrently is taking fair amount of time
in Speedometer2 *in the main thread*! This is because Structure::getConcurrently is used
in PropertyCondition, and its validation can be called in the main thread when watched
Structure transition happens, ObjectPropertyConditionSet is created for IC etc.

Structure::getConcurrently is slow since it is using Structure::forEachPropertyConcurrently.
We can optimize Structure::getConcurrently since,

  1. We do not need to track seen properties via seenProperties HashSet.
  2. We can handle TransitionKind::PropertyDeletion.
  3. We can use PropertyTable::get.

We are seeing consistent 0.4% improvement in Speedometer2 (I ran 120 Speedometer2 runs twice and both said 0.4% improvement).


| subtest | ms | ms | b / a | pValue (significance using False Discovery Rate) |


| Elm-TodoMVC |106.201667 |106.030000 |0.998384 | 0.666695 |
| VueJS-TodoMVC |21.955000 |21.985000 |1.001366 | 0.898294 |
| EmberJS-TodoMVC |120.720000 |119.938333 |0.993525 | 0.055063 |
| BackboneJS-TodoMVC |40.306667 |40.023333 |0.992971 | 0.054858 |
| Preact-TodoMVC |16.273333 |15.968333 |0.981258 | 0.135893 |
| AngularJS-TodoMVC |123.325000 |122.596667 |0.994094 | 0.079212 |
| Vanilla-ES2015-TodoMVC |60.116667 |60.168333 |1.000859 | 0.691981 |
| Inferno-TodoMVC |58.945000 |58.538333 |0.993101 | 0.155753 |
| Flight-TodoMVC |57.846667 |57.808333 |0.999337 | 0.868408 |
| Angular2-TypeScript-TodoMVC |38.595000 |38.260000 |0.991320 | 0.392602 |
| VanillaJS-TodoMVC |50.316667 |50.185000 |0.997383 | 0.609335 |
| jQuery-TodoMVC |208.376667 |208.933333 |1.002671 | 0.196406 |
| EmberJS-Debug-TodoMVC |338.481667 |336.755000 |0.994899 | 0.007485 |
| React-TodoMVC |82.533333 |82.091667 |0.994649 | 0.037482 |
| React-Redux-TodoMVC |133.703333 |133.258333 |0.996672 | 0.069242 |
| Vanilla-ES2015-Babel-Webpack-TodoMVC |59.346667 |59.600000 |1.004269 | 0.203370 |


a mean = 282.95715
b mean = 284.07606
pValue = 0.0013877157
(Bigger means are better.)
1.004 times better
Results ARE significant

  • runtime/Structure.cpp:

(JSC::Structure::getConcurrently):

4:02 PM Changeset in webkit [284284] by Russell Epstein
  • 9 edits in branches/safari-612-branch/Source

Revert "Cherry-pick r283572. rdar://problem/83953133"

This reverts commit r284279.

3:51 PM Changeset in webkit [284283] by Jonathan Bedard
  • 6 edits in trunk/Tools

[webkitscmpy] Allow repositories to define custom setup commands
https://bugs.webkit.org/show_bug.cgi?id=231345
<rdar://problem/83960249>

Reviewed by Dewei Zhu.

  • Scripts/git-webkit: Define changelog conflict resolver.
  • Scripts/libraries/webkitscmpy/setup.py: Add inspect2 as dependency, bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/program/init.py:

(main): Attempt to resolve additional_setup function.

  • Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:

(Setup.github): Invoke additional_setup function, if it exists.
(Setup.git): Ditto.

3:41 PM Changeset in webkit [284282] by Russell Epstein
  • 5 edits in branches/safari-612-branch

Cherry-pick r281964. rdar://problem/83954640

[ BigSur arm64 Debug EWS ] ASSERTION FAILED: m_uncommittedState.state == State::Provisional
https://bugs.webkit.org/show_bug.cgi?id=229769
<rdar://problem/82645706>

Reviewed by Alex Christensen.

Source/WebKit:

I am unable to reproduce the crash but we know that we're crashing when committing the load
after a process-swap, because the WebPageProxy doesn't know that a provisional load is going
on. One possible explanation for this, and the most likely one is that the WebPageProxy got
a DidFailProvisionalLoadForFrame IPC from the current process while the provisional load is
proceeding in the new provisional process. We had logic in WebPageProxy::didFailProvisionalLoadForFrame()
to try and discard such IPC but the check was relying on the navigationID and was therefore
fragile. I updated the check in didFailProvisionalLoadForFrame() to ignore all
DidFailProvisionalLoadForFrame IPCs for the main frame from the current process when there
is a ProvisionalPageProxy, without relying on the navigationID. This should be more robust
and will hopefully fix this flaky crash.

No new tests, unskipped existing tests.

  • UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didFailProvisionalLoadForFrame): (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
  • UIProcess/WebPageProxy.h:

LayoutTests:

Unskip test that should no longer be flakily crashing in debug.

  • platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281964 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3:41 PM Changeset in webkit [284281] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GLIB] Update test expectations for known failures. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=231820

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-10-15

  • platform/glib/TestExpectations:
3:38 PM Changeset in webkit [284280] by Russell Epstein
  • 4 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r281879. rdar://problem/83954217

Improve time precision when cross-origin isolated via COOP+COEP
https://bugs.webkit.org/show_bug.cgi?id=228137
<rdar://problem/81197138>

Reviewed by Ryosuke Niwa.

Increase the precision of our high precision time (used by performance.now()) from
1ms to 20us when cross-origin isolated via COOP=same-origin + COEP=require-corp.
Precision remains the same (1ms) when not cross-origin isolated.

This aligns our behavior with Firefox.

Note that Chrome provides higher precision (100us in general and 5us when
cross-origin-isolated).

  • dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::setCrossOriginMode):
  • page/Performance.cpp: (WebCore::Performance::reduceTimeResolution): (WebCore::Performance::allowHighPrecisionTime):
  • page/Performance.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281879 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3:37 PM Changeset in webkit [284279] by Russell Epstein
  • 9 edits in branches/safari-612-branch/Source

Cherry-pick r283572. rdar://problem/83953133

Web Inspector: Show color space for canvases in the Graphics tab on the overview cards
https://bugs.webkit.org/show_bug.cgi?id=231205

Reviewed by Devin Rousso.

Source/JavaScriptCore:

Use an enum instead of strings for color space values sent to the frontend.

  • inspector/protocol/Canvas.json:
  • inspector/scripts/codegen/generator.py:

Source/WebCore:

Use an enum instead of strings for color space values sent to the frontend.

  • inspector/InspectorCanvas.cpp: (WebCore::buildObjectForCanvasContextAttributes):

Source/WebInspectorUI:

For canvas context's with a color space attribute, show the color space next to the context type in the header
of each context card in the Graphics tab.

  • UserInterface/Models/Canvas.js: (WI.Canvas.displayNameForColorSpace):
  • UserInterface/Views/CanvasContentView.js: (WI.CanvasContentView.prototype.initialLayout):
  • UserInterface/Views/CanvasOverviewContentView.css: (.content-view.canvas-overview > .content-view.canvas > header > .titles > :matches(.subtitle, .color-space),): (.content-view.canvas-overview > .content-view.canvas > header .color-space::before):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283572 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3:36 PM Changeset in webkit [284278] by Jonathan Bedard
  • 2 edits in trunk

Add github username for Dewei Zhu

Unreviewed.

  • metadata/contributors.json:
3:25 PM Changeset in webkit [284277] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

Unreviewed, reverting r283925.
https://bugs.webkit.org/show_bug.cgi?id=231839

Incorrect

Reverted changeset:

"[macOS] Grant access in sandbox to 'system-privilege' for
root"
https://bugs.webkit.org/show_bug.cgi?id=231501
https://commits.webkit.org/r283925

3:18 PM Changeset in webkit [284276] by Ryan Haddad
  • 2 edits in trunk/Source/WebKit

Explicitly link adattributiond with Foundation and CoreFoundation
https://bugs.webkit.org/show_bug.cgi?id=231835

Reviewed by Brady Eidson.

Apply the same treatment to adattributiond as was done for webpushd in r284250.

  • Configurations/adattributiond.xcconfig:
3:16 PM Changeset in webkit [284275] by Russell Epstein
  • 28 edits
    2 adds in branches/safari-612-branch

Cherry-pick r283033. rdar://problem/83953190

[IOS 15] Video track does not get unmuted in case of tab was inactive less than ~500 ms
https://bugs.webkit.org/show_bug.cgi?id=230538
<rdar://problem/83355705>

Reviewed by Eric Carlson.

Source/WebCore:

Add support for interrupting mock cameras.
Update internals to handle the case of out of main thread videoSampleAvailable calls.

Update Page::setMuted to trigger setMuted logic even if Page muted state did not change.
This ensures we can restart capture in case a track is muted without the page being muted itself.

When a source is muted and is in producing data state, it is interrupted.
When setMuted(false) is called, we need to uninterrupt.
To do so, we do a stop/start cycle

Test: fast/mediastream/media-stream-video-track-interrupted.html

  • page/Page.cpp: (WebCore::Page::setMuted):
  • platform/mediastream/RealtimeMediaSource.cpp: (WebCore::RealtimeMediaSource::setMuted):
  • platform/mock/MockRealtimeMediaSourceCenter.cpp: (WebCore::MockRealtimeMediaSourceCenter::setMockCameraIsInterrupted):
  • platform/mock/MockRealtimeMediaSourceCenter.h:
  • platform/mock/MockRealtimeVideoSource.cpp: (WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource): (WebCore::MockRealtimeVideoSource::~MockRealtimeVideoSource): (WebCore::MockRealtimeVideoSource::setIsInterrupted):
  • platform/mock/MockRealtimeVideoSource.h:
  • testing/Internals.cpp: (WebCore::Internals::videoSampleAvailable):
  • testing/Internals.h:

Source/WebKit:

Add support for mock capture interruption.
When receiving a notification that GPUProcess source is muted, we consider it is interrupted.
In that case, we notify the source is muted instead of calling setMuted (which would set the source as muted AND stop producing data).
It is important to not stop the source so that it can continue receiving interruption notifications.

  • GPUProcess/GPUProcess.cpp: (WebKit::GPUProcess::setMockCameraIsInterrupted):
  • GPUProcess/GPUProcess.h:
  • GPUProcess/GPUProcess.messages.in:
  • UIProcess/API/C/WKPage.cpp: (WKPageIsMockRealtimeMediaSourceCenterEnabled): (WKPageSetMockCameraIsInterrupted):
  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/GPU/GPUProcessProxy.cpp: (WebKit::GPUProcessProxy::setMockCameraIsInterrupted):
  • UIProcess/GPU/GPUProcessProxy.h:
  • WebProcess/cocoa/RemoteRealtimeAudioSource.h:
  • WebProcess/cocoa/RemoteRealtimeVideoSource.h:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp: (WebKit::UserMediaCaptureManager::sourceMutedChanged):

Tools:

Add mock API to mock camera interruption.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setMockCameraIsInterrupted):
  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp: (WTR::TestController::setMockCameraIsInterrupted):
  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • fast/mediastream/media-stream-video-track-interrupted-expected.txt: Added.
  • fast/mediastream/media-stream-video-track-interrupted.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283033 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2:45 PM Changeset in webkit [284274] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 ] imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=231544

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations: Marked the test slow
2:27 PM Changeset in webkit [284273] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WTF

Enable Storage API by default
https://bugs.webkit.org/show_bug.cgi?id=231826

Reviewed by Alexey Shvayka.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
2:11 PM Changeset in webkit [284272] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WTF

Clean up font-related USE(...) macros
https://bugs.webkit.org/show_bug.cgi?id=231793

Reviewed by Wenson Hsieh.

IOS_FAMILY is true for tvOS and watchOS, so we should be using

(PLATFORM(IOS)
PLATFORM(MACCATALYST) instead. Also, the simulator

is not special here - it should get the same policy as the system it's
simulating.

  • wtf/PlatformUse.h:
2:09 PM Changeset in webkit [284271] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ macOS wk2 ] http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=231831

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
2:06 PM Changeset in webkit [284270] by Russell Epstein
  • 1 copy in tags/Safari-613.1.5

Tag Safari-613.1.5.

1:29 PM Changeset in webkit [284269] by Antti Koivisto
  • 21 edits
    2 adds in trunk/Source/WebCore

[LFC][Integration] Factor line logical order traversal out of iterator
https://bugs.webkit.org/show_bug.cgi?id=231800

Reviewed by Alan Bujtas.

Similar to text logical order traversal, use standalone traversal functions with order cache
owned by the caller.

Make the code generic so it will work with IFC BiDi.

Factor all traversal functions to a file of their own, InlineIteratorLogicalOrderTraversal.h/cpp.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Position.cpp:
  • editing/CompositeEditCommand.cpp:
  • editing/TextIterator.h:
  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::leftVisuallyDistinctCandidate const):
(WebCore::VisiblePosition::rightVisuallyDistinctCandidate const):

  • editing/VisibleUnits.cpp:

(WebCore::previousTextOrLineBreakRun):
(WebCore::nextTextOrLineBreakRun):
(WebCore::startTextOrLineBreakRun):
(WebCore::endTextOrLineBreakRun):
(WebCore::logicallyPreviousRun):
(WebCore::logicallyNextRun):
(WebCore::wordBreakIteratorForMinOffsetBoundary):
(WebCore::wordBreakIteratorForMaxOffsetBoundary):
(WebCore::startPositionForLine):
(WebCore::endPositionForLine):

  • layout/integration/InlineIteratorBox.cpp:

(WebCore::InlineIterator::LeafBoxIterator::traversePreviousOnLineIgnoringLineBreak):
(WebCore::InlineIterator::LeafBoxIterator::traverseNextOnLineInLogicalOrder): Deleted.
(WebCore::InlineIterator::LeafBoxIterator::traversePreviousOnLineInLogicalOrder): Deleted.

  • layout/integration/InlineIteratorBox.h:

(WebCore::InlineIterator::BoxIterator::BoxIterator):

  • layout/integration/InlineIteratorBoxLegacyPath.h:

(WebCore::InlineIterator::BoxLegacyPath::BoxLegacyPath):
(WebCore::InlineIterator::BoxLegacyPath::traverseNextOnLineInLogicalOrder): Deleted.
(WebCore::InlineIterator::BoxLegacyPath::traversePreviousOnLineInLogicalOrder): Deleted.
(WebCore::InlineIterator::BoxLegacyPath::initializeLogicalOrderCacheForLine): Deleted.
(WebCore::InlineIterator::BoxLegacyPath::traverseNextInlineBoxInCacheOrder): Deleted.
(WebCore::InlineIterator::BoxLegacyPath::traversePreviousInlineBoxInCacheOrder): Deleted.

  • layout/integration/InlineIteratorBoxModernPath.h:

(WebCore::InlineIterator::BoxModernPath::traverseNextOnLineInLogicalOrder): Deleted.
(WebCore::InlineIterator::BoxModernPath::traversePreviousOnLineInLogicalOrder): Deleted.

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::logicalStartRun const): Deleted.
(WebCore::InlineIterator::Line::logicalEndRun const): Deleted.
(WebCore::InlineIterator::Line::logicalStartRunWithNode const): Deleted.
(WebCore::InlineIterator::Line::logicalEndRunWithNode const): Deleted.

  • layout/integration/InlineIteratorLine.h:
  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineIteratorLegacyPath::logicalStartRun const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::logicalEndRun const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::logicalStartRun const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::logicalEndRun const): Deleted.

  • layout/integration/InlineIteratorLogicalOrderTraversal.cpp: Added.

(WebCore::InlineIterator::makeTextLogicalOrderCacheIfNeeded):
(WebCore::InlineIterator::updateTextLogicalOrderCacheIfNeeded):
(WebCore::InlineIterator::firstTextBoxInLogicalOrderFor):
(WebCore::InlineIterator::nextTextBoxInLogicalOrder):
(WebCore::InlineIterator::makeLineLogicalOrderCacheIfNeeded):
(WebCore::InlineIterator::updateLineLogicalOrderCacheIfNeeded):
(WebCore::InlineIterator::firstLeafOnLineInLogicalOrder):
(WebCore::InlineIterator::lastLeafOnLineInLogicalOrder):
(WebCore::InlineIterator::nextLeafOnLineInLogicalOrder):
(WebCore::InlineIterator::previousLeafOnLineInLogicalOrder):
(WebCore::InlineIterator::firstLeafOnLineInLogicalOrderWithNode):
(WebCore::InlineIterator::lastLeafOnLineInLogicalOrderWithNode):

  • layout/integration/InlineIteratorLogicalOrderTraversal.h: Added.
  • layout/integration/InlineIteratorTextBox.cpp:

(WebCore::InlineIterator::firstTextBoxInLogicalOrderFor): Deleted.
(WebCore::InlineIterator::nextTextBoxInLogicalOrder): Deleted.

  • layout/integration/InlineIteratorTextBox.h:

(): Deleted.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

  • rendering/RenderText.cpp:
1:25 PM Changeset in webkit [284268] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Import AuthenticationServicesCore's public module as well
https://bugs.webkit.org/show_bug.cgi?id=231806
<rdar://84299174>

Patch by Garrett Davidson <garrett_davidson@apple.com> on 2021-10-15
Reviewed by Wenson Hsieh.

Import the public module explicitly before the private module.

  • Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
1:13 PM Changeset in webkit [284267] by Robert Jenner
  • 3 edits
    3 copies
    3 adds in trunk/LayoutTests

REBASELINE 2 tables/mozilla tests failing constantly
https://bugs.webkit.org/show_bug.cgi?id=228200

Unreviewed test gardening/rebase for Monterey.

  • platform/mac-bigsur/tables/mozilla/bugs/bug2479-3-expected.txt: Copied from LayoutTests/platform/mac/tables/mozilla/bugs/bug2479-3-expected.txt.
  • platform/mac-bigsur/tables/mozilla/bugs/bug26178-expected.txt: Copied from LayoutTests/platform/mac/tables/mozilla/bugs/bug26178-expected.txt.
  • platform/mac-catalina/tables/mozilla/bugs/bug26178-expected.txt: Copied from LayoutTests/platform/mac/tables/mozilla/bugs/bug26178-expected.txt.
  • platform/mac/tables/mozilla/bugs/bug2479-3-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug26178-expected.txt:
12:59 PM Changeset in webkit [284266] by Andres Gonzalez
  • 10 edits in trunk/Source/WebCore

Calls to AXCoreObject::widget() have to be dispatch to the main thread in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=231766
<rdar://problem/84271039>

Reviewed by Chris Fleizach.

This patch fixes several dozens of tests that were crashing or timing out in isolated tree mode.

The WebAccessibilityObjectWrapper was calling the widget() method on the
AX thread, which creates problems because this object is not thread
safe and it is created on the main thread. To avoid this problem, we
have to dispatch those calls to the main thread. Since widget() is
called very often now, for every request of the children of a leaf node,
added AXCoreObject::isWidget() to be able to check for it without having
to return the Widget object. The IsWidget property is cached in the
AXIsolatedObject, hence limiting the number of times we have to hit the
main thread.

  • accessibility/AccessibilityNodeObject.cpp:

Removed include header that is not used in this cpp.

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::isWidget const):
(WebCore::AccessibilityRenderObject::widget const):

  • accessibility/AccessibilityRenderObject.h:
  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::widget const):

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

(-[WebAccessibilityObjectWrapper renderWidgetChildren]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(isMatchingPlugin):

12:43 PM Changeset in webkit [284265] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Sort unix syscall list in WP sandbox
https://bugs.webkit.org/show_bug.cgi?id=231810
<rdar://problem/84305761>

Unreviewed formatting change. No change in behavior.

  • WebProcess/com.apple.WebProcess.sb.in:
12:16 PM Changeset in webkit [284264] by BJ Burg
  • 9 edits in trunk

[Cocoa] Web Inspector: handle Promise objects returned from evaluateScriptInExtensionTab
https://bugs.webkit.org/show_bug.cgi?id=231709
<rdar://problem/84224179>

Reviewed by Timothy Hatcher.

Source/WebCore:

New API test: WKInspectorExtension.EvaluateScriptInExtensionTabCanReturnPromises

  • inspector/InspectorFrontendAPIDispatcher.cpp:

(WebCore::InspectorFrontendAPIDispatcher::evaluateOrQueueExpression):
Add JSLockHolders for when we are poking at the result value.

Source/WebInspectorUI:

This patch improves the handling of promises and exceptions that come from
InspectorFrontendHost.evaluateScriptInExtensionTab().

For promises, wait for the returned promise to settle before fulfilling our returned value.
For errors, perform a better stringification of the Error instance. The is needed because
the default toString implementation leaves out most of the relevant details of the error.

  • UserInterface/Controllers/WebInspectorExtensionController.js:

(WI.WebInspectorExtensionController.prototype.evaluateScriptInExtensionTab):

  • UserInterface/Protocol/InspectorFrontendAPI.js:

Fix incorrect header docs for InspectorFrontendAPI.evaluateScriptForExtension.
Copy the improved header doc for InspectorFrontendAPI.evaluateScriptInExtensionTab
since it now has the same calling convention.

Source/WebKit:

  • WebProcess/Inspector/WebInspectorUIExtensionController.cpp:

(WebKit::WebInspectorUIExtensionController::evaluateScriptForExtension):
(WebKit::WebInspectorUIExtensionController::evaluateScriptInExtensionTab):
Add JSLockHolders for when we are poking at the result value.
Drive-by, fix a typo in logging code.

Tools:

Add a new test:
WKInspectorExtension.EvaluateScriptInExtensionTabCanReturnPromises

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm:

(TEST):

12:14 PM Changeset in webkit [284263] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Refactor PR branch management (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=230432
<rdar://problem/83258413>

Reviewed by Stephanie Lewis.

When we are uploading a change that includes multiple commits,
the second commit will be on the same branch as the first, but that
branch will be editable. We should not declare that "no commits
have been found on an editable branch," because that's not true.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:

(Branch.branch_point): Log the found commit for branches with multiple commits.

12:13 PM Changeset in webkit [284262] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Make submit to ews error messages readable
https://bugs.webkit.org/show_bug.cgi?id=231824

Reviewed by Ryan Haddad.

  • CISupport/ews-app/ews/views/submittoews.py:

(SubmitToEWS.post):

12:12 PM Changeset in webkit [284261] by Wenson Hsieh
  • 5 edits in trunk

REGRESSION (r284079): [Debug] IPCTestingAPI.CanReceiveSharedMemory is timing out
https://bugs.webkit.org/show_bug.cgi?id=231701
<rdar://problem/84219000>

Reviewed by Tim Horton.

Source/WebKit:

Implement two new methods on JSIPCStreamClientConnection: sendMessage() and sendSyncMessage(), which can be
used to send IPC messages through the IPC stream client connection. To do this, we match the existing methods of
the same names on JSIPC by creating a message encoder and sending it over the stream connection's IPC
connection, effectively treating all IPC messages as out-of-line.

In the future, this should be changed so that we only try to send out-of-line messages if the message itself is
not stream encodable; for the time being, this at least allows us to fix the failing API test, and still makes
it possible to test sending arbitrary IPC through the connection stream, such that we'll be able to exercise
WebGL and display list IPC via these special JS IPC bindings.

  • Platform/IPC/StreamClientConnection.h:
  • WebProcess/WebPage/IPCTestingAPI.cpp:

Declare several static helper functions near the top of this source file, so that we can use them in
JSIPCStreamClientConnection below.

(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::create):
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::JSIPCStreamClientConnection):
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::staticFunctions):

Drive-by fix: make the pointer from JSIPCStreamConnectionBuffer to JSIPCStreamClientConnection a WeakPtr, to
prevent the stream connection buffer from keeping the client connection alive for longer than necessary. The
JSIPCStreamConnectionBuffer is always intended to be outlived by JSIPCStreamClientConnection when using JS IPC.

(WebKit::IPCTestingAPI::extractIPCStreamMessageInfo):

Pull logic for extracting a destination ID, message name, and IPC timeout into a common helper method.

(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::prepareToSendOutOfStreamMessage):

Add a helper method that encodes the given message and prepares the stream connection for sending this as an
out-of-stream message by setting the destination ID (if needed) and appending the ProcessOutOfStreamMessage
message to indicate that the recipient should expect an out-of-stream message.

(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::sendMessage):
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::sendSyncMessage):
(WebKit::IPCTestingAPI::JSIPC::createStreamClientConnection):

Tools:

Fix the failing API test by using the new sendSyncMessage() method on JSIPCStreamClientConnection to send
the "RemoteRenderingBackend::UpdateSharedMemoryForGetPixelBuffer" stream message and decode the result into a
buffer of shared memory.

  • TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:

(TEST):

12:10 PM Changeset in webkit [284260] by commit-queue@webkit.org
  • 6 edits
    4 deletes in trunk

Unreviewed, reverting r284244.
https://bugs.webkit.org/show_bug.cgi?id=231813

Introduced

Reverted changeset:

"AX: Return AXEmptyGroup subrole for groups with no accessible
content"
https://bugs.webkit.org/show_bug.cgi?id=231528
https://commits.webkit.org/r284244

12:08 PM Changeset in webkit [284259] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WTF

[Cocoa] Design System UI fonts exist on MacCatalyst
https://bugs.webkit.org/show_bug.cgi?id=231792
<rdar://problem/84273929>

Reviewed by Wenson Hsieh.

They shouldn't be disabled there.

  • wtf/PlatformHave.h:
11:45 AM Changeset in webkit [284258] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r283846. rdar://problem/84117092

Fix crash in NetworkProcess preconnect due to dereferencing deallocated session
https://bugs.webkit.org/show_bug.cgi?id=231456
<rdar://problem/83752148>

Reviewed by Chris Dumez.

We capture a raw NetworkSession reference in the preconnect completion handler. This
reference could point to a deallocated object if the NetworkSession dies before the
preconnect finishes.

  • NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::preconnectTo):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283846 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:31 AM Changeset in webkit [284257] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=230376

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations: Removed test expectations
11:23 AM Changeset in webkit [284256] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] http/wpt/webaudio/the-audio-api/the-audioworklet-interface/context-already-rendering.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=230421

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations: Removed test expectations
10:40 AM Changeset in webkit [284255] by commit-queue@webkit.org
  • 13 edits in trunk/Source/JavaScriptCore

[JSC][32bit] Fix CSR restore on DFG tail calls, add extra register on ARMv7
https://bugs.webkit.org/show_bug.cgi?id=230622

Patch by Geza Lore <Geza Lore> on 2021-10-15
Reviewed by Saam Barati.

This patch does two things:

  1. Adds an extra callee save register (CSR) to be available to DFG on

ARMv7. To do this properly required the following:

  1. Implements the necessary shuffling in CallFrameShuffler on 32-bit

architectures that is required to restore CSRs properly after a tail
call on these architectures. This also fixes the remaining failures in
the 32-bit build of the unlinked baseline JIT.

  • bytecode/ValueRecovery.cpp:

(JSC::ValueRecovery::dumpInContext const):

  • bytecode/ValueRecovery.h:

(JSC::ValueRecovery::calleeSaveRegDisplacedInJSStack):
(JSC::ValueRecovery::isInJSStack const):
(JSC::ValueRecovery::dataFormat const):
(JSC::ValueRecovery::withLocalsOffset const):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • jit/CachedRecovery.cpp:

(JSC::CachedRecovery::loadsIntoGPR const):

  • jit/CallFrameShuffleData.cpp:

(JSC::CallFrameShuffleData::setupCalleeSaveRegisters):

  • jit/CallFrameShuffleData.h:
  • jit/CallFrameShuffler.cpp:

(JSC::CallFrameShuffler::CallFrameShuffler):

  • jit/CallFrameShuffler.h:

(JSC::CallFrameShuffler::snapshot const):
(JSC::CallFrameShuffler::addNew):

  • jit/CallFrameShuffler32_64.cpp:

(JSC::CallFrameShuffler::emitLoad):
(JSC::CallFrameShuffler::emitDisplace):

  • jit/GPRInfo.h:

(JSC::GPRInfo::toRegister):
(JSC::GPRInfo::toIndex):

  • jit/RegisterSet.cpp:

(JSC::RegisterSet::dfgCalleeSaveRegisters):

  • llint/LowLevelInterpreter32_64.asm:
10:39 AM Changeset in webkit [284254] by Kate Cheney
  • 97 edits
    5 adds in trunk

CSP: Implement src-elem and src-attr directives
https://bugs.webkit.org/show_bug.cgi?id=231751
<rdar://problem/83332874>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/content-security-policy/child-src/child-src-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/child-src/child-src-redirect-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/default-src-inline-blocked.sub-expected.txt: Added.
  • web-platform-tests/content-security-policy/default-src/default-src-inline-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/generic/generic-0_1-img-src-expected.txt:
  • web-platform-tests/content-security-policy/generic/generic-0_1-script-src-expected.txt:
  • web-platform-tests/content-security-policy/meta/combine-header-and-meta-policies.sub-expected.txt:
  • web-platform-tests/content-security-policy/navigation/javascript-url-navigation-inherits-csp-expected.txt:
  • web-platform-tests/content-security-policy/navigation/to-javascript-parent-initiated-parent-csp-expected.txt:
  • web-platform-tests/content-security-policy/reporting/report-uri-effective-directive-expected.txt:
  • web-platform-tests/content-security-policy/script-src-attr-elem/script-src-attr-allowed-src-blocked-expected.txt:
  • web-platform-tests/content-security-policy/script-src-attr-elem/script-src-attr-blocked-src-allowed-expected.txt:
  • web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-allowed-attr-blocked-expected.txt:
  • web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-allowed-src-blocked-expected.txt:
  • web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-blocked-attr-allowed-expected.txt:
  • web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-blocked-src-allowed-expected.txt:
  • web-platform-tests/content-security-policy/script-src/injected-inline-script-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-1_1-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-1_10-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-1_2-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-1_2_1-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-hash-policy-expected.txt:
  • web-platform-tests/content-security-policy/script-src/scriptnonce-and-scripthash.sub-expected.txt:
  • web-platform-tests/content-security-policy/script-src/scriptnonce-basic-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/script-src/scriptnonce-ignore-unsafeinline.sub-expected.txt:
  • web-platform-tests/content-security-policy/script-src/srcdoc-doesnt-bypass-script-src.sub-expected.txt:
  • web-platform-tests/content-security-policy/style-src-attr-elem/style-src-attr-allowed-src-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src-attr-elem/style-src-attr-blocked-src-allowed-expected.txt:
  • web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-allowed-attr-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-allowed-src-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-blocked-attr-allowed-expected.txt:
  • web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-blocked-src-allowed-expected.txt:
  • web-platform-tests/content-security-policy/style-src/injected-inline-script-blocked.sub-expected.txt: Added.
  • web-platform-tests/content-security-policy/style-src/injected-inline-style-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/style-src/inline-style-allowed-while-cloning-objects.sub-expected.txt:
  • web-platform-tests/content-security-policy/style-src/inline-style-attribute-blocked-expected.txt: Added.
  • web-platform-tests/content-security-policy/style-src/inline-style-attribute-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-hash-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-injected-inline-style-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-inline-style-attribute-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-inline-style-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src/stylehash-basic-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/style-src/stylenonce-allowed.sub-expected.txt:
  • web-platform-tests/content-security-policy/style-src/stylenonce-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href_blank-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-window_open-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href_blank-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-window_open-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/script_event_handlers_denied_missing_unsafe_hashes-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/script_event_handlers_denied_wrong_hash-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/style_attribute_denied_missing_unsafe_hashes-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/style_attribute_denied_wrong_hash-expected.txt:
  • web-platform-tests/content-security-policy/blob/blob-urls-do-not-match-self.sub-expected.txt:
  • web-platform-tests/content-security-policy/generic/generic-0_10_1.sub-expected.txt:
  • web-platform-tests/content-security-policy/generic/generic-0_2_2.sub-expected.txt:
  • web-platform-tests/content-security-policy/generic/generic-0_2_3-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-external-hash-policy-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-imported-style-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-injected-stylesheet-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-none-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-stylesheet-nonce-blocked-expected.txt:
  • web-platform-tests/content-security-policy/svg/svg-inline.sub-expected.txt:

Source/WebCore:

Implement script-src-elem, script-src-attr, style-src-elem, and
style-src-attr directives. *-elem directives specify load policy for
<script> and <style> elements. *-attr directives specify load policy
for inline event handlers or inline style applied to individual DOM elements.

To match behavior of wpt tests and other browsers, we should report
the violated directive as accurately as possible even if a more
general directive was specified in the policy. For example, reporting
the violated directive as script-src even if default-src was
specified, and script-src-elem even if only script-src was specified.
To do this I added a nameForReporting() method in the
ContentSecurityPolicySourceListDirective class that gets set when we
check the load for violations.

Console messages should not change, in fact, we should consider making
them more specific in the future.

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allowJavaScriptURLs const):
(WebCore::ContentSecurityPolicy::allowInlineEventHandlers const):
(WebCore::ContentSecurityPolicy::allowInlineScript const):
(WebCore::ContentSecurityPolicy::allowInlineStyle const):
We can reuse the check for unsafe hashes to determine if we should
report a style-src-elem or style-src-attr violation.

(WebCore::ContentSecurityPolicy::reportViolation const):

  • page/csp/ContentSecurityPolicyDirective.cpp:

(WebCore::ContentSecurityPolicyDirective::~ContentSecurityPolicyDirective):
Need a destructor now that we have virtual functions.

  • page/csp/ContentSecurityPolicyDirective.h:

(WebCore::ContentSecurityPolicyDirective::nameForReporting const):

  • page/csp/ContentSecurityPolicyDirectiveList.cpp:

(WebCore::ContentSecurityPolicyDirectiveList::create):
unsafe-eval should still have script-src as a violated directive.

(WebCore::ContentSecurityPolicyDirectiveList::operativeDirective const):
(WebCore::ContentSecurityPolicyDirectiveList::operativeDirectiveScript const):
(WebCore::ContentSecurityPolicyDirectiveList::operativeDirectiveStyle const):
elem/attr directives fall back to their respective general directives
if the more specific ones do not exist.

(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeEval const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeHashScript const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeHashStyle const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForParserInsertedScript const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeInlineScriptElement const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeInlineScriptAttribute const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeInlineStyleElement const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeInlineStyleAttribute const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForScriptHash const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForStyleHash const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForScriptNonce const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForStyleNonce const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForChildContext const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForConnectSource const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForFont const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForFrame const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForImage const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForManifest const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForMedia const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForObjectSource const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForScript const):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForStyle const):
(WebCore::ContentSecurityPolicyDirectiveList::addDirective):
(WebCore::ContentSecurityPolicyDirectiveList::strictDynamicIncluded):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeInlineScript const): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeInlineStyle const): Deleted.

  • page/csp/ContentSecurityPolicyDirectiveList.h:
  • page/csp/ContentSecurityPolicyDirectiveNames.cpp:
  • page/csp/ContentSecurityPolicyDirectiveNames.h:
  • page/csp/ContentSecurityPolicySourceListDirective.h:

(WebCore::ContentSecurityPolicySourceListDirective::setNameForReporting):

LayoutTests:

  • http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/script-blocked-sends-multiple-reports-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy2-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-enforced-policy-and-allowed-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-enforced-policy-and-allowed-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-child-src-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-default-src-expected.txt:

These should both be reproting frame-src as the violated directive,
confirmed this behavior against Chrome.

  • http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-only-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-only-upgrade-insecure-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-uri-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-uri-scheme-relative-expected.txt:
10:34 AM Changeset in webkit [284253] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS Catalina ] imported/w3c/web-platform-tests/css/css-transforms/crashtests/transform-marquee-resize-div-image-001.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231816

Unreviewed test gardning.

  • platform/ios-wk2/TestExpectations:
10:33 AM Changeset in webkit [284252] by Brent Fulgham
  • 4 edits in trunk/Source/WebKit

[macOS] Update sandboxes to support finer-grained XPC services in the media stack
https://bugs.webkit.org/show_bug.cgi?id=231782
<rdar://problem/84275671>

Reviewed by Eric Carlson.

CoreMedia is refactoring to limit the features accessible through a given XPC service.
We need to add an additional service name. This new name just exposes features already
exposed through other XPC endpoints we already allow.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in: Always allow access to the new service.
  • UIProcess/WebPageProxy.cpp:

(WebKit::mediaRelatedMachServices): Updated for new service name.

  • WebProcess/com.apple.WebProcess.sb.in: Conditionally consume the new extension

if the GPU process is turned off.

9:43 AM Changeset in webkit [284251] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

Unreviewed maccatalyst build fix.

  • GPUProcess/cocoa/GPUConnectionToWebProcessCocoa.mm:

(WebKit::GPUConnectionToWebProcess::setTCCIdentity):

9:14 AM Changeset in webkit [284250] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Explicitly link webpushd with Foundation and CoreFoundation
https://bugs.webkit.org/show_bug.cgi?id=231808
<rdar://84302128>

Reviewed by Brady Eidson.

There is a build environment where the linker can't find a bunch of symbols from Foundation and CoreFoundation.
This should fix that build.

  • Configurations/webpushd.xcconfig:
8:50 AM Changeset in webkit [284249] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][GPUP] Block access to Launch Services Database service
https://bugs.webkit.org/show_bug.cgi?id=231504
<rdar://problem/84091679>

Reviewed by Brent Fulgham.

After <https://commits.webkit.org/242382@main>, access to this service is no longer required.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
8:47 AM Changeset in webkit [284248] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Unreviewed, revert an unintentional sandbox change in r284079

I accidentally included the below change as a part of r284079, since it was necessary in order to avoid several
layout test failures on macOS Monterey:

  • fast/canvas/toDataURL-supportedTypes.html
  • fast/canvas/canvas-blending-image-over-image.html
  • fast/canvas/canvas-blending-image-over-gradient.html
  • fast/canvas/canvas-blending-image-over-color.html
  • fast/canvas/toDataURL-not-empty.html

...but forgot to revert this change when landing the final patch.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
8:25 AM Changeset in webkit [284247] by Simon Fraser
  • 3 edits
    2 adds in trunk

REGRESSION (r276370): Elements with animated transform property might not properly rendered
https://bugs.webkit.org/show_bug.cgi?id=230753

Reviewed by Myles C. Maxfield.

Source/WebCore:

The change in r276370 was incorrect, resulting in the geometry map being used when
an element had a transform and transform-style: preserves-3d.

Fix by going back to testing for the presence of the various transform properties which
affect geometry. hasTransformRelatedProperty() is still useful as a fast bit-check.

Test: fast/repaint/transform-preserve-3d-repaint.html

  • rendering/RenderGeometryMap.cpp:

(WebCore::canMapBetweenRenderersViaLayers):

LayoutTests:

  • fast/repaint/transform-preserve-3d-repaint-expected.txt: Added.
  • fast/repaint/transform-preserve-3d-repaint.html: Added.
8:13 AM Changeset in webkit [284246] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

AX: role="math" elements are no longer considered to have presentational children
https://bugs.webkit.org/show_bug.cgi?id=231756

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-15
Reviewed by Chris Fleizach and Darin Adler.

Source/WebCore:

As of WAI-ARIA 1.2, role="math" elements are no longer considered to
have presentational children.

Test: accessibility/math-has-non-presentational-children.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::canHaveChildren const):
Allow AccessibilityRole::DocumentMath elements to have children.

LayoutTests:

  • accessibility/math-has-non-presentational-children-expected.txt: Added.
  • accessibility/math-has-non-presentational-children.html: Added.
  • accessibility/presentational-children-expected.txt:
  • accessibility/presentational-children.html:

Remove the role="math" element from this test because as of WAI-ARIA
1.2 role="math" is no longer considered to have presentational children.
Also change this test to ensure role="meter" elements are considered to
have presentational children because that testcase was missing.

8:10 AM WebKitGTK/2.34.x edited by Michael Catanzaro
(diff)
8:09 AM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
7:35 AM Changeset in webkit [284245] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

AX: WebKit should not expose redundant AXGroups with missing role when the label is the same as the contents
https://bugs.webkit.org/show_bug.cgi?id=169924

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-15
Reviewed by Andres Gonzalez.

Source/WebCore:

Don't expose groups with redundant accessibility text on the Mac.
Here's an example of one such group:

<div aria-label="1">1</div>

This group is not useful to accessibility clients. Instead, we
expose the text contents directly.

Test: accessibility/ignore-redundant-accessibility-text-groups.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::textUnderElement const):
Instead of asserting when we try to get the text of an element in a
document that needs a style update, return an empty string.

  • accessibility/mac/AccessibilityObjectMac.mm:

(WebCore::shouldIgnoreGroup): Added.
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const):

LayoutTests:

Add a test ensuring WebKit appropriately does and doesn't expose
groups with redundant accessibility text.

  • accessibility/mac/ignore-redundant-accessibility-text-groups-expected.txt: Added.
  • accessibility/mac/ignore-redundant-accessibility-text-groups.html: Added.
7:32 AM Changeset in webkit [284244] by commit-queue@webkit.org
  • 6 edits
    4 adds in trunk

AX: Return AXEmptyGroup subrole for groups with no accessible content
https://bugs.webkit.org/show_bug.cgi?id=231528

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-15
Reviewed by Andres Gonzalez.

Source/WebCore:

Return a subrole of "AXEmptyGroup" for groups without any exposed
children. WebKit can calculate this more efficiently than AX clients,
so it makes more sense to do here.

Test: accessibility/mac/empty-group-computation.html

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper subrole]):

LayoutTests:

  • accessibility/mac/aria-divs-not-ignored-expected.txt:
  • accessibility/mac/aria-divs-not-ignored.html:

Expect a subrole of AXEmptyGroup because this group has no content.

  • accessibility/mac/empty-group-computation-expected.txt: Added.
  • accessibility/mac/empty-group-computation.html: Added.
  • platform/mac/accessibility/lists-expected.txt: Added.
  • platform/mac/accessibility/plugin-expected.txt: Added.

Add these Mac-specific expectations for these tests because this patch
only causes Mac to expose the AXEmptyGroup subrole.

  • platform/mac/accessibility/svg-element-with-aria-role-expected.txt:

Add an expected subrole of AXEmptyGroup.

7:01 AM Changeset in webkit [284243] by Andres Gonzalez
  • 2 edits in trunk

Change Andres Gonzalez status to reviewer.
https://bugs.webkit.org/show_bug.cgi?id=231738

Reviewed by Chris Fleizach.

  • metadata/contributors.json:
6:33 AM Changeset in webkit [284242] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][IFC] Do not break the word-wrap: break-word content on inline box boundary
https://bugs.webkit.org/show_bug.cgi?id=231761

Reviewed by Antti Koivisto.

Source/WebCore:

When the text content is breakable at arbitrary position and it is not the overflowing content (the overflowing content is not breakable)
we just return the text run as the trailing run as it surely fits e.g.

<span style="word-wrap: break-word">this_content_is_breakable</span>and_this_content_overflows

  1. There's no soft wrapping opportunity between the two text runs (they form a continuous set)
  2. The trailing run overflow but can't be split

we go backwards on the set to find a breakable one. In this case the first text run is breakable (see CSS property) and
since we know it fits the line we just simply declare the end of the run as the breaking position.
However we should try to keep the runs and their adjacent inline box boundary runs together and instead find the end of the </span> as
the breaking position. It's mostly noticeable when the inline box has some visual decoration e.g. border.

Test: fast/inline/wordbreak-at-inline-box-boundary.html

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const):
(WebCore::Layout::InlineContentBreaker::tryBreakingPreviousNonOverflowingRuns const):

LayoutTests:

  • fast/inline/wordbreak-at-inline-box-boundary-expected.html: Added.
  • fast/inline/wordbreak-at-inline-box-boundary.html: Added.
3:24 AM Changeset in webkit [284241] by Alexey Shvayka
  • 14 edits in trunk

[WebIDL] JSDOMBuiltinConstructor instances should support subclassing
https://bugs.webkit.org/show_bug.cgi?id=231689

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/streams/queuing-strategies.any-expected.txt:
  • web-platform-tests/streams/queuing-strategies.any.worker-expected.txt:
  • web-platform-tests/streams/readable-streams/general.any-expected.txt:
  • web-platform-tests/streams/readable-streams/general.any.worker-expected.txt:
  • web-platform-tests/streams/transform-streams/general.any-expected.txt:
  • web-platform-tests/streams/transform-streams/general.any.worker-expected.txt:

Source/WebCore:

This patch:

  1. Removes JSDOMObjectInspector and related conditional createJSObject() / callConstructor() overloads: they aren't necessary because code generator guarantees that built-in constructors are called only on JSDOMObjectInspector<JSClass>::isBuiltin objects.
  1. Implements proper subclassing [1] for built-in constructors, ensuring exception checking and rare cases are kept off the fast path. For simplicity and consistency with JSC built-ins and setSubclassStructureIfNeeded(), getFunctionRealm() is called before "prototype" lookup, which is non-observable.
  1. Further improves constructor's fast path by replacing slowish argument-copying callFunctionWithCurrentArguments() with ArgList(CallFrame*) constructor.

[1] https://webidl.spec.whatwg.org/#internally-create-a-new-object-implementing-the-interface (step 3)

Tests: imported/w3c/web-platform-tests/streams/queuing-strategies.any.js

imported/w3c/web-platform-tests/streams/readable-streams/general.any.js
imported/w3c/web-platform-tests/streams/transform-streams/general.any.js

  • bindings/js/JSDOMBuiltinConstructor.h:

(WebCore::JSDOMBuiltinConstructor<JSClass>::getDOMStructureForJSObject):
(WebCore::JSDOMBuiltinConstructor<JSClass>::construct):
(WebCore::JSDOMBuiltinConstructor<JSClass>::callConstructor): Deleted.
(WebCore::createJSObject): Deleted.

  • bindings/js/JSDOMBuiltinConstructorBase.cpp:

(WebCore::JSDOMBuiltinConstructorBase::callFunctionWithCurrentArguments): Deleted.

  • bindings/js/JSDOMBuiltinConstructorBase.h:
  • bindings/js/JSDOMWrapper.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(AddJSBuiltinIncludesIfNeeded):
Removes [JSBuiltin] check because it's superseded by HasJSBuiltinConstructor helper.

  • bindings/scripts/IDLAttributes.json:

Removes unused [JSBuiltinConstructor] extended attribute:
[JSBuiltin] on constructor() or interface should be used instead.

2:26 AM Changeset in webkit [284240] by beidson@apple.com
  • 16 edits
    2 copies
    1 add in trunk/Source

WebKit Managed Notifications: Skeleton NotificationProvider.
<rdar://84275562> and https://bugs.webkit.org/show_bug.cgi?id=231786

Reviewed by Alex Christensen.

Source/WebKit:

No new tests (No behavior change yet)

Currently WebNotificationManagerProxy manages dispatching out stuff to the NotificationProvider SPI
that - for example - Safari on Mac implements.

The interface between the ManagerProxy and the Provider is already the perfect way to add an alternative behavior.

This introduces the skeleton class of an alternative NotificationProvider that will eventually implement
WebKit-managed notifications.

While under development it will have a global runtime switch so we can A/B test between the client-managed and
WebKit-managed notifications. That switch would eventually be replaced by full compile-time behavior which would
be decided by a shipping vendor.

Note: This patch enables the new flag BUILT_IN_NOTIFICATIONS to get the new mechanisms building, but that flag by
itself doesn't expose Notifications interfaces in WebCore.
That will still require enabling NOTIFICATIONS separately.

  • SourcesCocoa.txt:
  • UIProcess/API/APINotificationProvider.h:

(API::NotificationProvider::isClientReplaceable const): A temporary mechanism to prevent API clients from overriding

the built-in NotificationProvider if the feature is enabled. Useful right now because existing Safari does that with existing SPI.

  • UIProcess/API/APIUIClient.h:

(API::UIClient::decidePolicyForNotificationPermissionRequest):

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::decidePolicyForNotificationPermissionRequest):

  • UIProcess/Notifications/Cocoa/WebNotificationProviderCocoa.h: Copied from Source/WebKit/UIProcess/API/APINotificationProvider.h.
  • UIProcess/Notifications/Cocoa/WebNotificationProviderCocoa.mm: Added.

(WebKit::WebNotificationProviderCocoa::createIfEnabled):
(WebKit::WebNotificationProviderCocoa::WebNotificationProviderCocoa):
(WebKit::WebNotificationProviderCocoa::show):
(WebKit::WebNotificationProviderCocoa::cancel):
(WebKit::WebNotificationProviderCocoa::didDestroyNotification):
(WebKit::WebNotificationProviderCocoa::clearNotifications):
(WebKit::WebNotificationProviderCocoa::addNotificationManager):
(WebKit::WebNotificationProviderCocoa::removeNotificationManager):
(WebKit::WebNotificationProviderCocoa::notificationPermissions):

  • UIProcess/Notifications/WebNotificationManagerProxy.cpp:

(WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy):
(WebKit::WebNotificationManagerProxy::setProvider):

Fix changes to the Unified Build:

  • UIProcess/ios/WKHoverPlatter.h:
  • UIProcess/ios/WKHoverPlatter.mm:
  • WebKit.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebNotificationClient.mm:

(-[WebNotificationPolicyListener NO_RETURN_DUE_TO_ASSERT]):
(-[WebNotificationPolicyListener denyOnlyThisRequest]): Deleted.

Source/WTF:

  • Scripts/Preferences/WebPreferencesDebug.yaml:
  • wtf/PlatformEnableCocoa.h:
2:03 AM Changeset in webkit [284239] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[WPE][GTK] Update user agent browser versions
https://bugs.webkit.org/show_bug.cgi?id=231772

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-15
Reviewed by Carlos Garcia Campos.

  • platform/UserAgentQuirks.cpp:

(WebCore::UserAgentQuirks::stringForQuirk):

  • platform/glib/UserAgentGLib.cpp:

(WebCore::buildUserAgentString):

1:42 AM Changeset in webkit [284238] by Carlos Garcia Campos
  • 3 edits in trunk

Unreviewed. Fix GTK build with ubuntu 18.04

GLib version bump in r284152 was too high for ubuntu 18.04 even though it followed our dependencies policy.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:
12:35 AM Changeset in webkit [284237] by rmorisset@apple.com
  • 91 edits
    3 deletes in trunk

Revert r284230, my last fixes to the watch build make it break tests
https://bugs.webkit.org/show_bug.cgi?id=231797

Unreviewed.

JSTests:

  • stress/big-wasm-memory-grow-no-max.js:

(test):

  • stress/big-wasm-memory-grow.js:

(test):

  • stress/big-wasm-memory.js:

(test):

  • stress/typed-array-always-large.js: Removed.

(getArrayLength): Deleted.
(getByVal): Deleted.
(putByVal): Deleted.
(test): Deleted.

  • stress/typed-array-eventually-large.js: Removed.

(getArrayLength): Deleted.
(getByVal): Deleted.
(putByVal): Deleted.
(test): Deleted.

  • stress/typed-array-large-eventually-oob.js: Removed.

(getArrayLength): Deleted.
(getByVal): Deleted.
(putByVal): Deleted.
(test): Deleted.

  • wasm/regress/wasm-memory-requested-more-than-MAX_ARRAY_BUFFER_SIZE-2.js:
  • wasm/regress/wasm-memory-requested-more-than-MAX_ARRAY_BUFFER_SIZE.js:

Source/JavaScriptCore:

Revert "Allow WASM to use up to 4GB"

  • assembler/AbstractMacroAssembler.cpp:
  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::TrustedImmPtr::TrustedImmPtr):
(JSC::AbstractMacroAssembler::TrustedImmPtr::asIntptr):
(JSC::AbstractMacroAssembler::TrustedImmPtr::asPtr):
(JSC::AbstractMacroAssembler::ImmPtr::ImmPtr):
(JSC::AbstractMacroAssembler::ImmPtr::asTrustedImmPtr):
(JSC::AbstractMacroAssembler::TrustedImm32::TrustedImm32):
(JSC::AbstractMacroAssembler::Imm32::Imm32):
(JSC::AbstractMacroAssembler::Imm32::asTrustedImm32 const):
(JSC::AbstractMacroAssembler::TrustedImm64::TrustedImm64):
(JSC::AbstractMacroAssembler::Imm64::Imm64):
(JSC::AbstractMacroAssembler::Imm64::asTrustedImm64 const):
(JSC::AbstractMacroAssembler::canBlind):
(JSC::AbstractMacroAssembler::shouldBlindForSpecificArch):

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::and64):
(JSC::MacroAssembler::branch64): Deleted.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::shouldBlindForSpecificArch):

  • assembler/MacroAssemblerARM64E.h:

(JSC::MacroAssemblerARM64E::untagArrayPtrLength32):
(JSC::MacroAssemblerARM64E::untagArrayPtrLength64): Deleted.

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::canBlind):
(JSC::MacroAssemblerX86Common::shouldBlindForSpecificArch):

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::needsScratchFPR const):
(JSC::AccessCase::generateWithGuard):

  • bytecode/ArrayProfile.h:

(JSC::UnlinkedArrayProfile::update):
(JSC::ArrayProfile::setMayBeLargeTypedArray): Deleted.
(JSC::ArrayProfile::mayBeLargeTypedArray const): Deleted.
(JSC::UnlinkedArrayProfile::UnlinkedArrayProfile): Deleted.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGArrayMode.cpp:

(JSC::DFG::ArrayMode::refine const):

  • dfg/DFGArrayMode.h:

(JSC::DFG::ArrayMode::ArrayMode):
(JSC::DFG::ArrayMode::action const):
(JSC::DFG::ArrayMode::withSpeculation const):
(JSC::DFG::ArrayMode::withArrayClass const):
(JSC::DFG::ArrayMode::withSpeculationFromProfile const):
(JSC::DFG::ArrayMode::withProfile const):
(JSC::DFG::ArrayMode::withType const):
(JSC::DFG::ArrayMode::withConversion const):
(JSC::DFG::ArrayMode::withTypeAndConversion const):
(JSC::DFG::ArrayMode::operator== const):
(JSC::DFG::ArrayMode::mayBeLargeTypedArray const): Deleted.
(JSC::DFG::ArrayMode::withArrayClassAndSpeculationAndMayBeLargeTypedArray const): Deleted.
(JSC::DFG::ArrayMode::speculationFromProfile): Deleted.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicGetter):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGCommon.h:

(JSC::DFG::enableInt52):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::prependGetArrayLength):

  • dfg/DFGGenerationInfo.h:
  • dfg/DFGHeapLocation.cpp:

(WTF::printInternal):

  • dfg/DFGHeapLocation.h:
  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
  • dfg/DFGNode.h:

(JSC::DFG::Node::hasStorageChild const):
(JSC::DFG::Node::storageChildIndex):
(JSC::DFG::Node::hasArrayMode):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:

(JSC::DFG::putByVal):
(JSC::DFG::newTypedArrayWithSize):
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSSALoweringPhase.cpp:

(JSC::DFG::SSALoweringPhase::handleNode):
(JSC::DFG::SSALoweringPhase::lowerBoundsCheck):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::jumpForTypedArrayOutOfBounds):
(JSC::DFG::SpeculativeJIT::emitTypedArrayBoundsCheck):
(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
(JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
(JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
(JSC::DFG::SpeculativeJIT::cageTypedArrayStorage):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset):
(JSC::DFG::SpeculativeJIT::compileGetArrayLength):
(JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithSize):
(JSC::DFG::SpeculativeJIT::compileNewTypedArray):
(JSC::DFG::SpeculativeJIT::emitNewTypedArrayWithSizeInRegister): Deleted.

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByVal):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithInt52Size): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayLengthAsInt52): Deleted.
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffsetAsInt52): Deleted.

  • dfg/DFGTypeCheckHoistingPhase.cpp:

(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):

  • dfg/DFGValidate.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::validateAIState):
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileGetArrayLength):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
(JSC::FTL::DFG::LowerDFGToB3::emitGetTypedArrayByteOffsetExceptSettingResult): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffsetAsInt52): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayLengthAsInt52): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::compileCheckInBoundsInt52): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::emitNewTypedArrayWithSize): Deleted.

  • ftl/FTLOutput.h:

(JSC::FTL::Output::load32NonNegative):
(JSC::FTL::Output::load64NonNegative): Deleted.

  • jit/IntrinsicEmitter.cpp:

(JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):

  • jit/JITOperations.cpp:

(JSC::putByVal):
(JSC::getByVal):

  • llint/LLIntOfflineAsmConfig.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::getByVal):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ArrayBuffer.cpp:

(JSC::SharedArrayBufferContents::SharedArrayBufferContents):
(JSC::ArrayBufferContents::ArrayBufferContents):
(JSC::ArrayBufferContents::tryAllocate):
(JSC::ArrayBuffer::create):
(JSC::ArrayBuffer::createAdopted):
(JSC::ArrayBuffer::createFromBytes):
(JSC::ArrayBuffer::tryCreate):
(JSC::ArrayBuffer::createUninitialized):
(JSC::ArrayBuffer::tryCreateUninitialized):
(JSC::ArrayBuffer::createInternal):
(JSC::ArrayBuffer::clampValue):
(JSC::ArrayBuffer::clampIndex const):
(JSC::ArrayBuffer::sliceWithClampedIndex const):

  • runtime/ArrayBuffer.h:

(JSC::ArrayBufferContents::sizeInBytes const):
(JSC::ArrayBuffer::byteLength const):
(JSC::ArrayBuffer::gcSizeEstimateInBytes const):

  • runtime/ArrayBufferView.cpp:

(JSC::ArrayBufferView::ArrayBufferView):

  • runtime/ArrayBufferView.h:

(JSC::ArrayBufferView::byteOffset const):
(JSC::ArrayBufferView::byteLength const):
(JSC::ArrayBufferView::verifyByteOffsetAlignment):
(JSC::ArrayBufferView::verifySubRangeLength):
(JSC::ArrayBufferView::clampOffsetAndNumElements):
(JSC::ArrayBufferView::setImpl):
(JSC::ArrayBufferView::setRangeImpl):
(JSC::ArrayBufferView::getRangeImpl):
(JSC::ArrayBufferView::zeroRangeImpl):
(JSC::ArrayBufferView::calculateOffsetAndLength):

  • runtime/AtomicsObject.cpp:
  • runtime/DataView.cpp:

(JSC::DataView::DataView):
(JSC::DataView::create):

  • runtime/DataView.h:
  • runtime/GenericTypedArrayView.h:
  • runtime/GenericTypedArrayViewInlines.h:

(JSC::GenericTypedArrayView<Adaptor>::GenericTypedArrayView):
(JSC::GenericTypedArrayView<Adaptor>::create):
(JSC::GenericTypedArrayView<Adaptor>::tryCreate):
(JSC::GenericTypedArrayView<Adaptor>::createUninitialized):
(JSC::GenericTypedArrayView<Adaptor>::tryCreateUninitialized):
(JSC::GenericTypedArrayView<Adaptor>::subarray const):

  • runtime/JSArrayBufferView.cpp:

(JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
(JSC::JSArrayBufferView::byteLength const):
(JSC::JSArrayBufferView::slowDownAndWasteMemory):
(JSC::JSArrayBufferView::possiblySharedImpl):

  • runtime/JSArrayBufferView.h:

(JSC::JSArrayBufferView::sizeOf):
(JSC::JSArrayBufferView::ConstructionContext::length const):
(JSC::JSArrayBufferView::length const):

  • runtime/JSArrayBufferViewInlines.h:

(JSC::JSArrayBufferView::byteOffsetImpl):
(JSC::JSArrayBufferView::byteOffset):
(JSC::JSArrayBufferView::byteOffsetConcurrently):

  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::toIndex const):
(JSC::JSValue::toTypedArrayIndex const): Deleted.

  • runtime/JSDataView.cpp:

(JSC::JSDataView::create):
(JSC::JSDataView::createUninitialized):
(JSC::JSDataView::set):
(JSC::JSDataView::setIndex):

  • runtime/JSDataView.h:
  • runtime/JSDataViewPrototype.cpp:

(JSC::getData):
(JSC::setData):

  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::constructGenericTypedArrayViewWithArguments):
(JSC::constructGenericTypedArrayViewImpl):

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::create):
(JSC::JSGenericTypedArrayView<Adaptor>::createWithFastVector):
(JSC::JSGenericTypedArrayView<Adaptor>::createUninitialized):
(JSC::JSGenericTypedArrayView<Adaptor>::validateRange):
(JSC::JSGenericTypedArrayView<Adaptor>::setWithSpecificType):
(JSC::JSGenericTypedArrayView<Adaptor>::set):

  • runtime/JSObject.h:

(JSC::JSObject::putByIndexInline):
(JSC::JSObject::tryGetIndexQuickly const):
(JSC::JSObject::canSetIndexQuickly):
(JSC::JSObject::trySetIndexQuickly): Deleted.

  • runtime/JSObjectInlines.h:

(JSC::JSObject::canSetIndexQuicklyForTypedArray const):
(JSC::JSObject::getIndexQuicklyForTypedArray const):
(JSC::JSObject::setIndexQuicklyForArrayStorageIndexingType): Deleted.
(JSC::JSObject::trySetIndexQuicklyForTypedArray): Deleted.

  • runtime/Operations.h:

(JSC::getByValWithIndex):

  • wasm/WasmPageCount.h:

Source/WebCore:

Revert "Allow WASM to use up to 4GB"

  • Modules/webaudio/AudioBuffer.cpp:

(WebCore::AudioBuffer::copyFromChannel):
(WebCore::AudioBuffer::copyToChannel):

  • Modules/webaudio/RealtimeAnalyser.cpp:

(WebCore::RealtimeAnalyser::getByteFrequencyData):
(WebCore::RealtimeAnalyser::getFloatTimeDomainData):
(WebCore::RealtimeAnalyser::getByteTimeDomainData):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::dumpArrayBufferView):
(WebCore::CloneSerializer::dumpImageBitmap):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneSerializer::write):
(WebCore::CloneDeserializer::read):
(WebCore::CloneDeserializer::readArrayBuffer):
(WebCore::CloneDeserializer::readArrayBufferView):
(WebCore::CloneDeserializer::readImageBitmap):
(WebCore::CloneDeserializer::readArrayBufferImpl): Deleted.
(WebCore::CloneDeserializer::readArrayBufferViewImpl): Deleted.

  • bindings/js/SerializedScriptValue.h:

(WebCore::SerializedScriptValue::encode const):
(WebCore::SerializedScriptValue::decode):

  • fileapi/NetworkSendQueue.cpp:

(WebCore::NetworkSendQueue::enqueue):

  • platform/graphics/PixelBuffer.cpp:

(WebCore::PixelBuffer::tryCreate):

  • platform/graphics/iso/ISOBox.h:

Source/WTF:

Revert "Allow WASM to use up to 4GB"

  • wtf/CheckedArithmetic.h:

(WTF::isInBounds):
(WTF::convertSafely):
(WTF::isSumSmallerThanOrEqual): Deleted.

  • wtf/PlatformUse.h:

LayoutTests:

Revert "Allow WASM to use up to 4GB"

  • fast/storage/serialized-script-value.html:
  • webaudio/OfflineAudioContext-bad-buffer-crash-expected.txt:
  • webaudio/OfflineAudioContext/bad-buffer-length-expected.txt:

Oct 14, 2021:

11:33 PM Changeset in webkit [284236] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

MediaCapabilities should enqueue a task to resolve promises
https://bugs.webkit.org/show_bug.cgi?id=231569

Reviewed by Eric Carlson.

  • Modules/mediacapabilities/MediaCapabilities.cpp:

We should resolve promises inside an event loop task.
To do this, instead of enqueuing a task to do some work that can be asynchronous, we do the asynchronous work and then enqueue a task to resolve the promise.

11:24 PM Changeset in webkit [284235] by commit-queue@webkit.org
  • 4 edits in trunk

Fix grid-auto-repeat-dynamic-003.html
https://bugs.webkit.org/show_bug.cgi?id=231592

Patch by Rob Buis <rbuis@igalia.com> on 2021-10-14
Reviewed by Alan Bujtas.

Source/WebCore:

Also call dirtyForLayoutFromPercentageHeightDescendants when laying out inline children, since
they may have a percentage height dependency as well as grid-auto-repeat-dynamic-003.html shows.

Test: imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-dynamic-003.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::layoutBlockChildren):

LayoutTests:

10:04 PM Changeset in webkit [284234] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebCore

Add UNUSED_PARAM to WebSpeechRecognizerTaskMock.mm
https://bugs.webkit.org/show_bug.cgi?id=231788

Reviewed by Simon Fraser.

  • Modules/speech/cocoa/WebSpeechRecognizerTaskMock.mm:

(-[WebSpeechRecognizerTaskMock initWithIdentifier:locale:doMultipleRecognitions:reportInterimResults:maxAlternatives:delegateCallback:]):
(-[WebSpeechRecognizerTaskMock audioSamplesAvailable:]):

9:47 PM Changeset in webkit [284233] by commit-queue@webkit.org
  • 5 edits
    1 add in trunk/Source

Add AdAttributionDaemon plist on iOS
https://bugs.webkit.org/show_bug.cgi?id=231309

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-14
Reviewed by John Wilander.

Source/WebKit:

This adds a plist that tells launchd where to find AdAttributionDaemon and how to launch it.
In another patch I'll add a change to WebsiteDataStoreConfiguration to tell WebKit to use the daemon.

  • Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm:

(WebKit::registerScheduledActivityHandler):

  • Shared/EntryPointUtilities/Cocoa/Daemon/com.apple.webkit.adattributiond.plist: Added.
  • WebKit.xcodeproj/project.pbxproj:

Source/WTF:

  • wtf/spi/darwin/XPCSPI.h:
9:25 PM Changeset in webkit [284232] by Aditya Keerthi
  • 7 edits in trunk

[iOS] Support accent-color for controls without text
https://bugs.webkit.org/show_bug.cgi?id=231762
rdar://84261702

Reviewed by Tim Horton.

Source/WebCore:

Add support for 'accent-color' on checkboxes, radio buttons,
<input type=range>, <progress> elements, and the <datalist>
indicator button.

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::controlTintColor):
(WebCore::RenderThemeIOS::checkboxRadioBackgroundColor):
(WebCore::RenderThemeIOS::paintCheckbox):
(WebCore::RenderThemeIOS::paintRadio):
(WebCore::RenderThemeIOS::paintProgressBarWithFormControlRefresh):
(WebCore::RenderThemeIOS::paintListButton):
(WebCore::RenderThemeIOS::paintSliderTicks):
(WebCore::RenderThemeIOS::paintSliderTrackWithFormControlRefresh):

LayoutTests:

Add new "Pass" results.

  • TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
8:20 PM Changeset in webkit [284231] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

WPT progression after turning on the IFC codepath for inline boxes with background decoration (r284194).

Unreviewed.

8:05 PM Changeset in webkit [284230] by rmorisset@apple.com
  • 91 edits
    3 adds in trunk

Allow WASM to use up to 4GB
https://bugs.webkit.org/show_bug.cgi?id=229353
rdar://81603447

Reviewed by Yusuke Suzuki.

JSTests:

The big-wasm-memory/wasm-memory-requested... tests used to simply expect an OOM at 2GB.
They now expect success at 4GB, and failure at 4GB+1.
The exceptions they expect are now more specific, as previously there was a rounding issue that was causing the specific exceptions not to be thrown (resulting in the generic OOM exception later in the code).
Finally I made them only run on 64-bit platforms since we don't support typed arrays >=2GB on 32-bits, and I made them only run in one configuration since they can take a little bit of time.

I also added a few new tests, specifically checking our handling of large typed arrays, and especially of indices above INT32_MAX.

  • stress/big-wasm-memory-grow-no-max.js:

(test):

  • stress/big-wasm-memory-grow.js:

(test):

  • stress/big-wasm-memory.js:

(test):

  • stress/typed-array-always-large.js: Added.

(getArrayLength):
(getByVal):
(putByVal):
(test):

  • stress/typed-array-eventually-large.js: Added.

(getArrayLength):
(getByVal):
(putByVal):
(test):

  • stress/typed-array-large-eventually-oob.js: Added.

(getArrayLength):
(getByVal):
(putByVal):
(test):

  • wasm/regress/wasm-memory-requested-more-than-MAX_ARRAY_BUFFER_SIZE-2.js:
  • wasm/regress/wasm-memory-requested-more-than-MAX_ARRAY_BUFFER_SIZE.js:

Source/JavaScriptCore:

While increasing MAX_ARRAY_BUFFER_SIZE to 4GB was easy, it was not remotely the only thing required to get this to work:

  • 4GB is not representable in a uint32_t, so I changed all length of ArrayBuffer/TypedArray/etc.. to being UCPURegister.
  • This also required changing NewTypedArray in all of LLInt/Baseline/DFG/FTL to accept a non-int32 size.

In order to avoid performance regressions, I had to add speculation in the DFG/FTL, which now have two versions of NewTypedArray (one that takes an Int32 and one that takes a StrictInt52)

  • Similarly, GetArrayLength and GetTypedArrayByteOffset now can either return an Int32 or a larger number.

I also had to split them in the DFG/FTL, see GetTypedArrayLengthAsInt52 and GetTypedArrayByteOffsetAsInt52 for examples

  • In turns, I had to add CheckInBoundsInt52 since CheckInBounds could not accept the result of GetTypedArrayLengthAsInt52
  • I modified the runtime functions for GetByVal/PutByVal/DataViewGet/DataViewSet/AtomicsXXX to accept non-Int32 indices, since for {Int8/UInt8/UInt8Clamped}Array, a maximum size of 4GB implies indices > 2B.
  • I added a "mayBeLargeTypedArray" bit to ArrayProfile/UnlinkedArrayProfile/DFG::ArrayMode to track whether such a non-Int32 index was seen to allow proper speculation and specialization of fast paths in the DFG/FTL.

I then updated the runtime functions used by the slow paths to correctly update it.

Unfortunately I ran out of time to add all the speculations/update all the fast paths.
So the following will have to wait for a follow-up patch:

  • Accepting large indices in the fast path of GetByVal in the LLInt
  • Accepting large indices in the fast paths generated by AccessCase/PolymorphicAccess
  • Accepting large indices in the fast paths generated by the DFG/FTL for each of GetByVal/PutByVal/DataViewGet/DataViewSet/AtomicsXXX

The current patch is functional, it will just have dreadful performance if trying to use indices >2B in a {Int8/UInt8/UInt8Clamped}Array.

Other minor changes in this patch:

  • Fixed an undefined behavior in ArrayBuffer::createInternal where memcpy could be called on nullptr (the spec explicitly bans this even when length is 0)
  • Replaced some repetitive and error-prone bounds checking by calls to WTF::isSumSmallerThanOrEqual, which is clearer, shorter, and reuse CheckedArithmetic facilities to avoid overflow issues.
  • Fixed a variety of obsolete comments
  • Added support for branch64(RelationalCondition cond, RegisterID left, Imm64 right)

(there was already support for the same but with TrustedImm64)

  • Made various AbstractMacroAssembler function constexpr as part of the previous point
  • assembler/AbstractMacroAssembler.cpp:
  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::TrustedImmPtr::TrustedImmPtr):
(JSC::AbstractMacroAssembler::TrustedImmPtr::asIntptr):
(JSC::AbstractMacroAssembler::TrustedImmPtr::asPtr):
(JSC::AbstractMacroAssembler::ImmPtr::ImmPtr):
(JSC::AbstractMacroAssembler::ImmPtr::asTrustedImmPtr):
(JSC::AbstractMacroAssembler::TrustedImm32::TrustedImm32):
(JSC::AbstractMacroAssembler::Imm32::Imm32):
(JSC::AbstractMacroAssembler::Imm32::asTrustedImm32 const):
(JSC::AbstractMacroAssembler::TrustedImm64::TrustedImm64):
(JSC::AbstractMacroAssembler::Imm64::Imm64):
(JSC::AbstractMacroAssembler::Imm64::asTrustedImm64 const):
(JSC::AbstractMacroAssembler::canBlind):
(JSC::AbstractMacroAssembler::shouldBlindForSpecificArch):

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::branch64):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::shouldBlindForSpecificArch):
(JSC::MacroAssemblerARM64::branch64):

  • assembler/MacroAssemblerARM64E.h:

(JSC::MacroAssemblerARM64E::untagArrayPtrLength64):
(JSC::MacroAssemblerARM64E::untagArrayPtrLength32): Deleted.

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::canBlind):
(JSC::MacroAssemblerX86Common::shouldBlindForSpecificArch):

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::needsScratchFPR const):
(JSC::AccessCase::generateWithGuard):

  • bytecode/ArrayProfile.h:

(JSC::ArrayProfile::setMayBeLargeTypedArray):
(JSC::ArrayProfile::mayBeLargeTypedArray const):
(JSC::UnlinkedArrayProfile::UnlinkedArrayProfile):
(JSC::UnlinkedArrayProfile::update):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGArrayMode.cpp:

(JSC::DFG::ArrayMode::refine const):

  • dfg/DFGArrayMode.h:

(JSC::DFG::ArrayMode::ArrayMode):
(JSC::DFG::ArrayMode::mayBeLargeTypedArray const):
(JSC::DFG::ArrayMode::withType const):
(JSC::DFG::ArrayMode::withSpeculation const):
(JSC::DFG::ArrayMode::withConversion const):
(JSC::DFG::ArrayMode::withTypeAndConversion const):
(JSC::DFG::ArrayMode::withArrayClassAndSpeculationAndMayBeLargeTypedArray const):
(JSC::DFG::ArrayMode::speculationFromProfile):
(JSC::DFG::ArrayMode::withSpeculationFromProfile const):
(JSC::DFG::ArrayMode::withProfile const):
(JSC::DFG::ArrayMode::operator== const):
(JSC::DFG::ArrayMode::withArrayClass const): Deleted.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicGetter):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGCommon.h:

(JSC::DFG::enableInt52):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::convertToGetArrayLength):
(JSC::DFG::FixupPhase::prependGetArrayLength): Deleted.

  • dfg/DFGGenerationInfo.h:
  • dfg/DFGHeapLocation.cpp:

(WTF::printInternal):

  • dfg/DFGHeapLocation.h:
  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
  • dfg/DFGNode.h:

(JSC::DFG::Node::hasStorageChild const):
(JSC::DFG::Node::storageChildIndex):
(JSC::DFG::Node::hasArrayMode):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:

(JSC::DFG::putByVal):
(JSC::DFG::newTypedArrayWithSize):
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSSALoweringPhase.cpp:

(JSC::DFG::SSALoweringPhase::handleNode):
(JSC::DFG::SSALoweringPhase::lowerBoundsCheck):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::jumpForTypedArrayOutOfBounds):
(JSC::DFG::SpeculativeJIT::emitTypedArrayBoundsCheck):
(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
(JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
(JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
(JSC::DFG::SpeculativeJIT::cageTypedArrayStorage):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset):
(JSC::DFG::SpeculativeJIT::compileGetArrayLength):
(JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithSize):
(JSC::DFG::SpeculativeJIT::emitNewTypedArrayWithSizeInRegister):
(JSC::DFG::SpeculativeJIT::compileNewTypedArray):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByVal):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithInt52Size):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayLengthAsInt52):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffsetAsInt52):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGTypeCheckHoistingPhase.cpp:

(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):

  • dfg/DFGValidate.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::validateAIState):
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::emitGetTypedArrayByteOffsetExceptSettingResult):
(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffsetAsInt52):
(JSC::FTL::DFG::LowerDFGToB3::compileGetArrayLength):
(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayLengthAsInt52):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckInBoundsInt52):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):
(JSC::FTL::DFG::LowerDFGToB3::emitNewTypedArrayWithSize):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • ftl/FTLOutput.h:

(JSC::FTL::Output::load64NonNegative):

  • jit/IntrinsicEmitter.cpp:

(JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):

  • jit/JITOperations.cpp:

(JSC::putByVal):
(JSC::getByVal):

  • llint/LLIntOfflineAsmConfig.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::getByVal):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ArrayBuffer.cpp:

(JSC::SharedArrayBufferContents::SharedArrayBufferContents):
(JSC::ArrayBufferContents::ArrayBufferContents):
(JSC::ArrayBufferContents::tryAllocate):
(JSC::ArrayBuffer::create):
(JSC::ArrayBuffer::createAdopted):
(JSC::ArrayBuffer::createFromBytes):
(JSC::ArrayBuffer::tryCreate):
(JSC::ArrayBuffer::createUninitialized):
(JSC::ArrayBuffer::tryCreateUninitialized):
(JSC::ArrayBuffer::createInternal):
(JSC::ArrayBuffer::clampValue):
(JSC::ArrayBuffer::clampIndex const):
(JSC::ArrayBuffer::sliceWithClampedIndex const):

  • runtime/ArrayBuffer.h:

(JSC::ArrayBufferContents::sizeInBytes const):
(JSC::ArrayBuffer::byteLength const):
(JSC::ArrayBuffer::gcSizeEstimateInBytes const):

  • runtime/ArrayBufferView.cpp:

(JSC::ArrayBufferView::ArrayBufferView):

  • runtime/ArrayBufferView.h:

(JSC::ArrayBufferView::byteOffset const):
(JSC::ArrayBufferView::byteLength const):
(JSC::ArrayBufferView::verifyByteOffsetAlignment):
(JSC::ArrayBufferView::verifySubRangeLength):
(JSC::ArrayBufferView::clampOffsetAndNumElements):
(JSC::ArrayBufferView::setImpl):
(JSC::ArrayBufferView::setRangeImpl):
(JSC::ArrayBufferView::getRangeImpl):
(JSC::ArrayBufferView::zeroRangeImpl):
(JSC::ArrayBufferView::calculateOffsetAndLength): Deleted.

  • runtime/AtomicsObject.cpp:
  • runtime/DataView.cpp:

(JSC::DataView::DataView):
(JSC::DataView::create):

  • runtime/DataView.h:
  • runtime/GenericTypedArrayView.h:
  • runtime/GenericTypedArrayViewInlines.h:

(JSC::GenericTypedArrayView<Adaptor>::GenericTypedArrayView):
(JSC::GenericTypedArrayView<Adaptor>::create):
(JSC::GenericTypedArrayView<Adaptor>::tryCreate):
(JSC::GenericTypedArrayView<Adaptor>::createUninitialized):
(JSC::GenericTypedArrayView<Adaptor>::tryCreateUninitialized):
(JSC::GenericTypedArrayView<Adaptor>::subarray const): Deleted.

  • runtime/JSArrayBufferView.cpp:

(JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
(JSC::JSArrayBufferView::byteLength const):
(JSC::JSArrayBufferView::slowDownAndWasteMemory):
(JSC::JSArrayBufferView::possiblySharedImpl):

  • runtime/JSArrayBufferView.h:

(JSC::JSArrayBufferView::sizeOf):
(JSC::JSArrayBufferView::ConstructionContext::length const):
(JSC::JSArrayBufferView::length const):

  • runtime/JSArrayBufferViewInlines.h:

(JSC::JSArrayBufferView::byteOffsetImpl):
(JSC::JSArrayBufferView::byteOffset):
(JSC::JSArrayBufferView::byteOffsetConcurrently):

  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::toIndex const):
(JSC::JSValue::toTypedArrayIndex const):

  • runtime/JSDataView.cpp:

(JSC::JSDataView::create):
(JSC::JSDataView::createUninitialized):
(JSC::JSDataView::set):
(JSC::JSDataView::setIndex):

  • runtime/JSDataView.h:
  • runtime/JSDataViewPrototype.cpp:

(JSC::getData):
(JSC::setData):

  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::constructGenericTypedArrayViewWithArguments):
(JSC::constructGenericTypedArrayViewImpl):

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::create):
(JSC::JSGenericTypedArrayView<Adaptor>::createWithFastVector):
(JSC::JSGenericTypedArrayView<Adaptor>::createUninitialized):
(JSC::JSGenericTypedArrayView<Adaptor>::validateRange):
(JSC::JSGenericTypedArrayView<Adaptor>::setWithSpecificType):
(JSC::JSGenericTypedArrayView<Adaptor>::set):

  • runtime/JSObject.h:

(JSC::JSObject::putByIndexInline):
(JSC::JSObject::tryGetIndexQuickly const):
(JSC::JSObject::trySetIndexQuickly):
(JSC::JSObject::canSetIndexQuickly): Deleted.

  • runtime/JSObjectInlines.h:

(JSC::JSObject::getIndexQuicklyForTypedArray const):
(JSC::JSObject::setIndexQuicklyForArrayStorageIndexingType):
(JSC::JSObject::trySetIndexQuicklyForTypedArray):
(JSC::JSObject::canSetIndexQuicklyForTypedArray const): Deleted.

  • runtime/Operations.h:

(JSC::getByValWithIndex):

  • wasm/WasmPageCount.h:

Source/WebCore:

Some parts of WebCore use TypedArrays, and would not build after I made the length() function on typed arrays return UCPURegister instead of uint32_t.
Most fixes were trivial, the only exception is SerializedScriptValue.cpp, where I had to increment the version number, as ArrayBuffer (and ArrayBufferViews) now write/read their length in a 64-bit field (and same for the byteOffset of ArrayBufferView).

I also had to add a test in PixelBuffer.cpp that the size of the ArrayBuffer it will try to allocate is < INT32_MAX.
Otherwise, the test LayoutTests/fast/shapes/shape-outside-floats/shape-outside-imagedata-overflow.html which checks that very large images are properly rejected without crashing, would timeout.

No new tests, as the code is already extensively covered by existing tests, and I implemented no new features.

  • Modules/webaudio/AudioBuffer.cpp:

(WebCore::AudioBuffer::copyFromChannel):
(WebCore::AudioBuffer::copyToChannel):

  • Modules/webaudio/RealtimeAnalyser.cpp:

(WebCore::RealtimeAnalyser::getByteFrequencyData):
(WebCore::RealtimeAnalyser::getFloatTimeDomainData):
(WebCore::RealtimeAnalyser::getByteTimeDomainData):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::dumpArrayBufferView):
(WebCore::CloneSerializer::dumpImageBitmap):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::readArrayBufferImpl):
(WebCore::CloneDeserializer::readArrayBuffer):
(WebCore::CloneDeserializer::readArrayBufferViewImpl):
(WebCore::CloneDeserializer::readArrayBufferView):

  • bindings/js/SerializedScriptValue.h:

(WebCore::SerializedScriptValue::encode const):
(WebCore::SerializedScriptValue::decode):

  • fileapi/NetworkSendQueue.cpp:

(WebCore::NetworkSendQueue::enqueue):

  • platform/graphics/PixelBuffer.cpp:

(WebCore::PixelBuffer::tryCreate):

  • platform/graphics/iso/ISOBox.h:

Source/WTF:

Made some of CheckedArithmetic constexpr, and added isSumSmallerThanOrEqual since it is a commonly used test in ArrayBuffer and easy to get wrong in terms of overflow.

  • wtf/CheckedArithmetic.h:

(WTF::isInBounds):
(WTF::convertSafely):
(WTF::isSumSmallerThanOrEqual):

LayoutTests:

Rebaselined three following tests as different or fewer error messages appear on the console.
Also changed currentVersion in serialized-script-value.html from 9 to 10.

  • fast/canvas/canvas-getImageData-invalid-result-buffer-crash-expected.txt:
  • fast/storage/serialized-script-value.html:
  • webaudio/OfflineAudioContext-bad-buffer-crash-expected.txt:
  • webaudio/OfflineAudioContext/bad-buffer-length-expected.txt:
7:55 PM Changeset in webkit [284229] by wilander@apple.com
  • 2 edits in trunk/Tools

TestWebKitAPI.PrivateClickMeasurement.FraudPrevention is a constant timeout
https://bugs.webkit.org/show_bug.cgi?id=231393
<rdar://problem/84000081>

Reviewed by Alex Christensen and Kate Cheney as part of https://bugs.webkit.org/show_bug.cgi?id=231553.

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::TEST):

PrivateClickMeasurement.FraudPrevention fixed. It was missing a call to
_setPrivateClickMeasurementAppBundleIDForTesting() so that the app bundle ID
for the triggering event matches the app bundle ID where the click happened.

7:21 PM Changeset in webkit [284228] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Enable lazy image loading by default
https://bugs.webkit.org/show_bug.cgi?id=208094

Patch by Nikos Mouchtaris <Nikos Mouchtaris> on 2021-10-14
Reviewed by Simon Fraser.

Turn on lazy image load by default in WebKit.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
7:20 PM Changeset in webkit [284227] by Lauro Moura
  • 3 edits in trunk/Tools

[webkitpy] Occasional exception thrown in change_result_to_failure when repeating flaky layout tests
https://bugs.webkit.org/show_bug.cgi?id=229788

Reviewed by Jonathan Bedard.

When a iterated/repeated flaky test moves from an unexpected Failure to
successive unexpected Pass, the currently stored result is still the
Failure (likely due to r235467). This may cause change_result_to_failure
to raise KeyError trying to forcibly remove() the Failure result from
the test_by_expectations set twice.

This commit relaxes the behavior to just ask to discard the value from
the set.

  • Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:

(LayoutTestRunnerTests.test_update_summary_with_result): Added test case.

  • Scripts/webkitpy/layout_tests/models/test_run_results.py:

(TestRunResults.change_result_to_failure): Use set.discard to avoid
KeyErrors.

7:02 PM Changeset in webkit [284226] by Chris Dumez
  • 6 edits in trunk

Service workers running on the main thread should use the main VM
https://bugs.webkit.org/show_bug.cgi?id=231753

Reviewed by Geoffrey Garen.

Source/WebCore:

ervice workers running on the main thread should use the main VM. This makes life easier for injected
bundle clients and there is no strong reason to use a separate VM since VMs are mainly used for thread
safety / isolation.

No new tests, extended existing API test.

  • workers/WorkerOrWorkletGlobalScope.cpp:

(WebCore::WorkerOrWorkletGlobalScope::isContextThread const):
WorkerOrWorkletThread::thread() returns null when the service worker is running on the main thread.
Update WorkerOrWorkletGlobalScope::isContextThread() to deal with that and properly treats the
main thread as the context thread in this case.

  • workers/WorkerOrWorkletScriptController.cpp:

(WebCore::WorkerOrWorkletScriptController::WorkerOrWorkletScriptController):
(WebCore::WorkerOrWorkletScriptController::scheduleExecutionTermination):

Tools:

Extend API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerPagePlugIn.mm:

(-[ServiceWorkerPagePlugIn webProcessPlugInBrowserContextController:serviceWorkerGlobalObjectIsAvailableForFrame:inScriptWorld:]):

6:58 PM Changeset in webkit [284225] by Aditya Keerthi
  • 13 edits in trunk

[iOS] Paint <datalist> indicator in RenderTheme
https://bugs.webkit.org/show_bug.cgi?id=231755
rdar://84261604

Reviewed by Tim Horton.

Source/WebCore:

Currently, the <datalist> indicator is painted using the 'content'
property and an SVG image. With the existing implementation, it is
not possible to tint the indicator, when an accent-color is supplied.
To support control tinting, and better align with the way other native
controls are painted, move the painting into RenderTheme.

Covered by existing tests.

  • css/html.css:

(input::-webkit-list-button):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::paint):

  • rendering/RenderTheme.h:

(WebCore::RenderTheme::paintListButton):

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::isControlStyled const):

Do not draw the native indicator if the style has content or the
content has explicitly been set to none. This ensures we maintain
compatibility for pages that still use 'content' to customize the
indicator.

(WebCore::RenderThemeIOS::paintListButton):

Draw the indicator. The path is taken directly from the SVG.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::RenderStyle):

  • rendering/style/RenderStyle.h:

Add setHasExplicitlyClearedContent / hasExplicitlyClearedContent to
detect whether the author has explicitly cleared content, in which
case we do not paint the native indicator.

(WebCore::RenderStyle::setHasExplicitlyClearedContent):
(WebCore::RenderStyle::hasExplicitlyClearedContent const):
(WebCore::RenderStyle::NonInheritedFlags::operator== const):

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyInitialContent):
(WebCore::Style::BuilderCustom::applyValueContent):

  • style/StyleResolver.cpp:

(WebCore::Style::elementTypeHasAppearanceFromUAStyle):

Add the datalist button to the list of element types that have
appearance from UA style, so that we can determine whether or not to
drop native appearance.

LayoutTests:

Rebaseline tests.

  • platform/ios-simulator/fast/forms/datalist/datalist-searchinput-appearance-expected.txt:
  • platform/ios-simulator/fast/forms/datalist/datalist-textinput-appearance-expected.txt:
6:49 PM Changeset in webkit [284224] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Make unlinked Baseline JIT scope operations bias the order of checks to the ResolveType that profiling tells us we are likely to be
https://bugs.webkit.org/show_bug.cgi?id=231715

Reviewed by Yusuke Suzuki.

This is a small throughout win in the code generated by unlinked baseline JIT.

  • jit/JIT.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::generateOpResolveScopeThunk):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::generateOpGetFromScopeThunk):
(JSC::JIT::emit_op_put_to_scope):

6:44 PM Changeset in webkit [284223] by Wenson Hsieh
  • 5 edits in trunk

[JS IPC] Implement a way to synchronously wait for an incoming IPC message
https://bugs.webkit.org/show_bug.cgi?id=231745

Reviewed by Tim Horton.

Source/WebKit:

Add support for IPC.waitForMessage(), which blocks until we receive an incoming IPC message that matches the
given message name and destination ID. We use this new method to fix the failing API test
IPCTestingAPI.CanReceiveIPCSemaphore, which verifies that we're able to receive, decode, and call methods on
an IPC semaphore sent from the GPU process to the web process. In this case, we wait for the incoming
"RemoteRenderingBackendProxy::DidCreateWakeUpSemaphoreForDisplayListStream" message after creating the remote
rendering backend in the GPU process.

  • Platform/IPC/Connection.h:
  • WebProcess/WebPage/IPCTestingAPI.cpp:

(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::setWakeUpSemaphore):

Also add a method on JSIPCStreamClientConnection to install a given IPC semaphore as the wakeup semaphore for
the IPC stream. We'll use this in the next patch when implementing the ability to send messages through the IPC
stream.

(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::staticFunctions):
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::streamBuffer):

Drive-by fix: make sure we grab the VM lock before trying to unwrap JS objects.

(WebKit::IPCTestingAPI::JSIPC::staticFunctions):
(WebKit::IPCTestingAPI::JSIPC::sendMessage):

Drive-by fix: correct a minor typo in the exception message.

(WebKit::IPCTestingAPI::extractSyncIPCMessageInfo):

Pull logic for extracting an IPC::Connection, destination ID, message name, and IPC timeout into a separate
helper function, and use it in waitForMessage as well as sendSyncMessage.

(WebKit::IPCTestingAPI::JSIPC::waitForMessage):
(WebKit::IPCTestingAPI::JSIPC::sendSyncMessage):

Tools:

Adjust an existing JS IPC test, IPCTestingAPI.CanReceiveIPCSemaphore, so that it uses the new JSIPC method to
wait for RemoteRenderingBackend's IPC stream wakeup semaphore to arrive. This fixes
IPCTestingAPI.CanReceiveIPCSemaphore (which is one of the two IPC tests that time out after r284079).

We also adjust IPCTestingAPI.CanReceiveSharedMemory to wait for and install the wakeup semaphore into the IPC
stream connection; however, this alone isn't sufficient to fix the test, since the test also requires the
ability to send synchronous messages through the IPC stream.

See WebKit ChangeLog for more details.

  • TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:

(TEST):

6:24 PM Changeset in webkit [284222] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

Fix non-internal iOS builds after r284220
https://bugs.webkit.org/show_bug.cgi?id=231621

  • pal/spi/cocoa/TCCSPI.h:
5:49 PM Changeset in webkit [284221] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix build after r284216
https://bugs.webkit.org/show_bug.cgi?id=231523

  • WebKit.xcodeproj/project.pbxproj:
5:39 PM Changeset in webkit [284220] by Kate Cheney
  • 19 edits
    1 move in trunk/Source

Adopt attribution AVCaptureSession SPI for GPU process
https://bugs.webkit.org/show_bug.cgi?id=231621
<rdar://problem/80748535>

Reviewed by Eric Carlson.

Source/WebCore:

No new tests. Manually tested by checking App Privacy Report data.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/RealtimeMediaSourceCenter.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::setupSession):

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/spi/cocoa/AVFoundationSPI.h:
  • pal/spi/cocoa/TCCSPI.h: Renamed from Source/WebKit/Platform/spi/ios/TCCSPI.h.

Source/WebKit:

Add SPI to attribute camera access to host app in the GPU process.

  • GPUProcess/GPUConnectionToWebProcess.cpp:
  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/cocoa/GPUConnectionToWebProcessCocoa.mm:

(WebKit::GPUConnectionToWebProcess::setTCCIdentity):

  • Shared/Cocoa/TCCSoftLink.h:
  • Shared/Cocoa/TCCSoftLink.mm:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::startProducingData):

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:

(WebKit::UserMediaCaptureManagerProxy::ConnectionProxy::setTCCIdentity):

  • WebKit.xcodeproj/project.pbxproj:
5:24 PM Changeset in webkit [284219] by Russell Epstein
  • 6 edits in branches/safari-613.1.5-branch

Cherry-pick r284215. rdar://problem/84277677

Fix build failures with newer clang
https://bugs.webkit.org/show_bug.cgi?id=231783

Reviewed by Chris Dumez.

Source/WebKit:

We do not need to define copy constructor and assignment operator if we would like to use the default implementation.
The default copy constructor and assignment operator works well for TouchBarMenuItemData, so let's drop it.

  • Shared/TouchBarMenuItemData.h:

Source/WTF:

In Identified case, we make copy constructor and assignment operator protected in IdentifiedBase to hide
the ability to copy Identified / ThreadSafeIdentified to be copied to IdentifiedBase. So, in the derived
classes, we should define both copy constructor and assignment operator.

  • wtf/Identified.h:

Tools:

Since this is Objective-C (not Objective-C++), we cannot use static const uint32_t value for array size.
Use enum hack instead.

  • DumpRenderTree/mac/LayoutTestHelper.m: (displayUUIDStrings):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284215 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:20 PM Changeset in webkit [284218] by achristensen@apple.com
  • 3 edits in trunk/Tools

Fix some iOS builds after r284203
https://bugs.webkit.org/show_bug.cgi?id=231718

  • TestWebKitAPI/cocoa/DaemonTestUtilities.h:
  • TestWebKitAPI/cocoa/DaemonTestUtilities.mm:

Linker couldn't find OSLaunchdJob. It's only used on macOS, so only build it on macOS.

5:18 PM Changeset in webkit [284217] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Update deleteLocalAuthenticatorCredentialWithID and setUsernameForLocalCredentialWithID according to internal needs
https://bugs.webkit.org/show_bug.cgi?id=231777
rdar://84276065

Patch by John Pascoe <J Pascoe> on 2021-10-14
Reviewed by Brent Fulgham.

Covered by manual tests.

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(+[_WKWebAuthenticationPanel deleteLocalAuthenticatorCredentialWithID:]):
(+[_WKWebAuthenticationPanel setUsernameForLocalCredentialWithID:username:]):

4:55 PM Changeset in webkit [284216] by achristensen@apple.com
  • 15 edits
    1 add
    1 delete in trunk

Reduce memory use of AdAttributionDaemon
https://bugs.webkit.org/show_bug.cgi?id=231523

Reviewed by Brady Eidson.

Source/WebCore:

This makes a new library, libWebCoreStatic.a, which contains the pieces of WebCore that adattributiond needs.
That way, adattributiond doesn't need to link to WebKit.framework, which greatly reduces its memory use and
puts it below the jetsam threshold.

  • CMakeLists.txt:
  • Configurations/WebCore.xcconfig:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

  • Configurations/adattributiond.xcconfig:
  • Shared/API/Cocoa/WKMain.h:
  • Shared/API/Cocoa/WKMain.mm:

(WKXPCServiceMain):
(WKPCMDaemonMain): Deleted.

  • Shared/EntryPointUtilities/Cocoa/Daemon/adattributiond.cpp: Renamed from Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/adattributiond.c.

(main):

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::TEST):

4:48 PM Changeset in webkit [284215] by ysuzuki@apple.com
  • 6 edits in trunk

Fix build failures with newer clang
https://bugs.webkit.org/show_bug.cgi?id=231783

Reviewed by Chris Dumez.

Source/WebKit:

We do not need to define copy constructor and assignment operator if we would like to use the default implementation.
The default copy constructor and assignment operator works well for TouchBarMenuItemData, so let's drop it.

  • Shared/TouchBarMenuItemData.h:

Source/WTF:

In Identified case, we make copy constructor and assignment operator protected in IdentifiedBase to hide
the ability to copy Identified / ThreadSafeIdentified to be copied to IdentifiedBase. So, in the derived
classes, we should define both copy constructor and assignment operator.

  • wtf/Identified.h:

Tools:

Since this is Objective-C (not Objective-C++), we cannot use static const uint32_t value for array size.
Use enum hack instead.

  • DumpRenderTree/mac/LayoutTestHelper.m:

(displayUUIDStrings):

4:35 PM Changeset in webkit [284214] by Peng Liu
  • 6 edits in trunk

Promote WKPreferences._needsSiteSpecificQuirks to API
https://bugs.webkit.org/show_bug.cgi?id=230721
<rdar://83255206>

Reviewed by Jer Noble.

Source/WebKit:

Add a new API WKPreferences.isSetSiteSpecificQuirksModeEnabled.

No new tests. Updated API tests to use the new API.

  • UIProcess/API/Cocoa/WKPreferences.h:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences isSiteSpecificQuirksModeEnabled]):
(-[WKPreferences setSiteSpecificQuirksModeEnabled:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:

Tools:

Updated API tests to use the new API.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(TEST):

4:30 PM Changeset in webkit [284213] by commit-queue@webkit.org
  • 152 edits
    1 delete in trunk/Source

Remove Variant.h
https://bugs.webkit.org/show_bug.cgi?id=231744

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-14
Reviewed by Darin Adler.

Source/JavaScriptCore:

  • jit/AssemblyHelpers.h:
  • jit/SnippetReg.h:
  • parser/Lexer.cpp:
  • parser/VariableEnvironment.h:
  • runtime/BytecodeCacheError.h:
  • runtime/CachePayload.h:
  • runtime/CacheUpdate.h:
  • runtime/TemporalObject.h:
  • runtime/TemporalTimeZone.h:
  • wasm/WasmLLIntGenerator.cpp:

Source/WebCore:

  • Modules/async-clipboard/ClipboardItemBindingsDataSource.h:
  • Modules/fetch/FetchBody.h:
  • Modules/fetch/FetchHeaders.h:
  • Modules/indexeddb/IDBCursor.h:
  • Modules/indexeddb/IDBGetAllResult.h:
  • Modules/indexeddb/IDBKey.h:
  • Modules/indexeddb/IDBKeyData.h:
  • Modules/indexeddb/IDBKeyPath.h:
  • Modules/indexeddb/IDBRequest.cpp:
  • Modules/mediacontrols/MediaControlsHost.cpp:
  • Modules/mediacontrols/MediaControlsHost.h:
  • Modules/mediastream/MediaTrackConstraints.h:
  • Modules/mediastream/RTCIceServer.h:
  • Modules/paymentrequest/PaymentMethodChangeEvent.h:
  • Modules/paymentrequest/PaymentRequest.h:
  • Modules/push-api/PushEventInit.h:
  • Modules/push-api/PushSubscription.h:
  • Modules/push-api/PushSubscriptionOptionsInit.h:
  • Modules/speech/SpeechRecognitionUpdate.h:
  • Modules/webaudio/AudioContextOptions.h:
  • Modules/webaudio/AudioNode.h:
  • Modules/webxr/WebXRWebGLLayer.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/mac/WebAccessibilityObjectWrapperBase.h:
  • animation/AnimationEffect.h:
  • animation/EffectTiming.h:
  • animation/OptionalEffectTiming.h:
  • bindings/IDLTypes.h:
  • bindings/js/BufferSource.h:
  • bindings/js/JSDOMConvertUnion.h:
  • bindings/js/JSValueInWrappedObject.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(AddToIncludesForIDLType):

  • crypto/CryptoAlgorithm.h:
  • crypto/CryptoKey.h:
  • crypto/SubtleCrypto.h:
  • crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:
  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
  • crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:
  • crypto/parameters/CryptoAlgorithmEcdsaParams.h:
  • crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
  • crypto/parameters/CryptoAlgorithmRsaHashedImportParams.h:
  • crypto/parameters/CryptoAlgorithmRsaHashedKeyGenParams.h:
  • css/CSSCustomPropertyValue.h:
  • css/CSSFontFaceSet.h:
  • css/CSSStyleDeclaration.cpp:
  • css/DOMMatrixReadOnly.h:
  • css/FontFace.h:
  • css/StyleRule.h:
  • css/parser/CSSPropertyParserHelpers.h:
  • css/typedom/CSSNumericValue.h:
  • css/typedom/CSSUnparsedValue.cpp:
  • css/typedom/CSSUnparsedValue.h:
  • dom/ContainerNode.cpp:
  • dom/DocumentMarker.h:
  • dom/EventTarget.h:
  • dom/MessageEvent.h:
  • dom/Node.cpp:
  • editing/AlternativeTextController.h:
  • fileapi/Blob.h:
  • fileapi/NetworkSendQueue.h:
  • html/DOMFormData.h:
  • html/HTMLAllCollection.cpp:
  • html/ImageBitmap.cpp:
  • html/URLSearchParams.h:
  • html/canvas/CanvasStyle.h:
  • inspector/InspectorCanvas.cpp:
  • inspector/InspectorCanvas.h:
  • inspector/InspectorCanvasCallTracer.cpp:
  • inspector/InspectorShaderProgram.cpp:
  • inspector/InspectorShaderProgram.h:
  • inspector/agents/InspectorCanvasAgent.cpp:
  • layout/integration/InlineIteratorBox.h:
  • layout/integration/InlineIteratorLine.h:
  • page/DOMWindow.cpp:
  • page/DiagnosticLoggingClient.h:
  • page/IntersectionObserver.h:
  • page/Performance.h:
  • page/PerformanceMeasureOptions.h:
  • page/scrolling/ScrollingCoordinator.h:
  • platform/PasteboardCustomData.h:
  • platform/SharedBuffer.h:
  • platform/audio/AudioStreamDescription.h:
  • platform/generic/KeyedDecoderGeneric.cpp:
  • platform/graphics/DecodingOptions.h:
  • platform/graphics/FontCascadeDescription.h:
  • platform/graphics/FontPalette.h:
  • platform/graphics/FontPaletteValues.h:
  • platform/graphics/Gradient.h:
  • platform/graphics/InlinePathData.h:
  • platform/graphics/cocoa/SourceBufferParser.h:
  • platform/graphics/cocoa/SourceBufferParserWebM.h:
  • platform/graphics/displaylists/DisplayListItems.h:
  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
  • platform/network/DNS.h:
  • platform/network/FormData.h:
  • platform/network/curl/CurlSSLHandle.h:
  • platform/sql/SQLValue.h:
  • platform/sql/SQLiteStatement.cpp:
  • platform/xr/PlatformXR.h:
  • testing/TypeConversions.h:
  • workers/service/ExtendableMessageEvent.h:
  • workers/service/ServiceWorkerTypes.h:
  • xml/XMLHttpRequest.h:

Source/WebKit:

  • NetworkProcess/NetworkLoadChecker.h:
  • NetworkProcess/cache/NetworkCacheData.h:
  • Platform/IPC/ArgumentCoders.h:
  • Platform/IPC/Attachment.h:
  • Platform/IPC/MessageReceiveQueueMap.h:
  • Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
  • Shared/WebCompiledContentRuleListData.h:
  • Shared/mac/MediaFormatReader/MediaSampleCursor.cpp:
  • Shared/mac/MediaFormatReader/MediaSampleCursor.h:
  • UIProcess/API/APIWebAuthenticationPanel.h:
  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/wpe/TouchGestureController.h:
  • UIProcess/Automation/SimulatedInputDispatcher.cpp:
  • UIProcess/Automation/SimulatedInputDispatcher.h:
  • UIProcess/Cocoa/WKSafeBrowsingWarning.h:
  • UIProcess/PageClient.h:
  • UIProcess/ProcessThrottler.h:
  • UIProcess/WebAuthentication/WebAuthenticationRequestData.h:
  • WebProcess/GPU/graphics/ImageBufferBackendHandle.h:
  • WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:

Source/WebKitLegacy/mac:

  • DOM/DOMHTMLOptionsCollection.mm:

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/LikelyDenseUnsignedIntegerSet.h:
  • wtf/StdLibExtras.h:

(WTF::switchOn):

  • wtf/Variant.h: Removed.
  • wtf/text/TextBreakIterator.h:
4:15 PM Changeset in webkit [284212] by Tadeu Zagallo
  • 2 edits in trunk/Source/JavaScriptCore

Wasm LLInt should zero bytecodeIndex before throwing
https://bugs.webkit.org/show_bug.cgi?id=231688
<rdar://84207898>

Reviewed by Yusuke Suzuki.

After r283852, the unwinder can now ask WebAssembly frames for their bytecodeIndex.
We do write to the bytecodeIndex when throwing from the wasm throw opcode, but we
failed to write when trapping (e.g. throwing an OOB or Unreachable). The value of
the bytecodeIndex in this is case is not interesting, since these exceptions can't be
caught from Wasm, all we need to know is ensure there isn't an invalid left-over
value in that stack slot, so we zero it.

  • llint/WebAssembly.asm:
4:07 PM Changeset in webkit [284211] by Eric Hutchison
  • 3 edits in trunk/LayoutTests

[ iOS15 Mac wk2 Debug ] imported/w3c/web-platform-tests/webrtc/simulcast/basic.https.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231780.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
3:54 PM Changeset in webkit [284210] by Russell Epstein
  • 6 edits in branches/safari-613.1.5-branch/Source/bmalloc

Cherry-pick r284208. rdar://problem/84277677

[libpas] Use enum { ... } instead of static const size_t for constant values used for array size
https://bugs.webkit.org/show_bug.cgi?id=231778

Reviewed by Chris Dumez.

Since libpas is written in C (not C++), we cannot use static const size_t value for array's size.
In C, it is not usable as a constant expression for array size. Use enum hack instead.

  • libpas/src/libpas/pas_generic_large_free_heap.h: (pas_generic_large_free_heap_try_allocate):
  • libpas/src/libpas/pas_large_sharing_pool.c: (pas_large_sharing_pool_allocate_and_commit):
  • libpas/src/libpas/pas_segregated_view_allocator_inlines.h: (pas_segregated_view_will_start_allocating):
  • libpas/src/libpas/pas_simple_large_free_heap.c: (merge):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284208 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3:54 PM Changeset in webkit [284209] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Crash on WP startup
https://bugs.webkit.org/show_bug.cgi?id=231773
<rdar://84218823>

Unreviewed partial revert of https://trac.webkit.org/r283375.

  • WebProcess/com.apple.WebProcess.sb.in:
3:52 PM Changeset in webkit [284208] by ysuzuki@apple.com
  • 6 edits in trunk/Source/bmalloc

[libpas] Use enum { ... } instead of static const size_t for constant values used for array size
https://bugs.webkit.org/show_bug.cgi?id=231778

Reviewed by Chris Dumez.

Since libpas is written in C (not C++), we cannot use static const size_t value for array's size.
In C, it is not usable as a constant expression for array size. Use enum hack instead.

  • libpas/src/libpas/pas_generic_large_free_heap.h:

(pas_generic_large_free_heap_try_allocate):

  • libpas/src/libpas/pas_large_sharing_pool.c:

(pas_large_sharing_pool_allocate_and_commit):

  • libpas/src/libpas/pas_segregated_view_allocator_inlines.h:

(pas_segregated_view_will_start_allocating):

  • libpas/src/libpas/pas_simple_large_free_heap.c:

(merge):

3:50 PM Changeset in webkit [284207] by Aditya Keerthi
  • 5 edits in trunk/Source/WebCore

CSSProperties.json should not require a 'converter' for color properties
https://bugs.webkit.org/show_bug.cgi?id=231376

Reviewed by Antti Koivisto.

r283742 used StyleBuilderCustom to implement 'accent-color' as
specifying 'auto-functions' and 'color-property' resulted in an
incorrect value setter.

Upon further investigation, specifying 'converter: SVGColor'
solved the issue, as the CSSPrimitiveValue was then correctly
converted into a Color.

Rather than renaming the converter for use with non-SVG color
properties, this patch removes the existing color converter entirely,
as the need for color conversion can be inferred from the existence
of 'color-property'.

  • css/CSSProperties.json:

Remove now unecessary 'converter', and use 'auto-functions' for
'accent-color' rather than 'custom'.

  • css/makeprop.pl:

(generateValueSetter):

Perform Color conversion from CSSPrimitiveValue if 'color-property'
is specified.

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertSVGColor): Deleted.

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyInitialAccentColor): Deleted.
(WebCore::Style::BuilderCustom::applyInheritAccentColor): Deleted.
(WebCore::Style::BuilderCustom::applyValueAccentColor): Deleted.

3:42 PM Changeset in webkit [284206] by Russell Epstein
  • 2 edits in branches/safari-613.1.5-branch/Source/ThirdParty/libwebrtc

Cherry-pick r284192. rdar://problem/84277677

Unreviewed, fix up r284190 build fix.

  • Source/third_party/libwebm/webm_parser/src/master_parser.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284192 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3:42 PM Changeset in webkit [284205] by Russell Epstein
  • 2 edits in branches/safari-613.1.5-branch/Source/ThirdParty/libwebrtc

Cherry-pick r284190. rdar://problem/84277677

Unreviewed build fix with latest SDKs.

  • Source/third_party/libwebm/webm_parser/src/master_parser.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284190 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3:42 PM Changeset in webkit [284204] by Russell Epstein
  • 11 edits in branches/safari-613.1.5-branch/Source

Cherry-pick r284187. rdar://problem/84277677

Unreviewed build fix with recent SDKs.

Use std::invoke_result<> instead of std::result_of<>, as it was deprecated in C++17.

Source/JavaScriptCore:

  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h: (JSC::JSValue::getPropertySlot const):
  • runtime/JSObject.h:
  • runtime/JSObjectInlines.h: (JSC::JSObject::getPropertySlot const):
  • runtime/ParseInt.h: (JSC::toStringView):

Source/WTF:

  • wtf/IndexedContainerIterator.h: (WTF::IndexedContainerIterator::operator* const): (WTF::IndexedContainerIterator::operator*): Deleted.
  • wtf/Vector.h:
  • wtf/WeakHashSet.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284187 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3:32 PM Changeset in webkit [284203] by commit-queue@webkit.org
  • 12 edits
    1 copy
    1 move
    6 adds in trunk

Share IPC communication code between webpushd and adattributiond
https://bugs.webkit.org/show_bug.cgi?id=231718

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-14
Reviewed by Brady Eidson.

Source/WebKit:

This shares enough code from adattributiond to implement a communication protocol for webpushd.
Right now the protocol only has one action, EchoTwice, which echos a WTF::String twice as its reply,
but that is just a testable behavior that will be soon replaced by more complicated and useful behaviors.

  • Configurations/webpushd.xcconfig:
  • NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementXPCUtilities.mm:

(WebKit::PCM::addVersionAndEncodedMessageToDictionary):

  • Shared/Daemon/DaemonUtilities.h: Copied from Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/webpushd.c.
  • Shared/Daemon/DaemonUtilities.mm: Added.

(WebKit::startListeningForMachServiceConnections):
(WebKit::vectorToXPCData):

  • Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm:

(WebKit::connectionAdded):
(WebKit::connectionRemoved):
(WebKit::PCMDaemonMain):
(WebKit::startListeningForMachServiceConnections): Deleted.

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/WebPushDaemonMain.mm: Added.

(WebPushD::CompletionHandler<void):
(WebPushD::echoTwice):
(WebPushD::decodeMessageAndSendReply):
(WebPushD::connectionEventHandler):
(WebPushD::connectionAdded):
(WebPushD::connectionRemoved):
(main):

Source/WTF:

  • wtf/spi/darwin/XPCSPI.h:

Tools:

  • TestWebKitAPI/SourcesCocoa.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::testDaemonPList):
(TestWebKitAPI::currentExecutableLocation): Deleted.
(TestWebKitAPI::currentExecutableDirectory): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: Added.

(TestWebKitAPI::testWebPushDaemonLocation):
(TestWebKitAPI::testWebPushDaemonPList):
(TestWebKitAPI::setUpTestWebPushD):
(TestWebKitAPI::cleanUpTestWebPushD):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/DaemonTestUtilities.h: Renamed from Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/webpushd.c.
  • TestWebKitAPI/cocoa/DaemonTestUtilities.mm: Added.

(TestWebKitAPI::currentExecutableLocation):
(TestWebKitAPI::currentExecutableDirectory):
(TestWebKitAPI::registerPlistWithLaunchD):

3:28 PM Changeset in webkit [284202] by graouts@webkit.org
  • 3 edits in trunk/Source/WebCore

Remove DocumentTimeline::isRunningAnimationOnRenderer()
https://bugs.webkit.org/show_bug.cgi?id=231759

Reviewed by Darin Adler.

This function has no call site.

  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::isRunningAnimationOnRenderer const): Deleted.

  • animation/DocumentTimeline.h:
3:22 PM Changeset in webkit [284201] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

[AppleWin] Controls are not being rendered
https://bugs.webkit.org/show_bug.cgi?id=231769
<rdar://problem/83670287>

Reviewed by Fujii Hironori.

Controls are not being rendered because the LocalWindowsContext destructor is no longer blitting the bitmap contents to the hdc.
The test in GraphicsContext::getWindowsContext needs to match the test in GraphicsContext::releaseWindowsContext.

  • platform/graphics/win/GraphicsContextWin.cpp:

(WebCore::GraphicsContext::getWindowsContext):

3:04 PM Changeset in webkit [284200] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ MacOS ] http/tests/security/contentSecurityPolicy/frame-src-cross-origin-load.html is a flakey failure.
https://bugs.webkit.org/show_bug.cgi?id=230428

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
2:22 PM Changeset in webkit [284199] by Wenson Hsieh
  • 4 edits in trunk

[JS IPC] Make it possible to establish a stream connection using the JS IPC testing API
https://bugs.webkit.org/show_bug.cgi?id=231710

Reviewed by Tim Horton.

Source/WebKit:

Work towards fixing IPCTestingAPI.CanReceiveIPCSemaphore and IPCTestingAPI.CanReceiveSharedMemory, which broke
after I refactored RemoteRenderingBackend to be a IPC stream message receiver (instead of a standard IPC message
receiver). To achieve this, we introduce two new JS wrapper objects to encapsulate an IPC stream client
connection, as well as the stream buffer used to service that connection.

This allows us to establish a streaming IPC connection from the web process to the GPU process via JS IPC API,
like so:

`
const bufferSize = 1 << 16;
const streamConnection = IPC.createStreamClientConnection('GPU', bufferSize);
IPC.sendMessage('GPU', 0, IPC.messages.GPUConnectionToWebProcess_CreateRenderingBackend.name, [

{ type: 'RemoteRenderingBackendCreationParameters', 'identifier': 123, 'pageProxyID': IPC.webPageProxyID, 'pageID': IPC.pageID },
{ type: 'StreamConnectionBuffer', value: streamConnection.streamBuffer() }

]);
`

  • WebProcess/WebPage/IPCTestingAPI.cpp:

(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::create):
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::connection):
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::JSIPCStreamClientConnection):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::create):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::encode const):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::JSIPCStreamConnectionBuffer):
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::createJSWrapper):
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::wrapperClass):
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::unwrap):
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::toWrapped):
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::initialize):
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::finalize):
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::staticFunctions):
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::streamBuffer):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::createJSWrapper):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::wrapperClass):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::unwrap):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::toWrapped):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::initialize):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::finalize):
(WebKit::IPCTestingAPI::JSIPCStreamConnectionBuffer::staticFunctions):
(WebKit::IPCTestingAPI::JSIPC::staticFunctions):
(WebKit::IPCTestingAPI::encodeStreamConnectionBuffer):
(WebKit::IPCTestingAPI::encodeArgument):
(WebKit::IPCTestingAPI::JSIPC::createStreamClientConnection):

Tools:

See WebKit ChangeLog for more details.

  • TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:

Adjust these two API tests so that they actually end up creating a new remote rendering backend in the GPU
process, instead of failing to decode because we're missing a StreamConnectionBuffer. This allows us to make it
to GPUConnectionToWebProcess::createRenderingBackend and actually create the corresponding rendering backend;
however, this is still insufficient to fix the failing API tests, since there is still no mechanism to (1)
wait for and receive the stream wakeup semaphore in the web process, and (2) send stream messages using an
instance of the stream client connection.

2:18 PM Changeset in webkit [284198] by clopez@igalia.com
  • 3 edits in trunk/Tools

[webkitpy] The actual results reported for a flaky tests shouldn't include the expectation
https://bugs.webkit.org/show_bug.cgi?id=231241

Reviewed by Jonathan Bedard.

When a test is marked as flaky and fails the expectations on the
first run but passes on the second run (the retry) the current code
was adding the expectations to the actual results.
This is missleading and makes really hard to detect when a test stops
giving a specific expectation.

Instead of doing that report the actual results of the test on both runs.

  • Scripts/webkitpy/layout_tests/models/test_run_results.py:

(TestRunResults.init):
(TestRunResults.add):
(TestRunResults.merge):
(summarize_results):

  • Scripts/webkitpy/layout_tests/views/buildbot_results.py:

(BuildBotPrinter.print_unexpected_results):

2:14 PM Changeset in webkit [284197] by Kyle Piddington
  • 6 edits
    3 adds in trunk

https://tankionline.com/play/ html5 engine not working: crashes. (Metal shader not working)
https://bugs.webkit.org/show_bug.cgi?id=231490

Source/ThirdParty/ANGLE:

Add argument to RemoveInactiveInterfaceVariables to keep
output fragment variables, even if they are
Add a new test to verify that this problem is fixed.

Reviewed by Kenneth Russell.

  • src/compiler/translator/TranslatorMetalDirect.cpp:

(sh::TranslatorMetalDirect::translateImpl):

  • src/compiler/translator/TranslatorVulkan.cpp:

(sh::TranslatorVulkan::translateImpl):

  • src/compiler/translator/tree_ops/RemoveInactiveInterfaceVariables.cpp:

(sh::RemoveInactiveInterfaceVariables):

  • src/compiler/translator/tree_ops/RemoveInactiveInterfaceVariables.h:

LayoutTests:

Add argument to RemoveInactiveInterfaceVariables to keep
output fragment variables, even if they are
Add a new test to verify that this problem is fixed.

Reviewed by Kenneth Russell.

  • webgl/pending/conformance2/glsl3/empty-shader-with-output-expected.txt: Added.
  • webgl/pending/conformance2/glsl3/empty-shader-with-output.html: Added.
  • webgl/pending/resources/webgl_test_files/conformance2/glsl3/empty-shader-with-output.html: Added.
2:11 PM Changeset in webkit [284196] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

Rebaseline for fast/css/font-face-implicit-local-font.html.
https://bugs.webkit.org/show_bug.cgi?id=231770.

Unreviewed rebaseline.

  • platform/ios/fast/css/font-face-implicit-local-font-expected.txt:
1:41 PM Changeset in webkit [284195] by timothy@apple.com
  • 2 edits in trunk/Source/WebKit

Null check the context in -[WKWebProcessPlugInFrame jsContextForServiceWorkerWorld:]
https://bugs.webkit.org/show_bug.cgi?id=231758

Reviewed by Chris Dumez.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:

(-[WKWebProcessPlugInFrame jsContextForServiceWorkerWorld:]):
_frame->jsContextForServiceWorkerWorld() can return nullptr, so null check before using the result.

1:31 PM Changeset in webkit [284194] by Antti Koivisto
  • 21 edits in trunk

[LFC][Integration] Enable inline boxes with background
https://bugs.webkit.org/show_bug.cgi?id=231556

Reviewed by Alan Bujtas.

Source/WebCore:

We can now paint them.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::printReason):
(WebCore::LayoutIntegration::canUseForRenderInlineChild):

  • layout/integration/LayoutIntegrationCoverage.h:

LayoutTests:

  • platform/ios/fast/text/whitespace/004-expected.txt:
  • platform/ios/fast/text/whitespace/005-expected.txt:
  • platform/ios/fast/text/whitespace/006-expected.txt:
  • platform/ios/fast/text/whitespace/007-expected.txt:
  • platform/ios/fast/text/whitespace/010-expected.txt:
  • platform/ios/fast/text/whitespace/011-expected.txt:
  • platform/ios/fast/text/whitespace/015-expected.txt:
  • platform/ios/fast/text/whitespace/016-expected.txt:
  • platform/mac/fast/text/whitespace/004-expected.txt:
  • platform/mac/fast/text/whitespace/005-expected.txt:
  • platform/mac/fast/text/whitespace/006-expected.txt:
  • platform/mac/fast/text/whitespace/007-expected.txt:
  • platform/mac/fast/text/whitespace/010-expected.txt:
  • platform/mac/fast/text/whitespace/011-expected.txt:
  • platform/mac/fast/text/whitespace/015-expected.txt:
  • platform/mac/fast/text/whitespace/016-expected.txt:
1:30 PM Changeset in webkit [284193] by mmaxfield@apple.com
  • 32 edits in trunk

All the SDKVariant.xcconfig files should match
https://bugs.webkit.org/show_bug.cgi?id=231663

Reviewed by Youenn Fablet.

PerformanceTests:

  • MediaTime/Configurations/SDKVariant.xcconfig:

Source/bmalloc:

  • Configurations/SDKVariant.xcconfig:

Source/JavaScriptCore:

The linter says they're all supposed to match.
Source/ThirdParty/libwebrtc/Configurations/SDKVariant.xcconfig has an extra section,
and if you delete that section the build fails, so this patch broadcasts that extra
section to all the other SDKVariant.xcconfig files.

  • Configurations/SDKVariant.xcconfig:

Source/ThirdParty:

  • gtest/xcode/Config/SDKVariant.xcconfig:

Source/ThirdParty/ANGLE:

  • Configurations/SDKVariant.xcconfig:

Source/WebCore:

No new tests because there was no behavior change.

  • Configurations/SDKVariant.xcconfig:

Source/WebCore/PAL:

  • Configurations/SDKVariant.xcconfig:

Source/WebInspectorUI:

  • Configurations/SDKVariant.xcconfig:

Source/WebKit:

  • Configurations/SDKVariant.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/SDKVariant.xcconfig:

Source/WTF:

  • Configurations/SDKVariant.xcconfig:

Tools:

  • ContentExtensionTester/Configurations/SDKVariant.xcconfig:
  • DumpRenderTree/mac/Configurations/SDKVariant.xcconfig:
  • ImageDiff/cg/Configurations/SDKVariant.xcconfig:
  • MiniBrowser/Configurations/SDKVariant.xcconfig:
  • MobileMiniBrowser/Configurations/SDKVariant.xcconfig:
  • TestWebKitAPI/Configurations/SDKVariant.xcconfig:
  • WebEditingTester/Configurations/SDKVariant.xcconfig:
  • WebKitTestRunner/Configurations/SDKVariant.xcconfig:
  • lldb/lldbWebKitTester/Configurations/SDKVariant.xcconfig:
1:20 PM Changeset in webkit [284192] by Chris Dumez
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Unreviewed, fix up r284190 build fix.

  • Source/third_party/libwebm/webm_parser/src/master_parser.h:
1:02 PM Changeset in webkit [284191] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Mac wk2 Release x86 ] http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=231765.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
12:55 PM Changeset in webkit [284190] by Chris Dumez
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Unreviewed build fix with latest SDKs.

  • Source/third_party/libwebm/webm_parser/src/master_parser.h:
12:26 PM Changeset in webkit [284189] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ BigSur ] inspector/canvas/updateShader-webgl.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231757.

Unreviewed test gardening.

  • platform/mac/TestExpectations:
11:52 AM Changeset in webkit [284188] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] tryBreakingTextRun should not take std::nullopt "available width" to indicate that the run is not overflowing
https://bugs.webkit.org/show_bug.cgi?id=231743

Reviewed by Antti Koivisto.

Let's not use magic value to indicate that the candidate run for breaking does not overflow the line (available width is nullopt -> infinite available width -> never overflow).

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const):
(WebCore::Layout::InlineContentBreaker::tryBreakingOverflowingRun const):
(WebCore::Layout::InlineContentBreaker::tryBreakingPreviousNonOverflowingRuns const):
(WebCore::Layout::InlineContentBreaker::tryBreakingNextOverflowingRuns const):

  • layout/formattingContexts/inline/InlineContentBreaker.h:
  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForRenderInlineChild):

11:50 AM Changeset in webkit [284187] by Chris Dumez
  • 11 edits in trunk/Source

Unreviewed build fix with recent SDKs.

Use std::invoke_result<> instead of std::result_of<>, as it was deprecated in C++17.

Source/JavaScriptCore:

  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::getPropertySlot const):

  • runtime/JSObject.h:
  • runtime/JSObjectInlines.h:

(JSC::JSObject::getPropertySlot const):

  • runtime/ParseInt.h:

(JSC::toStringView):

Source/WTF:

  • wtf/IndexedContainerIterator.h:

(WTF::IndexedContainerIterator::operator* const):
(WTF::IndexedContainerIterator::operator*): Deleted.

  • wtf/Vector.h:
  • wtf/WeakHashSet.h:
11:46 AM Changeset in webkit [284186] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613.1.5-branch

Cherry-pick r284169. rdar://problem/84266655

REGRESSION (r283858): Intense white hover state appears on playback controls on Netflix/YouTube
https://bugs.webkit.org/show_bug.cgi?id=231719
rdar://84213404

Reviewed by Tim Horton.

Source/WebCore:

The playback controls on Netflix/YouTube are buttons that have a
non-'none' appearance value, but a used value of 'none' due to author
styles. In WebKit, and other engines, setting a background or text
color different from the UA style makes the used value 'none' and
drops native appearance.

The used value (effectiveAppearance) is set to none by comparing the
element's style to the UA style in RenderTheme::adjustStyle. However, when
style is adjusted during animation, the UA style is not passed in to the
method (see r273003). Consequently, we are unable to compare styles and
end up setting the 'effectiveAppearance' to 'appearance' (the computed value)
after r283858. Since the 'appearance' is not 'none', a native button is
briefly displayed during a hover animation, resulting in a white flash.

This was not an issue before r283858, as that change added logic to
always update the effectiveAppearance in RenderTheme::adjustStyle.
Before the change, the effectiveAppearance would simply be carried over
from the style before animation, and would remain 'none'.

To fix, only update the effectiveAppearance if its current value is
incorrect (auto, or styled). Additionally, use effectiveAppearance
more consistently, to ensure we do not incorrectly treat
style.appearance() as the used value.

Test: fast/forms/button-animation-appearance.html

  • rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle):

LayoutTests:

Added a mismatch test to ensure that animating the background color
of a button drops native appearance. Verified that the test passes
before r283858, on Safari 15, and fails on r283858.

  • fast/forms/button-animation-appearance-expected-mismatch.html: Added.
  • fast/forms/button-animation-appearance.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284169 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:46 AM Changeset in webkit [284185] by Russell Epstein
  • 2 edits in branches/safari-613.1.5-branch/Source/JavaScriptCore

Cherry-pick r284145. rdar://problem/84266646

Unreviewed, speculative build fix with new clang

Speculative since I cannot install this clang now.

  • b3/B3ValueRep.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284145 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:46 AM Changeset in webkit [284184] by Russell Epstein
  • 2 edits in branches/safari-613.1.5-branch/Source/JavaScriptCore

Cherry-pick r284137. rdar://problem/84266646

Clearly distinguish serial from concurrent WorkQueue
https://bugs.webkit.org/show_bug.cgi?id=231418
rdar://problem/84021977

Patch by Jean-Yves Avenard <Jean-Yves Avenard> on 2021-10-13
Reviewed by Chris Dumez.

Replace instances of WorkQueue being constructed as a concurrent one
with ConcurrentWorkQueue.
Remove the now unnecessary use of WorkQueue::Type::Serial in constructor.

  • jit/ExecutableAllocator.cpp: (JSC::dumpJITMemory):
  • runtime/Watchdog.cpp: (JSC::Watchdog::Watchdog):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284137 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:44 AM Changeset in webkit [284183] by Chris Dumez
  • 4 edits in trunk

[WKWebView _loadServiceWorkerURL] ends up lowercasing URL host
https://bugs.webkit.org/show_bug.cgi?id=231742

Reviewed by Timothy Hatcher.

Source/WebKit:

[WKWebView _loadServiceWorkerURL] ends up lowercasing URL host. While I don't think it is technically wrong
(hosts should not be case-sensitive), it can be confusing.

The reason this was happening is that I was using SecurityOriginData::fromURL(url).toString() to extract the
URL's scheme/host/port and SecurityOriginData::fromURL() lowercases the scheme and host. I am now using
URL::protocolHostAndPort() instead, which does not have this side effect and is actually more efficient.

No new tests, extended existing API test.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::loadServiceWorker):

Tools:

Extend test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
11:37 AM Changeset in webkit [284182] by Antti Koivisto
  • 16 edits in trunk

[CSS Cascade Layers] Layer should have higher priority than its descendant layers
https://bugs.webkit.org/show_bug.cgi?id=231725

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Update from the WPT repo.

  • web-platform-tests/css/css-cascade/layer-basic.html:
  • web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt:
  • web-platform-tests/css/css-cascade/layer-counter-style-override.html:
  • web-platform-tests/css/css-cascade/layer-font-face-override.html:
  • web-platform-tests/css/css-cascade/layer-import.html:
  • web-platform-tests/css/css-cascade/layer-keyframes-override.html:
  • web-platform-tests/css/css-cascade/layer-property-override-expected.txt:
  • web-platform-tests/css/css-cascade/layer-property-override.html:
  • web-platform-tests/css/css-cascade/layer-scroll-timeline-override-expected.txt:
  • web-platform-tests/css/css-cascade/layer-scroll-timeline-override.html:
  • web-platform-tests/css/css-cascade/presentational-hints-cascade-expected.txt:
  • web-platform-tests/css/css-cascade/presentational-hints-cascade.html:

Source/WebCore:

The spec was updated in https://github.com/w3c/csswg-drafts/commit/a6fc16e1b65868c6f984918cc76ad9b238e7139e

"Cascade layers are sorted by the order in which they first are declared, with nested layers grouped
within their parent layers before any unlayered rules."

  • style/RuleSetBuilder.cpp:

(WebCore::Style::RuleSetBuilder::updateCascadeLayerPriorities):

Change the sorting order so parents sort after their children.

  • style/RuleSetBuilder.h:
11:30 AM Changeset in webkit [284181] by Ayumi Kojima
  • 3 edits in trunk/LayoutTests

[ iOS macOS wk2 Debug ] ASSERTION FAILED: other.underlyingStringIsValid().
https://bugs.webkit.org/show_bug.cgi?id=231752

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
11:18 AM Changeset in webkit [284180] by Chris Dumez
  • 2 edits in trunk/Tools

[ iOS Release ] TestWebKitAPI.WebKit.TryUsingPrewarmedProcessThatJustCrashed is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=229260
<rdar://problem/82100254>

Reviewed by Youenn Fablet.

WebKit's default crash handler simply calls [webview reload] which does not reliably work
here because the WebProcess gets terminated so early in the page load. To make the test pass
reliably, it now provides its own crash handler which loads the same request again.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessPreWarming.mm:

(TEST):

11:06 AM Changeset in webkit [284179] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[RISCV64] Support logical operations with immediates on BaseIndex addresses in LLInt
https://bugs.webkit.org/show_bug.cgi?id=231734

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-10-14
Reviewed by Yusuke Suzuki.

RISCV64 offlineasm implementation gains support for performing logical
operations with immediate values on BaseIndex adresses, fixing the build
and bringing things back into operational state.

For this to function properly, BaseIndex loading is reworked so that no
additional scratch register is necessary for computing the target
address.

  • offlineasm/riscv64.rb:
11:05 AM Changeset in webkit [284178] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS EWS ] http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-ephemeral.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=231748

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:02 AM Changeset in webkit [284177] by ddkilzer@apple.com
  • 4 edits in trunk/Source/WebKitLegacy/mac

Modernize WebDatabaseManagerClient
<https://webkit.org/b/231549>
<rdar://problem/84129168>

Reviewed by Sihui Liu.

  • Storage/WebDatabaseManager.mm:

(-[WebDatabaseManager init]):

  • Add WebKit namespace to WebDatabaseManagerClient::sharedWebDatabaseManagerClient() and convert reference into pointer.
  • Storage/WebDatabaseManagerClient.h:

(WebKit::WebDatabaseManagerClient):

  • Put WebDatabaseManagerClient in WebKit namespace.
  • Storage/WebDatabaseManagerClient.mm:
  • Put WebDatabaseManagerClient in WebKit namespace.

(WebKit::WebDatabaseManagerClient::sharedWebDatabaseManagerClient):

  • Update to use NeverDestroyed<> and to return a reference.
10:58 AM Changeset in webkit [284176] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebCore

Further adjust style of alternate form control design
https://bugs.webkit.org/show_bug.cgi?id=231723
<rdar://84227020>

Reviewed by Dean Jackson.

  • css/parser/CSSParserContext.cpp:

(WebCore::CSSParserContext::CSSParserContext):
Enable some features used in the new stylesheet. Eventually we should
make a bare WebCore::Settings (with the WebCore-level defaults) and
initialize everything that comes from Settings from there.

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::adjustStyleForAlternateFormControlDesignTransition const):
(WebCore::RenderThemeIOS::adjustCheckboxStyle const):
(WebCore::RenderThemeIOS::adjustRadioStyle const):
(WebCore::RenderThemeIOS::adjustMenuListButtonStyle const):
(WebCore::RenderThemeIOS::adjustButtonStyle const):
(WebCore::RenderThemeIOS::adjustColorWellStyle const):
Adjust the style to use an optimized mode when a transform transition is
underway, or the element is hovered. This currently affects all transform
transitions on these controls, but should be adjusted to only affect
ones installed by the UA style sheet.

  • style/InspectorCSSOMWrappers.cpp:

(WebCore::Style::InspectorCSSOMWrappers::collectDocumentWrappers):
I failed to add the new sheet to the Web Inspector in r284008; do so now.

10:54 AM Changeset in webkit [284175] by ajuma@chromium.org
  • 2 edits in trunk

Add my GitHub username to contributors.json

Unreviewed.

  • metadata/contributors.json:
10:53 AM Changeset in webkit [284174] by ntim@apple.com
  • 5 edits in trunk

Don't run focusing steps on disconnected or inert <dialog>
https://bugs.webkit.org/show_bug.cgi?id=231721

Reviewed by Antti Koivisto.

Marked relevant WPTs as passing.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-disconnected-expected.txt:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-inert-expected.txt:

Source/WebCore:

  • html/HTMLDialogElement.cpp:

(WebCore::HTMLDialogElement::runFocusingSteps):

10:49 AM Changeset in webkit [284173] by Alexey Shvayka
  • 5 edits
    2 adds in trunk

AudioContext::getOutputTimestamp() uses incorrect global object as a high-res timestamp origin
https://bugs.webkit.org/show_bug.cgi?id=230138

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-getoutputtimestamp-cross-realm-expected.txt: Added.
  • web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-getoutputtimestamp-cross-realm.html: Added.

Source/WebCore:

Although the spec [1] does not explicitly mention which global object to use, there is
a recommendation for web spec authors to use _relevant_ [2], unlike ECMA standards.

This patch fixes getOutputTimestamp() to use AudioContext's global object to compute
performanceTime. Aligns WebKit with Blink and Gecko in case of cross-realm method call.

[1] https://webaudio.github.io/web-audio-api/#dom-audiocontext-getoutputtimestamp
[2] https://html.spec.whatwg.org/multipage/webappapis.html#concept-current-everything

Test: imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-getoutputtimestamp-cross-realm.html

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::getOutputTimestamp):

  • Modules/webaudio/AudioContext.h:
  • Modules/webaudio/AudioContext.idl:
10:32 AM Changeset in webkit [284172] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS Mac wk2 Debug ] imported/w3c/web-platform-tests/content-security-policy/generic/policy-inherited-correctly-by-plznavigate.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231083

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
10:21 AM Changeset in webkit [284171] by Russell Epstein
  • 1 copy in tags/Safari-612.2.9.1.21

Tag Safari-612.2.9.1.21.

10:18 AM Changeset in webkit [284170] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.1-branch/Source

Versioning.

WebKit-7612.2.9.1.21

9:51 AM Changeset in webkit [284169] by Aditya Keerthi
  • 3 edits
    2 adds in trunk

REGRESSION (r283858): Intense white hover state appears on playback controls on Netflix/YouTube
https://bugs.webkit.org/show_bug.cgi?id=231719
rdar://84213404

Reviewed by Tim Horton.

Source/WebCore:

The playback controls on Netflix/YouTube are buttons that have a
non-'none' appearance value, but a used value of 'none' due to author
styles. In WebKit, and other engines, setting a background or text
color different from the UA style makes the used value 'none' and
drops native appearance.

The used value (effectiveAppearance) is set to none by comparing the
element's style to the UA style in RenderTheme::adjustStyle. However, when
style is adjusted during animation, the UA style is not passed in to the
method (see r273003). Consequently, we are unable to compare styles and
end up setting the 'effectiveAppearance' to 'appearance' (the computed value)
after r283858. Since the 'appearance' is not 'none', a native button is
briefly displayed during a hover animation, resulting in a white flash.

This was not an issue before r283858, as that change added logic to
always update the effectiveAppearance in RenderTheme::adjustStyle.
Before the change, the effectiveAppearance would simply be carried over
from the style before animation, and would remain 'none'.

To fix, only update the effectiveAppearance if its current value is
incorrect (auto, or styled). Additionally, use effectiveAppearance
more consistently, to ensure we do not incorrectly treat
style.appearance() as the used value.

Test: fast/forms/button-animation-appearance.html

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle):

LayoutTests:

Added a mismatch test to ensure that animating the background color
of a button drops native appearance. Verified that the test passes
before r283858, on Safari 15, and fails on r283858.

  • fast/forms/button-animation-appearance-expected-mismatch.html: Added.
  • fast/forms/button-animation-appearance.html: Added.
9:49 AM Changeset in webkit [284168] by Russell Epstein
  • 6 edits in branches/safari-613.1.5-branch/Source

Cherry-pick r283940. rdar://problem/84158485

Disable SystemPreview in WKContentProviderRegistry
https://bugs.webkit.org/show_bug.cgi?id=231538
rdar://84110761

Reviewed by Tim Horton.

Source/WebKit:

Disable the WebViewContentProvider for System Previews
if UIKIT_WEBKIT_INTERNALS is true.

  • UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]):
  • UIProcess/ios/WKSystemPreviewView.h:
  • UIProcess/ios/WKSystemPreviewView.mm:

Source/WTF:

Revert the change in r283811.

  • wtf/PlatformUse.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283940 268f45cc-cd09-0410-ab3c-d52691b4dbfc

9:39 AM Changeset in webkit [284167] by ysuzuki@apple.com
  • 9 edits in trunk/Source

Remove std::iterator usage
https://bugs.webkit.org/show_bug.cgi?id=231728

Reviewed by Keith Miller.

Source/WebCore:

  • dom/ElementIterator.h:
  • dom/SimpleRange.h:
  • platform/Timer.cpp:

(WebCore::TimerBase::heapDecreaseKey):
(WebCore::TimerBase::heapPopMin):
(WebCore::TimerBase::heapDeleteNullMin):

Source/WTF:

std::iterator<> is deprecated and defining 5 type aliases is encouraged[1].
With new clang, using std::iterator<> causes compile error because of deprecation warnings.
This patch removes std::iterator usage.

[1]: https://www.fluentcpp.com/2018/05/08/std-iterator-deprecated/

  • wtf/HashIterators.h:

(WTF:: const const): Deleted.

  • wtf/HashTable.h:
  • wtf/WeakHashMap.h:
  • wtf/WeakHashSet.h:
9:38 AM Changeset in webkit [284166] by Simon Fraser
  • 5 edits
    2 moves in trunk/Source/WebCore

Move KeyboardScroll into platform code
https://bugs.webkit.org/show_bug.cgi?id=231712

Reviewed by Beth Dakin.

KeyboardScroll is used by platform/KeyboardScrollingAnimator.*, and itself only uses
platform types, so it can also be in platform. This fixes a layering violation.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/KeyboardScroll.cpp: Renamed from Source/WebCore/page/KeyboardScroll.cpp.
  • platform/KeyboardScroll.h: Renamed from Source/WebCore/page/KeyboardScroll.h.
9:08 AM Changeset in webkit [284165] by Jonathan Bedard
  • 5 edits in trunk/Tools

[git-webkit] Reset author time when editing commits (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=230224

Reviewed by Dewei Zhu.

update-ref creates a sticky ref file, which is not what we want.
Use 'fetch' instead.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git.pull): Use fetch instead of update-ref.

  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
9:03 AM Changeset in webkit [284164] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Disable django admin url on ews.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=231739

Reviewed by Jonathan Bedard.

  • CISupport/ews-app/ews-app/urls.py:
8:10 AM Changeset in webkit [284163] by ddkilzer@apple.com
  • 9 edits
    1 add in trunk/Source/WebCore

WebCore::CaptionUserPreferencesMediaAF should use a weak observer with CFNotificationCenter
<https://webkit.org/b/231550>
<rdar://problem/84129338>

Reviewed by Darin Adler.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • Add CaptionUserPreferencesMediaAF.mm.
  • page/CaptionUserPreferences.cpp:

(WebCore::CaptionUserPreferences::create): Add.

  • page/CaptionUserPreferences.h:

(WebCore::CaptionUserPreferences):

  • Make subclass of RefCounted<> and CanMakeWeakPtr<>.

(WebCore::CaptionUserPreferences::create): Add.
(WebCore::CaptionUserPreferences::CaptionUserPreferences):

  • Move constructor to protected visiblity with explicit keyword, and add static create() method.
  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::userCaptionPreferencesChangedNotificationCallback):

  • Update to use extractCaptionUserPreferencesMediaAF() for Cococa platforms. Note that -> is used for two different userPreferences variable types based on the platform.

(WebCore::CaptionUserPreferencesMediaAF::create): Add.
(WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF):

  • Move initialization of m_listeningForPreferenceChanges to class definition.

(WebCore::CaptionUserPreferencesMediaAF::~CaptionUserPreferencesMediaAF):

  • Update to use m_weakObserver as observer for Cocoa platforms.

(WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):

  • Update to use m_weakObserver as observer and _CFNotificationObserverIsObjC in suspension behavior for Cocoa platforms.
  • page/CaptionUserPreferencesMediaAF.h:

(WebCore::CaptionUserPreferencesMediaAF::create): Add.
(WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF):

  • Move constructor to private visiblity, and add static create() method.

(WebCore::CaptionUserPreferencesMediaAF::extractCaptionUserPreferencesMediaAF): Add.
(WebCore::CaptionUserPreferencesMediaAF::createWeakObserver): Add.
(WebCore::CaptionUserPreferencesMediaAF::m_weakObserver):

  • Add m_weakObserver instance variable for use with CFNotificationCenter.

(WebCore::CaptionUserPreferencesMediaAF::m_listeningForPreferenceChanges):

  • Move initialization of m_listeningForPreferenceChanges here from the constructor.
  • page/cocoa/CaptionUserPreferencesMediaAFCocoa.mm: Add.

(-[WebCaptionUserPreferencesMediaAFWeakObserver initWithWeakPtr:]):
(-[WebCaptionUserPreferencesMediaAFWeakObserver userPreferences]):

  • Declare and implement WebCaptionUserPreferencesMediaAFWeakObserver class for use as a weak CFNotificationCenter observer.

(WebCore::CaptionUserPreferencesMediaAF::createWeakObserver): Add.

  • Helper method to call from C++ that creates weak observer object from Objective-C++.

(WebCore::CaptionUserPreferencesMediaAF::extractCaptionUserPreferencesMediaAF): Add.

  • Helper method to extract RefPtr<CaptionUserPreferencesMediaAF> from CFNotification observer parameter.
  • page/PageGroup.cpp:

(WebCore::PageGroup::ensureCaptionPreferences):

  • Switch to using new create() methods.
  • page/PageGroup.h:

(WebCore::PageGroup::m_captionPreferences):

  • Change from std::unique_ptr<> to RefPtr<>.
8:06 AM Changeset in webkit [284162] by Chris Dumez
  • 2 edits in trunk/Source/WebKitLegacy

Unreviewed, fix up previous commit.

  • Storage/InProcessIDBServer.cpp:

(storageQuotaManagerSpaceRequester):

7:50 AM Changeset in webkit [284161] by vjaquez@igalia.com
  • 2 edits in trunk

Add my GitHub username to contributors.json

Unreviewed.

  • metadata/contributors.json:
7:48 AM Changeset in webkit [284160] by Chris Dumez
  • 2 edits in trunk/Source/WebKitLegacy

Unreviewed, very tiny partial revert of r284142 to address assertion hits on the bots.

  • Storage/InProcessIDBServer.cpp:

(storageQuotaManagerSpaceRequester):

7:35 AM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
7:24 AM Changeset in webkit [284159] by commit-queue@webkit.org
  • 29 edits
    12 deletes in trunk

Unreviewed, reverting r284151.
https://bugs.webkit.org/show_bug.cgi?id=231740

WTR

Reverted changeset:

"Test coverage for JSC shadow realms implementation"
https://bugs.webkit.org/show_bug.cgi?id=230602
https://commits.webkit.org/r284151

6:54 AM Changeset in webkit [284158] by Alan Bujtas
  • 4 edits
    2 adds in trunk

[LFC][IFC] Apply the line-gap font metrics when computing the layout bounds for inline boxes
https://bugs.webkit.org/show_bug.cgi?id=231699

Reviewed by Antti Koivisto.

Source/WebCore:

As per https://www.w3.org/TR/css-inline-3/#inline-height
"If line-height computes to normal and either text-edge is leading or this is the root inline box, the font's
line gap metric may also be incorporated into A and D by adding half to each side as half-leading."
We don't have text-edge implemented yet and since the its initial value is 'leading', the line-gap adjustment should be applied to
both the root and the non-root inline boxes unconditionally.

Test: fast/inline/fallback-font-with-line-spacing.html

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::LineBoxBuilder::adjustVerticalGeometryForInlineBoxWithFallbackFonts const):

LayoutTests:

  • fast/inline/fallback-font-with-line-spacing-expected.html: Added.
  • fast/inline/fallback-font-with-line-spacing.html: Added.
  • platform/mac/fast/text/international/003-expected.txt: Progression.
6:26 AM Changeset in webkit [284157] by ntim@apple.com
  • 4 edits
    4 adds in trunk/LayoutTests/imported/w3c

Import new <dialog> focus-related WPT
https://bugs.webkit.org/show_bug.cgi?id=231736

Reviewed by Youenn Fablet.

Upstream commit: https://github.com/web-platform-tests/wpt/commit/d6ef7143ef347dcedd680fafa3a7d91e77624e0f

  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-disconnected-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-disconnected.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-inert-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-inert.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/focus-after-close-expected.txt:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/focus-after-close.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log:
6:20 AM Changeset in webkit [284156] by Carlos Garcia Campos
  • 20 edits
    2 deletes in trunk

[GTK][WPE] Move getCurrentExecutablePath() and getCurrentExecutableName() to FileSystem
https://bugs.webkit.org/show_bug.cgi?id=231732

Reviewed by Michael Catanzaro.

Source/WebCore:

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::ensureGStreamerInitialized):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:
  • platform/text/hyphen/HyphenationLibHyphen.cpp:

(WebCore::topLevelPath):

Source/WebKit:

  • Shared/glib/ProcessExecutablePathGLib.cpp:

(WebKit::getExecutablePath):

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::bubblewrapSpawn):

  • UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:

Source/WTF:

  • wtf/FileSystem.h:
  • wtf/PlatformGTK.cmake:
  • wtf/PlatformWPE.cmake:
  • wtf/glib/FileSystemGlib.cpp:

(WTF::FileSystemImpl::currentExecutablePath):
(WTF::FileSystemImpl::currentExecutableName):

  • wtf/glib/GLibUtilities.cpp: Removed.

(getCurrentExecutablePath): Deleted.
(getCurrentExecutableName): Deleted.

  • wtf/glib/GLibUtilities.h: Removed.

Tools:

  • TestWebKitAPI/glib/WebKitGLib/TestMain.cpp:

(main):

  • WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:
  • WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp:

(WTR::topLevelPath):

  • WebKitTestRunner/InjectedBundle/wpe/ActivateFontsWPE.cpp:

(WTR::topLevelPath):

6:02 AM Changeset in webkit [284155] by ntim@apple.com
  • 2 edits in trunk/Source/WTF

Enable <dialog> element by default
https://bugs.webkit.org/show_bug.cgi?id=231307

Reviewed by Brent Fulgham.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
5:37 AM Changeset in webkit [284154] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

Refactor RenderSVGBlock
https://bugs.webkit.org/show_bug.cgi?id=231477

Patch by Rob Buis <rbuis@igalia.com> on 2021-10-14
Reviewed by Manuel Rego Casasnovas.

Refactor common code from RenderSVGBlock subclasses into RenderSVGBlock.

  • rendering/svg/RenderSVGBlock.cpp:

(WebCore::RenderSVGBlock::clippedOverflowRect const):
(WebCore::RenderSVGBlock::computeVisibleRectInContainer const):
(WebCore::RenderSVGBlock::computeFloatVisibleRectInContainer const):
(WebCore::RenderSVGBlock::mapLocalToContainer const):
(WebCore::RenderSVGBlock::pushMappingToContainer const):
(WebCore::RenderSVGBlock::nodeAtPoint):

  • rendering/svg/RenderSVGBlock.h:
  • rendering/svg/RenderSVGForeignObject.cpp:

(WebCore::RenderSVGForeignObject::clippedOverflowRect const): Deleted.
(WebCore::RenderSVGForeignObject::computeFloatVisibleRectInContainer const): Deleted.
(WebCore::RenderSVGForeignObject::computeVisibleRectInContainer const): Deleted.
(WebCore::RenderSVGForeignObject::nodeAtPoint): Deleted.
(WebCore::RenderSVGForeignObject::mapLocalToContainer const): Deleted.
(WebCore::RenderSVGForeignObject::pushMappingToContainer const): Deleted.

  • rendering/svg/RenderSVGForeignObject.h:
  • rendering/svg/RenderSVGText.cpp:

(WebCore::RenderSVGText::clippedOverflowRect const): Deleted.
(WebCore::RenderSVGText::computeVisibleRectInContainer const): Deleted.
(WebCore::RenderSVGText::computeFloatVisibleRectInContainer const): Deleted.
(WebCore::RenderSVGText::mapLocalToContainer const): Deleted.
(WebCore::RenderSVGText::pushMappingToContainer const): Deleted.
(WebCore::RenderSVGText::nodeAtPoint): Deleted.

  • rendering/svg/RenderSVGText.h:
5:32 AM Changeset in webkit [284153] by commit-queue@webkit.org
  • 2 edits in trunk

Unreviewed, reverting r283878.
https://bugs.webkit.org/show_bug.cgi?id=231735

It

Reverted changeset:

"[WPE] Reenable -fvisibility=hidden and -fvisibility-inlines-
hidden"
https://bugs.webkit.org/show_bug.cgi?id=222860
https://commits.webkit.org/r283878

4:23 AM Changeset in webkit [284152] by Carlos Garcia Campos
  • 8 edits in trunk

[GTK][WPE] Bump GLib version to 2.58.3
https://bugs.webkit.org/show_bug.cgi?id=231726

Reviewed by Philippe Normand.

.:

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Use g_enum_to_string().

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::updateBufferingStatus):

Source/WTF:

Remove enumToString() since we can use g_enum_to_string().

  • wtf/glib/GLibUtilities.cpp:

(enumToString): Deleted.

  • wtf/glib/GLibUtilities.h:
3:22 AM Changeset in webkit [284151] by commit-queue@webkit.org
  • 29 edits
    12 adds in trunk

JSTests:
Test coverage for JSC shadow realms implementation
https://bugs.webkit.org/show_bug.cgi?id=230602

Patch by Phillip Mates <Phillip Mates> on 2021-10-14
Reviewed by Yusuke Suzuki.

  • modules/import-meta-syntax.js:

(shouldThrow):

  • stress/eval-indirect.js: Added.

(shouldBe):
(shouldThrow):

  • stress/import-syntax.js:
  • stress/resources/shadow-realm-example-module.js: Added.

(putInGlobal):
(getFromGlobal):
(getAnObject):
(getCallCount):

  • stress/shadow-realm-evaluate.js: Added.

(shouldBe):
(shouldThrow):
(assertionFn):
(shouldBe.String):
(shouldBe.globalObjectFor.doEval):
(shouldBe.globalObjectFor):

  • stress/shadow-realm-import-value.js: Added.

(shouldBe):
(shouldThrow):
(async shouldThrowAsync):
(async const):
(doImport):

  • stress/shadow-realm.js: Added.

(shouldBe):
(throw.new.Error):

  • test262/config.yaml:

Source/JavaScriptCore:
shadow realms implementation
https://bugs.webkit.org/show_bug.cgi?id=230602

Patch by Phillip Mates <Phillip Mates> on 2021-10-14
Reviewed by Yusuke Suzuki.

Implementation of the Shadow Realms proposal (stage 3 in TC39) [1]

Main APIs added are

  • new ShadowRealm() creates an object that has its own global object and module graph.
  • ShadowRealm.prototype.evaluate(sourceText) this allows for evaluating code in the context of the realm, which has its own module graph and global object.
  • ShadowRealm.prototype.importValue(specifier, exportName) this allows importing module exports in the the context of the realm, which has its own module graph and global object.

The main detail of the Shadow Realm implementation is that values
passed between realms must be either primitives or wrapped callables.
Wrapped callables themselves are callables that check that their
arguments and return values are also either primitives or wrapped
callables. This detail is implemented via JS builtins + a few new
intrinsics.

Can be enabled using --useShadowRealm=true

[1]: https://github.com/tc39/proposal-shadowrealm

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • builtins/BuiltinNames.h:
  • builtins/ShadowRealmPrototype.js: Added.

(globalPrivate.wrap.wrapped):
(globalPrivate.wrap):
(evaluate):
(importValue):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecode/LinkTimeConstant.h:
  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitIsShadowRealm):

  • bytecompiler/NodesCodegen.cpp:
  • jsc.cpp:

(JSC_DEFINE_HOST_FUNCTION):

  • parser/Parser.cpp:

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

  • runtime/CommonIdentifiers.h:
  • runtime/IndirectEvalExecutable.cpp:

(JSC::IndirectEvalExecutable::createImpl):
(JSC::IndirectEvalExecutable::create):
(JSC::IndirectEvalExecutable::tryCreate):

  • runtime/IndirectEvalExecutable.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildrenImpl):
(JSC::JSGlobalObject::createWithCustomMethodTable):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::shadowRealmPrototype const):
(JSC::JSGlobalObject::shadowRealmStructure const):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/JSType.cpp:

(WTF::printInternal):

  • runtime/JSType.h:
  • runtime/OptionsList.h:
  • runtime/ShadowRealmConstructor.cpp: Added.

(JSC::ShadowRealmConstructor::ShadowRealmConstructor):
(JSC::ShadowRealmConstructor::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/ShadowRealmConstructor.h: Added.
  • runtime/ShadowRealmObject.cpp: Added.

(JSC::ShadowRealmObject::ShadowRealmObject):
(JSC::ShadowRealmObject::visitChildrenImpl):
(JSC::ShadowRealmObject::create):
(JSC::ShadowRealmObject::finishCreation):

  • runtime/ShadowRealmObject.h: Added.
  • runtime/ShadowRealmPrototype.cpp: Added.

(JSC::ShadowRealmPrototype::ShadowRealmPrototype):
(JSC::ShadowRealmPrototype::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/ShadowRealmPrototype.h: Added.
  • runtime/VM.cpp:
  • runtime/VM.h:
3:15 AM Changeset in webkit [284150] by eocanha@igalia.com
  • 2 edits in trunk

[contributors.json] Add eocanha github account and canonicalize
https://bugs.webkit.org/show_bug.cgi?id=231729

Unreviewed.

Added eocanha github user to contributors.json and canonicalize the file to make the style checker happy.

  • metadata/contributors.json:
12:04 AM Changeset in webkit [284149] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Remove useless isConnected() check from HTMLDialogElement::close()
https://bugs.webkit.org/show_bug.cgi?id=231722

Reviewed by Antti Koivisto.

No behavior change.

Element::focus() already early returns if the element is disconnected, so it is redundant.

  • html/HTMLDialogElement.cpp:

(WebCore::HTMLDialogElement::close):

Note: See TracTimeline for information about the timeline view.