Timeline



Feb 11, 2022:

6:29 PM Changeset in webkit [289689] by don.olmstead@sony.com
  • 3 edits in trunk/Source/JavaScriptCore

Allow structureHeapAddressSize to be set during build
https://bugs.webkit.org/show_bug.cgi?id=236527

Reviewed by Yusuke Suzuki.

Add STRUCTURE_HEAP_ADDRESS_SIZE_IN_MB as a way to set the size of
structureHeapAddressSize at build time. Set a default for the PlayStation port.

  • PlatformPlayStation.cmake:
  • runtime/JSCConfig.h:
6:04 PM Changeset in webkit [289688] by Kocsen Chung
  • 1 copy in tags/Safari-614.1.3

Tag Safari-614.1.3.

6:04 PM Changeset in webkit [289687] by Jonathan Bedard
  • 12 edits in trunk/Tools

git-webkit setup should allow changing the credentials
https://bugs.webkit.org/show_bug.cgi?id=235297
<rdar://problem/87988794>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:

(Tracker.credentials): Pass validater into webkitscmpy.credentials if caller requests validation.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py:

(Tracker.credentials): Pass validater into webkitscmpy.credentials if caller requests validation.

  • Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:

(credentials): Allow caller to provide a callback which will validate credentials to ensure
they work, re-prompt user if credentials fail validation.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:

(Setup.git): Request validation of GitHub credentials.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:

(GitHub.credentials): Pass validation flag.

Canonical link: https://commits.webkit.org/247173@main

5:52 PM Changeset in webkit [289686] by Alan Bujtas
  • 4 edits
    2 adds in trunk

contain:content breaks fullscreen
https://bugs.webkit.org/show_bug.cgi?id=236470
<rdar://88689388>

Reviewed by Simon Fraser.

Source/WebCore:

Paint/layout containment forms a containing block for fixed positioned block boxes. It makes all fixed
positioned descendants anchored (contained) to this layout container.
This patch enables fullscreen boxes break out of this non-ICB based layout scope (this is similar to what we
do for other, "layout scope changing" properties, see canContainFixedPositionObjects).

Test: fullscreen/fullscreen-prevented-by-containment.html

  • css/fullscreen.css:

(:-webkit-full-screen-ancestor:not(iframe)):

  • css/parser/CSSParserContext.cpp:

(WebCore::CSSParserContext::CSSParserContext):

LayoutTests:

  • fullscreen/fullscreen-prevented-by-containment-expected.txt: Added.
  • fullscreen/fullscreen-prevented-by-containment.html: Added.
5:46 PM Changeset in webkit [289685] by Megan Gardner
  • 14 edits
    2 copies in trunk/Source/WebKit

Implement Reveal methods
https://bugs.webkit.org/show_bug.cgi?id=236478

Reviewed by Wenson Hsieh.

Respond to protocol methods that request RVItems for selection.

  • Platform/IPC/ArgumentCoder.h:
  • Platform/IPC/DataReference.h:
  • Shared/Cocoa/SandboxExtensionCocoa.mm:
  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:
  • SourcesCocoa.txt:
  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView requestRVItemInSelectedRangeWithCompletionHandler:]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::requestRVItemInCurrentSelectedRange):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::requestRVItemInCurrentSelectedRange):

5:45 PM Changeset in webkit [289684] by Jonathan Bedard
  • 5 edits in trunk/Tools

[git-webkit] Link issue to pull requests
https://bugs.webkit.org/show_bug.cgi?id=236339
<rdar://problem/88657772>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:

(PullRequest.main): Add link to pull request in issue comments, assign issue to
pull request author.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:

Canonical link: https://commits.webkit.org/247170@main

5:35 PM Changeset in webkit [289683] by Nikos Mouchtaris
  • 2 edits in trunk/Source/WTF

Turn overscroll-behavior on by default
https://bugs.webkit.org/show_bug.cgi?id=236060

Reviewed by Tim Nguyen.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
5:15 PM Changeset in webkit [289682] by commit-queue@webkit.org
  • 5 edits
    4 deletes in trunk

Unreviewed, reverting r289498.
https://bugs.webkit.org/show_bug.cgi?id=236534

Speedometer2 2% regression

Reverted changeset:

"Dialog element only animates once"
https://bugs.webkit.org/show_bug.cgi?id=236274
https://commits.webkit.org/r289498

5:12 PM Changeset in webkit [289681] by Wenson Hsieh
  • 18 edits
    1 add in trunk/Source

[iOS] Add a "Copy Cropped Image" context menu item when long pressing images
https://bugs.webkit.org/show_bug.cgi?id=236511
rdar://88817219

Reviewed by Devin Rousso.

Source/WebKit:

Add support for a new context menu item on iOS that allows the user to copy a cropped version of the source
image, after invoking markup UI. See below for more details.

  • Configurations/WebKit.xcconfig:

Link against UniformTypeIdentifiers on macOS 11+, rather than macOS 12+.

  • Platform/cocoa/CocoaImage.h:
  • Platform/cocoa/CocoaImage.mm:

(WebKit::transcode):
(WebKit::transcodeWithPreferredMIMEType):

Move a helper function that transcodes an image to a given UTI into CocoaImage.h, as a standalone function.
Also, add a separate helper function here that transcodes an image to a given MIME type (with a fallback UTI, in
case the MIME type cannot be mapped to a suitable UTI that conforms to any image UTI). The new call sites of
this function are in WKContentViewInteraction.mm.

  • Platform/cocoa/TextRecognitionUtilities.mm:
  • Shared/ios/InteractionInformationAtPosition.h:
  • Shared/ios/InteractionInformationAtPosition.mm:

(WebKit::InteractionInformationAtPosition::encode const):
(WebKit::InteractionInformationAtPosition::decode):

Add a new imageMIMEType member to represent the MIME type of the source image used to generate the bitmap
image data in image.

  • SourcesCocoa.txt: Add CocoaImage.mm.
  • UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:

(-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:userInfo:]):
(-[_WKActivatedElementInfo _initWithType:URL:imageURL:location:title:ID:rect:image:imageMIMEType:]):
(-[_WKActivatedElementInfo _initWithType:URL:imageURL:location:title:ID:rect:image:imageMIMEType:userInfo:]):
(-[_WKActivatedElementInfo imageMIMEType]):

Add plumbing for imageMIMEType from InteractionInformationAtPosition (position information) into
_WKActivatedElementInfo, as an internal method. We use this information below, to transcode the resulting image
back to the source image format after applying markup, when invoking the new "Copy Cropped Image" item.

(-[_WKActivatedElementInfo _initWithType:URL:imageURL:location:title:ID:rect:image:]): Deleted.
(-[_WKActivatedElementInfo _initWithType:URL:imageURL:location:title:ID:rect:image:userInfo:]): Deleted.

  • UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
  • UIProcess/API/Cocoa/_WKElementAction.h:
  • UIProcess/API/Cocoa/_WKElementAction.mm:

(+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
(+[_WKElementAction imageForElementActionType:]):

Add support for the new "Copy Cropped Image" item tag (_WKElementActionTypeCopyCroppedImage).

(elementActionTypeToUIActionIdentifier):
(uiActionIdentifierToElementActionType):

  • UIProcess/ios/WKActionSheetAssistant.h:
  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant handleElementActionWithType:element:needsInteraction:]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _showAttachmentSheet]):
(-[WKContentView performImageAnalysisMarkup:]):

Use the new transcodeWithPreferredMIMEType helper method here.

(-[WKContentView doAfterComputingImageAnalysisResultsForMarkup:]):

Remove the TIFF transcoding workaround from this method (see associated changes in Radar for more information).

(-[WKContentView actionSheetAssistant:copyCroppedImage:sourceMIMEType:]):

Handle the new action by calling into VisionKit to adjust the source image as needed, and then transcode the
resulting CGImageRef back to a format that matches the source image; finally, write this transcoded
representation to the general pasteboard.

(-[WKContentView _dataForPreviewItemController:atPosition:type:]):
(-[WKContentView _presentedViewControllerForPreviewItemController:]):

Pass imageMIMEType from position information into the activated element info initializer in several places.

(WebKit::transcode): Deleted.

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::imagePositionInformation):
(WebKit::elementPositionInformation):

Populate imageMIMEType in position information.

Source/WTF:

Add a compile-time flag to guard availability of the UniformTypeIdentifiers framework. See WebKit/ChangeLog for
more information.

  • wtf/PlatformHave.h:
4:42 PM Changeset in webkit [289680] by Said Abou-Hallawa
  • 3 edits in trunk/Source/WebKit

[GPU Process] [CG] Add an ArgumentCoder for CFCharacterSetRef
https://bugs.webkit.org/show_bug.cgi?id=236507

Reviewed by Sam Weinig.

CFCharacterSetRef is used for encoding and decoding the system fonts.

  • Shared/cf/ArgumentCodersCF.cpp:

(IPC::typeFromCFTypeRef):
(IPC::ArgumentCoder<CFTypeRef>::encode):
(IPC::ArgumentCoder<RetainPtr<CFTypeRef>>::decode):
(IPC::ArgumentCoder<CFCharacterSetRef>::encode):
(IPC::ArgumentCoder<RetainPtr<CFCharacterSetRef>>::decode):

  • Shared/cf/ArgumentCodersCF.h:
3:54 PM Changeset in webkit [289679] by Alan Coon
  • 1 copy in tags/Safari-613.1.17.0.1

Tag Safari-613.1.17.0.1.

3:53 PM Changeset in webkit [289678] by Russell Epstein
  • 1 copy in tags/Safari-613.1.17.1.1

Tag Safari-613.1.17.1.1.

3:35 PM Changeset in webkit [289677] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Marking expectations for compositing/iframes/border-radius-composited-frame.html as it is failing on EWS
rdar://80333071

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:26 PM Changeset in webkit [289676] by Jonathan Bedard
  • 4 edits in trunk/Tools

[EWS] Rebase PRs on tip of branch
https://bugs.webkit.org/show_bug.cgi?id=236389
<rdar://problem/88705147>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/master.cfg: Add github.base.ref to properties.
  • Tools/CISupport/ews-build/steps.py:

(CheckOutSource.run): Set branch from github properties, if available.
(ShowIdentifier.start): Use 'got_revision' instead of github properties.
(CheckOutPullRequest.run): Rebase PRs if we have enough information to. To support
rebasing, we need to handle conflicts in changelogs.
(RevertPullRequestChanges.run): Revert to whatever revision we rebased on.
(Trigger.propertiesToPassToTriggers): Pass github.base.ref to triggered build.

  • Tools/CISupport/ews-build/steps_unittest.py:

Canonical link: https://commits.webkit.org/247164@main

3:23 PM Changeset in webkit [289675] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ Mac wk1 ] fast/text/otsvg-canvas.html failing constantly
https://bugs.webkit.org/show_bug.cgi?id=236530

Unreviewed test gardening

  • platform/mac-wk1/TestExpectations:
3:10 PM Changeset in webkit [289674] by Truitt Savell
  • 2 edits in trunk/LayoutTests

update expectations for webrtc/h264-baseline.html and webrtc/h264-high.html
webkit.org/b/223043

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:03 PM Changeset in webkit [289673] by Megan Gardner
  • 6 edits in trunk/Source

Enable grammar checking on Mac Catalyst.
https://bugs.webkit.org/show_bug.cgi?id=236479

Reviewed by Devin Rousso.

Source/WebCore:

  • editing/Editor.cpp:

(WebCore::Editor::markMisspellingsAfterTypingToWord):

  • platform/graphics/cocoa/GraphicsContextCocoa.mm:

(WebCore::grammarColor):
(WebCore::colorForMarkerLineStyle):

Source/WebKit:

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/TextCheckerIOS.mm:

(WebKit::mutableState):
(WebKit::TextChecker::setGrammarCheckingEnabled):
(WebKit::TextChecker::checkTextOfParagraph):

2:57 PM Changeset in webkit [289672] by Chris Dumez
  • 24 edits
    2 adds in trunk

Fix MIME type check for classic worker script fetches
https://bugs.webkit.org/show_bug.cgi?id=236411

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/workers/Worker_script_mimetype-expected.txt:
  • web-platform-tests/workers/importscripts_mime.any.sharedworker-expected.txt:
  • web-platform-tests/workers/importscripts_mime.any.worker-expected.txt:

Rebaseline WPT tests now that more checks are passing.

  • web-platform-tests/workers/constructors/SharedWorker/Infinity.headers: Added.
  • web-platform-tests/workers/constructors/SharedWorker/NaN.headers: Added.

Merge upstream fix from https://github.com/web-platform-tests/wpt/pull/32782.

Source/WebCore:

Fix MIME type check for classic worker script fetches and classic worker script imports, so that we are
now aligned with the specification:

This was causing us to fail some Web Platform Tests.

No new tests, rebaselined existing tests.

  • bindings/js/WorkerModuleScriptLoader.cpp:

(WebCore::WorkerModuleScriptLoader::load):

  • loader/FetchOptions.h:

(WebCore::isScriptLikeDestination):

  • workers/Worker.cpp:

(WebCore::Worker::create):

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::importScripts):

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::loadSynchronously):
(WebCore::WorkerScriptLoader::loadAsynchronously):
(WebCore::constructJavaScriptMIMETypeError):
(WebCore::WorkerScriptLoader::validateWorkerResponse):
(WebCore::WorkerScriptLoader::didReceiveResponse):

  • workers/WorkerScriptLoader.h:
  • workers/service/ServiceWorkerJob.cpp:

(WebCore::ServiceWorkerJob::fetchScriptWithContext):

  • workers/shared/SharedWorkerScriptLoader.cpp:

(WebCore::SharedWorkerScriptLoader::load):

Source/WebKit:

  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:

(WebKit::ServiceWorkerSoftUpdateLoader::processResponse):

LayoutTests:

Fix existing layout tests to make sure that worker scripts are served with a JavaScript mime type.

  • http/tests/resourceLoadStatistics/resources/script-revealing-cookies.py:
  • http/tests/security/contentSecurityPolicy/resources/worker-importScript-redirect-cross-origin-allowed.py:
  • http/tests/security/contentSecurityPolicy/resources/worker-importScript-redirect-cross-origin-blocked.py:
  • http/tests/security/contentSecurityPolicy/resources/worker-xhr-allowed.py:
  • http/tests/security/contentSecurityPolicy/resources/worker-xhr-redirect-cross-origin-allowed.py:
  • http/tests/security/contentSecurityPolicy/resources/worker-xhr-redirect-cross-origin-blocked.py:
  • http/tests/security/contentSecurityPolicy/resources/worker.py:
  • http/tests/workers/resources/subworker-encoded.py:
2:46 PM Changeset in webkit [289671] by don.olmstead@sony.com
  • 4 edits in trunk

[CMake] Check for MAP_ALIGNED support
https://bugs.webkit.org/show_bug.cgi?id=236522

Reviewed by Keith Miller.

.:

Add a symbol check for MAP_ALIGNED in the CMake.

  • Source/cmake/OptionsCommon.cmake:

Source/WTF:

Use the HAVE(MAP_ALIGNED) check in tryReserveUncommittedAligned. Mark unused parameters in
the function. Also define MAP_NORESERVE if its undefined which seems to be the case in
FreeBSD.

  • wtf/posix/OSAllocatorPOSIX.cpp:

(WTF::OSAllocator::tryReserveUncommittedAligned):

1:48 PM Changeset in webkit [289670] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Sources: double clicking a breakpoint icon should show the edit popover
https://bugs.webkit.org/show_bug.cgi?id=236524

Reviewed by Patrick Angle.

This is a more convenient way to access(/discover) the breakpoint's configuration details.

  • UserInterface/Views/BreakpointTreeElement.js:

(WI.BreakpointTreeElement):
(WI.BreakpointTreeElement.prototype._handleStatusImageElementDoubleClicked): Added.

  • UserInterface/Views/BreakpointPopover.js:

(WI.BreakpointPopover.show): Added.
(WI.BreakpointPopover.appendContextMenuItems):
Add a convenience method to create a WI.BreakpointPopover (or subclass) for the given
breakpoint and show it over the given target element.

1:46 PM Changeset in webkit [289669] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: click to re-enable breakpoint clears automatic continue
https://bugs.webkit.org/show_bug.cgi?id=236465

Reviewed by Patrick Angle.

This is not very convenient for developers as it means that they have to click more than
once when re-enabling an auto-continue breakpoint (i.e. once to enable it (which currently
disables auto-continue), and once to re-enable auto-continue). Separating these behaviors is
preferable because it's unlikely that a developer would want to disable auto-continue when
re-enabling a breakpoint if they've taken the time to previously configure auto-continue.

  • UserInterface/Views/BreakpointTreeElement.js:

(WI.BreakpointTreeElement.prototype.onenter):
(WI.BreakpointTreeElement.prototype.onspace):
(WI.BreakpointTreeElement.prototype._statusImageElementClicked):

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype.textEditorBreakpointClicked):
Replace cycleToNextNode with disabled = !disabled.

  • UserInterface/Models/Breakpoint.js:

(WI.Breakpoint.prototype.cycleToNextMode): Deleted.
Remove this method now that it's no longer used.

1:43 PM Changeset in webkit [289668] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

[model] rewrite http/tests/model/model-document.html using testharness.js
https://bugs.webkit.org/show_bug.cgi?id=236494

Reviewed by Dean Jackson.

  • http/tests/model/model-document-expected.txt:
  • http/tests/model/model-document.html:
1:39 PM Changeset in webkit [289667] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

css/css-writing-modes/direction-propagation-body-contain-root.html asserts
https://bugs.webkit.org/show_bug.cgi?id=234763
<rdar://problem/87243336>

Unreviewed gardening.

1:16 PM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
1:12 PM Changeset in webkit [289666] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

[model] standalone model documents should be interactive
https://bugs.webkit.org/show_bug.cgi?id=236493

Reviewed by Dean Jackson.

Source/WebCore:

We made <model> elements not be interactive by default in bug 227621,
so we need to opt into interactivity for standalone <model> documents.
All this requires is setting the "interactive" attribute, which we set
instead of the "controls" attribute which does not exist for <model>.

Test: http/tests/model/model-document-interactive.html

  • html/ModelDocument.cpp:

(WebCore::ModelDocumentParser::createDocumentStructure):

LayoutTests:

Add a test that checks that the <model> element created for standalone
documents has the "interactive" attribute.

  • http/tests/model/model-document-interactive-expected.txt: Added.
  • http/tests/model/model-document-interactive.html: Added.
1:09 PM Changeset in webkit [289665] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the Apple TV build

Don't try to import AVKitSPI.h on Apple TV.

  • UIProcess/ios/WKContentViewInteraction.mm:
1:00 PM Changeset in webkit [289664] by Kyle Piddington
  • 3 edits in trunk/Source/ThirdParty/ANGLE

Cocoa2d-HTLM5 game apepars to use wrong vertex buffer data
https://bugs.webkit.org/show_bug.cgi?id=236427
<rdar://problem/87136345>

Reviewed by Kimmo Kinnunen.

Render encoder appears to carry stale state when a vertex array's element
buffer is updated, but no other parts of the buffer are updated. Reassign
vertex buffer bindings in this case, which clears up corruption
(Squished rendering elements, incorrect UV's)

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

(rx::VertexArrayMtl::syncState):
(rx::VertexArrayMtl::setupDraw):

12:35 PM Changeset in webkit [289663] by Russell Epstein
  • 4 edits in branches/safari-613.1.17.1-branch/Source/WebCore

Cherry-pick r289493. rdar://problem/88321921

Register strings in CSSTokenizer created from preprocessing
https://bugs.webkit.org/show_bug.cgi?id=236309

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-09
Reviewed by Michael Saboff.

Register strings in CSSTokenizer created from preprocessing. This will align with
what is currently done for strings with escapes in CSSTokenizer::consumeName().

  • css/parser/CSSTokenizer.cpp: (WebCore::CSSTokenizer::preprocessString): (WebCore::CSSTokenizer::tryCreate): (WebCore::CSSTokenizer::CSSTokenizer): (WebCore::preprocessString): Deleted.
  • css/parser/CSSTokenizer.h:
  • css/parser/CSSTokenizerInputStream.h:

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

12:35 PM Changeset in webkit [289662] by Russell Epstein
  • 4 edits in branches/safari-613.1.17.0-branch/Source/WebCore

Cherry-pick r289493. rdar://problem/88321921

Register strings in CSSTokenizer created from preprocessing
https://bugs.webkit.org/show_bug.cgi?id=236309

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-09
Reviewed by Michael Saboff.

Register strings in CSSTokenizer created from preprocessing. This will align with
what is currently done for strings with escapes in CSSTokenizer::consumeName().

  • css/parser/CSSTokenizer.cpp: (WebCore::CSSTokenizer::preprocessString): (WebCore::CSSTokenizer::tryCreate): (WebCore::CSSTokenizer::CSSTokenizer): (WebCore::preprocessString): Deleted.
  • css/parser/CSSTokenizer.h:
  • css/parser/CSSTokenizerInputStream.h:

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

12:31 PM Changeset in webkit [289661] by Russell Epstein
  • 14 edits
    2 adds in branches/safari-613.1.17.1-branch

Cherry-pick r289462. rdar://problem/88580935

Don't return an empty value from AbortController.signal.reason and make it harder to return empty values from JSValueInWrappedObject
https://bugs.webkit.org/show_bug.cgi?id=236318
<rdar://88580935>

Reviewed by Mark Lam.

Source/WebCore:

This patch makes it so we might not accidentally return the empty value to
JavaScript code from JSValueInWrappedObject. Previously, JSValueInWrappedObject
had an "operator JSValue()" method. This patch removes that, adds a new
conversion method for converting between JSValueInWrappedObject and JSValue,
and makes JSValueInWrappedObject return undefined inside this method
when it used to return the empty value. This fixes a crash where we'd return
the empty value to JS JIT code, and crash dereferencing a nullptr. It's never
valid for a JS function call (or getter, etc) to return the empty value.

Test: fast/dom/AbortSignal-reason-crash-2.html

  • Modules/webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::getChannelData):
  • Modules/webaudio/AudioWorkletProcessor.cpp: (WebCore::toJSArray): (WebCore::toJSObject): (WebCore::AudioWorkletProcessor::buildJSArguments):
  • bindings/js/JSCustomEventCustom.cpp: (WebCore::JSCustomEvent::detail const):
  • bindings/js/JSDOMConvertAny.h: (WebCore::JSConverter<IDLAny>::convert):
  • bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data const):
  • bindings/js/JSPaymentMethodChangeEventCustom.cpp: (WebCore::JSPaymentMethodChangeEvent::methodDetails const):
  • bindings/js/JSPopStateEventCustom.cpp: (WebCore::JSPopStateEvent::state const):
  • bindings/js/JSValueInWrappedObject.h: (WebCore::JSValueInWrappedObject::getValue const): (WebCore::JSValueInWrappedObject::operator bool const): (WebCore::cachedPropertyValue): (WebCore::JSValueInWrappedObject::operator JSC::JSValue const): Deleted.
  • dom/AbortSignal.cpp: (WebCore::AbortSignal::signalFollow): (WebCore::AbortSignal::throwIfAborted):
  • dom/ErrorEvent.cpp: (WebCore::ErrorEvent::error): (WebCore::ErrorEvent::trySerializeError):
  • dom/PopStateEvent.cpp: (WebCore::PopStateEvent::trySerializeState):
  • page/History.cpp: (WebCore::History::cachedState):

LayoutTests:

  • fast/dom/AbortSignal-reason-crash-2-expected.txt: Added.
  • fast/dom/AbortSignal-reason-crash-2.html: Added.

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

12:31 PM Changeset in webkit [289660] by Russell Epstein
  • 14 edits
    2 adds in branches/safari-613.1.17.0-branch

Cherry-pick r289462. rdar://problem/88580935

Don't return an empty value from AbortController.signal.reason and make it harder to return empty values from JSValueInWrappedObject
https://bugs.webkit.org/show_bug.cgi?id=236318
<rdar://88580935>

Reviewed by Mark Lam.

Source/WebCore:

This patch makes it so we might not accidentally return the empty value to
JavaScript code from JSValueInWrappedObject. Previously, JSValueInWrappedObject
had an "operator JSValue()" method. This patch removes that, adds a new
conversion method for converting between JSValueInWrappedObject and JSValue,
and makes JSValueInWrappedObject return undefined inside this method
when it used to return the empty value. This fixes a crash where we'd return
the empty value to JS JIT code, and crash dereferencing a nullptr. It's never
valid for a JS function call (or getter, etc) to return the empty value.

Test: fast/dom/AbortSignal-reason-crash-2.html

  • Modules/webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::getChannelData):
  • Modules/webaudio/AudioWorkletProcessor.cpp: (WebCore::toJSArray): (WebCore::toJSObject): (WebCore::AudioWorkletProcessor::buildJSArguments):
  • bindings/js/JSCustomEventCustom.cpp: (WebCore::JSCustomEvent::detail const):
  • bindings/js/JSDOMConvertAny.h: (WebCore::JSConverter<IDLAny>::convert):
  • bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data const):
  • bindings/js/JSPaymentMethodChangeEventCustom.cpp: (WebCore::JSPaymentMethodChangeEvent::methodDetails const):
  • bindings/js/JSPopStateEventCustom.cpp: (WebCore::JSPopStateEvent::state const):
  • bindings/js/JSValueInWrappedObject.h: (WebCore::JSValueInWrappedObject::getValue const): (WebCore::JSValueInWrappedObject::operator bool const): (WebCore::cachedPropertyValue): (WebCore::JSValueInWrappedObject::operator JSC::JSValue const): Deleted.
  • dom/AbortSignal.cpp: (WebCore::AbortSignal::signalFollow): (WebCore::AbortSignal::throwIfAborted):
  • dom/ErrorEvent.cpp: (WebCore::ErrorEvent::error): (WebCore::ErrorEvent::trySerializeError):
  • dom/PopStateEvent.cpp: (WebCore::PopStateEvent::trySerializeState):
  • page/History.cpp: (WebCore::History::cachedState):

LayoutTests:

  • fast/dom/AbortSignal-reason-crash-2-expected.txt: Added.
  • fast/dom/AbortSignal-reason-crash-2.html: Added.

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

12:25 PM Changeset in webkit [289659] by Jonathan Bedard
  • 6 edits in trunk/Tools

[git-webkit] Handle local commit on production branch
https://bugs.webkit.org/show_bug.cgi?id=235974
<rdar://problem/88346615>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Handle moving

branches to remote reference.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:

(PullRequest.main): Move local branch ref to remote reference.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:

Canonical link: https://commits.webkit.org/247151@main

12:19 PM Changeset in webkit [289658] by Chris Dumez
  • 5 edits in trunk/Source

Regression(r287684) Microsoft teams meeting URLs fail to open the app
https://bugs.webkit.org/show_bug.cgi?id=236516
<rdar://88678598>

Reviewed by Geoffrey Garen.

Add a quirk for Microsoft teams.

Source/WebCore:

  • page/Quirks.cpp:

(WebCore::Quirks::shouldAllowNavigationToCustomProtocolWithoutUserGesture):

  • page/Quirks.h:

Source/WebKit:

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):

12:10 PM Changeset in webkit [289657] by Russell Epstein
  • 3 edits in branches/safari-613.1.17.1-branch/Source/ThirdParty/ANGLE

Apply patch. rdar://problem/87136345

12:07 PM Changeset in webkit [289656] by Jonathan Bedard
  • 2 edits in trunk/Tools

Git commit message hook should allow source = 'template' case
https://bugs.webkit.org/show_bug.cgi?id=236504
<rdar://problem/88787806>

Reviewed by Tim Horton.

  • Scripts/hooks/prepare-commit-msg: 'template' should be handled like 'commit'
12:05 PM Changeset in webkit [289655] by Russell Epstein
  • 6 edits
    2 adds in branches/safari-613.1.17.1-branch

Cherry-pick r289526. rdar://problem/87061239

[:has() pseudo-class] Nullptr crash with non-function :has
https://bugs.webkit.org/show_bug.cgi?id=236431
rdar://87061239

Reviewed by Cameron McCormack.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/parsing/parse-has-expected.txt:
  • web-platform-tests/css/selectors/parsing/parse-has.html:

Source/WebCore:

Test: fast/selectors/malformed-has.html

  • css/parser/CSSSelectorParser.cpp: (WebCore::isOnlyPseudoClassFunction):

:has() is legal, plain :has is not.

LayoutTests:

  • fast/selectors/malformed-has-expected.txt: Added.
  • fast/selectors/malformed-has.html: Added.

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

12:04 PM Changeset in webkit [289654] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613.1.17.1-branch

Cherry-pick r289443. rdar://problem/88593617

REGRESSION (15.4): Angular virtual scrollers no longer work (because of contain:strict)
https://bugs.webkit.org/show_bug.cgi?id=236260

Patch by Rob Buis <rbuis@igalia.com> on 2022-02-08
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/contain-paint-049-expected.txt: Added.
  • web-platform-tests/css/css-contain/contain-paint-049.html: Added.

Source/WebCore:

Paint containment did not allow collecting scrollable overflow, breaking scrolling
of the container contents, this patch fixes that.

Test: imported/w3c/web-platform-tests/css/css-contain/contain-paint-049.html

  • rendering/RenderBox.cpp: (WebCore::RenderBox::addOverflowFromChild):

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

12:04 PM Changeset in webkit [289653] by Russell Epstein
  • 2 edits in branches/safari-613.1.17.1-branch/Source/WebKit

Cherry-pick r289380. rdar://problem/86904276

Reduce allocations and increase thread safety of constructedPath
https://bugs.webkit.org/show_bug.cgi?id=236286
<rdar://86904276>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-08
Reviewed by Chris Dumez.

  • UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):

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

12:04 PM Changeset in webkit [289652] by Russell Epstein
  • 6 edits in branches/safari-613.1.17.1-branch

Cherry-pick r289377. rdar://problem/88178304

Return 'none' for the computed style of mask when there are no mask images
https://bugs.webkit.org/show_bug.cgi?id=236265
<rdar://88178304>

Patch by Matt Woodrow <Matt Woodrow> on 2022-02-08
Reviewed by Dean Jackson.

Source/WebCore:

Rather than returning all the longhand properties, return 'none' if there are no
mask images. This no longer matches the behaviour of the 'background' property, but
better matches what other UAs do.

Ideally we'd return the smallest possible canonical representation of the non-initial
property values, but this is a much simpler change to fix a compat regression.

Test: fast/masking/parsing-mask.html
Updates expected results to match new behavior.

  • css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::getLayerCount): (WebCore::ComputedStyleExtractor::getFillLayerPropertyShorthandValue): (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue): (WebCore::ComputedStyleExtractor::getMaskShorthandValue):
  • css/CSSComputedStyleDeclaration.h:

LayoutTests:

  • fast/masking/parsing-mask-expected.txt:
  • fast/masking/parsing-mask.html:

Updated expected results to expect 'none' for all cases where there isn't an actual mask
image.

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

11:58 AM Changeset in webkit [289651] by Russell Epstein
  • 3 edits in branches/safari-613.1.17.0-branch/Source/ThirdParty/ANGLE

Apply patch. rdar://problem/87136345

11:58 AM Changeset in webkit [289650] by Russell Epstein
  • 6 edits
    2 adds in branches/safari-613.1.17.0-branch

Cherry-pick r289526. rdar://problem/87061239

[:has() pseudo-class] Nullptr crash with non-function :has
https://bugs.webkit.org/show_bug.cgi?id=236431
rdar://87061239

Reviewed by Cameron McCormack.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/parsing/parse-has-expected.txt:
  • web-platform-tests/css/selectors/parsing/parse-has.html:

Source/WebCore:

Test: fast/selectors/malformed-has.html

  • css/parser/CSSSelectorParser.cpp: (WebCore::isOnlyPseudoClassFunction):

:has() is legal, plain :has is not.

LayoutTests:

  • fast/selectors/malformed-has-expected.txt: Added.
  • fast/selectors/malformed-has.html: Added.

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

11:58 AM Changeset in webkit [289649] by Russell Epstein
  • 4 edits in branches/safari-613.1.17.0-branch

Cherry-pick r289502. rdar://problem/88528286

WKWebView: WKURLSchemeHandler “request to the end of the resource” produces an invalid header
https://bugs.webkit.org/show_bug.cgi?id=236401
rdar://88528286

Reviewed by Brent Fulgham.

Source/WebCore:

https://webkit.org/b/203302 added support for Range requests to AVAssetResourceLoadingDataRequest,
but it incorrectly used '*' instead of for "last-byte-pos:" for a request to the end of the resource.

API test URLSchemeHandler.Ranges was updated.

  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::WebCoreAVFResourceLoader::startLoading):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:

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

11:58 AM Changeset in webkit [289648] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613.1.17.0-branch

Cherry-pick r289443. rdar://problem/88593617

REGRESSION (15.4): Angular virtual scrollers no longer work (because of contain:strict)
https://bugs.webkit.org/show_bug.cgi?id=236260

Patch by Rob Buis <rbuis@igalia.com> on 2022-02-08
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/contain-paint-049-expected.txt: Added.
  • web-platform-tests/css/css-contain/contain-paint-049.html: Added.

Source/WebCore:

Paint containment did not allow collecting scrollable overflow, breaking scrolling
of the container contents, this patch fixes that.

Test: imported/w3c/web-platform-tests/css/css-contain/contain-paint-049.html

  • rendering/RenderBox.cpp: (WebCore::RenderBox::addOverflowFromChild):

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

11:58 AM Changeset in webkit [289647] by Russell Epstein
  • 2 edits in branches/safari-613.1.17.0-branch/Source/WebKit

Cherry-pick r289380. rdar://problem/86904276

Reduce allocations and increase thread safety of constructedPath
https://bugs.webkit.org/show_bug.cgi?id=236286
<rdar://86904276>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-08
Reviewed by Chris Dumez.

  • UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):

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

11:58 AM Changeset in webkit [289646] by Russell Epstein
  • 6 edits in branches/safari-613.1.17.0-branch

Cherry-pick r289377. rdar://problem/88178304

Return 'none' for the computed style of mask when there are no mask images
https://bugs.webkit.org/show_bug.cgi?id=236265
<rdar://88178304>

Patch by Matt Woodrow <Matt Woodrow> on 2022-02-08
Reviewed by Dean Jackson.

Source/WebCore:

Rather than returning all the longhand properties, return 'none' if there are no
mask images. This no longer matches the behaviour of the 'background' property, but
better matches what other UAs do.

Ideally we'd return the smallest possible canonical representation of the non-initial
property values, but this is a much simpler change to fix a compat regression.

Test: fast/masking/parsing-mask.html
Updates expected results to match new behavior.

  • css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::getLayerCount): (WebCore::ComputedStyleExtractor::getFillLayerPropertyShorthandValue): (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue): (WebCore::ComputedStyleExtractor::getMaskShorthandValue):
  • css/CSSComputedStyleDeclaration.h:

LayoutTests:

  • fast/masking/parsing-mask-expected.txt:
  • fast/masking/parsing-mask.html:

Updated expected results to expect 'none' for all cases where there isn't an actual mask
image.

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

11:57 AM Changeset in webkit [289645] by Russell Epstein
  • 9 edits in branches/safari-613.1.17.1-branch/Source

Versioning.

WebKit-7613.1.17.1.1

11:55 AM Changeset in webkit [289644] by Elliott Williams
  • 3 edits
    1 delete in trunk/Source/WTF

Fix headers in install builds and add untracked headers
https://bugs.webkit.org/show_bug.cgi?id=235744

Reviewed by Alexey Proskuryakov.
Relands native Xcode build phases for "Copy WTF Headers", again.

Adds a slash prefix, so that PRIVATE_HEADERS_FOLDER_PATH is always an absolute path.
Otherwise, when WTF_INSTALL_PATH_PREFIX is not set, it's relative and incorrectoly copied
into the INSTALL_PATH (/usr/local/lib).

Uses separate path variables for Copy Files phases that create header subdirectories. Unlike
the native "Headers" phase, copying to "/usr/local/include" is not automatically relative to
the SYMROOT or DSTROOT, respective of build action type.

Adds SignedPtr.h to WTF's Headers phase. It was added recently and missed integration in
r289256.

Sets INSTALLHDRS_COPY_PHASE so that nested header directories are copied during installhdrs.

  • Configurations/WTF.xcconfig:
  • WTF.xcodeproj/project.pbxproj:
11:54 AM Changeset in webkit [289643] by Jonathan Bedard
  • 4 edits in trunk/Tools

[git-webkit] Reset target branch when landing fails
https://bugs.webkit.org/show_bug.cgi?id=236110
<rdar://problem/88463164>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py:

(Land.revert_branch): Move branch to specified remote's representation of the branch.
(Land.main): If we fail to land a change after moving a branch's local ref to include that
change, we should return that local ref to what the branch's remote reports.

Canonical link: https://commits.webkit.org/247147@main

11:47 AM Changeset in webkit [289642] by Simon Fraser
  • 9 edits
    2 adds in trunk/Source/WebKit

Introduce a RemoteLayerBackingStoreCollection subclass for GPU Process-based rendering
https://bugs.webkit.org/show_bug.cgi?id=236468

Reviewed by Tim Horton.

Add RemoteLayerWithRemoteRenderingBackingStoreCollection, a subclass of RemoteLayerBackingStoreCollection
which is instantiated by RemoteLayerTreeContext when DOM rendering in GPU process is enabled.

Delegate buffer allocation to this now polymorphic class; RemoteLayerBackingStore no longer
consults shouldUseRemoteRenderingFor().

RemoteLayerWithRemoteRenderingBackingStoreCollection needs a back pointer to RemoteLayerTreeContext
to get to the RemoteRenderingBackendProxy.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::backingStoreCollection const):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):

  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:

(WebKit::RemoteLayerBackingStoreCollection::layerTreeContext const):

  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:

(WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
(WebKit::RemoteLayerBackingStoreCollection::allocateBufferForBackingStore):

  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.h: Added.
  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.mm: Added.

(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::RemoteLayerWithRemoteRenderingBackingStoreCollection):
(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::remoteRenderingBackendProxy):
(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::allocateBufferForBackingStore):

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h:

(WebKit::RemoteLayerTreeContext::backingStoreCollection):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::RemoteLayerTreeContext):

11:45 AM Changeset in webkit [289641] by Russell Epstein
  • 9 edits in branches/safari-613.1.17.0-branch/Source

Versioning.

WebKit-7613.1.17.0.1

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

Keep promise in scope when calling DeferredPromise::reject
https://bugs.webkit.org/show_bug.cgi?id=236454

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-11
Reviewed by Youenn Fablet.

Keep promise in scope when calling DeferredPromise::reject, as createDOMException
could go through a path that invokes GC on its owner and the promise.

  • bindings/js/JSDOMPromiseDeferred.cpp:

(WebCore::DeferredPromise::reject):

11:34 AM Changeset in webkit [289639] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

The GPU process should not check in with Launch Services
https://bugs.webkit.org/show_bug.cgi?id=236457

Reviewed by Geoffrey Garen.

Since the GPU process is not an application in the normal sense, there is no need to call _LSApplicationCheckIn.
The function _CSCheckFixDisable should still be called.

  • GPUProcess/mac/GPUProcessMac.mm:

(WebKit::GPUProcess::initializeProcess):

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

[EWS] Enable WPE and WinCairo queues for PRs
https://bugs.webkit.org/show_bug.cgi?id=236517
<rdar://problem/88823117>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/config.json:

Canonical link: https://commits.webkit.org/247143@main

10:24 AM Changeset in webkit [289637] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix: revert r289616

  • WebCore.xcodeproj/project.pbxproj:
10:12 AM Changeset in webkit [289636] by Russell Epstein
  • 1 copy in tags/Safari-614.1.2.1

Tag Safari-614.1.2.1.

10:10 AM Changeset in webkit [289635] by Russell Epstein
  • 1 copy in branches/safari-613.1.17.3-branch

New branch.

10:10 AM Changeset in webkit [289634] by Russell Epstein
  • 1 copy in branches/safari-613.1.17.2-branch

New branch.

10:10 AM Changeset in webkit [289633] by Russell Epstein
  • 1 copy in branches/safari-613.1.17.1-branch

New branch.

10:10 AM Changeset in webkit [289632] by Russell Epstein
  • 1 copy in branches/safari-613.1.17.0-branch

New branch.

9:55 AM Changeset in webkit [289631] by jonlee@apple.com
  • 5 edits in trunk/LayoutTests

Unreviewed gardening.

Update fuzzy data based on EWS results to support b231828.
LayoutTests/imported/w3c:

  • web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-1.html:

LayoutTests:

  • css3/color-filters/color-filter-text-decoration-shadow.html:
  • fast/text/system-font-fallback.html:
9:53 AM Changeset in webkit [289630] by ntim@apple.com
  • 3 edits in trunk/Source/WebCore

Unreviewed followup: address Youenn's feedback for PDFDocument.

  • html/PDFDocument.cpp:

(WebCore::PDFDocumentEventListener::handleEvent):
(WebCore::PDFDocument::createDocumentStructure):
(WebCore::PDFDocument::updateDuringParsing):
(WebCore::PDFDocument::finishedParsing):
(WebCore::PDFDocument::injectContentScript):

  • html/PDFDocument.h:
9:47 AM Changeset in webkit [289629] by jonlee@apple.com
  • 5 edits in trunk/LayoutTests

Unreviewed gardening.

Update fuzzy data based on EWS results to support b231828.

  • css3/blending/background-blend-mode-body-transparent-color-and-image.html:
  • css3/calc/border-radius.html:
  • svg/gradients/spreadMethodDiagonal3.svg:
  • svg/gradients/spreadMethodDiagonal4.svg:
9:40 AM Changeset in webkit [289628] by youenn@apple.com
  • 75 edits
    3 copies
    2 adds in trunk

Support remote video frames in WebRTC video pipeline
https://bugs.webkit.org/show_bug.cgi?id=236356

Reviewed by Kimmo Kinnunen.

Source/ThirdParty/libwebrtc:

Introduce a way for ObjCFrameBuffer to not directly own a CVPixelBufferRef but a pointer
that can be used to get a CVPixelBufferRef. This is used to allow remote frames to be sent over to libwebrtc.

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:
  • Source/webrtc/sdk/WebKit/WebKitDecoder.h:
  • Source/webrtc/sdk/WebKit/WebKitDecoder.mm:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.h:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm:
  • Source/webrtc/sdk/objc/native/src/objc_frame_buffer.h:
  • Source/webrtc/sdk/objc/native/src/objc_frame_buffer.mm:

Source/WebCore:

Allow to receive/send remote frames as webrtc VideoFrame buffers.
We are not yet optimizing remove video frame sending as this requires moving remote video frame to WebCore.
This will be done as a follow-up.

Covered by existing tests and updated tests to enable the experimental flag.

  • platform/MediaSample.h:
  • platform/VideoFrame.cpp:
  • platform/VideoFrame.h:
  • platform/graphics/RemoteVideoSample.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
  • platform/mediastream/RealtimeVideoSource.cpp:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:

Source/WebKit:

Allow receiving remote samples from camera or HW decoders.
In that case, we create remote video frames and allow piping them to our existing pipeline.
We update MediaRecorder and LibWebRTC HW encoders to deal with this.
Since we have a code path that requires getting access to the raw pixels, we introduce RemoteVideoFrameObjectHeapProxy
to allow getting that data through shared memory asynchronously.
RemoteVideoFrameProxy will then use a semaphore to block on the async IPC result.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:
  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.cpp:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.h:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.messages.in:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:
  • GPUProcess/webrtc/RemoteMediaRecorder.h:
  • GPUProcess/webrtc/RemoteMediaRecorder.messages.in:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:
  • Shared/ThreadSafeObjectHeap.h:
  • Sources.txt:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:
  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
  • WebProcess/GPU/media/RemoteVideoFrameIdentifier.h:
  • WebProcess/GPU/media/RemoteVideoFrameProxy.cpp:
  • WebProcess/GPU/media/RemoteVideoFrameProxy.h:
  • WebProcess/GPU/media/RemoteVideoFrameProxyIdentifier.h: Added.
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.messages.in:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxy.h: Added.
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxyProcessor.cpp: Added.
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxyProcessor.h: Added.
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxyProcessor.messages.in: Added.
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:
  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:
  • WebProcess/cocoa/RemoteCaptureSampleManager.h:
  • WebProcess/cocoa/RemoteCaptureSampleManager.messages.in:
  • WebProcess/cocoa/RemoteRealtimeMediaSourceProxy.cpp:
  • WebProcess/cocoa/RemoteRealtimeMediaSourceProxy.h:
  • WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:
  • WebProcess/cocoa/UserMediaCaptureManager.h:

Source/WTF:

Introduce an experimental flag to make use of remote frames in WebRTC code paths.

  • Scripts/Preferences/WebPreferencesInternal.yaml:

Tools:

Allow switching on the new remote video frame flag.

  • WebKitTestRunner/TestOptions.cpp:

LayoutTests:

Enabling remote video frames for below tests.

  • webrtc/video-mute-vp8.html:
  • webrtc/video-mute.html:
  • webrtc/video-rotation.html:
  • webrtc/video.html:
9:30 AM Changeset in webkit [289627] by ntim@apple.com
  • 5 edits
    1 copy
    5 adds in trunk/Source/WebCore

Inject custom styles into PDF.js to make it look like PDFKit
https://bugs.webkit.org/show_bug.cgi?id=236510

Reviewed by Tim Horton.

This introduces a pdfjs-extras directory that is copied in the pdfjs/extras resource subdirectory at build-time.

In that directory contains a content-script.js file that is executed when the PDFJS iframe loads. Currently, that
content script only injects the PDFKit styling, but it may be used for other types of interaction in the future
(e.g. loading a blob, hooking with find-in-page messages, etc.).

In PDFDocument, we add m_iframe, a ref to the PDFDocument iframe, that we can re-use when the iframe loads,
to inject the content script.

PDFDocumentEventListener handles the iframe load event listener.

m_viewerRendered which was set once the <iframe> was added to the document, is now no longer needed, since we can
check for m_iframe directly.

(const.PDFJSContentScript.injectStyle):
(const.PDFJSContentScript.init):

(body):
(@keyframes fade-out):
(to):
(#loadingBar):
(#toolbarContainer):
(#toolbarViewer):
(#toolbarViewer:hover):
(#toolbarViewerMiddle,):
(#toolbarViewerLeft,):
(#toolbarViewer .toolbarButton):
(#toolbarViewer .toolbarButton:active):
(#toolbarViewer .toolbarButton::before):
(#zoomOut):
(#zoomIn):
(#zoomOut + .splitToolbarButtonSeparator):
(#download):
(#viewerContainer):
(#findbar):
(#findbar:not(.hidden) ~ #viewerContainer):
(#findbar::before,):
(#findbarOptionsTwoContainer):
(#findResultsCount,):
(#findbar .splitToolbarButton > .toolbarButton::before):
(#findInput:focus):
(#findInput[data-status="notFound"]):

  • WebCore.xcodeproj/project.pbxproj:
  • dom/EventListener.h:
  • html/PDFDocument.cpp:

(WebCore::PDFDocumentEventListener::handleEvent):
(WebCore::PDFDocumentEventListener::operator== const):
(WebCore::PDFDocument::PDFDocument):
(WebCore::PDFDocument::createDocumentStructure):
(WebCore::PDFDocument::updateDuringParsing):
(WebCore::PDFDocument::finishedParsing):
(WebCore::PDFDocument::injectContentScript):
(WebCore::m_viewerRendered): Deleted.

  • html/PDFDocument.h:
9:24 AM Changeset in webkit [289626] by Russell Epstein
  • 9 edits in branches/safari-614.1.2-branch/Source

Versioning.

WebKit-7614.1.2.1

9:23 AM Changeset in webkit [289625] by Jonathan Bedard
  • 3 edits in trunk/Tools

[EWS] Support PRs in UploadTestResults and ExtractTestResults
https://bugs.webkit.org/show_bug.cgi?id=236446
<rdar://problem/88756592>

Reviewed by Aakash Jain.

  • CISupport/ews-build/steps.py:

(ConfigureBuild.add_pr_details): Shorten hash to 8 characters.
(UploadTestResults.init): Use change_id instead of patch_id.
(ExtractTestResults.init): Ditto.

  • CISupport/ews-build/steps_unittest.py:

Canonical link: https://commits.webkit.org/247136@main

9:11 AM Changeset in webkit [289624] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit

Unreviewed, non-unified build fixes in WKPaymentAuthorizationDelegate

Include several missing headers.

  • Platform/cocoa/WKPaymentAuthorizationDelegate.h:
  • Platform/cocoa/WKPaymentAuthorizationDelegate.mm:
9:01 AM Changeset in webkit [289623] by Wenson Hsieh
  • 17 edits in trunk/Source

[iOS] Add support for a "markup image" item in the callout bar when selecting a single image
https://bugs.webkit.org/show_bug.cgi?id=236415
rdar://88714333

Reviewed by Aditya Keerthi.

Source/WebCore:

Export a couple of functions; see WebKit/ChangeLog for more details.

  • platform/graphics/Image.h:
  • platform/graphics/cg/UTIRegistry.h:

Source/WebKit:

This patch introduces support for a new "Markup Image" callout menu item, which is only shown when the user has
selected exactly one image. If the image is suitable for "Markup Image" (that is, the relevant VisionKit API
returns a non-null image), then we show a new item in the callout bar which, when activated, replaces the
current selection with the image returned by the aforementioned VisionKit API.

See below for more details.

  • Platform/cocoa/TextRecognitionUtilities.h:
  • Platform/cocoa/TextRecognitionUtilities.mm:

(WebKit::isImageAnalysisMarkupSystemFeatureEnabled):

Add a new helper method to return whether or not the corresponding system feature flag is enabled.

  • Shared/EditorState.cpp:

(WebKit::EditorState::PostLayoutData::encode const):
(WebKit::EditorState::PostLayoutData::decode):

  • Shared/EditorState.h:

Add an optional ElementContext that's populated only if the user's selection spans a single HTMLImageElement.

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView didMoveToWindow]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestImageBitmap):

Add a new async IPC message that allows the UI process to grab a ShareableBitmap handle (along with the MIME
type of the source image) given an ElementContext that identifies an image element.

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentViewInteraction.h:

Cache the last result from requesting "Image Markup" data from VisionKit in _imageAnalysisMarkupResults, and
use this information when invoking the new selector, -performImageAnalysisMarkup:.

  • UIProcess/ios/WKContentViewInteraction.mm:

(WebKit::transcode):

Add a helper method that takes a CGImageRef, transcodes it to the given uniform type identifier, and finally
returns a blob of image data. Used by the two new call sites for Image Markup below, as well as an existing call
site for Visual Look Up in -provideDataForItem:

(-[WKContentView targetForAction:withSender:]):

Add a check for the new Image Markup action selector.

(-[WKContentView requestRectsToEvadeForSelectionCommandsWithCompletionHandler:]):

Use this existing UIKit delegate hook to defer callout bar presentation only in the case where a single image
element is selected, such that we only show the callout bar in this scenario once VisionKit has determined
whether or not the "Image Markup" action is suitable for the data of the selected image.

The initial purpose of this delegate hook was to allow WebKit to defer callout bar presentation for a short,
hard-coded delay to wait for the web page to layout out or add clickable items that might underlap the callout
bar; as such, we still perform this logic with a hard-coded delay of 250 ms (including whatever time was taken
during image analysis).

(-[WKContentView updateImageAnalysisMarkupMenuItems:]):

Append the new menu item only if the system feature flag is enabled, and we've selected an editable image. Note
that this intentionally does not consult _imageAnalysisMarkupResults to ensure that the state of additional
menu items in the shared menu controller is consistent between Markup Image and Quick Note, and updated in the
same lifecycle as editor state updates.

(-[WKContentView canPerformImageAnalysisMarkup]):

This is consulted when we're actually about to show the callout bar action for "Image Markup" (importantly,
after callout bar presentation deferral), and depends on the state of _imageAnalysisMarkupResults.

(-[WKContentView performImageAnalysisMarkup:]):

Add logic to handle the new action by calling into WebPageProxy to (basically) paste the modified image data
after transcoding it to match the image element's original source type. After #236406, this codepath is now
available on all Cocoa platforms (as opposed to macOS-only).

(-[WKContentView doAfterComputingImageAnalysisResultsForMarkup:]):

Use the new requestImageBitmap IPC message to grab a bitmap for the currently selected image, call out to
VisionKit to perform image analysis, and then cache the resulting image. After all of this is done, we proceed
with showing the callout bar.

In a followup, we should enforce some (reasonable) upper bound on the amount of time by which the callout bar
can be delayed.

(-[WKContentView _selectionChanged]):
(-[WKContentView setUpAdditionalMenuControllerActions]):

Refactor existing logic for supplying additional callout bar menu items, such that we update items as needed for
both Quick Note as well as Image Markup. Note that we need to preserve any existing menu items in the shared
UIMenuController, since the WebKit client (e.g. Mail) may have already supplied custom menu items. This
currently doees not affect Quick Note since the only internal client that enables Quick Note is Safari, which
does not attempt to add any of its own items; however, "Markup Image" needs to be available in Mail on iOS as
well, which does use custom menu items.

(findMenuItemWithAction):
(-[WKContentView updateAppHighlightMenuItems:]):

Make this adjust the given mutable array of UIMenuItems, which are then combined with any markup menu items
when setting custom items on the shared menu controller.

(-[WKContentView provideDataForItem:]):

Adjust this to use the new transcode helper function, declared above.

(-[WKContentView _setUpImageAnalysis]):
(-[WKContentView _tearDownImageAnalysis]):
(-[WKContentView setUpAppHighlightMenusIfNeeded]): Deleted.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::requestImageBitmap):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPlatformEditorState const):

Compute and populate the new selectedEditableImage element context; to achieve this, we use TextIterator to
scan for an image element, and bail immediately if we either find anything that is not an image, or find more
than one image.

8:08 AM Changeset in webkit [289622] by commit-queue@webkit.org
  • 45 edits
    3 copies
    7 adds in trunk

Introduce a RemoteMediaSampleProxy to represent captured video frames used in Media Streams and present in GPUP
https://bugs.webkit.org/show_bug.cgi?id=236099

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-11
Reviewed by Youenn Fablet.

Source/WebCore:

Add VideoFrame : public MediaStream, base class for Media Stream video frames.
Currently inherits from MediaSample, but later will remove the MediaSample.

The WebCore::VideoFrame is intended to be used in various entry-points that
currently are currently typed as:

void videoSampleAvailable(MediaSample&, VideoSampleMetadata, ...).

The new class WebKit::RemoteVideoFrameProxy : public VideoFrame can be passed to these APIs.
The API entrypoints are not yet changed in order to partially roll the changes in.
Later on, the entrypoints will be similar to:

void videoSampleAvailable(VideoFrame&, VideoSampleMetadata, ...).

Removes MediaSample::setTrackID as that is not used.
Changes MediaSample::platformSample() to const, so that it can be called from
const context.

No new tests, refactor.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/MediaSample.h:
  • platform/VideoFrame.cpp: Added.

(WebCore::VideoFrame::decodeTime const):
(WebCore::VideoFrame::duration const):
(WebCore::VideoFrame::trackID const):
(WebCore::VideoFrame::sizeInBytes const):
(WebCore::VideoFrame::presentationSize const):
(WebCore::VideoFrame::offsetTimestampsBy):
(WebCore::VideoFrame::setTimestamps):
(WebCore::VideoFrame::isDivisable const):
(WebCore::VideoFrame::divide):
(WebCore::VideoFrame::createNonDisplayingCopy const):
(WebCore::VideoFrame::flags const):
(WebCore::VideoFrame::byteRange const):
(WebCore::VideoFrame::dump const):

  • platform/VideoFrame.h: Added.
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:

(WebCore::LocalSampleBufferDisplayLayer::enqueueSampleBuffer):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateCurrentFrameImage):

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:

(isType):

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

(WebCore::MediaSampleAVFObjC::platformSample const):

  • platform/graphics/gstreamer/MediaSampleGStreamer.cpp:

(WebCore::MediaSampleGStreamer::platformSample const):

  • platform/graphics/gstreamer/MediaSampleGStreamer.h:
  • platform/mock/mediasource/MockSourceBufferPrivate.cpp:

(WebCore::MockMediaSample::platformSample const):

Source/WebKit:

Changes after revert:

  • For now, create the RemoteVideoFrame in GPUP using synchronous message. This way RemoteVideoFrameProxy does not need to receive messages. It cannot easily do that, as it is referenced in multiple threads and thus we cannot remove the message destination for the instance from GPUProcess instance, as that operation is main thread only. The type cannot be DestructionThread::Main, as we do not (yet) control the base class (MediaSample).

WebContent process:
Add WebKit::RemoteVideoFrameProxy, WebContent process side proxy object that
WebCore::MediaPlayerPrivateMediaStreamAVFObjC can use.

RemoteVideoFrameProxy can be sent to the GPUP and the the SampleBufferDisplayLayer. So
the captured content shows in compositing through video element.

At the moment MediaPlayerPrivateMediaStreamAVFObjC cannot paint RemoteVideoFrameProxy to the
document CSS painted content, Context2D or WebGL canvas.

GPUP:
RemoteVideoFrameObjectHeap is a mapping
RemoteVideoFrameIdentifier -> MediaSample. Currently all objects
map to normal MediaSampleAVFObjC.

Add an example implementation where a remote MediaSample is returned by IPC:
RemoteGraphicsContextGL::paintCompositedResultsToMediaSample().

The GPUP object pointed by RemoteVideoFrameIdentifier is:

  • created in RemoteGraphicsContextGL::paintCompositedResultsToMediaSample() in RemoteGraphicsContextGL thread
  • consumed in RemoteSampleBufferDisplayLayer::enqueueSample in RemoteSampleBufferDisplayLayerManager thread
  • released in RemoteVideoFrameObjectHeap::releaseVideoFrame in GPUP main thread

All of these messages are asynchronous and can arrive to their destination in any order.
For example, request to release the video frame can happen before the message to create the video frame has been
received.

To solve the ordering issue, introduce readers-writers reference counting method via following classes:

  • ObjectIdentifierReadReference
  • ObjectIdentifierWriteReference
  • ObjectIdentifierReferenceTracker

ObjectIdentifier identifies the object.
ObjectIdentifierWriteReference identifies a new version of the content pointed by the identifier.
Pseudocode examples:

WriteReference { identifier = 1, pendingReads = 0, version = 0 } means:

"End the life-time of identifier 1, version 0. Create version = 1"
This is how initial object is assigned to the reference.

WriteReference { identifier = 1, pendingReads = 77, version = 32 } means

"End the life-time of identifier 1, version 32 when all 77 reads have completed. Create version = 33"

ObjectIdentifierReadReference declares a read dependency to a specific version of the content pointed by the identifier.
Pseudocode examples:

ReadReference { identifier = 1, version = 32 } means
"Complete one read of identifier 1, version 32".

Creates, updates and destructions are WriteReferences.
Reads are ReadReferences.

The ObjectIdentifierReferenceTracker creates write and read references in the Proxy -using process (WebContent process).

The added ThreadSafeObjectHeap resolves the read and write references in the real object process (GPUP in this case).
Reads and writes are blocking the requesting thread appropriately:

  • Read of unknown version of the identifier blocks until the write creates the version
  • Write of new version of the identifier blocks until the reads have retired, or creates parallel, new version of the content in case of copy-on-write schemes.

In this commit objects pointed by RemoteVideoFrameIdentifier are immutable until destroyed, so there is no update or
copy-on-write scheme here.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess):
(WebKit::GPUConnectionToWebProcess::didClose):
(WebKit::GPUConnectionToWebProcess::videoFrameObjectHeap const):

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

(WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL):
(WebKit::RemoteGraphicsContextGL::paintCompositedResultsToMediaSample):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.cpp: Added.

(WebKit::RemoteVideoFrameObjectHeap::create):
(WebKit::RemoteVideoFrameObjectHeap::RemoteVideoFrameObjectHeap):
(WebKit::RemoteVideoFrameObjectHeap::~RemoteVideoFrameObjectHeap):
(WebKit::RemoteVideoFrameObjectHeap::stopListeningForIPC):
(WebKit::RemoteVideoFrameObjectHeap::releaseVideoFrame):

  • GPUProcess/media/RemoteVideoFrameObjectHeap.h: Copied from Source/WebKit/Shared/IPCTester.h.
  • GPUProcess/media/RemoteVideoFrameObjectHeap.messages.in: Copied from Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in.
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:

(WebKit::RemoteSampleBufferDisplayLayer::create):
(WebKit::RemoteSampleBufferDisplayLayer::RemoteSampleBufferDisplayLayer):
(WebKit::RemoteSampleBufferDisplayLayer::enqueueSample):
(WebKit::RemoteSampleBufferDisplayLayer::enqueueSampleCV):

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp:

(WebKit::RemoteSampleBufferDisplayLayerManager::createLayer):

  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):
(headers_for_type):

  • Shared/IPCTester.cpp:

(WebKit::IPCTester::startMessageTesting):
(WebKit::isTestingIPC):

  • Shared/IPCTester.h:

(WebKit::isTestingIPC):

  • Shared/ObjectIdentifierReferenceTracker.h: Added.

(WebKit::ObjectIdentifierReference::ObjectIdentifierReference):
(WebKit::ObjectIdentifierReference::identifier const):
(WebKit::ObjectIdentifierReference::version const):
(WebKit::ObjectIdentifierReference::operator== const):
(WebKit::ObjectIdentifierReference::isHashTableDeletedValue const):
(WebKit::ObjectIdentifierReference::encode const):
(WebKit::ObjectIdentifierReference::decode):
(WebKit::ObjectIdentifierReadReference::ObjectIdentifierReadReference):
(WebKit::ObjectIdentifierReadReference::identifier const):
(WebKit::ObjectIdentifierReadReference::version const):
(WebKit::ObjectIdentifierReadReference::reference const):
(WebKit::ObjectIdentifierReadReference::encode const):
(WebKit::ObjectIdentifierReadReference::decode):
(WebKit::ObjectIdentifierWriteReference::generateForAdd):
(WebKit::ObjectIdentifierWriteReference::ObjectIdentifierWriteReference):
(WebKit::ObjectIdentifierWriteReference::identifier const):
(WebKit::ObjectIdentifierWriteReference::version const):
(WebKit::ObjectIdentifierWriteReference::pendingReads const):
(WebKit::ObjectIdentifierWriteReference::reference const):
(WebKit::ObjectIdentifierWriteReference::retiredReference const):
(WebKit::ObjectIdentifierWriteReference::encode const):
(WebKit::ObjectIdentifierWriteReference::decode):
(WebKit::ObjectIdentifierReferenceTracker::ObjectIdentifierReferenceTracker):
(WebKit::ObjectIdentifierReferenceTracker::read const):
(WebKit::ObjectIdentifierReferenceTracker::write const):
(WebKit::ObjectIdentifierReferenceTracker::identifier const):
(WebKit::add):
(WebKit::operator<<):
(WTF::DefaultHash<WebKit::ObjectIdentifierReference<T>>::hash):
(WTF::DefaultHash<WebKit::ObjectIdentifierReference<T>>::equal):

  • Shared/ThreadSafeObjectHeap.h: Added.

(WebKit::ThreadSafeObjectHeap::ReferenceState::ReferenceState):
(WebKit::HeldType>::retire):
(WebKit::HeldType>::retireRemove):
(WebKit::HeldType>::clear):

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.cpp:

(WebKit::MediaSampleByteRange::platformSample const):

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.h:
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::dispatchMessage):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::paintCompositedResultsToMediaSample):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm:
  • WebProcess/GPU/media/RemoteVideoFrameIdentifier.h: Copied from Source/WebKit/Shared/IPCTester.h.
  • WebProcess/GPU/media/RemoteVideoFrameProxy.cpp: Added.

(WebKit::RemoteVideoFrameProxy::properties):
(WebKit::RemoteVideoFrameProxy::create):
(WebKit::RemoteVideoFrameProxy::releaseUnused):
(WebKit::RemoteVideoFrameProxy::RemoteVideoFrameProxy):
(WebKit::RemoteVideoFrameProxy::~RemoteVideoFrameProxy):
(WebKit::RemoteVideoFrameProxy::identifier const):
(WebKit::RemoteVideoFrameProxy::write const):
(WebKit::RemoteVideoFrameProxy::read const):
(WebKit::RemoteVideoFrameProxy::presentationTime const):
(WebKit::RemoteVideoFrameProxy::platformSample const):
(WebKit::RemoteVideoFrameProxy::videoRotation const):
(WebKit::RemoteVideoFrameProxy::videoMirrored const):
(WebKit::RemoteVideoFrameProxy::videoPixelFormat const):
(WebKit::RemoteVideoFrameProxy::videoFrame const):
(WebKit::RemoteVideoFrameProxy::release):

  • WebProcess/GPU/media/RemoteVideoFrameProxy.h: Added.

(WebKit::RemoteVideoFrameProxy::Properties::encode const):
(WebKit::RemoteVideoFrameProxy::Properties::decode):
(isType):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:

(WebKit::SampleBufferDisplayLayer::SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::~SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::enqueueSample):
(WebKit::SampleBufferDisplayLayer::gpuProcessConnectionDidClose):
(WebKit::SampleBufferDisplayLayer::disconnectGPUProcessConnectionIfNeeded):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:

Tools:

  • Scripts/generate-gpup-webgl:
  • TestWebKitAPI/Tests/WebCore/SampleMap.cpp:

LayoutTests:

Captured WebGL to another context2d or WebGL not implemented yet, mark few tests as timing out.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
7:53 AM Changeset in webkit [289621] by Chris Dumez
  • 2 edits in trunk/Source/WebKitLegacy/mac

Unreviewed, fix build with the latest iOS SDK.

  • Plugins/WebBasePluginPackage.mm:

(-[WebBasePluginPackage isNativeLibraryData:]):

7:09 AM WebKitGTK/2.34.x edited by Michael Catanzaro
(diff)
6:53 AM Changeset in webkit [289620] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[GTK] WebKit browser scrollbars not always correctly displayed if overlay scrollbars are disabled
https://bugs.webkit.org/show_bug.cgi?id=234874

Patch by Michael Catanzaro <Michael Catanzaro> on 2022-02-11
Reviewed by Carlos Garcia Campos.

If overlay scrollbars are disabled, and there is not enough content for the page to be
scrollable, and scrollbars are forced using overflow:scroll, then we currently fail to
paint the scrollbars properly. At minimum, we need to paint the scrollbar background, which
is what the macOS port does. Do so.

In the future, we might want to additionally paint the rest of the scrollbars, similar to
the GTK_POLICY_ALWAYS scrollbar policy type, but this would require more work.

  • platform/adwaita/ScrollbarThemeAdwaita.cpp:

(WebCore::ScrollbarThemeAdwaita::paint):

  • platform/gtk/ScrollbarThemeGtk.cpp:

(WebCore::ScrollbarThemeGtk::paint):

5:30 AM Changeset in webkit [289619] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[SOUP] Fix memory leak in WebKitDirectoryInputStream
https://bugs.webkit.org/show_bug.cgi?id=236498

Reviewed by Adrian Perez de Castro.

  • NetworkProcess/soup/WebKitDirectoryInputStream.cpp:

(webkitDirectoryInputStreamRead): Use adoptGRef() for g_bytes_new_from_bytes().

5:02 AM Changeset in webkit [289618] by commit-queue@webkit.org
  • 2 edits in trunk/Tools/buildstream

[Flatpak SDK] Enable GStreamer webrtcdsp support
https://bugs.webkit.org/show_bug.cgi?id=236175

Patch by Philippe Normand <pnormand@igalia.com> on 2022-02-11
Reviewed by Martin Robinson.

  • elements/sdk/gst-plugins-bad.bst: Enable webrtcdsp, needed for VAD handling.
4:47 AM Changeset in webkit [289617] by Antti Koivisto
  • 5 edits in trunk

[CSS Container Queries] Implement container name matching
https://bugs.webkit.org/show_bug.cgi?id=236495

Reviewed by Tim Nguyen.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/container-queries/container-name-invalidation-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-selection-expected.txt:

Source/WebCore:

Find the right container to evaluate against.

  • style/ContainerQueryEvaluator.cpp:

(WebCore::Style::ContainerQueryEvaluator::evaluate const):

4:05 AM Changeset in webkit [289616] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Add build phase to copy PDF.js resources to WebCore.framework resources
https://bugs.webkit.org/show_bug.cgi?id=235981

Reviewed by Youenn Fablet.

This adds a new "Run Script" phase that simply copies Source/ThirdParty/pdfjs to
WebCore.framework/Resources/pdfjs, it excludes .svn and .DS_Store files too.

  • WebCore.xcodeproj/project.pbxproj:
2:52 AM Changeset in webkit [289615] by commit-queue@webkit.org
  • 5 edits in trunk

Clicking on an <input type="image"> will submit the form with null submitter
https://bugs.webkit.org/show_bug.cgi?id=236324

LayoutTests/imported/w3c:

Add a test to make sure that when the form is submitted through an <input type="image">
control, the submitter field of the submit event is that control.

Patch by Andreu Botella <andreu@andreubotella.com> on 2022-02-11
Reviewed by Carlos Garcia Campos.

  • web-platform-tests/html/semantics/forms/form-submission-0/form-submission-algorithm-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-0/form-submission-algorithm.html:

Source/WebCore:

Patch by Andreu Botella <andreu@andreubotella.com> on 2022-02-11
Reviewed by Carlos Garcia Campos.

If you submit a form by clicking on an <input type="image"> control, the control will be in
the form's entry list, but the submitter field in the submit event will be null. This is
wrong per the spec, and caused because the call to HTMLFormElement::submitIfPossible() in
ImageInputType::handleDOMActivateEvent() calls it with one argument, rather than passing
the element as the submitter.

Tests: imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-submission-algorithm.html

  • html/ImageInputType.cpp:

(WebCore::ImageInputType::handleDOMActivateEvent):

2:14 AM Changeset in webkit [289614] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.34/Source/WebKit

Merge r289608 - [WPE][GTK] BubblewrapLauncher leaks D-Bus proxy sockets
https://bugs.webkit.org/show_bug.cgi?id=201771

Reviewed by Michael Catanzaro.

xdg-dbus-proxy removes the socket when the sync fd is closed by the application. In most of the cases the
xdg-dbus-proxy process is killed before the sync fd is closed and the socket file is leaked. We should
explicitly close the sync fd.

  • UIProcess/Launcher/glib/XDGDBusProxy.cpp:

(WebKit::XDGDBusProxy::XDGDBusProxy): Save the sync fd.
(WebKit::XDGDBusProxy::~XDGDBusProxy): Close the sync fd is needed.
(WebKit::XDGDBusProxy::launch const): Return the sync fd.

  • UIProcess/Launcher/glib/XDGDBusProxy.h:
2:14 AM Changeset in webkit [289613] by Carlos Garcia Campos
  • 5 edits
    1 copy
    1 add in releases/WebKitGTK/webkit-2.34/Source/WebKit

Merge r289528 - [GTK][WPE] Refactor the XDGDBusProxy launcher to simplify it and fix some issues
https://bugs.webkit.org/show_bug.cgi?id=236437

Reviewed by Adrian Perez de Castro.

Source/WebKit:

This patch moves the XDGDBusProxy launcher implementation to its own file and fixes the following issues:

  • r289369 introduced an issue with old versions of bwrap that fails to mount over an existing file, so we need to ensure we only bind the original socket for the a11y socket and not the session bus one.
  • bindA11y is GTK specific for some reason, which means WPE doesn't have a11y under the sandbox.
  • The names of the socket paths for a11y and session bus use the same pattern dbus-proxy-XXXXXX, it helps to use a different one.
  • The code to get the a11y DBus address is now duplicated in PlatformDisplay, we can just use the PlatformDisplay to get the address.
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::argumentsToFileDescriptor):
(WebKit::bindDBusSession):
(WebKit::bindA11y):
(WebKit::bubblewrapSpawn):
(WebKit::argsToFd): Deleted.
(WebKit::XDGDBusProxyLauncher::setAddress): Deleted.
(WebKit::XDGDBusProxyLauncher::isRunning const): Deleted.
(WebKit::XDGDBusProxyLauncher::path const): Deleted.
(WebKit::XDGDBusProxyLauncher::proxyPath const): Deleted.
(WebKit::XDGDBusProxyLauncher::setPermissions): Deleted.
(WebKit::XDGDBusProxyLauncher::launch): Deleted.
(WebKit::XDGDBusProxyLauncher::makeProxyPath): Deleted.
(WebKit::XDGDBusProxyLauncher::dbusAddressToPath): Deleted.
(): Deleted.

  • UIProcess/Launcher/glib/BubblewrapLauncher.h:
  • UIProcess/Launcher/glib/XDGDBusProxy.cpp: Added.

(WebKit::XDGDBusProxy::XDGDBusProxy):
(WebKit::XDGDBusProxy::makeProxy const):
(WebKit::XDGDBusProxy::launch const):

  • UIProcess/Launcher/glib/XDGDBusProxy.h: Added.

(WebKit::XDGDBusProxy::proxyPath const):
(WebKit::XDGDBusProxy::path const):

1:49 AM Changeset in webkit [289612] by youenn@apple.com
  • 33 edits
    3 copies
    1 add in trunk

Add support to query camera and microphone permissions
https://bugs.webkit.org/show_bug.cgi?id=236138

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/permissions/nfc-permission-expected.txt:
  • web-platform-tests/permissions/test-background-fetch-permission-expected.txt:

Source/WebCore:

Update queryPermission to be async as it may require to check to UIProcess.
Covered by API test.

  • Modules/permissions/PermissionController.h:
  • Modules/permissions/Permissions.cpp:

Source/WebKit:

Add new SPI to query for permission (without requesting anything to user).
Use this to implement camera/microphone permission.
In case of permisssion persistently denied, only expose it if web page already called getUserMedia.
In case of permission not persistently set, compute the permission state according past getUserMedia requests.
Also add geolocation mapping as applications might want to support it and it makes existing WPT tests happy.
Add C API as well so that WTR can control permission querying.

Covered by API test.

  • Headers.cmake:
  • Shared/API/APIObject.h:
  • Shared/API/c/WKBase.h:
  • Sources.txt:
  • UIProcess/API/APIUIClient.h:
  • UIProcess/API/C/WKAPICast.h:
  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):

  • UIProcess/API/C/WKPageUIClient.h:
  • UIProcess/API/C/WKSpeechRecognitionPermissionCallback.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebPermissionController.cpp:
  • WebProcess/WebCoreSupport/WebPermissionController.h:

Tools:

  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm:

(-[UserMediaCaptureUIDelegate _webView:queryPermission:forOrigin:completionHandler:]):

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
  • TestWebKitAPI/Tests/WebKit/getUserMediaPermission.html: Added.
  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.h:
  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm:
  • WebKitTestRunner/TestController.cpp:

(WTR::queryPermission):
(WTR::TestController::createWebViewWithOptions):

1:16 AM Changeset in webkit [289611] by Adrian Perez de Castro
  • 2 edits in trunk

[CMake] Use ld.lld by default for development builds where available
https://bugs.webkit.org/show_bug.cgi?id=235979

Reviewed by Michael Catanzaro.

  • Source/cmake/OptionsCommon.cmake: Enable USE_LD_LLD by default for developers builds

when ld.lld is available. While at it, improve the match on LD_VERSION to be more robust.

12:44 AM Changeset in webkit [289610] by Nikita Vasilyev
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: [Flexbox] Show flex badge next to flex containers in DOM Tree
https://bugs.webkit.org/show_bug.cgi?id=235924

Reviewed by Patrick Angle.

Elements with display: flex and display: inline-flex should include a "flex" badge.
Clicking the badge should toggle the overlay for the corresponding element.

  • UserInterface/Controllers/GridOverlayConfigurationDiagnosticEventRecorder.js:

(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.setup):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.teardown):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleGridOverlayShown):

  • UserInterface/Controllers/GridOverlayDiagnosticEventRecorder.js:

(WI.GridOverlayDiagnosticEventRecorder.prototype.setup):
(WI.GridOverlayDiagnosticEventRecorder.prototype.teardown):
(WI.GridOverlayDiagnosticEventRecorder.prototype._handleGridOverlayShown):
(WI.GridOverlayDiagnosticEventRecorder):

  • UserInterface/Controllers/OverlayManager.js:

(WI.OverlayManager):
(WI.OverlayManager.prototype.showOverlay):
(WI.OverlayManager.prototype.hideOverlay):
(WI.OverlayManager.prototype.hasVisibleGridOverlays):
(WI.OverlayManager.prototype.hasVisibleOverlay):
(WI.OverlayManager.prototype.toggleOverlay):
(WI.OverlayManager.prototype.getColorForNode):
(WI.OverlayManager.prototype.setColorForNode):
(WI.OverlayManager.prototype._handleLayoutContextTypeChanged):
(WI.OverlayManager.prototype._handleGridSettingChanged):
(WI.OverlayManager.prototype._handleMainResourceDidChange):
(WI.OverlayManager.prototype.showGridOverlay): Deleted.
(WI.OverlayManager.prototype.hideGridOverlay): Deleted.
(WI.OverlayManager.prototype.isGridOverlayVisible): Deleted.
(WI.OverlayManager.prototype.toggleGridOverlay): Deleted.
(WI.OverlayManager.prototype.getGridColorForNode): Deleted.
(WI.OverlayManager.prototype.setGridColorForNode): Deleted.
Remove grid-specific methods (such as showGridOverlay) and introduce methods that work with
both Grid and Flexbox (such as showOverlay).

  • UserInterface/Views/CSSGridSection.js:

(WI.CSSGridSection.prototype.attached):
(WI.CSSGridSection.prototype.detached):
(WI.CSSGridSection.prototype._handleToggleAllCheckboxChanged):
(WI.CSSGridSection.prototype.layout):
(WI.CSSGridSection.prototype._handleGridOverlayStateChanged):
(WI.CSSGridSection.prototype._updateToggleAllCheckbox):
(WI.CSSGridSection):

  • UserInterface/Views/DOMTreeElement.css:

(.tree-outline.dom .layout-badge):
(.tree-outline.dom .layout-badge.activated):
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected .layout-badge):
(@media (prefers-color-scheme: dark) .tree-outline.dom .layout-badge):
(.tree-outline.dom .badge-css-grid): Deleted.
(.tree-outline.dom .badge-css-grid.activated): Deleted.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected .badge-css-grid): Deleted.
(@media (prefers-color-scheme: dark) .tree-outline.dom .badge-css-grid): Deleted.

  • UserInterface/Views/DOMTreeElement.js:

(WI.DOMTreeElement):
(WI.DOMTreeElement.prototype.onattach):
(WI.DOMTreeElement.prototype.ondetach):
(WI.DOMTreeElement.prototype.updateTitle):
(WI.DOMTreeElement.prototype._updateLayoutBadge):
(WI.DOMTreeElement.prototype._layoutBadgeClicked):
(WI.DOMTreeElement.prototype._updateLayoutBadgeStatus):
(WI.DOMTreeElement.prototype._handleLayoutContextTypeChanged):
(WI.DOMTreeElement.prototype._updateGridBadge): Deleted.
(WI.DOMTreeElement.prototype._gridBadgeClicked): Deleted.
(WI.DOMTreeElement.prototype._gridBadgeDoubleClicked): Deleted.
(WI.DOMTreeElement.prototype._updateGridBadgeStatus): Deleted.
Renamed _gridBadgeElement to _layoutBadgeElement. We can't have both "flex" and "grid" badge on the same element,
so I called it "layoutBadge". I didn't call it simply "badge" because we may have other badges in the future.

12:40 AM Changeset in webkit [289609] by mmaxfield@apple.com
  • 14 edits
    6 adds in trunk

Tab characters and ch units do not obey synthetic bold width adjustments correctly
https://bugs.webkit.org/show_bug.cgi?id=236172

Reviewed by Alan Bujtas.

Source/WebCore:

It turns out we have a lot of places where code wants to know the synthetic-bold-expanded
width of characters. One place is 'tab-width: <integer>' and another is the 'ch' unit.
However, WidthIterator and ComplexTextController don't want the synthetic-bold-expanded
widths, because they explicitly apply synthetic bold after shaping.

This patch adds a 2-value enum argument to the Font::widthForGlyph() function, so callers
can pass in which behavior they want. The function has a default value to include the
synthetic bold expansion.

I then audited every call site of this function, and passed in the correct enum value.
Doing this led me to discover two bugs where the wrong behavior was being used, and this
patch fixes them and adds tests for them.

Tests: fast/text/ch-unit-synthetic-bold.html

fast/text/tab-width-synthetic-bold-complex.html
fast/text/tab-width-synthetic-bold.html

  • layout/formattingContexts/inline/text/TextUtil.cpp:

(WebCore::Layout::fallbackFontsForRunWithIterator):

  • platform/graphics/ComplexTextController.cpp:

(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):

  • platform/graphics/Font.cpp:

(WebCore::Font::platformGlyphInit):

  • platform/graphics/Font.h:

(WebCore::Font::spaceWidth const):
(WebCore::Font::widthForGlyph const):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::widthForSimpleText const):

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::tabWidth const):

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::advanceInternal):
(WebCore::WidthIterator::calculateAdditionalWidth const):

LayoutTests:

3 new tests. Also, the changes in ignored-properties-001-expected.txt are a revert of the rebaseline in
r281687. That rebaseline was wrong, so this undoes it.

  • fast/text/ch-unit-synthetic-bold-expected.html: Added.
  • fast/text/ch-unit-synthetic-bold.html: Added.
  • fast/text/tab-width-synthetic-bold-complex-expected.html: Added.
  • fast/text/tab-width-synthetic-bold-complex.html: Added.
  • fast/text/tab-width-synthetic-bold-expected.html: Added.
  • fast/text/tab-width-synthetic-bold.html: Added.
  • platform/ios/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
  • platform/mac-catalina/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
  • platform/mac-mojave/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
  • platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
12:32 AM Changeset in webkit [289608] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

[WPE][GTK] BubblewrapLauncher leaks D-Bus proxy sockets
https://bugs.webkit.org/show_bug.cgi?id=201771

Reviewed by Michael Catanzaro.

xdg-dbus-proxy removes the socket when the sync fd is closed by the application. In most of the cases the
xdg-dbus-proxy process is killed before the sync fd is closed and the socket file is leaked. We should
explicitly close the sync fd.

  • UIProcess/Launcher/glib/XDGDBusProxy.cpp:

(WebKit::XDGDBusProxy::XDGDBusProxy): Save the sync fd.
(WebKit::XDGDBusProxy::~XDGDBusProxy): Close the sync fd is needed.
(WebKit::XDGDBusProxy::launch const): Return the sync fd.

  • UIProcess/Launcher/glib/XDGDBusProxy.h:
12:25 AM Changeset in webkit [289607] by Diego Pino Garcia
  • 5 edits
    32 deletes in trunk/LayoutTests

LayoutTests/imported/w3c:
[WPE] Several WPT offscreen canvas tests are failing after r287846
https://bugs.webkit.org/show_bug.cgi?id=236474

Reviewed by Carlos Alberto Lopez Perez.

  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.coordinatespace.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.coordinatespace.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.missingargs.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.missingargs.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.voidreturn.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.voidreturn.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.measure.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.measure.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.combined.3d.transforms.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.combined.3d.transforms.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.x.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.x.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.y.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.y.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.z.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.z.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotateAxis.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotateAxis.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.3d.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.3d.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.3d.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.3d.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.3d.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.3d.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.3d.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.3d.worker.html: Removed.

LayoutTests:
[GTK] Remove several stale WPT offscreen canvas tests
https://bugs.webkit.org/show_bug.cgi?id=236474

Reviewed by Carlos Alberto Lopez Perez.

r287846 re-sync WPT html/ tests, including offscreen canvas tests.
Some already imported offscreen canvas tests are no longer part of WPT tests.
These tests were marked as Failure but should have actually be removed
instead. Two of these tests needed to update their baseline.

  • platform/gtk/TestExpectations:
12:04 AM Changeset in webkit [289606] by Nikolas Zimmermann
  • 13 edits in trunk/Source/WebCore

[LBSE] Begin stub implementation of transform support for SVG layers
https://bugs.webkit.org/show_bug.cgi?id=236185

Reviewed by Rob Buis.

RenderLayer / RenderLayerBacking use RenderStyle::applyTransform()
to compute a TransformationMatrix from the CSS Transform properties.

To hook in SVG transform support, which goes beyond pure CSS properties
that influence the "effective transform" for a certain SVG element,
RenderStyle is not the right place to place the applyTransform()
implementation for SVG specific requirements.

Therefore introduce a virtual RenderLayerModelObject::applyTransform()
function, that is implemented in RenderBox / RenderSVGModelObject.
In this patch RenderSVGModelObject::applyTransform() stays a stub
and RenderBox::applyTransform() simply forwards to RenderStyle,
preserving the current behavior.

This allows SVG to add additional transformations to the transformation
stack, which is useful to implement 'viewBox' support among other things.

Covered by existing tests, no change in behaviour.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::applyTransform const):

  • rendering/RenderBox.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::applyTransform const):

  • rendering/RenderBoxModelObject.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateTransform):
(WebCore::RenderLayer::currentTransform const):
(WebCore::RenderLayer::perspectiveTransform const):
(WebCore::RenderLayer::perspectiveOrigin const):

  • rendering/RenderLayer.h:

(WebCore::RenderLayer::rendererBorderBoxRect const):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateTransform):
(WebCore::RenderLayerBacking::updateChildrenTransformAndAnchorPoint):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::transformMatrixForProperty const):
(WebCore::rendererBorderBoxRect): Deleted.

  • rendering/RenderLayerModelObject.h:
  • rendering/svg/RenderSVGModelObject.cpp:

(WebCore::RenderSVGModelObject::applyTransform const):

  • rendering/svg/RenderSVGModelObject.h:
  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::applyTransform const):

  • rendering/svg/RenderSVGRoot.h:

Feb 10, 2022:

10:55 PM Changeset in webkit [289605] by graouts@webkit.org
  • 4 edits in trunk/LayoutTests

[web-animations] additive animations should prevent other animations from running accelerated
https://bugs.webkit.org/show_bug.cgi?id=236447

Unreviewed gardening, the patch for this bug was cq'd before I could fix test expectations for
GTK and Windows and remove an incorrect comment in the newly added test.

  • platform/glib/TestExpectations:
  • platform/win/TestExpectations:
  • webanimations/accelerated-animations-and-composite.html:
9:40 PM Changeset in webkit [289604] by Simon Fraser
  • 9 edits in trunk/Source

Separate out setVolatile() from setNonVolatile() on IOSurface-backed buffers
https://bugs.webkit.org/show_bug.cgi?id=236475

Reviewed by Tim Horton.

setVolatile(true) and setVolatile(false) are quite different in their needs, so
separate them out into separate functions.

setVolatile(true) can be done asynchronously (as a future patch will). The
return value tells if you succeeded in making the surfaced volatile, i.e. if it
was not in-use.

setVolatile(false) has to be synchronous, and the return value tells you whether
you need to repaint the entire surface.

Source/WebCore:

  • platform/graphics/ConcreteImageBuffer.h:
  • platform/graphics/ImageBuffer.h:
  • platform/graphics/ImageBufferBackend.h:

(WebCore::ImageBufferBackend::releaseGraphicsContext):
(WebCore::ImageBufferBackend::setVolatile):
(WebCore::ImageBufferBackend::setNonVolatile):

  • platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:

(WebCore::ImageBufferIOSurfaceBackend::setVolatile):
(WebCore::ImageBufferIOSurfaceBackend::setNonVolatile):

  • platform/graphics/cg/ImageBufferIOSurfaceBackend.h:

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::setBufferVolatility):

9:36 PM Changeset in webkit [289603] by Simon Fraser
  • 5 edits in trunk/Source/WebKit

Have RemoteLayerBackingStore talk to RemoteLayerBackingStoreCollection directly
https://bugs.webkit.org/show_bug.cgi?id=236463

Reviewed by Tim Horton.

There doesn't seem to be any benefit to going via RemoteLayerTreeContext.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStore::backingStoreCollection const):
(WebKit::RemoteLayerBackingStore::display):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::backingStoreWasCreated): Deleted.
(WebKit::RemoteLayerTreeContext::backingStoreWillBeDestroyed): Deleted.
(WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed): Deleted.

9:17 PM Changeset in webkit [289602] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WTF

[WTF] Fix clang tidy bugprone-move-forwarding-reference static analyzer warnings from WebCore/WebKit
<https://webkit.org/b/236459>
<rdar://problem/88772313>

Reviewed by Darin Adler.

  • wtf/IteratorAdaptors.h:

(WTF::makeTransformIterator):

  • wtf/WeakHashMap.h:

(WTF::WeakHashMap::set):

  • Replace WTFMove() with std::forward<>().
7:58 PM Changeset in webkit [289601] by fpizlo@apple.com
  • 2 edits in trunk

Unreviewed, add an alternate email address.

  • metadata/contributors.json:
7:58 PM Changeset in webkit [289600] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Non-content runs (e.g. inline box start/end) do not need "within the line" flip
https://bugs.webkit.org/show_bug.cgi?id=236426

Reviewed by Antti Koivisto.

This is the same what we already do for the bidi case.

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):

6:27 PM Changeset in webkit [289599] by Nikos Mouchtaris
  • 15 edits in trunk

Web animations- Composite operation accumulation support for transform properties
https://bugs.webkit.org/show_bug.cgi?id=236116

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-transforms/animation/transform-matrix-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-rotate-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-skew-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-translate-composition-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/combining-effects/effect-composition-expected.txt:

Source/WebCore:

This patch brings further support for accumulation on transform properties. The main aspect being addressed
is handling accumulation of TransformationMatrices. This involves accumulating on the decomposed functions,
which occurs in blendFloat() and accumulateQuaternion(). Since we need to perform accumulation for one-based
values on certain decomposed functions, (scale, diagonals of matrices, etc), we set the operation to accumulate
only for these cases.

A couple of bugs introduced by this additional support are also addressed. For a property with a
different transform operation than the keyframes given, transformFunctionListsMatch() would return
true when it shouldn't. Addressed by checking in blendByMatchingOperations and falling back on matrix
interpolation. Another bug is that we need to pass the composite operation to TransformationMatrix blend().
Another bug is that we should to use Replace behavior if either of the transform matrices are
non-invertible.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):

  • platform/graphics/transforms/Matrix3DTransformOperation.cpp:

(WebCore::createOperation):

  • platform/graphics/transforms/MatrixTransformOperation.cpp:

(WebCore::MatrixTransformOperation::blend):

  • platform/graphics/transforms/RotateTransformOperation.cpp:

(WebCore::RotateTransformOperation::blend):

  • platform/graphics/transforms/TransformOperations.cpp:

(WebCore::TransformOperations::blendByMatchingOperations const):
(WebCore::TransformOperations::blendByUsingMatrixInterpolation const):
(WebCore::TransformOperations::blend const):

  • platform/graphics/transforms/TransformOperations.h:

(WebCore::TransformOperations::isInvertible const):

  • platform/graphics/transforms/TransformationMatrix.cpp:

(WebCore::blendFloat):
(WebCore::TransformationMatrix::blend2):
(WebCore::accumulateQuaternion):
(WebCore::TransformationMatrix::blend4):
(WebCore::TransformationMatrix::blend):

6:03 PM Changeset in webkit [289598] by graouts@webkit.org
  • 7 edits
    2 adds in trunk

[web-animations] accelerated animations should not run accelerated
https://bugs.webkit.org/show_bug.cgi?id=236447
<rdar://problem/88756985>

Reviewed by Dean Jackson.

Source/WebCore:

Until we can tackle the complex task of supporting accelerated additive animations
(bug 232081), we need to run animations targeting properties that we would otherwise
known how to accelerate in software if it is additive or if another effect in the
effect stack is itself additive.

We add two new boolean flags on KeyframeEffect that will help us determine whether
that effect can run accelerated.

The first flag, m_hasKeyframeComposingAcceleratedProperty, indicates whether any of
the keyframes targeting a property that supports acceleration uses additivity or
accumulation.

With the help of this flag, we can make KeyframeEffect::canBeAccelerated() return false
not only if the effect has effect-wide additivity or accumulation, but also if one of
its keyframes does.

The second flag, m_hasImplicitKeyframeForAcceleratedProperty, indicates whether any
of the properties found in one of the keyframes is absent from either the 0% or 100%
keyframes. This is important because if an effect uses an implicit value for an
acclerated property, then that effect automatically depends on other effects lower
down the effect stack it belongs to being able to use an accelerated animation to
itself run accelerated.

With the help of this second flag, we can accurately determine when trying to start
an accelerated animation in the startAnimation() lambda within applyPendingAcceleratedActions()
whether the keyframe effect stack contains another effect that will fail to run
accelerated, and prevent this effect from running accelerated itself. Unless if
it does not rely on implicit keyframes, in which case effects lower down the stack
should not be accounted for, as we wouldn't have gone this far if this effect was
using additivity or accumulation, per the canBeAccelerated() improvements.

To allow the effect stack to determine whether any of its effects could be accelerated,
but fails to actually run accelerated, we've added a new KeyframeEffect::canBeAccelerated()
method that the new KeyframeEffectStack::containsEffectThatPreventsAccelerationOfEffect()
calls to determine if any effect other than the one provided should prevent acceleration.

Test: webanimations/accelerated-animations-and-composite.html

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::setBlendingKeyframes):
(WebCore::KeyframeEffect::canBeAccelerated const):
(WebCore::KeyframeEffect::preventsAcceleration const):
(WebCore::KeyframeEffect::applyPendingAcceleratedActions):
(WebCore::KeyframeEffect::computeHasImplicitKeyframeForAcceleratedProperty):
(WebCore::KeyframeEffect::computeHasKeyframeComposingAcceleratedProperty):

  • animation/KeyframeEffect.h:
  • animation/KeyframeEffectStack.cpp:

(WebCore::KeyframeEffectStack::containsEffectThatPreventsAccelerationOfEffect):

  • animation/KeyframeEffectStack.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

LayoutTests:

Add a new test which runs through all the various scenarios where additivity
should or should not prevent other animations from running accelerated.

  • webanimations/accelerated-animations-and-composite-expected.txt: Added.
  • webanimations/accelerated-animations-and-composite.html: Added.
5:47 PM Changeset in webkit [289597] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Check bidiLevels are valid before reordering
https://bugs.webkit.org/show_bug.cgi?id=236378

Patch by Brandon Stewart <Brandon> on 2022-02-10
Reviewed by Alan Bujtas.

We were trusting that the bidiLevel was valid before calling the reorder.
If the bidiLevel ends up being greater than the MAX + 1 we end up in a situation where
the reordering will fail. The function returns void, so there is not a good way to check
for an error.

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::layoutInlineContent):

4:45 PM Changeset in webkit [289596] by commit-queue@webkit.org
  • 3 edits
    1 copy in trunk/Source/WTF

Unreviewed, reverting r289583 and r289591.
https://bugs.webkit.org/show_bug.cgi?id=236472

Still breaking builds

Reverted changesets:

"Reland native Xcode build phases for "Copy WTF Headers",
again"
https://bugs.webkit.org/show_bug.cgi?id=235744
https://commits.webkit.org/r289583

"Copy SignedPtr.h in WTF.xcodeproj"
https://bugs.webkit.org/show_bug.cgi?id=236466
https://commits.webkit.org/r289591

4:30 PM Changeset in webkit [289595] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WTF

Don't prefer text selection in images if it is not available
https://bugs.webkit.org/show_bug.cgi?id=236462
<rdar://problem/88407336>

Reviewed by Wenson Hsieh.

  • Scripts/Preferences/WebPreferencesInternal.yaml:
4:27 PM Changeset in webkit [289594] by Said Abou-Hallawa
  • 25 edits in trunk/Source

[GPU Process] Delete GraphicsContext::clipToDrawingCommands()
https://bugs.webkit.org/show_bug.cgi?id=225959
rdar://78495380

Reviewed by Darin Adler.

Source/WebCore:

This function was added in r267742 as a workaround for a GPUProcess case
which was happening because ImageBuffer::createCompatibleBuffer() used
to return in-process ImageBuffer. clipToDrawingCommands() was a way to
record the clipper mask image into a temporary remote ImageBuffer.

If GraphicsContext::createCompatibleImageBuffer() can create an
ImageBuffer similar to the underlying ImageBuffer of the GraphicsContext,
then GraphicsContext::clipToDrawingCommands() is not needed.

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::drawTextUnchecked):

  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::clipToDrawingCommands): Deleted.

  • platform/graphics/GraphicsContext.h:
  • platform/graphics/NullGraphicsContext.h:
  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::append):

  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:

(WebCore::DisplayList::ItemHandle::apply):
(WebCore::DisplayList::ItemHandle::destroy):
(WebCore::DisplayList::ItemHandle::safeCopy const):

  • platform/graphics/displaylists/DisplayListItemType.cpp:

(WebCore::DisplayList::sizeOfItemInBytes):
(WebCore::DisplayList::isDrawingItem):
(WebCore::DisplayList::isInlineItem):

  • platform/graphics/displaylists/DisplayListItemType.h:
  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::operator<<):

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::BeginClipToDrawingCommands::BeginClipToDrawingCommands): Deleted.
(WebCore::DisplayList::BeginClipToDrawingCommands::~BeginClipToDrawingCommands): Deleted.
(WebCore::DisplayList::BeginClipToDrawingCommands::destination const): Deleted.
(WebCore::DisplayList::BeginClipToDrawingCommands::colorSpace const): Deleted.
(WebCore::DisplayList::BeginClipToDrawingCommands::encode const): Deleted.
(WebCore::DisplayList::BeginClipToDrawingCommands::decode): Deleted.
(WebCore::DisplayList::EndClipToDrawingCommands::EndClipToDrawingCommands): Deleted.
(WebCore::DisplayList::EndClipToDrawingCommands::destination const): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::clipToDrawingCommands): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/graphics/displaylists/DisplayListRecorderImpl.cpp:

(WebCore::DisplayList::RecorderImpl::~RecorderImpl):
(WebCore::DisplayList::RecorderImpl::createNestedContext): Deleted.
(WebCore::DisplayList::RecorderImpl::recordBeginClipToDrawingCommands): Deleted.
(WebCore::DisplayList::RecorderImpl::recordEndClipToDrawingCommands): Deleted.

  • platform/graphics/displaylists/DisplayListRecorderImpl.h:
  • platform/graphics/displaylists/DisplayListReplayer.cpp:

(WebCore::DisplayList::Replayer::applyItem):
(WebCore::DisplayList::Replayer::context const): Deleted.

  • platform/graphics/displaylists/DisplayListReplayer.h:
  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:

(Nicosia::CairoOperationRecorder::clipToDrawingCommands): Deleted.

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:

Source/WebKit:

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::drawingContext):
(WebKit::RemoteDisplayListRecorder::beginClipToDrawingCommands): Deleted.
(WebKit::RemoteDisplayListRecorder::endClipToDrawingCommands): Deleted.

  • GPUProcess/graphics/RemoteDisplayListRecorder.h:
  • GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:

(WebKit::RemoteDisplayListRecorderProxy::recordBeginClipToDrawingCommands): Deleted.
(WebKit::RemoteDisplayListRecorderProxy::recordEndClipToDrawingCommands): Deleted.
(WebKit::RemoteDisplayListRecorderProxy::createNestedContext): Deleted.

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
4:24 PM Changeset in webkit [289593] by commit-queue@webkit.org
  • 42 edits
    11 deletes in trunk

Unreviewed, reverting r289525.
https://bugs.webkit.org/show_bug.cgi?id=236467

Introduced layout test crashes

Reverted changeset:

"Introduce a RemoteMediaSampleProxy to represent captured
video frames used in Media Streams and present in GPUP"
https://bugs.webkit.org/show_bug.cgi?id=236099
https://commits.webkit.org/r289525

4:20 PM Changeset in webkit [289592] by keith_miller@apple.com
  • 6 edits in trunk/Source

tryReserveUncommittedAligned should explicitly take the alignment requested
https://bugs.webkit.org/show_bug.cgi?id=236460

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

When reducing the size of VA space reserved for Structures, we
didn't take care to ensure the alignment matched the required
alignment for our bit mask. To fix this we need to pass the
original alignment to the allocator as a new parameter.

  • heap/StructureAlignedMemoryAllocator.cpp:

(JSC::StructureMemoryManager::StructureMemoryManager):

Source/WTF:

This patch adds a new ifdef for Unix flavors that support the
MAP_ALIGNED macro/parameter to mmap.

Also, fix a bug where on windows we wouldn't request enough
space to guarantee that allocation is aligned.

  • wtf/OSAllocator.h:
  • wtf/posix/OSAllocatorPOSIX.cpp:

(WTF::OSAllocator::tryReserveUncommittedAligned):

  • wtf/win/OSAllocatorWin.cpp:

(WTF::OSAllocator::tryReserveUncommittedAligned):

3:57 PM Changeset in webkit [289591] by Elliott Williams
  • 2 edits in trunk/Source/WTF

Copy SignedPtr.h in WTF.xcodeproj
https://bugs.webkit.org/show_bug.cgi?id=236466

Reviewed by Alexey Proskuryakov.

SignedPtr.h was recently added and needs to be part of WTF's Copy Headers phase.

  • WTF.xcodeproj/project.pbxproj:
3:49 PM Changeset in webkit [289590] by fpizlo@apple.com
  • 24 edits
    1 add in trunk/Source

[libpas] jit_heap should support the segregated heap
https://bugs.webkit.org/show_bug.cgi?id=235497

Reviewed by Yusuke Suzuki.

Source/bmalloc:

One of the things that libpas provides is a fast implementation of executable memory allocation, which
libpas calls "jit_heap". The initial implementation of this only used libpas's bitfit and large
algorithms. Bitfit was used for smaller objects and large was used for larger objects. The libpas
segregated heap was disabled in jit_heap. This made sense because:

  • Bitfit and large support the shrink() call, where we shrink an allocation in-place. Executable allocation supports this to aid branch compaction (we compact code after we copy it into its final resting place, which is after we allocate the memory - so after we finish compaction, we can only shrink the allocation in-place or not at all).
  • Segregated heaps have some virtual address space overheads, and memory overheads, that the bitfit and large heaps don't have. This happens because segreated heaps will dedicate each page to objects of exactly one size forever.

However, segregated heaps are substantially faster than bitfit heaps. They are faster under serial
allocation thanks to the fact that no locks need to be acquired for a typical allocation or
deallocation. They are even more faster under parallel allocation thanks to thread-local caching.

This patch enables segregated heaps for the smallest jit_heap allocations (<=2000 bytes). The cutoff
threshold is runtime configurable, so it's possible to disable segregated heaps at runtime by setting
the cutoff to 0.

With the 2000 threshold, this appears to be a 0.3% Speedometer2 speed-up.

While there is a theoretical possibility of memory overhead, I haven't seen it. If we are using jump
islands then the virtual memory overhead of segregated heaps will just mean that we use jump islands
more frequently, which would manifest as a performance regression -- but I've not seen any such
regression. So, this disables the segregated heap if the JIT pool size is too small (see changes to
ExecutableAllocator.cpp in JSC).

  • libpas/libpas.xcodeproj/project.pbxproj:
  • libpas/src/libpas/jit_heap.c:

(jit_heap_shrink):

  • libpas/src/libpas/jit_heap_config.c:

(jit_small_segregated_allocate_page):
(jit_small_segregated_create_page_header):
(jit_small_destroy_page_header):
(jit_small_segregated_shared_page_directory_selector):
(jit_small_bitfit_allocate_page):
(jit_small_bitfit_create_page_header):
(jit_medium_bitfit_create_page_header):
(jit_medium_destroy_page_header):
(jit_prepare_to_enumerate):
(jit_small_bitfit_destroy_page_header): Deleted.
(jit_medium_bitfit_destroy_page_header): Deleted.

  • libpas/src/libpas/jit_heap_config.h:

(jit_small_page_header_for_boundary):
(jit_small_boundary_for_page_header):
(jit_medium_page_header_for_boundary):
(jit_medium_boundary_for_page_header):
(jit_heap_config_page_header):
(jit_small_bitfit_page_header_for_boundary): Deleted.
(jit_small_bitfit_boundary_for_page_header): Deleted.
(jit_medium_bitfit_page_header_for_boundary): Deleted.
(jit_medium_bitfit_boundary_for_page_header): Deleted.

  • libpas/src/libpas/jit_heap_config_root_data.h:
  • libpas/src/libpas/pas_bitfit_heap.c:

(pas_bitfit_heap_select_variant):
(pas_bitfit_heap_construct_and_insert_size_class):

  • libpas/src/libpas/pas_bitfit_heap.h:
  • libpas/src/libpas/pas_bitfit_page_config.h:

(pas_bitfit_page_config_is_enabled):

  • libpas/src/libpas/pas_heap_config.h:

(pas_heap_config_segregated_heap_min_align_shift):
(pas_heap_config_segregated_heap_min_align):

  • libpas/src/libpas/pas_segregated_heap.c:

(min_align_for_heap):
(min_object_size_for_heap):
(max_segregated_object_size_for_heap):
(max_bitfit_object_size_for_heap):
(max_object_size_for_heap):
(pas_segregated_heap_ensure_allocator_index):
(pas_segregated_heap_ensure_size_directory_for_size):
(min_object_size_for_heap_config): Deleted.
(max_segregated_object_size_for_heap_config): Deleted.
(max_bitfit_object_size_for_heap_config): Deleted.
(max_object_size_for_heap_config): Deleted.

  • libpas/src/libpas/pas_segregated_heap.h:

(pas_segregated_heap_index_for_size):
(pas_segregated_heap_size_for_index):

  • libpas/src/libpas/pas_segregated_page.c:

(pas_segregated_page_construct):

  • libpas/src/libpas/pas_segregated_page_config.h:

(pas_segregated_page_config_is_enabled):

  • libpas/src/libpas/pas_segregated_page_config_kind.def:
  • libpas/src/libpas/pas_segregated_page_config_kind_and_role.h:
  • libpas/src/libpas/pas_segregated_size_directory.c:

(pas_segregated_size_directory_create):

  • libpas/src/test/IsoHeapChaosTests.cpp:

(std::addAllTests):

  • libpas/src/test/JITHeapTests.cpp:

(std::testAllocationSize):
(addJITHeapTests):

  • libpas/src/test/TestHarness.cpp:

(main):

  • libpas/src/test/ViewCacheTests.cpp: Added.

(std::setupConfig):
(std::testDisableViewCacheUsingBoundForNoViewCache):
(std::testEnableViewCacheAtSomeBoundForNoViewCache):
(addViewCacheTests):

Source/JavaScriptCore:

Disable the jit_heap segregated heap if the executable pool size is too small.

  • jit/ExecutableAllocator.cpp:

(JSC::initializeJITPageReservation):

3:42 PM Changeset in webkit [289589] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Adjust asserts in InlineDisplayContentBuilder::processBidiContent to support vertical writing mode
https://bugs.webkit.org/show_bug.cgi?id=236418

Reviewed by Antti Koivisto.

This is in preparation for adding vertical writing mode support.

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

3:36 PM Changeset in webkit [289588] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Use Ref<> for getBackground/MaskShorthandValue
https://bugs.webkit.org/show_bug.cgi?id=236408

Patch by Matt Woodrow <Matt Woodrow> on 2022-02-10
Reviewed by Tim Nguyen.

Simple cleanup to make it clearer that these can't return nullptr, no tests needed.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::getFillLayerPropertyShorthandValue):
(WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
(WebCore::ComputedStyleExtractor::getMaskShorthandValue):

  • css/CSSComputedStyleDeclaration.h:
3:22 PM Changeset in webkit [289587] by Elliott Williams
  • 2 edits in trunk

[Xcode] Perform a full build when analyzing
https://bugs.webkit.org/show_bug.cgi?id=236421

Reviewed by Alexey Proskuryakov.

xcodebuild analyze does just enough work to run the analyzer on each target, and doesn't
appear to run build phases that only impact consumers of the target. In particular, it
doesn't copy framework headers.

Fix by telling xcodebuild to build _and_ analyze at once. AFAICT, this is exactly what
Xcode's Product > Analyze command does.

  • Makefile.shared: s/analyze/build analyze
3:11 PM Changeset in webkit [289586] by Russell Epstein
  • 1 copy in tags/Safari-613.1.17

Tag Safari-613.1.17.

3:09 PM Changeset in webkit [289585] by Russell Epstein
  • 2 edits in branches/safari-613-branch

Cherry-pick r288434. rdar://problem/56436745

texImage2d fails to set same video frame to multiple textures
https://bugs.webkit.org/show_bug.cgi?id=203148
<rdar://problem/56436745>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-01-24
Reviewed by Darin Adler.

Source/WebCore:

WebGL optimizes repeated video uploads to same texture, due to this being
usual practice among pages. Reason is that there are no API to know when the
video frame updates.
The algorithm was:

  • If the IOSurface is the same as in the last call
  • If the texture contents has not changed since we last modified this texture then skip the upload.

However, this logic skips errorneously if the "last call" updates some other texture.
Fix and test the above.

There are other issues for the current algorithm. This patch fixes some other theoretical ones:

  • If the texture is deleted and new one gets assigned the same texture id and the content seed would clash
  • Video was uploaded to a different level

The previous implementation was keeping per-texture seed value map in the context
(GraphicsContextGLANGLE) and per-teture seed value map in the texture upload helper
(GraphicsContextGLCVCocoa) and last uploaded IOSurface seed in the upload helper (not per
texture).

The implementation in this patch keeps per-texture known content description in the texture
upload helper and invalidates this when each texture changes. The known content description
is the parameter list of the texture upload call.

Test: webgl/pending/conformance/textures/misc/tex-image-video-repeated.html

  • platform/graphics/GraphicsContextGLState.h: (WebCore::GraphicsContextGLState::setBoundTexture):
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLANGLE::texImage2D): (WebCore::GraphicsContextGLANGLE::texSubImage2D): (WebCore::GraphicsContextGLANGLE::compressedTexImage2D): (WebCore::GraphicsContextGLANGLE::compressedTexSubImage2D): (WebCore::GraphicsContextGLANGLE::texStorage2D): (WebCore::GraphicsContextGLANGLE::texStorage3D): (WebCore::GraphicsContextGLANGLE::texImage2DDirect): (WebCore::GraphicsContextGLANGLE::framebufferTexture2D): (WebCore::GraphicsContextGLANGLE::createTexture): (WebCore::GraphicsContextGLANGLE::deleteTexture): (WebCore::GraphicsContextGLANGLE::invalidateKnownTextureContent): (WebCore::GraphicsContextGLANGLE::textureSeed): Deleted.
  • platform/graphics/angle/GraphicsContextGLANGLE.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm: (WebCore::GraphicsContextGLCocoa::invalidateKnownTextureContent):
  • platform/graphics/cv/GraphicsContextGLCVCocoa.cpp: (WebCore::GraphicsContextGLCVCocoa::TextureContent::operator== const): (WebCore::GraphicsContextGLCVCocoa::copyVideoSampleToTexture): (WebCore::GraphicsContextGLCVCocoa::invalidateKnownTextureContent):
  • platform/graphics/cv/GraphicsContextGLCVCocoa.h:

LayoutTests:

Add a test for testing the bug in which some video texture uploads
were skipped errorneously.

  • webgl/pending/conformance/textures/misc/tex-image-video-repeated.html: Added.
  • webgl/pending/conformance/textures/misc/tex-image-video-repeated-expected.txt: Added.
  • webgl/pending/resources/webgl_test_files/conformance/textures/misc/tex-image-video-repeated.html: Added.

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

3:07 PM Changeset in webkit [289584] by Elliott Williams
  • 4 edits in trunk

Use of unversioned 'python' in Mac builds causing failures in 12.3
https://bugs.webkit.org/show_bug.cgi?id=236327

Reviewed by Jonathan Bedard.

  • WebKit.xcodeproj/project.pbxproj: python -> python3 in "Replace WebKitAdditions in

Framework Headers" phase.

3:02 PM Changeset in webkit [289583] by Elliott Williams
  • 3 edits
    1 delete in trunk/Source/WTF

Reland native Xcode build phases for "Copy WTF Headers", again
https://bugs.webkit.org/show_bug.cgi?id=235744

Reviewed by Alexey Proskuryakov.

Changes since revert of r289490:

Some WTF headers were never tracked in WTF.xcodeproj, causing builds to fail (but only after
a build directory was cleaned and stale headers removed).

  • WTF.xcodeproj/project.pbxproj: Add file references for missing headers.
2:56 PM Changeset in webkit [289582] by Russell Epstein
  • 1 copy in tags/Safari-613.1.16.1.6

Tag Safari-613.1.16.1.6.

2:55 PM Changeset in webkit [289581] by Russell Epstein
  • 1 copy in tags/Safari-613.1.16.0.6

Tag Safari-613.1.16.0.6.

2:48 PM Changeset in webkit [289580] by commit-queue@webkit.org
  • 22 edits in trunk/Source

ImageBuffer::get/putPixelBuffer should not go through DisplayList
https://bugs.webkit.org/show_bug.cgi?id=236305

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-10
Reviewed by Geoffrey Garen.

Source/WebCore:

Remove GetPixelBuffer / PutPixelBuffer from display list implementation.
Display lists are about GraphicsContext commands.
GetPixelBuffer and PutPixelBuffer are ImageBuffer operations.
Especially GetPixelBuffer does not make sense as a display list item,
and in its current form it does not have parameters to propagate the information
other than to a global variables, like the WebKit side GPUP implementation does.
It is undefined what would two GetPixelBuffer commands one after another mean
in a display list.

The operations in the wrong layer make the correct implementation harder than
neccessary. In this case, GetPixelBuffer is a read operation, but in current
implementation it was invoked by Flush, e.g. GetPixelBuffer would be inside
a section of commands being flushed. Flush is a write operation. As such
it would create a get of unflushed content.

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::append):

  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:

(WebCore::DisplayList::ItemHandle::apply):
(WebCore::DisplayList::ItemHandle::destroy):
(WebCore::DisplayList::ItemHandle::safeCopy const):

  • platform/graphics/displaylists/DisplayListItemType.cpp:

(WebCore::DisplayList::sizeOfItemInBytes):
(WebCore::DisplayList::isDrawingItem):
(WebCore::DisplayList::isInlineItem):

  • platform/graphics/displaylists/DisplayListItemType.h:
  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::operator<<):

  • platform/graphics/displaylists/DisplayListItems.h:
  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
  • platform/graphics/displaylists/DisplayListRecorderImpl.h:

Source/WebKit:

Move code that carries out RemoteImageBufferProxy GetPixelBuffer, PutPixelBuffer
from the display list playback to RemoteImageBuffer implementation
in RemoteRenderingBackend, the same place that hosts other
RemoteImageBuffer function invocations.

This makes it possible in the future to mark GetPixelBuffer as a read operation
depending on the previous write operations. Previously GetPixelBuffer was recorded
to the display list before the display list was flushed, which is semantically wrong
and in practice would cause inverted references.

Simplify the protocol to implement the GetPixelBuffer. Previously it was:

  • If GPUP does not have the semaphore and the shm, ask for GPUP to send them, sync
  • Else if GPUP does not have the semaphore, ask for GPUP to send it, sync
  • Else if GPUP does not have the shm send, ask for GPUP to send it, sync
  • Send the GetPixelBuffer message via stream async
  • Wait for the semaphore

After it is:

  • If GPUP does not have the shm send GetPixelBuffer with the shm, sync
  • Else send the GetPixelBuffer via stream sync

There's no point in sending a semaphore, the stream sync message is
just a wait on the stream semaphore. Also, since semaphores
might have spurious wakeups, it is not enough of a protocol to wait a
plain semaphore.

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
  • GPUProcess/graphics/RemoteDisplayListRecorder.h:
  • GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::getPixelBufferForImageBuffer):
(WebKit::RemoteRenderingBackend::getPixelBufferForImageBufferWithNewMemory):
(WebKit::RemoteRenderingBackend::putPixelBufferForImageBuffer):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteRenderingBackend.messages.in:
  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::gpuProcessConnectionDidClose):
(WebKit::RemoteRenderingBackendProxy::getPixelBufferForImageBuffer):
(WebKit::RemoteRenderingBackendProxy::putPixelBufferForImageBuffer):
(WebKit::RemoteRenderingBackendProxy::updateSharedMemoryForGetPixelBuffer):
(WebKit::RemoteRenderingBackendProxy::destroyGetPixelBufferSharedMemory):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
2:34 PM Changeset in webkit [289579] by fpizlo@apple.com
  • 79 edits
    10 adds in trunk/Source/bmalloc

[libpas] it should be possible to decommit unused parts of a thread_local_cache (update to 78508e79fa2797680344d43b94841ae2e903b15b)
https://bugs.webkit.org/show_bug.cgi?id=235347

Reviewed by Yusuke Suzuki.

Libpas uses TLCs (thread_local_caches) for allocation and deallocation. Each size class in each heap
gets a local allocator and possibly a local view cache. Both local allocators and local view caches
can get quite large (100s of bytes). So, if you try to support full isoheaps (bug 231938), you end up
with ginormous TLCs and that accounts for a lot of the memory overhead of full isoheaps.

This change takes a big bite out of that overhead by enabling decommit of TLC pages:

  • Any page within a TLC that has nothing but stopped allocators (or view caches; I'll just say "allocators" to mean both "local allocators" and "local view caches", as I do in the code) can get decommitted by the scavenger.
  • TLC page decommit just requires holding the TLC's scavenger_lock (formerly known as the log_flush_lock) and the heap_lock. You don't have to suspend the thread (but suspension could have been used to stop the allocator, as before).
  • Attempts to allocate using an allocator in a decommitted page are guaranteed to go down a slow path that commits the page and rematerializes the allocator.
  • This doesn't require any page alignment of allocators. Allocators can straddle pages.

This seems to be perf-neutral on trunk. It offers a ~1.5% memory improvement for bug 231938.

  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • libpas/libpas.xcodeproj/project.pbxproj:
  • libpas/src/libpas/bmalloc_heap.c:

(bmalloc_flex_heap_ref_get_heap):
(bmalloc_auxiliary_heap_ref_get_heap):
(bmalloc_get_heap):

  • libpas/src/libpas/bmalloc_heap.h:
  • libpas/src/libpas/bmalloc_heap_config.h:
  • libpas/src/libpas/jit_heap_config.c:

(jit_aligned_allocator):

  • libpas/src/libpas/jit_heap_config.h:
  • libpas/src/libpas/minalign32_heap_config.h:
  • libpas/src/libpas/pas_bitfit_allocator.c:

(pas_bitfit_allocator_construct):
(pas_bitfit_allocator_stop):
(pas_bitfit_allocator_commit_view):
(pas_bitfit_allocator_finish_failing):

  • libpas/src/libpas/pas_bitfit_allocator.h:
  • libpas/src/libpas/pas_bitfit_allocator_inlines.h:

(pas_bitfit_allocator_try_allocate):

  • libpas/src/libpas/pas_bitfit_directory.c:

(pas_bitfit_directory_take_last_empty):

  • libpas/src/libpas/pas_bitfit_page_config.h:
  • libpas/src/libpas/pas_bitfit_page_config_inlines.h:
  • libpas/src/libpas/pas_bitfit_page_inlines.h:

(pas_bitfit_page_allocation_commit_granules_or_reloop):

  • libpas/src/libpas/pas_commit_span.c:

(pas_commit_span_construct):
(commit):
(pas_commit_span_add_unchanged_and_commit):
(decommit):

  • libpas/src/libpas/pas_commit_span.h:
  • libpas/src/libpas/pas_committed_pages_vector.c: Added.

(pas_committed_pages_vector_construct):
(pas_committed_pages_vector_destruct):
(pas_committed_pages_vector_count_committed):
(pas_count_committed_pages):

  • libpas/src/libpas/pas_committed_pages_vector.h: Added.

(pas_committed_pages_vector_is_committed):

  • libpas/src/libpas/pas_compact_tagged_ptr.h:
  • libpas/src/libpas/pas_compact_thread_local_cache_layout_node.h: Added.
  • libpas/src/libpas/pas_decommit_exclusion_range.h: Added.

(pas_decommit_exclusion_range_is_empty):
(pas_decommit_exclusion_range_is_contiguous):
(pas_decommit_exclusion_range_is_inverted):
(pas_decommit_exclusion_range_create_inverted):

  • libpas/src/libpas/pas_deferred_decommit_log.c:

(decommit_all):

  • libpas/src/libpas/pas_expendable_memory.c:

(pas_expendable_memory_state_version_next):
(pas_expendable_memory_construct):
(pas_expendable_memory_commit_if_necessary):
(scavenge_impl):
(pas_expendable_memory_scavenge):

  • libpas/src/libpas/pas_expendable_memory.h:
  • libpas/src/libpas/pas_free_granules.c:

(pas_free_granules_decommit_after_locking_range):

  • libpas/src/libpas/pas_heap.c:

(pas_heap_get_type_size):
(pas_heap_get_type_alignment):

  • libpas/src/libpas/pas_heap.h:
  • libpas/src/libpas/pas_heap_config.h:
  • libpas/src/libpas/pas_heap_config_utils.c:

(pas_heap_config_utils_allocate_aligned):

  • libpas/src/libpas/pas_heap_config_utils.h:
  • libpas/src/libpas/pas_heap_ref.c:

(pas_ensure_heap_slow):

  • libpas/src/libpas/pas_internal_config.h:
  • libpas/src/libpas/pas_large_free_heap_deferred_commit_log.c:

(pas_large_free_heap_deferred_commit_log_construct):
(pas_large_free_heap_deferred_commit_log_destruct):
(pas_large_free_heap_deferred_commit_log_add):
(commit):
(commit_all):

  • libpas/src/libpas/pas_large_free_heap_deferred_commit_log.h:
  • libpas/src/libpas/pas_large_free_heap_helpers.c:

(large_utility_aligned_allocator):
(pas_large_free_heap_helpers_try_allocate_with_alignment):
(pas_large_free_heap_helpers_deallocate):

  • libpas/src/libpas/pas_large_heap.c:

(allocate_impl):
(pas_large_heap_try_deallocate):
(pas_large_heap_try_shrink):

  • libpas/src/libpas/pas_large_heap_physical_page_sharing_cache.c:

(large_aligned_allocator):
(pas_large_heap_physical_page_sharing_cache_try_allocate_with_alignment):

  • libpas/src/libpas/pas_large_heap_physical_page_sharing_cache.h:
  • libpas/src/libpas/pas_large_sharing_pool.c:

(create_node):
(create_and_insert):
(boot_tree):
(states_match):
(split_node_and_get_right_impl):
(try_splat_impl):
(try_splat):
(splat):
(pas_large_sharing_pool_boot_free):
(pas_large_sharing_pool_free):
(pas_large_sharing_pool_allocate_and_commit):
(pas_large_sharing_pool_decommit_least_recently_used):

  • libpas/src/libpas/pas_large_sharing_pool.h:
  • libpas/src/libpas/pas_large_virtual_range.h: Added.

(pas_large_virtual_range_create):
(pas_large_virtual_range_create_empty):
(pas_large_virtual_range_get_range):
(pas_large_virtual_range_is_empty):
(pas_large_virtual_range_size):
(pas_large_virtual_range_overlaps):

  • libpas/src/libpas/pas_large_virtual_range_min_heap.h: Added.

(pas_large_virtual_range_compare_begin):
(pas_large_virtual_range_get_index):
(pas_large_virtual_range_set_index):

  • libpas/src/libpas/pas_local_allocator.c:

(pas_local_allocator_construct):
(pas_local_allocator_move):
(stop_impl):
(pas_local_allocator_stop):

  • libpas/src/libpas/pas_local_allocator_inlines.h:

(pas_local_allocator_commit_if_necessary_impl):
(pas_local_allocator_commit_if_necessary):
(pas_local_allocator_bless_primordial_partial_view_before_stopping):
(pas_local_allocator_refill_with_known_config):
(pas_local_allocator_try_allocate_small_segregated_slow_impl):
(pas_local_allocator_try_allocate_out_of_line_cases):
(pas_local_allocator_try_allocate_slow_impl):

  • libpas/src/libpas/pas_local_allocator_kind.h:

(pas_local_allocator_kind_get_string):
(pas_local_allocator_kind_is_stopped):

  • libpas/src/libpas/pas_local_allocator_scavenger_data.c:

(pas_local_allocator_scavenger_data_is_stopped):
(pas_local_allocator_scavenger_data_commit_if_necessary_slow):
(pas_local_allocator_scavenger_data_stop):
(pas_local_allocator_scavenger_data_prepare_to_decommit):
(pas_local_allocator_scavenger_data_is_active): Deleted.

  • libpas/src/libpas/pas_local_allocator_scavenger_data.h:
  • libpas/src/libpas/pas_local_view_cache.c:

(pas_local_view_cache_construct):
(pas_local_view_cache_move):
(pas_local_view_cache_stop):
(pas_local_view_cache_did_restart):

  • libpas/src/libpas/pas_local_view_cache.h:

(pas_local_view_cache_get_state):
(pas_local_view_cache_set_state):
(pas_local_view_cache_is_full):
(pas_local_view_cache_can_push):
(pas_local_view_cache_is_empty):
(pas_local_view_cache_prepare_to_pop):
(pas_local_view_cache_prepare_to_push):
(pas_local_view_cache_pop):
(pas_local_view_cache_push):

  • libpas/src/libpas/pas_lock.h:
  • libpas/src/libpas/pas_mmap_capability.h: Added.

(pas_mmap_capability_get_string):

  • libpas/src/libpas/pas_page_malloc.c:

(pas_page_malloc_alignment_slow):
(pas_page_malloc_alignment_shift_slow):
(pas_page_malloc_zero_fill):
(commit_impl):
(pas_page_malloc_commit):
(pas_page_malloc_commit_without_mprotect):
(decommit_impl):
(pas_page_malloc_decommit):
(pas_page_malloc_decommit_without_mprotect):
(pas_page_malloc_decommit_asymmetric): Deleted.

  • libpas/src/libpas/pas_page_malloc.h:
  • libpas/src/libpas/pas_scavenger.c:

(handle_expendable_memory):
(scavenger_thread_main):
(pas_scavenger_decommit_expendable_memory):
(pas_scavenger_fake_decommit_expendable_memory):

  • libpas/src/libpas/pas_scavenger.h:
  • libpas/src/libpas/pas_segregated_exclusive_view.c:

(pas_segregated_exclusive_view_create):

  • libpas/src/libpas/pas_segregated_exclusive_view.h:
  • libpas/src/libpas/pas_segregated_exclusive_view_inlines.h:

(pas_segregated_exclusive_view_note_eligibility):

  • libpas/src/libpas/pas_segregated_heap.c:

(medium_directory_tuple_for_index_impl):
(pas_segregated_heap_medium_directory_tuple_for_index):
(pas_segregated_heap_medium_allocator_index_for_index):
(recompute_size_lookup):
(rematerialize_size_lookup_set_medium_directory_tuple):
(pas_segregated_heap_ensure_allocator_index):
(check_size_lookup_recomputation_set_medium_directory_tuple):
(check_size_lookup_recomputation_dump_directory):
(check_size_lookup_recomputation):
(check_size_lookup_recomputation_if_appropriate):
(pas_segregated_heap_ensure_size_directory_for_size):

  • libpas/src/libpas/pas_segregated_heap.h:
  • libpas/src/libpas/pas_segregated_heap_inlines.h:

(pas_segregated_heap_touch_lookup_tables):

  • libpas/src/libpas/pas_segregated_page.c:

(pas_segregated_page_take_physically):
(pas_segregated_page_commit_fully):

  • libpas/src/libpas/pas_segregated_page_inlines.h:

(pas_segregated_page_log_or_deallocate):

  • libpas/src/libpas/pas_segregated_partial_view.c:

(pas_segregated_partial_view_create):
(compute_summary):

  • libpas/src/libpas/pas_segregated_partial_view.h:
  • libpas/src/libpas/pas_segregated_shared_page_directory.c:

(take_last_empty_consider_view):

  • libpas/src/libpas/pas_segregated_shared_view.c:

(pas_segregated_shared_view_create):
(pas_segregated_shared_view_commit_page):
(compute_summary):

  • libpas/src/libpas/pas_segregated_shared_view.h:
  • libpas/src/libpas/pas_segregated_size_directory.c:

(take_last_empty_consider_view):

  • libpas/src/libpas/pas_segregated_size_directory.h:

(pas_segregated_size_directory_get_tlc_allocator_index):

  • libpas/src/libpas/pas_segregated_view_allocator_inlines.h:

(pas_segregated_view_will_start_allocating):

  • libpas/src/libpas/pas_status_reporter.c:

(dump_large_sharing_pool_node_callback):
(pas_status_reporter_dump_view_stats):
(allocator_state):
(dump_allocator_state):
(dump_scavenger_data_state):
(pas_status_reporter_dump_baseline_allocators):
(pas_status_reporter_dump_thread_local_caches):
(pas_status_reporter_dump_everything):

  • libpas/src/libpas/pas_status_reporter.h:
  • libpas/src/libpas/pas_thread_local_cache.c:

(pas_thread_local_cache_size_for_allocator_index_capacity):
(num_pages):
(compute_page_indices):
(pages_committed_size):
(deallocate):
(allocate_cache):
(pas_thread_local_cache_create):
(pas_thread_local_cache_destroy):
(pas_thread_local_cache_get_local_allocator_slow):
(pas_thread_local_cache_is_committed):
(pas_thread_local_cache_compute_decommit_exclusion_range):
(pas_thread_local_cache_ensure_committed):
(pas_thread_local_cache_allocator_index_for_allocator):
(pas_thread_local_cache_stop_local_allocators):
(flush_deallocation_log_without_resetting):
(flush_deallocation_log_for_scavenger):
(flush_deallocation_log_with_mode):
(pas_thread_local_cache_flush_deallocation_log):
(pas_thread_local_cache_flush_deallocation_log_direct):
(suspend):
(resume):
(decommit_allocator_range):
(stop_allocator):
(pas_thread_local_cache_for_all):
(pas_thread_local_cache_shrink):
(flush_deallocation_log): Deleted.

  • libpas/src/libpas/pas_thread_local_cache.h:

(pas_thread_local_cache_offset_of_allocator):

  • libpas/src/libpas/pas_thread_local_cache_layout.c:

(pas_thread_local_cache_layout_add_node):
(pas_thread_local_cache_layout_get_node_for_index):

  • libpas/src/libpas/pas_thread_local_cache_layout.h:
  • libpas/src/libpas/pas_thread_local_cache_layout_entry.h: Added.

(pas_thread_local_cache_layout_entry_create_empty):
(pas_thread_local_cache_layout_entry_create_deleted):
(pas_thread_local_cache_layout_entry_is_empty_or_deleted):
(pas_thread_local_cache_layout_entry_is_empty):
(pas_thread_local_cache_layout_entry_is_deleted):
(pas_thread_local_cache_layout_entry_get_key):
(pas_thread_local_cache_layout_key_get_hash):
(pas_thread_local_cache_layout_key_is_equal):

  • libpas/src/libpas/pas_thread_local_cache_layout_node.c:

(pas_thread_local_cache_layout_node_num_allocator_indices):
(pas_thread_local_cache_layout_node_commit_and_construct):
(pas_thread_local_cache_layout_node_move):
(pas_thread_local_cache_layout_node_is_committed):
(pas_thread_local_cache_layout_node_ensure_committed):
(pas_thread_local_cache_layout_node_prepare_to_decommit):
(pas_thread_local_cache_layout_num_allocator_indices): Deleted.
(pas_thread_local_cache_layout_node_construct): Deleted.

  • libpas/src/libpas/pas_thread_local_cache_layout_node.h:
  • libpas/src/libpas/pas_thread_local_cache_node.c:

(pas_thread_local_cache_node_allocate):

  • libpas/src/libpas/pas_thread_local_cache_node.h:
  • libpas/src/libpas/pas_try_allocate_intrinsic.h:

(pas_try_allocate_intrinsic_impl_casual_case):
(pas_try_allocate_intrinsic_impl_inline_only):

  • libpas/src/libpas/pas_try_allocate_primitive.h:

(pas_try_allocate_primitive_impl_casual_case):
(pas_try_allocate_primitive_impl_inline_only):

  • libpas/src/libpas/pas_utility_heap_config.h:
  • libpas/src/libpas/pas_utils.h:
  • libpas/src/libpas/pas_virtual_range.h:

(pas_virtual_range_create):
(pas_virtual_range_create_empty):

  • libpas/src/test/ExpendableMemoryTests.cpp:

(std::testRage):
(std::testRematerializeAfterSearchOfDecommitted):
(std::testBasicSizeClass):
(addExpendableMemoryTests):

  • libpas/src/test/LargeSharingPoolTests.cpp:

(std::testGoodCoalesceEpochUpdate):

  • libpas/src/test/MemalignTests.cpp: Added.

(addMemalignTests):

  • libpas/src/test/TLCDecommitTests.cpp: Added.

(std::numCommittedPagesInTLC):
(std::testTLCDecommit):
(std::testChaosThenDecommit):
(std::testTLCDecommitThenDestroyImpl):
(std::testTLCDecommitThenDestroy):
(std::testTLCDecommitThenDestroyInThread):
(std::testTLCDecommitThenFlush):
(std::testTLCDecommitThenDeallocate):
(addTLCDecommitTests):

  • libpas/src/test/TestHarness.cpp:

(RuntimeConfigTestScope::RuntimeConfigTestScope):
(DecommitZeroFill::DecommitZeroFill):
(main):

  • libpas/src/test/TestHarness.h:

(operator<<):

  • libpas/src/test/ThingyAndUtilityHeapAllocationTests.cpp:

(std::addAllTests):

2:23 PM Changeset in webkit [289578] by Devin Rousso
  • 39 edits
    1 delete in trunk

Permit simultaneous Apple Pay and script injection
https://bugs.webkit.org/show_bug.cgi?id=236254
<rdar://problem/87736727>

Reviewed by Kate Cheney.

Source/WebCore:

Tests: ApplePay.ApplePayAvailableByDefault

ApplePay.ApplePayAvailableInFrame
ApplePay.UserScriptAtDocumentStartDoesNotDisableApplePay
ApplePay.UserScriptAtDocumentEndDoesNotDisableApplePay
ApplePay.UserAgentScriptEvaluationDoesNotDisableApplePay
ApplePay.UserAgentScriptEvaluationDoesNotDisableApplePayInExistingObjects
ApplePay.CanMakePaymentsDoesNotBlockUserAgentScripts
ApplePay.CanMakePaymentsWithActiveCardDoesNotBlockUserAgentScripts
ApplePay.CanMakePaymentDoesNotBlockUserAgentScripts

  • dom/Document.h:
  • dom/Document.cpp:

(WebCore::Document::ensurePlugInsInjectedScript):
(WebCore::Document::hasEvaluatedUserAgentScripts const): Deleted.
(WebCore::Document::setHasEvaluatedUserAgentScripts): Deleted.
(WebCore::Document::isApplePayActive const): Deleted.
(WebCore::Document::setApplePayIsActive): Deleted.
Remove logic that tracks script injection activity.

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

(WebCore::ScriptController::executeUserAgentScriptInWorld):
(WebCore::ScriptController::executeAsynchronousUserAgentScriptInWorld):
(WebCore::ScriptController::executeUserAgentScriptInWorldInternal): Deleted.
(WebCore::ScriptController::shouldAllowUserAgentScripts const): Deleted.

  • loader/EmptyClients.cpp:

(WebCore::EmptyPaymentCoordinatorClient::supportsUnrestrictedApplePay): Deleted.

  • page/Frame.cpp:

(WebCore::Frame::injectUserScriptImmediately):
Remove logic that disables script injection after an Apple Pay session is started.

  • Modules/applepay/PaymentCoordinator.h:
  • Modules/applepay/PaymentCoordinator.cpp:

(WebCore::PaymentCoordinator::canMakePayments):
(WebCore::PaymentCoordinator::canMakePaymentsWithActiveCard):
(WebCore::PaymentCoordinator::beginPaymentSession):
(WebCore::PaymentCoordinator::shouldEnableApplePayAPIs const): Deleted.
(WebCore::PaymentCoordinator::setApplePayIsActiveIfAllowed const): Deleted.
(WebCore::PaymentCoordinator::shouldAllowUserAgentScripts const): Deleted.

  • Modules/applepay/PaymentCoordinatorClient.h:

(WebCore::PaymentCoordinatorClient::userAgentScriptsBlockedErrorMessage const): Deleted.
Remove logic that tracks Apple Pay activity.

  • Modules/applepay/ApplePaySession.idl:
  • Modules/applepay/PaymentSession.h:
  • Modules/applepay/PaymentSession.cpp:

(WebCore::PaymentSession::enabledForContext): Deleted.

  • Modules/paymentrequest/PaymentHandler.cpp:

(WebCore::PaymentHandler::enabledForContext): Deleted.

  • Modules/paymentrequest/PaymentRequest.idl:
  • Modules/paymentrequest/PaymentRequest.h:
  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::enabledForContext): Deleted.
Remove logic that disables ApplePaySession/PaymentRequest after script injection.

  • testing/Internals.idl:
  • testing/Internals.h:
  • testing/Internals.cpp:

(WebCore::Internals::setApplePayIsActive): Deleted.

  • testing/MockPaymentCoordinator.idl:
  • testing/MockPaymentCoordinator.h:

(WebCore::MockPaymentCoordinator::supportsUnrestrictedApplePay): Deleted.
(WebCore::MockPaymentCoordinator::setSupportsUnrestrictedApplePay): Deleted.
Remove testing support since all uses of these have been removed (above).

Source/WebKit:

  • WebProcess/ApplePay/WebPaymentCoordinator.h:
  • WebProcess/ApplePay/WebPaymentCoordinator.cpp:

(WebKit::WebPaymentCoordinator::supportsUnrestrictedApplePay const): Deleted.
(WebKit::WebPaymentCoordinator::userAgentScriptsBlockedErrorMessage const): Deleted.
Remove logic that tracks Apple Pay activity.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebPaymentCoordinatorClient.h:
  • WebCoreSupport/WebPaymentCoordinatorClient.mm:

(WebPaymentCoordinatorClient::supportsUnrestrictedApplePay const): Deleted.
Remove logic that tracks Apple Pay activity.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ApplePay.mm:

(TestWebKitAPI::TEST.ApplePay.ApplePayAvailableByDefault):
(TestWebKitAPI::TEST.ApplePay.ApplePayAvailableInFrame): Renamed from ApplePay.ApplePayAvailableInUnrestrictedClients.
(TestWebKitAPI::TEST.ApplePay.UserScriptAtDocumentStartDoesNotDisableApplePay): Renamed from ApplePay.UserScriptAtDocumentStartDisablesApplePay.
(TestWebKitAPI::TEST.ApplePay.UserScriptAtDocumentEndDoesNotDisableApplePay): Renamed from ApplePay.UserScriptAtDocumentEndDisablesApplePay.
(TestWebKitAPI::TEST.ApplePay.UserAgentScriptEvaluationDoesNotDisableApplePay): Renamed from ApplePay.UserAgentScriptEvaluationDisablesApplePay.
(TestWebKitAPI::TEST.ApplePay.UserAgentScriptEvaluationDoesNotDisableApplePayInExistingObjects): Renamed from ApplePay.UserAgentScriptEvaluationDisablesApplePayInExistingObjects.
(TestWebKitAPI::TEST.ApplePay.CanMakePaymentsDoesNotBlockUserAgentScripts): Renamed from ApplePay.CanMakePaymentsBlocksUserAgentScripts.
(TestWebKitAPI::TEST.ApplePay.CanMakePaymentsWithActiveCardDoesNotBlockUserAgentScripts): Renamed from ApplePay.CanMakePaymentsWithActiveCardBlocksUserAgentScripts.
(TestWebKitAPI::TEST.ApplePay.CanMakePaymentDoesNotBlockUserAgentScripts): Renamed from ApplePay.CanMakePaymentBlocksUserAgentScripts.
(TestWebKitAPI::TEST.ApplePay.ActiveSessionBlocksUserAgentScripts): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-active-session.html: Removed.
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-availability.html:
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-availability-existing-object.html:
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-availability-in-iframe.html:
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-can-make-payment.html:
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-can-make-payments.html:
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-can-make-payments-with-active-card.html:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2:21 PM Changeset in webkit [289577] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix linker errors when CG_DISPLAY_LIST_BACKED_IMAGE_BUFFER is enabled
https://bugs.webkit.org/show_bug.cgi?id=236455

Patch by Ada Chan <ada.chan@apple.com> on 2022-02-10
Reviewed by Tim Horton.

WebCore::GraphicsContext::createImageBuffer() and WebCore::GraphicsContext::createCompatibleImageBuffer()
are used in WebKit::GraphicsContextCGDisplayList and need to be exported

  • platform/graphics/GraphicsContext.h:
2:19 PM Changeset in webkit [289576] by aakash_jain@apple.com
  • 1 edit
    474 adds in trunk/Source/ThirdParty

Import PDF.js v2.12.313 to the WebKit repo
https://bugs.webkit.org/show_bug.cgi?id=236452

Patch by Tim Nguyen <ntim@apple.com> on 2022-02-10
Reviewed by Brent Fulgham.

Add bundle from https://mozilla.github.io/pdf.js/getting_started/#download (Modern browsers version)

Delete the following:

  • Sourcemaps (.js.map files)
  • Example PDF file (compressed.tracemonkey-pldi-09.pdf)
  • pdfjs/LICENSE: Added.
  • pdfjs/build/pdf.js: Added.

(webpackUniversalModuleDefinition):
(return.):
(return):

  • pdfjs/build/pdf.sandbox.js: Added.

(webpackUniversalModuleDefinition):
(return.):

  • pdfjs/build/pdf.worker.js: Added.

(webpackUniversalModuleDefinition):
(return.):
(return):

  • pdfjs/web/cmaps/78-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/78-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/78-H.bcmap: Added.
  • pdfjs/web/cmaps/78-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/78-RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/78-V.bcmap: Added.
  • pdfjs/web/cmaps/78ms-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/78ms-RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/83pv-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/90ms-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/90ms-RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/90msp-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/90msp-RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/90pv-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/90pv-RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/Add-H.bcmap: Added.
  • pdfjs/web/cmaps/Add-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/Add-RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/Add-V.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-0.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-1.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-2.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-3.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-4.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-5.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-6.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-UCS2.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-GB1-0.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-GB1-1.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-GB1-2.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-GB1-3.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-GB1-4.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-GB1-5.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-GB1-UCS2.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-0.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-1.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-2.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-3.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-4.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-5.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-6.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-UCS2.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Korea1-0.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Korea1-1.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Korea1-2.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Korea1-UCS2.bcmap: Added.
  • pdfjs/web/cmaps/B5-H.bcmap: Added.
  • pdfjs/web/cmaps/B5-V.bcmap: Added.
  • pdfjs/web/cmaps/B5pc-H.bcmap: Added.
  • pdfjs/web/cmaps/B5pc-V.bcmap: Added.
  • pdfjs/web/cmaps/CNS-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/CNS-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/CNS1-H.bcmap: Added.
  • pdfjs/web/cmaps/CNS1-V.bcmap: Added.
  • pdfjs/web/cmaps/CNS2-H.bcmap: Added.
  • pdfjs/web/cmaps/CNS2-V.bcmap: Added.
  • pdfjs/web/cmaps/ETHK-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/ETHK-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/ETen-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/ETen-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/ETenms-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/ETenms-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/Ext-H.bcmap: Added.
  • pdfjs/web/cmaps/Ext-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/Ext-RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/Ext-V.bcmap: Added.
  • pdfjs/web/cmaps/GB-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/GB-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/GB-H.bcmap: Added.
  • pdfjs/web/cmaps/GB-V.bcmap: Added.
  • pdfjs/web/cmaps/GBK-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/GBK-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/GBK2K-H.bcmap: Added.
  • pdfjs/web/cmaps/GBK2K-V.bcmap: Added.
  • pdfjs/web/cmaps/GBKp-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/GBKp-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/GBT-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/GBT-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/GBT-H.bcmap: Added.
  • pdfjs/web/cmaps/GBT-V.bcmap: Added.
  • pdfjs/web/cmaps/GBTpc-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/GBTpc-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/GBpc-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/GBpc-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/H.bcmap: Added.
  • pdfjs/web/cmaps/HKdla-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/HKdla-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/HKdlb-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/HKdlb-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/HKgccs-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/HKgccs-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/HKm314-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/HKm314-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/HKm471-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/HKm471-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/HKscs-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/HKscs-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/Hankaku.bcmap: Added.
  • pdfjs/web/cmaps/Hiragana.bcmap: Added.
  • pdfjs/web/cmaps/KSC-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/KSC-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/KSC-H.bcmap: Added.
  • pdfjs/web/cmaps/KSC-Johab-H.bcmap: Added.
  • pdfjs/web/cmaps/KSC-Johab-V.bcmap: Added.
  • pdfjs/web/cmaps/KSC-V.bcmap: Added.
  • pdfjs/web/cmaps/KSCms-UHC-H.bcmap: Added.
  • pdfjs/web/cmaps/KSCms-UHC-HW-H.bcmap: Added.
  • pdfjs/web/cmaps/KSCms-UHC-HW-V.bcmap: Added.
  • pdfjs/web/cmaps/KSCms-UHC-V.bcmap: Added.
  • pdfjs/web/cmaps/KSCpc-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/KSCpc-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/Katakana.bcmap: Added.
  • pdfjs/web/cmaps/LICENSE: Added.
  • pdfjs/web/cmaps/NWP-H.bcmap: Added.
  • pdfjs/web/cmaps/NWP-V.bcmap: Added.
  • pdfjs/web/cmaps/RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/Roman.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UCS2-H.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UCS2-V.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UTF16-H.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UTF16-V.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UTF32-H.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UTF32-V.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UTF8-H.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UTF8-V.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UCS2-H.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UCS2-V.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UTF16-H.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UTF16-V.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UTF32-H.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UTF32-V.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UTF8-H.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UTF8-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UCS2-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UCS2-HW-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UCS2-HW-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UCS2-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UTF16-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UTF16-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UTF32-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UTF32-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UTF8-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UTF8-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS2004-UTF16-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS2004-UTF16-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS2004-UTF32-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS2004-UTF32-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS2004-UTF8-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS2004-UTF8-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJISPro-UCS2-HW-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJISPro-UCS2-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJISPro-UTF8-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJISX0213-UTF32-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJISX0213-UTF32-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJISX02132004-UTF32-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJISX02132004-UTF32-V.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UCS2-H.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UCS2-V.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UTF16-H.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UTF16-V.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UTF32-H.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UTF32-V.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UTF8-H.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UTF8-V.bcmap: Added.
  • pdfjs/web/cmaps/V.bcmap: Added.
  • pdfjs/web/cmaps/WP-Symbol.bcmap: Added.
  • pdfjs/web/debugger.js: Added.

(FontInspector.FontInspectorClosure.removeSelection):
(FontInspector.FontInspectorClosure.resetSelection):
(FontInspector.FontInspectorClosure.selectFont):
(FontInspector.FontInspectorClosure.textLayerClick):
(FontInspector.FontInspectorClosure.return.init):
(FontInspector.FontInspectorClosure.return.cleanup):
(FontInspector.FontInspectorClosure.return.get active):
(FontInspector.FontInspectorClosure.return.set active):
(FontInspector.FontInspectorClosure.return.properties):
(FontInspector.FontInspectorClosure.return.fontAdded):
(FontInspector):
(StepperManager.StepperManagerClosure.return.init):
(StepperManager.StepperManagerClosure.return.cleanup):
(StepperManager.StepperManagerClosure.return.create):
(StepperManager.StepperManagerClosure.return.selectStepper):
(StepperManager.StepperManagerClosure.return.saveBreakPoints):
(StepperManager):
(const.Stepper.StepperClosure.c):
(const.Stepper.StepperClosure.simplifyArgs):
(const.Stepper.StepperClosure.Stepper):
(const.Stepper.StepperClosure.Stepper.prototype.init):
(const.Stepper.StepperClosure.Stepper.prototype.updateOperatorList.cboxOnClick):
(const.Stepper.StepperClosure.Stepper.prototype.updateOperatorList):
(const.Stepper.StepperClosure.Stepper.prototype.getNextBreakPoint):
(const.Stepper.StepperClosure.Stepper.prototype.breakIt):
(const.Stepper.StepperClosure.Stepper.prototype.goTo):
(const.Stepper):
(Stats.Stats):
(Stats.Stats.getStatIndex):
(Stats):
(window.PDFBug):

  • pdfjs/web/images/annotation-check.svg: Added.
  • pdfjs/web/images/annotation-comment.svg: Added.
  • pdfjs/web/images/annotation-help.svg: Added.
  • pdfjs/web/images/annotation-insert.svg: Added.
  • pdfjs/web/images/annotation-key.svg: Added.
  • pdfjs/web/images/annotation-newparagraph.svg: Added.
  • pdfjs/web/images/annotation-noicon.svg: Added.
  • pdfjs/web/images/annotation-note.svg: Added.
  • pdfjs/web/images/annotation-paragraph.svg: Added.
  • pdfjs/web/images/findbarButton-next.svg: Added.
  • pdfjs/web/images/findbarButton-previous.svg: Added.
  • pdfjs/web/images/grab.cur: Added.
  • pdfjs/web/images/grabbing.cur: Added.
  • pdfjs/web/images/loading-dark.svg: Added.
  • pdfjs/web/images/loading-icon.gif: Added.
  • pdfjs/web/images/loading.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-documentProperties.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-firstPage.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-handTool.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-lastPage.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-rotateCcw.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-rotateCw.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-scrollHorizontal.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-scrollPage.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-scrollVertical.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-scrollWrapped.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-selectTool.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-spreadEven.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-spreadNone.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-spreadOdd.svg: Added.
  • pdfjs/web/images/shadow.png: Added.
  • pdfjs/web/images/toolbarButton-bookmark.svg: Added.
  • pdfjs/web/images/toolbarButton-currentOutlineItem.svg: Added.
  • pdfjs/web/images/toolbarButton-download.svg: Added.
  • pdfjs/web/images/toolbarButton-menuArrow.svg: Added.
  • pdfjs/web/images/toolbarButton-openFile.svg: Added.
  • pdfjs/web/images/toolbarButton-pageDown.svg: Added.
  • pdfjs/web/images/toolbarButton-pageUp.svg: Added.
  • pdfjs/web/images/toolbarButton-presentationMode.svg: Added.
  • pdfjs/web/images/toolbarButton-print.svg: Added.
  • pdfjs/web/images/toolbarButton-search.svg: Added.
  • pdfjs/web/images/toolbarButton-secondaryToolbarToggle.svg: Added.
  • pdfjs/web/images/toolbarButton-sidebarToggle.svg: Added.
  • pdfjs/web/images/toolbarButton-viewAttachments.svg: Added.
  • pdfjs/web/images/toolbarButton-viewLayers.svg: Added.
  • pdfjs/web/images/toolbarButton-viewOutline.svg: Added.
  • pdfjs/web/images/toolbarButton-viewThumbnail.svg: Added.
  • pdfjs/web/images/toolbarButton-zoomIn.svg: Added.
  • pdfjs/web/images/toolbarButton-zoomOut.svg: Added.
  • pdfjs/web/images/treeitem-collapsed.svg: Added.
  • pdfjs/web/images/treeitem-expanded.svg: Added.
  • pdfjs/web/locale/ach/viewer.properties: Added.
  • pdfjs/web/locale/af/viewer.properties: Added.
  • pdfjs/web/locale/an/viewer.properties: Added.
  • pdfjs/web/locale/ar/viewer.properties: Added.
  • pdfjs/web/locale/ast/viewer.properties: Added.
  • pdfjs/web/locale/az/viewer.properties: Added.
  • pdfjs/web/locale/be/viewer.properties: Added.
  • pdfjs/web/locale/bg/viewer.properties: Added.
  • pdfjs/web/locale/bn/viewer.properties: Added.
  • pdfjs/web/locale/bo/viewer.properties: Added.
  • pdfjs/web/locale/br/viewer.properties: Added.
  • pdfjs/web/locale/brx/viewer.properties: Added.
  • pdfjs/web/locale/bs/viewer.properties: Added.
  • pdfjs/web/locale/ca/viewer.properties: Added.
  • pdfjs/web/locale/cak/viewer.properties: Added.
  • pdfjs/web/locale/ckb/viewer.properties: Added.
  • pdfjs/web/locale/cs/viewer.properties: Added.
  • pdfjs/web/locale/cy/viewer.properties: Added.
  • pdfjs/web/locale/da/viewer.properties: Added.
  • pdfjs/web/locale/de/viewer.properties: Added.
  • pdfjs/web/locale/dsb/viewer.properties: Added.
  • pdfjs/web/locale/el/viewer.properties: Added.
  • pdfjs/web/locale/en-CA/viewer.properties: Added.
  • pdfjs/web/locale/en-GB/viewer.properties: Added.
  • pdfjs/web/locale/en-US/viewer.properties: Added.
  • pdfjs/web/locale/eo/viewer.properties: Added.
  • pdfjs/web/locale/es-AR/viewer.properties: Added.
  • pdfjs/web/locale/es-CL/viewer.properties: Added.
  • pdfjs/web/locale/es-ES/viewer.properties: Added.
  • pdfjs/web/locale/es-MX/viewer.properties: Added.
  • pdfjs/web/locale/et/viewer.properties: Added.
  • pdfjs/web/locale/eu/viewer.properties: Added.
  • pdfjs/web/locale/fa/viewer.properties: Added.
  • pdfjs/web/locale/ff/viewer.properties: Added.
  • pdfjs/web/locale/fi/viewer.properties: Added.
  • pdfjs/web/locale/fr/viewer.properties: Added.
  • pdfjs/web/locale/fy-NL/viewer.properties: Added.
  • pdfjs/web/locale/ga-IE/viewer.properties: Added.
  • pdfjs/web/locale/gd/viewer.properties: Added.
  • pdfjs/web/locale/gl/viewer.properties: Added.
  • pdfjs/web/locale/gn/viewer.properties: Added.
  • pdfjs/web/locale/gu-IN/viewer.properties: Added.
  • pdfjs/web/locale/he/viewer.properties: Added.
  • pdfjs/web/locale/hi-IN/viewer.properties: Added.
  • pdfjs/web/locale/hr/viewer.properties: Added.
  • pdfjs/web/locale/hsb/viewer.properties: Added.
  • pdfjs/web/locale/hu/viewer.properties: Added.
  • pdfjs/web/locale/hy-AM/viewer.properties: Added.
  • pdfjs/web/locale/hye/viewer.properties: Added.
  • pdfjs/web/locale/ia/viewer.properties: Added.
  • pdfjs/web/locale/id/viewer.properties: Added.
  • pdfjs/web/locale/is/viewer.properties: Added.
  • pdfjs/web/locale/it/viewer.properties: Added.
  • pdfjs/web/locale/ja/viewer.properties: Added.
  • pdfjs/web/locale/ka/viewer.properties: Added.
  • pdfjs/web/locale/kab/viewer.properties: Added.
  • pdfjs/web/locale/kk/viewer.properties: Added.
  • pdfjs/web/locale/km/viewer.properties: Added.
  • pdfjs/web/locale/kn/viewer.properties: Added.
  • pdfjs/web/locale/ko/viewer.properties: Added.
  • pdfjs/web/locale/lij/viewer.properties: Added.
  • pdfjs/web/locale/lo/viewer.properties: Added.
  • pdfjs/web/locale/locale.properties: Added.
  • pdfjs/web/locale/lt/viewer.properties: Added.
  • pdfjs/web/locale/ltg/viewer.properties: Added.
  • pdfjs/web/locale/lv/viewer.properties: Added.
  • pdfjs/web/locale/meh/viewer.properties: Added.
  • pdfjs/web/locale/mk/viewer.properties: Added.
  • pdfjs/web/locale/mr/viewer.properties: Added.
  • pdfjs/web/locale/ms/viewer.properties: Added.
  • pdfjs/web/locale/my/viewer.properties: Added.
  • pdfjs/web/locale/nb-NO/viewer.properties: Added.
  • pdfjs/web/locale/ne-NP/viewer.properties: Added.
  • pdfjs/web/locale/nl/viewer.properties: Added.
  • pdfjs/web/locale/nn-NO/viewer.properties: Added.
  • pdfjs/web/locale/oc/viewer.properties: Added.
  • pdfjs/web/locale/pa-IN/viewer.properties: Added.
  • pdfjs/web/locale/pl/viewer.properties: Added.
  • pdfjs/web/locale/pt-BR/viewer.properties: Added.
  • pdfjs/web/locale/pt-PT/viewer.properties: Added.
  • pdfjs/web/locale/rm/viewer.properties: Added.
  • pdfjs/web/locale/ro/viewer.properties: Added.
  • pdfjs/web/locale/ru/viewer.properties: Added.
  • pdfjs/web/locale/sat/viewer.properties: Added.
  • pdfjs/web/locale/sc/viewer.properties: Added.
  • pdfjs/web/locale/scn/viewer.properties: Added.
  • pdfjs/web/locale/sco/viewer.properties: Added.
  • pdfjs/web/locale/si/viewer.properties: Added.
  • pdfjs/web/locale/sk/viewer.properties: Added.
  • pdfjs/web/locale/sl/viewer.properties: Added.
  • pdfjs/web/locale/son/viewer.properties: Added.
  • pdfjs/web/locale/sq/viewer.properties: Added.
  • pdfjs/web/locale/sr/viewer.properties: Added.
  • pdfjs/web/locale/sv-SE/viewer.properties: Added.
  • pdfjs/web/locale/szl/viewer.properties: Added.
  • pdfjs/web/locale/ta/viewer.properties: Added.
  • pdfjs/web/locale/te/viewer.properties: Added.
  • pdfjs/web/locale/tg/viewer.properties: Added.
  • pdfjs/web/locale/th/viewer.properties: Added.
  • pdfjs/web/locale/tl/viewer.properties: Added.
  • pdfjs/web/locale/tr/viewer.properties: Added.
  • pdfjs/web/locale/trs/viewer.properties: Added.
  • pdfjs/web/locale/uk/viewer.properties: Added.
  • pdfjs/web/locale/ur/viewer.properties: Added.
  • pdfjs/web/locale/uz/viewer.properties: Added.
  • pdfjs/web/locale/vi/viewer.properties: Added.
  • pdfjs/web/locale/wo/viewer.properties: Added.
  • pdfjs/web/locale/xh/viewer.properties: Added.
  • pdfjs/web/locale/zh-CN/viewer.properties: Added.
  • pdfjs/web/locale/zh-TW/viewer.properties: Added.
  • pdfjs/web/standard_fonts/FoxitDingbats.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitFixed.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitFixedBold.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitFixedBoldItalic.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitFixedItalic.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSans.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSansBold.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSansBoldItalic.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSansItalic.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSerif.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSerifBold.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSerifBoldItalic.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSerifItalic.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSymbol.pfb: Added.
  • pdfjs/web/standard_fonts/LICENSE_FOXIT: Added.
  • pdfjs/web/standard_fonts/LICENSE_LIBERATION: Added.
  • pdfjs/web/standard_fonts/LiberationSans-Bold.ttf: Added.
  • pdfjs/web/standard_fonts/LiberationSans-BoldItalic.ttf: Added.
  • pdfjs/web/standard_fonts/LiberationSans-Italic.ttf: Added.
  • pdfjs/web/standard_fonts/LiberationSans-Regular.ttf: Added.
  • pdfjs/web/viewer.css: Added.

(.textLayer):
(.textLayer span,):
(.textLayer span.markedContent):
(.textLayer .highlight):
(.textLayer .highlight.appended):
(.textLayer .highlight.begin):
(.textLayer .highlight.end):
(.textLayer .highlight.middle):
(.textLayer .highlight.selected):
(.textLayer ::-moz-selection):
(.textLayer ::selection):
(.textLayer br::-moz-selection):
(.textLayer br::selection):
(.textLayer .endOfContent):
(.textLayer .endOfContent.active):
(:root):
(.annotationLayer section):
(.annotationLayer .linkAnnotation > a,):
(.annotationLayer .buttonWidgetAnnotation.pushButton > canvas):
(.annotationLayer .linkAnnotation > a:hover,):
(.annotationLayer .textAnnotation img):
(.annotationLayer .textWidgetAnnotation input,):
(.annotationLayer .choiceWidgetAnnotation select option):
(.annotationLayer .buttonWidgetAnnotation.radioButton input):
(.annotationLayer .textWidgetAnnotation textarea):
(.annotationLayer .textWidgetAnnotation input[disabled],):
(.annotationLayer .textWidgetAnnotation input:hover,):
(.annotationLayer .textWidgetAnnotation input:focus,):
(.annotationLayer .textWidgetAnnotation input :focus,):
(.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,):
(.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before):
(.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after):
(.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before):
(.annotationLayer .textWidgetAnnotation input.comb):
(.annotationLayer .textWidgetAnnotation input.comb:focus):
(.annotationLayer .buttonWidgetAnnotation.checkBox input,):
(.annotationLayer .popupWrapper):
(.annotationLayer .popup):
(.annotationLayer .popup > *):
(.annotationLayer .popup h1):
(.annotationLayer .popupDate):
(.annotationLayer .popupContent):
(.annotationLayer .richText > *):
(.annotationLayer .highlightAnnotation,):
(.xfaLayer .highlight):
(.xfaLayer .highlight.appended):
(.xfaLayer .highlight.begin):
(.xfaLayer .highlight.end):
(.xfaLayer .highlight.middle):
(.xfaLayer .highlight.selected):
(.xfaLayer ::-moz-selection):
(.xfaLayer ::selection):
(.xfaPage):
(.xfaContentarea):
(.xfaPrintOnly):
(.xfaLayer):
(.xfaLayer *):
(.xfaLayer div):
(.xfaLayer svg):
(.xfaLayer svg *):
(.xfaLayer a):
(.xfaRich li):
(.xfaFont):
(.xfaCaption):
(.xfaCaptionForCheckButton):
(.xfaLabel):
(.xfaLeft):
(.xfaRight):
(.xfaLeft > .xfaCaption,):
(.xfaTop):
(.xfaBottom):
(.xfaTop > .xfaCaption,):
(.xfaBorder):
(.xfaWrapped):
(.xfaTextfield:focus,):
(.xfaCheckbox:focus,):
(.xfaTextfield,):
(.xfaTop > .xfaTextfield,):
(.xfaButton):
(.xfaLink):
(.xfaCheckbox,):
(.xfaRich):
(.xfaImage):
(.xfaLrTb,):
(.xfaLr):
(.xfaRl):
(.xfaTb > div):
(.xfaPosition):
(.xfaArea):
(.xfaValignMiddle):
(.xfaTable):
(.xfaTable .xfaRow):
(.xfaTable .xfaRlRow):
(.xfaTable .xfaRlRow > div):
(.xfaNonInteractive input,):
(@media print .xfaTextfield,):
(@media print .xfaSelect):
(@media screen and (forced-colors: active) :root):
(.pdfViewer):
(.pdfViewer .canvasWrapper):
(.pdfViewer .page):
(.pdfViewer .dummyPage):
(.pdfViewer.removePageBorders .page):
(.pdfViewer.singlePageView):
(.pdfViewer.singlePageView .page):
(.pdfViewer.scrollHorizontal,):
(.pdfViewer.removePageBorders,):
(.spread .page,):
(.pdfViewer.removePageBorders .spread .page,):
(.pdfViewer .page canvas):
(.pdfViewer .page canvas[hidden]):
(.pdfViewer .page .loadingIcon):
(.pdfViewer .page .loadingIcon.notVisible):
(.pdfViewer.enablePermissions .textLayer span):
(.pdfPresentationMode .pdfViewer):
(.pdfPresentationMode .spread):
(.pdfPresentationMode .pdfViewer .page):
(@media (prefers-color-scheme: dark) :root):
(*):
(html):
(body):
(body,):
(.hidden):
([hidden]):
(#viewerContainer.pdfPresentationMode:-webkit-full-screen):
(#viewerContainer.pdfPresentationMode:fullscreen):
(.pdfPresentationMode:-webkit-full-screen a:not(.internalLink)):
(.pdfPresentationMode:fullscreen a:not(.internalLink)):
(.pdfPresentationMode:-webkit-full-screen .textLayer span):
(.pdfPresentationMode:fullscreen .textLayer span):
(.pdfPresentationMode.pdfPresentationModeControls > *,):
(#outerContainer):
(#sidebarContainer):
(html[dir="ltr"] #sidebarContainer):
(html[dir="rtl"] #sidebarContainer):
(#outerContainer.sidebarResizing #sidebarContainer):
(#outerContainer.sidebarMoving #sidebarContainer,):
(html[dir="ltr"] #outerContainer.sidebarOpen #sidebarContainer):
(html[dir="rtl"] #outerContainer.sidebarOpen #sidebarContainer):
(#mainContainer):
(#sidebarContent):
(html[dir="ltr"] #sidebarContent):
(html[dir="rtl"] #sidebarContent):
(#viewerContainer):
(#viewerContainer:not(.pdfPresentationMode)):
(#outerContainer.sidebarResizing #viewerContainer):
(html[dir="ltr"]):
(html[dir="rtl"]):
(.toolbar):
(#toolbarContainer):
(#toolbarSidebar):
(html[dir="ltr"] #toolbarSidebar):
(html[dir="rtl"] #toolbarSidebar):
(html[dir="ltr"] #toolbarSidebar .toolbarButton):
(html[dir="rtl"] #toolbarSidebar .toolbarButton):
(html[dir="ltr"] #toolbarSidebarRight .toolbarButton):
(html[dir="rtl"] #toolbarSidebarRight .toolbarButton):
(#sidebarResizer):
(html[dir="ltr"] #sidebarResizer):
(html[dir="rtl"] #sidebarResizer):
(#toolbarContainer,):
(#toolbarViewer):
(#loadingBar):
(html[dir="ltr"] #loadingBar):
(html[dir="rtl"] #loadingBar):
(html[dir="ltr"] #outerContainer.sidebarOpen #loadingBar):
(html[dir="rtl"] #outerContainer.sidebarOpen #loadingBar):
(#outerContainer.sidebarResizing #loadingBar):
(#loadingBar .progress):
(@-webkit-keyframes progressIndeterminate):
(100%):
(@keyframes progressIndeterminate):
(#loadingBar .progress.indeterminate):
(#loadingBar .progress.indeterminate .glimmer):
(.findbar,):
(.findbar):
(.findbar > div):
(.findbar.wrapContainers > div):
(.findbar.wrapContainers > div#findbarMessageContainer):
(html[dir="ltr"] .findbar):
(html[dir="rtl"] .findbar):
(.findbar .splitToolbarButton):
(html[dir="ltr"] .findbar .splitToolbarButton):
(html[dir="rtl"] .findbar .splitToolbarButton):
(.findbar .splitToolbarButton > .toolbarButton):
(.findbar .splitToolbarButton > .toolbarButton::before):
(.findbar .splitToolbarButton > .findNext):
(html[dir="ltr"] .findbar .splitToolbarButton > .findNext):
(html[dir="rtl"] .findbar .splitToolbarButton > .findNext):
(.findbar input[type="checkbox"]):
(.findbar label):
(.findbar label:hover,):
(html[dir="ltr"] #findInput):
(html[dir="rtl"] #findInput):
(.findbar .toolbarField[type="checkbox"]:checked + .toolbarLabel):
(#findInput):
(#findInput::-moz-placeholder):
(#findInput::placeholder):
(#findInput[data-status="pending"]):
(html[dir="rtl"] #findInput[data-status="pending"]):
(#findInput[data-status="notFound"]):
(.secondaryToolbar):
(html[dir="ltr"] .secondaryToolbar):
(html[dir="rtl"] .secondaryToolbar):
(#secondaryToolbarButtonContainer):
(.doorHanger,):
(.doorHanger:after,):
(.doorHanger:after):
(.doorHangerRight:after):
(.doorHanger:before,):
(html[dir="ltr"] .doorHanger:after,):
(html[dir="ltr"] .doorHanger:before,):
(html[dir="rtl"] .doorHanger:after,):
(html[dir="rtl"] .doorHanger:before,):
(#findResultsCount):
(#findMsg):
(#findMsg:empty):
(#toolbarViewerMiddle):
(html[dir="ltr"] #toolbarViewerLeft,):
(html[dir="ltr"] #toolbarViewerRight,):
(html[dir="ltr"] #toolbarViewerLeft > *,):
(html[dir="rtl"] #toolbarViewerLeft > *,):
(.splitToolbarButton):
(html[dir="ltr"] .splitToolbarButton > .toolbarButton):
(html[dir="rtl"] .splitToolbarButton > .toolbarButton):
(.toolbarButton,):
(.overlayButton:hover,):
(.overlayButton:hover > span,):
(.toolbarButton > span):
(.toolbarButton[disabled],):
(.splitToolbarButton.toggled .toolbarButton):
(.splitToolbarButton > .toolbarButton:hover,):
(.splitToolbarButton > .toolbarButton):
(html[dir="ltr"] .splitToolbarButton > .toolbarButton:first-child,):
(html[dir="ltr"] .splitToolbarButton > .toolbarButton:last-child,):
(.splitToolbarButtonSeparator):
(.findbar .splitToolbarButtonSeparator):
(html[dir="ltr"] .splitToolbarButtonSeparator):
(html[dir="rtl"] .splitToolbarButtonSeparator):
(html[dir="ltr"] #toolbarViewerLeft > .toolbarButton:first-child,):
(html[dir="ltr"] #toolbarViewerRight > .toolbarButton:last-child,):
(.toolbarButton:hover,):
(.secondaryToolbarButton:hover,):
(.toolbarButton.toggled,):
(.secondaryToolbarButton.toggled::before):
(.toolbarButton.toggled::before):
(.toolbarButton.toggled:hover:active,):
(.dropdownToolbarButton):
(.dropdownToolbarButton::after):
(html[dir="ltr"] .dropdownToolbarButton::after):
(html[dir="rtl"] .dropdownToolbarButton::after):
(.dropdownToolbarButton > select):
(html[dir="ltr"] .dropdownToolbarButton > select):
(html[dir="rtl"] .dropdownToolbarButton > select):
(.dropdownToolbarButton > select:hover,):
(.dropdownToolbarButton > select > option):
(#customScaleOption):
(#pageWidthOption):
(.toolbarButtonSpacer):
(.toolbarButton::before,):
(.dropdownToolbarButton:hover::after,):
(.toolbarButton::before):
(.toolbarButton:hover::before,):
(.secondaryToolbarButton::before):
(html[dir="ltr"] .secondaryToolbarButton::before):
(html[dir="rtl"] .secondaryToolbarButton::before):
(.toolbarButton#sidebarToggle::before):
(html[dir="rtl"] .toolbarButton#sidebarToggle::before):
(.toolbarButton#secondaryToolbarToggle::before):
(html[dir="rtl"] .toolbarButton#secondaryToolbarToggle::before):
(.toolbarButton.findPrevious::before):
(.toolbarButton.findNext::before):
(.toolbarButton.pageUp::before):
(.toolbarButton.pageDown::before):
(.toolbarButton.zoomOut::before):
(.toolbarButton.zoomIn::before):
(.toolbarButton.presentationMode::before,):
(.toolbarButton.print::before,):
(.toolbarButton.openFile::before,):
(.toolbarButton.download::before,):
(.secondaryToolbarButton.bookmark):
(.bookmark[href="#"]):
(.toolbarButton.bookmark::before,):
(#viewThumbnail.toolbarButton::before):
(#viewOutline.toolbarButton::before):
(html[dir="rtl"] #viewOutline.toolbarButton::before):
(#viewAttachments.toolbarButton::before):
(#viewLayers.toolbarButton::before):
(#currentOutlineItem.toolbarButton::before):
(html[dir="rtl"] #currentOutlineItem.toolbarButton::before):
(#viewFind.toolbarButton::before):
(.toolbarButton.pdfSidebarNotification::after):
(html[dir="ltr"] .toolbarButton.pdfSidebarNotification::after):
(html[dir="rtl"] .toolbarButton.pdfSidebarNotification::after):
(.secondaryToolbarButton):
(html[dir="ltr"] .secondaryToolbarButton):
(html[dir="rtl"] .secondaryToolbarButton):
(html[dir="ltr"] .secondaryToolbarButton > span):
(html[dir="rtl"] .secondaryToolbarButton > span):
(.secondaryToolbarButton.firstPage::before):
(.secondaryToolbarButton.lastPage::before):
(.secondaryToolbarButton.rotateCcw::before):
(.secondaryToolbarButton.rotateCw::before):
(.secondaryToolbarButton.selectTool::before):
(.secondaryToolbarButton.handTool::before):
(.secondaryToolbarButton.scrollPage::before):
(.secondaryToolbarButton.scrollVertical::before):
(.secondaryToolbarButton.scrollHorizontal::before):
(.secondaryToolbarButton.scrollWrapped::before):
(.secondaryToolbarButton.spreadNone::before):
(.secondaryToolbarButton.spreadOdd::before):
(.secondaryToolbarButton.spreadEven::before):
(.secondaryToolbarButton.documentProperties::before):
(.verticalToolbarSeparator):
(html[dir="ltr"] .verticalToolbarSeparator):
(html[dir="rtl"] .verticalToolbarSeparator):
(.horizontalToolbarSeparator):
(.toolbarField):
(.toolbarField[type="checkbox"]):
(html[dir="ltr"] .toolbarField[type="checkbox"]):
(html[dir="rtl"] .toolbarField[type="checkbox"]):
(.toolbarField.pageNumber):
(.toolbarField.pageNumber.visiblePageIsLoading):
(.toolbarField.pageNumber::-webkit-inner-spin-button,):
(.toolbarField:focus):
(.toolbarLabel):
(html[dir="ltr"] #numPages.toolbarLabel):
(html[dir="rtl"] #numPages.toolbarLabel):
(#thumbnailView):
(#thumbnailView > a:active,):
(.thumbnail):
(html[dir="ltr"] .thumbnail):
(html[dir="rtl"] .thumbnail):
(#thumbnailView > a:last-of-type > .thumbnail):
(#thumbnailView > a:last-of-type > .thumbnail:not([data-loaded])):
(.thumbnail:not([data-loaded])):
(.thumbnailImage):
(.thumbnailSelectionRing):
(a:focus > .thumbnail > .thumbnailSelectionRing > .thumbnailImage,):
(a:focus > .thumbnail > .thumbnailSelectionRing,):
(.thumbnail.selected > .thumbnailSelectionRing > .thumbnailImage):
(.thumbnail.selected > .thumbnailSelectionRing):
(#outlineView,):
(html[dir="ltr"] .treeWithDeepNesting > .treeItem,):
(html[dir="rtl"] .treeWithDeepNesting > .treeItem,):
(.treeItem > a):
(html[dir="ltr"] .treeItem > a):
(html[dir="rtl"] .treeItem > a):
(#layersView .treeItem > a > *):
(html[dir="ltr"] #layersView .treeItem > a > label):
(html[dir="rtl"] #layersView .treesItem > a > label):
(.treeItemToggler):
(.treeItemToggler::before):
(.treeItemToggler.treeItemsHidden::before):
(html[dir="rtl"] .treeItemToggler.treeItemsHidden::before):
(.treeItemToggler.treeItemsHidden ~ .treeItems):
(html[dir="ltr"] .treeItemToggler):
(html[dir="rtl"] .treeItemToggler):
(html[dir="ltr"] .treeItemToggler::before):
(html[dir="rtl"] .treeItemToggler::before):
(.treeItem.selected > a):
(.treeItemToggler:hover,):
(::-moz-selection):
(::selection):
(#errorWrapper):
(#errorMessageLeft):
(#errorMessageRight):
(#errorMoreInfo):
(.overlayButton):
(#overlayContainer):
(#overlayContainer > *):
(#overlayContainer > .container):
(#overlayContainer > .container > .dialog):
(.dialog > .row):
(.dialog > .row > *):
(.dialog .toolbarField):
(.dialog .separator):
(.dialog .buttonRow):
(.dialog :link):
(#passwordOverlay > .dialog):
(#passwordOverlay .toolbarField):
(#documentPropertiesOverlay > .dialog):
(#documentPropertiesOverlay .row > *):
(html[dir="ltr"] #documentPropertiesOverlay .row > *):
(html[dir="rtl"] #documentPropertiesOverlay .row > *):
(#documentPropertiesOverlay .row > span):
(#documentPropertiesOverlay .row > p):
(#documentPropertiesOverlay .buttonRow):
(.clearBoth):
(.fileInput):
(#PDFBug):
(#PDFBug .controls):
(#PDFBug .panels):
(#PDFBug .panels > div):
(#PDFBug button.active):
(.debuggerShowText):
(.debuggerHideText:hover):
(#PDFBug .stats):
(#PDFBug .stats .title):
(#PDFBug table):
(#PDFBug table.showText):
(#PDFBug table.showText,):
(#PDFBug table.showText td.advance):
(#viewer.textLayer-visible .textLayer):
(#viewer.textLayer-visible .canvasWrapper):
(#viewer.textLayer-visible .canvasWrapper canvas):
(#viewer.textLayer-visible .textLayer span):
(#viewer.textLayer-hover .textLayer span:hover):
(#viewer.textLayer-shadow .textLayer span):
(.grab-to-pan-grab):
(.grab-to-pan-grab:active,):
(@page):
(#printContainer):
(@media print body):
(@media print #sidebarContainer,):
(@media print #viewerContainer):
(@media print #mainContainer,):
(@media print .page):
(@media print .page[data-loaded]):
(@media print .fileInput):
(@media print body[data-pdfjsprinting] #outerContainer):
(@media print body[data-pdfjsprinting] #printContainer):
(@media print #printContainer):
(@media print #printContainer > .printedPage):
(@media print #printContainer > .xfaPrintedPage .xfaPage):
(@media print #printContainer > .xfaPrintedPage):
(@media print #printContainer > .printedPage canvas,):
(.visibleLargeView,):
(@media all and (max-width: 900px) #toolbarViewerMiddle):
(@media all and (max-width: 840px) #sidebarContainer):
(@media all and (max-width: 840px) html[dir="ltr"] #outerContainer.sidebarOpen #viewerContainer):
(@media all and (max-width: 840px) html[dir="rtl"] #outerContainer.sidebarOpen #viewerContainer):
(@media all and (max-width: 840px) #outerContainer .hiddenLargeView,):
(@media all and (max-width: 840px) #outerContainer .visibleLargeView,):
(@media all and (max-width: 770px) #outerContainer .hiddenLargeView):
(@media all and (max-width: 770px) #outerContainer .visibleLargeView):
(@media all and (max-width: 700px) #outerContainer .hiddenMediumView):
(@media all and (max-width: 700px) #outerContainer .visibleMediumView):
(@media all and (max-width: 640px) .hiddenSmallView,):
(@media all and (max-width: 640px) .visibleSmallView):
(@media all and (max-width: 640px) .toolbarButtonSpacer):
(@media all and (max-width: 640px) html[dir="ltr"] .findbar):
(@media all and (max-width: 640px) html[dir="rtl"] .findbar):
(@media all and (max-width: 535px) #scaleSelectContainer):

  • pdfjs/web/viewer.html: Added.
  • pdfjs/web/viewer.js: Added.

(exports.checkOnBlobSupport):
(exports.checkCanvasSizeLimitation):
(exports.AppOptions):
(exports.AppOptions.get const):
(exports.AppOptions.getAll):
(exports.AppOptions.set userOptions):
(exports.AppOptions.remove):
(exports.AppOptions._hasUserOptions):
(webpack_require.DefaultExternalServices):
(webpack_require.DefaultExternalServices.updateFindControlState):
(webpack_require.DefaultExternalServices.updateFindMatchesCount):
(webpack_require.DefaultExternalServices.initPassiveLoading):
(webpack_require.DefaultExternalServices.async fallback):
(webpack_require.DefaultExternalServices.reportTelemetry):
(webpack_require.DefaultExternalServices.createDownloadManager):
(webpack_require.DefaultExternalServices.createPreferences):
(webpack_require.DefaultExternalServices.createL10n):
(webpack_require.DefaultExternalServices.createScripting):
(webpack_require.DefaultExternalServices.get supportsIntegratedFind):
(webpack_require.DefaultExternalServices.get supportsDocumentFonts):
(webpack_require.DefaultExternalServices.get supportedMouseWheelZoomModifierKeys):
(webpack_require.DefaultExternalServices.get isInAutomation):
(webpack_require.const.PDFViewerApplication.async initialize):
(webpack_require.const.PDFViewerApplication.async _readPreferences):
(webpack_require.const.PDFViewerApplication.async _parseHashParameters):
(webpack_require.const.PDFViewerApplication.async _initializeL10n):
(webpack_require.const.PDFViewerApplication._forceCssTheme):
(webpack_require.const.PDFViewerApplication.async _initializeViewerComponents):
(webpack_require.const.PDFViewerApplication.run):
(webpack_require.const.PDFViewerApplication.get initialized):
(webpack_require.const.PDFViewerApplication.get initializedPromise):
(webpack_require.const.PDFViewerApplication.zoomIn):
(webpack_require.const.PDFViewerApplication.zoomOut):
(webpack_require.const.PDFViewerApplication.zoomReset):
(webpack_require.const.PDFViewerApplication.get pagesCount):
(webpack_require.const.PDFViewerApplication.get page):
(webpack_require.const.PDFViewerApplication.set page):
(webpack_require.const.PDFViewerApplication.get supportsPrinting):
(webpack_require.const.PDFViewerApplication.get supportsFullscreen):
(webpack_require.const.PDFViewerApplication.get supportsIntegratedFind):
(webpack_require.const.PDFViewerApplication.get supportsDocumentFonts):
(webpack_require.const.PDFViewerApplication.get loadingBar):
(webpack_require.const.PDFViewerApplication.get supportedMouseWheelZoomModifierKeys):
(webpack_require.const.PDFViewerApplication.initPassiveLoading):
(webpack_require.const.PDFViewerApplication.setTitleUsingUrl):
(webpack_require.const.PDFViewerApplication.setTitle):
(webpack_require.const.PDFViewerApplication.get _docFilename):
(webpack_require.const.PDFViewerApplication._hideViewBookmark):
(webpack_require.const.PDFViewerApplication._cancelIdleCallbacks):
(webpack_require.const.PDFViewerApplication.async close):
(webpack_require.const.PDFViewerApplication.async open):
(webpack_require.const.PDFViewerApplication._ensureDownloadComplete):
(webpack_require.const.PDFViewerApplication.async download):
(webpack_require.const.PDFViewerApplication.):
(webpack_require.):
(webpack_require):

2:17 PM Changeset in webkit [289575] by commit-queue@webkit.org
  • 10 edits in trunk

[GTK][WPE] Improve device detection in the GbmDevice
https://bugs.webkit.org/show_bug.cgi?id=236436

Patch by Alejandro G. Castro <alex@igalia.com> on 2022-02-10
Reviewed by Chris Lord.

.:

  • Source/cmake/OptionsGTK.cmake: Search for drm and gbm libraries

when compiling WebGL ANGLE support.

  • Source/cmake/OptionsWPE.cmake: Ditto.

Source/WebCore:

Use DRM library to detect the device location to create the gbm
device object.

No new tests, no change in behaviour.

  • PlatformGTK.cmake: Add gbm and drm include directories and

libraries to the compilation.

  • PlatformWPE.cmake: Ditto.
  • platform/graphics/angle/GraphicsContextGLANGLE.h: Avoid storing

a pointer to the gdb device, to make sure it is just in one place,

  • platform/graphics/gbm/GBMDevice.cpp:

(WebCore::GBMDevice::GBMDevice): Use the new getDeviceFd function
to open the device file. We just create the gbm device here.
(WebCore::GBMDevice::getDeviceFd): Added. Uses drm library to look
for the device file name and opens it.

  • platform/graphics/gbm/GBMDevice.h: Ditto
  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::GraphicsContextGLANGLE): Remove
the direct pointer to the gdb device, just request it when required.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::EGLImageBacking): Ditto.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::reset): Ditto.

2:09 PM Changeset in webkit [289574] by Andres Gonzalez
  • 3 edits in trunk/LayoutTests

Make accessibility/mac/line-index-for-textmarker.html run faster.
https://bugs.webkit.org/show_bug.cgi?id=236451
<rdar://problem/88763847>

Reviewed by Chris Fleizach.

The main cause of slowness seems to be the high number of calls to
debug(). So now it builds the output string and call debug() just once.

  • accessibility/mac/line-index-for-textmarker-expected.txt:
  • accessibility/mac/line-index-for-textmarker.html:
2:06 PM Changeset in webkit [289573] by achristensen@apple.com
  • 5 edits in trunk/Source

Unreviewed, reverting r289485.

Internal SDKs not quiiiite ready yet

Reverted changeset:

"Move Safe Browsing knowledge into SafariSafeBrowsing
framework"
https://bugs.webkit.org/show_bug.cgi?id=231692
https://commits.webkit.org/r289485

1:09 PM Changeset in webkit [289572] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Adjust bidi (and mostly RTL) coords to support vertical writing mode
https://bugs.webkit.org/show_bug.cgi?id=236413

Reviewed by Antti Koivisto.

Add more coordinate flips to the bidi codepath to support vertical writing mode.

  • layout/formattingContexts/inline/display/InlineDisplayBox.h:

(WebCore::InlineDisplay::Box::setRight):
(WebCore::InlineDisplay::Box::setTop):
(WebCore::InlineDisplay::Box::setBottom):

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox): Convert "inline direction visual, but writing mode logical" coordinates to final.
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::flipLogicalRectToVisualForWritingMode const):
(WebCore::Layout::InlineDisplayContentBuilder::setLeftForWritingMode const):
(WebCore::Layout::InlineDisplayContentBuilder::setRightForWritingMode const):

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h:
12:36 PM Changeset in webkit [289571] by jonlee@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening.

Update fuzzy data based on EWS results to support b231828.

  • css3/color-filters/color-filter-color-property-list-item.html:
12:29 PM Changeset in webkit [289570] by Alan Coon
  • 7 edits in branches/safari-613.1.16.1-branch/Source/WebCore

Cherry-pick r289383. rdar://problem/88366849

[WebCore] JSValueInWrappedObject is not correct for concurrent GC
https://bugs.webkit.org/show_bug.cgi?id=236277
rdar://88366849

Reviewed by Saam Barati.

JSValueInWrappedObject is broken for concurrent GC's marking. It is using std::variant<> to store Weak / JSValue,
which is not safe if concurrent GC reads it while changing that std::variant. This patch fixes several problems
in JSValueInWrappedObject.

  1. We must not use std::variant here since concurrent access can happen. We have both JSValue and Weak, and change Weak after fully initialize WeakImpl's content in Weak. To ensure that, we emit storeStoreBarrier before setting Weak to the JSValueInWrappedObject's field.
  2. Assignment operator & copy constructor are basically wrong for this class as we need a write-barrier to set a value to the field. We remove them and make it explicit that we do not have write-barrier, which reveals that IDBRequest has a semantic bug.
  3. We also add clear() instead of assigning empty JSValueInWrappedObject. And we ensure that this new clear() works well with concurrent GC threads: we clear the underlying WeakImpl* pointer to nullptr. But since WeakImpl* is kept alive until GC clears weak-related things in its end phase, concurrent GC thread can access the old WeakImpl*.
  • Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::setGetResult):
  • Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::setResult): (WebCore::IDBRequest::setResultToStructuredClone): (WebCore::IDBRequest::setResultToUndefined): (WebCore::IDBRequest::willIterateCursor): (WebCore::IDBRequest::didOpenOrIterateCursor):
  • Modules/paymentrequest/PaymentMethodChangeEvent.cpp:
  • Modules/paymentrequest/PaymentResponse.cpp: (WebCore::PaymentResponse::setDetailsFunction):
  • Modules/webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::getChannelData): (WebCore::AudioBuffer::visitChannelWrappers):
  • bindings/js/JSValueInWrappedObject.h: (WebCore::JSValueInWrappedObject::JSValueInWrappedObject): (WebCore::JSValueInWrappedObject::operator JSC::JSValue const): (WebCore::JSValueInWrappedObject::visit const): (WebCore::JSValueInWrappedObject::setWeakly): (WebCore::JSValueInWrappedObject::set): (WebCore::JSValueInWrappedObject::clear): (WebCore::JSValueInWrappedObject::setWithoutBarrier): (WebCore::cachedPropertyValue): (WebCore::JSValueInWrappedObject::makeValue): Deleted. (WebCore::JSValueInWrappedObject::operator=): Deleted.

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

12:27 PM Changeset in webkit [289569] by Alan Coon
  • 21 edits
    2 copies in branches/safari-613.1.16.0-branch

Cherry-pick r289159. rdar://problem/88366590

Thread suspend and resume should take a global lock to avoid deadlock
https://bugs.webkit.org/show_bug.cgi?id=236159

Reviewed by Geoffrey Garen.

Source/bmalloc:

Introduce pas_thread_suspend_lock and take it when suspending and resuming threads.

  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • libpas/src/libpas/pas_scavenger.c: (scavenger_thread_main): (pas_scavenger_clear_all_caches):
  • libpas/src/libpas/pas_thread_local_cache.c: (pas_thread_local_cache_for_all):
  • libpas/src/libpas/pas_thread_local_cache.h:
  • libpas/src/libpas/pas_thread_suspend_lock.c: Copied from Source/WTF/wtf/ThreadMessage.cpp.
  • libpas/src/libpas/pas_thread_suspend_lock.h: Copied from Source/WTF/wtf/ThreadMessage.cpp.

Source/JavaScriptCore:

  • heap/MachineStackMarker.cpp: (JSC::MachineThreads::tryCopyOtherThreadStack): (JSC::MachineThreads::tryCopyOtherThreadStacks):
  • heap/MachineStackMarker.h:
  • runtime/SamplingProfiler.cpp: (JSC::SamplingProfiler::takeSample):
  • runtime/VMTraps.cpp:
  • wasm/WasmMachineThreads.cpp: (JSC::Wasm::resetInstructionCacheOnAllThreads):

Source/WTF:

This patch introduces a global lock which should be taken while suspending and resuming a thread.
It is possible that two different threads suspend and resume threads. And if threads suspend
each other without critical section, it can cause a dead lock.

To avoid this problem, we introduce a global lock which should be taken when suspending and resuming
threads. Since libpas is also using thread suspension, we expose a global pas_thread_suspend_lock
when libpas is used, and we use this lock in WTF's Thread suspension code.

  • wtf/ThreadMessage.cpp: (WTF::sendMessageScoped):
  • wtf/ThreadMessage.h: (WTF::sendMessage):
  • wtf/Threading.cpp: (WTF::ThreadSuspendLocker::ThreadSuspendLocker): (WTF::ThreadSuspendLocker::~ThreadSuspendLocker):
  • wtf/Threading.h:
  • wtf/posix/ThreadingPOSIX.cpp: (WTF::Thread::suspend): (WTF::Thread::resume): (WTF::Thread::getRegisters):
  • wtf/win/ThreadingWin.cpp: (WTF::Thread::suspend): (WTF::Thread::resume): (WTF::Thread::getRegisters):

Tools:

  • TestWebKitAPI/Tests/WTF/ThreadMessages.cpp: (runThreadMessageTest):

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

12:27 PM Changeset in webkit [289568] by Alan Coon
  • 2 edits in branches/safari-613.1.16.0-branch/Source/bmalloc

Cherry-pick r289145. rdar://problem/88366590

[libpas] Use os_unfair_lock instead of spinlock
https://bugs.webkit.org/show_bug.cgi?id=236158

Reviewed by Geoffrey Garen.

os_unfair_lock is very fast while it can properly suspend threads.
A/B test result was neutral on Speedometer2 and JetStream2. So, to
reduce unnecessary CPU spins, let's replace spinlock with os_unfair_lock
if it is supported (if OS is Darwin).

  • libpas/src/libpas/pas_config.h:

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

12:23 PM Changeset in webkit [289567] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Crash in in WebCore::CSSStyleSheet::didMutateRules
https://bugs.webkit.org/show_bug.cgi?id=236450

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-10
Reviewed by Antti Koivisto.

Replace the raw pointer rule in RuleMutationScope with a RefPtr so it can be accessible
for the scope.

  • css/CSSStyleSheet.cpp:

(WebCore::CSSStyleSheet::RuleMutationScope::~RuleMutationScope):

  • css/CSSStyleSheet.h:
12:13 PM Changeset in webkit [289566] by Ben Nham
  • 11 edits
    2 adds in trunk/Source/WebKit

Apply default sandbox to webpushd on Mac
https://bugs.webkit.org/show_bug.cgi?id=236342

Reviewed by Per Arne Vollan.

This applies a default sandbox profile that allows and logs all operations by webpushd on
the Mac. In future patches we'll tighten the sandbox based on the sandbox logs that we
receive.

To do this, I refactored the sandbox initialization logic in AuxiliaryProcess so that it can
be called without creating an AuxiliaryProcess instance. This probably should be refactored
further (e.g. since webpushd isn't an AuxiliaryProcess, but rather a system daemon). But I
wanted to keep the amount of refactoring low for now while we're still figuring things out.

We also do not currently support compiling and caching the sandbox profiles. We'll add that
support later.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • PlatformMac.cmake:
  • Shared/AuxiliaryProcess.cpp:

(WebKit::applySandboxProfileForDaemon):

  • Shared/AuxiliaryProcess.h:
  • Shared/mac/AuxiliaryProcessMac.mm:

(WebKit::getUserDirectorySuffix):
(WebKit::populateSandboxInitializationParameters):
(WebKit::AuxiliaryProcess::initializeSandbox):
(WebKit::AuxiliaryProcess::applySandboxProfileForDaemon):

  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/WebPushDaemonMain.mm:

(WebKit::applySandbox):
(WebKit::WebPushDaemonMain):

  • webpushd/mac/com.apple.WebKit.webpushd.sb.in: Added.
11:56 AM Changeset in webkit [289565] by Alan Coon
  • 9 edits in branches/safari-613.1.16.0-branch/Source

Versioning.

WebKit-7613.1.16.0.6

11:50 AM Changeset in webkit [289564] by Alan Coon
  • 9 edits in branches/safari-613.1.16.1-branch/Source

Versioning.

WebKit-7613.1.16.1.6

11:49 AM Changeset in webkit [289563] by Russell Epstein
  • 3 edits
    4 adds in branches/safari-613-branch

Cherry-pick r289498. rdar://problem/88635487

Dialog element only animates once
https://bugs.webkit.org/show_bug.cgi?id=236274
rdar://88635487

Reviewed by Tim Nguyen and Dean Jackson.

LayoutTests/imported/w3c:

Add two new tests that check that we correctly start, stop and resume animations on <dialog>
and ::backdrop as a <dialog> element is open, closed and open again.

  • web-platform-tests/css/css-animations/dialog-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-animation.html: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation.html: Added.
  • web-platform-tests/css/css-animations/support/testcommon.js: (addElement): (addDiv):

Source/WebCore:

Two issues related to CSS Animation surfaced in this bug which animates both <dialog>
and its ::backdrop as the dialog is open and eventually re-opened.

The first issue was that we didn't clear all CSS Animations state when a <dialog> was
closed and its style was set to display: none. We now use the clearCSSAnimationsForStyleable()
function (static so that it's not exposed on the Styleable struct) to correctly clear
such state both when we identify a Styleable is newly getting display: none and when
cancelDeclarativeAnimations() was called. This allows us to remove removeCSSAnimationCreatedByMarkup()
a fair bit of work to clear CSS Animation state per-animation when we only ever used that
function for _all_ animations.

The second issue was that we never called cancelDeclarativeAnimations() for ::backdrop.
We now do that inside of Element::removeFromTopLayer() at a point where the code in
Styleable::fromRenderer() will still work as the element will still be contained in
Document::topLayerElements().

Tests: imported/w3c/web-platform-tests/css/css-animations/dialog-animation.html

imported/w3c/web-platform-tests/css/css-animations/dialog-backdrop-animation.html

  • dom/Element.cpp: (WebCore::Element::removeFromTopLayer):
  • style/Styleable.cpp: (WebCore::clearCSSAnimationsForStyleable): (WebCore::Styleable::cancelDeclarativeAnimations const): (WebCore::Styleable::updateCSSAnimations const): (WebCore::removeCSSAnimationCreatedByMarkup): Deleted.

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

11:49 AM Changeset in webkit [289562] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebCore/rendering

Cherry-pick r289437. rdar://problem/86153015

Grid may be empty in certain scenarios
https://bugs.webkit.org/show_bug.cgi?id=234578

Patch by Brandon Stewart <Brandon> on 2022-02-08
Reviewed by Darin Adler.

Add check to handle legend elements when inside a CSS Grid. The legend element should not be
added to aspectRatioBlockSizeDependentGridItems.

  • rendering/RenderGrid.cpp: (WebCore::RenderGrid::layoutBlock):
  • rendering/RenderGrid.h:

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

11:49 AM Changeset in webkit [289561] by Russell Epstein
  • 2 edits
    2 adds in branches/safari-613-branch

Cherry-pick r289241. rdar://problem/85727334

Updating grid gap value does not recalculate styles
https://bugs.webkit.org/show_bug.cgi?id=233252
<rdar://problem/85727334>

Reviewed by Simon Fraser.

Source/WebCore:

Both column and row gap style value change need to initiate layout in order to update their geometries.

Test: fast/dynamic/gap-style-change-should-initiate-layout.html

  • rendering/style/RenderStyle.cpp: (WebCore::rareNonInheritedDataChangeRequiresLayout):

LayoutTests:

  • fast/dynamic/gap-style-change-should-initiate-layout-expected.html: Added.
  • fast/dynamic/gap-style-change-should-initiate-layout.html: Added.

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

11:49 AM Changeset in webkit [289560] by Russell Epstein
  • 9 edits
    7 adds in branches/safari-613-branch

Cherry-pick r288434. rdar://problem/56436745

texImage2d fails to set same video frame to multiple textures
https://bugs.webkit.org/show_bug.cgi?id=203148
<rdar://problem/56436745>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-01-24
Reviewed by Darin Adler.

Source/WebCore:

WebGL optimizes repeated video uploads to same texture, due to this being
usual practice among pages. Reason is that there are no API to know when the
video frame updates.
The algorithm was:

  • If the IOSurface is the same as in the last call
  • If the texture contents has not changed since we last modified this texture then skip the upload.

However, this logic skips errorneously if the "last call" updates some other texture.
Fix and test the above.

There are other issues for the current algorithm. This patch fixes some other theoretical ones:

  • If the texture is deleted and new one gets assigned the same texture id and the content seed would clash
  • Video was uploaded to a different level

The previous implementation was keeping per-texture seed value map in the context
(GraphicsContextGLANGLE) and per-teture seed value map in the texture upload helper
(GraphicsContextGLCVCocoa) and last uploaded IOSurface seed in the upload helper (not per
texture).

The implementation in this patch keeps per-texture known content description in the texture
upload helper and invalidates this when each texture changes. The known content description
is the parameter list of the texture upload call.

Test: webgl/pending/conformance/textures/misc/tex-image-video-repeated.html

  • platform/graphics/GraphicsContextGLState.h: (WebCore::GraphicsContextGLState::setBoundTexture):
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLANGLE::texImage2D): (WebCore::GraphicsContextGLANGLE::texSubImage2D): (WebCore::GraphicsContextGLANGLE::compressedTexImage2D): (WebCore::GraphicsContextGLANGLE::compressedTexSubImage2D): (WebCore::GraphicsContextGLANGLE::texStorage2D): (WebCore::GraphicsContextGLANGLE::texStorage3D): (WebCore::GraphicsContextGLANGLE::texImage2DDirect): (WebCore::GraphicsContextGLANGLE::framebufferTexture2D): (WebCore::GraphicsContextGLANGLE::createTexture): (WebCore::GraphicsContextGLANGLE::deleteTexture): (WebCore::GraphicsContextGLANGLE::invalidateKnownTextureContent): (WebCore::GraphicsContextGLANGLE::textureSeed): Deleted.
  • platform/graphics/angle/GraphicsContextGLANGLE.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm: (WebCore::GraphicsContextGLCocoa::invalidateKnownTextureContent):
  • platform/graphics/cv/GraphicsContextGLCVCocoa.cpp: (WebCore::GraphicsContextGLCVCocoa::TextureContent::operator== const): (WebCore::GraphicsContextGLCVCocoa::copyVideoSampleToTexture): (WebCore::GraphicsContextGLCVCocoa::invalidateKnownTextureContent):
  • platform/graphics/cv/GraphicsContextGLCVCocoa.h:

LayoutTests:

Add a test for testing the bug in which some video texture uploads
were skipped errorneously.

  • webgl/pending/conformance/textures/misc/tex-image-video-repeated.html: Added.
  • webgl/pending/conformance/textures/misc/tex-image-video-repeated-expected.txt: Added.
  • webgl/pending/resources/webgl_test_files/conformance/textures/misc/tex-image-video-repeated.html: Added.

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

11:41 AM Changeset in webkit [289559] by ntim@apple.com
  • 2 edits in trunk

Unreviewed, update my (Tim Nguyen) status to reviewer

  • metadata/contributors.json:
11:36 AM Changeset in webkit [289558] by Chris Dumez
  • 53 edits
    3 copies
    53 adds
    29 deletes in trunk

Resync web-platform-tests/service-workers from upstream
https://bugs.webkit.org/show_bug.cgi?id=236380

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Resync web-platform-tests/service-workers from upstream 012f446eafc392c7.

  • web-platform-tests/interfaces/service-workers.idl: Updated.
  • web-platform-tests/service-workers/*: Updated.

Tools:

Fix import of WPT tests with global=serviceworker-module.

  • Scripts/webkitpy/w3c/test_importer.py:

(TestImporter.init):

LayoutTests:

  • TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/mac-wk2/imported/w3c/web-platform-tests/service-workers/service-worker/websocket-in-service-worker.https-expected.txt:
  • tests-options.json:
11:12 AM Changeset in webkit [289557] by Russell Epstein
  • 17 edits
    2 copies in branches/safari-613-branch

Cherry-pick r289159. rdar://problem/88366590

Thread suspend and resume should take a global lock to avoid deadlock
https://bugs.webkit.org/show_bug.cgi?id=236159

Reviewed by Geoffrey Garen.

Source/bmalloc:

Introduce pas_thread_suspend_lock and take it when suspending and resuming threads.

  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • libpas/src/libpas/pas_scavenger.c: (scavenger_thread_main): (pas_scavenger_clear_all_caches):
  • libpas/src/libpas/pas_thread_local_cache.c: (pas_thread_local_cache_for_all):
  • libpas/src/libpas/pas_thread_local_cache.h:
  • libpas/src/libpas/pas_thread_suspend_lock.c: Copied from Source/WTF/wtf/ThreadMessage.cpp.
  • libpas/src/libpas/pas_thread_suspend_lock.h: Copied from Source/WTF/wtf/ThreadMessage.cpp.

Source/JavaScriptCore:

  • heap/MachineStackMarker.cpp: (JSC::MachineThreads::tryCopyOtherThreadStack): (JSC::MachineThreads::tryCopyOtherThreadStacks):
  • heap/MachineStackMarker.h:
  • runtime/SamplingProfiler.cpp: (JSC::SamplingProfiler::takeSample):
  • runtime/VMTraps.cpp:
  • wasm/WasmMachineThreads.cpp: (JSC::Wasm::resetInstructionCacheOnAllThreads):

Source/WTF:

This patch introduces a global lock which should be taken while suspending and resuming a thread.
It is possible that two different threads suspend and resume threads. And if threads suspend
each other without critical section, it can cause a dead lock.

To avoid this problem, we introduce a global lock which should be taken when suspending and resuming
threads. Since libpas is also using thread suspension, we expose a global pas_thread_suspend_lock
when libpas is used, and we use this lock in WTF's Thread suspension code.

  • wtf/ThreadMessage.cpp: (WTF::sendMessageScoped):
  • wtf/ThreadMessage.h: (WTF::sendMessage):
  • wtf/Threading.cpp: (WTF::ThreadSuspendLocker::ThreadSuspendLocker): (WTF::ThreadSuspendLocker::~ThreadSuspendLocker):
  • wtf/Threading.h:
  • wtf/posix/ThreadingPOSIX.cpp: (WTF::Thread::suspend): (WTF::Thread::resume): (WTF::Thread::getRegisters):
  • wtf/win/ThreadingWin.cpp: (WTF::Thread::suspend): (WTF::Thread::resume): (WTF::Thread::getRegisters):

Tools:

  • TestWebKitAPI/Tests/WTF/ThreadMessages.cpp: (runThreadMessageTest):

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

11:12 AM Changeset in webkit [289556] by Russell Epstein
  • 1 edit in branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_config.h

Cherry-pick r289145. rdar://problem/88366590

[libpas] Use os_unfair_lock instead of spinlock
https://bugs.webkit.org/show_bug.cgi?id=236158

Reviewed by Geoffrey Garen.

os_unfair_lock is very fast while it can properly suspend threads.
A/B test result was neutral on Speedometer2 and JetStream2. So, to
reduce unnecessary CPU spins, let's replace spinlock with os_unfair_lock
if it is supported (if OS is Darwin).

  • libpas/src/libpas/pas_config.h:

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

11:10 AM Changeset in webkit [289555] by Russell Epstein
  • 4 edits in branches/safari-613-branch/Source

Cherry-pick r288970. rdar://problem/88459807

Update computation of FAST_TLS base.
https://bugs.webkit.org/show_bug.cgi?id=235934

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

  • assembler/MacroAssemblerARM64.h: (JSC::MacroAssemblerARM64::loadFromTLS32): (JSC::MacroAssemblerARM64::loadFromTLS64): (JSC::MacroAssemblerARM64::storeToTLS32): (JSC::MacroAssemblerARM64::storeToTLS64):
  • assembler/SecureARM64EHashPinsInlines.h: (JSC::SecureARM64EHashPins::keyForCurrentThread):
  • offlineasm/arm64.rb:

Source/WTF:

  • wtf/PlatformHave.h:

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

11:07 AM Changeset in webkit [289554] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.34/Source/WebCore

Merge r289529 - [GTK] Scrollbars painted incorrectly if theme enables steppers (steppers misplaced on vertical scrollbars, horizontal scrollbars very broken)
https://bugs.webkit.org/show_bug.cgi?id=234871

Reviewed by Carlos Garcia Campos.

Actually use the scrollbar orientation when creating its contents,
instead of always using vertical.

  • platform/gtk/RenderThemeScrollbar.cpp:

(WebCore::RenderThemeScrollbar::RenderThemeScrollbar):

11:06 AM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
10:46 AM Changeset in webkit [289553] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, update BundleResourceLoader WorkQueue identifier

Address Alex's review comment in bug 236062.

  • loader/cocoa/BundleResourceLoader.mm:

(WebCore::BundleResourceLoader::loadQueue):

10:32 AM Changeset in webkit [289552] by Wenson Hsieh
  • 18 edits in trunk/Source

Support WebPageProxy::replaceSelectionWithPasteboardData() on iOS
https://bugs.webkit.org/show_bug.cgi?id=236406

Reviewed by Tim Horton.

Source/WebCore:

Move the definition of readSelectionFromPasteboard from EditorMac.mm to EditorCocoa.mm.
No change in behavior (yet).

  • editing/Editor.h:
  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::readSelectionFromPasteboard):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::readSelectionFromPasteboard): Deleted.

Move this into EditorCocoa.mm.

Source/WebKit:

In preparation for an upcoming patch, make WebPageProxy::replaceSelectionWithPasteboardData() (as well as all
downstream codepaths) available on all Cocoa platforms. This is currently macOS-specific, and only used for
service controls (i.e. inserting content via sharing picker API).

  • Sources.txt:
  • SourcesCocoa.txt:

Move WebPasteboardOverrides.cpp from SourcesCocoa to Sources, now that there are non-Cocoa-specific codepaths in
WebPlatformStrategies that exercise this class.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::replaceSelectionWithPasteboardData):

  • UIProcess/WebPageProxy.h:
  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::replaceSelectionWithPasteboardData): Deleted.

Move this into WebPageProxyCocoa.mm.

  • WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp:

(WebKit::WebPasteboardOverrides::overriddenInfo):

  • WebProcess/WebCoreSupport/WebPasteboardOverrides.h:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::getPasteboardItemsCount):
(WebKit::WebPlatformStrategies::allPasteboardItemInfo):
(WebKit::WebPlatformStrategies::informationForItemAtIndex):
(WebKit::WebPlatformStrategies::readBufferFromPasteboard):

Add additional support for returning canned data from WebPasteboardOverrides::sharedPasteboardOverrides() in
pasteboard reading codepaths that are exercised by WebCore::Pasteboard on iOS.

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::replaceSelectionPasteboardName):
(WebKit::WebPage::replaceSelectionWithPasteboardData):
(WebKit::WebPage::readSelectionFromPasteboard):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::readSelectionFromPasteboard): Deleted.

Delete this unimplemented method stub.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::replaceSelectionPasteboardName): Deleted.

Move this into WebPageCocoa.mm.

(WebKit::WebPage::replaceSelectionWithPasteboardData): Deleted.
(WebKit::WebPage::readSelectionFromPasteboard): Deleted.

10:29 AM Changeset in webkit [289551] by Russell Epstein
  • 2 edits in branches/safari-614.1.3-branch/Source/WebKit

Cherry-pick r289436. rdar://problem/87908259

[WebAuthn] Use AuthenticationServicesAgent for WebAuthn calls on iOS
https://bugs.webkit.org/show_bug.cgi?id=236151
rdar://87908259

Reviewed by Brent Fulgham.

This patch starts using the ASC apis to make WebAuthn calls on iOS the
same way they are made on macOS. Some cleanup work will be needed to
deprecate the WebAuthn process after this change is made.

  • UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm: (WebKit::WebAuthenticatorCoordinatorProxy::performRequest): Deleted. (WebKit::WebAuthenticatorCoordinatorProxy::isUserVerifyingPlatformAuthenticatorAvailable): Deleted.

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

9:54 AM Changeset in webkit [289550] by Kate Cheney
  • 3 edits in trunk/LayoutTests

Unskip App Privacy Report tests in open source now that EWS is updated
https://bugs.webkit.org/show_bug.cgi?id=232251

Unreviewed. Unskip iOS 15 tests now that EWS is updated.

9:49 AM Changeset in webkit [289549] by ntim@apple.com
  • 12 edits
    2 adds in trunk/Source

Add webkit-pdfjs-viewer scheme for PDF.js resources
https://bugs.webkit.org/show_bug.cgi?id=236062

Reviewed by Youenn Fablet.

The code handling the scheme is under WebCore::BundleResourceLoader.
It reads files from the pdfjs/ sub-folder in the WebCore.framework resources folder.
Right now, this sub-folder does not exist yet, but this scheme can be tested by manually populating it.

Bug 235981 will take care of populating this folder at build-time.

Note: This scheme can only be loaded inside a PDFDocument <iframe>

Source/WebCore:

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/PDFDocument.cpp:

(WebCore::PDFDocument::createDocumentStructure):

  • loader/cocoa/BundleResourceLoader.mm: Added
  • loader/cocoa/BundleResourceLoader.h: Added
  • loader/PolicyChecker.cpp:

(WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy):

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::start):
(WebCore::ResourceLoader::isPDFJSResourceLoad const):

  • loader/ResourceLoader.h:
  • loader/SubresourceLoader.h:
  • platform/LegacySchemeRegistry.cpp:

(WebCore::builtinSecureSchemes):

Source/WebKit:

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::tryLoadingUsingPDFJSHandler):

  • WebProcess/Network/WebLoaderStrategy.h:
9:46 AM Changeset in webkit [289548] by jonlee@apple.com
  • 9 edits in trunk/LayoutTests

Unreviewed gardening.

LayoutTests/imported/w3c:

Add fuzzy data based on EWS results to support b231828.

  • web-platform-tests/css/motion/offset-rotate-004.html:

LayoutTests:

Add or update fuzzy data based on EWS results to support b231828.

  • css3/color-filters/color-filter-color-property-list-item.html:
  • css3/color-filters/color-filter-text-decoration-shadow.html:
  • css3/filters/backdrop/backdrop-filter-uneven-corner-radii.html:
  • css3/filters/backdrop/backdrop-filter-with-border-radius-and-reflection-remove.html:
  • fast/borders/hidpi-border-radius-with-subpixel-margin-not-renderable.html:
  • fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html:
9:46 AM Changeset in webkit [289547] by eric.carlson@apple.com
  • 6 edits in trunk/Source/WebCore

[macOS] Support both versions of ScreenCaptureKit API
https://bugs.webkit.org/show_bug.cgi?id=236422
<rdar://problem/88726849>

Reviewed by Youenn Fablet.

Source/WebCore:

Tested manually.

  • platform/mediastream/mac/ScreenCaptureKitCaptureSource.h:
  • platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:

(-[WebCoreScreenCaptureKitHelper initWithCallback:]):
(-[WebCoreScreenCaptureKitHelper stream:didOutputSampleBuffer:ofType:]):
(WebCore::ScreenCaptureKitCaptureSource::ScreenCaptureKitCaptureSource):
(WebCore::ScreenCaptureKitCaptureSource::stop):
(WebCore::ScreenCaptureKitCaptureSource::streamConfiguration):
(WebCore::ScreenCaptureKitCaptureSource::startContentStream):
(WebCore::ScreenCaptureKitCaptureSource::updateStreamConfiguration):
(WebCore::ScreenCaptureKitCaptureSource::frameAvailableHandler):
(WebCore::ScreenCaptureKitCaptureSource::streamDidOutputSampleBuffer):
(WebCore::ScreenCaptureKitCaptureSource::captureQueue):

Source/WebCore/PAL:

  • pal/mac/ScreenCaptureKitSoftLink.h:
  • pal/mac/ScreenCaptureKitSoftLink.mm:
9:44 AM Changeset in webkit [289546] by Chris Dumez
  • 17 edits
    1 copy
    1 add
    18 deletes in trunk/LayoutTests

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

Reviewed by Youenn Fablet.

Resync web-platform-tests/url from upstream 012f446eafc392c7.

  • web-platform-tests/url/*: Updated.
9:42 AM Changeset in webkit [289545] by Chris Dumez
  • 7 edits
    27 copies
    73 moves
    88 adds
    16 deletes in trunk/LayoutTests

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

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Resync web-platform-tests/eventsource from upstream 012f446eafc392c7.

  • web-platform-tests/eventsource/*: Updated.

LayoutTests:

9:37 AM Changeset in webkit [289544] by Aditya Keerthi
  • 11 edits
    1 add in trunk

An element with both -webkit-user-select: all and -webkit-user-drag: element does not get the nice drag snapshot that you get if you just have -webkit-user-drag: element
https://bugs.webkit.org/show_bug.cgi?id=187656
<rdar://problem/42177956>

Reviewed by Wenson Hsieh.

Source/WebCore:

When dragging an element with "-webkit-user-select: all" and
"-webkit-user-drag: element", the element gets selected, leading
WebKit to add DragSourceAction::Selection to the set of
DragSourceActions. The presence of "-webkit-user-drag: element"
results in the addition of DragSourceAction::DHTML.

The addition of DragSourceAction::Selection in the
"-webkit-user-drag: element" scenario is undesirable, as
it results in a drag snapshot containing only the selection, and
copies/pastes the text selection, rather than moving the element.

To fix, drop DragSourceAction::Selection from the set of actions
when a "-webkit-user-drag: element" element is being dragged.

The new behavior matches Firefox and Chrome.

  • page/DragController.cpp:

(WebCore::DragController::draggableElement const):
(WebCore::DragController::startDrag):
(WebCore::DragController::doSystemDrag):

  • platform/DragItem.h:

Dropping DragSourceAction::Selection exposes an issue in the
UIProcess on iOS, where UIKit text interaction can unexpectedly
begin while dragging an element with "-webkit-user-drag: element".

To fix the WebProcess behavior, while keeping the UIProcess behavior
the same, a new bit is added to DragItem to indicate that the
element being dragged contains the selection. The UIProcess will use
this bit to suppress UIKit text interaction.

(WebCore::DragItem::encode const):
(WebCore::DragItem::decode):

Source/WebKit:

Plumb DragItem's containsSelection into the DragDropInteractionState
so that UIKit text interaction can be suppressed whenever the element
being dragged also contains the current selection.

  • UIProcess/ios/DragDropInteractionState.h:
  • UIProcess/ios/DragDropInteractionState.mm:

(WebKit::DragDropInteractionState::anyActiveDragSourceContainsSelection const):
(WebKit::DragDropInteractionState::stageDragItem):
(WebKit::DragDropInteractionState::anyActiveDragSourceIs const): Deleted.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):

Tools:

Added API tests on iOS and macOS to verify that dragging and dropping an
element with "-webkit-user-select: all" and "-webkit-user-drag: element"
does not paste the selection.

On iOS, the size of the lift preview is also tested.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/contenteditable-user-select-user-drag.html: Added.
  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:

(TEST):

9:35 AM Changeset in webkit [289543] by Andres Gonzalez
  • 2 edits in trunk/LayoutTests

Mark accessibility/mac/line-index-for-textmarker.html as Slow in Mac-wk2 Debug.
https://bugs.webkit.org/show_bug.cgi?id=236448
<rdar://problem/88757785>

Unreviewed gardening.

  • platform/mac-wk2/TestExpectations:
9:28 AM Changeset in webkit [289542] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Prepare InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox for supporting vertical writing mode
https://bugs.webkit.org/show_bug.cgi?id=236400

Reviewed by Antti Koivisto.

This is just a small cleanup patch to make the vertical writing mode code easier to adopt.

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):

9:04 AM Changeset in webkit [289541] by Megan Gardner
  • 5 edits in trunk/Source/WebKit

Mail attachment switched to TIFF and balloons in size after markup.
https://bugs.webkit.org/show_bug.cgi?id=236405
rdar://87358910

Reviewed by Wenson Hsieh.

When pulling data from the webprocess to pass to the Sharing Service
for markup, we would convert it to TIFF format. This would cause files
to increase in size, and lose their original formatting, as well as outright
break PDFs. Instead we should be pulling the data from the attachment, which
already exists in the UI process and is the source of truth for that data anyways.
This allows us to give the correct type to the sharing service, and we should
take the data back as the same original type when getting the data back from
markup.

  • UIProcess/API/APIAttachment.cpp:

(API::Attachment::enclosingImageData const):

  • UIProcess/API/APIAttachment.h:
  • UIProcess/API/Cocoa/APIAttachmentCocoa.mm:

(API::Attachment::enclosingImageNSData const):

  • UIProcess/mac/WKSharingServicePickerDelegate.mm:

(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):

  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::WebContextMenuProxyMac::setupServicesMenu):

9:02 AM Changeset in webkit [289540] by Chris Dumez
  • 39 edits
    1 copy
    12 moves
    108 adds
    61 deletes in trunk/LayoutTests

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

Reviewed by Youenn Fablet.

Resync web-platform-tests/xhr from upstream 012f446eafc392c7.

  • web-platform-tests/xhr/*: Updated.
8:54 AM Changeset in webkit [289539] by Chris Dumez
  • 7 edits
    4 deletes in trunk/LayoutTests

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

Reviewed by Youenn Fablet.

Resync web-platform-tests/webaudio from upstream 012f446eafc392c7.

  • web-platform-tests/webaudio/idlharness.https-expected.txt: Removed.
  • web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/suspend-after-construct-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test-expected.txt: Removed.
  • web-platform-tests/webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html: Removed.
  • web-platform-tests/webaudio/the-audio-api/the-audiodestinationnode-interface/w3c-import.log: Removed.
  • web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-expected.txt: Removed.
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-large-endtime-expected.txt: Removed.
  • web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-postmessage-sharedarraybuffer.https-expected.txt: Removed.
  • web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/cors-check.https-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-mediastreamaudiosourcenode-interface/mediastreamaudiosourcenode-routing-expected.txt: Removed.
8:38 AM Changeset in webkit [289538] by Tyler Wilcock
  • 2 edits in trunk/Source/WebCore

AX: Log more information when the wrapper or the wrapper's backing object is detached
https://bugs.webkit.org/show_bug.cgi?id=236381

Reviewed by Chris Fleizach.

Right now, we don't log any information when we detect a wrapper has
no object, or when it does have an object but it's detached from a
parent.

This patch logs the wrapper address and object in these scenarios, which
will help debug these issues in conjuction with other logs.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper logMissingBackingObject]):
Added.
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
Use new logMissingBackingObject, and log object if it's detached from a parent.
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
Use new logMissingBackingObject.

8:36 AM Changeset in webkit [289537] by Tyler Wilcock
  • 3 edits in trunk/Source/WebCore

AXIsolatedTree::updateChildren and AXIsolatedTree::nodeAncestryChanges results in adding incorrect nodes to the isolated tree
https://bugs.webkit.org/show_bug.cgi?id=236414

Reviewed by Andres Gonzalez.

Sometimes AXIsolatedTree::updateChildren is called with an object that is
not in the isolated tree. When this happens, we currently call AXIsolatedTree::nodeAncestryChanges
to build the ancestry chain up to the nearest in-isolated-tree node (starting with the original
object called for updateChildren).

However, this seems to result in adding nodes to the isolated tree that don't exist in the live tree.
I believe this also causes isolated objects to often hold references to parent objects that don't exist
in the isolated tree, breaking object searches (and more).

With this patch, when AXIsolatedTree::updateChildren is called with an object that has no isolated tree
equivalent, we traverse up the object's ancestry until we find an object in the isolated tree and update
the children for that.

This was the behavior before https://bugs.webkit.org/show_bug.cgi?id=235389. We made that change because
we believed this behavior was causing a lot of full-tree re-renders. However, in my testing on large webpages
(e.g. youtube.com, facebook.com), this doesn't seem to be the case, and performance is actually very good.

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::updateChildren):
(WebCore::AXIsolatedTree::nodeAncestryChanges):
Deleted.
(WebCore::AXIsolatedTree::nodeChangeForObject):
Remove updateNodeMap parameter, as the now-deleted nodeAncestryChanges
was the only thing that called it with the non-default value of true.

  • accessibility/isolatedtree/AXIsolatedTree.h:

(WebCore::AXIsolatedTree::queueChangesAndRemovals):

8:21 AM Changeset in webkit [289536] by youenn@apple.com
  • 6 edits in trunk

Do not expose in WebIDL the parts of the permission API that are not yet supported
https://bugs.webkit.org/show_bug.cgi?id=236301

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/permissions/idlharness.any-expected.txt:
  • web-platform-tests/permissions/idlharness.any.worker-expected.txt:

Source/WebCore:

Covered by existing tests.

  • Modules/permissions/PermissionStatus.idl:
  • Modules/permissions/Permissions.idl:
7:56 AM Changeset in webkit [289535] by Jonathan Bedard
  • 3 edits in trunk/Tools

Unreviewed, reverting 247040@main.
https://bugs.webkit.org/show_bug.cgi?id=236399
<rdar://problem/88707207>

Broke EWS links after merging.

Reverted changeset:

[EWS] Link commit URL to pull request
https://bugs.webkit.org/show_bug.cgi?id=236399
<rdar://problem/88707207>

7:49 AM Changeset in webkit [289534] by youenn@apple.com
  • 4 edits in trunk

Check for feature policy when querying permission state
https://bugs.webkit.org/show_bug.cgi?id=236299

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/permissions/permissions-query-feature-policy-attribute.https.sub-expected.txt:

Source/WebCore:

Added feature policy check for camera, microphone and geolocation, which after https://bugs.webkit.org/show_bug.cgi?id=236292
are the only one returning anything else than NotSupported.

Covered by updated test.

  • Modules/permissions/Permissions.cpp:

(WebCore::isAllowedByFeaturePolicy):
(WebCore::Permissions::query):

7:45 AM Changeset in webkit [289533] by youenn@apple.com
  • 6 edits
    2 adds in trunk

Settling of a fetch promise should be delayed in case page is entering page cache
https://bugs.webkit.org/show_bug.cgi?id=236292
<rdar://88452971>

Reviewed by Chris Dumez.

Source/WebCore:

Make sure to enqueue a task before resolving fetch promise as otherwise, page might continue running JavaScript.
Do this for worker as well for good measure.
We move signal aborted checks to two clients to handle rejecting fetch promise synchronously.

Test: http/tests/navigation/fetch-pagecache.html

  • Modules/cache/DOMCache.cpp:
  • Modules/fetch/FetchResponse.cpp:
  • Modules/fetch/FetchResponse.h:
  • Modules/fetch/WindowOrWorkerGlobalScopeFetch.cpp:
  • workers/service/FetchEvent.cpp:

LayoutTests:

  • http/tests/navigation/fetch-pagecache-expected.txt: Added.
  • http/tests/navigation/fetch-pagecache.html: Added.
7:33 AM Changeset in webkit [289532] by Chris Dumez
  • 5 edits in trunk

Fail synchronously when constructing a SharedWorker with an URL that is not same-origin
https://bugs.webkit.org/show_bug.cgi?id=236419

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/workers/constructors/SharedWorker/same-origin-expected.txt:

Rebaseline test that is now fully passing. I have verified that it is passing in both
Blink and Gecko too.

  • web-platform-tests/workers/shared-worker-in-data-url-context.window-expected.txt:

Even though this looks like a regression, this actually aligns our behavior with both
Blink & Gecko (who also fail this check). Note that the load fails no matter what.
However, the test expects it to fail asynchronously instead of synchronously in this
case.

Source/WebCore:

Fail synchronously when constructing a SharedWorker with an URL that is not same-origin.
This aligns our behavior with Chrome and matches the language in the specification.

No new tests, rebaselined existing test.

  • workers/shared/SharedWorker.cpp:

(WebCore::SharedWorker::create):

6:52 AM WebKitGTK/2.34.x edited by Michael Catanzaro
(diff)
6:46 AM Changeset in webkit [289531] by commit-queue@webkit.org
  • 20 edits
    4 adds in trunk/Source

Introduce SignedPtrTraits which enables Ref pointers to be protected with PtrTags.
https://bugs.webkit.org/show_bug.cgi?id=235588
rdar://88023849

Patch by Gavin Phillips <gavin.p@apple.com> on 2022-02-10
Reviewed by Mark Lam.

Create and adopt SignedPtrTraits which can be used to apply and verify PtrTag signatures
to pointers stored in and tracked by WTF:Ref.

Source/WebCore:

  • bindings/js/JSDOMWrapper.h:

(WebCore::JSDOMWrapper::wrapped const):
(WebCore::JSDOMWrapper::offsetOfWrapped):
(WebCore::JSDOMWrapper::hasCustomPtrTraits):

  • bindings/scripts/CodeGeneratorJS.pm:

(GetParentClassName):
(GetImplClassPtrTag):
(GenerateHeader):
(GetTaggedWrapperForInterface):

  • bindings/scripts/IDLAttributes.json:
  • bindings/scripts/test/BindingTestGlobalConstructors.idl:
  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:

(WebCore::jsTestGlobalObject_TestTaggedWrapperConstructorGetter):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):

  • bindings/scripts/test/JS/JSTestTaggedWrapper.cpp: Added.

(WebCore::JSTestTaggedWrapperDOMConstructor::prototypeForStructure):
(WebCore::JSTestTaggedWrapperDOMConstructor::initializeProperties):
(WebCore::JSTestTaggedWrapperPrototype::finishCreation):
(WebCore::JSTestTaggedWrapper::JSTestTaggedWrapper):
(WebCore::JSTestTaggedWrapper::finishCreation):
(WebCore::JSTestTaggedWrapper::createPrototype):
(WebCore::JSTestTaggedWrapper::prototype):
(WebCore::JSTestTaggedWrapper::getConstructor):
(WebCore::JSTestTaggedWrapper::destroy):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):
(WebCore::JSTestTaggedWrapper::subspaceForImpl):
(WebCore::JSTestTaggedWrapper::analyzeHeap):
(WebCore::JSTestTaggedWrapperOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestTaggedWrapperOwner::finalize):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestTaggedWrapper::toWrapped):

  • bindings/scripts/test/JS/JSTestTaggedWrapper.h: Added.

(WebCore::JSTestTaggedWrapper::create):
(WebCore::JSTestTaggedWrapper::createStructure):
(WebCore::JSTestTaggedWrapper::subspaceFor):
(WebCore::wrapperOwner):
(WebCore::wrapperKey):
(WebCore::toJS):
(WebCore::toJSNewlyCreated):

  • bindings/scripts/test/SupplementalDependencies.dep:
  • bindings/scripts/test/TestTaggedWrapper.idl: Added.
  • css/DOMMatrixReadOnly.idl:
  • dom/DOMPointReadOnly.idl:
  • dom/DOMQuad.idl:
  • dom/DOMRectReadOnly.idl:
  • domjit/JSDocumentDOMJIT.cpp:

(WebCore::compileDocumentDocumentElementAttribute):
(WebCore::compileDocumentBodyAttribute):

  • domjit/JSNodeDOMJIT.cpp:

(WebCore::createCallDOMGetterForOffsetAccess):
(WebCore::compileNodeOwnerDocumentAttribute):

  • html/TimeRanges.idl:
  • html/canvas/OffscreenCanvasRenderingContext2D.idl:
  • html/canvas/PaintRenderingContext2D.idl:
  • svg/SVGMatrix.idl:

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/SignedPtr.h: Added.

(WTF::SignedPtr::SignedPtr):
(WTF::SignedPtr::get const):
(WTF::SignedPtr::set):
(WTF::SignedPtr::clear):
(WTF::SignedPtr::operator-> const):
(WTF::SignedPtr::operator* const):
(WTF::SignedPtr::operator! const):
(WTF::SignedPtr::operator UnspecifiedBoolType const):
(WTF::SignedPtr::operator bool const):
(WTF::SignedPtr::operator=):
(WTF::SignedPtr::exchange):
(WTF::SignedPtr::swap):
(WTF::SignedPtrTraits::exchange):
(WTF::SignedPtrTraits::swap):
(WTF::SignedPtrTraits::unwrap):
(WTF::SignedPtrTraits::hashTableDeletedValue):
(WTF::SignedPtrTraits::isHashTableDeletedValue):

6:23 AM Changeset in webkit [289530] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Add InInlineDirection postfix to margin/border/paddingLeft(Right)
https://bugs.webkit.org/show_bug.cgi?id=236398

Reviewed by Antti Koivisto.

This helps to make sure we don't confuse _visual_ border left and border left in the inline base direction sense
(i.e. logical left can turn into a "visual" right in the inline base direction context (RTL) which can turn into a final physical bottom after the writing mode flip)

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::marginLeftInInlineDirection):
(WebCore::Layout::marginRightInInlineDirection):
(WebCore::Layout::borderLeftInInlineDirection):
(WebCore::Layout::borderRightInInlineDirection):
(WebCore::Layout::paddingLeftInInlineDirection):
(WebCore::Layout::paddingRightInInlineDirection):
(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):
(WebCore::Layout::marginLeft): Deleted.
(WebCore::Layout::marginRight): Deleted.
(WebCore::Layout::borderLeft): Deleted.
(WebCore::Layout::borderRight): Deleted.
(WebCore::Layout::paddingLeft): Deleted.
(WebCore::Layout::paddingRight): Deleted.

6:14 AM Changeset in webkit [289529] by Alexander Mikhaylenko
  • 2 edits in trunk/Source/WebCore

[GTK] Scrollbars painted incorrectly if theme enables steppers (steppers misplaced on vertical scrollbars, horizontal scrollbars very broken)
https://bugs.webkit.org/show_bug.cgi?id=234871

Reviewed by Carlos Garcia Campos.

Actually use the scrollbar orientation when creating its contents,
instead of always using vertical.

  • platform/gtk/RenderThemeScrollbar.cpp:

(WebCore::RenderThemeScrollbar::RenderThemeScrollbar):

5:54 AM Changeset in webkit [289528] by Carlos Garcia Campos
  • 10 edits
    1 copy
    1 add in trunk/Source

[GTK][WPE] Refactor the XDGDBusProxy launcher to simplify it and fix some issues
https://bugs.webkit.org/show_bug.cgi?id=236437

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Make accessibility bus address API available for ATK too.

  • platform/graphics/PlatformDisplay.cpp:
  • platform/graphics/PlatformDisplay.h:
  • platform/graphics/x11/PlatformDisplayX11.cpp:
  • platform/graphics/x11/PlatformDisplayX11.h:

Source/WebKit:

This patch moves the XDGDBusProxy launcher implementation to its own file and fixes the following issues:

  • r289369 introduced an issue with old versions of bwrap that fails to mount over an existing file, so we need to ensure we only bind the original socket for the a11y socket and not the session bus one.
  • bindA11y is GTK specific for some reason, which means WPE doesn't have a11y under the sandbox.
  • The names of the socket paths for a11y and session bus use the same pattern dbus-proxy-XXXXXX, it helps to use a different one.
  • The code to get the a11y DBus address is now duplicated in PlatformDisplay, we can just use the PlatformDisplay to get the address.
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::argumentsToFileDescriptor):
(WebKit::bindDBusSession):
(WebKit::bindA11y):
(WebKit::bubblewrapSpawn):
(WebKit::argsToFd): Deleted.
(WebKit::XDGDBusProxyLauncher::setAddress): Deleted.
(WebKit::XDGDBusProxyLauncher::isRunning const): Deleted.
(WebKit::XDGDBusProxyLauncher::path const): Deleted.
(WebKit::XDGDBusProxyLauncher::proxyPath const): Deleted.
(WebKit::XDGDBusProxyLauncher::setPermissions): Deleted.
(WebKit::XDGDBusProxyLauncher::launch): Deleted.
(WebKit::XDGDBusProxyLauncher::makeProxyPath): Deleted.
(WebKit::XDGDBusProxyLauncher::dbusAddressToPath): Deleted.
(): Deleted.

  • UIProcess/Launcher/glib/BubblewrapLauncher.h:
  • UIProcess/Launcher/glib/XDGDBusProxy.cpp: Added.

(WebKit::XDGDBusProxy::XDGDBusProxy):
(WebKit::XDGDBusProxy::makeProxy const):
(WebKit::XDGDBusProxy::launch const):

  • UIProcess/Launcher/glib/XDGDBusProxy.h: Added.

(WebKit::XDGDBusProxy::proxyPath const):
(WebKit::XDGDBusProxy::path const):

5:50 AM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
5:02 AM Changeset in webkit [289527] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Incorrect abspos layout when toggling contain
https://bugs.webkit.org/show_bug.cgi?id=236261

Patch by Rob Buis <rbuis@igalia.com> on 2022-02-10
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/contain-layout-020-expected.html: Added.
  • web-platform-tests/css/css-contain/contain-layout-020.html: Added.

Source/WebCore:

A change in layout containment for a container means either the container becomes
a absolute positioning containing block or ceases to be one. The method
removePositionedObjectsIfNeeded handles this, update it to take layout containment
changes into account.

Test: imported/w3c/web-platform-tests/css/css-contain/contain-layout-020.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::removePositionedObjectsIfNeeded):

3:10 AM Changeset in webkit [289526] by Antti Koivisto
  • 6 edits
    2 adds in trunk

[:has() pseudo-class] Nullptr crash with non-function :has
https://bugs.webkit.org/show_bug.cgi?id=236431
rdar://87061239

Reviewed by Cameron McCormack.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/parsing/parse-has-expected.txt:
  • web-platform-tests/css/selectors/parsing/parse-has.html:

Source/WebCore:

Test: fast/selectors/malformed-has.html

  • css/parser/CSSSelectorParser.cpp:

(WebCore::isOnlyPseudoClassFunction):

:has() is legal, plain :has is not.

LayoutTests:

  • fast/selectors/malformed-has-expected.txt: Added.
  • fast/selectors/malformed-has.html: Added.
2:36 AM Changeset in webkit [289525] by commit-queue@webkit.org
  • 42 edits
    3 copies
    8 adds in trunk

Introduce a RemoteMediaSampleProxy to represent captured video frames used in Media Streams and present in GPUP
https://bugs.webkit.org/show_bug.cgi?id=236099

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-10
Reviewed by Youenn Fablet.

Source/WebCore:

Add VideoFrame : public MediaStream, base class for Media Stream video frames.
Currently inherits from MediaSample, but later will remove the MediaSample.

The WebCore::VideoFrame is intended to be used in various entry-points that
currently are currently typed as:

void videoSampleAvailable(MediaSample&, VideoSampleMetadata, ...).

The new class WebKit::RemoteVideoFrameProxy : public VideoFrame can be passed to these APIs.
The API entrypoints are not yet changed in order to partially roll the changes in.
Later on, the entrypoints will be similar to:

void videoSampleAvailable(VideoFrame&, VideoSampleMetadata, ...).

Removes MediaSample::setTrackID as that is not used.
Changes MediaSample::platformSample() to const, so that it can be called from
const context.

No new tests, refactor.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/MediaSample.h:
  • platform/VideoFrame.cpp: Added.

(WebCore::VideoFrame::decodeTime const):
(WebCore::VideoFrame::duration const):
(WebCore::VideoFrame::trackID const):
(WebCore::VideoFrame::sizeInBytes const):
(WebCore::VideoFrame::presentationSize const):
(WebCore::VideoFrame::offsetTimestampsBy):
(WebCore::VideoFrame::setTimestamps):
(WebCore::VideoFrame::isDivisable const):
(WebCore::VideoFrame::divide):
(WebCore::VideoFrame::createNonDisplayingCopy const):
(WebCore::VideoFrame::flags const):
(WebCore::VideoFrame::byteRange const):
(WebCore::VideoFrame::dump const):

  • platform/VideoFrame.h: Added.
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:

(WebCore::LocalSampleBufferDisplayLayer::enqueueSampleBuffer):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateCurrentFrameImage):

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:

(isType):

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

(WebCore::MediaSampleAVFObjC::platformSample const):

  • platform/graphics/gstreamer/MediaSampleGStreamer.cpp:

(WebCore::MediaSampleGStreamer::platformSample const):

  • platform/graphics/gstreamer/MediaSampleGStreamer.h:
  • platform/mock/mediasource/MockSourceBufferPrivate.cpp:

(WebCore::MockMediaSample::platformSample const):

Source/WebKit:

WebContent process:
Add WebKit::RemoteVideoFrameProxy, WebContent process side proxy object that
WebCore::MediaPlayerPrivateMediaStreamAVFObjC can use.

RemoteVideoFrameProxy can be sent to the GPUP and the the SampleBufferDisplayLayer. So
the captured content shows in compositing through video element.

At the moment MediaPlayerPrivateMediaStreamAVFObjC cannot paint RemoteVideoFrameProxy to the
document CSS painted content, Context2D or WebGL canvas.

GPUP:
RemoteVideoFrameObjectHeap is a mapping
RemoteVideoFrameIdentifier -> MediaSample. Currently all objects
map to normal MediaSampleAVFObjC.

Add an example implementation where a remote MediaSample is returned by IPC:
RemoteGraphicsContextGL::paintCompositedResultsToMediaSample().

The GPUP object pointed by RemoteVideoFrameIdentifier is:

  • created in RemoteGraphicsContextGL::paintCompositedResultsToMediaSample() in RemoteGraphicsContextGL thread
  • consumed in RemoteSampleBufferDisplayLayer::enqueueSample in RemoteSampleBufferDisplayLayerManager thread
  • released in RemoteVideoFrameObjectHeap::releaseVideoFrame in GPUP main thread

All of these messages are asynchronous and can arrive to their destination in any order.
For example, request to release the video frame can happen before the message to create the video frame has been
received.

To solve the ordering issue, introduce readers-writers reference counting method via following classes:

  • ObjectIdentifierReadReference
  • ObjectIdentifierWriteReference
  • ObjectIdentifierReferenceTracker

ObjectIdentifier identifies the object.
ObjectIdentifierWriteReference identifies a new version of the content pointed by the identifier.
Pseudocode examples:

WriteReference { identifier = 1, pendingReads = 0, version = 0 } means:

"End the life-time of identifier 1, version 0. Create version = 1"
This is how initial object is assigned to the reference.

WriteReference { identifier = 1, pendingReads = 77, version = 32 } means

"End the life-time of identifier 1, version 32 when all 77 reads have completed. Create version = 33"

ObjectIdentifierReadReference declares a read dependency to a specific version of the content pointed by the identifier.
Pseudocode examples:

ReadReference { identifier = 1, version = 32 } means
"Complete one read of identifier 1, version 32".

Creates, updates and destructions are WriteReferences.
Reads are ReadReferences.

The ObjectIdentifierReferenceTracker creates write and read references in the Proxy -using process (WebContent process).

The added ThreadSafeObjectHeap resolves the read and write references in the real object process (GPUP in this case).
Reads and writes are blocking the requesting thread appropriately:

  • Read of unknown version of the identifier blocks until the write creates the version
  • Write of new version of the identifier blocks until the reads have retired, or creates parallel, new version of the content in case of copy-on-write schemes.

In this commit objects pointed by RemoteVideoFrameIdentifier are immutable until destroyed, so there is no update or
copy-on-write scheme here.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess):
(WebKit::GPUConnectionToWebProcess::didClose):
(WebKit::GPUConnectionToWebProcess::videoFrameObjectHeap const):

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

(WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL):
(WebKit::RemoteGraphicsContextGL::paintCompositedResultsToMediaSample):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.cpp: Added.

(WebKit::RemoteVideoFrameObjectHeap::create):
(WebKit::RemoteVideoFrameObjectHeap::RemoteVideoFrameObjectHeap):
(WebKit::RemoteVideoFrameObjectHeap::~RemoteVideoFrameObjectHeap):
(WebKit::RemoteVideoFrameObjectHeap::stopListeningForIPC):
(WebKit::RemoteVideoFrameObjectHeap::addVideoFrame):
(WebKit::RemoteVideoFrameObjectHeap::releaseVideoFrame):

  • GPUProcess/media/RemoteVideoFrameObjectHeap.h: Added.
  • GPUProcess/media/RemoteVideoFrameObjectHeap.messages.in: Copied from Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in.
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:

(WebKit::RemoteSampleBufferDisplayLayer::create):
(WebKit::RemoteSampleBufferDisplayLayer::RemoteSampleBufferDisplayLayer):
(WebKit::RemoteSampleBufferDisplayLayer::enqueueSample):
(WebKit::RemoteSampleBufferDisplayLayer::enqueueSampleCV):

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp:

(WebKit::RemoteSampleBufferDisplayLayerManager::createLayer):

  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):
(headers_for_type):

  • Shared/IPCTester.cpp:

(WebKit::IPCTester::startMessageTesting):
(WebKit::isTestingIPC):

  • Shared/IPCTester.h:

(WebKit::isTestingIPC):

  • Shared/ObjectIdentifierReferenceTracker.h: Added.

(WebKit::ObjectIdentifierReference::ObjectIdentifierReference):
(WebKit::ObjectIdentifierReference::identifier const):
(WebKit::ObjectIdentifierReference::version const):
(WebKit::ObjectIdentifierReference::operator== const):
(WebKit::ObjectIdentifierReference::isHashTableDeletedValue const):
(WebKit::ObjectIdentifierReadReference::ObjectIdentifierReadReference):
(WebKit::ObjectIdentifierReadReference::identifier const):
(WebKit::ObjectIdentifierReadReference::version const):
(WebKit::ObjectIdentifierReadReference::reference const):
(WebKit::ObjectIdentifierReadReference::encode const):
(WebKit::ObjectIdentifierReadReference::decode):
(WebKit::ObjectIdentifierWriteReference::ObjectIdentifierWriteReference):
(WebKit::ObjectIdentifierWriteReference::identifier const):
(WebKit::ObjectIdentifierWriteReference::version const):
(WebKit::ObjectIdentifierWriteReference::pendingReads const):
(WebKit::ObjectIdentifierWriteReference::reference const):
(WebKit::ObjectIdentifierWriteReference::retire const):
(WebKit::ObjectIdentifierWriteReference::encode const):
(WebKit::ObjectIdentifierWriteReference::decode):
(WebKit::ObjectIdentifierReferenceTracker::ObjectIdentifierReferenceTracker):
(WebKit::ObjectIdentifierReferenceTracker::read const):
(WebKit::ObjectIdentifierReferenceTracker::write const):
(WebKit::ObjectIdentifierReferenceTracker::identifier const):
(WebKit::add):
(WebKit::operator<<):
(WTF::DefaultHash<WebKit::ObjectIdentifierReference<T>>::hash):
(WTF::DefaultHash<WebKit::ObjectIdentifierReference<T>>::equal):

  • Shared/ThreadSafeObjectHeap.h: Added.

(WebKit::ThreadSafeObjectHeap::ReferenceState::ReferenceState):
(WebKit::HeldType>::retire):
(WebKit::HeldType>::retireRemove):
(WebKit::HeldType>::clear):

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.cpp:

(WebKit::MediaSampleByteRange::platformSample const):

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.h:
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::paintCompositedResultsToMediaSample):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm:
  • WebProcess/GPU/media/RemoteVideoFrameIdentifier.h: Copied from Source/WebKit/Shared/IPCTester.h.
  • WebProcess/GPU/media/RemoteVideoFrameProxy.cpp: Added.

(WebKit::RemoteVideoFrameProxy::create):
(WebKit::RemoteVideoFrameProxy::properties):
(WebKit::RemoteVideoFrameProxy::RemoteVideoFrameProxy):
(WebKit::RemoteVideoFrameProxy::~RemoteVideoFrameProxy):
(WebKit::RemoteVideoFrameProxy::identifier const):
(WebKit::RemoteVideoFrameProxy::write const):
(WebKit::RemoteVideoFrameProxy::read const):
(WebKit::RemoteVideoFrameProxy::presentationTime const):
(WebKit::RemoteVideoFrameProxy::platformSample const):
(WebKit::RemoteVideoFrameProxy::videoRotation const):
(WebKit::RemoteVideoFrameProxy::videoMirrored const):
(WebKit::RemoteVideoFrameProxy::videoPixelFormat const):
(WebKit::RemoteVideoFrameProxy::videoFrame const):
(WebKit::RemoteVideoFrameProxy::disconnectGPUProcessIfNeeded const):
(WebKit::RemoteVideoFrameProxy::waitForWasInitialized const):
(WebKit::RemoteVideoFrameProxy::gpuProcessConnectionDidClose):
(WebKit::RemoteVideoFrameProxy::wasInitialized):

  • WebProcess/GPU/media/RemoteVideoFrameProxy.h: Added.

(WebKit::RemoteVideoFrameProxy::Properties::encode const):
(WebKit::RemoteVideoFrameProxy::Properties::decode):
(isType):

  • WebProcess/GPU/media/RemoteVideoFrameProxy.messages.in: Copied from Source/WebKit/Shared/IPCTester.h.
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:

(WebKit::SampleBufferDisplayLayer::SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::~SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::enqueueSample):
(WebKit::SampleBufferDisplayLayer::gpuProcessConnectionDidClose):
(WebKit::SampleBufferDisplayLayer::disconnectGPUProcessConnectionIfNeeded):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:

Tools:

  • Scripts/generate-gpup-webgl:
  • TestWebKitAPI/Tests/WebCore/SampleMap.cpp:
1:27 AM Changeset in webkit [289524] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Non-default constructible types cannot be decoded with IPC::Decoder
https://bugs.webkit.org/show_bug.cgi?id=236246

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-10
Reviewed by Antti Koivisto.

Add yet another decode function: std::optional<T> Decoder::decode<T>();

Consider the pattern:

std::optional<T> t;
decoder >> t;
if (!t)

....

The above neccessitates default construction of T, since it contains

std::optional<T> t;
t = ...; assignment. This assignment cannot be elided.

Better pattern is:

auto t = decoder.decode<T>();

This is significant with for types with const members:

struct T {

const uint64_t version;

};

  • Platform/IPC/Decoder.h:

(IPC::Decoder::decode):
(IPC::Decoder::operator>>):

  • Platform/IPC/HandleMessage.h:

(IPC::handleMessage):
(IPC::handleMessageWantsConnection):
(IPC::handleMessageSynchronous):
(IPC::handleMessageSynchronousWantsConnection):
(IPC::handleMessageAsync):
(IPC::handleMessageAsyncWantsConnection):

1:07 AM Changeset in webkit [289523] by Martin Robinson
  • 15 edits in trunk/LayoutTests

[macOS arm64] imported/w3c/web-platform-tests/css/css-transforms/perspective-transforms-equivalence.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=235084
<rdar://problem/87421733>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Update pixel tolerances for some tests from the WPT transforms suite,
fixing them on Mac and on Glib-based ports.

  • web-platform-tests/css/css-transforms/2d-rotate-001.html:
  • web-platform-tests/css/css-transforms/group/svg-transform-nested-009.html:
  • web-platform-tests/css/css-transforms/perspective-transforms-equivalence.html:
  • web-platform-tests/css/css-transforms/preserve3d-and-filter-with-perspective.html:
  • web-platform-tests/css/css-transforms/skew-test1.html:
  • web-platform-tests/css/css-transforms/transform-background-001.html:
  • web-platform-tests/css/css-transforms/transform-background-002.html:
  • web-platform-tests/css/css-transforms/transform-table-009.html:
  • web-platform-tests/css/css-transforms/transform-table-010.html:
  • web-platform-tests/css/css-transforms/transform-table-011.html:
  • web-platform-tests/css/css-transforms/transforms-skewX.html:

LayoutTests:

  • platform/glib/TestExpectations: Unskip newly passing tests.
  • platform/mac/TestExpectations: Ditto.
12:17 AM Changeset in webkit [289522] by sihui_liu@apple.com
  • 4 edits in trunk/Source/WebCore

IDBRequest should emit write barrier on JSValueInWrappedObject modification
https://bugs.webkit.org/show_bug.cgi?id=236278

Reviewed by Geoffrey Garen.

In IDBRequest, m_resultWrapper is used to cache JSValue for m_result. When request is performing operation (e.g.
iterating cursor), we clear both m_result and m_resultWrapper. When request is done, we set m_result and
m_resultWrapper. The spec requires the IDBRequest.result() to return the same JavaScript object after operation,
so we introduced m_cursorWrapper to temporarily store the JSValue during operation. When operation starts, we
set m_cursorWrapper with m_resultWrapper and when opreation finishes successfully, we set m_resultWrapper back
using m_cursorWrapper.

This has a semantic error as the assignment process does not emit write barrier (webkit.org/b/236277). To fix
it, we may just remove m_cursorWrapper and not clear m_resultWrapper during operation. Since we clear m_result
in operation, we can check if m_result is empty to decide whether we should return m_resultWrapper for
IDBRequest.result().

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::willIterateCursor):
(WebCore::IDBRequest::didOpenOrIterateCursor):
(WebCore::IDBRequest::clearWrappers):

  • Modules/indexeddb/IDBRequest.h:

(WebCore::IDBRequest::resultWrapper):
(WebCore::IDBRequest::cursorWrapper): Deleted.

  • bindings/js/JSIDBRequestCustom.cpp:

(WebCore::JSIDBRequest::result const):
(WebCore::JSIDBRequest::visitAdditionalChildren):

12:10 AM Changeset in webkit [289521] by Manuel Rego Casasnovas
  • 4 edits
    2 adds in trunk

:focus-visible with click on radio/checkbox labels is broken
https://bugs.webkit.org/show_bug.cgi?id=236331

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Added new WPT test to cover this case.

  • web-platform-tests/css/selectors/focus-visible-026-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-026.html: Added.

Source/WebCore:

When the label is clicked we have to send the FocusTrigger information to Element::focus().
There we avoid setting FocusVisibility:Visible if it has been triggered via mouse click.

Test: imported/w3c/web-platform-tests/css/selectors/focus-visible-026.html

  • dom/Element.cpp:

(WebCore::Element::focus): Add a check for FocusTrigger::Click to avoid setting FocusVisibility:Visible.

  • html/HTMLLabelElement.cpp:

(WebCore::HTMLLabelElement::defaultEventHandler): Pass FocusTrigger::Click.

Feb 9, 2022:

11:44 PM Changeset in webkit [289520] by Diego Pino Garcia
  • 2 edits
    18 deletes in trunk/LayoutTests

[WPE] Mark several WPT SVG import filter tests as failure

Unreviewed test gardening.

r289510 updated the baselines of these tests, but this was not the
right fix. These tests were passing in WPE until r288412. The tests
should be marked as a failure in WPE TestExpectations.

  • platform/wpe/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-composite-04-f-manual-expected.png: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-composite-04-f-manual-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-composite-05-f-manual-expected.png: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-composite-05-f-manual-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-conv-03-f-manual-expected.png: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-conv-03-f-manual-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-displace-01-f-manual-expected.png: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-displace-01-f-manual-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-01-b-manual-expected.png: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-01-b-manual-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-02-b-manual-expected.png: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-02-b-manual-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-03-f-manual-expected.png: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-03-f-manual-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-04-f-manual-expected.png: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-04-f-manual-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-05-f-manual-expected.png: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-05-f-manual-expected.txt: Removed.
10:00 PM Changeset in webkit [289519] by Ross Kirsling
  • 4 edits in trunk

SharedMemoryUnix should use SHM_ANON when available
https://bugs.webkit.org/show_bug.cgi?id=236416

Reviewed by Don Olmstead.

.:

  • Source/cmake/OptionsCommon.cmake: Check for SHM_ANON.

Source/WebKit:

FreeBSD is able to use shm_open(SHM_ANON, ...) to create an anonymous shared memory object which is subject to RAII:
https://www.freebsd.org/cgi/man.cgi?query=shm_open

  • Platform/unix/SharedMemoryUnix.cpp:

(WebKit::createSharedMemory):
Make use of SHM_ANON if we have it.

9:18 PM Changeset in webkit [289518] by Said Abou-Hallawa
  • 42 edits in trunk/Source

[GPU Process] Move ImageBuffer::createCompatibleImageBuffer() and SVGRenderingContext::createImageBuffer to GraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=235758
rdar://88478470

Reviewed by Simon Fraser.

Source/WebCore:

The goal of this patch is to record the drawing if the concrete type of
the GraphicsContext is RemoteDisplayListRecorderProxy. Currently all the
intermediate compatible ImageBuffers are of type ConcreteImageBuffer.
The drawing to these ImageBuffers still happens in the WebProcess. Moreover
when we call drawImageBuffer() or clipToImageBuffer() for one of these
intermediate ImageBuffers to a remote ImageBuffer, we have to sink the
intermediate ImageBuffer to a NativeImage and send it to GPUProcess.

To fix this, the new enum 'RenderingMethod' will be used when creating
the ImageBuffer methods. The value of RenderingMethod can be one of the
following constants:

  1. Default: The type of the created ImageBuffer will match the type of the underlying ImageBuffer of the GraphicsContext.
  1. DisplayList: A DisplayList::ImageBuffer will be created whose GraphicsContext will be of type DisplayList::RecorderImpl.
  1. Local: The ImageBuffer will be of type ConcreteImageBuffer and it will hold a platform GraphicsContext.

Also GraphicsContext will provide these functions for creating an
ImageBuffer:

  1. GraphicsContext::createImageBuffer() (virtual): Creates a ConcreteImageBuffer or a DisplayList::ImageBuffer. The type of the created ImageBuffer is controlled by the argument 'renderingMethod'. Because RemoteDisplayListRecorderProxy is a super class of GraphicsContext, it overrides this method and returns the desired RemoteImageBuffer. RemoteDisplayListRecorderProxy has access to RemotRenderingBackendProxy so it can call its createImageBuffer().
  1. GraphicsContext::createImageBuffer() (non-virtual): Creates a scaled ImageBuffer and sets the context accordingly. The type of the created ImageBuffer is controlled by the argument 'renderingMethod'.
  1. GraphicsContext::createCompatibleImageBuffer() (virtual): Takes the scaleFactor() into consideration when creating the ImageBuffer. RemoteDisplayListRecorderProxy will override this function to return an Unaccelerated ImageBuffer if 'renderingMethod != Default'. This is to ensure that for GPUProcess drawing, no intermediate local ImageBuffers will draw to an IOSurface in WebProcess.

Two versions of these functions are provided: one takes a FloatSize and
the other takes a FloatRecct. The FloatRect version expands the four
corners of the rectangle to full pixels.

  • html/CustomPaintCanvas.cpp:

(WebCore::CustomPaintCanvas::replayDisplayList const):

  • html/CustomPaintImage.cpp:

(WebCore::CustomPaintImage::drawPattern):

  • html/OffscreenCanvas.cpp:

(WebCore::OffscreenCanvas::transferToImageBitmap):
(WebCore::OffscreenCanvas::commitToPlaceholderCanvas):

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::drawImage):

  • platform/cocoa/ThemeCocoa.mm:

(WebCore::drawApplePayButton):

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::drawPattern):

  • platform/graphics/CrossfadeGeneratedImage.cpp:

(WebCore::CrossfadeGeneratedImage::drawPattern):

  • platform/graphics/GradientImage.cpp:

(WebCore::GradientImage::drawPattern):

  • platform/graphics/GraphicsContext.cpp:

(WebCore::scaledImageBufferSize):
(WebCore::scaledImageBufferRect):
(WebCore::clampingScaleForImageBufferSize):
(WebCore::GraphicsContext::compatibleImageBufferSize const):
(WebCore::GraphicsContext::createImageBuffer const):
(WebCore::GraphicsContext::createCompatibleImageBuffer const):
(WebCore::GraphicsContext::clipToDrawingCommands):

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::createImageBuffer):

  • platform/graphics/ImageBuffer.cpp:

(WebCore::ImageBuffer::clone const):
(WebCore::ImageBuffer::createCompatibleBuffer): Deleted.
(WebCore::ImageBuffer::compatibleBufferSize): Deleted.
(WebCore::ImageBuffer::compatibleBufferInfo): Deleted.
(WebCore::ImageBuffer::copyRectToBuffer): Deleted.

  • platform/graphics/ImageBuffer.h:
  • platform/graphics/NamedImageGeneratedImage.cpp:

(WebCore::NamedImageGeneratedImage::drawPattern):

  • platform/graphics/RenderingMode.h:
  • platform/graphics/cg/PDFDocumentImage.cpp:

(WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
(WebCore::PDFDocumentImage::draw):

  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:

(WebCore::DrawGlyphsRecorder::drawOTSVGRun):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::createImageBuffer const):

  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/graphics/displaylists/DisplayListReplayer.cpp:

(WebCore::DisplayList::Replayer::applyItem):

  • platform/mac/ThemeMac.mm:

(WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::setupFilters):

  • rendering/RenderLayerBacking.cpp:

(WebCore::patternForDescription):

  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::allocateBackingStoreIfNeeded):
(WebCore::RenderLayerFilters::beginFilterEffect):

  • rendering/RenderLayerFilters.h:
  • rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::paintApplePayButton):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::paintListButtonForInput):
(WebCore::RenderThemeMac::paintProgressBar):

  • rendering/svg/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::applyClippingToContext):

  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::applyResource):

  • rendering/svg/RenderSVGResourceGradient.cpp:

(WebCore::createMaskAndSwapContextForTextGradient):
(WebCore::clipToTextMask):

  • rendering/svg/RenderSVGResourceMasker.cpp:

(WebCore::RenderSVGResourceMasker::applyResource):

  • rendering/svg/RenderSVGResourcePattern.cpp:

(WebCore::RenderSVGResourcePattern::buildPattern):
(WebCore::RenderSVGResourcePattern::createTileImage const):

  • rendering/svg/RenderSVGResourcePattern.h:
  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::clipToImageBuffer):
(WebCore::SVGRenderingContext::bufferForeground):
(WebCore::SVGRenderingContext::createImageBuffer): Deleted.
(WebCore::SVGRenderingContext::clear2DRotation): Deleted.

  • rendering/svg/SVGRenderingContext.h:
  • svg/SVGFEImageElement.cpp:

(WebCore::scaledImageBufferRect):
(WebCore::clampingScaleForImageBufferSize):
(WebCore::createImageBuffer):
(WebCore::SVGFEImageElement::imageBufferForEffect const):

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::drawPatternForContainer):

Source/WebKit:

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::beginClipToDrawingCommands):

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:

(WebKit::RemoteDisplayListRecorderProxy::createImageBuffer const):
(WebKit::RemoteDisplayListRecorderProxy::createCompatibleImageBuffer const):

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
8:11 PM Changeset in webkit [289517] by Lauro Moura
  • 2 edits in trunk/Source/WebCore

Unreviewed, non-unified build fix after r289474
https://bugs.webkit.org/show_bug.cgi?id=236425

  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
5:50 PM Changeset in webkit [289516] by Chris Dumez
  • 15 edits
    1 copy
    24 adds
    198 deletes in trunk/LayoutTests

Resync web-platform-tests/html/browsers from upstream
https://bugs.webkit.org/show_bug.cgi?id=236370

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Resync web-platform-tests/html/browsers from upstream 012f446eafc392c7.

  • web-platform-tests/html/browsers/*: Updated.

LayoutTests:

  • TestExpectations:
  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
  • platform/wpe/TestExpectations:
  • tests-options.json:
5:50 PM Changeset in webkit [289515] by ysuzuki@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

Use local variable pointer for concurrently load value
https://bugs.webkit.org/show_bug.cgi?id=236387

Reviewed by Saam Barati.

Consistently using local pointer to load member fields in

  1. WriteBarrierStructureID
  2. JSString's fiber
  3. Weak
  4. WriteBarrier<SomeKindOfCell>

to encourage compilers not to load the field twice.

  • heap/Weak.cpp:

(JSC::weakClearSlowCase):

  • heap/Weak.h:

(JSC::Weak::isHashTableEmptyValue const):
(JSC::Weak::unsafeImpl const):
(JSC::Weak::clear):
(JSC::Weak::impl const):

  • heap/WeakInlines.h:

(JSC::Weak<T>::isHashTableDeletedValue const):
(JSC:: const):
(JSC::Weak<T>::operator const):
(JSC::Weak<T>::get const):
(JSC::Weak<T>::leakImpl):

  • runtime/JSString.cpp:

(JSC::JSString::dumpToStream):
(JSC::JSString::estimatedSize):
(JSC::JSString::visitChildrenImpl):

  • runtime/JSString.h:

(JSC::JSString::fiberConcurrently const):
(JSC::JSString::is8Bit const):
(JSC::JSString::length const):
(JSC::JSString::tryGetValueImpl const):
(JSC::JSString::isSubstring const):

  • runtime/WriteBarrier.h:

(JSC::WriteBarrierBase::get const):
(JSC::WriteBarrierBase::operator* const):
(JSC::WriteBarrierBase::operator-> const):
(JSC::WriteBarrierBase::operator bool const):
(JSC::WriteBarrierBase::operator! const):
(JSC::WriteBarrierBase::unvalidatedGet const):
(JSC::WriteBarrierBase::cell const):
(JSC::WriteBarrierStructureID::get const):
(JSC::WriteBarrierStructureID::operator* const):
(JSC::WriteBarrierStructureID::operator-> const):
(JSC::WriteBarrierStructureID::operator bool const):
(JSC::WriteBarrierStructureID::operator! const):
(JSC::WriteBarrierStructureID::unvalidatedGet const):

5:27 PM Changeset in webkit [289514] by Wenson Hsieh
  • 6 edits in trunk/Source

Add some WebKitAdditions extension points in VisionKitCore SPI and softlinking headers
https://bugs.webkit.org/show_bug.cgi?id=236403
rdar://88709972

Reviewed by Aditya Keerthi.

Source/WebCore/PAL:

Add new WebKitAdditions header includes.

  • pal/cocoa/VisionKitCoreSoftLink.h:
  • pal/cocoa/VisionKitCoreSoftLink.mm:

Source/WebKit:

Declare a new helper function in TextRecognitionUtilities.h.

  • Platform/cocoa/TextRecognitionUtilities.h:
  • Platform/cocoa/TextRecognitionUtilities.mm:
5:27 PM Changeset in webkit [289513] by Alan Coon
  • 7 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r289383. rdar://problem/88366849

[WebCore] JSValueInWrappedObject is not correct for concurrent GC
https://bugs.webkit.org/show_bug.cgi?id=236277
rdar://88366849

Reviewed by Saam Barati.

JSValueInWrappedObject is broken for concurrent GC's marking. It is using std::variant<> to store Weak / JSValue,
which is not safe if concurrent GC reads it while changing that std::variant. This patch fixes several problems
in JSValueInWrappedObject.

  1. We must not use std::variant here since concurrent access can happen. We have both JSValue and Weak, and change Weak after fully initialize WeakImpl's content in Weak. To ensure that, we emit storeStoreBarrier before setting Weak to the JSValueInWrappedObject's field.
  2. Assignment operator & copy constructor are basically wrong for this class as we need a write-barrier to set a value to the field. We remove them and make it explicit that we do not have write-barrier, which reveals that IDBRequest has a semantic bug.
  3. We also add clear() instead of assigning empty JSValueInWrappedObject. And we ensure that this new clear() works well with concurrent GC threads: we clear the underlying WeakImpl* pointer to nullptr. But since WeakImpl* is kept alive until GC clears weak-related things in its end phase, concurrent GC thread can access the old WeakImpl*.
  • Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::setGetResult):
  • Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::setResult): (WebCore::IDBRequest::setResultToStructuredClone): (WebCore::IDBRequest::setResultToUndefined): (WebCore::IDBRequest::willIterateCursor): (WebCore::IDBRequest::didOpenOrIterateCursor):
  • Modules/paymentrequest/PaymentMethodChangeEvent.cpp:
  • Modules/paymentrequest/PaymentResponse.cpp: (WebCore::PaymentResponse::setDetailsFunction):
  • Modules/webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::getChannelData): (WebCore::AudioBuffer::visitChannelWrappers):
  • bindings/js/JSValueInWrappedObject.h: (WebCore::JSValueInWrappedObject::JSValueInWrappedObject): (WebCore::JSValueInWrappedObject::operator JSC::JSValue const): (WebCore::JSValueInWrappedObject::visit const): (WebCore::JSValueInWrappedObject::setWeakly): (WebCore::JSValueInWrappedObject::set): (WebCore::JSValueInWrappedObject::clear): (WebCore::JSValueInWrappedObject::setWithoutBarrier): (WebCore::cachedPropertyValue): (WebCore::JSValueInWrappedObject::makeValue): Deleted. (WebCore::JSValueInWrappedObject::operator=): Deleted.

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

5:26 PM Changeset in webkit [289512] by Alan Coon
  • 4 edits
    1 add in branches/safari-613-branch

Cherry-pick r289450. rdar://problem/88483574

[JSC] YarrJIT inlining should be disabled when we have DotStarEnclosure
https://bugs.webkit.org/show_bug.cgi?id=236332
rdar://88483574

Reviewed by Michael Saboff.

JSTests:

  • stress/yarr-inlining-dot-star-enclosure.js: Added. (test):

Source/JavaScriptCore:

YarrJITRegisters::initialStart can be used when m_pattern.m_saveInitialStartValue is true while
it is not defined in YarrJIT inlining. As a result, we emit broken code using InvalidGPRReg.
This patch makes canInline false when m_pattern.m_saveInitialStartValue is true.

  • yarr/YarrJIT.cpp:
  • yarr/YarrJITRegisters.h:

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

5:24 PM Changeset in webkit [289511] by Russell Epstein
  • 1 copy in tags/Safari-613.1.16.1.5

Tag Safari-613.1.16.1.5.

5:21 PM Changeset in webkit [289510] by Diego Pino Garcia
  • 51 edits
    41 adds in trunk/LayoutTests

[WPE] Unreviewed test gardening, update baselines of tests failing

  • platform/wpe/css1/font_properties/font-expected.png: Added.
  • platform/wpe/css1/font_properties/font-expected.txt:
  • platform/wpe/css2.1/t0905-c5525-fltwidth-00-c-g-expected.png: Added.
  • platform/wpe/css2.1/t0905-c5525-fltwidth-00-c-g-expected.txt:
  • platform/wpe/fast/block/margin-collapse/103-expected.png: Added.
  • platform/wpe/fast/block/margin-collapse/103-expected.txt:
  • platform/wpe/fast/css/font-face-opentype-expected.png: Added.
  • platform/wpe/fast/css/font-face-opentype-expected.txt:
  • platform/wpe/fast/css/word-space-extra-expected.png:
  • platform/wpe/fast/css/word-space-extra-expected.txt:
  • platform/wpe/fast/dom/52776-expected.png: Added.
  • platform/wpe/fast/dom/52776-expected.txt:
  • platform/wpe/fast/table/text-field-baseline-expected.png: Added.
  • platform/wpe/fast/table/text-field-baseline-expected.txt:
  • platform/wpe/fast/text/atsui-multiple-renderers-expected.png: Added.
  • platform/wpe/fast/text/atsui-multiple-renderers-expected.txt:
  • platform/wpe/fast/text/atsui-negative-spacing-features-expected.png:
  • platform/wpe/fast/text/atsui-negative-spacing-features-expected.txt:
  • platform/wpe/fast/text/atsui-spacing-features-expected.png:
  • platform/wpe/fast/text/atsui-spacing-features-expected.txt:
  • platform/wpe/fast/text/basic/015-expected.png: Added.
  • platform/wpe/fast/text/basic/015-expected.txt:
  • platform/wpe/fast/text/capitalize-boundaries-expected.png: Added.
  • platform/wpe/fast/text/capitalize-boundaries-expected.txt:
  • platform/wpe/fast/text/international/arabic-justify-expected.png: Added.
  • platform/wpe/fast/text/international/arabic-justify-expected.txt:
  • platform/wpe/fast/text/international/bidi-AN-after-L-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-AN-after-L-expected.txt:
  • platform/wpe/fast/text/international/bidi-AN-after-empty-run-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-AN-after-empty-run-expected.txt:
  • platform/wpe/fast/text/international/bidi-CS-after-AN-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-CS-after-AN-expected.txt:
  • platform/wpe/fast/text/international/bidi-control-chars-treated-as-ZWS-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-control-chars-treated-as-ZWS-expected.txt:
  • platform/wpe/fast/text/international/bidi-linebreak-001-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-linebreak-001-expected.txt:
  • platform/wpe/fast/text/international/bidi-linebreak-002-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-linebreak-002-expected.txt:
  • platform/wpe/fast/text/international/bidi-linebreak-003-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-linebreak-003-expected.txt:
  • platform/wpe/fast/text/international/bidi-listbox-atsui-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-listbox-atsui-expected.txt:
  • platform/wpe/fast/text/international/bidi-mirror-he-ar-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-mirror-he-ar-expected.txt:
  • platform/wpe/fast/text/international/bidi-neutral-directionality-paragraph-start-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-neutral-directionality-paragraph-start-expected.txt:
  • platform/wpe/fast/text/international/bidi-neutral-run-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-neutral-run-expected.txt:
  • platform/wpe/fast/text/international/bold-bengali-expected.png: Added.
  • platform/wpe/fast/text/international/bold-bengali-expected.txt:
  • platform/wpe/fast/text/international/danda-space-expected.png: Added.
  • platform/wpe/fast/text/international/danda-space-expected.txt:
  • platform/wpe/fast/text/international/hebrew-vowels-expected.png: Added.
  • platform/wpe/fast/text/international/hebrew-vowels-expected.txt:
  • platform/wpe/fast/text/international/hindi-whitespace-expected.png: Added.
  • platform/wpe/fast/text/international/hindi-whitespace-expected.txt:
  • platform/wpe/fast/text/international/thai-baht-space-expected.png: Added.
  • platform/wpe/fast/text/international/thai-baht-space-expected.txt:
  • platform/wpe/fast/text/international/thai-line-breaks-expected.png: Added.
  • platform/wpe/fast/text/international/thai-line-breaks-expected.txt:
  • platform/wpe/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.png: Added.
  • platform/wpe/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.txt:
  • platform/wpe/fast/text/khmer-lao-font-expected.png: Added.
  • platform/wpe/fast/text/khmer-lao-font-expected.txt:
  • platform/wpe/fast/text/unicode-variation-selector-expected.png: Added.
  • platform/wpe/fast/text/unicode-variation-selector-expected.txt:
  • platform/wpe/fast/text/wbr-expected.png:
  • platform/wpe/fast/text/wbr-expected.txt:
  • platform/wpe/fast/text/wide-zero-width-space-expected.png: Added.
  • platform/wpe/fast/text/wide-zero-width-space-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-composite-04-f-manual-expected.png: Added.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-composite-04-f-manual-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-composite-05-f-manual-expected.png: Added.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-composite-05-f-manual-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-conv-03-f-manual-expected.png: Added.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-conv-03-f-manual-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-displace-01-f-manual-expected.png: Added.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-displace-01-f-manual-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-01-b-manual-expected.png: Added.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-01-b-manual-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-02-b-manual-expected.png: Added.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-02-b-manual-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-03-f-manual-expected.png: Added.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-03-f-manual-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-04-f-manual-expected.png: Added.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-04-f-manual-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-05-f-manual-expected.png: Added.
  • platform/wpe/imported/w3c/web-platform-tests/svg/import/filters-image-05-f-manual-expected.txt:
  • platform/wpe/tables/mozilla/bugs/bug30692-expected.png: Added.
  • platform/wpe/tables/mozilla/bugs/bug30692-expected.txt:
5:12 PM Changeset in webkit [289509] by Chris Dumez
  • 2 edits in trunk/Source/WTF

[WK2] Turn on Shared Workers by default
https://bugs.webkit.org/show_bug.cgi?id=236396

Reviewed by Geoffrey Garen.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
4:46 PM Changeset in webkit [289508] by Chris Dumez
  • 17 edits
    1 copy in trunk/Source/WebKit

[iOS] Take adequate process assertion for the SharedWorker process
https://bugs.webkit.org/show_bug.cgi?id=236271

Reviewed by Brent Fulgham.

Keep track of client processes that rely on a particular SharedWorker process and take the adequate
process assertion to keep the process running on iOS when necessary. This allows us to get rid of
the hack I landed previously to always take a process assertion on behalf of the shared worker
process (even if all its clients are suspended).

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::sharedWorkerServerToContextConnectionIsNoLongerNeeded):
(WebKit::NetworkConnectionToWebProcess::serviceWorkerServerToContextConnectionNoLongerNeeded):

  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::registerServiceWorkerClient):
(WebKit::WebSWServerConnection::unregisterServiceWorkerClient):
(WebKit::WebSWServerConnection::contextConnectionCreated):

  • NetworkProcess/SharedWorker/WebSharedWorker.cpp:

(WebKit::WebSharedWorker::WebSharedWorker):
(WebKit::WebSharedWorker::didCreateContextConnection):
(WebKit::WebSharedWorker::addSharedWorkerObject):
(WebKit::WebSharedWorker::removeSharedWorkerObject):
(WebKit::WebSharedWorker::forEachSharedWorkerObject const):
(WebKit::WebSharedWorker::contextConnection const):

  • NetworkProcess/SharedWorker/WebSharedWorker.h:

(WebKit::WebSharedWorker::sharedWorkerObjectsCount const):
(WebKit::WebSharedWorker::sharedWorkerObjects): Deleted.

  • NetworkProcess/SharedWorker/WebSharedWorkerServer.cpp:

(WebKit::WebSharedWorkerServer::requestSharedWorker):
(WebKit::WebSharedWorkerServer::didFinishFetchingSharedWorkerScript):
(WebKit::WebSharedWorkerServer::createContextConnection):
(WebKit::WebSharedWorkerServer::removeContextConnection):
(WebKit::WebSharedWorkerServer::contextConnectionCreated):
(WebKit::WebSharedWorkerServer::sharedWorkerObjectIsGoingAway):
(WebKit::WebSharedWorkerServer::shutDownSharedWorker):
(WebKit::WebSharedWorkerServer::removeConnection):
(WebKit::WebSharedWorkerServer::postExceptionToWorkerObject):

  • NetworkProcess/SharedWorker/WebSharedWorkerServerToContextConnection.cpp:

(WebKit::WebSharedWorkerServerToContextConnection::launchSharedWorker):
(WebKit::WebSharedWorkerServerToContextConnection::addSharedWorkerObject):
(WebKit::WebSharedWorkerServerToContextConnection::removeSharedWorkerObject):

  • NetworkProcess/SharedWorker/WebSharedWorkerServerToContextConnection.h:
  • Shared/RemoteWorkerType.h: Copied from Source/WebKit/NetworkProcess/SharedWorker/WebSharedWorker.cpp.
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::terminateUnresponsiveServiceWorkerProcesses):
(WebKit::NetworkProcessProxy::registerRemoteWorkerClientProcess):
(WebKit::NetworkProcessProxy::unregisterRemoteWorkerClientProcess):
(WebKit::NetworkProcessProxy::remoteWorkerContextConnectionNoLongerNeeded):
(WebKit::NetworkProcessProxy::establishServiceWorkerContextConnectionToNetworkProcess):
(WebKit::NetworkProcessProxy::serviceWorkerContextConnectionNoLongerNeeded): Deleted.
(WebKit::NetworkProcessProxy::registerServiceWorkerClientProcess): Deleted.
(WebKit::NetworkProcessProxy::unregisterServiceWorkerClientProcess): Deleted.
(WebKit::NetworkProcessProxy::sharedWorkerContextConnectionNoLongerNeeded): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setUserAgent):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::establishServiceWorkerContextConnectionToNetworkProcess):
(WebKit::WebProcessPool::establishSharedWorkerContextConnectionToNetworkProcess):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::updateRemoteWorkerUserAgent):
(WebKit::WebProcessPool::terminateServiceWorkers):
(WebKit::WebProcessPool::updateProcessAssertions):
(WebKit::WebProcessPool::updateWorkerUserAgent): Deleted.

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::createForRemoteWorkers):
(WebKit::WebProcessProxy::didBecomeUnresponsive):
(WebKit::WebProcessProxy::didStartProvisionalLoadForMainFrame):
(WebKit::WebProcessProxy::setRemoteWorkerUserAgent):
(WebKit::WebProcessProxy::updateRemoteWorkerPreferencesStore):
(WebKit::WebProcessProxy::updateRemoteWorkerProcessAssertion):
(WebKit::WebProcessProxy::registerRemoteWorkerClientProcess):
(WebKit::WebProcessProxy::unregisterRemoteWorkerClientProcess):
(WebKit::WebProcessProxy::startServiceWorkerBackgroundProcessing):
(WebKit::WebProcessProxy::endServiceWorkerBackgroundProcessing):
(WebKit::WebProcessProxy::disableRemoteWorkers):
(WebKit::WebProcessProxy::enableRemoteWorkers):
(WebKit::WebProcessProxy::createForWorkers): Deleted.
(WebKit::WebProcessProxy::setWorkerUserAgent): Deleted.
(WebKit::WebProcessProxy::updateWorkerPreferencesStore): Deleted.
(WebKit::WebProcessProxy::updateWorkerProcessAssertion): Deleted.
(WebKit::WebProcessProxy::registerServiceWorkerClientProcess): Deleted.
(WebKit::WebProcessProxy::unregisterServiceWorkerClientProcess): Deleted.
(WebKit::WebProcessProxy::disableWorkers): Deleted.
(WebKit::WebProcessProxy::enableWorkers): Deleted.

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::hasServiceWorkerPageProxy):

  • WebKit.xcodeproj/project.pbxproj:
3:57 PM Changeset in webkit [289507] by jonlee@apple.com
  • 7 edits in trunk/LayoutTests

LayoutTests/imported/w3c:
Unreviewed gardening.

Add fuzzy data.

  • web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-2.html:
  • web-platform-tests/css/motion/offset-rotate-003.html:

LayoutTests:
Unreviewed gardening

Update fuzzy data.

  • css1/basic/class_as_selector.html:
  • css3/color-filters/color-filter-color-text-decorations.html:
  • css3/color-filters/color-filter-text-decoration-shadow.html:
3:48 PM Changeset in webkit [289506] by Jonathan Bedard
  • 3 edits in trunk/Tools

[EWS] Link commit URL to pull request
https://bugs.webkit.org/show_bug.cgi?id=236399
<rdar://problem/88707207>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/steps.py:

(GitHub.commit_url): We should link to commit within pull request
(ConfigureBuild.add_pr_details): Pass pr_number to GitHub.commit_url.

  • Tools/CISupport/ews-build/steps_unittest.py:

(TestGitHub.test_pr_url_with_repository):
(TestGitHub):
(TestGitHub.test_pr_url_with_invalid_repository):
(TestGitHub.test_commit_url_with_repository):
(TestGitHub.test_commit_url_with_invalid_repository):

Canonical link: https://commits.webkit.org/247040@main

2:59 PM Changeset in webkit [289505] by Russell Epstein
  • 1 copy in tags/Safari-614.1.1.5

Tag Safari-614.1.1.5.

2:58 PM Changeset in webkit [289504] by Russell Epstein
  • 3 edits in branches/safari-614.1.1-branch/Source/JavaScriptCore

Cherry-pick r289024. rdar://problem/88710933

SecureARM64EHashPins should check g_jscConfig.useFastJITPermissions
https://bugs.webkit.org/show_bug.cgi?id=236055
<rdar://88222677>

Reviewed by Mark Lam.

  • assembler/SecureARM64EHashPins.cpp: (JSC::SecureARM64EHashPins::initializeAtStartup): (JSC::SecureARM64EHashPins::allocatePinForCurrentThread): (JSC::SecureARM64EHashPins::deallocatePinForCurrentThread):
  • assembler/SecureARM64EHashPinsInlines.h: (JSC::SecureARM64EHashPins::pinForCurrentThread):

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

2:58 PM Changeset in webkit [289503] by Russell Epstein
  • 6 edits in branches/safari-614.1.1-branch/Source

Cherry-pick r288970. rdar://problem/88710933

Update computation of FAST_TLS base.
https://bugs.webkit.org/show_bug.cgi?id=235934

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

  • assembler/MacroAssemblerARM64.h: (JSC::MacroAssemblerARM64::loadFromTLS32): (JSC::MacroAssemblerARM64::loadFromTLS64): (JSC::MacroAssemblerARM64::storeToTLS32): (JSC::MacroAssemblerARM64::storeToTLS64):
  • assembler/SecureARM64EHashPinsInlines.h: (JSC::SecureARM64EHashPins::keyForCurrentThread):
  • offlineasm/arm64.rb:

Source/WTF:

  • wtf/PlatformHave.h:

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

2:55 PM Changeset in webkit [289502] by eric.carlson@apple.com
  • 4 edits in trunk

WKWebView: WKURLSchemeHandler “request to the end of the resource” produces an invalid header
https://bugs.webkit.org/show_bug.cgi?id=236401
rdar://88528286

Reviewed by Brent Fulgham.

Source/WebCore:

https://webkit.org/b/203302 added support for Range requests to AVAssetResourceLoadingDataRequest,
but it incorrectly used '*' instead of for "last-byte-pos:" for a request to the end of the resource.

API test URLSchemeHandler.Ranges was updated.

  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:

(WebCore::WebCoreAVFResourceLoader::startLoading):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
2:02 PM Changeset in webkit [289501] by Russell Epstein
  • 9 edits in branches/safari-614.1.1-branch/Source

Versioning.

WebKit-7614.1.1.5

1:18 PM Changeset in webkit [289500] by commit-queue@webkit.org
  • 3 edits
    1 copy in trunk/Source/WTF

Unreviewed, reverting r289490.
https://bugs.webkit.org/show_bug.cgi?id=236402

EWS gets build failures

Reverted changeset:

"Reland native Xcode build phases for "Copy WTF Headers""
https://bugs.webkit.org/show_bug.cgi?id=235744
https://commits.webkit.org/r289490

12:53 PM Changeset in webkit [289499] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Vertical writing mode with RTL text content has incorrect advances
https://bugs.webkit.org/show_bug.cgi?id=236345

Reviewed by Antti Koivisto.

contentRightInInlineDirectionVisualOrder is the visual offset of the adjoining runs ignoring the writing mode (horizontal vs. vertical).
It's visual in the inline direction sense (right to left vs. left to right), but it's not transformed in the context of writing mode, i.e. width and height are not flipped.

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

12:48 PM Changeset in webkit [289498] by graouts@webkit.org
  • 5 edits
    4 adds in trunk

Dialog element only animates once
https://bugs.webkit.org/show_bug.cgi?id=236274
rdar://88635487

Reviewed by Tim Nguyen and Dean Jackson.

LayoutTests/imported/w3c:

Add two new tests that check that we correctly start, stop and resume animations on <dialog>
and ::backdrop as a <dialog> element is open, closed and open again.

  • web-platform-tests/css/css-animations/dialog-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-animation.html: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation.html: Added.
  • web-platform-tests/css/css-animations/support/testcommon.js:

(addElement):
(addDiv):

Source/WebCore:

Two issues related to CSS Animation surfaced in this bug which animates both <dialog>
and its ::backdrop as the dialog is open and eventually re-opened.

The first issue was that we didn't clear all CSS Animations state when a <dialog> was
closed and its style was set to display: none. We now use the clearCSSAnimationsForStyleable()
function (static so that it's not exposed on the Styleable struct) to correctly clear
such state both when we identify a Styleable is newly getting display: none and when
cancelDeclarativeAnimations() was called. This allows us to remove removeCSSAnimationCreatedByMarkup()
a fair bit of work to clear CSS Animation state per-animation when we only ever used that
function for _all_ animations.

The second issue was that we never called cancelDeclarativeAnimations() for ::backdrop.
We now do that inside of Element::removeFromTopLayer() at a point where the code in
Styleable::fromRenderer() will still work as the element will still be contained in
Document::topLayerElements().

Tests: imported/w3c/web-platform-tests/css/css-animations/dialog-animation.html

imported/w3c/web-platform-tests/css/css-animations/dialog-backdrop-animation.html

  • dom/Element.cpp:

(WebCore::Element::removeFromTopLayer):

  • style/Styleable.cpp:

(WebCore::clearCSSAnimationsForStyleable):
(WebCore::Styleable::cancelDeclarativeAnimations const):
(WebCore::Styleable::updateCSSAnimations const):
(WebCore::removeCSSAnimationCreatedByMarkup): Deleted.

12:36 PM Changeset in webkit [289497] by Fujii Hironori
  • 4 edits in trunk

compositing/masks/compositing-clip-path-mask-change.html is failing for ports using TextureMapper
https://bugs.webkit.org/show_bug.cgi?id=236323

Reviewed by Don Olmstead.

Source/WebCore:

Apple ports don't have this issue because GraphicsLayerCA support
Shape layer for clip-path.

The painting phase of the existing mask layer should be updated if
clip-path or mask are changed.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateMaskingLayer):

LayoutTests:

  • platform/gtk/TestExpectations:
12:25 PM Changeset in webkit [289496] by Ryan Haddad
  • 5 edits in trunk/Tools

Move macOS EWS to Big Sur
https://bugs.webkit.org/show_bug.cgi?id=236035

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/config.json:
  • CISupport/build-webkit-org/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot):

  • CISupport/ews-build/config.json:
  • CISupport/ews-build/factories_unittest.py:

(TestExpectedBuildSteps):

Canonical link: https://commits.webkit.org/247033@main

12:20 PM Changeset in webkit [289495] by graouts@webkit.org
  • 22 edits in trunk/Source

[model] improve sizing on macOS
https://bugs.webkit.org/show_bug.cgi?id=236233
<rdar://problem/88569881>

Reviewed by Simon Fraser.

Source/WebCore:

We detect when the <model> layer size changes under RenderLayerBacking::updateGeometry()
and inform the associated HTMLModelElement through the new parentLayerSizeMayHaveChanged()
method that the size has changed. We then inform the backing player that sizeDidChange().

  • Modules/model-element/HTMLModelElement.cpp:

(WebCore::HTMLModelElement::createModelPlayer):
(WebCore::HTMLModelElement::parentLayerSizeMayHaveChanged):
(WebCore::HTMLModelElement::platformLayerSize const):

  • Modules/model-element/HTMLModelElement.h:
  • Modules/model-element/ModelPlayer.h:
  • Modules/model-element/dummy/DummyModelPlayer.cpp:

(WebCore::DummyModelPlayer::sizeDidChange):

  • Modules/model-element/dummy/DummyModelPlayer.h:
  • Modules/model-element/scenekit/SceneKitModelPlayer.h:
  • Modules/model-element/scenekit/SceneKitModelPlayer.mm:

(WebCore::SceneKitModelPlayer::sizeDidChange):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::updateGeometry):

Source/WebCore/PAL:

Add newly-used CAFenceHandle and ASVInlinePreview SPIs.

  • pal/spi/cocoa/QuartzCoreSPI.h:
  • pal/spi/mac/SystemPreviewSPI.h:

Source/WebKit:

We override the new ModelPlayer::sizeDidChange() virtual method on ARKitInlinePreviewModelPlayerMac
to be notified when the <model> layer's has changed size. We then send the new ModelElementSizeDidChange
message to the UI process which will yield a call to ModelElementController::modelElementSizeDidChange().

In that new method, we call -[ASVInlinePreview updateFrame:completionHandler:] which provides us with a
CAFenceHandle which we copy to create a MachSendRight to send back to the Web process in the IPC callback.

Back in the Web process, we install this fence on the drawing area and finally call -[ASVInlinePreview
setFrameWithinFencedTransaction:] to complete the sizing update on both the ASVInlinePreview instances.

  • UIProcess/Cocoa/ModelElementControllerCocoa.mm:

(WebKit::ModelElementController::modelElementSizeDidChange):

  • UIProcess/ModelElementController.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::modelElementSizeDidChange):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/Model/ARKitInlinePreviewModelPlayer.h:
  • WebProcess/Model/ARKitInlinePreviewModelPlayer.mm:

(WebKit::ARKitInlinePreviewModelPlayer::sizeDidChange):

  • WebProcess/Model/mac/ARKitInlinePreviewModelPlayerMac.h:
  • WebProcess/Model/mac/ARKitInlinePreviewModelPlayerMac.mm:

(WebKit::ARKitInlinePreviewModelPlayerMac::load):
(WebKit::ARKitInlinePreviewModelPlayerMac::sizeDidChange):

11:48 AM Changeset in webkit [289494] by commit-queue@webkit.org
  • 4 edits in trunk

Add TAO check to PerformanceResourceTiming::fetchStart
https://bugs.webkit.org/show_bug.cgi?id=236379

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-09
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/resource-timing/cross-origin-start-end-time-with-redirects-expected.txt:

Source/WebCore:

This matches the spec and was recently changed in Chromium.
<https://chromium-review.googlesource.com/c/chromium/src/+/3448777>
Covered by a newly passing WPT test.

  • page/PerformanceResourceTiming.cpp:

(WebCore::fetchStart):

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

Register strings in CSSTokenizer created from preprocessing
https://bugs.webkit.org/show_bug.cgi?id=236309

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-09
Reviewed by Michael Saboff.

Register strings in CSSTokenizer created from preprocessing. This will align with
what is currently done for strings with escapes in CSSTokenizer::consumeName().

  • css/parser/CSSTokenizer.cpp:

(WebCore::CSSTokenizer::preprocessString):
(WebCore::CSSTokenizer::tryCreate):
(WebCore::CSSTokenizer::CSSTokenizer):
(WebCore::preprocessString): Deleted.

  • css/parser/CSSTokenizer.h:
  • css/parser/CSSTokenizerInputStream.h:
11:35 AM Changeset in webkit [289492] by commit-queue@webkit.org
  • 8 edits in trunk/Source

DisplayListRecorder implementations are not able to obtain extra information out of source ImageBuffers
https://bugs.webkit.org/show_bug.cgi?id=236296

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-09
Reviewed by Wenson Hsieh.

Source/WebCore:

Pass ImageBuffer& to various recording commands instead of the resource identifier.
This way implementations of DisplayListRecorder can obtain additional information
about the ImageBuffer, such as dependency information. This additional information is
not neccessarily needed for in-process display lists.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::drawFilteredImageBuffer):
(WebCore::DisplayList::Recorder::drawImageBuffer):
(WebCore::DisplayList::Recorder::clipToImageBuffer):

  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/graphics/displaylists/DisplayListRecorderImpl.cpp:

(WebCore::DisplayList::RecorderImpl::recordClipToImageBuffer):
(WebCore::DisplayList::RecorderImpl::recordDrawFilteredImageBuffer):
(WebCore::DisplayList::RecorderImpl::recordDrawImageBuffer):

  • platform/graphics/displaylists/DisplayListRecorderImpl.h:

Source/WebKit:

RecorderImpl now passes ImageBuffers to the DisplayListRecorder calls.
Use the ImageBuffer& to get the resource identifier.
In future commits these places will obtain the read references, which
record the depenedency information needed for RemoteImageBuffers
created in multiple threads.

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:

(WebKit::RemoteDisplayListRecorderProxy::recordClipToImageBuffer):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawFilteredImageBuffer):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawImageBuffer):

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
11:31 AM Changeset in webkit [289491] by fpizlo@apple.com
  • 1 edit
    1 add in trunk/Source/bmalloc

[libpas] add documentation
https://bugs.webkit.org/show_bug.cgi?id=236385

Rubber stamped by Mark Lam.

  • libpas/Documentation.md: Added.
10:56 AM Changeset in webkit [289490] by Elliott Williams
  • 3 edits
    1 delete in trunk/Source/WTF

Reland native Xcode build phases for "Copy WTF Headers"
https://bugs.webkit.org/show_bug.cgi?id=235744

Reviewed by Alexey Proskuryakov.

Changes since revert of r289256:

ICU headers, which are only needed for non-internal builds, are tracked in WTF.xcodeproj and
copied to /usr/local/include/unicode when building with the public SDK.

  • Configurations/WTF.xcconfig: Skip coping ICU headers when USE_INTERNAL_SDK=YES.
  • WTF.xcodeproj/project.pbxproj: Add ICU header directory and copy files phase.
10:51 AM Changeset in webkit [289489] by Chris Dumez
  • 6 edits in trunk

Worker scripts should always be decoded as UTF-8
https://bugs.webkit.org/show_bug.cgi?id=236319

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing.

  • web-platform-tests/workers/semantics/encodings/001-expected.txt:
  • web-platform-tests/workers/semantics/encodings/002-expected.txt:

Source/WebCore:

Worker scripts should always be decoded as UTF-8:

No new tests, rebaselined existing tests.

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::didReceiveData):

10:50 AM Changeset in webkit [289488] by Russell Epstein
  • 1 copy in tags/Safari-613.1.16.31.2

Tag Safari-613.1.16.31.2.

10:50 AM Changeset in webkit [289487] by Russell Epstein
  • 6 edits in branches/safari-613.1.16.31-branch/Source

Cherry-pick r288970. rdar://problem/88459807

Update computation of FAST_TLS base.
https://bugs.webkit.org/show_bug.cgi?id=235934

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

  • assembler/MacroAssemblerARM64.h: (JSC::MacroAssemblerARM64::loadFromTLS32): (JSC::MacroAssemblerARM64::loadFromTLS64): (JSC::MacroAssemblerARM64::storeToTLS32): (JSC::MacroAssemblerARM64::storeToTLS64):
  • assembler/SecureARM64EHashPinsInlines.h: (JSC::SecureARM64EHashPins::keyForCurrentThread):
  • offlineasm/arm64.rb:

Source/WTF:

  • wtf/PlatformHave.h:

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

10:48 AM Changeset in webkit [289486] by Russell Epstein
  • 9 edits in branches/safari-613.1.16.31-branch/Source

Versioning.

WebKit-7613.1.16.31.2

10:45 AM Changeset in webkit [289485] by commit-queue@webkit.org
  • 5 edits in trunk/Source

Move Safe Browsing knowledge into SafariSafeBrowsing framework
https://bugs.webkit.org/show_bug.cgi?id=231692

Patch by Eliot Hsu <eliot_hsu@apple.com> on 2022-02-09
Reviewed by Alex Christensen.

Following up on an old FIXME, move Safari Safe Browsing-specific
knowledge out of WebKit and into the SafariSafeBrowsing framework.
This includes things like the Learn More URL, the Report an Error URL,
etc.

Source/WebKit:

  • Platform/spi/Cocoa/SafeBrowsingSPI.h:
  • UIProcess/Cocoa/SafeBrowsingWarningCocoa.mm:

(WebKit::malwareDetailsBase):
(WebKit::learnMoreURL):
(WebKit::reportAnErrorBase):
(WebKit::localizedProvider):
Rely on new SafariSafeBrowsing calls to provide
URL/provider information about Safe Browsing,
when available

Source/WTF:

  • wtf/PlatformHave.h:
10:39 AM Changeset in webkit [289484] by jonlee@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening.

Timeout due to turning WebGL on by default on bots. Will be addressed in b234536.

  • platform/ios-wk2/TestExpectations:
10:30 AM Changeset in webkit [289483] by Chris Dumez
  • 29 edits in trunk

self.location.href is incorrect in shared workers in case of redirects
https://bugs.webkit.org/show_bug.cgi?id=236340

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing.

  • web-platform-tests/workers/baseurl/alpha/importScripts-in-sharedworker-expected.txt:
  • web-platform-tests/workers/baseurl/alpha/xhr-in-sharedworker-expected.txt:
  • web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-sharedworker-expected.txt:

Source/WebCore:

self.location.href is incorrect in shared workers in case of redirects. It should be
the URL of the last request, not the first one.

No new tests, rebaselined existing tests.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::redirectReceived):

  • loader/ThreadableLoaderClient.h:

(WebCore::ThreadableLoaderClient::redirectReceived):

  • loader/ThreadableLoaderClientWrapper.h:

(WebCore::ThreadableLoaderClientWrapper::redirectReceived):

  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::MainThreadBridge::redirectReceived):

  • loader/WorkerThreadableLoader.h:
  • workers/Worker.cpp:

(WebCore::Worker::notifyFinished):

  • workers/WorkerFetchResult.h:

(WebCore::WorkerFetchResult::isolatedCopy const):
(WebCore::workerFetchError):
(WebCore::WorkerFetchResult::encode const):
(WebCore::WorkerFetchResult::decode):

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::loadSynchronously):
(WebCore::WorkerScriptLoader::loadAsynchronously):
(WebCore::WorkerScriptLoader::redirectReceived):
(WebCore::WorkerScriptLoader::fetchResult const):

  • workers/WorkerScriptLoader.h:

(WebCore::WorkerScriptLoader::script const):
(WebCore::WorkerScriptLoader::lastRequestURL const):
(WebCore::WorkerScriptLoader::script): Deleted.

  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):

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

(WebCore::ServiceWorkerJob::notifyFinished):

  • workers/service/ServiceWorkerJobClient.h:
  • workers/shared/SharedWorkerScriptLoader.cpp:

(WebCore::SharedWorkerScriptLoader::notifyFinished):

  • workers/shared/context/SharedWorkerThreadProxy.cpp:

(WebCore::generateWorkerParameters):
(WebCore::SharedWorkerThreadProxy::SharedWorkerThreadProxy):

  • workers/shared/context/SharedWorkerThreadProxy.h:

Source/WebKit:

self.location.href is incorrect in shared workers in case of redirects. It should be the URL of
the last request, not the first one.

  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:

(WebKit::ServiceWorkerSoftUpdateLoader::didFinishLoading):

  • NetworkProcess/SharedWorker/WebSharedWorkerServerToContextConnection.cpp:

(WebKit::WebSharedWorkerServerToContextConnection::launchSharedWorker):

  • WebProcess/Storage/WebSharedWorkerContextManagerConnection.cpp:

(WebKit::WebSharedWorkerContextManagerConnection::launchSharedWorker):

  • WebProcess/Storage/WebSharedWorkerContextManagerConnection.h:
  • WebProcess/Storage/WebSharedWorkerContextManagerConnection.messages.in:
10:17 AM Changeset in webkit [289482] by J Pascoe
  • 5 edits in trunk

[WebAuthn] Specify LocalAuthenticatorAccessGroup when importing credentials
https://bugs.webkit.org/show_bug.cgi?id=236311
rdar://88394179

Reviewed by Brent Fulgham.

Source/WebKit:

Tested on device and added check for accessGroup in API test.

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

(+[_WKWebAuthenticationPanel importLocalAuthenticatorCredential:error:]):
(+[_WKWebAuthenticationPanel importLocalAuthenticatorWithAccessGroup:credential:error:]):

Tools:

Added check for accessGroup to API test.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::WebCore::addKeyToKeychain):
(TestWebKitAPI::TEST):

10:16 AM Changeset in webkit [289481] by Russell Epstein
  • 4 edits
    1 add in branches/safari-613.1.16.1-branch

Cherry-pick r289450. rdar://problem/88483574

[JSC] YarrJIT inlining should be disabled when we have DotStarEnclosure
https://bugs.webkit.org/show_bug.cgi?id=236332
rdar://88483574

Reviewed by Michael Saboff.

JSTests:

  • stress/yarr-inlining-dot-star-enclosure.js: Added. (test):

Source/JavaScriptCore:

YarrJITRegisters::initialStart can be used when m_pattern.m_saveInitialStartValue is true while
it is not defined in YarrJIT inlining. As a result, we emit broken code using InvalidGPRReg.
This patch makes canInline false when m_pattern.m_saveInitialStartValue is true.

  • yarr/YarrJIT.cpp:
  • yarr/YarrJITRegisters.h:

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

10:12 AM Changeset in webkit [289480] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[GStreamer] MediaPlayerPrivateGStreamer mishandles failure to create WebKitTextCombiner
https://bugs.webkit.org/show_bug.cgi?id=233230
<rdar://problem/86863068>

Patch by Philippe Normand <pnormand@igalia.com> on 2022-02-09
Reviewed by Xabier Rodriguez-Calvar.

Fallback to fakesink in case fakevideosink is not available. Also no longer RELEASE_ASSERT
in makeGStreamerElement and makeGStreamerBin. We should gracefully handle call sites when
these functions return nullptr.

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::makeGStreamerElement):
(WebCore::makeGStreamerBin):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createVideoSink):

10:05 AM Changeset in webkit [289479] by Chris Dumez
  • 10 edits in trunk

Exceptions are not properly reported when initializing a worker as a module
https://bugs.webkit.org/show_bug.cgi?id=236334

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing.

  • web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror-expected.txt:
  • web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/message-module-DOMException-expected.txt:

Source/WebCore:

No new tests, rebaselined existing tests.

  • workers/WorkerOrWorkletScriptController.cpp:

(WebCore::WorkerOrWorkletScriptController::linkAndEvaluateModule):
linkAndEvaluateModule() was failing to report the exception, unlike
evaluate() (which is used for classic workers).

9:43 AM Changeset in webkit [289478] by Russell Epstein
  • 9 edits in branches/safari-613.1.16.1-branch/Source

Versioning.

WebKit-7613.1.16.1.5

9:14 AM Changeset in webkit [289477] by Chris Dumez
  • 7 edits in trunk

Stop obfuscating exceptions thrown by scripts in data URLs
https://bugs.webkit.org/show_bug.cgi?id=236329

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing or whose output looks different.

  • web-platform-tests/workers/dedicated-worker-in-data-url-context.window-expected.txt:
  • web-platform-tests/workers/interfaces/WorkerUtils/importScripts/004-expected.txt:
  • web-platform-tests/workers/interfaces/WorkerUtils/importScripts/006-expected.txt:

Source/WebCore:

Stop obfuscating exceptions thrown by scripts in data URLs. This is causing some WPT tests to fail.

No new tests, rebaselined existing tests.

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::canIncludeErrorDetails):

9:06 AM Changeset in webkit [289476] by ysuzuki@apple.com
  • 11 edits in trunk/Source/WebCore

AudioBuffer should take a lock while visiting m_channelWrappers
https://bugs.webkit.org/show_bug.cgi?id=236279

Reviewed by Keith Miller.

This patch fixes AudioBuffer's m_channelWrappers concurrency bug and related issues.

  1. This patch removes problematic (and almost always wrong) move operator of JSValueInWrappedObject. To do that, we fixed AudioBuffer's concurrency issue where we access m_channelWrappers while it can be cleared concurrently in AudioBuffer::releaseMemory.
  2. MessageEvent's m_data access is broken with concurrent GC thread. We must take a lock. And we must not use JSValueInWrappedObject in std::variant if it can be changed after constructor invocation.
  3. Use JSValueInWrappedObject::clear instead of move with empty value.
  4. File https://bugs.webkit.org/show_bug.cgi?id=236353. AbortSignal, MessageEvent, and CustomEvent miss write-barrier, which is semantically wrong.
  • Modules/webaudio/AudioBuffer.cpp:

(WebCore::AudioBuffer::AudioBuffer):
(WebCore::AudioBuffer::releaseMemory):
(WebCore::AudioBuffer::visitChannelWrappers):

  • Modules/webaudio/AudioBuffer.h:
  • Modules/webaudio/AudioWorkletProcessor.cpp:

(WebCore::AudioWorkletProcessor::buildJSArguments):

  • bindings/js/JSMessageEventCustom.cpp:

(WebCore::JSMessageEvent::data const):
(WebCore::JSMessageEvent::visitAdditionalChildren):

  • bindings/js/JSValueInWrappedObject.h:
  • dom/AbortSignal.cpp:

(WebCore::AbortSignal::signalAbort):

  • dom/CustomEvent.cpp:

(WebCore::CustomEvent::initCustomEvent):

  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::MessageEvent):
(WebCore::m_jsData):
(WebCore::MessageEvent::initMessageEvent):
(WebCore::MessageEvent::memoryCost const):
(WebCore::m_ports): Deleted.

  • dom/MessageEvent.h:
  • page/History.cpp:

(WebCore::History::stateObjectAdded):

8:56 AM Changeset in webkit [289475] by Angelos Oikonomopoulos
  • 3 edits in trunk/JSTests

Skip failing shadow realms tests on MIPS
https://bugs.webkit.org/show_bug.cgi?id=236361

Unreviewed gardening.

  • stress/shadow-realm-evaluate.js:
  • stress/shadow-realm-import-value.js:
8:55 AM Changeset in webkit [289474] by sihui_liu@apple.com
  • 57 edits
    1 copy
    9 adds in trunk

Manage IndexedDB storage by origin
https://bugs.webkit.org/show_bug.cgi?id=234925
<rdar://problem/87555014>

Reviewed by Chris Dumez.

Source/WebCore:

Both WebKit and WebKitLegacy used IDBServer to manage UniqueIDBDatabases, and UniqueIDBDatabase pointed to
IDBServer. Now that WebKit uses WebKit::IDBStorageManager to manage UniqueIDBDatabases. We untie the
knot between IDBServer and UniqueIDBDatabase by adding a new abstract class UniqueIDBDatabaseManager and make
UniqueIDBDatabase point to UniqueIDBDatabaseManager.

Also, as quota check is no longer async according to changes in WebKit, we need to update operations in
UniqueIDBDatabase to adopt the change.

Covered by existing tests.

  • Headers.cmake:
  • Modules/indexeddb/IDBDatabaseIdentifier.h:
  • Modules/indexeddb/server/IDBConnectionToClient.h:
  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::registerConnection):
(WebCore::IDBServer::IDBServer::unregisterConnection):
(WebCore::IDBServer::IDBServer::createBackingStore):
(WebCore::IDBServer::IDBServer::upgradedDatabaseDirectory):
(WebCore::IDBServer::IDBServer::registerDatabaseConnection): Deleted.
(WebCore::IDBServer::IDBServer::unregisterDatabaseConnection): Deleted.
(WebCore::IDBServer::IDBServer::closeAndTakeUniqueIDBDatabase): Deleted.

  • Modules/indexeddb/server/IDBServer.h:
  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp:

(WebCore::IDBServer::MemoryIDBBackingStore::MemoryIDBBackingStore):
(WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):

  • Modules/indexeddb/server/MemoryIDBBackingStore.h:
  • Modules/indexeddb/server/MemoryObjectStore.cpp:

(WebCore::IDBServer::MemoryObjectStore::create):
(WebCore::IDBServer::MemoryObjectStore::MemoryObjectStore):

  • Modules/indexeddb/server/MemoryObjectStore.h:
  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::encodeDatabaseName):
(WebCore::IDBServer::SQLiteIDBBackingStore::decodeDatabaseName):
(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::filenameForDatabaseName const): Deleted.
(WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade): Deleted.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::manager):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperationAfterSpaceCheck):
(WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::createIndex):
(WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
(WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
(WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
(WebCore::IDBServer::UniqueIDBDatabase::putOrAddAfterSpaceCheck):
(WebCore::IDBServer::UniqueIDBDatabase::getRecord):
(WebCore::IDBServer::UniqueIDBDatabase::getAllRecords):
(WebCore::IDBServer::UniqueIDBDatabase::getCount):
(WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
(WebCore::IDBServer::UniqueIDBDatabase::openCursor):
(WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::hasDataInMemory const):

  • Modules/indexeddb/server/UniqueIDBDatabase.h:

(WebCore::IDBServer::UniqueIDBDatabase::server): Deleted.

  • Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:

(WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::manager):

  • Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:

(WebCore::IDBServer::UniqueIDBDatabaseConnection::server): Deleted.

  • Modules/indexeddb/server/UniqueIDBDatabaseManager.h: Added.

(WebCore::IDBServer::UniqueIDBDatabaseManager::~UniqueIDBDatabaseManager):

  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:

(WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):

  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
  • Modules/indexeddb/shared/IDBError.h:

(WebCore::IDBError::operator bool const):

  • Modules/indexeddb/shared/IDBRequestData.h:
  • Modules/indexeddb/shared/IDBResourceIdentifier.h:

(WebCore::IDBResourceIdentifier::operator!= const):

  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

In network process, IndexedDB data is managed by WebKit::WebIDBServer. Each session owns a WebIDBServer
(IDBServer) and each IDBServer owns one or more UniqueIDBDatabases (resprenting one actual database that
IDBDatabase connects to, can be identified by {session, origin, name}). Now that we have NetworkStorageManager,
which manages session storage by origin, we can merge WebIDBServer with NetworkStorageManager, since IndexedDB
storage is not shared across origins.

The old structure is:
NetworkSession - WebIDBServer - IDBServer - UniqueIDBDatabases
The new structure is:
NetworkSession - NetworkStorageManager - OriginStorageManager - IDBStorageManager - UniqueIDBDatabase

To complete this transition, we need to make a few changes:

  1. Web process now sends IndexedDB related messages to NetworkStorageManager instead of WebIDBServer.
  2. Some messages are sent to operate on UniqueIDBDatabaseConnection or UniqueIDBDatabaseTransaction, and they

use identifiers to specify the target. Therefore, NetworkStorageManagers needs to know the mapping between
identifiers and target objects. A new clas IDBStorageRegistry is added record this mapping. Each
NetworkStorageManager owns a IDBStorageRegistry and it passes IDBStorageRegistry to IDBStorageManager,
IDBStorageManager will register objects to IDBStorageRegistry and NetworkStorageManager can do search via
IDBStorageRegistry.

  1. Quota check for IndexedDB operations becomes async by adding new QuotaManager class, which is similar to

WebCore::StorageQuotaManager but provides async interfaces.
We used to block the IDBServer thread when it is waiting for quota check result from UI process, this is fine
because IDBServer runs on its own thread. Now that IDBStorageManager runs on the same thread as the other
storage types, we cannot block the thread on quota check.

  1. Rename WebIDBConnectionToClient to IDBStorageConnectionToClient to reflect the change on the structure. Also,

IDBStorageConnectionToClient does not keep reference to the IPC::Connection now, it only records
IPC::Connection::UniqueID.

  1. IndexedDB data may be put in different version dirctories. We used to migrate database to new version

diretory when the database is accessed. As IDBStorageManager now manages IndexedDB data of one origin, it's
simpler if it only keeps track of one directory. Therefore, we now migrate all databases of one origin
when the origin is accessed (see IDBStorageManager::idbStorageOriginDirectory).

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::updateQuotaBasedOnSpaceUsageForTesting):
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFilesForIndexedDB):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::didClose):
(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData):
(WebKit::NetworkProcess::prepareToSuspend):
(WebKit::NetworkProcess::resume):
(WebKit::NetworkProcess::resetQuota):
(WebKit::NetworkProcess::didIncreaseQuota):
(WebKit::NetworkProcess::renameOriginInWebsiteData):
(WebKit::NetworkProcess::storageQuotaManager):
(WebKit::NetworkProcess::connectionToWebProcessClosed):
(WebKit::NetworkProcess::suspendIDBServers): Deleted.

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::shouldSuspendIDBServers const): Deleted.

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

(WebKit::NetworkSession::invalidateAndCancel):
(WebKit::NetworkSession::addStorageManagerSession):
(WebKit::NetworkSession::ensureWebIDBServer): Deleted.
(WebKit::NetworkSession::closeIDBServer): Deleted.
(WebKit::NetworkSession::addIndexedDatabaseSession): Deleted.

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::webIDBServer): Deleted.
(WebKit::NetworkSession::hasIDBDatabasePath const): Deleted.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::storagePath):
(WebKit::CacheStorage::Engine::diskUsage):
(WebKit::CacheStorage::Engine::requestSpace):

  • NetworkProcess/cache/CacheStorageEngine.h:
  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::requestSpace):

  • NetworkProcess/ios/NetworkProcessIOS.mm:

(WebKit::NetworkProcess::setIsHoldingLockedFiles):

  • NetworkProcess/storage/IDBStorageConnectionToClient.cpp: Added.

(WebKit::IDBStorageConnectionToClient::IDBStorageConnectionToClient):
(WebKit::IDBStorageConnectionToClient::~IDBStorageConnectionToClient):
(WebKit::IDBStorageConnectionToClient::connectionToClient):
(WebKit::IDBStorageConnectionToClient::didGetResult):
(WebKit::IDBStorageConnectionToClient::didDeleteDatabase):
(WebKit::IDBStorageConnectionToClient::didOpenDatabase):
(WebKit::IDBStorageConnectionToClient::didStartTransaction):
(WebKit::IDBStorageConnectionToClient::didAbortTransaction):
(WebKit::IDBStorageConnectionToClient::didCommitTransaction):
(WebKit::IDBStorageConnectionToClient::didCreateObjectStore):
(WebKit::IDBStorageConnectionToClient::didDeleteObjectStore):
(WebKit::IDBStorageConnectionToClient::didRenameObjectStore):
(WebKit::IDBStorageConnectionToClient::didClearObjectStore):
(WebKit::IDBStorageConnectionToClient::didCreateIndex):
(WebKit::IDBStorageConnectionToClient::didDeleteIndex):
(WebKit::IDBStorageConnectionToClient::didRenameIndex):
(WebKit::IDBStorageConnectionToClient::didPutOrAdd):
(WebKit::IDBStorageConnectionToClient::didGetRecord):
(WebKit::IDBStorageConnectionToClient::didGetAllRecords):
(WebKit::IDBStorageConnectionToClient::didGetCount):
(WebKit::IDBStorageConnectionToClient::didDeleteRecord):
(WebKit::IDBStorageConnectionToClient::didOpenCursor):
(WebKit::IDBStorageConnectionToClient::didIterateCursor):
(WebKit::IDBStorageConnectionToClient::didGetAllDatabaseNamesAndVersions):
(WebKit::IDBStorageConnectionToClient::fireVersionChangeEvent):
(WebKit::IDBStorageConnectionToClient::didCloseFromServer):
(WebKit::IDBStorageConnectionToClient::notifyOpenDBRequestBlocked):

  • NetworkProcess/storage/IDBStorageConnectionToClient.h: Added.
  • NetworkProcess/storage/IDBStorageManager.cpp: Added.

(WebKit::migrateOriginData):
(WebKit::IDBStorageManager::idbStorageOriginDirectory):
(WebKit::IDBStorageManager::idbStorageSize):
(WebKit::getOriginsForVersion):
(WebKit::IDBStorageManager::originsOfIDBStorageData):
(WebKit::IDBStorageManager::IDBStorageManager):
(WebKit::IDBStorageManager::isActive const):
(WebKit::IDBStorageManager::hasDataInMemory const):
(WebKit::IDBStorageManager::closeDatabasesForDeletion):
(WebKit::IDBStorageManager::stopDatabaseActivitiesForSuspend):
(WebKit::IDBStorageManager::getOrCreateUniqueIDBDatabase):
(WebKit::IDBStorageManager::openDatabase):
(WebKit::IDBStorageManager::deleteDatabase):
(WebKit::IDBStorageManager::getAllDatabaseNamesAndVersions):
(WebKit::IDBStorageManager::openDBRequestCancelled):
(WebKit::IDBStorageManager::registerConnection):
(WebKit::IDBStorageManager::unregisterConnection):
(WebKit::IDBStorageManager::registerTransaction):
(WebKit::IDBStorageManager::unregisterTransaction):
(WebKit::IDBStorageManager::createBackingStore):
(WebKit::IDBStorageManager::requestSpace):

  • NetworkProcess/storage/IDBStorageManager.h: Added.
  • NetworkProcess/storage/IDBStorageRegistry.cpp: Added.

(WebKit::IDBStorageRegistry::ensureConnectionToClient):
(WebKit::IDBStorageRegistry::removeConnectionToClient):
(WebKit::IDBStorageRegistry::registerConnection):
(WebKit::IDBStorageRegistry::unregisterConnection):
(WebKit::IDBStorageRegistry::registerTransaction):
(WebKit::IDBStorageRegistry::unregisterTransaction):
(WebKit::IDBStorageRegistry::connection):
(WebKit::IDBStorageRegistry::transaction):

  • NetworkProcess/storage/IDBStorageRegistry.h: Added.
  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::NetworkStorageManager::create):
(WebKit::NetworkStorageManager::NetworkStorageManager):
(WebKit::NetworkStorageManager::canHandleTypes):
(WebKit::NetworkStorageManager::stopReceivingMessageFromConnection):
(WebKit::NetworkStorageManager::localOriginStorageManager):
(WebKit::NetworkStorageManager::didIncreaseQuota):
(WebKit::NetworkStorageManager::getAllOrigins):
(WebKit::NetworkStorageManager::moveData):
(WebKit::NetworkStorageManager::suspend):
(WebKit::NetworkStorageManager::registerTemporaryBlobFilePaths):
(WebKit::NetworkStorageManager::requestSpace):
(WebKit::NetworkStorageManager::resetQuotaForTesting):
(WebKit::NetworkStorageManager::resetQuotaUpdatedBasedOnUsageForTesting):
(WebKit::NetworkStorageManager::openDatabase):
(WebKit::NetworkStorageManager::openDBRequestCancelled):
(WebKit::NetworkStorageManager::deleteDatabase):
(WebKit::NetworkStorageManager::establishTransaction):
(WebKit::NetworkStorageManager::databaseConnectionPendingClose):
(WebKit::NetworkStorageManager::databaseConnectionClosed):
(WebKit::NetworkStorageManager::abortOpenAndUpgradeNeeded):
(WebKit::NetworkStorageManager::didFireVersionChangeEvent):
(WebKit::NetworkStorageManager::abortTransaction):
(WebKit::NetworkStorageManager::commitTransaction):
(WebKit::NetworkStorageManager::didFinishHandlingVersionChangeTransaction):
(WebKit::NetworkStorageManager::createObjectStore):
(WebKit::NetworkStorageManager::deleteObjectStore):
(WebKit::NetworkStorageManager::renameObjectStore):
(WebKit::NetworkStorageManager::clearObjectStore):
(WebKit::NetworkStorageManager::createIndex):
(WebKit::NetworkStorageManager::deleteIndex):
(WebKit::NetworkStorageManager::renameIndex):
(WebKit::NetworkStorageManager::putOrAdd):
(WebKit::NetworkStorageManager::getRecord):
(WebKit::NetworkStorageManager::getAllRecords):
(WebKit::NetworkStorageManager::getCount):
(WebKit::NetworkStorageManager::deleteRecord):
(WebKit::NetworkStorageManager::openCursor):
(WebKit::NetworkStorageManager::iterateCursor):
(WebKit::NetworkStorageManager::getAllDatabaseNamesAndVersions):

  • NetworkProcess/storage/NetworkStorageManager.h:
  • NetworkProcess/storage/NetworkStorageManager.messages.in:
  • NetworkProcess/storage/OriginStorageManager.cpp:

(WebKit::OriginStorageManager::StorageBucket::StorageBucket):
(WebKit::OriginStorageManager::StorageBucket::toWebsiteDataType):
(WebKit::OriginStorageManager::StorageBucket::toStorageIdentifier):
(WebKit::OriginStorageManager::StorageBucket::idbStorageManager):
(WebKit::OriginStorageManager::StorageBucket::existingIDBStorageManager):
(WebKit::OriginStorageManager::StorageBucket::isActive const):
(WebKit::OriginStorageManager::StorageBucket::isEmpty const):
(WebKit::OriginStorageManager::StorageBucket::deleteData):
(WebKit::OriginStorageManager::StorageBucket::moveData):
(WebKit::OriginStorageManager::StorageBucket::fetchDataTypesInListFromMemory):
(WebKit::OriginStorageManager::StorageBucket::fetchDataTypesInListFromDisk):
(WebKit::OriginStorageManager::StorageBucket::deleteIDBStorageData):
(WebKit::createQuotaManager):
(WebKit::OriginStorageManager::OriginStorageManager):
(WebKit::OriginStorageManager::defaultBucket):
(WebKit::OriginStorageManager::quotaManager):
(WebKit::OriginStorageManager::idbStorageManager):
(WebKit::OriginStorageManager::existingIDBStorageManager):
(WebKit::OriginStorageManager::moveData):

  • NetworkProcess/storage/OriginStorageManager.h:
  • NetworkProcess/storage/QuotaManager.cpp: Added.

(WebKit::QuotaManager::create):
(WebKit::QuotaManager::QuotaManager):
(WebKit::QuotaManager::requestSpace):
(WebKit::QuotaManager::handleRequests):
(WebKit::QuotaManager::grantWithCurrentQuota):
(WebKit::QuotaManager::grantFastPath):
(WebKit::QuotaManager::didIncreaseQuota):
(WebKit::QuotaManager::resetQuotaUpdatedBasedOnUsageForTesting):
(WebKit::QuotaManager::resetQuotaForTesting):

  • NetworkProcess/storage/QuotaManager.h: Added.
  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):

  • Shared/WebsiteData/QuotaIncreaseRequestIdentifier.h: Added.
  • Shared/WebsiteDataStoreParameters.h:
  • Sources.txt:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::increaseQuota):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::perThirdPartyOriginStorageQuota const):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::defaultPerOriginQuota):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

(WebKit::WebIDBConnectionToServer::deleteDatabase):
(WebKit::WebIDBConnectionToServer::openDatabase):
(WebKit::WebIDBConnectionToServer::abortTransaction):
(WebKit::WebIDBConnectionToServer::commitTransaction):
(WebKit::WebIDBConnectionToServer::didFinishHandlingVersionChangeTransaction):
(WebKit::WebIDBConnectionToServer::createObjectStore):
(WebKit::WebIDBConnectionToServer::deleteObjectStore):
(WebKit::WebIDBConnectionToServer::renameObjectStore):
(WebKit::WebIDBConnectionToServer::clearObjectStore):
(WebKit::WebIDBConnectionToServer::createIndex):
(WebKit::WebIDBConnectionToServer::deleteIndex):
(WebKit::WebIDBConnectionToServer::renameIndex):
(WebKit::WebIDBConnectionToServer::putOrAdd):
(WebKit::WebIDBConnectionToServer::getRecord):
(WebKit::WebIDBConnectionToServer::getAllRecords):
(WebKit::WebIDBConnectionToServer::getCount):
(WebKit::WebIDBConnectionToServer::deleteRecord):
(WebKit::WebIDBConnectionToServer::openCursor):
(WebKit::WebIDBConnectionToServer::iterateCursor):
(WebKit::WebIDBConnectionToServer::establishTransaction):
(WebKit::WebIDBConnectionToServer::databaseConnectionPendingClose):
(WebKit::WebIDBConnectionToServer::databaseConnectionClosed):
(WebKit::WebIDBConnectionToServer::abortOpenAndUpgradeNeeded):
(WebKit::WebIDBConnectionToServer::didFireVersionChangeEvent):
(WebKit::WebIDBConnectionToServer::openDBRequestCancelled):
(WebKit::WebIDBConnectionToServer::getAllDatabaseNamesAndVersions):

Source/WebKitLegacy:

  • Storage/InProcessIDBServer.cpp:

(InProcessIDBServer::quotaManager):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm:

(runTest):

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBSuspendImminently.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/StoreBlobThenDelete.mm:

(TEST):

8:34 AM Changeset in webkit [289473] by Adrian Perez de Castro
  • 2 edits in trunk

[CMake] REGRESSION(r288994): Setting multiple values in LDFLAGS causes incorrect linker detection
https://bugs.webkit.org/show_bug.cgi?id=236365

Reviewed by Martin Robinson.

  • Source/cmake/OptionsCommon.cmake: Use separate_arguments() to turn plain command strings

into lists of strings, which can then be passed down to execute_process() as it knows how
to handle lists properly.

8:15 AM Changeset in webkit [289472] by Chris Dumez
  • 23 edits
    3 copies
    14 adds
    6 deletes in trunk/LayoutTests

Resync web-platform-tests/html/dom from upstream
https://bugs.webkit.org/show_bug.cgi?id=236252

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Resync web-platform-tests/html/dom from upstream 893e71aa9c0a97d259ff009f.

  • web-platform-tests/html/dom/*: Updated.
  • web-platform-tests/html/resources/common.js:
  • web-platform-tests/interfaces/html.idl:

LayoutTests:

  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt:
8:13 AM Changeset in webkit [289471] by Alan Bujtas
  • 9 edits in trunk/Source/WebCore

[LFC][IFC] Transform root inline box's logical rect based on the writing mode
https://bugs.webkit.org/show_bug.cgi?id=236341

Reviewed by Antti Koivisto.

Make sure root inline box has the correct _visual_ coordinates in vertical mode.
(also let's rename DisplayLine::contentLeft to contentLogicalOffset. The emphasis is on _logical_. It helps to catch incorrect use (even this diff has a couple)).

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::build):
(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::flipRootInlineBoxRectToVisualForWritingMode const):

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h:
  • layout/formattingContexts/inline/display/InlineDisplayLine.h:

(WebCore::InlineDisplay::Line::contentLogicalOffset const):
(WebCore::InlineDisplay::Line::Line):
(WebCore::InlineDisplay::Line::contentLeft const): Deleted.

  • layout/integration/InlineIteratorBoxModernPath.h:

(WebCore::InlineIterator::BoxModernPath::createTextRun const):

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalLeft const):

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

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

  • layout/integration/LayoutIntegrationLine.h:

(WebCore::LayoutIntegration::Line::Line):
(WebCore::LayoutIntegration::Line::contentLogicalOffset const):
(WebCore::LayoutIntegration::Line::contentLeft const): Deleted.

  • layout/integration/LayoutIntegrationPagination.cpp:

(WebCore::LayoutIntegration::makeAdjustedContent):

7:58 AM Changeset in webkit [289470] by Martin Robinson
  • 2 edits
    1 add in trunk/Tools

[Flatpak SDK] Add a wrapper for clangd
https://bugs.webkit.org/show_bug.cgi?id=236240

Reviewed by Philippe Normand.

  • flatpak/flatpakutils.py: Refactor this file so that the build constants can be

reused in the new script.
(convert_webkit_source_path_to_sandbox_path):
(convert_sandbox_path_to_webkit_source_path):
(get_build_dir):
(WebkitFlatpak.init):
(WebkitFlatpak.clean_args):
(WebkitFlatpak.setup_gstbuild):
(WebkitFlatpak.is_build_jsc):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak.main):
(WebkitFlatpak.check_toolchains_generated):
(WebkitFlatpak.pack_toolchain):
(WebkitFlatpak.host_path_to_sandbox_path): Deleted.
(WebkitFlatpak.sandbox_path_to_host_path): Deleted.

  • flatpak/webkit-clangd: Added.
7:13 AM Changeset in webkit [289469] by Lauro Moura
  • 14 edits in trunk/Source

Non-unified build fixes after r289247
https://bugs.webkit.org/show_bug.cgi?id=236343

Reviewed by Fujii Hironori.

Source/JavaScriptCore:

  • runtime/JSRemoteFunction.h: Drive-by fix, add missing include.

Source/WebCore:

  • accessibility/AccessibilityNodeObject.cpp: Drive-by fix. Missing

include.

  • layout/formattingContexts/inline/display/InlineDisplayLine.h:

Drive-by fix. Missing include.

  • workers/shared/SharedWorkerObjectConnection.cpp:

SharedWorkerScriptLoader only forward-declares WorkerScriptLoader.

  • workers/shared/SharedWorkerScriptLoader.h: Missing CompletionHandler

include.

  • workers/shared/context/SharedWorkerContextManager.cpp:

SharedWorkerThreadProxy only forward-declares SharedWorkerThread

Source/WebKit:

  • NetworkProcess/SharedWorker/WebSharedWorkerServer.cpp: Moved

SharedWorkerKey include to .h file, as it declares a HashMap of it and
it has custom HashTraits that must be visible.

  • NetworkProcess/SharedWorker/WebSharedWorkerServer.h: Ditto.
  • NetworkProcess/SharedWorker/WebSharedWorkerServerConnection.cpp: Add

missing includes.

  • NetworkProcess/SharedWorker/WebSharedWorkerServerConnection.h: Add

missing includes and forward declarations.

  • NetworkProcess/SharedWorker/WebSharedWorkerServerToContextConnection.cpp:

Add missing include with proper coder/decoder support.

6:56 AM Changeset in webkit [289468] by Angelos Oikonomopoulos
  • 2 edits in trunk/Tools

Allow hanging run-javascriptcore-tests to print backtrace
https://bugs.webkit.org/show_bug.cgi?id=236355

Reviewed by Aakash Jain.

This is to debug 'command timed out: 3600 seconds without output'
issues on build.webkit.org, same as we do for EWS.

  • CISupport/build-webkit-org/steps.py:

(RunJavaScriptCoreTests.init):

5:49 AM Changeset in webkit [289467] by Carlos Garcia Campos
  • 8 edits
    3 adds in trunk

WebDriver: add a javascript atom to get the visible text
https://bugs.webkit.org/show_bug.cgi?id=174617
<rdar://problem/32307461>

Reviewed by Adrian Perez de Castro.

Source/WebDriver:

Generate the JavaScript atoms using the new command and use the new atom to get element text.

  • CMakeLists.txt:
  • Session.cpp:

(WebDriver::Session::getElementText):

Source/WebKit:

Add a new JavaScript atom to get the visible text according to the spec. The new atom uses code from other atoms
like ElementDisplayed and it's also used now by FindNodes one. The atoms are now autogenerated using a script to
include the duplicated code from a common source utils.js.

  • Scripts/generate-automation-atom.py: Added.

(collect_utils):
(parse_utils):
(append_functions):
(main):

  • UIProcess/Automation/atoms/ElementDisplayed.js:

(isShown.nodeIsElement): Deleted.
(isShown.parentElementForElement): Deleted.
(isShown.enclosingNodeOrSelfMatchingPredicate): Deleted.
(isShown.enclosingElementOrSelfMatchingPredicate): Deleted.
(isShown.cascadedStylePropertyForElement): Deleted.
(isShown.elementSubtreeHasNonZeroDimensions): Deleted.
(isShown): Deleted.
(isShown.isElementSubtreeHiddenByOverflow): Deleted.

  • UIProcess/Automation/atoms/ElementText.js: Added.
  • UIProcess/Automation/atoms/FindNodes.js:

(tryToFindNode):

  • UIProcess/Automation/atoms/utils.js: Added.

(utils.nodeIsElement):
(utils.enclosingNodeOrSelfMatchingPredicate):
(utils.parentElementForElement):
(utils.cascadedStylePropertyForElement):
(elementSubtreeHasNonZeroDimensions):
(isElementSubtreeHiddenByOverflow):
(utils.isShown):
(appendLines.currentLine):
(appendLines):
(utils.getText):

WebDriverTests:

Remove expectations of tests that are now passing.

4:42 AM Changeset in webkit [289466] by Antti Koivisto
  • 7 edits in trunk

[CSS Container Queries] Implement inline-size containment
https://bugs.webkit.org/show_bug.cgi?id=236354

Reviewed by Antoine Quint.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/container-queries/container-type-containment-expected.txt:

Source/WebCore:

"Giving an element inline-size containment applies size containment to the inline-axis sizing
of its principal box. This means the inline-axis intrinsic sizes of the principal box are
determined as if the element had no content."

https://drafts.csswg.org/css-contain-3/#containment-inline-size

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):

Compute inline axis preferred width as if the block had no content.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::effectiveContainment const):

  • rendering/style/RenderStyleConstants.h:

For completeness, add an enum value for inline-size containment. It can only be set by 'container'
property for now.

  • style/StyleScope.cpp:

(WebCore::Style::Scope::updateQueryContainerState):

Ignore block axis for inline-size containers.

2:37 AM Changeset in webkit [289465] by Ziran Sun
  • 24 edits in trunk

[Forms] Improving applyStep() to be in line with specs
https://bugs.webkit.org/show_bug.cgi?id=236134

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/forms/the-input-element/range-expected.txt:

Source/WebCore:

This is to improve applyStep() func to follow specs at
https://html.spec.whatwg.org/multipage/input.html#dom-input-stepup

Since Chromium implementation follows the specs steps, this patch imports the
Chromium implmentation.

This is a further patch after https://bugs.webkit.org/show_bug.cgi?id=235509. It has corrected
some changes on test files in fast/form directory in the previous patch submitted for Bug

  1. With this CL a few more sub-tests are now passing.
  • html/InputType.cpp:

(WebCore::InputType::applyStep):

  • html/StepRange.cpp:

(WebCore::StepRange::stepSnappedMaximum const):

  • html/StepRange.h:

LayoutTests:

Update test expectations.

  • fast/forms/date/date-stepup-stepdown-expected.txt:
  • fast/forms/date/date-stepup-stepdown.html:
  • fast/forms/datetimelocal/datetimelocal-stepup-stepdown-expected.txt:
  • fast/forms/datetimelocal/datetimelocal-stepup-stepdown.html:
  • fast/forms/month/month-stepup-stepdown-expected.txt:
  • fast/forms/month/month-stepup-stepdown.html:
  • fast/forms/number/number-stepup-stepdown-expected.txt:
  • fast/forms/number/number-stepup-stepdown.html:
  • fast/forms/range/range-stepup-stepdown-expected.txt:
  • fast/forms/range/range-stepup-stepdown.html:
  • fast/forms/time/time-stepup-stepdown-expected.txt:
  • fast/forms/time/time-stepup-stepdown.html:
  • fast/forms/week/week-stepup-stepdown-expected.txt:
  • fast/forms/week/week-stepup-stepdown.html:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt:
1:52 AM Changeset in webkit [289464] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Garden several WPT tests that are now passing

Unreviewed test gardening.

  • platform/glib/TestExpectations:
1:30 AM Changeset in webkit [289463] by timothy_horton@apple.com
  • 14 edits in trunk/Source/WebKit

WKHoverPlatter should scale up the platter content to make it easier to see
https://bugs.webkit.org/show_bug.cgi?id=236289

Reviewed by Wenson Hsieh.

  • Shared/NativeWebMouseEvent.h:
  • Shared/ios/NativeWebMouseEventIOS.mm:

(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
Add a NativeWebMouseEvent constructor that takes most properties from
another event, but allows overriding the positions and deltas.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::interactableRegionsInRootViewCoordinates):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::interactableRegionsInRootViewCoordinates):

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

Add a method to count the number of clickable elements in a given rectangle.
This is just a first attempt at the heuristic; this will get more complex in the future.

  • UIProcess/ios/WKContentViewInteraction.h:

Add a selection assistant suppression reason for WKHoverPlatter.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _createAndConfigureHighlightLongPressGestureRecognizer]):
Factor out highlight-long-press gesture creation like long-press. Bail if the platter is enabled.

(-[WKContentView setUpInteraction]):
Disable the selection assistant if WKHoverPlatter wants to use long press.

(-[WKContentView cleanUpInteraction]):
(-[WKContentView _locationForGesture:]):
(-[WKContentView _startPointForGesture:]):
Add funnels for extracting the primary location or starting location from
a gesture, allowing WKHoverPlatter to mutate it if it is currently engaged.

(-[WKContentView _highlightLongPressRecognized:]):
(-[WKContentView _doubleTapRecognizedForDoubleClick:]):
(-[WKContentView _twoFingerSingleTapGestureRecognized:]):
(-[WKContentView _singleTapIdentified:]):
(-[WKContentView _singleTapRecognized:]):
(-[WKContentView _doubleTapRecognized:]):
(-[WKContentView _nonBlockingDoubleTapRecognized:]):
(-[WKContentView _twoFingerDoubleTapRecognized:]):
Adopt _locationForGesture/_startPointForGesture.

(-[WKContentView _longPressRecognized:]):
Adopt _locationForGesture/_startPointForGesture.
Redirect a recognized long press to WKHoverPlatter if it wants to use long press.

(-[WKContentView _shouldUseContextMenus]):
Disable context menus if WKHoverPlatter wants to use long press.

(-[WKContentView setUpDragAndDropInteractions]):
Disable drag and drop if WKHoverPlatter wants to use long press.

(-[WKContentView mouseGestureRecognizerChanged:]):
Allow WKHoverPlatter to mutate the location of mouse events if it is currently engaged.

(-[WKContentView numberOfLinksForHoverPlatter:inRect:completionHandler:]):

  • UIProcess/ios/WKHoverPlatter.h:
  • UIProcess/ios/WKHoverPlatter.mm:

(-[WKHoverPlatter initWithView:delegate:]):
(-[WKHoverPlatter didReceiveMouseEvent:]):
(-[WKHoverPlatter didLongPressAtPoint:]):
(-[WKHoverPlatter platterBoundingRect]):
(-[WKHoverPlatter linkSearchRect]):
(-[WKHoverPlatter update]):
(-[WKHoverPlatter updateDebugIndicator]):
(-[WKHoverPlatter dismissPlatterWithAnimation:]):
(-[WKHoverPlatter didFinishDismissalAnimation:]):
(-[WKHoverPlatter clearLayers]):
(-[WKHoverPlatter adjustedPointForPoint:]):
(-[WKHoverPlatter adjustedEventForEvent:]):
(setAdditionalPlatterLayerProperties): Deleted.
(addAdditionalIncomingAnimations): Deleted.
(addAdditionalDismissalAnimations): Deleted.
(-[WKHoverPlatter setHoverPoint:]): Deleted.
(-[WKHoverPlatter requestPositionInformationForCurrentHoverPoint]): Deleted.
(-[WKHoverPlatter didReceivePositionInformation:]): Deleted.
(-[WKHoverPlatter didFinishAnimationForShadow:]): Deleted.

  • UIProcess/ios/WKHoverPlatterParameters.h:
  • UIProcess/ios/WKHoverPlatterParameters.mm:

(-[WKHoverPlatterParameters setDefaultValues]):
(-[WKHoverPlatterParameters enabled]):
(+[WKHoverPlatterParameters settingsControllerModule]):
(addAdditionalPlatterLayoutParameters): Deleted.
(setDefaultValuesForAdditionalPlatterLayoutParameters): Deleted.
Adjust WKHoverPlatter to scale up its content, and adjust the shape
and animations.

1:15 AM Changeset in webkit [289462] by sbarati@apple.com
  • 14 edits
    2 adds in trunk

Don't return an empty value from AbortController.signal.reason and make it harder to return empty values from JSValueInWrappedObject
https://bugs.webkit.org/show_bug.cgi?id=236318
<rdar://88580935>

Reviewed by Mark Lam.

Source/WebCore:

This patch makes it so we might not accidentally return the empty value to
JavaScript code from JSValueInWrappedObject. Previously, JSValueInWrappedObject
had an "operator JSValue()" method. This patch removes that, adds a new
conversion method for converting between JSValueInWrappedObject and JSValue,
and makes JSValueInWrappedObject return undefined inside this method
when it used to return the empty value. This fixes a crash where we'd return
the empty value to JS JIT code, and crash dereferencing a nullptr. It's never
valid for a JS function call (or getter, etc) to return the empty value.

Test: fast/dom/AbortSignal-reason-crash-2.html

  • Modules/webaudio/AudioBuffer.cpp:

(WebCore::AudioBuffer::getChannelData):

  • Modules/webaudio/AudioWorkletProcessor.cpp:

(WebCore::toJSArray):
(WebCore::toJSObject):
(WebCore::AudioWorkletProcessor::buildJSArguments):

  • bindings/js/JSCustomEventCustom.cpp:

(WebCore::JSCustomEvent::detail const):

  • bindings/js/JSDOMConvertAny.h:

(WebCore::JSConverter<IDLAny>::convert):

  • bindings/js/JSMessageEventCustom.cpp:

(WebCore::JSMessageEvent::data const):

  • bindings/js/JSPaymentMethodChangeEventCustom.cpp:

(WebCore::JSPaymentMethodChangeEvent::methodDetails const):

  • bindings/js/JSPopStateEventCustom.cpp:

(WebCore::JSPopStateEvent::state const):

  • bindings/js/JSValueInWrappedObject.h:

(WebCore::JSValueInWrappedObject::getValue const):
(WebCore::JSValueInWrappedObject::operator bool const):
(WebCore::cachedPropertyValue):
(WebCore::JSValueInWrappedObject::operator JSC::JSValue const): Deleted.

  • dom/AbortSignal.cpp:

(WebCore::AbortSignal::signalFollow):
(WebCore::AbortSignal::throwIfAborted):

  • dom/ErrorEvent.cpp:

(WebCore::ErrorEvent::error):
(WebCore::ErrorEvent::trySerializeError):

  • dom/PopStateEvent.cpp:

(WebCore::PopStateEvent::trySerializeState):

  • page/History.cpp:

(WebCore::History::cachedState):

LayoutTests:

  • fast/dom/AbortSignal-reason-crash-2-expected.txt: Added.
  • fast/dom/AbortSignal-reason-crash-2.html: Added.
1:14 AM Changeset in webkit [289461] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.35.3

WebKitGTK 2.35.3

1:13 AM Changeset in webkit [289460] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.35.3 release

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.35.3.
12:47 AM Changeset in webkit [289459] by Diego Pino Garcia
  • 61 edits
    16 adds
    3 deletes in trunk/LayoutTests

[GTK][WPE] Update baselines after r288944

Unreviewed test gardening.

The bulk of these tests needed to update their baselines after
r288944, although other baseline updates in this patch might not due
to that change.

  • platform/glib/fast/text/whitespace/nbsp-mode-and-linewraps-expected.png: Added.
  • platform/glib/fast/text/whitespace/nbsp-mode-and-linewraps-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/glib/webgl/1.0.3/conformance/extensions/oes-texture-half-float-expected.txt:
  • platform/gtk/editing/deleting/5144139-2-expected.png:
  • platform/gtk/editing/deleting/5144139-2-expected.txt:
  • platform/gtk/fast/borders/rtl-border-04-expected.txt:
  • platform/gtk/fast/borders/rtl-border-05-expected.png:
  • platform/gtk/fast/borders/rtl-border-05-expected.txt:
  • platform/gtk/fast/events/updateLayoutForHitTest-expected.txt:
  • platform/gtk/fast/forms/select-visual-hebrew-expected.txt:
  • platform/gtk/fast/forms/select-writing-direction-natural-expected.txt:
  • platform/gtk/fast/text/basic/014-expected.txt:
  • platform/gtk/fast/text/in-rendered-text-rtl-expected.txt:
  • platform/gtk/fast/text/international/003-expected.png:
  • platform/gtk/fast/text/international/003-expected.txt:
  • platform/gtk/fast/text/international/bidi-L2-run-reordering-expected.txt:
  • platform/gtk/fast/text/international/bidi-LDB-2-CSS-expected.png:
  • platform/gtk/fast/text/international/bidi-LDB-2-CSS-expected.txt:
  • platform/gtk/fast/text/international/bidi-LDB-2-HTML-expected.png:
  • platform/gtk/fast/text/international/bidi-LDB-2-HTML-expected.txt:
  • platform/gtk/fast/text/international/bidi-LDB-2-formatting-characters-expected.png:
  • platform/gtk/fast/text/international/bidi-LDB-2-formatting-characters-expected.txt:
  • platform/gtk/fast/text/international/bidi-european-terminators-expected.png:
  • platform/gtk/fast/text/international/bidi-european-terminators-expected.txt:
  • platform/gtk/fast/text/international/bidi-ignored-for-first-child-inline-expected.png:
  • platform/gtk/fast/text/international/bidi-ignored-for-first-child-inline-expected.txt:
  • platform/gtk/fast/text/international/bidi-innertext-expected.png:
  • platform/gtk/fast/text/international/bidi-innertext-expected.txt:
  • platform/gtk/fast/text/international/bidi-menulist-expected.png:
  • platform/gtk/fast/text/international/bidi-menulist-expected.txt:
  • platform/gtk/fast/text/international/bidi-override-expected.png:
  • platform/gtk/fast/text/international/bidi-override-expected.txt:
  • platform/gtk/fast/text/international/rtl-caret-expected.png:
  • platform/gtk/fast/text/international/rtl-caret-expected.txt:
  • platform/gtk/fast/text/international/rtl-white-space-pre-wrap-expected.png:
  • platform/gtk/fast/text/international/rtl-white-space-pre-wrap-expected.txt:
  • platform/gtk/fast/text/midword-break-after-breakable-char-expected.txt:
  • platform/gtk/fast/text/whitespace/nbsp-mode-and-linewraps-expected.png: Removed.
  • platform/gtk/fast/text/whitespace/nbsp-mode-and-linewraps-expected.txt: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/gtk/tables/mozilla/bugs/bug46924-expected.txt:
  • platform/wpe/fast/borders/rtl-border-04-expected.png: Added.
  • platform/wpe/fast/borders/rtl-border-04-expected.txt:
  • platform/wpe/fast/borders/rtl-border-05-expected.png: Added.
  • platform/wpe/fast/borders/rtl-border-05-expected.txt:
  • platform/wpe/fast/events/updateLayoutForHitTest-expected.png: Added.
  • platform/wpe/fast/events/updateLayoutForHitTest-expected.txt:
  • platform/wpe/fast/text/basic/014-expected.png: Added.
  • platform/wpe/fast/text/basic/014-expected.txt:
  • platform/wpe/fast/text/in-rendered-text-rtl-expected.png: Added.
  • platform/wpe/fast/text/in-rendered-text-rtl-expected.txt:
  • platform/wpe/fast/text/international/003-expected.txt:
  • platform/wpe/fast/text/international/bidi-L2-run-reordering-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-L2-run-reordering-expected.txt:
  • platform/wpe/fast/text/international/bidi-LDB-2-CSS-expected.png:
  • platform/wpe/fast/text/international/bidi-LDB-2-CSS-expected.txt:
  • platform/wpe/fast/text/international/bidi-LDB-2-HTML-expected.png:
  • platform/wpe/fast/text/international/bidi-LDB-2-HTML-expected.txt:
  • platform/wpe/fast/text/international/bidi-LDB-2-formatting-characters-expected.png:
  • platform/wpe/fast/text/international/bidi-LDB-2-formatting-characters-expected.txt:
  • platform/wpe/fast/text/international/bidi-european-terminators-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-european-terminators-expected.txt:
  • platform/wpe/fast/text/international/bidi-ignored-for-first-child-inline-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-ignored-for-first-child-inline-expected.txt:
  • platform/wpe/fast/text/international/bidi-innertext-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-innertext-expected.txt:
  • platform/wpe/fast/text/international/bidi-menulist-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-menulist-expected.txt:
  • platform/wpe/fast/text/international/bidi-override-expected.png: Added.
  • platform/wpe/fast/text/international/bidi-override-expected.txt:
  • platform/wpe/fast/text/international/rtl-caret-expected.png: Added.
  • platform/wpe/fast/text/international/rtl-caret-expected.txt:
  • platform/wpe/fast/text/international/rtl-white-space-pre-wrap-expected.png: Added.
  • platform/wpe/fast/text/international/rtl-white-space-pre-wrap-expected.txt:
  • platform/wpe/fast/text/midword-break-after-breakable-char-expected.png: Added.
  • platform/wpe/fast/text/midword-break-after-breakable-char-expected.txt:
  • platform/wpe/fast/text/whitespace/nbsp-mode-and-linewraps-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
12:34 AM Changeset in webkit [289458] by mark.lam@apple.com
  • 3 edits in trunk/Source/WebCore

Remove some obsolete dependencies.
https://bugs.webkit.org/show_bug.cgi?id=236333

Reviewed by Chris Dumez.

These files in the dependency list don't even exist anymore.

  • bindings/scripts/preprocess-idls.pl:
  • bindings/scripts/test/SupplementalDependencies.dep:

Feb 8, 2022:

11:35 PM Changeset in webkit [289457] by Antti Koivisto
  • 10 edits in trunk/Source/WebCore

[CSS Container Queries] Track query containers so they can be invalidated on size change
https://bugs.webkit.org/show_bug.cgi?id=236297

Reviewed by Alan Bujtas.

Add container size tracking.

  • dom/Document.cpp:

(WebCore::Document::updateLayout):

  • dom/Element.cpp:

(WebCore::Element::invalidateForQueryContainerChange):

  • dom/Element.h:
  • page/FrameView.cpp:

(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::willBeDestroyed):
(WebCore::RenderBox::styleWillChange):

  • rendering/RenderView.cpp:

(WebCore::RenderView::registerContainerQueryBox):
(WebCore::RenderView::unregisterContainerQueryBox):

  • rendering/RenderView.h:
  • style/StyleScope.cpp:

(WebCore::Style::Scope::updateQueryContainerState):

Save the sizes after layout and invalidate if needed.

  • style/StyleScope.h:
10:51 PM Changeset in webkit [289456] by jonlee@apple.com
  • 4 edits in trunk/LayoutTests

Unreviewed gardening.

Expand fuzzy ranges.

  • compositing/filters/opacity-change-on-filtered-paints-into-ancestor.html:
  • compositing/masks/become-tiled-mask.html:
  • css3/masking/mask-repeat-space-padding.html:
10:39 PM Changeset in webkit [289455] by graouts@webkit.org
  • 8 edits in trunk/Source/WebCore

Move DocumentTimeline::runningAnimationsForRendererAreAllAccelerated() to Styleable
https://bugs.webkit.org/show_bug.cgi?id=236239

Reviewed by Dean Jackson.

This method has nothing to do with DocumentTimeline and everything to do with Styleable and its associated
effect stack. This also allows us to remove WebAnimation::isRunningAccelerated() since we don't need to go
through the animation as we iterate over keyframe effects directly.

This refactor surfaced an issue with Styleable::fromRenderer() where in the ::marker case we would fail
to correctly obtain the parent RenderListItem, we now recurse through parents until we find one instead
of stopping at the first ancestor with an element.

  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::runningAnimationsForRendererAreAllAccelerated const): Deleted.

  • animation/DocumentTimeline.h:
  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::isRunningAccelerated const): Deleted.

  • animation/WebAnimation.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::hasRunningAcceleratedAnimations const):

  • style/Styleable.cpp:

(WebCore::Styleable::fromRenderer):
(WebCore::Styleable::runningAnimationsAreAllAccelerated const):

  • style/Styleable.h:
10:25 PM Changeset in webkit [289454] by graouts@webkit.org
  • 5 edits in trunk

[web-animations] additive and accumulation interpolation does not work correctly with implicit 0% and 100% keyframes
https://bugs.webkit.org/show_bug.cgi?id=236314

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Add some new WPT tests and mark our PASS results for the "add" case (we still fail for "accumulate").

  • web-platform-tests/web-animations/animation-model/combining-effects/effect-composition-expected.txt:
  • web-platform-tests/web-animations/animation-model/combining-effects/effect-composition.html:

Source/WebCore:

We incorrectly handled implicit keyframes for the additive and accumulate cases.

The spec says that for implicit 0% and 100% keyframes, a keyframe should be generated with a "neutral" keyframe which,
when added or accumulated with another keyframe, would yield the same style as the keyframe it's composed with. We sort
of did the right thing by cloning the underlying style for those keyframes, but then we would blame them anyway in the
composition case, whereas we should just use the underlying style as-is.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):

10:22 PM Changeset in webkit [289453] by graouts@webkit.org
  • 4 edits in trunk

[web-animations] Animation.commitStyles() should use the non-animated style
https://bugs.webkit.org/show_bug.cgi?id=236315

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark WPT progression.

  • web-platform-tests/web-animations/interfaces/Animation/commitStyles-expected.txt:

Source/WebCore:

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::commitStyles):

8:59 PM Changeset in webkit [289452] by Diego Pino Garcia
  • 4 edits in trunk/LayoutTests

[GLIB] Remove tests passing from TestExpectations

Unreviewed test gardening.

Also sort lines in TestExpectations.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
6:32 PM Changeset in webkit [289451] by Chris Dumez
  • 4 edits in trunk

FileReaderSync should be exposed to shared workers
https://bugs.webkit.org/show_bug.cgi?id=236317
<rdar://problem/88644122>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

  • web-platform-tests/workers/semantics/interface-objects/003.any.sharedworker-expected.txt:

Source/WebCore:

FileReaderSync should be exposed to shared workers:

No new test, rebaselined existing one.

  • fileapi/FileReaderSync.idl:
5:54 PM Changeset in webkit [289450] by ysuzuki@apple.com
  • 4 edits
    1 add in trunk

[JSC] YarrJIT inlining should be disabled when we have DotStarEnclosure
https://bugs.webkit.org/show_bug.cgi?id=236332
rdar://88483574

Reviewed by Michael Saboff.

JSTests:

  • stress/yarr-inlining-dot-star-enclosure.js: Added.

(test):

Source/JavaScriptCore:

YarrJITRegisters::initialStart can be used when m_pattern.m_saveInitialStartValue is true while
it is not defined in YarrJIT inlining. As a result, we emit broken code using InvalidGPRReg.
This patch makes canInline false when m_pattern.m_saveInitialStartValue is true.

  • yarr/YarrJIT.cpp:
  • yarr/YarrJITRegisters.h:
4:35 PM Changeset in webkit [289449] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit

[Playstation] Fix build break after r289247 if ENABLE_SERVICE_WORKER is off
https://bugs.webkit.org/show_bug.cgi?id=236321

Patch by Jigen Zhou <jigen.zhou@sony.com> on 2022-02-08
Reviewed by Chris Dumez.

Unreviewed, build fix for playstation platform after r289247 for support of sharing Shared Workers.
This patch resolves compiling errors caused by unknow type name and undeclared identifiers,
and it also fixes linking error by making methods WebProcessProxy::createForWorkers and
WebProcessPool::userContentControllerIdentifierForWorkers() available when ENABLE_SERVICE_WORKER is off

  • NetworkProcess/SharedWorker/WebSharedWorkerServer.h:
  • NetworkProcess/SharedWorker/WebSharedWorkerServerConnection.h:
  • UIProcess/WebProcessPool.cpp:
  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:
  • WebProcess/Storage/WebSharedWorkerContextManagerConnection.cpp:
4:26 PM Changeset in webkit [289448] by Alan Coon
  • 1 copy in tags/Safari-613.1.16.3.1

Tag Safari-613.1.16.3.1.

4:19 PM Changeset in webkit [289447] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Set LineBox::setBaselineType when the line is computed to be IdeographicBaseline
https://bugs.webkit.org/show_bug.cgi?id=236310

Reviewed by Antti Koivisto.

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::LineBoxBuilder::adjustIdeographicBaselineIfApplicable):

4:17 PM Changeset in webkit [289446] by Alan Coon
  • 1 copy in tags/Safari-613.1.16.0.5

Tag Safari-613.1.16.0.5.

4:14 PM Changeset in webkit [289445] by Alan Coon
  • 1 copy in tags/Safari-613.1.16.1.4

Tag Safari-613.1.16.1.4.

4:14 PM Changeset in webkit [289444] by Alan Coon
  • 1 copy in tags/Safari-613.1.16.2.1

Tag Safari-613.1.16.2.1.

3:49 PM Changeset in webkit [289443] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

REGRESSION (15.4): Angular virtual scrollers no longer work (because of contain:strict)
https://bugs.webkit.org/show_bug.cgi?id=236260

Patch by Rob Buis <rbuis@igalia.com> on 2022-02-08
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/contain-paint-049-expected.txt: Added.
  • web-platform-tests/css/css-contain/contain-paint-049.html: Added.

Source/WebCore:

Paint containment did not allow collecting scrollable overflow, breaking scrolling
of the container contents, this patch fixes that.

Test: imported/w3c/web-platform-tests/css/css-contain/contain-paint-049.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::addOverflowFromChild):

3:30 PM Changeset in webkit [289442] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.34.5

WPE WebKit 2.34.5

3:11 PM Changeset in webkit [289441] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.34

Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.34.5 release

.:

  • Source/cmake/OptionsWPE.cmake: Bump version numbers.

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.34.5
3:07 PM Changeset in webkit [289440] by Russell Epstein
  • 1 copy in tags/Safari-613.1.16.31.1

Tag Safari-613.1.16.31.1.

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

Cherry-pick r289024. rdar://problem/88654211

SecureARM64EHashPins should check g_jscConfig.useFastJITPermissions
https://bugs.webkit.org/show_bug.cgi?id=236055
<rdar://88222677>

Reviewed by Mark Lam.

  • assembler/SecureARM64EHashPins.cpp: (JSC::SecureARM64EHashPins::initializeAtStartup): (JSC::SecureARM64EHashPins::allocatePinForCurrentThread): (JSC::SecureARM64EHashPins::deallocatePinForCurrentThread):
  • assembler/SecureARM64EHashPinsInlines.h: (JSC::SecureARM64EHashPins::pinForCurrentThread):

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

2:55 PM Changeset in webkit [289438] by Russell Epstein
  • 9 edits in branches/safari-613.1.16.31-branch/Source

Versioning.

WebKit-7613.1.16.31.1

2:51 PM Changeset in webkit [289437] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Grid may be empty in certain scenarios
https://bugs.webkit.org/show_bug.cgi?id=234578

Patch by Brandon Stewart <Brandon> on 2022-02-08
Reviewed by Darin Adler.

Add check to handle legend elements when inside a CSS Grid. The legend element should not be
added to aspectRatioBlockSizeDependentGridItems.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::layoutBlock):

  • rendering/RenderGrid.h:
2:43 PM Changeset in webkit [289436] by J Pascoe
  • 2 edits in trunk/Source/WebKit

[WebAuthn] Use AuthenticationServicesAgent for WebAuthn calls on iOS
https://bugs.webkit.org/show_bug.cgi?id=236151
rdar://87908259

Reviewed by Brent Fulgham.

This patch starts using the ASC apis to make WebAuthn calls on iOS the
same way they are made on macOS. Some cleanup work will be needed to
deprecate the WebAuthn process after this change is made.

  • UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:

(WebKit::WebAuthenticatorCoordinatorProxy::performRequest): Deleted.
(WebKit::WebAuthenticatorCoordinatorProxy::isUserVerifyingPlatformAuthenticatorAvailable): Deleted.

2:35 PM Changeset in webkit [289435] by Russell Epstein
  • 1 copy in branches/safari-613.1.16.31-branch

New branch.

2:27 PM Changeset in webkit [289434] by Adrian Perez de Castro
  • 1 copy in releases/WebKitGTK/webkit-2.34.5

WebKitGTK 2.34.5

2:25 PM Changeset in webkit [289433] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.34

.:
Unreviewed. Update OptionsGTK.cmake and NEWS for the 2.34.5 release

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:
Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.34.5 release

  • gtk/NEWS: Add release notes for 2.34.5
2:25 PM Changeset in webkit [289432] by Adrian Perez de Castro
  • 6 edits in releases/WebKitGTK/webkit-2.34

Allow building with ICU 60
https://bugs.webkit.org/show_bug.cgi?id=235367

Unreviewed build fix.

Turns out we can reduce our ICU requirement from ICU 61 to ICU 60 with only minimal changes.

Patch by Michael Catanzaro <Michael Catanzaro> on 2022-02-08

.:

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/JavaScriptCore:

  • runtime/IntlCache.cpp:
  • runtime/IntlCache.h:
2:25 PM Changeset in webkit [289431] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.34

Merge r289370 - [WPE] Running distcheck with USE_SOUP2=OFF fails to install documentation
https://bugs.webkit.org/show_bug.cgi?id=236235

Reviewed by Carlos Garcia Campos.

  • Source/PlatformWPE.cmake: Use WPE_API_DOC_VERSION instead of WPE_API_VERSION for the documentation.
2:25 PM Changeset in webkit [289430] by Adrian Perez de Castro
  • 5 edits in releases/WebKitGTK/webkit-2.34/Source/WebKit

Merge r289369 - [GTK][WPE] Crash at WebKit::bindA11y() in WebKitGTK 2.35.2
https://bugs.webkit.org/show_bug.cgi?id=236144

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2022-02-08
Reviewed by Adrian Perez de Castro.

ATSPI stopped using an abstract socket but we are still assuming the a11y bus address is an abstract socket,
even when the path is not really used after all. However, just handling the case of the socket being a normal
unix socket is not enough, because the actual socket path is not mounted in the xdg-dbus-proxy sandbox, so it
fails to connect to the original a11y bus.

  • UIProcess/Launcher/ProcessLauncher.h: Rename extraWebProcessSandboxPaths as extraSandboxPaths.
  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::XDGDBusProxyLauncher::setAddress): Remove the DBusAddressType parameter. Check the address looks valid
and just store the result of dbusAddressToPath() in m_path.
(WebKit::XDGDBusProxyLauncher::launch): Do not require m_path to be non-null and add it to the sanbox.
(WebKit::XDGDBusProxyLauncher::dbusAddressToPath): Only return the path for normal unix sockets.
(WebKit::bindDBusSession): Remove the DBusAddressType parameter passed to dbusAddressToPath().
(WebKit::bindA11y): Check proxy path is not null before setting a11y bus address in display.
(WebKit::addExtraPaths): Helper to add extra paths to the sandbox.
(WebKit::bubblewrapSpawn): Call addExtraPaths() for WebProcess and DBusProxy types.

  • UIProcess/Launcher/glib/FlatpakLauncher.cpp:

(WebKit::flatpakSpawn): Use extraSandboxPaths.

  • UIProcess/glib/WebProcessProxyGLib.cpp:

(WebKit::WebProcessProxy::platformGetLaunchOptions): Ditto.

2:25 PM Changeset in webkit [289429] by Adrian Perez de Castro
  • 8 edits in releases/WebKitGTK/webkit-2.34/Source/WebCore

Merge r289154 - [Flatpak SDK] Update to FDO 21.08.10 and GStreamer 1.20 releases
https://bugs.webkit.org/show_bug.cgi?id=236136

Patch by Philippe Normand <pnormand@igalia.com> on 2022-02-05
Reviewed by Adrian Perez de Castro.

Switch GStreamer 1.19 version checks to 1.20 now that it is officially released. Also
include a couple fixes that are needed with GStreamer 1.20 and one that is useful whatever
the GStreamer version:

  • GStreamer 1.20 ships a vp8alphadecodebin element able to handle video/x-vp8 caps, so our libwebrtc decoder factory needs to account for its presence, in addition to vp8dec.
  • With GStreamer 1.20 media/media-source/media-source-seek-back.html started racy crashing in the VideoTrackPrivateGStreamer configuration update, where the track was disconnected (hence its stream was cleared) and then a GObject notification was emitted by decodebin3. We should actually disconnect the GObject signal handlers before clearing the stream, to prevent potential null pointer access.
  • platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:

(WebCore::AudioFileReader::handleNewDeinterleavePad):

  • platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:

(WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad):

  • platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:

(WebCore::AudioTrackPrivateGStreamer::updateConfigurationFromCaps):
(WebCore::AudioTrackPrivateGStreamer::disconnect):

  • platform/graphics/gstreamer/GStreamerCommon.h:
  • platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:

(WebCore::ImageDecoderGStreamer::InnerDecoder::connectDecoderPad):

  • platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:

(WebCore::VideoTrackPrivateGStreamer::updateConfigurationFromCaps):
(WebCore::VideoTrackPrivateGStreamer::disconnect):

  • platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp:

(WebCore::VP8Decoder::Create):

2:21 PM Changeset in webkit [289428] by Jonathan Bedard
  • 3 edits in trunk/Tools

[EWS] Embed added/modified/deleted status into changed files
https://bugs.webkit.org/show_bug.cgi?id=236051

Reviewed by Aakash Jain.

GitHub's API includes whether a file was added, modified or deleted.
We don't include this information in source changes, we should.

  • Tools/CISupport/ews-build/events.py:

(GitHubEventHandlerNoEdits.file_with_mod_sign): Added.
(GitHubEventHandlerNoEdits._get_pr_files): Copied from buildbot, modified to include
file modification status.

  • Tools/CISupport/ews-build/steps.py:

(FindModifiedLayoutTests): Remove FIXME

Canonical link: https://commits.webkit.org/246988@main

2:14 PM Changeset in webkit [289427] by Andres Gonzalez
  • 4 edits in trunk/Source/WebCore

Initialize the AXIsolatedObject AccessibilityText property lazily.
https://bugs.webkit.org/show_bug.cgi?id=236276
<rdar://problem/88604453>

Reviewed by Chris Fleizach.

Computation of the AccessibilitytText property may be very expensive and
if performed during the creation of IsolatedObjects may cause crashes
since it may invoke textUnderElement while page layout is in progress.
For these reasons, we are computing and caching this property on first
request.
This patch is a sequel to https://bugs.webkit.org/show_bug.cgi?id=236115.

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::accessibilityText const):
(WebCore::AXIsolatedObject::getOrRetrievePropertyValue):
(WebCore::AXIsolatedObject::innerHTML const):
(WebCore::AXIsolatedObject::outerHTML const):
(WebCore::AXIsolatedObject::getOrRetrieveStringPropertyValue):
Replaced by getOrRetrievePropertyValue<String>.

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

(WebCore::AXIsolatedObject::descriptionAttributeValue const):
(WebCore::AXIsolatedObject::titleAttributeValue const):

2:06 PM Changeset in webkit [289426] by graouts@webkit.org
  • 6 edits in trunk

[css-logical] [css-animations] changing "direction" or "writing-mode" should recompute keyframes
https://bugs.webkit.org/show_bug.cgi?id=236293

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark WPT progressions.

  • web-platform-tests/css/css-logical/animation-002-expected.txt:

Source/WebCore:

We need to recompute keyframes based on the matching @keyframes rule in case an element running
a CSS Animation changes either "direction" or "writing-mode".

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::propertyAffectingLogicalPropertiesDidChange):

  • animation/KeyframeEffect.h:
  • animation/KeyframeEffectStack.cpp:

(WebCore::KeyframeEffectStack::applyKeyframeEffects):

1:45 PM Changeset in webkit [289425] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

[LFC][Integration] LineIteratorModernPath::baselineType should consult Display::Line
https://bugs.webkit.org/show_bug.cgi?id=236308

Reviewed by Antti Koivisto.

LineBox -> Display::Line -> LineIteratorModernPath (and the soon-to-be-removed LayoutIntegration::Line middleman).

  • layout/formattingContexts/inline/InlineLineBox.h:

(WebCore::Layout::LineBox::baselineType const):
(WebCore::Layout::LineBox::setBaselineType):

  • layout/formattingContexts/inline/display/InlineDisplayLine.h:

(WebCore::InlineDisplay::Line::baselineType const):
(WebCore::InlineDisplay::Line::Line):

  • layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:

(WebCore::Layout::InlineDisplayLineBuilder::build const):

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::baselineType const):

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

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

  • layout/integration/LayoutIntegrationLine.h:

(WebCore::LayoutIntegration::Line::Line):
(WebCore::LayoutIntegration::Line::baselineType const):

  • layout/integration/LayoutIntegrationPagination.cpp:

(WebCore::LayoutIntegration::makeAdjustedContent):

1:40 PM Changeset in webkit [289424] by Chris Dumez
  • 3 edits in trunk/LayoutTests/imported/w3c

Resync workers/modules/shared-worker-import-meta.html from upstream WPT
https://bugs.webkit.org/show_bug.cgi?id=236302

Reviewed by Yusuke Suzuki.

Resync workers/modules/shared-worker-import-meta.html from upstream WPT after https://github.com/web-platform-tests/wpt/pull/32704.

  • web-platform-tests/workers/modules/shared-worker-import-meta-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-import-meta.html:
1:33 PM Changeset in webkit [289423] by Jonathan Bedard
  • 4 edits in trunk/Tools

[git-webkit] Autostash when pulling (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=235861
<rdar://problem/88298948>

Unreviewed follow-up fix.

Accidently landed a previous iteration of the change.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git.Cache.clear): Handle empty cache.
(Git.pull): Only autostash when rebasing.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
1:31 PM Changeset in webkit [289422] by Russell Epstein
  • 1 edit in branches/safari-613-branch/Source/WebCore/animation/KeyframeEffect.cpp

Apply patch. rdar://problem/82516118

1:20 PM Changeset in webkit [289421] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288944. rdar://problem/88059633

[LFC][IFC] Using Fontcascade::spaceWidth to subtract the trailing space width may result in incorrect layout
https://bugs.webkit.org/show_bug.cgi?id=235937
<rdar://88059633>

Reviewed by Antti Koivisto and Simon Fraser.

Source/WebCore:

Since Fontcascade::spaceWidth always consult the primary font, it may return unexpected width value when (in rare cases)
the primary font does not have a space glyph. Legacy line layout works as expected as it always runs a full width
computation on the space character (instead of directly calling FontCascade::spaceWidth).

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp: (WebCore::Layout::InlineItemsBuilder::computeInlineTextItemWidths):
  • layout/formattingContexts/inline/text/TextUtil.cpp: (WebCore::Layout::TextUtil::width): (WebCore::Layout::TextUtil::spaceWidth):
  • layout/formattingContexts/inline/text/TextUtil.h:

LayoutTests:

  • platform/mac-bigsur/fonts/monospace-expected.txt: Added.

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

1:20 PM Changeset in webkit [289420] by Russell Epstein
  • 4 edits in branches/safari-613-branch/Source/WebCore/layout/formattingContexts/inline

Cherry-pick r288055. rdar://problem/88059633

[LFC][IFC] imported/w3c/web-platform-tests/css/css-text/word-break/word-break-normal-ar-000.html fails with incorrect run position
https://bugs.webkit.org/show_bug.cgi?id=235011

Reviewed by Antti Koivisto.

IFC (inherited from simple line layout) uses this technique of measuring the content with the trailing whitespace
and then simply subtract the whitespace width. It enables us to keep pushing content to the line without re-measuring it each time.
(the "non-whitespace + whitespace" pattern is extremely common for IFC content).
However in some cases when the trailing whitespace is trimmed, subtracting the trimmed width from the
content width instead of measuring it produces a visually incorrect result.
This patch fixes the most obvious cases when the incorrect width turns into an offset for the RTL content.

  • layout/formattingContexts/inline/InlineLine.cpp: (WebCore::Layout::Line::TrimmableTrailingContent::remove): (WebCore::Layout::Line::Run::removeTrailingLetterSpacing): (WebCore::Layout::Line::Run::removeTrailingWhitespace):
  • layout/formattingContexts/inline/InlineLine.h:
  • layout/formattingContexts/inline/text/TextUtil.cpp: (WebCore::Layout::TextUtil::width):
  • layout/formattingContexts/inline/text/TextUtil.h:

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

1:16 PM Changeset in webkit [289419] by Chris Dumez
  • 4 edits in trunk/Source

http/tests/cache-storage/cache-origins.https.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=236263

Reviewed by Darin Adler.

Source/WebCore:

Drop workaround landed in r289247 to try and maintain HashMap ordering.

  • page/SecurityOriginData.h:

(WebCore::add):

Source/WebKit:

Update CacheStorage::Engine::representation() (which is used by the layout tests) to return
origins in a stable order in order to address test flakiness.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::representation):

12:45 PM Changeset in webkit [289418] by Chris Lord
  • 5 edits
    2 moves in trunk/Source/WebCore

[GTK][WPE] Fallback path for WebGL rendering with ANGLE is incorrectly scheduling on the compositor thread
https://bugs.webkit.org/show_bug.cgi?id=236290

Reviewed by Alejandro G. Castro.

Fix the WebGL ANGLE fallback path on nicosia to not incorrectly
schedule on the compositor thread.

No new tests, no change in behaviour.

  • platform/TextureMapper.cmake:
  • platform/graphics/angle/GraphicsContextGLANGLE.h:
  • platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.cpp.
  • platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.h.
  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

(WebCore::GraphicsContextGLTextureMapper::GraphicsContextGLTextureMapper):

  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLANGLE::platformDisplay const):
(WebCore::GraphicsContextGLANGLE::platformConfig const):
(WebCore::GraphicsContextGLANGLE::makeContextCurrent):

12:42 PM Changeset in webkit [289417] by caitp@igalia.com
  • 35 edits
    3 adds in trunk

[JSC] move function wrapping logic to a new Function type
https://bugs.webkit.org/show_bug.cgi?id=235382

Reviewed by Yusuke Suzuki.

JSTests:

Adds a new file testing CopyNameAndLength stuff in the ShadowRealm proposal,
and fix up assertions about this in shadow-realm-evaluate.js

  • stress/shadow-realm-evaluate.js:
  • stress/shadow-realm-remote-function-copy-length-and-name.js: Added.

Source/JavaScriptCore:

In this initial patch, there is still a lot of JS-builtin machinery,
including some duplicated functionality. Additionally, JIT support
has not been incorporated yet.

Broadly, the idea is that there are custom hooks for calling a
JSRemoteFunction, which perform the wrapping functionality. This avoids
the need for allocating closures which contain the wrapping logic.

TODO:

  • JIT/DFG/FTL support
  • structure caching (unnecessary since these are not constructors?)
  • improved baseline perf
  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • assembler/LinkBuffer.h:
  • builtins/BuiltinNames.h:
  • builtins/ShadowRealmPrototype.js:
  • bytecode/LinkTimeConstant.h:
  • dfg/DFGSpeculativeJIT.cpp:
  • ftl/FTLLowerDFGToB3.cpp:
  • heap/Heap.cpp:
  • heap/Heap.h:
  • inspector/JSInjectedScriptHost.cpp:
  • interpreter/Interpreter.cpp:
  • jit/AssemblyHelpers.h:
  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/ThunkGenerators.cpp:
  • jit/ThunkGenerators.h:
  • jsc.cpp:
  • runtime/ErrorInstance.cpp:
  • runtime/FunctionPrototype.cpp:
  • runtime/InternalFunction.cpp:
  • runtime/Intrinsic.cpp:
  • runtime/Intrinsic.h:
  • runtime/JSCast.h:
  • runtime/JSFunction.cpp:
  • runtime/JSFunction.h:
  • runtime/JSFunctionInlines.h:
  • runtime/JSGlobalObject.cpp:
  • runtime/JSGlobalObject.h:
  • runtime/JSRemoteFunction.cpp: Added.
  • runtime/JSRemoteFunction.h: Added.
  • runtime/VM.cpp:
  • runtime/VM.h:
12:25 PM Changeset in webkit [289416] by Razvan Caliman
  • 17 edits
    2 adds in trunk

Web Inspector: [Flexbox] Add support for showing/hiding flex container overlays and basic overlay drawing
https://bugs.webkit.org/show_bug.cgi?id=236013
<rdar://87893201>

Reviewed by Patrick Angle.

Source/JavaScriptCore:

Add new commands to show and hide flex overlays.

  • inspector/protocol/DOM.json:

Source/WebCore:

Test: inspector/dom/showFlexOverlay.html

  • The test follows the example for checking grid overlays at inspector/dom/showGridOverlay.html

Implement backend commands to toggle the visibility of a specialized page overlay shown on top of a flex container.
At this stage, the overlay consists of an outline around the bounding box of the flex container.
Future patches will add more detail regarding flex items and gaps between them.

This patch follows closely the example for toggling the visibility of CSS Grid overlays implemented in
https://bugs.webkit.org/show_bug.cgi?id=221062

  • inspector/InspectorController.cpp:

(WebCore::InspectorController::flexOverlayCount const):

  • inspector/InspectorController.h:
  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::paint):
(WebCore::InspectorOverlay::getHighlight):
(WebCore::InspectorOverlay::shouldShowOverlay const):
(WebCore::InspectorOverlay::removeFlexOverlayForNode):

(WebCore::InspectorOverlay::setFlexOverlayForNode):
(WebCore::InspectorOverlay::clearFlexOverlayForNode):
(WebCore::InspectorOverlay::clearAllFlexOverlays):

  • Maintain a list of active flex overlays. A node can have only one flex overlay at a time.

(WebCore::InspectorOverlay::drawFlexOverlay):
(WebCore::InspectorOverlay::buildFlexOverlay):

  • inspector/InspectorOverlay.h:

(WebCore::InspectorOverlay::flexOverlayCount const):
(WebCore::InspectorOverlay::Highlight::FlexHighlightOverlay::encode const):
(WebCore::InspectorOverlay::Highlight::FlexHighlightOverlay::decode):

  • The signature of the flex overlay includes the color for the outline and a quad expressing the bounding box of the flex container.
  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::showFlexOverlay):
(WebCore::InspectorDOMAgent::hideFlexOverlay):

  • Translate protocol commands into InspectorOverlay method calls.
  • inspector/agents/InspectorDOMAgent.h:
  • testing/Internals.cpp:

(WebCore::Internals::inspectorFlexOverlayCount):

  • testing/Internals.h:
  • testing/Internals.idl:
  • Helper used in testing to check the number of shown flex overlays.

Source/WebKit:

Add basic logic to draw a flex overlay on top of a flex container on iOS/iPadOS. Used by Web Inspector.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<InspectorOverlay::Highlight>::encode):
(IPC::ArgumentCoder<InspectorOverlay::Highlight>::decode):

  • UIProcess/Inspector/ios/WKInspectorHighlightView.mm:

(-[WKInspectorHighlightView drawRect:]):

LayoutTests:

  • inspector/dom/showFlexOverlay-expected.txt: Added.
  • inspector/dom/showFlexOverlay.html: Added.
  • inspector/dom/showGridOverlay.html:
  • Drive-by clean-up of out-of-context comments.
11:59 AM Changeset in webkit [289415] by Russell Epstein
  • 5 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288090. rdar://problem/87601499

Frequent GPU process jetsams due to RemoteRenderingBackendProxy not claiming ownership of SharedMemory buffers
https://bugs.webkit.org/show_bug.cgi?id=235226

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-01-17
Reviewed by Simon Fraser.

Claim memory from SharedBitmaps and SharedMemory that RemoteRenderingBackendProxy
asks and receives from RemoteRenderingBackend. This is not very good,
as GPUP allocates most of the memory and thus might jetsam
before WP claims them. However, that is a bigger change to be done
after this one.

No new tests, hard to test currently.

  • Shared/ShareableBitmap.cpp: (WebKit::ShareableBitmap::Handle::takeOwnershipOfMemory const):
  • Shared/ShareableBitmap.h:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: (WebKit::RemoteRenderingBackendProxy::getShareableBitmap): (WebKit::RemoteRenderingBackendProxy::getFilteredImage):
  • WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp: (WebKit::RemoteResourceCacheProxy::recordNativeImageUse):

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

11:55 AM Changeset in webkit [289414] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/JavaScriptCore

Cherry-pick r289076. rdar://problem/88269480

Unreviewed, remove UnlinkedMetadataTable::offsetInMetadataTable since it is no longer used
https://bugs.webkit.org/show_bug.cgi?id=236063

Follow-up after Saam's comment.

  • bytecode/UnlinkedMetadataTable.h: (JSC::UnlinkedMetadataTable::offsetInMetadataTable): Deleted.

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

11:55 AM Changeset in webkit [289413] by Russell Epstein
  • 5 edits in branches/safari-613-branch/Source/JavaScriptCore

Cherry-pick r289037. rdar://problem/88269480

[JSC] Use MetadataTable instead of UnlinkedMetadataTable
https://bugs.webkit.org/show_bug.cgi?id=236063
rdar://88269480

Reviewed by Robin Morisset.

Use MetadataTable from profiled CodeBlock instead of UnlinkedMetadataTable in concurrent JIT compiler.

  • bytecode/MetadataTable.h: (JSC::MetadataTable::offsetInMetadataTable):
  • bytecode/UnlinkedMetadataTable.h: (JSC::UnlinkedMetadataTable::offsetInMetadataTable):
  • jit/JITInlines.h: (JSC::JIT::emitValueProfilingSite): (JSC::JIT::loadPtrFromMetadata): (JSC::JIT::load32FromMetadata): (JSC::JIT::load8FromMetadata): (JSC::JIT::store8ToMetadata): (JSC::JIT::store32ToMetadata): (JSC::JIT::materializePointerIntoMetadata):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_resolve_scope): (JSC::JIT::emit_op_get_from_scope):

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

11:55 AM Changeset in webkit [289412] by Russell Epstein
  • 3 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288435. rdar://problem/83668578

MediaStream canvas.captureStream() playback to LocalSampleBufferDisplayLayer is flaky
https://bugs.webkit.org/show_bug.cgi?id=230623
<rdar://problem/83668578>

Reviewed by Kimmo Kinnunen.

There are a few issues when creating the video element, setting the srcObject and playing it right away.
The first thing is that we try to render the video element while thinking that it might be video accelerated
(it is always the case for MediaStreamTrack based tracks), but the video element is asynchronously updating whether it is accelerated.
Following what other MediaPlayerPrivate are doing, when MediaPlayerPrivateMediaStreamAVFObjC has set up its video layers,
we schedule a call to renderingModeChanged which will trigger a relayout.

We also ensure, when the layer is fully initialized to set all values (bounds, hide states) as otherwise, this might be lost on GPUProcess
which currently does not register a RemoteSampleBufferDisplayLayer at the time the corresponding IPC message is received.

The additional issue is in the case the MediaStreamTrack source only generates one frame for some time.
In that case, and if the frame is enqueueud while setting up the video layers, we were not rendering this frame.
To fix this, when the video layers are ready, we reenqueue the last video frame as neeeded.

Manually tested.

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

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

11:51 AM Changeset in webkit [289411] by Jonathan Bedard
  • 11 edits
    1 add in trunk

[git-webkit] Allow repositories to declare their bug trackers
https://bugs.webkit.org/show_bug.cgi?id=236306
<rdar://problem/88633018>

Reviewed by Dewei Zhu.

  • metadata/trackers.json: Added.
  • Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:

(Tracker.init): Raise correct exception.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py:

(Tracker.init): Raise correct exception.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tracker.py:

(Tracker.from_json): Handle list or tuple input.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git): Use shared METADATA declaration.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:

(Scm.init): Register any bug trackers associated with the repository.

Canonical link: https://commits.webkit.org/246978@main

11:32 AM Changeset in webkit [289410] by Cameron McCormack
  • 2 edits in trunk/Source/WebCore

Make HTMLToken::beginStartTag tag an 8 bit character
https://bugs.webkit.org/show_bug.cgi?id=236283

Reviewed by Sam Weinig.

HTMLToken::beginStartTag is only ever called with an ASCII lowercase
letter. It can take an LChar instead of a UChar, and we can avoid
updating m_data8BitCheck.

  • html/parser/HTMLToken.h:

(WebCore::HTMLToken::beginStartTag):

11:30 AM Changeset in webkit [289409] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[WebXR] Ensure only one frame update can be requested with the device at any time
https://bugs.webkit.org/show_bug.cgi?id=236247

Patch by Ada Chan <ada.chan@apple.com> on 2022-02-08
Reviewed by Dean Jackson.

Rename WebXRSession::requestFrame() to WebXRSession::requestFrameIfNeeded()
with logic added to determine whether a new frame update request should be
sent to the device. The boolean m_isDeviceFrameRequestPending tracks whether
a frame request is pending with the device, and requestFrameIfNeeded() should
bail early if that boolean is true.

  • Modules/webxr/WebXRSession.cpp:

(WebCore::WebXRSession::requestAnimationFrame):
(WebCore::WebXRSession::updateSessionVisibilityState):
(WebCore::WebXRSession::requestFrameIfNeeded):
(WebCore::WebXRSession::onFrame):
(WebCore::WebXRSession::requestFrame): Deleted.

  • Modules/webxr/WebXRSession.h:
11:29 AM Changeset in webkit [289408] by jonlee@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening.

  • gpu-process/TestExpectations:
11:22 AM Changeset in webkit [289407] by Alan Coon
  • 3 edits in branches/safari-613.1.16.2-branch/Source/WebCore

Cherry-pick r288539. rdar://problem/87986840

Expand RefPtr / Ref use in FrameLoader
https://bugs.webkit.org/show_bug.cgi?id=235551
rdar://87986840

Reviewed by Mark Lam.

Apply Ref / RefPtr instead of taking SerializedScriptValue*.

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::loadInSameDocument): (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
  • loader/FrameLoader.h:

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

11:21 AM Changeset in webkit [289406] by Alan Coon
  • 9 edits in branches/safari-613.1.16.2-branch/Source

Versioning.

WebKit-7613.1.16.2.1

11:18 AM Changeset in webkit [289405] by Alan Coon
  • 3 edits in branches/safari-613.1.16.3-branch/Source/JavaScriptCore

Cherry-pick r289354. rdar://problem/88611690

Wasm crash on https://copy.sh/v86/?profile=dsl
https://bugs.webkit.org/show_bug.cgi?id=236037
rdar://88358719

Reviewed by Mark Lam.

Lower stack args in Air had a bug where it was emitting a constant
materialization at the wrong instruction offset for certain types
of spill instructions. This happens when we have a stack slot that
is 8 bytes wide, but we're emitting a zero def Move32. We need to
zero the upper 4 bytes. However, there is also code inside lower
stack args that uses the temp register when encountering offsets
that are too large to encode in a single instruction. However,
this offset materialization code for the second Move32 to zero
the upper bytes was happening before the actual store. For example,
we'd end up with:
movz x16, #k
movz x16, #k2
stur x1, [x16]
stur zr, [x16]

instead of
movz x16, #k
stur x1, [x16]
movz x16, #k2
stur zr, [x16]

  • b3/air/AirLowerStackArgs.cpp: (JSC::B3::Air::lowerStackArgs):
  • b3/air/testair.cpp:

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

11:18 AM Changeset in webkit [289404] by Alan Coon
  • 3 edits in branches/safari-613.1.16.3-branch/Source/JavaScriptCore

Cherry-pick r289024. rdar://problem/88222677

SecureARM64EHashPins should check g_jscConfig.useFastJITPermissions
https://bugs.webkit.org/show_bug.cgi?id=236055
<rdar://88222677>

Reviewed by Mark Lam.

  • assembler/SecureARM64EHashPins.cpp: (JSC::SecureARM64EHashPins::initializeAtStartup): (JSC::SecureARM64EHashPins::allocatePinForCurrentThread): (JSC::SecureARM64EHashPins::deallocatePinForCurrentThread):
  • assembler/SecureARM64EHashPinsInlines.h: (JSC::SecureARM64EHashPins::pinForCurrentThread):

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

11:18 AM Changeset in webkit [289403] by Alan Coon
  • 3 edits in branches/safari-613.1.16.3-branch/Source/WebCore

Cherry-pick r288539. rdar://problem/87986840

Expand RefPtr / Ref use in FrameLoader
https://bugs.webkit.org/show_bug.cgi?id=235551
rdar://87986840

Reviewed by Mark Lam.

Apply Ref / RefPtr instead of taking SerializedScriptValue*.

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::loadInSameDocument): (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
  • loader/FrameLoader.h:

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

11:15 AM Changeset in webkit [289402] by jonlee@apple.com
  • 17 edits in trunk/LayoutTests

Unreviewed gardening.

LayoutTests/imported/mozilla:

  • svg/opacity-and-gradient-02.svg: Expand pixel range based on EWS run.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-backgrounds/border-image-repeat-space-7.html: Expand pixel range based on EWS data.
  • web-platform-tests/css/css-text/shaping/shaping-arabic-diacritics-001.html:

LayoutTests:

Reflecting pixel diffs from EWS run.

  • css1/basic/class_as_selector.html:
  • css3/background/background-repeat-round-auto1.html:
  • css3/background/background-repeat-space-content.html:
  • css3/color/box-shadows.html:
  • css3/color/gradients.html:
  • fast/css/heightless-list-item.html:
  • fast/css/object-position/object-position-img-svg.html:
  • fast/gradients/alpha-premultiplied.html:
  • fast/text/simple-line-layout-line-box-contain-glyphs.html:
  • fast/text/simple-line-layout-text-position-with-stroke.html:
  • svg/animations/multiple-animateTransform-additive-sum.svg:
11:14 AM Changeset in webkit [289401] by Alan Coon
  • 3 edits in branches/safari-613.1.16.0-branch/Source/JavaScriptCore

Cherry-pick r289354. rdar://problem/88611690

Wasm crash on https://copy.sh/v86/?profile=dsl
https://bugs.webkit.org/show_bug.cgi?id=236037
rdar://88358719

Reviewed by Mark Lam.

Lower stack args in Air had a bug where it was emitting a constant
materialization at the wrong instruction offset for certain types
of spill instructions. This happens when we have a stack slot that
is 8 bytes wide, but we're emitting a zero def Move32. We need to
zero the upper 4 bytes. However, there is also code inside lower
stack args that uses the temp register when encountering offsets
that are too large to encode in a single instruction. However,
this offset materialization code for the second Move32 to zero
the upper bytes was happening before the actual store. For example,
we'd end up with:
movz x16, #k
movz x16, #k2
stur x1, [x16]
stur zr, [x16]

instead of
movz x16, #k
stur x1, [x16]
movz x16, #k2
stur zr, [x16]

  • b3/air/AirLowerStackArgs.cpp: (JSC::B3::Air::lowerStackArgs):
  • b3/air/testair.cpp:

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

11:14 AM Changeset in webkit [289400] by Alan Coon
  • 3 edits in branches/safari-613.1.16.0-branch/Source/JavaScriptCore

Cherry-pick r289024. rdar://problem/88222677

SecureARM64EHashPins should check g_jscConfig.useFastJITPermissions
https://bugs.webkit.org/show_bug.cgi?id=236055
<rdar://88222677>

Reviewed by Mark Lam.

  • assembler/SecureARM64EHashPins.cpp: (JSC::SecureARM64EHashPins::initializeAtStartup): (JSC::SecureARM64EHashPins::allocatePinForCurrentThread): (JSC::SecureARM64EHashPins::deallocatePinForCurrentThread):
  • assembler/SecureARM64EHashPinsInlines.h: (JSC::SecureARM64EHashPins::pinForCurrentThread):

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

11:14 AM Changeset in webkit [289399] by Alan Coon
  • 3 edits in branches/safari-613.1.16.0-branch/Source/WebCore

Cherry-pick r288539. rdar://problem/87986840

Expand RefPtr / Ref use in FrameLoader
https://bugs.webkit.org/show_bug.cgi?id=235551
rdar://87986840

Reviewed by Mark Lam.

Apply Ref / RefPtr instead of taking SerializedScriptValue*.

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::loadInSameDocument): (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
  • loader/FrameLoader.h:

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

11:14 AM Changeset in webkit [289398] by Alan Coon
  • 9 edits in branches/safari-613.1.16.3-branch/Source

Versioning.

WebKit-7613.1.16.3.1

11:09 AM Changeset in webkit [289397] by Alan Coon
  • 9 edits in branches/safari-613.1.16.0-branch/Source

Versioning.

WebKit-7613.1.16.0.5

10:57 AM Changeset in webkit [289396] by weinig@apple.com
  • 17 edits in trunk

Conversion to a color space with a smaller gamut should perform gamut mapping
https://bugs.webkit.org/show_bug.cgi?id=236200

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update tests to include more examples that force gamut mapping and update the results
of a few existing ones to account for the new algorithm.

  • web-platform-tests/css/css-color/parsing/color-mix-computed-expected.txt:
  • web-platform-tests/css/css-color/parsing/color-mix-computed.html:
  • web-platform-tests/css/css-color/parsing/color-mix-valid-expected.txt:
  • web-platform-tests/css/css-color/parsing/color-mix-valid.html:
  • web-platform-tests/css/css-color/parsing/relative-color-computed-expected.txt:
  • web-platform-tests/css/css-color/parsing/relative-color-computed.html:
  • web-platform-tests/css/css-color/parsing/relative-color-valid-expected.txt:
  • web-platform-tests/css/css-color/parsing/relative-color-valid.html:

Source/WebCore:

CSS Color now defines that gamut mapping should happen when converting to an RGB color space
with bounded gamut that is smaller than the origin color's color space. Specifically, it
specifies the use of a new "CSS gamut mapping algorithm" https://drafts.csswg.org/css-color/#css-gamut-mapping
which implements a relative colorimetric intent mapping with colors inside the destination
gamut unchanged.

The previous behavior we implemented was to clip out of gamut colors to the gamut (e.g.
color(srgb 1.4 -0.2 .5) would become color(srgb 1 0 .5)) which can lead to very odd results.

To keep things simple, the gamut mapping has been incorporated directly into the main color
conversion pipeline, replacing the call to makeFromComponentsClampingExceptAlpha in toBounded()
with one implements the new algorithm. To accomadate this, the pipeline was modified so that
the matrix conversions now only happen to/from extended-linear and XYZ color types, rather than
the old behavior which allowed shortcuting from bounded-linear, which was ok because the clip
would result in the same value. Since conversion from bounded-linear to extended-linear is free
(just a type change, no conversion), the only additional cost here is the gamut mapping.

The implementation of the CSS gamut mapping algorithm itself is a naive iterative bisection
implementation based on the psuedo-code from the spec. As an optimization in the future, we should
consider implementing an analytic solution, which will be more complicated, but likely faster.

Currently, the only place where the effect of this new gamut mapping behavior will be visible is
via functions that explicitly convert to a bounded color space, specifically the CSS color-mix()
function and relative color syntax. Ultimately, we should also be using this to map CSS colors
to the output color space of the screen / HTML canvas, but finding the right place to do that
is not a part of this initial change.

  • platform/graphics/ColorConversion.cpp:

(WebCore::ColorConversion<Lab<float>, XYZA<float, WhitePoint::D50>>::convert):
(WebCore::ColorConversion<OKLab<float>, XYZA<float, WhitePoint::D65>>::convert):
Add call to makeFromComponentsClampingExceptAlpha at the end of conversion to Lab/OKLab
as the conversion functions can produce lightness values just ever so less than 0.
In practice, only the lightness value is bounded, so it is the only thing that actually
gets clamped thanks to the constexpr nature of clampedComponent().

  • platform/graphics/ColorConversion.h:

(WebCore::computeDeltaEOK):
Add implementation of the deltaEOK algorithm.

(WebCore::ClipGamutMapping::mapToBoundedGamut):
Add implementation of the degenerate gamut mapping algorithm.

(WebCore::CSSGamutMapping::mapToBoundedGamut):
Add implementation of the CSS gamut mapping algorithm.

(WebCore::ColorConversion::convert):
Add a new step to the main pipeline that explicitly handles bounds conversions to/from
extended-linear so that the matrix conversions can rely on always working in extended space.

(WebCore::ColorConversion::toBounded):
Replace call to clamp with call out to gamut mapping algorithm.

(WebCore::ColorConversion::handleMatrixConversion):
Replace makeFromComponentsClampingExceptAlpha with makeFromComponents now that all conversions
are in the extended space and clamping is no-op.

  • platform/graphics/ColorTypes.h:

(WebCore::inGamut):
(WebCore::colorIfInGamut):
(WebCore::clipToGamut):
Add some helpers to check/convert/clip to the bounded gamut of RGB types.

Tools:

  • TestWebKitAPI/Tests/WebCore/ColorTests.cpp:

(TestWebKitAPI::TEST):
Update color conversion tests to account for gamut mapping and add a new test
that bypasses gamut mapping by converting to extended sRGB.

LayoutTests:

  • platform/gtk/TestExpectations:

Add more tests that are only failing on the GTK bots due to a small floating point issues that needs further investigation.

10:55 AM Changeset in webkit [289395] by Alan Coon
  • 3 edits in branches/safari-613.1.16.1-branch/Source/JavaScriptCore

Cherry-pick r289354. rdar://problem/88611690

Wasm crash on https://copy.sh/v86/?profile=dsl
https://bugs.webkit.org/show_bug.cgi?id=236037
rdar://88358719

Reviewed by Mark Lam.

Lower stack args in Air had a bug where it was emitting a constant
materialization at the wrong instruction offset for certain types
of spill instructions. This happens when we have a stack slot that
is 8 bytes wide, but we're emitting a zero def Move32. We need to
zero the upper 4 bytes. However, there is also code inside lower
stack args that uses the temp register when encountering offsets
that are too large to encode in a single instruction. However,
this offset materialization code for the second Move32 to zero
the upper bytes was happening before the actual store. For example,
we'd end up with:
movz x16, #k
movz x16, #k2
stur x1, [x16]
stur zr, [x16]

instead of
movz x16, #k
stur x1, [x16]
movz x16, #k2
stur zr, [x16]

  • b3/air/AirLowerStackArgs.cpp: (JSC::B3::Air::lowerStackArgs):
  • b3/air/testair.cpp:

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

10:55 AM Changeset in webkit [289394] by Alan Coon
  • 3 edits in branches/safari-613.1.16.1-branch/Source/JavaScriptCore

Cherry-pick r289024. rdar://problem/88222677

SecureARM64EHashPins should check g_jscConfig.useFastJITPermissions
https://bugs.webkit.org/show_bug.cgi?id=236055
<rdar://88222677>

Reviewed by Mark Lam.

  • assembler/SecureARM64EHashPins.cpp: (JSC::SecureARM64EHashPins::initializeAtStartup): (JSC::SecureARM64EHashPins::allocatePinForCurrentThread): (JSC::SecureARM64EHashPins::deallocatePinForCurrentThread):
  • assembler/SecureARM64EHashPinsInlines.h: (JSC::SecureARM64EHashPins::pinForCurrentThread):

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

10:55 AM Changeset in webkit [289393] by Alan Coon
  • 2 edits in branches/safari-613.1.16.1-branch/Source/WebCore

Cherry-pick r288933. rdar://problem/87402941

Crash under ScrollingCoordinatorMac::hasNodeWithAnimatedScrollChanged()
https://bugs.webkit.org/show_bug.cgi?id=235989
<rdar://87402941>

Reviewed by Wenson Hsieh.

Crash data suggest that m_scrollingCoordinator can be null in ThreadedScrollingTree::hasNodeWithAnimatedScrollChanged(),
which is true if the scrolling tree keeps ThreadedScrollingTree alive longer than the scrolling coordinator.

As in the other functions in this file, early return if m_scrollingCoordinator is null.

  • page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::hasNodeWithAnimatedScrollChanged):

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

10:55 AM Changeset in webkit [289392] by Alan Coon
  • 7 edits in branches/safari-613.1.16.1-branch/Source

Cherry-pick r288922. rdar://problem/88172449

[WP] Remove PostScript conversion code
https://bugs.webkit.org/show_bug.cgi?id=235892
<rdar://88172449>

Reviewed by Tim Horton.

The WebContent process no longer has access to the PostScript conversion service, so there is no need to keep this code.

Source/WebCore:

  • loader/cache/CachedImage.cpp: (WebCore::CachedImage::convertedDataIfNeeded const):
  • platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::convertPostScriptDataToPDF): Deleted.
  • platform/graphics/cg/PDFDocumentImage.h:

Source/WebKit:

  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::pluginInfo): (WebKit::PDFPlugin::streamDidReceiveResponse): (WebKit::PDFPlugin::manualStreamDidReceiveResponse):

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

10:55 AM Changeset in webkit [289391] by Alan Coon
  • 2 edits in branches/safari-613.1.16.1-branch/Source/WebKit

Cherry-pick r288848. rdar://problem/86950638

Web Inspector: [Cocoa] Crash in WebKit::WebInspectorUIProxy::attachmentViewDidChange
https://bugs.webkit.org/show_bug.cgi?id=235842

Reviewed by Timothy Hatcher.

Speculatively fix an occasional crash in WebKit::WebInspectorUIProxy::attachmentViewDidChange by ensuring that
the WebInspectorUIProxy still exists before calling attachmentViewDidChange.

Currently we are sometimes crashing while attempting to m_objCAdapter.get(), which is the first use of a
member variable in WebInspectorUIProxy::attachmentViewDidChange. This retain pointer should never be able to
not exists, since it storing nil is a valid state. This points to the WebInspectorUIProxy itself no longer
existing. The fix is to check that we actually have a WebInspectorUIProxy before calling
attachmentViewDidChange. This is also just good practice since WebPageProxy::inspector() is also able to
return nullptr under certain circumstances, and all other calls to it are guarded to check if the
WebInspectorUIProxy is still around first.

  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::setInspectorAttachmentView):

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

10:55 AM Changeset in webkit [289390] by Alan Coon
  • 3 edits in branches/safari-613.1.16.1-branch/Source/WebKit

Cherry-pick r288825. rdar://problem/88172449

[WP] Remove PostScript conversion code
https://bugs.webkit.org/show_bug.cgi?id=235892
<rdar://88172449>

Reviewed by Brent Fulgham.

The WebContent process no longer has access to the PostScript conversion service, so there is no need to keep this code.

  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::streamDidFinishLoading): (WebKit::PDFPlugin::manualStreamDidFinishLoading): (WebKit::PDFPlugin::convertPostScriptDataIfNeeded): Deleted.

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

10:55 AM Changeset in webkit [289389] by Alan Coon
  • 2 edits in branches/safari-613.1.16.1-branch/Source/WebKit

Cherry-pick r288776. rdar://problem/88214729

[macOS][WP] Temporarily add syscall to sandbox
https://bugs.webkit.org/show_bug.cgi?id=235841
<rdar://88197549>

Reviewed by Brent Fulgham.

Temporarily add syscall to sandbox in the WebContent process on macOS. This can be removed when <rdar://88210738> is fixed.

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

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

10:55 AM Changeset in webkit [289388] by Alan Coon
  • 3 edits in branches/safari-613.1.16.1-branch/Source/WebCore

Cherry-pick r288539. rdar://problem/87986840

Expand RefPtr / Ref use in FrameLoader
https://bugs.webkit.org/show_bug.cgi?id=235551
rdar://87986840

Reviewed by Mark Lam.

Apply Ref / RefPtr instead of taking SerializedScriptValue*.

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::loadInSameDocument): (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
  • loader/FrameLoader.h:

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

10:49 AM Changeset in webkit [289387] by Alan Coon
  • 9 edits in branches/safari-613.1.16.1-branch/Source

Versioning.

WebKit-7613.1.16.1.4

10:36 AM Changeset in webkit [289386] by Jonathan Bedard
  • 6 edits in trunk/Tools

[git-webkit] Autostash when pulling
https://bugs.webkit.org/show_bug.cgi?id=235861
<rdar://problem/88298948>

Reviewed by Ryosuke Niwa.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git.pull): Pass --autostash when pulling and resetting timestamps.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Handle --autostash.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:

Canonical link: https://commits.webkit.org/246972@main

10:20 AM Changeset in webkit [289385] by Russell Epstein
  • 3 edits in branches/safari-613-branch/Source/JavaScriptCore

Cherry-pick r289354. rdar://problem/88611690

Wasm crash on https://copy.sh/v86/?profile=dsl
https://bugs.webkit.org/show_bug.cgi?id=236037
rdar://88358719

Reviewed by Mark Lam.

Lower stack args in Air had a bug where it was emitting a constant
materialization at the wrong instruction offset for certain types
of spill instructions. This happens when we have a stack slot that
is 8 bytes wide, but we're emitting a zero def Move32. We need to
zero the upper 4 bytes. However, there is also code inside lower
stack args that uses the temp register when encountering offsets
that are too large to encode in a single instruction. However,
this offset materialization code for the second Move32 to zero
the upper bytes was happening before the actual store. For example,
we'd end up with:
movz x16, #k
movz x16, #k2
stur x1, [x16]
stur zr, [x16]

instead of
movz x16, #k
stur x1, [x16]
movz x16, #k2
stur zr, [x16]

  • b3/air/AirLowerStackArgs.cpp: (JSC::B3::Air::lowerStackArgs):
  • b3/air/testair.cpp:

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

10:20 AM Changeset in webkit [289384] by Russell Epstein
  • 2 edits in branches/safari-613-branch/LayoutTests

Cherry-pick r287055. rdar://problem/86488039

REGRESSION (r286982): ASSERTION FAILED: clipRectsContext.rootLayer == m_clipRectsCache->m_clipRectsRoot[clipRectsType]
https://bugs.webkit.org/show_bug.cgi?id=234315

Unreviewed test gardening.

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

9:53 AM Changeset in webkit [289383] by ysuzuki@apple.com
  • 7 edits in trunk/Source/WebCore

[WebCore] JSValueInWrappedObject is not correct for concurrent GC
https://bugs.webkit.org/show_bug.cgi?id=236277
rdar://88366849

Reviewed by Saam Barati.

JSValueInWrappedObject is broken for concurrent GC's marking. It is using std::variant<> to store Weak / JSValue,
which is not safe if concurrent GC reads it while changing that std::variant. This patch fixes several problems
in JSValueInWrappedObject.

  1. We must not use std::variant here since concurrent access can happen. We have both JSValue and Weak, and change Weak after fully initialize WeakImpl's content in Weak. To ensure that, we emit storeStoreBarrier before setting Weak to the JSValueInWrappedObject's field.
  2. Assignment operator & copy constructor are basically wrong for this class as we need a write-barrier to set a value to the field. We remove them and make it explicit that we do not have write-barrier, which reveals that IDBRequest has a semantic bug.
  3. We also add clear() instead of assigning empty JSValueInWrappedObject. And we ensure that this new clear() works well with concurrent GC threads: we clear the underlying WeakImpl* pointer to nullptr. But since WeakImpl* is kept alive until GC clears weak-related things in its end phase, concurrent GC thread can access the old WeakImpl*.
  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::setGetResult):

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::setResult):
(WebCore::IDBRequest::setResultToStructuredClone):
(WebCore::IDBRequest::setResultToUndefined):
(WebCore::IDBRequest::willIterateCursor):
(WebCore::IDBRequest::didOpenOrIterateCursor):

  • Modules/paymentrequest/PaymentMethodChangeEvent.cpp:
  • Modules/paymentrequest/PaymentResponse.cpp:

(WebCore::PaymentResponse::setDetailsFunction):

  • Modules/webaudio/AudioBuffer.cpp:

(WebCore::AudioBuffer::getChannelData):
(WebCore::AudioBuffer::visitChannelWrappers):

  • bindings/js/JSValueInWrappedObject.h:

(WebCore::JSValueInWrappedObject::JSValueInWrappedObject):
(WebCore::JSValueInWrappedObject::operator JSC::JSValue const):
(WebCore::JSValueInWrappedObject::visit const):
(WebCore::JSValueInWrappedObject::setWeakly):
(WebCore::JSValueInWrappedObject::set):
(WebCore::JSValueInWrappedObject::clear):
(WebCore::JSValueInWrappedObject::setWithoutBarrier):
(WebCore::cachedPropertyValue):
(WebCore::JSValueInWrappedObject::makeValue): Deleted.
(WebCore::JSValueInWrappedObject::operator=): Deleted.

9:51 AM Changeset in webkit [289382] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WTF

[macOS] Update requirements for ScreenCaptureKit
https://bugs.webkit.org/show_bug.cgi?id=236304
rdar://88593324

Reviewed by Youenn Fablet.

  • wtf/PlatformHave.h:
9:14 AM Changeset in webkit [289381] by youenn@apple.com
  • 10 edits
    2 adds in trunk

LibWebRTCCodecs SharedVideoFrameWriters can deadlock in case of GPUProcess crash
https://bugs.webkit.org/show_bug.cgi?id=236132

Reviewed by Eric Carlson.

Source/WebKit:

When sending sampels through SharedVideoFrameWriters, we might lock on a binary semaphore controlled by GPUProcess.
It is not always the case that the semaphore will unblock in case of GPUProcess crash for instance.
To prevent this, whenever we detect a GPUProcess crash, we disable SharedVideoFrameWriters, which has the effect of
disabling semaphore wait for future call and unlocking any current wait by calling semaphore.signal.
Then, the SharedVideoFrameWriter is recreated as needed by owner classes such as LibWebRTCCodecs or SampleBufferDisplayLayer.

In the case of LibWebRTCCodecs, we further reduce locking cases by introducing a lock dedicated to encoders.
Previously, the lock for encoders was also encompassing the codecs connection and the decoders.

Test: webrtc/vp8-then-h264-gpu-process-crash.html

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:
  • WebProcess/GPU/webrtc/SharedVideoFrame.cpp:
  • WebProcess/GPU/webrtc/SharedVideoFrame.h:

LayoutTests:

  • platform/gtk/TestExpectations: Skip test as it is crashing in GTK bot.
  • webrtc/vp8-then-h264-gpu-process-crash-expected.txt: Added.
  • webrtc/vp8-then-h264-gpu-process-crash.html: Added.
9:03 AM Changeset in webkit [289380] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Reduce allocations and increase thread safety of constructedPath
https://bugs.webkit.org/show_bug.cgi?id=236286
<rdar://86904276>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-08
Reviewed by Chris Dumez.

  • UIProcess/API/APIContentRuleListStore.cpp:

(API::constructedPathPrefix):
(API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):

8:57 AM Changeset in webkit [289379] by Simon Fraser
  • 7 edits
    2 moves in trunk/Source/WebKit

Rename ImageBufferShareableIOSurfaceBackend to ImageBufferRemoteIOSurfaceBackend
https://bugs.webkit.org/show_bug.cgi?id=236267

Reviewed by Tim Horton.

Most of the functions on ImageBufferShareableIOSurfaceBackend are stubs that RELEASE_ASSERT;
it's "remote" role is more important that it's "shareable" role, so rename it.

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/graphics/PlatformImageBufferShareableBackend.h:
  • WebProcess/GPU/graphics/cocoa/ImageBufferRemoteIOSurfaceBackend.cpp: Renamed from Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp.

(WebKit::ImageBufferRemoteIOSurfaceBackend::calculateSafeBackendSize):
(WebKit::ImageBufferRemoteIOSurfaceBackend::calculateMemoryCost):
(WebKit::ImageBufferRemoteIOSurfaceBackend::calculateExternalMemoryCost):
(WebKit::ImageBufferRemoteIOSurfaceBackend::create):
(WebKit::ImageBufferRemoteIOSurfaceBackend::createImageBufferBackendHandle const):
(WebKit::ImageBufferRemoteIOSurfaceBackend::context const):
(WebKit::ImageBufferRemoteIOSurfaceBackend::backendSize const):
(WebKit::ImageBufferRemoteIOSurfaceBackend::bytesPerRow const):
(WebKit::ImageBufferRemoteIOSurfaceBackend::copyNativeImage const):
(WebKit::ImageBufferRemoteIOSurfaceBackend::copyImage const):
(WebKit::ImageBufferRemoteIOSurfaceBackend::draw):
(WebKit::ImageBufferRemoteIOSurfaceBackend::drawPattern):
(WebKit::ImageBufferRemoteIOSurfaceBackend::toDataURL const):
(WebKit::ImageBufferRemoteIOSurfaceBackend::toData const):
(WebKit::ImageBufferRemoteIOSurfaceBackend::getPixelBuffer const):
(WebKit::ImageBufferRemoteIOSurfaceBackend::putPixelBuffer):

  • WebProcess/GPU/graphics/cocoa/ImageBufferRemoteIOSurfaceBackend.h: Renamed from Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.h.
8:55 AM Changeset in webkit [289378] by jonlee@apple.com
  • 5 edits in trunk

Enable GPU Process for WebGL by default on iOS
https://bugs.webkit.org/show_bug.cgi?id=236218

Reviewed by Kimmo Kinnunen.

Tools:

  • WebKitTestRunner/TestOptions.cpp: Add new static representing whether full GPU Process is enabled.

(WTR::TestOptions::defaults):

LayoutTests:

  • platform/ios-simulator/TestExpectations: read-pixels-test.html is no longer slow.
  • platform/ios-wk2/TestExpectations:
8:23 AM Changeset in webkit [289377] by commit-queue@webkit.org
  • 6 edits in trunk

Return 'none' for the computed style of mask when there are no mask images
https://bugs.webkit.org/show_bug.cgi?id=236265
<rdar://88178304>

Patch by Matt Woodrow <Matt Woodrow> on 2022-02-08
Reviewed by Dean Jackson.

Source/WebCore:

Rather than returning all the longhand properties, return 'none' if there are no
mask images. This no longer matches the behaviour of the 'background' property, but
better matches what other UAs do.

Ideally we'd return the smallest possible canonical representation of the non-initial
property values, but this is a much simpler change to fix a compat regression.

Test: fast/masking/parsing-mask.html
Updates expected results to match new behavior.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::getLayerCount):
(WebCore::ComputedStyleExtractor::getFillLayerPropertyShorthandValue):
(WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
(WebCore::ComputedStyleExtractor::getMaskShorthandValue):

  • css/CSSComputedStyleDeclaration.h:

LayoutTests:

  • fast/masking/parsing-mask-expected.txt:
  • fast/masking/parsing-mask.html:

Updated expected results to expect 'none' for all cases where there isn't an actual mask
image.

7:55 AM Changeset in webkit [289376] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Add support for ideographic baseline on atomic inline level boxes
https://bugs.webkit.org/show_bug.cgi?id=236258

Reviewed by Antti Koivisto.

This is in preparation for adding vertical writing mode support (now we pass all the replaced tests under imported/w3c/web-platform-tests/css/css-writing-modes).

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::LineBoxBuilder::adjustIdeographicBaselineIfApplicable): see RenderBox::baselinePosition() for the math.

7:06 AM Changeset in webkit [289375] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Garden tests failing after r288070

Unreviewed test gardening.

  • platform/gtk/TestExpectations:
6:55 AM Changeset in webkit [289374] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC][IFC] Take writing direction into account when applying RenderBlockFlow end padding quirk
https://bugs.webkit.org/show_bug.cgi?id=236280

Reviewed by Antti Koivisto.

In vertical writing mode the overflow should be expanded in the vertical direction if applicable.

  • layout/formattingContexts/inline/display/InlineDisplayLine.h:

(WebCore::InlineDisplay::Line::contentLogicalWidth const):
(WebCore::InlineDisplay::Line::Line):
(WebCore::InlineDisplay::Line::contentWidth const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalRight const):

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::lineOverflowLogicalWidth):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
(WebCore::LayoutIntegration::lineOverflowWidth): Deleted.

  • layout/integration/LayoutIntegrationLine.h:

(WebCore::LayoutIntegration::Line::Line):
(WebCore::LayoutIntegration::Line::contentLogicalWidth const):
(WebCore::LayoutIntegration::Line::contentWidth const): Deleted. -> this is a logical width value.

  • layout/integration/LayoutIntegrationPagination.cpp:

(WebCore::LayoutIntegration::makeAdjustedContent):

  • platform/graphics/FloatRect.h:

(WebCore::FloatRect::shiftMaxYEdgeBy):

6:35 AM Changeset in webkit [289373] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Take isHorizontalWritingMode value into account when converting incoming margin/border/padding values
https://bugs.webkit.org/show_bug.cgi?id=236285

Reviewed by Antti Koivisto.

(WebCore::LayoutIntegration::logicalMargin):
(WebCore::LayoutIntegration::logicalBorder):
(WebCore::LayoutIntegration::logicalPadding):
(WebCore::LayoutIntegration::LineLayout::updateLayoutBoxDimensions):
(WebCore::LayoutIntegration::LineLayout::updateInlineBoxDimensions):

6:26 AM Changeset in webkit [289372] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] LineBoxBuilder::setBaselineAndLayoutBounds should handle atomic inline level boxes too
https://bugs.webkit.org/show_bug.cgi?id=236255

Reviewed by Antti Koivisto.

Call setBaselineAndLayoutBounds with atomic type of inline level boxes.
This is in preparation for adding support for ideographic baseline on atomic inline level boxes.

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::LineBoxBuilder::setBaselineAndLayoutBounds const):
(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):

6:19 AM Changeset in webkit [289371] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

GPUP WebGL RELEASE_LOGs errorneously for unhandled messages
https://bugs.webkit.org/show_bug.cgi?id=236288

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-08
Reviewed by Antti Koivisto.

Remove a RELEASE_LOG when GPUProcessConnection sees a RemoteGraphicsContextGLProxy
message that was not delivered to a specific instance.
This is business as usual, as the proxy intends to be asynchronous and can be destroyed
without coordinating with the GPUP side. The Proxy object cannot know at which point
of time a message to it might be delivered.
Move the message handling to RemoteGraphicsContextGLProxy static method,
so that the RELEASE_LOG does not get added erroneosly again.

  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::dispatchMessage):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::handleMessageToRemovedDestination):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
6:11 AM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
6:07 AM Changeset in webkit [289370] by Adrian Perez de Castro
  • 2 edits in trunk

[WPE] Running distcheck with USE_SOUP2=OFF fails to install documentation
https://bugs.webkit.org/show_bug.cgi?id=236235

Reviewed by Carlos Garcia Campos.

  • Source/PlatformWPE.cmake: Use WPE_API_DOC_VERSION instead of WPE_API_VERSION for the documentation.
5:46 AM Changeset in webkit [289369] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

[GTK][WPE] Crash at WebKit::bindA11y() in WebKitGTK 2.35.2
https://bugs.webkit.org/show_bug.cgi?id=236144

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2022-02-08
Reviewed by Adrian Perez de Castro.

ATSPI stopped using an abstract socket but we are still assuming the a11y bus address is an abstract socket,
even when the path is not really used after all. However, just handling the case of the socket being a normal
unix socket is not enough, because the actual socket path is not mounted in the xdg-dbus-proxy sandbox, so it
fails to connect to the original a11y bus.

  • UIProcess/Launcher/ProcessLauncher.h: Rename extraWebProcessSandboxPaths as extraSandboxPaths.
  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::XDGDBusProxyLauncher::setAddress): Remove the DBusAddressType parameter. Check the address looks valid
and just store the result of dbusAddressToPath() in m_path.
(WebKit::XDGDBusProxyLauncher::launch): Do not require m_path to be non-null and add it to the sanbox.
(WebKit::XDGDBusProxyLauncher::dbusAddressToPath): Only return the path for normal unix sockets.
(WebKit::bindDBusSession): Remove the DBusAddressType parameter passed to dbusAddressToPath().
(WebKit::bindA11y): Check proxy path is not null before setting a11y bus address in display.
(WebKit::addExtraPaths): Helper to add extra paths to the sandbox.
(WebKit::bubblewrapSpawn): Call addExtraPaths() for WebProcess and DBusProxy types.

  • UIProcess/Launcher/glib/FlatpakLauncher.cpp:

(WebKit::flatpakSpawn): Use extraSandboxPaths.

  • UIProcess/glib/WebProcessProxyGLib.cpp:

(WebKit::WebProcessProxy::platformGetLaunchOptions): Ditto.

5:25 AM Changeset in webkit [289368] by Tyler Wilcock
  • 4 edits in trunk/Source/WebCore

AX: When updating the isolated tree with a remove and add of the same object, the wrapper is not re-attached
https://bugs.webkit.org/show_bug.cgi?id=236273

Reviewed by Andres Gonzalez.

In AXIsolatedTree::applyPendingChanges, we process node and subtree
removals before tree additions. When doing these removals, we detach
the object and wrapper from each other. This is fine unless that same
object is slated to be added again (e.g. it was moved in the DOM), as
we don't always re-attach a wrapper. [WebAccessibilityObjectWrapperBase axBackingObject]
will always return nil for objects in this state.

In this patch, when processing m_pendingAppends, we now attach a
wrapper to any object that has become isDetached (i.e. the object
has no wrapper, or the object has a wrapper but the wrapper does not
point at the object).

Fixes ~15 tests in isolated tree mode.

  • accessibility/isolatedtree/AXIsolatedObject.cpp:
  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::applyPendingChanges):

  • accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:

(WebCore::AXIsolatedObject::isDetached const):

4:43 AM Changeset in webkit [289367] by commit-queue@webkit.org
  • 10 edits in trunk

[GStreamer] Test webkit/WebKitWebView/display-usermedia-permission-request times out
https://bugs.webkit.org/show_bug.cgi?id=235955

Patch by Philippe Normand <pnormand@igalia.com> on 2022-02-08
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

The RealtimeMediaSource representing the GStreamer mock display source now correctly
reflects the corresponding capture device type (either Window or Screen). As that source
actually wraps a MockRealtimeVideoSourceGStreamer, a couple more methods from
RealtimeMediaSource had to be overridden.

  • platform/mediastream/RealtimeMediaSource.h: Allow subclasses to override setMuted and isProducingData.
  • platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp: Handle SystemAudio as

Speaker devices, for now.
(WebCore::GStreamerCaptureDeviceManager::refreshCaptureDevices):

  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: Refactor, leveraging the

new has{Audio,Video} methods.
(mediaStreamTrackPrivateGetTags):
(webkitMediaStreamNew):
(webkitMediaStreamSrcAddTrack):
(webkitMediaStreamSrcSetStream):
(webkitMediaStreamSrcConfigureAudioTracks):

  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp: Map source type to

capture device type, proxy mute configuration and ending logic to wrapped source.
(WebCore::MockDisplayCaptureSourceGStreamer::create):
(WebCore::MockDisplayCaptureSourceGStreamer::MockDisplayCaptureSourceGStreamer):
(WebCore::MockDisplayCaptureSourceGStreamer::requestToEnd):
(WebCore::MockDisplayCaptureSourceGStreamer::setMuted):

  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h:

Source/WebKit:

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewConfigureMediaCapture): Don't notify display capture updates as camera capture
updates.

Tools:

  • TestWebKitAPI/glib/TestExpectations.json: Unflag test now passing.
4:32 AM Changeset in webkit [289366] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

[WPE] Developer extras are always enabled by default
https://bugs.webkit.org/show_bug.cgi?id=236295

Reviewed by Carlos Garcia Campos.

No new tests.

  • UIProcess/API/wpe/WPEView.cpp:

(View::View): Remove call to unconditionally set the developer extras setting.

4:26 AM Changeset in webkit [289365] by youenn@apple.com
  • 7 edits in trunk/Source/WebCore

RealtimeOutgoingVideoSourceCocoa rotation session should not use IOSurface
https://bugs.webkit.org/show_bug.cgi?id=236139

Reviewed by Eric Carlson.

Introduce a parameter to use IOSurface or not in ImageRotationSessionVT.
Make use of that parameter in RealtimeOutgoingVideoSourceCocoa to disable IOSurface use.

Covered by existing tests.

  • platform/graphics/cv/CVUtilities.h:
  • platform/graphics/cv/CVUtilities.mm:

(WebCore::createIOSurfaceCVPixelBufferPool):
(WebCore::createInMemoryCVPixelBufferPool):

  • platform/graphics/cv/ImageRotationSessionVT.h:
  • platform/graphics/cv/ImageRotationSessionVT.mm:

(WebCore::ImageRotationSessionVT::ImageRotationSessionVT):
(WebCore::ImageRotationSessionVT::rotate):

  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:

(WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):

3:59 AM Changeset in webkit [289364] by aakash_jain@apple.com
  • 1 edit in trunk/Tools/CISupport/ews-build/master.cfg

[ews] Do not configure GitHub hooks on local testing instance
https://bugs.webkit.org/show_bug.cgi?id=236266

Reviewed by Jonathan Bedard.

  • Tools/CISupport/ews-build/master.cfg:

Canonical link: https://commits.webkit.org/246952@main

3:53 AM Changeset in webkit [289363] by commit-queue@webkit.org
  • 4 edits in trunk/Source

Adding new files fails to compile after SharedWorkerObjectConnection.h changes
https://bugs.webkit.org/show_bug.cgi?id=236294

Add forward declarations and includes.
Unreviewed build fix.

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-08

Source/WebCore:

  • workers/shared/SharedWorkerObjectConnection.h:

Source/WebKit:

  • NetworkProcess/SharedWorker/WebSharedWorkerServerConnection.h:
3:33 AM Changeset in webkit [289362] by youenn@apple.com
  • 6 edits in trunk/Source

MediaSampleAVFObjC::createImageSample should take a presentationTime as parameter
https://bugs.webkit.org/show_bug.cgi?id=236067

Reviewed by Eric Carlson.

Source/WebCore:

Add additional parameters to createImageSample that will be used by WebKit.
No change of behavior.

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:

(WebCore::MediaSampleAVFObjC::createImageSample):

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

(WebCore::MediaSampleAVFObjC::createImageSample):

Source/WebKit:

  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:

(WebKit::RemoteMediaRecorder::videoSampleAvailable):

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:

(WebKit::RemoteSampleBufferDisplayLayer::enqueueSample):

3:28 AM Changeset in webkit [289361] by youenn@apple.com
  • 6 edits in trunk/Source/WebKit

SharedVideoFrameReader could directly take a IPCHandle
https://bugs.webkit.org/show_bug.cgi?id=236068

Reviewed by Eric Carlson.

Move more code in SharedVideoFrameReader::setSharedMemory, as a refactoring.

  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:

(WebKit::LibWebRTCCodecsProxy::setSharedVideoFrameMemory):

  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:

(WebKit::RemoteMediaRecorder::setSharedVideoFrameMemory):

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:

(WebKit::RemoteSampleBufferDisplayLayer::setSharedVideoFrameMemory):

  • WebProcess/GPU/webrtc/SharedVideoFrame.cpp:

(WebKit::SharedVideoFrameReader::setSharedMemory):

  • WebProcess/GPU/webrtc/SharedVideoFrame.h:

(WebKit::SharedVideoFrameReader::setSharedMemory): Deleted.

1:53 AM Changeset in webkit [289360] by Nikolas Zimmermann
  • 3 edits in trunk/Source/WebCore

RenderLayer: Simplify RenderElement::paint() calls
https://bugs.webkit.org/show_bug.cgi?id=236192

Reviewed by Simon Fraser.

Introduce "paintOffsetForRenderer(fragment, localPaintingInfo)" inline helper:
return toLayoutPoint(fragment.layerBounds.location() - rendererLocation() + localPaintingInfo.subpixelOffset)

Avoid repeating this formula in various places in RenderLayer - unify it.

Covered by existing tests, no change in behaviour.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paintBackgroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
(WebCore::RenderLayer::paintOutlineForFragments):
(WebCore::RenderLayer::paintMaskForFragments):
(WebCore::RenderLayer::paintChildClippingMaskForFragments):
(WebCore::RenderLayer::paintOverflowControlsForFragments):
(WebCore::RenderLayer::collectEventRegionForFragments):

  • rendering/RenderLayer.h:

(WebCore::RenderLayer::paintOffsetForRenderer const):

Feb 7, 2022:

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

[JSC] Convert JSString's non-atomic WTF::String to atomic string while concurrent compilers / heap threads run
https://bugs.webkit.org/show_bug.cgi?id=236262

Reviewed by Saam Barati.

Inspired from r289177. This patch introduces a new protocol which allows us to replace JSString's underlying non-atomic String
to atomic String if we once call toIdentifier / toAtomString.

We had a problem that,

  1. We have a JSString, which has a "test" WTF::String.
  2. We already have "test" atomic string in the table.
  3. Then, when we call JSString::toIdentifier, we know that there is an atomic "test" string, but we cannot replace the current JSString's WTF::String because it can be accessed concurrently from concurrent compilers and GC heap helpers.
  4. Thus, JSString keeps non atomic "test" WTF::String.

But this means that we need to lookup atom string table every time we would like to get an atom string from this JSString.

So, in this patch, we introduce a new protocol, which allows swapping existing WTF::String with an atom string.

When we found that JSString has a WTF::String and we already have atom string in the table with the same content (when calling
toIdentifier / toAtomString), we attempt to replace JSString's WTF::String with the atom string, but *keep the old string in JSC::Heap's
vector called m_possiblyAccessedStringsFromConcurrentThreads. Then, we can keep these strings alive until next GC ends. This ensures that
all concurrent compilers / heap helpers can keep accessing to the old strings. And then, in the GC finalize, we clear this vector since
resumed concurrent compilers and GC heap helpers will not touch these old strings in the next GC cycle. Only case we have a problem is
that we keep having StringImpl* of the old string after GC safepoint in the concurrent compiler, and the only use of that is
DFG::Graph::m_copiedStrings. So, I changed the code not to keep old StringImpl* in DFG::Graph::m_copiedStrings. Also, note that we do
this only when we convert non-atom string to atom string so all UniquedStringImpl* from JSString* (it is atom ones) does not matter since
they are already atom one: they will not be replaced.

This does not increase memory usage, rather, improve memory usage since this kept string was anyway held by the wrapper's JSString at least
until the next GC run. And we clear m_possiblyAccessedStringsFromConcurrentThreads in the next GC run, so we can shrink memory.

It improves Speedometer2 by 0.2%.

----------------------------------------------------------------------------------------------------------------------------------
| subtest | ms | ms | b / a | pValue (significance using False Discovery Rate) |
----------------------------------------------------------------------------------------------------------------------------------
| Elm-TodoMVC |106.193333 |105.690000 |0.995260 | 0.050074 |
| VueJS-TodoMVC |21.671667 |21.741667 |1.003230 | 0.715305 |
| EmberJS-TodoMVC |113.146667 |110.871667 |0.979893 | 0.000000 (significant) |
| BackboneJS-TodoMVC |42.481667 |42.346667 |0.996822 | 0.358040 |
| Preact-TodoMVC |15.796667 |16.016667 |1.013927 | 0.226011 |
| AngularJS-TodoMVC |117.568333 |117.345000 |0.998100 | 0.543369 |
| Vanilla-ES2015-TodoMVC |58.348333 |57.905000 |0.992402 | 0.000381 (significant) |
| Inferno-TodoMVC |54.656667 |54.946667 |1.005306 | 0.254310 |
| Flight-TodoMVC |61.106667 |61.141667 |1.000573 | 0.880780 |
| Angular2-TypeScript-TodoMVC |37.030000 |37.065000 |1.000945 | 0.918550 |
| VanillaJS-TodoMVC |47.741667 |47.911667 |1.003561 | 0.497675 |
| jQuery-TodoMVC |205.251667 |203.903333 |0.993431 | 0.000420 (significant) |
| EmberJS-Debug-TodoMVC |312.448333 |308.848333 |0.988478 | 0.000020 (significant) |
| React-TodoMVC |78.381667 |78.268333 |0.998554 | 0.654647 |
| React-Redux-TodoMVC |131.246667 |131.626667 |1.002895 | 0.138912 |
| Vanilla-ES2015-Babel-Webpack-TodoMVC |57.860000 |57.533333 |0.994354 | 0.156536 |
----------------------------------------------------------------------------------------------------------------------------------
a mean = 290.61106
b mean = 291.21768
pValue = 0.1419936818
(Bigger means are better.)
1.002 times better
Results ARE NOT significant

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::prepareJumpTableForStringSwitch):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGGraph.h:
  • dfg/DFGLazyJSValue.cpp:

(JSC::DFG::CrossThreadStringTranslator::hash):
(JSC::DFG::CrossThreadStringTranslator::equal):
(JSC::DFG::CrossThreadStringTranslator::translate):
(JSC::DFG::LazyJSValue::tryGetString const):

  • dfg/DFGLazyJSValue.h:

(JSC::DFG::LazyJSValue::knownStringImpl):

  • heap/Heap.cpp:

(JSC::Heap::finalize):

  • heap/Heap.h:

(JSC::Heap::appendPossiblyAccessedStringFromConcurrentThreads):

  • runtime/JSString.h:

(JSC::JSString::swapToAtomString const):
(JSC::JSString::toIdentifier const):
(JSC::JSString::toAtomString const):

8:59 PM Changeset in webkit [289358] by commit-queue@webkit.org
  • 3 edits
    1 copy in trunk/Source/WTF

Unreviewed, reverting r289256.
https://bugs.webkit.org/show_bug.cgi?id=236284

EWS is reporting build failures

Reverted changeset:

"Replace "Copy WTF Headers" with native build phases"
https://bugs.webkit.org/show_bug.cgi?id=235744
https://commits.webkit.org/r289256

8:43 PM Changeset in webkit [289357] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebCore

Unreviewed, reverting r289227.
https://bugs.webkit.org/show_bug.cgi?id=236282

Crash on AS debug builds

Reverted changeset:

"Move
DocumentTimeline::runningAnimationsForRendererAreAllAccelerated()
to Styleable"
https://bugs.webkit.org/show_bug.cgi?id=236239
https://commits.webkit.org/r289227

8:24 PM Changeset in webkit [289356] by Cameron McCormack
  • 8 edits
    2 deletes in trunk/Source/WebCore

Remove HTMLSourceTracker
https://bugs.webkit.org/show_bug.cgi?id=236259

Reviewed by Geoffrey Garen.

Since the removal of the XSS Auditor in bug 230499, the tracking of
attribute locations that HTMLSourceTracker does is unused.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::pumpTokenizerLoop):

  • html/parser/HTMLDocumentParser.h:
  • html/parser/HTMLSourceTracker.cpp: Removed.
  • html/parser/HTMLSourceTracker.h: Removed.
  • html/parser/HTMLToken.h:

(WebCore::HTMLToken::beginAttribute):
(WebCore::HTMLToken::endAttribute):
(WebCore::HTMLToken::setAttributeBaseOffset): Deleted.

  • html/parser/HTMLTokenizer.cpp:

(WebCore::HTMLTokenizer::processToken):

  • html/parser/HTMLTokenizer.h:

(WebCore::HTMLTokenizer::setTokenAttributeBaseOffset): Deleted.

7:31 PM Changeset in webkit [289355] by Andres Gonzalez
  • 4 edits in trunk/Source/WebCore

Prevent removal of isolated objects from a different parent than the current parent.
https://bugs.webkit.org/show_bug.cgi?id=236250
<rdar://problem/88585928>

Reviewed by Chris Fleizach.

AXObjectCache::remove may be called for an object after that object has
been re-parented. In those cases, we don't want to remove the corresponding
isolated object from its new location in the tree.
In addition, AXIsolatedTree:removeSubtreeFromNodeMap now properly updates
the children IDs for the parent of the object being removed.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::remove):

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::nodeChangeForObject):
(WebCore::AXIsolatedTree::queueChange):
(WebCore::AXIsolatedTree::collectNodeChangesForSubtree):
(WebCore::AXIsolatedTree::nodeAncestryChanges):
(WebCore::AXIsolatedTree::updateChildren):
(WebCore::AXIsolatedTree::removeNode):
(WebCore::AXIsolatedTree::removeSubtreeFromNodeMap):

  • accessibility/isolatedtree/AXIsolatedTree.h:

(WebCore::AXIsolatedTree::removeSubtreeFromNodeMap):

7:00 PM Changeset in webkit [289354] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Wasm crash on https://copy.sh/v86/?profile=dsl
https://bugs.webkit.org/show_bug.cgi?id=236037
rdar://88358719

Reviewed by Mark Lam.

Lower stack args in Air had a bug where it was emitting a constant
materialization at the wrong instruction offset for certain types
of spill instructions. This happens when we have a stack slot that
is 8 bytes wide, but we're emitting a zero def Move32. We need to
zero the upper 4 bytes. However, there is also code inside lower
stack args that uses the temp register when encountering offsets
that are too large to encode in a single instruction. However,
this offset materialization code for the second Move32 to zero
the upper bytes was happening before the actual store. For example,
we'd end up with:
movz x16, #k
movz x16, #k2
stur x1, [x16]
stur zr, [x16]

instead of
movz x16, #k
stur x1, [x16]
movz x16, #k2
stur zr, [x16]

  • b3/air/AirLowerStackArgs.cpp:

(JSC::B3::Air::lowerStackArgs):

  • b3/air/testair.cpp:
6:58 PM Changeset in webkit [289353] by Ben Nham
  • 21 edits
    2 adds in trunk

Add PushService
https://bugs.webkit.org/show_bug.cgi?id=235857

Reviewed by Brady Eidson.

Source/WebKit:

This adds PushService to webpushd. It handles requests to create, remove, and get push
subscriptions. It also decrypts incoming pushes and pass them back to the UI process via the
existing machinery in WebPushDaemon.

PushService primarily interacts with two objects:

  1. PushServiceConnection: this creates and removes push subscriptions from the push server. It also receives incoming pushes from the push server.
  2. PushDatabase: this persists push subscriptions to disk.

Several things are not yet implemented; for instance, we currently always grant a page the
permission to receive pushes. This will be fixed in future patches.

Covered by new API tests. The current tests use a MockPushServiceConnection that vends
subscription with fixed data, but this can be improved in the future.

  • Shared/API/Cocoa/WKMain.h:
  • Shared/API/Cocoa/WKMain.mm:

(WKWebPushDaemonMain):

  • Shared/Cocoa/WebPushMessageCocoa.mm: add ability to distinguish between an empty vs. null payload.

(WebKit::WebPushMessage::fromDictionary):
(WebKit::WebPushMessage::toDictionary const):

  • Shared/WebPushDaemonConstants.h:

(WebKit::WebPushD::messageTypeSendsReply):

  • Shared/WebPushMessage.h:

(WebKit::WebPushMessage::decode):

  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/MockPushServiceConnection.h:
  • webpushd/MockPushServiceConnection.mm:

(WebPushD::MockPushServiceConnection::generateClientKeys):
(WebPushD::MockPushServiceConnection::subscribe):
(WebPushD::MockPushServiceConnection::unsubscribe):

  • webpushd/PushService.h: Added.

(WebPushD::PushService::connection):
(WebPushD::PushService::database):
(WebPushD::PushService::didReceivePushMessage):

  • webpushd/PushService.mm: Added.

(WebPushD::updateTopicLists):
(WebPushD::PushService::create):
(WebPushD::PushService::createMockService):
(WebPushD::PushService::PushService):
(WebPushD::makePushSubscriptionFromRecord):
(WebPushD::makePushTopic):
(WebPushD::PushServiceRequest::bundleIdentifier):
(WebPushD::PushServiceRequest::scope):
(WebPushD::PushServiceRequest::PushServiceRequest):
(WebPushD::PushServiceRequestImpl::PushServiceRequestImpl):
(WebPushD::PushServiceRequestImpl::fulfill):
(WebPushD::PushServiceRequestImpl::reject):
(WebPushD::GetSubscriptionRequest::GetSubscriptionRequest):
(WebPushD::GetSubscriptionRequest::startInternal):
(WebPushD::SubscribeRequest::SubscribeRequest):
(WebPushD::SubscribeRequest::startImpl):
(WebPushD::SubscribeRequest::attemptToRecoverFromTopicAlreadyInFilterError):
(WebPushD::UnsubscribeRequest::UnsubscribeRequest):
(WebPushD::UnsubscribeRequest::startInternal):
(WebPushD::PushService::enqueuePushServiceRequest):
(WebPushD::PushService::finishedPushServiceRequest):
(WebPushD::PushService::getSubscription):
(WebPushD::PushService::didCompleteGetSubscriptionRequest):
(WebPushD::PushService::subscribe):
(WebPushD::PushService::didCompleteSubscribeRequest):
(WebPushD::PushService::unsubscribe):
(WebPushD::PushService::didCompleteUnsubscribeRequest):
(WebPushD::makeRawPushMessage):
(WebPushD::PushService::didReceivePushMessage):

  • webpushd/PushServiceConnection.h:
  • webpushd/PushServiceConnection.mm:

(WebPushD::PushServiceConnection::generateClientKeys):

  • webpushd/WebPushDaemon.h:
  • webpushd/WebPushDaemon.mm:

(WebPushD::MessageInfo::injectEncryptedPushMessageForTesting::encodeReply):
(WebPushD::Daemon::startMockPushService):
(WebPushD::Daemon::startPushService):
(WebPushD::Daemon::setPushService):
(WebPushD::Daemon::runAfterStartingPushService):
(WebPushD::Daemon::decodeAndHandleMessage):
(WebPushD::Daemon::injectEncryptedPushMessageForTesting):
(WebPushD::Daemon::handleIncomingPush):
(WebPushD::Daemon::getPendingPushMessages):
(WebPushD::Daemon::subscribeToPushService):
(WebPushD::Daemon::unsubscribeFromPushService):
(WebPushD::Daemon::getPushSubscription):
(WebPushD::Daemon::getPushPermissionState):

  • webpushd/WebPushDaemonMain.h:
  • webpushd/WebPushDaemonMain.mm:

(WebKit::WebPushDaemonMain):

  • webpushd/com.apple.webkit.webpushd.mac.plist:
  • webpushd/webpushd.cpp:

(main):

Source/WTF:

Add PushAPIEnabled to WebKitLegacy so we can enable it on in API tests via _WKExperimentalFeature.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Tools:

  • Modifed the existing injected push test to inject different types of real push objects from APS (an empty push, an aesgcm-encrypted push, and an aes128gcm-encrypted push).
  • Add a few basic test cases for subscribing and unsubscribing from push.
  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

(-[NotificationScriptMessageHandler setMessageHandler:]):
(-[NotificationScriptMessageHandler userContentController:didReceiveScriptMessage:]):
(TestWebKitAPI::testWebPushDaemonPList):
(TestWebKitAPI::createMessageDictionary):
(TestWebKitAPI::sendMessageToDaemon):
(TestWebKitAPI::sendMessageToDaemonWaitingForReply):
(TestWebKitAPI::sendConfigurationWithAuditToken):
(TestWebKitAPI::TEST):
(TestWebKitAPI::function): Deleted.

6:58 PM Changeset in webkit [289352] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r289150. rdar://problem/88521016

Don't use adattributiond on iOS
https://bugs.webkit.org/show_bug.cgi?id=236157

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-04
Reviewed by John Wilander.

It is still having configuration issues such as rdar://88334217

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: (WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration):

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

6:58 PM Changeset in webkit [289351] by Russell Epstein
  • 4 edits in branches/safari-613-branch/Source/bmalloc

Cherry-pick r289144. rdar://problem/88585404

[libpas] allocation failure crash should be PAS_NEVER_INLINE
https://bugs.webkit.org/show_bug.cgi?id=236164

Reviewed by Saam Barati.

We introduce pas_allocation_result_crash_on_error function which can leave OOM crash
information in the crash log. To keep this non-inlined, we annotate it PAS_NEVER_INLINE.

  • libpas/src/libpas/pas_allocation_result.h: (pas_allocation_result_crash_on_error):
  • libpas/src/libpas/pas_utils.c: (pas_panic_on_out_of_memory_error):
  • libpas/src/libpas/pas_utils.h:

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

6:58 PM Changeset in webkit [289350] by Russell Epstein
  • 4 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r289123. rdar://problem/88501750

[iOS][macOS] Adjust sysctl sandbox access
https://bugs.webkit.org/show_bug.cgi?id=236082
<rdar://problem/88436174>

Reviewed by Brent Fulgham.

Adjust sysctl sandbox access based on telemetry.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:

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

6:58 PM Changeset in webkit [289349] by Russell Epstein
  • 6 edits in branches/safari-613-branch

Cherry-pick r289108. rdar://problem/88599722

HTMLMediaElement should dispatch the resize event asynchronously
https://bugs.webkit.org/show_bug.cgi?id=230895

Reviewed by Darin Adler.

Source/WebCore:

The HTMLMediaElement is currently queueing a task to dispatch the resize event in the post layout phase.
There is no need to run it synchronously and we could move it to another queue were it will be run
asynchronously as it was done for other similar tasks in the past.

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::layoutSizeChanged):

LayoutTests:

  • media/modern-media-controls/media-controller/media-controller-resize.html: Remove the event listener to avoid an extra notification.
  • platform/mac/TestExpectations: Unskipped tests that pass now.
  • platform/wincairo/TestExpectations: Ditto.

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

6:58 PM Changeset in webkit [289348] by Russell Epstein
  • 5 edits in branches/safari-613-branch/Source

Cherry-pick r289081. rdar://problem/87163253

Delay writing origin file in NetworkStorageManager
https://bugs.webkit.org/show_bug.cgi?id=235897
rdar://87163253

Reviewed by Geoffrey Garen.

Revert r288924 that delays writing origin file to when OriginStorageManager is destroyed, and take a different
approach that schedules a async task to write origin file. PLT results show that the new approach can also make
up for PLT regresion caused by r286936, where network process started to write origin file before replying sync
storage message from web process.

  • NetworkProcess/storage/NetworkStorageManager.cpp: (WebKit::NetworkStorageManager::localOriginStorageManager):
  • NetworkProcess/storage/OriginStorageManager.cpp: (WebKit::OriginStorageManager::OriginStorageManager): (WebKit::OriginStorageManager::~OriginStorageManager): Deleted.
  • NetworkProcess/storage/OriginStorageManager.h:

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

6:58 PM Changeset in webkit [289347] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r289072. rdar://problem/88439656

[iOS][WP] Add access to required syscalls
https://bugs.webkit.org/show_bug.cgi?id=236087
<rdar://problem/88439656>

Reviewed by Brent Fulgham.

Add access to required syscalls which are rarely used. This is based on recent telemetry.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:

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

6:58 PM Changeset in webkit [289346] by Russell Epstein
  • 7 edits in branches/safari-613-branch/Source

Cherry-pick r289062. rdar://problem/87617695

Crash at com.apple.WebKit: WebKit::RemoteLayerBackingStore::display
https://bugs.webkit.org/show_bug.cgi?id=236003
Source/WebCore:

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-03
Reviewed by Simon Fraser.

  • platform/graphics/GraphicsLayerContentsDisplayDelegate.h: Add a comment not to call PlatformCALayer::setBackingStoreAttached()
  • platform/graphics/cocoa/WebProcessGraphicsContextGLCocoa.mm: Clear the PlatformCALayer contents in more explicit way.

Source/WebKit:

<rdar://87617695>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-03
Reviewed by Simon Fraser.

Using UI-side compositing, following chain would be the cause a crash:
PlatformCALayerRemote::recursiveBuildTransaction
RemoteLayerBackingStore::display
PlatformCALayer::platformCALayerLayerDisplay
WebProcessGraphicsContextGLCocoa.mm DisplayBufferDisplayDelegate::display
PlatformCALayer::setContents(nullptr)

The nullptr contents happens when the WebGL context does not have
display buffer yet or when the display buffer creation would fail.

Setting empty layer contents would destroy the RemoteLayerBackingStore,
even though the callstack is in process of displaying the layer to the
backing store.

When setting PlatformCALayer contents "empty", clear the backing store instead
of removing the backing store.

Tested by LayoutTests/webgl (under ASAN, ios simulator)

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp: (WebKit::PlatformCALayerRemote::setContents):

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

6:57 PM Changeset in webkit [289345] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613-branch

Cherry-pick r289060. rdar://problem/86337125

null ptr deref in RenderTreeBuilder::Block::attachIgnoringContinuation
https://bugs.webkit.org/show_bug.cgi?id=234170

Patch by Frédéric Wang <fwang@igalia.com> on 2022-02-03
Reviewed by Antti Koivisto.

Source/WebCore:

When an element with "display: contents" is put into the top layer, its computed style for
the display property becomes "block" [1]. However, RenderTreeUpdater::updateElementRenderer
does not manage well this transition. In particular, a null ptr deref happens for some
special configuration involving a <dialog style="display: contents">. To work around that
issue, always force tearing down renderers when updating an element in the top layer.

[1] https://fullscreen.spec.whatwg.org/#new-stacking-layer

Test: fast/layers/top-layer-display-contents-crash.html

  • rendering/updating/RenderTreeUpdater.cpp: (WebCore::RenderTreeUpdater::updateElementRenderer): Always force tearing down renderers for top layer element.

LayoutTests:

Add regression test.

  • fast/css/top-layer-display-contents-crash-expected.txt: Added.
  • fast/css/top-layer-display-contents-crash.html: Added.

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

6:57 PM Changeset in webkit [289344] by Russell Epstein
  • 3 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r289052. rdar://problem/88382949

[GPUP] Add read access to sysctl properties
https://bugs.webkit.org/show_bug.cgi?id=236018
<rdar://problem/88382949>

Reviewed by Darin Adler.

Add read access to sysctl properties based on telemetry.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:

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

6:57 PM Changeset in webkit [289343] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r289026. rdar://problem/87358372

Remove debug log accidentally added with r289018
https://bugs.webkit.org/show_bug.cgi?id=236000

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):

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

6:57 PM Changeset in webkit [289342] by Russell Epstein
  • 3 edits in branches/safari-613-branch/Source/JavaScriptCore

Cherry-pick r289024. rdar://problem/88222677

SecureARM64EHashPins should check g_jscConfig.useFastJITPermissions
https://bugs.webkit.org/show_bug.cgi?id=236055
<rdar://88222677>

Reviewed by Mark Lam.

  • assembler/SecureARM64EHashPins.cpp: (JSC::SecureARM64EHashPins::initializeAtStartup): (JSC::SecureARM64EHashPins::allocatePinForCurrentThread): (JSC::SecureARM64EHashPins::deallocatePinForCurrentThread):
  • assembler/SecureARM64EHashPinsInlines.h: (JSC::SecureARM64EHashPins::pinForCurrentThread):

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

6:57 PM Changeset in webkit [289341] by Russell Epstein
  • 5 edits
    1 move
    1 add
    1 delete in branches/safari-613-branch

Cherry-pick r289021. rdar://problem/88599774

CSP: Fix matching wildcard hosts
https://bugs.webkit.org/show_bug.cgi?id=235992

Reviewed by Kate Cheney.

LayoutTests/imported/w3c:

Update expectations.

  • web-platform-tests/content-security-policy/img-src/img-src-full-host-wildcard-blocked.sub-expected.txt:

Source/WebCore:

As per the spec wildcard hosts must include the leading '.' for matches:
https://www.w3.org/TR/CSP3/#match-hosts.

Test: http/tests/security/contentSecurityPolicy/image-full-host-wildcard-blocked.html

  • page/csp/ContentSecurityPolicySource.cpp: (WebCore::ContentSecurityPolicySource::hostMatches const):

LayoutTests:

Rewrite test to expect CSP3 compliant behavior.

  • http/tests/security/contentSecurityPolicy/image-full-host-wildcard-allowed-expected.txt: Removed.
  • http/tests/security/contentSecurityPolicy/image-full-host-wildcard-blocked-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/image-full-host-wildcard-blocked.html: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/image-full-host-wildcard-allowed.html.

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

6:57 PM Changeset in webkit [289340] by Russell Epstein
  • 40 edits
    1 add in branches/safari-613-branch/Source

Cherry-pick r289018. rdar://problem/87358372

Use private relay for all subresources if the main document main resource was loaded using private relay
https://bugs.webkit.org/show_bug.cgi?id=236000
Source/WebCore:

<rdar://87358372>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-02
Reviewed by Brady Eidson.

This can be manually tested using instructions in the radar.

  • loader/DocumentLoader.h: (WebCore::DocumentLoader::setMainResourceWasPrivateRelayed): (WebCore::DocumentLoader::mainResourceWasPrivateRelayed const):

Source/WebCore/PAL:

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-02
Reviewed by Brady Eidson.

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-02
Reviewed by Brady Eidson.

  • NetworkProcess/Downloads/PendingDownload.cpp: (WebKit::PendingDownload::didReceiveResponse):
  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/NetworkCORSPreflightChecker.cpp: (WebKit::NetworkCORSPreflightChecker::didReceiveResponse):
  • NetworkProcess/NetworkCORSPreflightChecker.h:
  • NetworkProcess/NetworkDataTask.cpp: (WebKit::NetworkDataTask::didReceiveResponse):
  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkDataTaskBlob.cpp: (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):
  • NetworkProcess/NetworkLoad.cpp: (WebKit::NetworkLoad::didReceiveResponse): (WebKit::NetworkLoad::notifyDidReceiveResponse):
  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkLoadClient.h:
  • NetworkProcess/NetworkLoadParameters.h:
  • NetworkProcess/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::encode const): (WebKit::NetworkResourceLoadParameters::decode):
  • NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::transferToNewWebProcess): (WebKit::NetworkResourceLoader::didReceiveResponse): (WebKit::NetworkResourceLoader::sendDidReceiveResponsePotentiallyInNewBrowsingContextGroup): (WebKit::NetworkResourceLoader::didFinishWithRedirectResponse): (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/PingLoad.cpp: (WebKit::PingLoad::didReceiveResponse):
  • NetworkProcess/PingLoad.h:
  • NetworkProcess/PreconnectTask.cpp: (WebKit::PreconnectTask::didReceiveResponse):
  • NetworkProcess/PreconnectTask.h:
  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp: (WebKit::ServiceWorkerFetchTask::processResponse):
  • NetworkProcess/ServiceWorker/ServiceWorkerNavigationPreloader.cpp: (WebKit::ServiceWorkerNavigationPreloader::loadWithCacheEntry): (WebKit::ServiceWorkerNavigationPreloader::willSendRedirectedRequest): (WebKit::ServiceWorkerNavigationPreloader::didReceiveResponse):
  • NetworkProcess/ServiceWorker/ServiceWorkerNavigationPreloader.h:
  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp: (WebKit::ServiceWorkerSoftUpdateLoader::didReceiveResponse):
  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: (WebKit::NetworkCache::SpeculativeLoad::didReceiveResponse):
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): (WebKit::NetworkDataTaskCocoa::didReceiveResponse):
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
  • Shared/PrivateRelayed.h: Added.
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::addParametersShared):
  • WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::mainFrameMainResource const): (WebKit::WebResourceLoader::willSendRequest): (WebKit::WebResourceLoader::didReceiveResponse):
  • WebProcess/Network/WebResourceLoader.h:
  • WebProcess/Network/WebResourceLoader.messages.in:

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

6:57 PM Changeset in webkit [289339] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288957. rdar://problem/88300200

[iOS][WP] Add access in sandbox to Mach message
https://bugs.webkit.org/show_bug.cgi?id=236021
<rdar://88300200>

Reviewed by Brent Fulgham.

Add access in sandbox to required Mach message in the WebContent process on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:

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

6:57 PM Changeset in webkit [289338] by Russell Epstein
  • 5 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288949. rdar://problem/88226432

ServiceWorkerNavigationPreloader should only be used once
https://bugs.webkit.org/show_bug.cgi?id=235882
<rdar://88226432>

Reviewed by Chris Dumez.

Source/WebKit:

In case service worker preload is being used and related service worker context crashes (or service worker context sends bad messages),
We can end up in a bad state where we will ask the preload twice for the same response (once for good, and the next one as we go to didNotHandle case).
To prevent this, we add checks in loadResponseFromPreloader and loadBodyFromPreloader.
As part of this investigation, I found out that ServiceWorkerNavigationPreloader is not correctly handling the case of preload responses coming from cache.
In particular, no body will be given since we return early in waitForBody in case the preload network load is null.
Prevent this by making sure waitForBody calls the response completion handler if available, even if the preload network load is null.
And update the response body callback before executing the response completion handler to make sure data received synchronously from the preload is given to the service worker fetch task.

Test: http/wpt/service-workers/fetch-service-worker-preload-cache.https.html

  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
  • NetworkProcess/ServiceWorker/ServiceWorkerNavigationPreloader.cpp:

LayoutTests:

  • http/wpt/service-workers/fetch-service-worker-preload-cache.https-expected.txt: Added.
  • http/wpt/service-workers/fetch-service-worker-preload-cache.https.html: Added.
  • http/wpt/service-workers/resources/fetch-service-worker-preload-script.py:

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

6:57 PM Changeset in webkit [289337] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288933. rdar://problem/87402941

Crash under ScrollingCoordinatorMac::hasNodeWithAnimatedScrollChanged()
https://bugs.webkit.org/show_bug.cgi?id=235989
<rdar://87402941>

Reviewed by Wenson Hsieh.

Crash data suggest that m_scrollingCoordinator can be null in ThreadedScrollingTree::hasNodeWithAnimatedScrollChanged(),
which is true if the scrolling tree keeps ThreadedScrollingTree alive longer than the scrolling coordinator.

As in the other functions in this file, early return if m_scrollingCoordinator is null.

  • page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::hasNodeWithAnimatedScrollChanged):

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

6:57 PM Changeset in webkit [289336] by Russell Epstein
  • 4 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288924. rdar://problem/87163253

Write origin file when OriginStorageManager is destroyed
https://bugs.webkit.org/show_bug.cgi?id=235897
rdar://87163253

Reviewed by Darin Adler.

The first WebStorage message sent from web process to network process is sync, and writing origin file when
creating OriginStorageManager will delay the reply. Since we can get the origin information from in-memory map
when OriginStorageManager is present, we may delay the write to until when OriginStorageManager is destroyed.
This fixes the PLT regression from r286936.

  • NetworkProcess/storage/NetworkStorageManager.cpp: (WebKit::NetworkStorageManager::localOriginStorageManager):
  • NetworkProcess/storage/OriginStorageManager.cpp: (WebKit::OriginStorageManager::OriginStorageManager): (WebKit::OriginStorageManager::~OriginStorageManager):
  • NetworkProcess/storage/OriginStorageManager.h:

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

6:57 PM Changeset in webkit [289335] by Russell Epstein
  • 7 edits in branches/safari-613-branch/Source

Cherry-pick r288922. rdar://problem/88172449

[WP] Remove PostScript conversion code
https://bugs.webkit.org/show_bug.cgi?id=235892
<rdar://88172449>

Reviewed by Tim Horton.

The WebContent process no longer has access to the PostScript conversion service, so there is no need to keep this code.

Source/WebCore:

  • loader/cache/CachedImage.cpp: (WebCore::CachedImage::convertedDataIfNeeded const):
  • platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::convertPostScriptDataToPDF): Deleted.
  • platform/graphics/cg/PDFDocumentImage.h:

Source/WebKit:

  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::pluginInfo): (WebKit::PDFPlugin::streamDidReceiveResponse): (WebKit::PDFPlugin::manualStreamDidReceiveResponse):

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

6:57 PM Changeset in webkit [289334] by Russell Epstein
  • 4 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288898. rdar://problem/87785042

Protect NetworkConnectionToWebProcess::createFetchTask from a null service worker connection
https://bugs.webkit.org/show_bug.cgi?id=235878
<rdar://87785042>

Reviewed by Chris Dumez.

After https://bugs.webkit.org/show_bug.cgi?id=234179, there is no guarantee that we have a SWServer/SWServerConnection per session ID.
This is only guaranteed if there is a corresponding network session.
We add null pointer checks to NetworkConnectionToWebProcess::swConnection() which now returns a pointer.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::createFetchTask): (WebKit::NetworkConnectionToWebProcess::swConnection):
  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp: (WebKit::ServiceWorkerFetchTask::softUpdateIfNeeded):

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

6:57 PM Changeset in webkit [289333] by Russell Epstein
  • 10 edits in branches/safari-613-branch/Source

Cherry-pick r288885. rdar://problem/88591342

Enhance sanitizeStackForVM() to assist with crash analysis.
https://bugs.webkit.org/show_bug.cgi?id=235752
rdar://81014601

Reviewed by Michael Saboff.

Source/JavaScriptCore:

  1. Remove the AssemblyHelpers version of sanitizeStack. Instead, make the 3 JIT operation functions call sanitizeStackForVM() instead. This ensures that sanitizeStack crashes are not obscured as generic JIT crashes.
  1. Add sanity check RELEASE_ASSERTs to VM::setLastStackTop() with a capture of the relevant variables for crash analysis.
  1. Fix logSanitizeStack() so that it no longer relies on vm.topCallFrame. vm.topCallFrame may not be properly initialized at all the places that sanitizeStackForVM() is called.
  1. Add a JSLock check to sanitizeStackForVM(), and return early if not owned by the current thread. If the JSLock is not owned by the current thread, we can't rely on vm.lastStackTop() being a sane value. Hence, it's not possible to do stack sanitization correctly.

Add sanity check RELEASE_ASSERTs to sanitizeStackForVM() with a capture of
the relevant variables for crash analysis.

  • jit/AssemblyHelpers.cpp: (JSC::AssemblyHelpers::sanitizeStackInline): Deleted.
  • jit/AssemblyHelpers.h:
  • jit/JITOperations.cpp: (JSC::JSC_DEFINE_JIT_OPERATION):
  • jit/ThunkGenerators.cpp: (JSC::slowPathFor):
  • runtime/JSLock.cpp: (JSC::JSLock::didAcquireLock): (JSC::JSLock::grabAllLocks):
  • runtime/VM.cpp: (JSC::VM::VM): (JSC::VM::setLastStackTop): (JSC::logSanitizeStack): (JSC::sanitizeStackForVM):
  • runtime/VM.h:

Source/WTF:

  • wtf/Threading.h: (WTF::Thread::savedStackPointerAtVMEntry const): (WTF::Thread::savedLastStackTop const): (WTF::Thread::savedStackPointerAtVMEntry): Deleted. (WTF::Thread::savedLastStackTop): Deleted.

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

6:57 PM Changeset in webkit [289332] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288881. rdar://problem/80246192

Animation from scale(0) has missing backing store
https://bugs.webkit.org/show_bug.cgi?id=227733
<rdar://problem/80246192>

Reviewed by Simon Fraser.

Source/WebCore:

Use the style recorded before we applied animations to this element the last
time we resolved style for keyframes that don't set a value for the "transform"
property.

  • animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::computeExtentOfTransformAnimation const):

LayoutTests:

Add a new test which animates two squares, one on top of each other. The bottom square uses an animation
that has an explicit "from" value of scale(0) and an explicit "to" value of scale(1) and is black. The top
square uses an animation that has an explicit "from" value of scale(0) but no explicit "to" value, thus
animating to scale(1) as well, and is white, matching the background color.

The bug we are fixing is that the square with an implicit "to" value would not yield a visible animation
since we wouldn't account for the scale(1) target value and assuming we're never animating to a non-0
value.

This test assumes that both animations run at the same time and thus the white square will always cover
the black square (which is smaller to ensure no issues at the edges) and yield a completely white page.

  • webanimations/accelerated-transform-animation-from-scale-zero-and-implicit-to-kefyrame-expected.html: Added.
  • webanimations/accelerated-transform-animation-from-scale-zero-and-implicit-to-kefyrame.html: Added.

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

6:56 PM Changeset in webkit [289331] by Russell Epstein
  • 5 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288879. rdar://problem/88322836

[css-cascade] Fix removal of not yet loaded CSS @import
https://bugs.webkit.org/show_bug.cgi?id=235930

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add new test.

  • web-platform-tests/css/css-cascade/import-removal-expected.html: Added.
  • web-platform-tests/css/css-cascade/import-removal.html: Added.

Source/WebCore:

When removing a not yet loaded CSS @import, the hasPendingSheet() flag
was not cleared. This resulted in a completely blank page.
This patch makes sure to cancel the load before deleting the rule.

Test: imported/w3c/web-platform-tests/css/css-cascade/import-removal.html

  • css/StyleRuleImport.cpp: (WebCore::StyleRuleImport::cancelLoad):
  • css/StyleRuleImport.h:
  • css/StyleSheetContents.cpp: (WebCore::StyleSheetContents::wrapperDeleteRule):

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

6:56 PM Changeset in webkit [289330] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288874. rdar://problem/88217815

AX: nullptr crash under AccessibilityRenderObject::computeAccessibilityIsIgnored
https://bugs.webkit.org/show_bug.cgi?id=235945
rdar://88217815

Reviewed by Andres Gonzalez.

This is similar to https://bugs.webkit.org/show_bug.cgi?id=161276.

  • accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):

m_renderer is a WeakPtr and can become null during parentObjectUnignored call, same as
the case below.

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

6:56 PM Changeset in webkit [289329] by Russell Epstein
  • 5 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288867. rdar://problem/86320218

Fix handling of access key events
https://bugs.webkit.org/show_bug.cgi?id=234147
<rdar://problem/86320218>

Reviewed by David Kilzer.

Improve focus handling for HTMLElement-based elements to ensure accessKey events
are properly dispatched.

  • accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::press): Ensure correct object is used after 'accessKeyAction' is invoked.
  • dom/EventDispatcher.cpp: (WebCore::callDefaultEventHandlersInBubblingOrder) Protect element during default event bubbling.
  • html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::reportValidity): Ensure correct element is used after focus event.
  • page/EventHandler.cpp: (WebCore::EventHandler::handleAccessKey): Ensure correct object is used after 'accessKeyAction' is invoked.

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

6:56 PM Changeset in webkit [289328] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/bmalloc

Cherry-pick r288866. rdar://problem/88303899

[libpas] get_num_free_bytes_for_each_heap_callback() is called with arg pointing to uninitialized stack memory
<https://webkit.org/b/235931>
<rdar://problem/88303899>

Reviewed by Yusuke Suzuki.

  • libpas/src/libpas/pas_all_heaps.c: (pas_all_heaps_get_num_free_bytes):
  • Initialize result stack variable to zero.

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

6:56 PM Changeset in webkit [289327] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288864. rdar://problem/87192657

[iOS] Don't register undo actions in undoManager overridden by WKWebView client
https://bugs.webkit.org/show_bug.cgi?id=235928
<rdar://problem/87192657>

Patch by Matt Gilligan <matthew_gilligan@apple.com> on 2022-01-31
Reviewed by Tim Horton.

  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::registerEditCommand): Use -[WKContentView undoManagerForWebView] rather than -undoManager to prevent registering actions in an undo manager overridden by a WKWebView subclass. This ensures that all actions are registered in the same manager. If the client has disabled groupsByEvent on the overridden undoManager, this prevents an exception from being thrown due to registering actions outside of an undo group.

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

6:56 PM Changeset in webkit [289326] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288860. rdar://problem/88584471

[iOS] Clean up some issues in the 'com.apple.WebKit.adattributiond.sb' sandbox
https://bugs.webkit.org/show_bug.cgi?id=235929
<rdar://88081007>

Patch by Brent Fulgham <Brent Fulgham> on 2022-01-31
Reviewed by Alex Christensen.

Revise a few syntax issues in the sandbox.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb:

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

6:56 PM Changeset in webkit [289325] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288848. rdar://problem/86950638

Web Inspector: [Cocoa] Crash in WebKit::WebInspectorUIProxy::attachmentViewDidChange
https://bugs.webkit.org/show_bug.cgi?id=235842

Reviewed by Timothy Hatcher.

Speculatively fix an occasional crash in WebKit::WebInspectorUIProxy::attachmentViewDidChange by ensuring that
the WebInspectorUIProxy still exists before calling attachmentViewDidChange.

Currently we are sometimes crashing while attempting to m_objCAdapter.get(), which is the first use of a
member variable in WebInspectorUIProxy::attachmentViewDidChange. This retain pointer should never be able to
not exists, since it storing nil is a valid state. This points to the WebInspectorUIProxy itself no longer
existing. The fix is to check that we actually have a WebInspectorUIProxy before calling
attachmentViewDidChange. This is also just good practice since WebPageProxy::inspector() is also able to
return nullptr under certain circumstances, and all other calls to it are guarded to check if the
WebInspectorUIProxy is still around first.

  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::setInspectorAttachmentView):

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

6:56 PM Changeset in webkit [289324] by Russell Epstein
  • 4 edits in branches/safari-613-branch/Source

Cherry-pick r288831. rdar://problem/88268450

[iOS] SharePlay is shown prominently for system-provided Share Sheets
https://bugs.webkit.org/show_bug.cgi?id=235895
rdar://88268450

Reviewed by Wenson Hsieh.

Source/WebKit:

Content shared using the Web Share API should not display a SharePlay action.

  • UIProcess/Cocoa/WKShareSheet.mm: (-[WKShareSheet presentWithShareDataArray:inRect:]):

Use -[UIActivityViewController setExcludedActivityTypes:] to ensure
a SharePlay action is not displayed.

Source/WTF:

  • wtf/PlatformHave.h:

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

6:56 PM Changeset in webkit [289323] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288827. rdar://problem/87815745

Source/WebCore:
Changed playbackRate and defaultPlaybackRate from unrestricted double
to double.
https://bugs.webkit.org/show_bug.cgi?id=235174
rdar://problem/87815745

Patch by Takeshi Sone <takeshi.sone@gmail.com> on 2022-01-31
Reviewed by Eric Carlson.

Test: media/video-playbackrate-undefined.html

  • html/HTMLMediaElement.idl:

LayoutTests:
Added a test to verify that setting undefined to video.playbackRate
raises an exception.
https://bugs.webkit.org/show_bug.cgi?id=235174
rdar://problem/87815745

Patch by Takeshi Sone <takeshi.sone@gmail.com> on 2022-01-31
Reviewed by Eric Carlson.

  • media/video-playbackrate-undefined-expected.txt: Added.
  • media/video-playbackrate-undefined.html: Added.

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

6:56 PM Changeset in webkit [289322] by Russell Epstein
  • 3 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288825. rdar://problem/88172449

[WP] Remove PostScript conversion code
https://bugs.webkit.org/show_bug.cgi?id=235892
<rdar://88172449>

Reviewed by Brent Fulgham.

The WebContent process no longer has access to the PostScript conversion service, so there is no need to keep this code.

  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::streamDidFinishLoading): (WebKit::PDFPlugin::manualStreamDidFinishLoading): (WebKit::PDFPlugin::convertPostScriptDataIfNeeded): Deleted.

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

6:56 PM Changeset in webkit [289321] by Russell Epstein
  • 8 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288801. rdar://problem/88186663

(REGRESSION)[IFC][RTL] wpt/css/css-text/white-space/trailing-space-and-text-alignment-rtl-003.html
https://bugs.webkit.org/show_bug.cgi?id=235823
<rdar://problem/88186663>

Reviewed by Antti Koivisto.

Source/WebCore:

Reset the trailing whitespace bidi level before handing them over to visual reordering.
see https://unicode.org/reports/tr9/#L1
"L1. On each line, reset the embedding level of the following characters to the paragraph embedding level:

...
Any sequence of whitespace characters ... at the end of the line."

It ensures that

<div style="width: 2ch; direction: rtl">AB C</div>

and

<div style="direction: rtl">AB </div>

both have the trailing whitespace positioned _visually_ as trailing (and not leading) content.

After the bidi paragraph processing "AB C" gets a uniform bidi level of 2, while "AB " is split into "AB" and " "
with bidi levels of 2 and 1 respectively.
In the latter case, the difference in bidi levels makes the runs flip visually at reordering.
It makes the trailing whitespace "pushed" to the left side of the "AB" making it _visually_ trailing (the content renders as " AB").
However in case of "AB C" with the line breaking position after " ", we would end up with a single run of "AB " with the bidi level of 2.
This run would render as "AB " turning the trailing whitespace into a _visually_ leading whitespace.

In this patch we ensure that the trailing (non-collapsible) whitespace runs

  1. are detached from their adjoining non-whitespace text runs and
  2. they get their bidi levels reset

Test: fast/text/rtl-pre-wrap-hanging-offset.html

  • layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp: (WebCore::Layout::InlineDisplayLineBuilder::build const):

LayoutTests:

  • fast/text/rtl-pre-wrap-hanging-offset-expected.html: Added.
  • fast/text/rtl-pre-wrap-hanging-offset.html: Added.

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

6:56 PM Changeset in webkit [289320] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288800. rdar://problem/88241513

[LFC][IFC] Do not break content at an inline box boundary
https://bugs.webkit.org/show_bug.cgi?id=235868

Reviewed by Antti Koivisto.

Source/WebCore:

Handle nested inline boxes, when the breaking position is between at an inline box boundary.
e.g.

<div style="width: 1px"><span><span><span>this_content_overflow</span></span></span></div>

while the breaking position is between the 3rd <span> and the letter 't', we should not let the first
line have all the <span><span><span> content only, but instead find a more reasonable breaking position by
looking at the previous runs.
This patch expands "findTrailingRunIndex" to find multiple, subsequent (nested) inline boxes.

Test: fast/inline/nested-inline-box-with-word-break.html

  • layout/formattingContexts/inline/InlineContentBreaker.cpp: (WebCore::Layout::findTrailingRunIndex):

LayoutTests:

  • fast/inline/nested-inline-box-with-word-break-expected.html: Added.
  • fast/inline/nested-inline-box-with-word-break.html: Added.

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

6:56 PM Changeset in webkit [289319] by Russell Epstein
  • 12 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288789. rdar://problem/88043325

Capturing WebGL canvas through peer connection shows the image flipped
https://bugs.webkit.org/show_bug.cgi?id=235600
<rdar://problem/88043325>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-01-29
Reviewed by Dean Jackson.

Source/WebCore:

Mirror and rotate the WebGL image at the source since WebRTC
does not support mirroring.

Test: webrtc/canvas-to-peer-connection.html

  • platform/graphics/cocoa/GraphicsContextGLCocoa.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm: (WebCore::GraphicsContextGLCocoa::paintCompositedResultsToMediaSample):
  • platform/graphics/cocoa/IOSurface.h:
  • platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::setOwnershipIdentity):
  • platform/graphics/cv/CVUtilities.h:
  • platform/graphics/cv/CVUtilities.mm: (WebCore::setOwnershipIdentityForCVPixelBuffer):

LayoutTests:

Test sending WebGL image through a peer connection to a local video
and assert that the image is as drawn.

  • platform/glib/TestExpectations:
  • webrtc/canvas-to-peer-connection-expected.txt: Added.
  • webrtc/canvas-to-peer-connection.html: Added.
  • webrtc/routines.js:
  • webrtc/video-replace-track.html:

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

6:56 PM Changeset in webkit [289318] by Russell Epstein
  • 7 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288783. rdar://problem/88052073

REGRESSION(r281687): Space widths have synthetic bold applied to them in the fast text codepath but not the complex text codepath
https://bugs.webkit.org/show_bug.cgi?id=235755
<rdar://problem/88052073>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-fonts/synthetic-bold-space-width-expected.html: Added.
  • web-platform-tests/css/css-fonts/synthetic-bold-space-width.html: Added.

Source/WebCore:

r281687 made Font::widthForGlyph() return the non-synthetically-expanded width,
instead of the synthetically-expanded width.

I think this is philosophically correct, because Font::widthForGlyph() is called before shaping,
and shaping requires the original width. If some custom code is asking for the width of specific
characters without going through WidthIterator or ComplexTextController, that code needs to
determine whether or not it's going to run shaping, and thus when it should be adding in the
synthetic offset.

adjustGlyphsAndAdvances() used to subtract out the synthetic offset because it was expecting
Font::widthForGlyph() to return the already-expanded width. So, the solution is just stop subtracting
the offset, because it hasn't been applied in the first place.

Test: imported/w3c/web-platform-tests/css/css-fonts/synthetic-bold-space-width.html

  • platform/graphics/ComplexTextController.cpp: (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
  • platform/graphics/Font.h:

LayoutTests:

  • platform/mac/fast/text/atsui-multiple-renderers-expected.txt:

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

6:56 PM Changeset in webkit [289317] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288776. rdar://problem/88214729

[macOS][WP] Temporarily add syscall to sandbox
https://bugs.webkit.org/show_bug.cgi?id=235841
<rdar://88197549>

Reviewed by Brent Fulgham.

Temporarily add syscall to sandbox in the WebContent process on macOS. This can be removed when <rdar://88210738> is fixed.

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

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

6:56 PM Changeset in webkit [289316] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288754. rdar://problem/88035818

Ensure session is added in network process when it creates connection to web process
https://bugs.webkit.org/show_bug.cgi?id=235754

Reviewed by Chris Dumez.

In NetworkProcess::CreateNetworkConnectionToWebProcess, if the session that web process is using is not added
yet, WorkQueueMessageReceiver cannot be added to the connection and storage messages will be dropped. Usually
session is added in NetworkProcess::AddWebsiteDataStore, which is sent from UI process before
NetworkProcess::CreateNetworkConnectionToWebProcess; but CreateNetworkConnectionToWebProcess message has
DispatchMessageEvenWhenWaitingForSyncReply flag set, so it might get processed earlier.

To fix the issue, now we send set DispatchMessageEvenWhenWaitingForSyncReply flag on AddWebsiteDataStore message
too, so it's processed before CreateNetworkConnectionToWebProcess.

  • UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::addSession):

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

6:56 PM Changeset in webkit [289315] by Russell Epstein
  • 3 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288711. rdar://problem/88160246

[iOS][macOS] Removed unneeded telemetry
https://bugs.webkit.org/show_bug.cgi?id=235742

Reviewed by Darin Adler.

Remove some telemetry we have sufficient data for.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:

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

6:55 PM Changeset in webkit [289314] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WTF

Cherry-pick r288706. rdar://problem/88152385

Change version number for HAVE_PASSKIT_DEFAULT_SHIPPING_METHOD
https://bugs.webkit.org/show_bug.cgi?id=235732
<rdar://problem/88152385>

Reviewed by Wenson Hsieh.

  • wtf/PlatformHave.h:

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

6:55 PM Changeset in webkit [289313] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288659. rdar://problem/88593390

Unreviewed, reverting r288614.

Caused layout test crashes

Reverted changeset:

"REGRESSION(r287684) speedtest.net uses many GB of memory"
https://bugs.webkit.org/show_bug.cgi?id=235615
https://commits.webkit.org/r288614

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

6:55 PM Changeset in webkit [289312] by Russell Epstein
  • 20 edits in branches/safari-613-branch

Cherry-pick r288631. rdar://problem/88020080

Unreviewed, revert r286855 as it caused form submission issues
https://bugs.webkit.org/show_bug.cgi?id=235645
<rdar://88020080>

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valid-expected.txt:
  • web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valueMissing-expected.txt:
  • web-platform-tests/html/semantics/forms/the-input-element/radio-expected.txt:

Source/WebCore:

  • html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setChecked): (WebCore::HTMLInputElement::didChangeForm): (WebCore::HTMLInputElement::insertedIntoAncestor): (WebCore::HTMLInputElement::removedFromAncestor): (WebCore::HTMLInputElement::checkedRadioButtonForGroup const):
  • html/InputType.h: (WebCore::InputType::willUpdateCheckedness): Deleted.
  • html/RadioInputType.cpp: (WebCore::RadioInputType::valueMissing const): (WebCore::RadioInputType::willUpdateCheckedness): Deleted.
  • html/RadioInputType.h:

LayoutTests:

  • fast/forms/radio/ValidityState-valueMissing-radio-expected.txt:
  • fast/forms/radio/ValidityState-valueMissing-radio.html:
  • fast/forms/radio/radio-live-validation-style-expected.txt:
  • fast/forms/radio/radio-live-validation-style.html:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valid-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valueMissing-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valid-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valueMissing-expected.txt:

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

6:55 PM Changeset in webkit [289311] by Russell Epstein
  • 4 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288620. rdar://problem/87771490

[MacOS] Set kAudioOutputUnitProperty_CurrentDevice on CoreAudioSharedUnit outputBus
https://bugs.webkit.org/show_bug.cgi?id=235632
<rdar://87771490>

Reviewed by Eric Carlson.

When VPIO is used for rendering audio, it is not always updating the audio route when system default speaker is updated.
While it is doing so when capturing using the built-in microphone, it is not doing so with BT microphones.

To make it reliable, we are now setting kAudioOutputUnitProperty_CurrentDevice on the output bus to the default output device.
Whenever we detect a change of default output device, we reconfigure the audio unit to select the new default output device.

Manually tested.

  • platform/mediastream/mac/BaseAudioSharedUnit.cpp: (WebCore::BaseAudioSharedUnit::devicesChanged):
  • platform/mediastream/mac/BaseAudioSharedUnit.h: (WebCore::BaseAudioSharedUnit::setOutputDeviceID): (WebCore::BaseAudioSharedUnit::validateOutputDevice):
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp: (WebCore::CoreAudioSharedUnit::setupAudioUnit): (WebCore::CoreAudioSharedUnit::validateOutputDevice):

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

6:55 PM Changeset in webkit [289310] by Russell Epstein
  • 3 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288617. rdar://problem/88046988

ASSERTION FAILED: !hasPendingSheets() under WebCore::Style::Scope::~Scope()
https://bugs.webkit.org/show_bug.cgi?id=235612
<rdar://problem/88046988>

Reviewed by Alan Bujtas.

  • dom/Document.cpp: (WebCore::Document::didRemoveAllPendingStylesheet):

Don't try to scroll to anchor if we don't have a view. This avoids hitting ASSERT(!m_inRemovedLastRefFunction)
trying to ref the document during teardown (with refererencing node count still non-zero).

  • dom/InlineStyleSheetOwner.cpp: (WebCore::InlineStyleSheetOwner::removedFromDocument):

Ensure we always remove the Element from the pending sheet list when it is removed from the document.

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

6:55 PM Changeset in webkit [289309] by Russell Epstein
  • 12 edits in branches/safari-613-branch

Cherry-pick r288605. rdar://problem/87948317

REGRESSION (iOS 15.2): Loading gets stuck after back-navigation involving COOP header
https://bugs.webkit.org/show_bug.cgi?id=235475
<rdar://problem/87948317>

Reviewed by Geoffrey Garen.

Source/WebCore:

Make sure ShouldTreatAsContinuingLoad is properly propagated for back/forward navigations,
not just regular loadRequests.

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::loadWithNavigationAction): (WebCore::FrameLoader::loadPostRequest): (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): (WebCore::FrameLoader::loadDifferentDocumentItem):
  • loader/FrameLoader.h:

Source/WebKit:

WebPageProxy::continueNavigationInNewProcess() was failing to pass the identifier of the
NetworkResourceLoader that needs to be resumed to ProvisionalPageProxy::goToBackForwardItem().
It was only passing it to ProvisionalPageProxy::loadRequest(), which is used for non-back/forward
navigations. As a result, in case of COOP process-swap on back/forward navigation, the network
process would start a fresh load instead of resuming the existing one. The fresh load would get
a COOP header and thus trigger yet another process swap (and so on in a loop).

Also fix an issue where ProvisionalPageProxy::goToBackForwardItem() would always use
ShouldTreatAsContinuingLoad::YesAfterNavigationPolicyDecision even in the case of a COOP
process-swap. In the case of a COOP process-swap, we should pass in
ShouldTreatAsContinuingLoad::YesAfterProvisionalLoadStarted. This was causing us to
do an extra call to didStartProvisionalLoad() and was causing the new API test to hit
an assertion on debug builds.

Covered by new API test.

  • UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::goToBackForwardItem):
  • UIProcess/ProvisionalPageProxy.h:
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::launchProcessForReload): (WebKit::WebPageProxy::goToBackForwardItem): (WebKit::WebPageProxy::continueNavigationInNewProcess): (WebKit::WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation):
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::loadRequest): (WebKit::WebPage::loadData): (WebKit::WebPage::goToBackForwardItem):
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

6:55 PM Changeset in webkit [289308] by Russell Epstein
  • 16 edits in branches/safari-613-branch

Cherry-pick r288590. rdar://problem/87984277

Disable input-security CSS property
https://bugs.webkit.org/show_bug.cgi?id=235557
rdar://87984277

Reviewed by Dean Jackson.

Source/WebCore:

CSSWG is planning to remove input-security from CSS UI 4
(https://github.com/w3c/csswg-drafts/issues/6788).

Keep the property around as an experimental feature, so that
it can be used in the UA stylesheet, and easily turned on if the
resolution is not finalized.

  • css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
  • css/CSSProperties.json:
  • css/parser/CSSParserContext.cpp: (WebCore::CSSParserContext::CSSParserContext):

Enable input-security when parsing the UA stylesheet, as it is used to
obscure text in password inputs.

(WebCore::operator==):
(WebCore::add):
(WebCore::CSSParserContext::isPropertyRuntimeDisabled const):

  • css/parser/CSSParserContext.h:
  • css/parser/CSSParserFastPaths.cpp: (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

Source/WebKitLegacy/win:

Add support for tests enabling the CSSInputSecurityEnabled preference.

  • WebPreferences.cpp: (WebPreferences::cssInputSecurityEnabled):
  • WebPreferences.h:
  • WebView.cpp: (WebView::notifyPreferencesChanged):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Make input-security a disabled-by-default experimental feature.

Tools:

  • DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::defaults):

Add default for WebKitLegacy on Windows.

LayoutTests:

  • fast/css/computed-text-security-for-input-security.html:

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

6:55 PM Changeset in webkit [289307] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288586. rdar://problem/87994712

[macOS] Observe CFNetwork preference domain
https://bugs.webkit.org/show_bug.cgi?id=235603
<rdar://87994712>

Reviewed by Darin Adler.

Since the Networking process is now using CF prefs direct mode, the CFNetwork preference domain should be observed for changes.

  • UIProcess/Cocoa/PreferenceObserver.mm: (-[WKPreferenceObserver init]):

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

6:55 PM Changeset in webkit [289306] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288564. rdar://problem/87268956

REGRESSION(r281419): iCloud.com Notes web app fonts render incorrectly
https://bugs.webkit.org/show_bug.cgi?id=235559
<rdar://problem/87268956>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character-expected.txt: Added.
  • web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character.html: Added.

Source/WebCore:

Chrome and Firefox render U+0000 NULL as invisible. We should do the same, despite it technically being classified as a control character.

https://github.com/w3c/csswg-drafts/pull/6983

Test: imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character.html

  • platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::applyCSSVisibilityRules):

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

6:55 PM Changeset in webkit [289305] by Russell Epstein
  • 4 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288553. rdar://problem/87976757

Missing EnabledBySetting=WebXREnabled where Conditional=WEBXR exists
https://bugs.webkit.org/show_bug.cgi?id=235527

Reviewed by Darin Adler.

Manually tested.

  • Modules/webxr/XRFrameRequestCallback.idl:
  • html/canvas/WebGLContextAttributes.idl:
  • html/canvas/WebGLRenderingContextBase.idl:

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

6:55 PM Changeset in webkit [289304] by Russell Epstein
  • 3 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288549. rdar://problem/86452550

Unreviewed, reverting r282374.
https://bugs.webkit.org/show_bug.cgi?id=235587

Introduced perf regression

Reverted changeset:

"Playback stops although the progress bar moves"
https://bugs.webkit.org/show_bug.cgi?id=230210
https://commits.webkit.org/r282374

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

6:55 PM Changeset in webkit [289303] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288547. rdar://problem/87824766

(REGRESSION r287485) [LFC][IFC] Incorrect RTL content position when intrusive float is present
https://bugs.webkit.org/show_bug.cgi?id=235547
<rdar://87824766>

Reviewed by Antti Koivisto.

Source/WebCore:

The float box coordinates are always visual. They need to be converted to
logical to be able to properly constrain the available space on the current line.

Test: fast/inline/intrusive-float-with-rtl-content.html

  • layout/formattingContexts/inline/InlineLineBuilder.cpp: (WebCore::Layout::LineBuilder::floatConstraints const):

LayoutTests:

  • fast/inline/intrusive-float-with-rtl-content-expected.html: Added.
  • fast/inline/intrusive-float-with-rtl-content.html: Added.

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

6:55 PM Changeset in webkit [289302] by Russell Epstein
  • 5 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288543. rdar://problem/84958961

REGRESSION(r282320): [Cocoa] User-installed fonts don't work in the GPU Process (in WKWebView)
https://bugs.webkit.org/show_bug.cgi?id=235449
<rdar://problem/84958961>

Reviewed by Darin Adler.

Source/WebCore/PAL:

  • pal/spi/cf/CoreTextSPI.h:

Source/WebKit:

The reason for this bug was I was misusing kCTFontOptionsSystemUIFont. I thought this flag just
meant "allow the creation of system fonts" but it turns out it means something more subtle than
that. Instead of unconditionally specifying this flag, we should just pull out the options field
from the source font (which will include that flag if the font was a system font) and use that
instead.

Test: fast/text/user-installed-canvas.html

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: (IPC::ArgumentCoder<Ref<WebCore::Font>>::encodePlatformData): (IPC::createCTFont): (IPC::ArgumentCoder<Ref<WebCore::Font>>::decodePlatformData):

LayoutTests:

  • fast/text/user-installed-canvas-expected.html: Added.
  • fast/text/user-installed-canvas.html: Added.

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

6:55 PM Changeset in webkit [289301] by Russell Epstein
  • 3 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288539. rdar://problem/87986840

Expand RefPtr / Ref use in FrameLoader
https://bugs.webkit.org/show_bug.cgi?id=235551
rdar://87986840

Reviewed by Mark Lam.

Apply Ref / RefPtr instead of taking SerializedScriptValue*.

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::loadInSameDocument): (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
  • loader/FrameLoader.h:

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

6:55 PM Changeset in webkit [289300] by Russell Epstein
  • 5 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288536. rdar://problem/87981122

REGRESSION (r286932): Fixed position elements jiggle sometimes (Twitter, Facebook)
https://bugs.webkit.org/show_bug.cgi?id=235543
<rdar://87981122>

Reviewed by Tim Horton.

In r286932 we ensure that the scrolling layer's position gets committed in the scrolling
thread to reduce stutters. However, we also have to do the same for fixed and sticky
layers, because they need to committed in synchrony with the scrolling layer.

Also change some 'override' to 'final' and add locking annotations.

  • page/scrolling/cocoa/ScrollingTreeFixedNode.h:
  • page/scrolling/cocoa/ScrollingTreeFixedNode.mm: (WebCore::ScrollingTreeFixedNode::applyLayerPositions):
  • page/scrolling/cocoa/ScrollingTreeStickyNodeCocoa.h:
  • page/scrolling/cocoa/ScrollingTreeStickyNodeCocoa.mm: (WebCore::ScrollingTreeStickyNodeCocoa::applyLayerPositions):

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

6:54 PM Changeset in webkit [289299] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288493. rdar://problem/82554226

REGRESSION (iOS 15): HTMLAudioElement fails to load new audio when device is locked or safari is in background
https://bugs.webkit.org/show_bug.cgi?id=229688
<rdar://problem/82554226>

Unreviewed, adress post-review feedback.

  • platform/audio/cocoa/MediaSessionManagerCocoa.mm: (WebCore::MediaSessionManagerCocoa::updateSessionState):

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

6:54 PM Changeset in webkit [289298] by Russell Epstein
  • 4 edits in branches/safari-613-branch

Cherry-pick r288478. rdar://problem/72567903

Regression (r286936): SessionStorage data is not cleared when deleting website data by modification time
https://bugs.webkit.org/show_bug.cgi?id=235542

Reviewed by Chris Dumez.

Source/WebKit:

The old behavior before r286936 is to delete SessionStorage data regardless of the modifiedSince parameter.
r286936 made it check modifiedSince and perform deleteion when modifiedSince time is -Walltime::infinity. This
patch corrects it by deleting SessionStorage data when modifiedSince time is in the past.

API test: SessionStorage.ClearByModificationTime

  • NetworkProcess/storage/OriginStorageManager.cpp: (WebKit::OriginStorageManager::StorageBucket::deleteData):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SessionStorage.mm: (TEST):

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

6:54 PM Changeset in webkit [289297] by Russell Epstein
  • 9 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288466. rdar://problem/82554226

REGRESSION (iOS 15): HTMLAudioElement fails to load new audio when device is locked or safari is in background
https://bugs.webkit.org/show_bug.cgi?id=229688
<rdar://problem/82554226>

Reviewed by Jer Noble.
Source/WebCore:

An iOS application loses its NowPlaying status as soon as the AudioSession category
is set to Ambient, and it can only get it back again by changing the category
to Playback *and* starting playback. When an application is in the background, however,
it can't start playback unless it *already* has NowPlaying status. So, ipso facto,
background playback will always fail once the category is set to Ambient.

If an AudioSession's category is set to Playback when it is activated, it will
interrupt another application playing audio, activate Bluetooth routes, etc.
This means WebKit has to relinquish Playback when a page is unable to produce audio
because AVFoundation automatically activates the audio session when playback starts

  • even if the AVPlayer is muted or has no audio.

To allow pages that were playing audio when WebKit went into the background to
continue to play after switching urls or activating another media element, add a
grace period when switch from Playback to Ambient.

Test: media/audio-session-category.html

  • platform/audio/cocoa/MediaSessionManagerCocoa.mm: (WebCore::MediaSessionManagerCocoa::updateSessionState):

Source/WebKit:

  • WebProcess/GPU/media/RemoteAudioSession.cpp: (WebKit::RemoteAudioSession::category const): Return the most recently set category on all platforms so it is possible to test.

LayoutTests:

  • fast/mediasession/metadata/audio-track-enabled.html: Wait longer for the audio session category to be reset.
  • media/audio-session-category-expected.txt: Added.
  • media/audio-session-category.html: Added.
  • platform/gtk/TestExpectations: Skip new test.
  • platform/mac-wk1/TestExpectations: Skip new test, MediaStream isn't supported on WK1.

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

6:54 PM Changeset in webkit [289296] by Russell Epstein
  • 9 edits in branches/safari-613-branch/Source/ThirdParty/libwebrtc

Cherry-pick r288464. rdar://problem/87884184

Cherry-pick WebRTC 235826 change
https://bugs.webkit.org/show_bug.cgi?id=235510
<rdar://87884184>

Reviewed by Eric Carlson.

Cherry-picking above fixing for compliance.

  • Source/webrtc/media/engine/webrtc_media_engine.cc:
  • Source/webrtc/media/engine/webrtc_media_engine.h:
  • Source/webrtc/media/engine/webrtc_media_engine_unittest.cc:
  • Source/webrtc/media/engine/webrtc_video_engine.cc:
  • Source/webrtc/media/engine/webrtc_video_engine.h:
  • Source/webrtc/media/engine/webrtc_voice_engine.cc:
  • Source/webrtc/modules/rtp_rtcp/source/rtp_header_extension_map.cc:
  • Source/webrtc/modules/rtp_rtcp/source/rtp_header_extension_map_unittest.cc:

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

6:54 PM Changeset in webkit [289295] by Russell Epstein
  • 5 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288463. rdar://problem/87977499

file.stream() is slow and CPU-bound
https://bugs.webkit.org/show_bug.cgi?id=235448

Reviewed by Alex Christensen.

We introduce a ReadAsBinaryChunks mode to prevent storing the whole file in memory.
Use this in Blob stream implementation.
The new implementation is much faster for big files given it does not need to keep in memory the whole file.
Covered by existing tests.

  • fileapi/Blob.cpp:
  • fileapi/FileReaderLoader.cpp:
  • fileapi/FileReaderLoader.h:
  • fileapi/FileReaderLoaderClient.h:

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

6:54 PM Changeset in webkit [289294] by Russell Epstein
  • 3 edits in branches/safari-613-branch/Source/ThirdParty/libwebrtc

Cherry-pick r288461. rdar://problem/87969456

Reject large number of WebRTC audio channels
https://bugs.webkit.org/show_bug.cgi?id=235511

Reviewed by Eric Carlson.

Cherry-picking WebRTC upstream fix for compliance.

  • Source/webrtc/pc/webrtc_sdp.cc:
  • Source/webrtc/pc/webrtc_sdp_unittest.cc:

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

6:54 PM Changeset in webkit [289293] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288439. rdar://problem/88592095

Reconfiguring the CoreAudioSharedUnit should take into account that there is a speaker sample producer
https://bugs.webkit.org/show_bug.cgi?id=235397
<rdar://problem/87819949>

Reviewed by Eric Carlson and Geoff Garen.

Address post-commit comments.
Introduce a boolean to make high priority thread callbacks no-ops when reconfiguring the audio unit.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

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

6:54 PM Changeset in webkit [289292] by Russell Epstein
  • 12 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288387. rdar://problem/87468788

Inject Launch Services database before NSApplication is initialized
https://bugs.webkit.org/show_bug.cgi?id=235186
<rdar://87468788>

Reviewed by Chris Dumez.

To avoid the main thread getting stuck, the Launch Services database should be injected before NSApplication
is initialized, since the initialization now depends on the database. To make sure also prewarmed WebContent
processes are receiving the Launch Services database, the WebsiteDataStore method
sendNetworkProcessXPCEndpointToProcess is moved to the class NetworkProcessProxy, since prewarmed processes
will not have a data store initially. This allows us to simplify the code, since we are no longer depending
on having a Website data store before sending the XPC endpoint.

  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didFinishLaunching):
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::sendNetworkProcessXPCEndpointToProcess): (WebKit::WebsiteDataStore::sendNetworkProcessXPCEndpointToProcess const): Deleted.
  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm: (WebKit::WebPage::platformDidReceiveLoadParameters):
  • WebProcess/cocoa/LaunchServicesDatabaseManager.h:
  • WebProcess/cocoa/LaunchServicesDatabaseManager.mm: (WebKit::LaunchServicesDatabaseManager::waitForDatabaseUpdate):
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):

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

6:54 PM Changeset in webkit [289291] by Russell Epstein
  • 6 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288362. rdar://problem/87832940

WPT version of css/css-cascade/parsing/layer-import-parsing.html crashes with nullptr
https://bugs.webkit.org/show_bug.cgi?id=235434
rdar://87832940

Reviewed by Alan Bujtas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/parsing/layer-import-parsing.html:

Update to WPT version.

Source/WebCore:

Test: fast/css/insert-import-rule-crash.html

  • css/StyleRuleImport.cpp: (WebCore::StyleRuleImport::setCSSStyleSheet):

Null check the parent stylesheet. It can be null if the rule has been removed.

  • dom/InlineStyleSheetOwner.cpp: (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):

Also fix a debug assert in addPendingSheet, this can get called multiple times.

LayoutTests:

  • fast/css/insert-import-rule-crash-expected.txt: Added.
  • fast/css/insert-import-rule-crash.html: Added.

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

6:54 PM Changeset in webkit [289290] by Russell Epstein
  • 13 edits in branches/safari-613-branch/Source/bmalloc

Cherry-pick r288342. rdar://problem/87249133

[libpas] medium directory lookup should bail if begin_index is zero to catch races with expendable memory decommit (cherry pick 434465bfb8e0c285d6763cf6aa0e04982199f824)
https://bugs.webkit.org/show_bug.cgi?id=235280

Reviewed by Yusuke Suzuki.

I've been seeing crashes in pas_segregated_heap_ensure_allocator_index where the directory that is
passed to the function doesn't match the size. The most likely reason why this is happening is that
the medium directory lookup raced with expendable memory decommit and returned the wrong directory.
To figure out how this happens, I added a bunch of tests to ExpendableMemoryTests. This change
includes various small fixes (like removing assertions) that were found by doing such testing, and it
also includes a test and a change that I think exactly catches what is going on:

  • Expendable memory is decommitted so that the medium lookup sees begin_index == 0, but end_index still has its original value. This will cause it to return a tuple that is for a too-large size class.
  • Some other thread rematerializes the expendable memory right after the medium lookup finishes, but before it loads the directory.
  • The medium lookup finally loads the directory from the tuple, and now sees a non-NULL directory, so it thinks that everything is fine.

This race barely "works" since:

  • Any other field in the medium tuple being zero would cause the medium lookup to fail, which would then cause a slow path that rematerializes expendable memory under a lock.
  • Rematerialization of expendable memory adjusts the mutation count, so this race would only go undetected if the rematerialization happened after the medium lookup search but before when the medium lookup loads the directory.

The solution is to just have the medium lookup fail if begin_index == 0. Begin_index can never
legitimately be zero, because there's no way that a size class would want to be responsible for both
index 0 (i.e. the zero-byte object) and objects big enough to require medium lookup.

This adds new tests. While running those new tests, I found and fixed two other bugs:

  • Recomputation of the index_to_small_allocator_index table subtly mishandles the cached_index case. Previously, it was only special-casing it only when the directory was not participating in lookup tables at all, but actually it needs to special-case it anytime that the directory doesn't otherwise think that it should set the entry at cached_index.
  • Expendable memory commit/decommit was playing fast-and-loose with version numbers. This fixes it so that there is a global monotonically increasing version number.
  • libpas/src/libpas/bmalloc_heap.c: (bmalloc_flex_heap_ref_get_heap): (bmalloc_auxiliary_heap_ref_get_heap): (bmalloc_get_heap):
  • libpas/src/libpas/bmalloc_heap.h:
  • libpas/src/libpas/pas_expendable_memory.c: (pas_expendable_memory_state_version_next): (pas_expendable_memory_construct): (pas_expendable_memory_commit_if_necessary): (scavenge_impl): (pas_expendable_memory_scavenge):
  • libpas/src/libpas/pas_expendable_memory.h:
  • libpas/src/libpas/pas_scavenger.c: (handle_expendable_memory): (scavenger_thread_main): (pas_scavenger_decommit_expendable_memory): (pas_scavenger_fake_decommit_expendable_memory):
  • libpas/src/libpas/pas_scavenger.h:
  • libpas/src/libpas/pas_segregated_heap.c: (medium_directory_tuple_for_index_impl): (pas_segregated_heap_medium_directory_tuple_for_index): (pas_segregated_heap_medium_allocator_index_for_index): (recompute_size_lookup): (rematerialize_size_lookup_set_medium_directory_tuple): (pas_segregated_heap_ensure_allocator_index): (check_size_lookup_recomputation_set_medium_directory_tuple): (check_size_lookup_recomputation_dump_directory): (check_size_lookup_recomputation): (check_size_lookup_recomputation_if_appropriate): (pas_segregated_heap_ensure_size_directory_for_size):
  • libpas/src/libpas/pas_segregated_heap.h:
  • libpas/src/libpas/pas_segregated_size_directory.h: (pas_segregated_size_directory_get_tlc_allocator_index):
  • libpas/src/libpas/pas_try_allocate_primitive.h: (pas_try_allocate_primitive_impl_casual_case): (pas_try_allocate_primitive_impl_inline_only):
  • libpas/src/test/ExpendableMemoryTests.cpp: (std::testRage): (std::testRematerializeAfterSearchOfDecommitted): (std::testBasicSizeClass): (addExpendableMemoryTests):
  • libpas/src/test/TestHarness.cpp: (RuntimeConfigTestScope::RuntimeConfigTestScope):

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

6:54 PM Changeset in webkit [289289] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288327. rdar://problem/87423185

[macOS] Various tests hit debug assertions under SearchBuffer::search after system ICU changes
https://bugs.webkit.org/show_bug.cgi?id=235413
rdar://87423185

Reviewed by Darin Adler.

After upgrading the system ICU version to ICU 70, many layout tests that attempt to use TextIterator on macOS
(e.g. tests in accessibility/mac) hit debug assertions underneath WebCore::SearchBuffer::search; this is
because ICU now emits U_USING_DEFAULT_WARNING as the error code when calling usearch_next(), instead of
U_ZERO_ERROR, like it did in previous versions.

This warning is propagated due to ICU falling back to the root locale (kRootLocaleName) when creating an
icu::BreakIterator, and appears to be benign. We can address this by relaxing the debug assertion in this
method to just check that the error code indicates success (i.e. "warning, or no error"), rather than strictly
being equal to U_ZERO_ERROR.

  • editing/TextIterator.cpp: (WebCore::SearchBuffer::search):

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

6:54 PM Changeset in webkit [289288] by Russell Epstein
  • 5 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288296. rdar://problem/88593227

Disable fallback path to WebRTC platform sockets
https://bugs.webkit.org/show_bug.cgi?id=235402

Reviewed by Eric Carlson.

We should not fallback to the legacy WebRTC socket code path in Cocoa ports.
Instead, if we cannot create the corresponding sockets (in case of ssltcp candidates for instance),
we mark the socket as closed.
Minor refactoring to show that NetworkRTCUDPSocketCocoa code path should always be successful.

Manually tested on meet.google.com which can make use of ssltcp candidates.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:
  • NetworkProcess/webrtc/NetworkRTCProvider.h:
  • NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm:
  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm:

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

6:54 PM Changeset in webkit [289287] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288233. rdar://problem/87781796

Add visibility: visible to modal dialogs in UA sheet
https://bugs.webkit.org/show_bug.cgi?id=235369

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden.html: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-visibility-hidden.html

  • css/dialog.css: (dialog:-internal-modal-dialog):

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

6:54 PM Changeset in webkit [289286] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288223. rdar://problem/87741289

Assertion is not acquired in network process when setting database journal mode
https://bugs.webkit.org/show_bug.cgi?id=235340

Setting database journal mode requires lock, so network process needs to stay active by holding assertion.

Reviewed by Chris Dumez.

  • platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::useWALJournalMode):

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

6:54 PM Changeset in webkit [289285] by Russell Epstein
  • 2 edits in branches/safari-613-branch/JSTests

Cherry-pick r288213. rdar://problem/87538657

Unreviewed, skip new test max-typed-array-length-toString.js when memory-limited
https://bugs.webkit.org/show_bug.cgi?id=235217

Patch by Michael Catanzaro <Michael Catanzaro> on 2022-01-19

  • stress/max-typed-array-length-toString.js:

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

6:54 PM Changeset in webkit [289284] by Russell Epstein
  • 4 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288196. rdar://problem/87768936

[:has() pseudo-class] Compute specificity correctly
https://bugs.webkit.org/show_bug.cgi?id=235351

Reviewed by Alexey Shvayka.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/has-complexity.html:

Fix specificity used in this test.

  • web-platform-tests/css/selectors/has-specificity-expected.txt: Added.
  • web-platform-tests/css/selectors/has-specificity.html: Added.

Source/WebCore:

"The specificity of an ':is()', ':not()', or ':has()' pseudo-class is replaced by
the specificity of the most specific complex selector in its selector list argument."

https://www.w3.org/TR/selectors-4/#specificity-rules

Test: imported/w3c/web-platform-tests/css/selectors/has-specificity.html

  • css/CSSSelector.cpp: (WebCore::simpleSelectorSpecificityInternal):

Compute :has() specificity like :is() and :not().

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

6:53 PM Changeset in webkit [289283] by Russell Epstein
  • 9 edits in branches/safari-613-branch/Source

Cherry-pick r288185. rdar://problem/87709485

[Cocoa] Do not change preferred AudioSession buffer size when VPIO is running
https://bugs.webkit.org/show_bug.cgi?id=235317
<rdar://87709485>

Reviewed by Eric Carlson.

Source/WebCore:

Add infra to be notified when audio capture unit is stopped.
Add a check to return early with microphone sample callback if microphone samples are not to be processed.

Manually tested.

  • platform/mediastream/mac/BaseAudioSharedUnit.cpp:
  • platform/mediastream/mac/BaseAudioSharedUnit.h:
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:
  • platform/mediastream/mac/CoreAudioCaptureSource.h:

Source/WebKit:

When we stop capturing, we might still use the VPIO unit to render audio.
In that case, it might be problematic to increase the preferred buffer size as:

  • Audio unit might stop running, hence stopping audio rendering
  • Increasing the preferred buffer size might increase latency which is not a good thing in VPIO usecases.
  • GPUProcess/media/RemoteAudioSessionProxy.cpp:
  • GPUProcess/media/RemoteAudioSessionProxyManager.cpp:
  • GPUProcess/media/RemoteAudioSessionProxyManager.h:

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

6:53 PM Changeset in webkit [289282] by Russell Epstein
  • 14 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288178. rdar://problem/79296770

REGRESSION (r264352): Mail compose body field does not avoid the keyboard when scrolling after focus
https://bugs.webkit.org/show_bug.cgi?id=235331
rdar://79296770

Reviewed by Tim Horton.

Source/WebKit:

After r264352 added the call to _page->scheduleFullEditorStateUpdate(); during element focus, scrolling to
reveal the selection in the focused body field in Mail stopped working. This is because Mail:

  1. Sets firstResponderKeyboardAvoidanceEnabled to NO on the WKScrollView, which prevents automatic inset

adjustment logic in UIKit from taking effect and adding the keyboard height to the bottom system content
inset.

  1. Manually sets -contentScrollInset on the WKScrollView during a UIKeyboardDidShowNotification, which occurs

after we've already attempted to zoom to the selection.

...combined with the fact that without the call to scheduleFullEditorStateUpdate(), the next EditorState
would've arrived only after the keyboard animation finished.

The end result is that we don't end up avoiding the keyboard at all when focusing the body field in Mail
compose. While rdar://87733414 tracks refactoring logic in WebKit2 Mail compose to ensure that the content
scroll insets on WKScrollView are applied during UIKeyboardWillShowNotification instead of after the keyboard
has finished animating in, this patch provides a short-term workaround by restoring pre-r264352 behavior, with
respect to when the element is scrolled into view.

Test: editing/selection/ios/scroll-to-reveal-selection-with-keyboard-avoidance-disabled.html

  • Platform/spi/ios/UIKitSPI.h:

Add a declaration for the -firstResponderKeyboardAvoidanceEnabled SPI property on non-internal iOS SDKs.

  • UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _keyboardDidShow:]):

Plumb this through to the WKContentView, so we can zoom/scroll to the focused element if needed.

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView cleanUpInteraction]): (-[WKContentView _keyboardDidShow]):

If we previously deferred the call to -_zoomToRevealFocusedElement due to the keyboard still animating in,
schedule a call to it now on a 0-delay timer; this delay is necessary to ensure that this zoom occurs *after*
Mail has already set the content inset, which also happens underneath a "KeyboardDidShow" notification.

(-[WKContentView _zoomToRevealFocusedElement]):

In the case where the (presumably internal) client has set firstResponderKeyboardAvoidanceEnabled to NO and
the keyboard is animating in, defer the actual call into the web view to -_zoomToRevealFocusedElement until
after the keyboard animation is finished. This ensures compatibility with existant logic in Mail for manually
setting the content scroll inset on the WKScrollView after the keyboard animation is complete.

(-[WKContentView resetShouldZoomToFocusRectAfterShowingKeyboard]):
(-[WKContentView _elementDidBlur]):

Tools:

Add support for a UIScriptController hook to override firstResponderKeyboardAvoidanceEnabled on WKScrollView.
See LayoutTests for more details.

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.h: (WTR::UIScriptController::setScrollViewKeyboardAvoidanceEnabled):
  • WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues):
  • WebKitTestRunner/ios/UIScriptControllerIOS.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::setScrollViewKeyboardAvoidanceEnabled):

LayoutTests:

Add a layout test that (at least) exercises the newly added codepath, where focusing an editor when the scroll
view has firstResponderKeyboardAvoidanceEnabled set to NO will still allow us to scroll to the selection.

  • editing/selection/ios/scroll-to-reveal-selection-with-keyboard-avoidance-disabled-expected.txt: Added.
  • editing/selection/ios/scroll-to-reveal-selection-with-keyboard-avoidance-disabled.html: Added.
  • resources/ui-helper.js: (window.UIHelper.setScrollViewKeyboardAvoidanceEnabled):

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

6:53 PM Changeset in webkit [289281] by Russell Epstein
  • 41 edits
    1 add in branches/safari-613-branch

Cherry-pick r288132. rdar://problem/87569029

CSP: Improve handling of multiple policies
https://bugs.webkit.org/show_bug.cgi?id=235199

Reviewed by Kate Cheney.

LayoutTests/imported/w3c:

Add new test expectations with more passes.

  • web-platform-tests/content-security-policy/script-src/script-src-multiple-policies-one-using-hashing-algorithms-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-error-event-fires-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked-error-event-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-multiple-policies-multiple-hashing-algorithms-expected.txt: Added.

Source/WebCore:

This fixes many issues with multiple CSP policies.

To quote the spec for script-src:

Their behavior will be blocked unless every policy allows inline script, either implicitly by not

specifying a script-src (or default-src) directive, or explicitly, by specifying "unsafe-inline",
a nonce-source or a hash-source that matches the inline block.

The previous structure was many distinct calls to check if there was a nonce in any policy, then if there
was a hash in any policy, etc, rather than actually checking the policies as a whole to know if they
allow or block a behavior. This lead to various issues where polices were not properly respected and where
reports were inaccurate.

The allScriptPoliciesAllow() function did try to consider all policies but was not very flexible and had buggy
behavior like for each policy it would call findHashOfContentInPolicies() meaning hashes from other policies
incorrectly applied to the current policy, plus general inefficiency of hashing the same content many
times over.

The new behavior relies more on passing all required information in a single function call to verify all
policies in a single pass.

  • bindings/js/CachedScriptFetcher.cpp: (WebCore::CachedScriptFetcher::requestScriptWithCache const):
  • dom/InlineStyleSheetOwner.cpp: (WebCore::InlineStyleSheetOwner::createSheet):
  • dom/ScriptElement.cpp: (WebCore::ScriptElement::requestModuleScript): (WebCore::ScriptElement::executeClassicScript):
  • dom/StyledElement.cpp: (WebCore::StyledElement::styleAttributeChanged):
  • html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process):
  • loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::isAllowedByContentSecurityPolicy):
  • loader/ResourceLoaderOptions.h:
  • loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const):
  • page/csp/ContentSecurityPolicy.cpp: (WebCore::parseSubResourceIntegrityIntoDigests): (WebCore::generateHashesForContent): (WebCore::ContentSecurityPolicy::allowJavaScriptURLs const): (WebCore::ContentSecurityPolicy::allowInlineEventHandlers const): (WebCore::ContentSecurityPolicy::allowNonParserInsertedScripts const): (WebCore::ContentSecurityPolicy::allowInlineScript const): (WebCore::ContentSecurityPolicy::allowInlineStyle const): (WebCore::ContentSecurityPolicy::allowScriptFromSource const): (WebCore::ContentSecurityPolicy::allowStyleFromSource const): (WebCore::ContentSecurityPolicy::allScriptPoliciesAllow const): Deleted. (WebCore::ContentSecurityPolicy::findHashOfContentInPolicies const): Deleted. (WebCore::ContentSecurityPolicy::checkHashAndReportViolation const): Deleted.
  • page/csp/ContentSecurityPolicy.h:
  • page/csp/ContentSecurityPolicyDirectiveList.cpp: (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeInlineScriptElement const): (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForInlineJavascriptURL const): (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForInlineEventHandlers const): (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForNonParserInsertedScripts const): (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeInlineStyleElement const): (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeInlineStyleAttribute const): (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForScript const): (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForStyle const): (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeHashScript const): Deleted. (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeHashStyle const): Deleted. (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForParserInsertedScript const): Deleted. (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeInlineScriptAttribute const): Deleted. (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForScriptHash const): Deleted. (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForStyleHash const): Deleted.
  • page/csp/ContentSecurityPolicyDirectiveList.h:

LayoutTests:

Update test expectations, Some newly passing tests are no longer skipped and some have new reports.

  • TestExpectations:
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-in-enforced-policy-and-not-in-report-only-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-multiple-policies-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-in-enforced-policy-and-not-in-report-only-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-multiple-policies-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-by-enforced-policy-and-blocked-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-by-enforced-policy-and-blocked-by-report-policy2-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-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/scriptnonce-blocked-by-enforced-policy-and-allowed-by-report-policy2-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-in-enforced-policy-and-not-in-report-only-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-multiple-policies-expected.txt:
  • http/tests/security/contentSecurityPolicy/inline-script-blocked-javascript-url-expected.txt:
  • http/tests/security/contentSecurityPolicy/javascript-url-blocked-by-default-src-star-expected.txt:
  • http/tests/security/contentSecurityPolicy/javascript-url-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/window-open-javascript-url-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/window-open-javascript-url-with-target-blocked-expected.txt:
  • platform/glib/TestExpectations:
  • platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-iframe-report-only-expected.txt:

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

6:53 PM Changeset in webkit [289280] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288128. rdar://problem/87711220

Copy com.apple.WebKit.adattributiond.sb into place with other iOS sandbox profiles
https://bugs.webkit.org/show_bug.cgi?id=235320
<rdar://87711220>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-01-18
Reviewed by Per Arne Vollan.

Ever since r287100 we are using the sandbox profile, but it doesn't exist so we just crash.

  • WebKit.xcodeproj/project.pbxproj:

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

6:53 PM Changeset in webkit [289279] by Russell Epstein
  • 4 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288124. rdar://problem/87721737

Reduce failure timer in CoreAudioSharedUnit in the case we only render audio samples
https://bugs.webkit.org/show_bug.cgi?id=235318

Reviewed by Eric Carlson.

As shown in https://bugs.webkit.org/show_bug.cgi?id=235317, it might be possible for a VPIO that is only used for
audio rendering to fail sometimes. Waiting for 10 seconds in that case is very long, so we reduce the verification delay to 2 seconds.
Manually tested.

  • platform/mediastream/mac/BaseAudioSharedUnit.cpp:
  • platform/mediastream/mac/BaseAudioSharedUnit.h:
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

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

6:53 PM Changeset in webkit [289278] by Russell Epstein
  • 2 edits in branches/safari-613-branch/JSTests

Cherry-pick r288120. rdar://problem/87538657

Gardening: resolve test failure on CLoop.

Not reviewed.

Change test to not rely on WebAssembly.

  • stress/max-typed-array-length-toString.js:

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

6:53 PM Changeset in webkit [289277] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288110. rdar://problem/87699178

BaseAudioSharedUnit::devicesChanged is failing capture too much in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=235288

Reviewed by Eric Carlson.

Manually tested.

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.h: In GPUProcess, we do not need to filter tap enabled devices, since this may filter out valid devices, which may break capture. Given we only need to filter tap enabled devices in the process that enumerates devices for selecting the one to use, We can reverse the default value to not filter, and enable the filtering in UIProcess as done currently based on whether capturing in GPUProcess or not.

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

6:53 PM Changeset in webkit [289276] by Russell Epstein
  • 9 edits in branches/safari-613-branch/Source

Cherry-pick r288076. rdar://problem/83863292

Ensure in flight layer transactions don't accumulate further canvas drawing
https://bugs.webkit.org/show_bug.cgi?id=231163
<rdar://problem/83863292>

Reviewed by Simon Fraser.

Source/WebCore:

When UI side compositing is enabled (as it is on iOS), we build a
layer tree transaction in RemoteLayerTreeDrawingArea::updateRendering to
send off to the UI process. At a high level, updateRendering does this:

  1. Run any requestAnimationFrame callbacks
  2. Iterate over the composited layers to draw their contents into the layer backing stores
  3. Dispatch a task to a different thread to flush the contexts of the layer backing stores and then send the transaction to the UI process

Step 3 is done off a separate task as an optimization, to get the
drawing work queued up by step 2 happening in parallel to any work the
page may day once updateRendering is finished. This can be a problem
when:

  • GPU process canvas rendering is enabled (but DOM rendering is disabled)
  • we have accelerated ImageBuffers for both layer backing stores and canvas backing stores
  • the page does canvas drawing between steps 2 and 3, which affects the contents of a canvas backing store IOSurface that was drawn into a layer backing store IOSurface while building the transaction

The way we draw the canvas contents into the layer is by creating a
CGImage from the canvas backing store ImageBuffer's IOSurface.
Normally, if we draw into an IOSurface that has been wrapped by a
CGImage, this will cause the CGImage to obtain a unique copy of the
IOSurface's pixels, rather than continue holding on to the IOSurface
itself.

When the drawing of this CGImage on to the layer backing store
IOSurface happens, the "draw image" command is queued up to be
processed later. It's only when the flush happens in step 3 above that
the drawing occurs. This means that the CGImage wrapping the IOSurface
exists until that flush.

But while the CGImage does exist, it's in the Web process, and the
canvas drawing on to the same IOSurface happens in the GPU process.
Since QuartzCore doesn't know of its existence, it doesn't cause the
copy-on-write to occur. The effect of this is that subsequent page
drawing on to the canvas can make its way into the layer transaction
unexpectedly.

This patch induces the copy-on-write in the Web process when needed,
by tracking whether a canvas has been drawn into a layer backing
store and the layer transaction flush hasn't happened yet. Just before
we do any more drawing on the canvas, if we are in this state, we
perform a no-op drawing command on the IOSurface, then flush, to make
the CGImage copy the IOSurface data out.

  • html/HTMLCanvasElement.cpp: (WebCore::imageDrawingRequiresGuardAgainstUseByPendingLayerTransaction): We only need to induce the CGImage copy-on-write behavior if both the layer and canvas backing stores are accelerated, the canvas ImageBuffer is remote, and the layer ImageBuffer is not remote. (WebCore::HTMLCanvasElement::paint): (WebCore::HTMLCanvasElement::drawingContext const): Use drawingContext as a convenient single place to check whether we are performing the first drawing command before the layer tree transaction flush has happened.
  • html/HTMLCanvasElement.h:
  • page/Page.h: (WebCore::Page::setIsAwaitingLayerTreeTransactionFlush): (WebCore::Page::isAwaitingLayerTreeTransactionFlush const):
  • platform/graphics/ImageBufferBackend.h: (WebCore::ImageBufferBackend::ensureNativeImagesHaveCopiedBackingStore):
  • platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: (WebCore::ImageBufferIOSurfaceBackend::ensureNativeImagesHaveCopiedBackingStore): The flush is needed since the CGImage wrapping the IOSurface will only copy the pixel data out once the no-op drawing command is processed.
  • platform/graphics/cg/ImageBufferIOSurfaceBackend.h:

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::willCommitLayerTree): (WebKit::WebPage::didFlushLayerTreeAtTime): Inform the WebCore::Page about the state of the layer tree transaction building.
  • WebProcess/WebPage/WebPage.h:

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

6:53 PM Changeset in webkit [289275] by Russell Epstein
  • 3 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288053. rdar://problem/85760433

Unable to playback portrait videos on HTML canvas elements
https://bugs.webkit.org/show_bug.cgi?id=235238

Reviewed by Jer Noble.

We need to make sure the destination pixel buffer is IOSurface-backed.
Otherwise, VTImageRotationSession cannot rotate a pixel buffer with
a compressed pixel format.

Manually tested.

Layout tests for this exist, but unless they run on an iPhone 12 or
later HW, they won't fail. For example:

  • media/video-orientation-canvas.html
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer):
  • platform/graphics/cv/ImageRotationSessionVT.mm: (WebCore::ImageRotationSessionVT::rotate):

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

6:53 PM Changeset in webkit [289274] by Russell Epstein
  • 3 edits
    1 add in branches/safari-613-branch

Cherry-pick r288037. rdar://problem/87538657

JSStringJoiner's constructor should take a size_t length.
https://bugs.webkit.org/show_bug.cgi?id=235217
rdar://87538657

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/max-typed-array-length-toString.js: Added.

Source/JavaScriptCore:

Also removed an unnecessary exception check in JSStringJoiner::append().
This is because appendWithoutSideEffects() cannot throw any exceptions.

  • runtime/JSStringJoiner.h: (JSC::JSStringJoiner::JSStringJoiner): (JSC::JSStringJoiner::append):

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

6:53 PM Changeset in webkit [289273] by Russell Epstein
  • 12 edits
    6 adds in branches/safari-613-branch

Cherry-pick r288031. rdar://problem/82997136

[Cocoa] rVFC() isn't called for initial video load
https://bugs.webkit.org/show_bug.cgi?id=235006

Reviewed by Eric Carlson.

Source/WebCore:

Tests: media/request-video-frame-loadstart.html

media/request-video-frame-seek.html

Add a new utility class, QueuedVideoOutput, which will pull pixel buffers out of an AVPlayerItemVideoOutput
pre-emptively. Once those pixel buffers are enqueued locally, their associated timing information can be used to
fire a callback for that buffer's display time.

Previously, paints were blocked from pulling new pixel buffers from the video output. With the QueuedVideoOutput
class, this is no longer necessary. The QueuedVideoOutput will notify its client when the image for currentTime
changes, and other clients can freely ask for the currentTime's image.

To curb runaway memory growth, frames are purged as soon as a new image for the current time is available, and when
the video output signals that its own queues were purged.

  • WebCore.xcodeproj/project.pbxproj:
  • html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::cancelVideoFrameCallback): (WebCore::HTMLVideoElement::serviceRequestVideoFrameCallbacks):
  • html/HTMLVideoElement.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): (WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame const): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoFullscreenInlineImage): (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): (WebCore::MediaPlayerPrivateAVFoundationObjC::startVideoFrameMetadataGathering): (WebCore::MediaPlayerPrivateAVFoundationObjC::checkNewVideoFrameMetadata): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoOutput): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer): (WebCore::MediaPlayerPrivateAVFoundationObjC::videoOutputHasAvailableFrame): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage): (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): (WebCore::MediaPlayerPrivateAVFoundationObjC::pixelBufferForCurrentTime): (WebCore::MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTime): (WebCore::MediaPlayerPrivateAVFoundationObjC::colorSpace): (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange): (WebCore::globalPullDelegateQueue): Deleted. (WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange): Deleted. (-[WebCoreAVFPullDelegate initWithPlayer:]): Deleted. (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]): Deleted. (-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]): Deleted.
  • platform/graphics/avfoundation/objc/QueuedVideoOutput.h: Added.
  • platform/graphics/avfoundation/objc/QueuedVideoOutput.mm: Added. (-[WebQueuedVideoOutputDelegate initWithParent:]): (-[WebQueuedVideoOutputDelegate outputMediaDataWillChange:]): (-[WebQueuedVideoOutputDelegate outputSequenceWasFlushed:]): (-[WebQueuedVideoOutputDelegate observeValueForKeyPath:ofObject:change:context:]): (WebCore::globalOutputDelegateQueue): (WebCore::QueuedVideoOutput::create): (WebCore::QueuedVideoOutput::QueuedVideoOutput): (WebCore::QueuedVideoOutput::~QueuedVideoOutput): (WebCore::QueuedVideoOutput::invalidate): (WebCore::decltype): (WebCore::QueuedVideoOutput::hasImageForTime const): (WebCore::QueuedVideoOutput::takeVideoFrameEntryForTime): (WebCore::QueuedVideoOutput::addCurrentImageChangedObserver): (WebCore::QueuedVideoOutput::configureNextImageObserver): (WebCore::QueuedVideoOutput::imageForCurrentTimeChanged): (WebCore::QueuedVideoOutput::addVideoFrameEntries): (WebCore::QueuedVideoOutput::purgeVideoFrameEntries): (WebCore::QueuedVideoOutput::purgeImagesBeforeTime): (WebCore::QueuedVideoOutput::rateChanged):

Source/WebCore/PAL:

  • pal/spi/cocoa/AVFoundationSPI.h:

LayoutTests:

  • media/request-video-frame-loadstart-expected.txt: Added.
  • media/request-video-frame-loadstart.html: Added.
  • media/request-video-frame-seek-expected.txt: Added.
  • media/request-video-frame-seek.html: Added.
  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk2/TestExpectations:

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

6:53 PM Changeset in webkit [289272] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288003. rdar://problem/85505101

Only apply automatic minimum block-size aspect-ratio rules to non-replaced elements
https://bugs.webkit.org/show_bug.cgi?id=235058
<rdar://85505101>

Reviewed by Alan Bujtas.

Source/WebCore:

The rules in https://www.w3.org/TR/css-sizing-4/#aspect-ratio-minimum
that define the automatic minimum size of an element subject to an
aspect-ratio only apply if the element is non-replaced.

In constrainLogicalHeightByMinMax specifically, when min-height is
auto, after applying the aspect-ratio to produce an automatic minimum
height, we bump it up to the content height if the element has
children. This, presumably, is to account for the way the height of a
block is computed in CSS 2.2. (As CSS 2.2 doesn't have an auto value
for min-height, and a CSS Block Layout module has not been written in
terms of CSS Sizing concepts, there is no clear definition of
automatic minimum sizing for blocks at the moment.) If we erroneously
apply this to a replaced element, such as an image or video, it can
get a computed min-height equal to the intrinsic height of the image,
which may be much larger than expected.

This commit adds an is<RenderReplaced>() check for both automatic
minimum logical width and height calculations, although I was unable to
produce a test to exercise the logical width case (which does not take
the intrinsic size into account when computing the automatic minimum).

Test: fast/css/aspect-ratio-min-height-replaced.html

  • rendering/RenderBox.cpp: (WebCore::RenderBox::constrainLogicalWidthInFragmentByMinMax const): (WebCore::RenderBox::constrainLogicalHeightByMinMax const):

LayoutTests:

Test that replaced elements with child content (in this case, a
<video> element's controls in the UA shadow tree) don't influence the
automatic minimum size calculation.

  • fast/css/aspect-ratio-min-height-replaced-expected.html: Added.
  • fast/css/aspect-ratio-min-height-replaced.html: Added.

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

6:53 PM Changeset in webkit [289271] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r287995. rdar://problem/87458502

Avoid unnecessary call to windowScreenDidChange
https://bugs.webkit.org/show_bug.cgi?id=235198
<rdar://87458502>

Reviewed by Geoffrey Garen.

It is a page load performance progression to avoid this call in initWithDrawingAreaProxy.

  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: (-[WKOneShotDisplayLinkHandler initWithDrawingAreaProxy:]):

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

6:52 PM Changeset in webkit [289270] by Russell Epstein
  • 3 edits in branches/safari-613-branch/Source/bmalloc

Cherry-pick r287994. rdar://problem/87055595

[libpas] pas_segregated_page_lock_with_mode in try_lock mode should check that the page still uses the lock after the try_lock
https://bugs.webkit.org/show_bug.cgi?id=235203

Reviewed by Yusuke Suzuki.

The bug I was trying to find by assertions in bug 235190 is that lock_with_mode has an incorrect
implementation of the try_lock case. It forgets to check if the lock it acquired is the right one
after locking.

I don't know how to test this without writing a test that is very gross. It's a super subtle race
condition - one that would be hard to reliably trigger even if I used the race_test_hooks
functionality.

  • libpas/src/libpas/pas_local_allocator.c: (stop_impl):
  • libpas/src/libpas/pas_segregated_page_inlines.h: (pas_segregated_page_switch_lock_with_mode):

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

6:52 PM Changeset in webkit [289269] by Russell Epstein
  • 6 edits
    1 add in branches/safari-613-branch

Cherry-pick r287992. rdar://problem/74845918

Crash in Document::updateStyleIfNeeded() when removing a node containing the drag caret
https://bugs.webkit.org/show_bug.cgi?id=235184
rdar://74845918

Reviewed by Darin Adler.

Source/WebCore:

While performing drag and drop over editable content, DragCaretController handles updating and painting a drag
caret, which indicates where the dragged content will be inserted upon drop. If the node containing this drag
caret is disconnected, DragCaretController::nodeWillBeRemoved() resets the drag caret position and issues a
repaint on the renderer responsible for drawing the drag caret. This call to nodeWillBeRemoved() occurs in the
middle of node removal, so it's encapsulated by a ScriptDisallowedScope::InMainThread scope which causes a
release assertion in WebKit2 if anything tries to trigger layout or style updates.

Currently, if the node being removed would cause the caret position to be removed as well, DragCaretController
calls into setCaretPosition() with a null visible position, which then calls into invalidateCaretRect with
the current caret position's anchor node. In turn, invalidateCaretRect contains logic to issue a repaint on
the anchor node's renderer if the node is editable. However, to check whether the node is editable, we use the
helper function WebCore::isEditableNode(), which triggers a style update if needed, only in the case where:

  1. A style recalc is needed, and...
  2. The document contains an element with the -webkit-user-modify CSS property.

As such, dirtying element styles right before removing the drag caret's anchor node from the document while
dispatching a drag or drop event in an editor with -webkit-user-modify: read-write; is sufficient to
trigger the release assertion and cause a crash.

To address this, instead of calling clear() inside of DragCaretController::nodeWillBeRemoved(), we can
instead directly invalidate the caret rect using the current drag caret anchor (passing in true for
caretRectChanged() since we already know that the drag caret is being cleared out), and then reset the current
drag caret position and caret rect. This allows us to avoid the isEditableNode() check in this scenario when
deciding whether to trigger paint invalidation, which is unnecessary because we already know that the node
containing the caret is being removed, so the renderer is going to be repainted anyways. We also pull this logic
out into a separate helper method, clearCaretPositionWithoutUpdatingStyle(), to make it clear that we must
avoid triggering style recalc here.

Test: DragAndDropTests.DoNotCrashWhenRemovingNodeOnDrop

  • editing/FrameSelection.cpp: (WebCore::DragCaretController::nodeWillBeRemoved): (WebCore::DragCaretController::clearCaretPositionWithoutUpdatingStyle):
  • editing/FrameSelection.h:

Tools:

Add a test to exercise the crash using drag and drop in WebKit2, on both iOS and macOS.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/remove-node-on-drop.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: (TEST):

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

6:52 PM Changeset in webkit [289268] by Russell Epstein
  • 4 edits in branches/safari-613-branch/Source/bmalloc

Cherry-pick r287991. rdar://problem/87557006

[libpas] add assertions that we aren't switching to a NULL lock
https://bugs.webkit.org/show_bug.cgi?id=235190

Reviewed by Yusuke Suzuki.

This adds a pas_panic call when pas_local_allocator_stop sees a NULL page->lock_ptr. That's one
possible explanation of a very rare crash I'm seeing where return_memory_to_page fails its assertion
that we are holding the page lock.

This also adds TESTING asserts in a bunch of other places. The PAS_TESTING_ASSERTS about this are in
places that are perf-sensitive, so we probably cannot assert in production. The hope behind those is
that it will help to catch this issue in test_pas.

  • libpas/src/libpas/pas_local_allocator.c: (stop_impl):
  • libpas/src/libpas/pas_segregated_page.c: (pas_segregated_page_switch_lock_and_rebias_while_ineligible_impl):
  • libpas/src/libpas/pas_segregated_page_inlines.h: (pas_segregated_page_lock_with_unbias_not_utility): (pas_segregated_page_lock_with_unbias): (pas_segregated_page_lock): (pas_segregated_page_switch_lock_impl): (pas_segregated_page_switch_lock_with_mode):

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

6:52 PM Changeset in webkit [289267] by Russell Epstein
  • 4 edits
    2 adds in branches/safari-613-branch

Cherry-pick r287981. rdar://problem/84069534

REGRESSION (r278561): Right clicking a link selects the full line with unrelated text
https://bugs.webkit.org/show_bug.cgi?id=235172
<rdar://84069534>

Reviewed by Dean Jackson.

Source/WebCore:

r278561 slightly change highlightStateForTextBox's behavior which now (correctly) returns HighlightState::None when the
RenderText content is not part of the current selection. Prior to r278561, it returned the RenderText's original selection state
which in this case was HighlightState::End.

<div><span>A<br>B<span style="position: absolute"></span></span>C</div>

In this specific case when we select the outer <span>, we end up with the following selection states for the generated line boxes:

(B) -> "Inside"
(C) -> "None"

while previously (C) came back as "End" (note that the absolute positioned element does not generate line boxes).

Now as Line::selectionState traverses through the line boxes, it comes across an unexpected "Inside -> None" transition at the selection end boundary (B -> C)
which incorrectly leaves the line state in "Inside" and we paint the selection all the way to the end of the block.

Test: fast/editing/selection-with-absolute-positioned-empty-content.html

  • layout/integration/InlineIteratorLine.cpp: (WebCore::InlineIterator::Line::selectionState const):

LayoutTests:

  • fast/editing/selection-with-absolute-positioned-empty-content-expected.txt: Added.
  • fast/editing/selection-with-absolute-positioned-empty-content.html: Added.

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

6:52 PM Changeset in webkit [289266] by Russell Epstein
  • 6 edits
    2 adds in branches/safari-613-branch

Cherry-pick r287970. rdar://problem/87423294

PCM: Same-site triggering events should support ephemeral measurement
https://bugs.webkit.org/show_bug.cgi?id=235160
<rdar://87423294>

Reviewed by Alex Christensen.

Source/WebCore:

We added ephemeral measurement for direct response advertising in https://bugs.webkit.org/show_bug.cgi?id=228984.
We added support for same-site triggering events in https://bugs.webkit.org/show_bug.cgi?id=233173.
These two features should work together.

The bug was that WebKit::NetworkSession::handlePrivateClickMeasurementConversion()
only checked for cross-site triggering events when handling ephemeral measurements.

Test: http/tests/privateClickMeasurement/triggering-event-with-attribution-source-through-fetch-keepalive-ephemeral.html

  • loader/PrivateClickMeasurement.cpp: (WebCore::PrivateClickMeasurement::isNeitherSameSiteNorCrossSiteTriggeringEvent):

New convenience function to enhance readability in
WebKit::NetworkSession::handlePrivateClickMeasurementConversion().

  • loader/PrivateClickMeasurement.h:

Source/WebKit:

We added ephemeral measurement for direct response advertising in https://bugs.webkit.org/show_bug.cgi?id=228984.
We added support for same-site triggering events in https://bugs.webkit.org/show_bug.cgi?id=233173.
These two features should work together.

  • NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::handlePrivateClickMeasurementConversion):

This function previously only checked for cross-site triggering events when
handling ephemeral measurements. Now it also checks for same-site triggering
events.

LayoutTests:

  • http/tests/privateClickMeasurement/triggering-event-with-attribution-source-through-fetch-keepalive-ephemeral-expected.txt: Added.
  • http/tests/privateClickMeasurement/triggering-event-with-attribution-source-through-fetch-keepalive-ephemeral.html: Added.

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

6:52 PM Changeset in webkit [289265] by Russell Epstein
  • 12 edits
    5 adds in branches/safari-613-branch/Source/bmalloc

Cherry-pick r287968. rdar://problem/87256207

[libpas] thread_local_cache should not be allocated in the compact heap (cherry pick 11afcedfb5968f6894379ff1a41dd449ba7745f6)
https://bugs.webkit.org/show_bug.cgi?id=235096

Reviewed by Yusuke Suzuki.

Thread local caches can get quite large because of how libpas uses them, we can allocate one per
thread, and we reallocate them with exponential resizing, so there's a lot of wasted space and a
decent amount of fragmentation. This shows up as occasional crashes trying to allocate a thread local
cache out of the compact heap.

This moves thread local caches out of the compact heap. They were only ever there because partial views
sometimes need to point to the local_allocator's bitvector, but that's part of the thread local cache.
So, that means that either the partial views' bits pointer cannot be a compact pointer, or the
thread_local_cache needs to be in the compact heap. So, the thread_local_cache ended up in the compact
heap to keep that pointer small.

This change works around the problem: it's rare that the partial views' bits pointer points at
the local_allocator's bits, and none of the fast path cases where we access that pointer will ever see
it in that state. So, this makes the pointer either point to a utility-heap-allocated box that contains
the full pointer, or it points at the actual array allocated in the compact heap. The utility heap is
in the compact heap, so the compact pointer can point at either one. The implementation of this is
encapsulated as pas_lenient_compact_ptr. It's a bit gross; storing to it only works when you're holding
the heap lock, for example.

This is perf-neutral on Speedometer. This is perf-neutral on JS2 cli with full JSC isoheaps (i.e. the
patch from bug 231938). It's a 0.4% regression on RAMification with full JSC isoheaps, but I'm not
going to worry about that because trunk doesn't have full JSC isoheaps, and JSC isoheaps requires some
change like this to work reliably (currently it'll randomly run out of compact heap).

  • bmalloc.xcodeproj/project.pbxproj:
  • libpas/libpas.xcodeproj/project.pbxproj:
  • libpas/src/libpas/pas_enumerate_segregated_heaps.c: (enumerate_partial_view):
  • libpas/src/libpas/pas_full_alloc_bits_inlines.h: (pas_full_alloc_bits_create_for_partial_but_not_primordial): (pas_full_alloc_bits_create_for_partial):
  • libpas/src/libpas/pas_lenient_compact_ptr.h: Added.
  • libpas/src/libpas/pas_lenient_compact_ptr_inlines.h: Added.
  • libpas/src/libpas/pas_lenient_compact_unsigned_ptr.c: Added.
  • libpas/src/libpas/pas_lenient_compact_unsigned_ptr.h: Added.
  • libpas/src/libpas/pas_local_allocator.c: (pas_local_allocator_move):
  • libpas/src/libpas/pas_local_allocator_inlines.h: (pas_local_allocator_set_up_free_bits): (pas_local_allocator_start_allocating_in_primordial_partial_view): (pas_local_allocator_bless_primordial_partial_view_before_stopping):
  • libpas/src/libpas/pas_segregated_partial_view.c: (pas_segregated_partial_view_create): (compute_summary):
  • libpas/src/libpas/pas_segregated_partial_view.h:
  • libpas/src/libpas/pas_segregated_view_allocator_inlines.h: (pas_segregated_view_will_start_allocating):
  • libpas/src/libpas/pas_thread_local_cache.c: (deallocate): (allocate_cache):
  • libpas/src/test/LotsOfHeapsAndThreads.cpp: Added. (std::testLotsOfHeapsAndThreads): (addLotsOfHeapsAndThreadsTests):
  • libpas/src/test/TestHarness.cpp: (main):

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

6:52 PM Changeset in webkit [289264] by Russell Epstein
  • 15 edits in branches/safari-613-branch/Source

Cherry-pick r287959. rdar://problem/80213097

Add to Contact menu item does nothing on mac.
https://bugs.webkit.org/show_bug.cgi?id=235154
Source/WebCore:

Reviewed by Tim Horton.

Add to Context menu item for telephone numbers did not actually show the contact card.
This was because the delgate did not tell the menu where to display the card from, so it just failed.
Plumbing that information through fixes the issue.

  • page/ChromeClient.h: (WebCore::ChromeClient::handleTelephoneNumberClick):
  • page/mac/ServicesOverlayController.mm: (WebCore::ServicesOverlayController::handleClick):

Source/WebKit:

rdar://80213097

Reviewed by Tim Horton.

Add to Context menu item for telephone numbers did not actually show the contact card.
This was because the delgate did not tell the menu where to display the card from, so it just failed.
Plumbing that information through fixes the issue.

  • Platform/mac/MenuUtilities.h:
  • Platform/mac/MenuUtilities.mm: (-[WKEmptyPresenterHighlightDelegate initWithRect:]): (-[WKEmptyPresenterHighlightDelegate revealContext:rectsForItem:]): (-[WKEmptyPresenterHighlightDelegate revealContext:shouldUseDefaultHighlightForItem:]): (WebKit::menuForTelephoneNumber):
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::showTelephoneNumberMenu):
  • WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::handleTelephoneNumberClick):
  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::handleTelephoneNumberClick):

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

6:52 PM Changeset in webkit [289263] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebKitLegacy/mac

Cherry-pick r287951. rdar://problem/83501315

_paintBehaviorForDestinationContext should consider kCGContextTypeDisplayList type contexts as potentially being snapshots
https://bugs.webkit.org/show_bug.cgi?id=234626
<rdar://83501315>

Patch by Matt Woodrow <Matt Woodrow> on 2022-01-12
Reviewed by Simon Fraser.

_paintBehaviorForDestinationContext currently always returns Normal for contexts that aren't a bitmap context.
AppKit now provides a context that is of type kCGContextTypeDisplayList, and we want to still potentially consider it a
snapshot paint (if the other conditions below are met). This ensure images are sync decoded for consumers that just
want a single paint.

  • WebView/WebFrame.mm: (-[WebFrame _paintBehaviorForDestinationContext:]):

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

6:52 PM Changeset in webkit [289262] by Russell Epstein
  • 4 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r287939. rdar://problem/85082354

Correctly dirty z-order lists when showing a modal dialog
https://bugs.webkit.org/show_bug.cgi?id=232762
<rdar://problem/85082354>

Reviewed by Alan Bujtas.

When showing a dialog element which is split into continuations, we need to ensure
to call establishesTopLayerWillChange()/establishesTopLayerDidChange() on the
layers of all the continuation renderers.

  • dom/Element.cpp: (WebCore::forEachRenderLayer): Call the provided function on the layers for all the associated render objects. It's a little cumbersome because layers relate to RenderLayerModelObject, but continuations relate to RenderBoxModelObject. (WebCore::Element::addToTopLayer): (WebCore::Element::removeFromTopLayer): (WebCore::renderLayerForElement): Deleted.
  • rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::forRendererAndContinuations):
  • rendering/RenderBoxModelObject.h: Provider a static helper to call a function on a renderer and all its continuations, if any.

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

6:52 PM Changeset in webkit [289261] by Russell Epstein
  • 10 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r287930. rdar://problem/85790203

[iOS] Page loading hangs for ~10s on WebProcess launch
https://bugs.webkit.org/show_bug.cgi?id=235089

Reviewed by Eric Carlson.

WebPage::setMuted() will result in calling into the current audioCaptureFactory,
which will be by default CoreAudioAudioCaptureFactory unless replaced.
CoreAudioAudioCaptureFactory will in turn call into AVAudioSession, which will block
for multiple seconds due to the WebContent process sandbox.

Change the order in which these calls occur by configuring the audioCaptureFactory
in platformInitialize(), which occurs near the top of the constructor. This requires
access to the WebPageCreationParameters passed into the constructor, modify that method
to take a WebPageCreationParameters, and modify all the platform-specific definitions of
that method.

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm: (WebKit::WebPage::platformInitialize):
  • WebProcess/WebPage/WebPage.cpp: (WebKit::m_appHighlightsVisible):
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/gtk/WebPageGtk.cpp: (WebKit::WebPage::platformInitialize):
  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::platformInitialize): Deleted.
  • WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::platformInitializeAccessibility): (WebKit::WebPage::platformInitialize): Deleted.
  • WebProcess/WebPage/playstation/WebPagePlayStation.cpp: (WebKit::WebPage::platformInitialize):
  • WebProcess/WebPage/win/WebPageWin.cpp: (WebKit::WebPage::platformInitialize):
  • WebProcess/WebPage/wpe/WebPageWPE.cpp: (WebKit::WebPage::platformInitialize):

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

6:52 PM Changeset in webkit [289260] by Russell Epstein
  • 5 edits in branches/safari-613-branch/Source

Cherry-pick r287914. rdar://problem/85451366

Protect DocumentLoader when a reference to its members is used.
https://bugs.webkit.org/show_bug.cgi?id=233464

Patch by Frédéric Wang <fwang@igalia.com> on 2022-01-12
Reviewed by Brady Eidson.

Source/WebCore:

No new tests, due to our infra (bug 127676).

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Ensure that DocumentLoader loader remains alive while DocumentLoader::m_mainDocumentError is used.

Source/WebKit:

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didFinishLoadForFrame): If the navigationID is obsolete, skip update of the page load state to avoid failure of debug ASSERT.
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad): Ensure that DocumentLoader loader remains alive while DocumentLoader::m_request is used.

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

6:52 PM Changeset in webkit [289259] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r287899. rdar://problem/83925935

DataURLResourceMediaLoader decodes the URL repeatedly during a video playback
https://bugs.webkit.org/show_bug.cgi?id=234940

Reviewed by Darin Adler.

In r264864, we adopted a new SPI to tell AVFoundation that the entire file is available for custom URLs.
As a result, during a video playback, AVFoundation will request small data ranges instead of "caching"
the whole file again.

However, that leads to efficiency issue for DataURLResourceMediaLoader. Because it needs to decode the whole
URL when AVFoundation requests a data range, which is inefficient when the URL is very long.

This patch reverts the change in r264864 for the DataURLResourceMediaLoader case to fix the performance issue.
If DataURLDecoder::decode() supports decoding a data range in the future, we can change it back for better
memory efficiency.

  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::WebCoreAVFResourceLoader::responseReceived):

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

6:52 PM Changeset in webkit [289258] by Russell Epstein
  • 7 edits in branches/safari-613-branch

Cherry-pick r287891. rdar://problem/85345180

REGRESSION (r283723): Web Inspector: CSS declarations unexpectedly removed when editing property value
https://bugs.webkit.org/show_bug.cgi?id=233195

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Re-attach CSS property if it was detached while editing.

CSSProperty is detached when focusing on property name and deleting it. Consequent edits of the detached
CSSProperty were not saved. This patch re-attaches detached property at the previous position.

  • UserInterface/Models/CSSProperty.js: (WI.CSSProperty.prototype.set name):
  • UserInterface/Models/CSSStyleDeclaration.js: (WI.CSSStyleDeclaration.prototype.newBlankProperty): (WI.CSSStyleDeclaration.prototype.insertProperty): Introduce this method since the logic is used in two different places now.

LayoutTests:

Test removing CSS property name.

  • inspector/css/modify-css-property-expected.txt:
  • inspector/css/modify-css-property.html:
  • inspector/css/resources/modify-css-property.css: (.rule-e):

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

6:52 PM Changeset in webkit [289257] by Russell Epstein
  • 4 edits in branches/safari-613-branch

Cherry-pick r287847. rdar://problem/86488039

ASSERTION FAILED in RenderLayer::updateClipRects
https://bugs.webkit.org/show_bug.cgi?id=234315

Reviewed by Simon Fraser.

Source/WebCore:

In clippingRootForPainting(), the dialog element uses the top layer as its clipping root layer.
When it caculates the clip rects, it caculates all its ancestors' clip rects and caches them
including the clipping root layer. However, if the ancestor is a transformed layer, it should be
treated as a root layer. When the transformed layer updates its clip rects, the root layer won't
match the one in cache. This patch stops the dialog descendant propagating its clipping root layer
to the ancestors' in cache.

  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::clipCrossesPaintingBoundary const):

LayoutTests:

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

6:13 PM Changeset in webkit [289256] by Elliott Williams
  • 3 edits
    1 delete in trunk/Source/WTF

Replace "Copy WTF Headers" with native build phases
https://bugs.webkit.org/show_bug.cgi?id=235744

Reviewed by Alexey Proskuryakov.

Replace the rsync-based script that copied WTF headers with Xcode-native copy file phases.
Unfortunately, this entails having separate build phases for each subdirectory of <wtf/...>.

Workspace builds may have dependencies on individual headers in WTF, and the native copy
phases provide the build system with enough information to form those task dependencies.

  • Configurations/WTF.xcconfig: Set PRIVATE_HEADERS_FOLDER_PATH.
  • Configurations/CopyWTFHeaders.xcconfig: Removed.
  • WTF.xcodeproj/project.pbxproj: Remove "Copy WTF Headers" and add copy file phases.
6:05 PM Changeset in webkit [289255] by Brent Fulgham
  • 8 edits in trunk

Always sync ResourceRequest isAppInitiated request with NSURLRequest attribution value
https://bugs.webkit.org/show_bug.cgi?id=236167
<rdar://88490742>

Reviewed by Darin Adler.

Source/WebCore:

We should always keep the state of our 'isAppInitiated' flag in sync with the underlying
NSURLRequest object. This also corrects a problem where the 'setIsAppInitiated' method
does not mark the platform URL request as dirty, so it does not update with the correct
state of the flag.

Tests: New TestWebKitAPI Test (AppPrivacyReport.NSURLRequestConstructorAttribution)

  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::setIsAppInitiated):

  • platform/network/ResourceRequestBase.h:
  • platform/network/cf/ResourceRequest.h:
  • platform/network/cocoa/ResourceRequestCocoa.mm:

(WebCore::ResourceRequest::ResourceRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::copyRequestWithStorageSession):

  • rendering/RenderThemeIOS.mm:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWebKitAPI.xcscheme:
  • TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
5:45 PM Changeset in webkit [289254] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

WTF::HashAndUTF8CharactersTranslator::translate() falls through ASSERT_NOT_REACHED()
<https://webkit.org/b/234944>
<rdar://problem/87230618>

Reviewed by Darin Adler.

  • wtf/text/AtomStringImpl.cpp:

(WTF::HashAndUTF8CharactersTranslator::translate):

  • Change ASSERT_NOT_REACHED() to RELEASE_ASSERT_NOT_REACHED().
5:33 PM Changeset in webkit [289253] by jonlee@apple.com
  • 11 edits in trunk/LayoutTests

Unreviewed gardening.

Add fuzzy data to tests.

  • compositing/patterns/direct-pattern-compositing-cover.html:
  • compositing/patterns/direct-pattern-compositing-size.html:
  • css3/calc/block-mask-overlay-image-outset.html:
  • fast/backgrounds/background-opaque-clipped-gradients.html:
  • fast/borders/border-image-repeat-stretch.html:
  • fast/layers/overflow-scroll-transform-border-radius.html:
  • fast/text/international/system-language/hindi-system-font-punctuation.html:
  • fast/text/simple-lines-float.html:
  • http/tests/security/svg-image-with-cached-remote-image.html:
  • svg/clip-path/clip-opacity.html:
5:13 PM Changeset in webkit [289252] by Lauro Moura
  • 3 edits in trunk/Source/WebCore

Unreviewed, non-unified build fixes after 246907@main
https://bugs.webkit.org/show_bug.cgi?id=236256

  • style/ContainerQueryEvaluator.cpp:
  • style/ContainerQueryEvaluator.h:
5:13 PM Changeset in webkit [289251] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitscmpy] Adopt webkitbugspy for GitHub issues (Part 3)
https://bugs.webkit.org/show_bug.cgi?id=235899
<rdar://problem/88280520>

Reviewed by Dewei Zhu.

  • Tools/Scripts/webkitpy/init.py: Add webkitbugspy as a local dependency,

bump local dependency version dependencies.

Canonical link: https://commits.webkit.org/246935@main

5:13 PM Changeset in webkit [289250] by Jonathan Bedard
  • 7 edits in trunk/Tools

[webkitscmpy] Adopt webkitbugspy for GitHub issues (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=235899
<rdar://problem/88280520>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Add webkitbugspy dependency.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:

(GitHub): Build on top of webkitbugspy's mock GitHub server.
(GitHub.init): Pass mock environment to base class.
(GitHub.request): Let webkitbugspy handle issues.
(GitHub.enter): Deleted.
(GitHub.exit): Deleted.
(GitHub._users): Deleted.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:

(GitHub.PRGenerator.PullRequest): Linked issue should be an "issue" object.
(GitHub.PRGenerator.create): Ditto.
(GitHub.PRGenerator.update): Ditto.
(GitHub.PRGenerator._contributor): Leverage webkitbugpy to retrieve information
about unknown contributors.
(GitHub.PRGenerator.comment): Leverage webkitbugspy to create comments.
(GitHub.PRGenerator.comments): Leverage webkitbugspy to retrieve comments.
(GitHub.init): Construct a tracker, populate it's user mapping.
(GitHub.credentials): Leverage webkitbugspy to retrieve credentials.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/land_unittest.py:

(TestLandGitHub.webserver): Create a mock issue.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:

(TestNetworkPullRequestGitHub.webserver): Create a mock issue.

Canonical link: https://commits.webkit.org/246934@main

5:13 PM Changeset in webkit [289249] by Jonathan Bedard
  • 7 edits in trunk/Tools

[webkitscmpy] Adopt webkitbugspy for GitHub issues (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=235899
<rdar://problem/88280520>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py:

(Tracker.Encoder.default): Handle API url regexes.
(Tracker.init): Match API urls.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/github.py:

(GitHub.init): Spell "username" correctly.
(GitHub._issue): Handle case where assignee or watchers is undefined.
(GitHub.request): Rename "api_host" to "api_remote" to match webkitscmpy.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/github_unittest.py:

(TestGitHub.test_link):

Canonical link: https://commits.webkit.org/246933@main

4:22 PM Changeset in webkit [289248] by Tyler Wilcock
  • 9 edits
    5 adds in trunk

AX: Move node-dependent role computation to AccessibilityNodeObject from AccessibilityRenderObject
https://bugs.webkit.org/show_bug.cgi?id=236166

Reviewed by Chris Fleizach.

Source/WebCore:

AccessibilityRenderObject::determineAccessibilityRole has a lot of
logic for computing the object's role that depends only on the node
associated with the object, not the renderer. This means that objects
that typically have renderers but sometimes don't (e.g. objects with
hidden + aria-hidden="false", objects with display: contents)
can't have these roles, which is wrong.

This patch improves this by moving these node-dependent role
calcuations to a new determineAccessibilityRoleFromNode function, and
changing AccessibilityRenderObject to use that.

Test: accessibility/aria-visible-element-roles.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::determineAccessibilityRoleFromNode const):
Added.
(WebCore::AccessibilityNodeObject::isDescendantOfElementType const):
(WebCore::AccessibilityNodeObject::isFileUploadButton const):
Moved to AccessibilityObject.

  • accessibility/AccessibilityNodeObject.h:
  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isButton const):
Remove unnecessary whitespace.
(WebCore::AccessibilityObject::isFileUploadButton const):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
If properties of m_renderer don't yield a role, fallback to
determineAccessibilityRoleFromNode.
(WebCore::AccessibilityRenderObject::isDescendantOfElementType const):
Moved to AccessibilityNodeObject.

  • accessibility/AccessibilityRenderObject.h:

LayoutTests:

Add test to verify ARIA visible objects (e.g. those with hidden and
aria-hidden="false") compute their role and subrole properly based
on their DOM element.

  • accessibility/aria-visible-element-roles.html: Added.
  • platform/glib/accessibility/aria-visible-element-roles-expected.txt: Added.
  • platform/mac-wk1/accessibility/aria-visible-element-roles-expected.txt: Added.
  • platform/mac-wk2/accessibility/aria-visible-element-roles-expected.txt: Added.
  • platform/win/accessibility/aria-visible-element-roles-expected.txt: Added.
  • platform/mac-wk2/accessibility/roles-exposed-expected.txt:

This patch results in a progression in computing the role of these
inputs, which before were all consided to be AXGroup:

  • input[type='date']
  • input[type='datetime-local']
  • input[type='month']
  • input[type='time']
  • input[type='week']
4:18 PM Changeset in webkit [289247] by Chris Dumez
  • 82 edits
    6 copies
    27 adds
    2 deletes in trunk

Add support for sharing Shared Workers (including across WebProcesses)
https://bugs.webkit.org/show_bug.cgi?id=235958
<rdar://problem/88330666>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline existing WPT tests involving shared workers.

  • web-platform-tests/content-security-policy/connect-src/shared-worker-connect-src-allowed.sub-expected.txt:
  • web-platform-tests/content-security-policy/connect-src/shared-worker-connect-src-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/inside-worker/sharedworker-report-only.sub-expected.txt:
  • web-platform-tests/content-security-policy/inside-worker/sharedworker-script-src.sub-expected.txt:
  • web-platform-tests/content-security-policy/script-src/worker-set-timeout.sub-expected.txt:
  • web-platform-tests/html/browsers/offline/appcache/workers/appcache-worker.https-expected.txt:
  • web-platform-tests/html/cross-origin-embedder-policy/cross-origin-isolated-permission.https-expected.txt:
  • web-platform-tests/html/cross-origin-embedder-policy/shared-workers.https-expected.txt:
  • web-platform-tests/html/cross-origin-embedder-policy/worker-inheritance.sub.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/claim-shared-worker-fetch.https-expected.txt:
  • web-platform-tests/workers/SharedWorker_dataUrl-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-import-blob-url.window-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-import-data-url-cross-origin-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-import-data-url.window-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-import-referrer-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-import.window-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-options-credentials-expected.txt:
  • web-platform-tests/workers/semantics/multiple-workers/004-expected.txt:
  • web-platform-tests/workers/semantics/multiple-workers/008-expected.txt:
  • web-platform-tests/workers/shared-worker-from-blob-url.window-expected.txt:
  • web-platform-tests/workers/shared-worker-name-via-options-expected.txt:
  • web-platform-tests/workers/shared-worker-options-mismatch-expected.txt:
  • web-platform-tests/xhr/open-url-redirected-sharedworker-origin-expected.txt:

Source/WebCore:

Add support for sharing Shared Workers, including across WebProcesses. The architecture
is modeled after the one we use for Service Workers since they are very similar. I tried
sharing as much code as possible with Service Workers but some more work can probably be
done in this area.

With this change, shared workers should be mostly functional and spec compliant. However,
the feature remains disabled by default for now as there are still WPT tests failures I
need to investigate. Also, I need to implement a better process suspension logic on iOS
to replace the hack I added in this patch (to make the tests run reliably on iOS).

As with Service Workers, Shared Workers are partitioned by (Top Origin + Frame Origin)
for privacy reasons. This is achieved via the SharedWorkerKey object that we use as
HashMap key.

No new tests, covered by existing WPT tests.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/Logging.h:
  • workers/shared/SharedWorker.cpp:

(WebCore::SharedWorker::fromIdentifier):
(WebCore::SharedWorker::create):
(WebCore::SharedWorker::SharedWorker):
(WebCore::SharedWorker::~SharedWorker):
(WebCore::SharedWorker::didFinishLoading):
(WebCore::SharedWorker::virtualHasPendingActivity const):
(WebCore::SharedWorker::stop):
(WebCore::SharedWorker::terminate): Deleted.

  • workers/shared/SharedWorker.h:
  • workers/shared/SharedWorker.idl:
  • workers/shared/SharedWorkerKey.h: Added.

(WebCore::SharedWorkerKey::hash const):
(WebCore::SharedWorkerKey::encode const):
(WebCore::SharedWorkerKey::decode):
(WebCore::operator==):
(WTF::DefaultHash<WebCore::SharedWorkerKey>::hash):
(WTF::DefaultHash<WebCore::SharedWorkerKey>::equal):
(WTF::HashTraits<WebCore::SharedWorkerKey>::constructDeletedValue):
(WTF::HashTraits<WebCore::SharedWorkerKey>::isDeletedValue):

  • workers/shared/SharedWorkerManager.cpp: Removed.

(WebCore::SharedWorkerManager::singleton): Deleted.
(WebCore::SharedWorkerManager::connect): Deleted.
(WebCore::SharedWorkerManager::scriptLoadFailed): Deleted.
(WebCore::SharedWorkerManager::scriptLoadedSuccessfully): Deleted.

  • workers/shared/SharedWorkerManager.h: Removed.
  • workers/shared/SharedWorkerObjectConnection.cpp:

(WebCore::SharedWorkerObjectConnection::fetchScriptInClient):
(WebCore::SharedWorkerObjectConnection::notifyWorkerObjectOfLoadCompletion):
(WebCore::SharedWorkerObjectConnection::postExceptionToWorkerObject):

  • workers/shared/SharedWorkerObjectConnection.h:
  • workers/shared/SharedWorkerObjectIdentifier.h: Copied from Source/WebCore/workers/shared/SharedWorkerObjectConnection.cpp.
  • workers/shared/SharedWorkerScriptLoader.cpp:

(WebCore::SharedWorkerScriptLoader::SharedWorkerScriptLoader):
(WebCore::SharedWorkerScriptLoader::load):
(WebCore::SharedWorkerScriptLoader::notifyFinished):

  • workers/shared/SharedWorkerScriptLoader.h:

(WebCore::SharedWorkerScriptLoader::options const):
(WebCore::SharedWorkerScriptLoader::identifier const): Deleted.
(WebCore::SharedWorkerScriptLoader::options): Deleted.

  • workers/shared/context/SharedWorkerContextManager.cpp: Added.

(WebCore::SharedWorkerContextManager::singleton):
(WebCore::SharedWorkerContextManager::sharedWorker const):
(WebCore::SharedWorkerContextManager::stopSharedWorker):
(WebCore::SharedWorkerContextManager::stopAllSharedWorkers):
(WebCore::SharedWorkerContextManager::setConnection):
(WebCore::SharedWorkerContextManager::connection const):
(WebCore::SharedWorkerContextManager::registerSharedWorkerThread):
(WebCore::SharedWorkerContextManager::Connection::postConnectEvent):
(WebCore::SharedWorkerContextManager::Connection::terminateSharedWorker):

  • workers/shared/context/SharedWorkerContextManager.h: Added.

(WebCore::SharedWorkerContextManager::Connection::~Connection):
(WebCore::SharedWorkerContextManager::Connection::isClosed const):
(WebCore::SharedWorkerContextManager::Connection::setAsClosed):

  • workers/shared/context/SharedWorkerThreadProxy.cpp:

(WebCore::generateWorkerParameters):
(WebCore::SharedWorkerThreadProxy::SharedWorkerThreadProxy):
(WebCore::SharedWorkerThreadProxy::~SharedWorkerThreadProxy):
(WebCore::SharedWorkerThreadProxy::notifyNetworkStateChange):
(WebCore::SharedWorkerThreadProxy::postExceptionToWorkerObject):
(WebCore::SharedWorkerThreadProxy::createCacheStorageConnection):
(WebCore::SharedWorkerThreadProxy::createRTCDataChannelRemoteHandlerConnection):
(WebCore::SharedWorkerThreadProxy::postTaskToLoader):
(WebCore::SharedWorkerThreadProxy::postTaskForModeToWorkerOrWorkletGlobalScope):
(WebCore::SharedWorkerThreadProxy::networkStateChanged):
(WebCore::SharedWorkerThreadProxy::startWorkerGlobalScope): Deleted.
(WebCore::SharedWorkerThreadProxy::terminateWorkerGlobalScope): Deleted.
(WebCore::SharedWorkerThreadProxy::postMessageToWorkerGlobalScope): Deleted.
(WebCore::SharedWorkerThreadProxy::postTaskToWorkerGlobalScope): Deleted.
(WebCore::SharedWorkerThreadProxy::hasPendingActivity const): Deleted.
(WebCore::SharedWorkerThreadProxy::workerObjectDestroyed): Deleted.
(WebCore::SharedWorkerThreadProxy::suspendForBackForwardCache): Deleted.
(WebCore::SharedWorkerThreadProxy::resumeForBackForwardCache): Deleted.
(WebCore::SharedWorkerThreadProxy::workerGlobalScopeDestroyed): Deleted.
(WebCore::SharedWorkerThreadProxy::postMessageToWorkerObject): Deleted.
(WebCore::SharedWorkerThreadProxy::confirmMessageFromWorkerObject): Deleted.
(WebCore::SharedWorkerThreadProxy::reportPendingActivity): Deleted.
(WebCore::SharedWorkerThreadProxy::workerGlobalScopeDestroyedInternal): Deleted.

  • workers/shared/context/SharedWorkerThreadProxy.h:

Source/WebKit:

Add support for sharing Shared Workers, including across WebProcesses. The architecture
is modeled after the one we use for Service Workers since they are very similar. I tried
sharing as much code as possible with Service Workers but some more work can probably be
done in this area.

With this change, shared workers should be mostly functional and spec compliant. However,
the feature remains disabled by default for now as there are still WPT tests failures I
need to investigate. Also, I need to implement a better process suspension logic on iOS
to replace the hack I added in this patch (to make the tests run reliably on iOS).

As with Service Workers, Shared Workers are partitioned by (Top Origin + Frame Origin)
for privacy reasons. This is achieved via the SharedWorkerKey object that we use as
HashMap key.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::m_schemeRegistry):
(WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess):
(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::establishSharedWorkerContextConnection):
(WebKit::NetworkConnectionToWebProcess::establishSharedWorkerServerConnection):
(WebKit::NetworkConnectionToWebProcess::closeSharedWorkerContextConnection):
(WebKit::NetworkConnectionToWebProcess::unregisterSharedWorkerConnection):
(WebKit::NetworkConnectionToWebProcess::sharedWorkerServerToContextConnectionIsNoLongerNeeded):
(WebKit::NetworkConnectionToWebProcess::sharedWorkerConnection):

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

(WebKit::NetworkSession::ensureSharedWorkerServer):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::sharedWorkerServer):

  • NetworkProcess/SharedWorker/WebSharedWorker.cpp: Copied from Source/WebKit/WebProcess/Storage/WebSharedWorkerObjectConnection.cpp.

(WebKit::WebSharedWorker::WebSharedWorker):
(WebKit::WebSharedWorker::~WebSharedWorker):
(WebKit::WebSharedWorker::fromIdentifier):
(WebKit::WebSharedWorker::registrableDomain const):

  • NetworkProcess/SharedWorker/WebSharedWorker.h: Added.

(WebKit::WebSharedWorker::identifier const):
(WebKit::WebSharedWorker::key const):
(WebKit::WebSharedWorker::workerOptions const):
(WebKit::WebSharedWorker::origin const):
(WebKit::WebSharedWorker::url const):
(WebKit::WebSharedWorker::sharedWorkerObjects):
(WebKit::WebSharedWorker::isRunning const):
(WebKit::WebSharedWorker::markAsRunning):
(WebKit::WebSharedWorker::fetchResult const):
(WebKit::WebSharedWorker::setFetchResult):
(WebKit::WebSharedWorker::didFinishFetching const):

  • NetworkProcess/SharedWorker/WebSharedWorkerServer.cpp: Added.

(WebKit::WebSharedWorkerServer::WebSharedWorkerServer):
(WebKit::WebSharedWorkerServer::sessionID):
(WebKit::WebSharedWorkerServer::requestSharedWorker):
(WebKit::WebSharedWorkerServer::didFinishFetchingSharedWorkerScript):
(WebKit::WebSharedWorkerServer::needsContextConnectionForRegistrableDomain const):
(WebKit::WebSharedWorkerServer::createContextConnection):
(WebKit::WebSharedWorkerServer::addContextConnection):
(WebKit::WebSharedWorkerServer::removeContextConnection):
(WebKit::WebSharedWorkerServer::contextConnectionCreated):
(WebKit::WebSharedWorkerServer::sharedWorkerObjectIsGoingAway):
(WebKit::WebSharedWorkerServer::shutDownSharedWorker):
(WebKit::WebSharedWorkerServer::addConnection):
(WebKit::WebSharedWorkerServer::removeConnection):
(WebKit::WebSharedWorkerServer::contextConnectionForRegistrableDomain const):
(WebKit::WebSharedWorkerServer::postExceptionToWorkerObject):

  • NetworkProcess/SharedWorker/WebSharedWorkerServer.h: Added.
  • NetworkProcess/SharedWorker/WebSharedWorkerServerConnection.cpp: Added.

(WebKit::WebSharedWorkerServerConnection::WebSharedWorkerServerConnection):
(WebKit::WebSharedWorkerServerConnection::~WebSharedWorkerServerConnection):
(WebKit::WebSharedWorkerServerConnection::messageSenderConnection const):
(WebKit::WebSharedWorkerServerConnection::sessionID):
(WebKit::WebSharedWorkerServerConnection::session):
(WebKit::WebSharedWorkerServerConnection::requestSharedWorker):
(WebKit::WebSharedWorkerServerConnection::sharedWorkerObjectIsGoingAway):
(WebKit::WebSharedWorkerServerConnection::fetchScriptInClient):
(WebKit::WebSharedWorkerServerConnection::notifyWorkerObjectOfLoadCompletion):
(WebKit::WebSharedWorkerServerConnection::postExceptionToWorkerObject):

  • NetworkProcess/SharedWorker/WebSharedWorkerServerConnection.h: Added.

(WebKit::WebSharedWorkerServerConnection::server):
(WebKit::WebSharedWorkerServerConnection::server const):
(WebKit::WebSharedWorkerServerConnection::webProcessIdentifier const):

  • NetworkProcess/SharedWorker/WebSharedWorkerServerConnection.messages.in: Added.
  • NetworkProcess/SharedWorker/WebSharedWorkerServerToContextConnection.cpp: Added.

(WebKit::WebSharedWorkerServerToContextConnection::WebSharedWorkerServerToContextConnection):
(WebKit::WebSharedWorkerServerToContextConnection::~WebSharedWorkerServerToContextConnection):
(WebKit::WebSharedWorkerServerToContextConnection::webProcessIdentifier const):
(WebKit::WebSharedWorkerServerToContextConnection::ipcConnection const):
(WebKit::WebSharedWorkerServerToContextConnection::messageSenderConnection const):
(WebKit::WebSharedWorkerServerToContextConnection::messageSenderDestinationID const):
(WebKit::WebSharedWorkerServerToContextConnection::connectionIsNoLongerNeeded):
(WebKit::WebSharedWorkerServerToContextConnection::postExceptionToWorkerObject):
(WebKit::WebSharedWorkerServerToContextConnection::launchSharedWorker):
(WebKit::WebSharedWorkerServerToContextConnection::postConnectEvent):
(WebKit::WebSharedWorkerServerToContextConnection::terminateSharedWorker):

  • NetworkProcess/SharedWorker/WebSharedWorkerServerToContextConnection.h: Added.
  • NetworkProcess/SharedWorker/WebSharedWorkerServerToContextConnection.messages.in: Added.
  • Platform/Logging.h:
  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):

  • Sources.txt:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::terminateUnresponsiveServiceWorkerProcesses):
(WebKit::NetworkProcessProxy::establishSharedWorkerContextConnectionToNetworkProcess):
(WebKit::NetworkProcessProxy::establishServiceWorkerContextConnectionToNetworkProcess):
(WebKit::NetworkProcessProxy::serviceWorkerContextConnectionNoLongerNeeded):
(WebKit::NetworkProcessProxy::sharedWorkerContextConnectionNoLongerNeeded):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setUserAgent):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::establishServiceWorkerContextConnectionToNetworkProcess):
(WebKit::WebProcessPool::removeFromWorkerProcesses):
(WebKit::WebProcessPool::establishSharedWorkerContextConnectionToNetworkProcess):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::userContentControllerIdentifierForWorkers):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::updateWorkerUserAgent):
(WebKit::WebProcessPool::terminateServiceWorkers):
(WebKit::WebProcessPool::workerProcesses):
(WebKit::WebProcessPool::updateProcessAssertions):
(WebKit::WebProcessPool::isServiceWorkerPageID const):
(WebKit::WebProcessPool::serviceWorkerProxiesCount const):
(WebKit::WebProcessPool::hasServiceWorkerForegroundActivityForTesting const):
(WebKit::WebProcessPool::hasServiceWorkerBackgroundActivityForTesting const):
(WebKit::WebProcessPool::removeFromServiceWorkerProcesses): Deleted.
(WebKit::WebProcessPool::userContentControllerIdentifierForServiceWorkers): Deleted.
(WebKit::WebProcessPool::updateServiceWorkerUserAgent): Deleted.
(WebKit::WebProcessPool::serviceWorkerProcesses): Deleted.

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::createForWorkers):
(WebKit::WebProcessProxy::didBecomeUnresponsive):
(WebKit::WebProcessProxy::didStartProvisionalLoadForMainFrame):
(WebKit::WebProcessProxy::setWorkerUserAgent):
(WebKit::WebProcessProxy::updateWorkerPreferencesStore):
(WebKit::WebProcessProxy::updateWorkerProcessAssertion):
(WebKit::WebProcessProxy::establishSharedWorkerContext):
(WebKit::WebProcessProxy::registerServiceWorkerClientProcess):
(WebKit::WebProcessProxy::unregisterServiceWorkerClientProcess):
(WebKit::WebProcessProxy::startServiceWorkerBackgroundProcessing):
(WebKit::WebProcessProxy::endServiceWorkerBackgroundProcessing):
(WebKit::WebProcessProxy::disableWorkers):
(WebKit::WebProcessProxy::enableWorkers):
(WebKit::WebProcessProxy::createForServiceWorkers): Deleted.
(WebKit::WebProcessProxy::setServiceWorkerUserAgent): Deleted.
(WebKit::WebProcessProxy::updateServiceWorkerPreferencesStore): Deleted.
(WebKit::WebProcessProxy::updateServiceWorkerProcessAssertion): Deleted.
(WebKit::WebProcessProxy::disableServiceWorkers): Deleted.
(WebKit::WebProcessProxy::enableServiceWorkers): Deleted.

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::isRunningSharedWorkers const):
(WebKit::WebProcessProxy::isStandaloneSharedWorkerProcess const):
(WebKit::WebProcessProxy::isRunningWorkers const):
(WebKit::WebProcessProxy::hasServiceWorkerPageProxy):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::didReceiveMessage):

  • WebProcess/Network/NetworkProcessConnection.h:
  • WebProcess/Storage/WebSharedWorkerContextManagerConnection.cpp: Added.

(WebKit::WebSharedWorkerContextManagerConnection::WebSharedWorkerContextManagerConnection):
(WebKit::m_userContentController):
(WebKit::WebSharedWorkerContextManagerConnection::establishConnection):
(WebKit::WebSharedWorkerContextManagerConnection::postExceptionToWorkerObject):
(WebKit::WebSharedWorkerContextManagerConnection::updatePreferencesStore):
(WebKit::WebSharedWorkerContextManagerConnection::launchSharedWorker):
(WebKit::WebSharedWorkerContextManagerConnection::close):

  • WebProcess/Storage/WebSharedWorkerContextManagerConnection.h: Added.
  • WebProcess/Storage/WebSharedWorkerContextManagerConnection.messages.in: Added.
  • WebProcess/Storage/WebSharedWorkerObjectConnection.cpp:

(WebKit::WebSharedWorkerObjectConnection::WebSharedWorkerObjectConnection):
(WebKit::WebSharedWorkerObjectConnection::~WebSharedWorkerObjectConnection):
(WebKit::WebSharedWorkerObjectConnection::requestSharedWorker):
(WebKit::WebSharedWorkerObjectConnection::sharedWorkerObjectIsGoingAway):

  • WebProcess/Storage/WebSharedWorkerObjectConnection.h:
  • WebProcess/Storage/WebSharedWorkerObjectConnection.messages.in: Added.
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::didReceiveMessage):
(WebKit::WebProcess::establishSharedWorkerContextConnectionToNetworkProcess):

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

LayoutTests:

Rebaseline existing WPT tests involving shared workers.

  • TestExpectations:
  • platform/gtk-wk2/imported/w3c/web-platform-tests/content-security-policy/inside-worker/sharedworker-connect-src.sub-expected.txt: Added.
  • platform/gtk-wk2/imported/w3c/web-platform-tests/content-security-policy/inside-worker/sharedworker-report-only.sub-expected.txt: Added.
  • platform/gtk-wk2/imported/w3c/web-platform-tests/content-security-policy/inside-worker/sharedworker-script-src.sub-expected.txt: Added.
  • platform/gtk-wk2/imported/w3c/web-platform-tests/workers/modules/shared-worker-import-blob-url.window-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/modules/shared-worker-import-blob-url.window-expected.txt.
  • platform/gtk-wk2/imported/w3c/web-platform-tests/workers/modules/shared-worker-import-data-url.window-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/modules/shared-worker-import-data-url.window-expected.txt.
  • platform/gtk-wk2/imported/w3c/web-platform-tests/workers/modules/shared-worker-import.window-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/modules/shared-worker-import.window-expected.txt.
  • platform/gtk-wk2/imported/w3c/web-platform-tests/workers/modules/shared-worker-options-credentials-expected.txt: Added.
  • platform/gtk-wk2/imported/w3c/web-platform-tests/xhr/open-url-redirected-sharedworker-origin-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/xhr/open-url-redirected-sharedworker-origin-expected.txt.
3:17 PM Changeset in webkit [289246] by Megan Gardner
  • 13 edits in trunk/Source

Update hover state based on pointer type.
https://bugs.webkit.org/show_bug.cgi?id=236249

Reviewed by Tim Horton.

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::updateHoverActiveState):

  • dom/Element.cpp:

(WebCore::Element::setHovered):

  • dom/Element.h:
  • html/HTMLLabelElement.cpp:

(WebCore::HTMLLabelElement::setHovered):

  • html/HTMLLabelElement.h:
  • html/HTMLTextFormControlElement.cpp:

(WebCore::pointerTypeFromHitTestRequest):
(WebCore::showPlaceholderForPointer):
(WebCore::HTMLTextFormControlElement::setHovered):
(WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible const):

  • html/HTMLTextFormControlElement.h:
  • html/shadow/SpinButtonElement.cpp:

(WebCore::SpinButtonElement::setHovered):

  • html/shadow/SpinButtonElement.h:
  • page/EventHandler.cpp:

(addPointerTypeToHitTestRequest):
(WebCore::EventHandler::handleMouseMoveEvent):

Source/WebKit:

  • UIProcess/ios/WKMouseGestureRecognizer.mm:

(pointerTypeForUITouchType):
(-[WKMouseGestureRecognizer createMouseEventWithType:wasCancelled:]):
(-[WKMouseGestureRecognizer checkTouches:]):

3:13 PM Changeset in webkit [289245] by commit-queue@webkit.org
  • 21 edits
    2 deletes in trunk

Unreviewed, reverting r289239.
https://bugs.webkit.org/show_bug.cgi?id=236264

broke builds on older internal SDKs

Reverted changeset:

"Add PushService"
https://bugs.webkit.org/show_bug.cgi?id=235857
https://commits.webkit.org/r289239

3:06 PM Changeset in webkit [289244] by Chris Dumez
  • 3 edits
    1 delete in trunk/LayoutTests

Unreviewed, rename test in TestExpectations to match the actual test name.

The test was likely renamed but TestExpectations were not updated accordingly.
As per the bots, the test is still flaky.

  • TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio-lazy.tentative-expected.txt: Removed.
3:05 PM Changeset in webkit [289243] by Jonathan Bedard
  • 15 edits in trunk/Tools

[webkitbugspy] Assign and close issues
https://bugs.webkit.org/show_bug.cgi?id=235835
<rdar://problem/88203672>

Reviewed by Dewei Zhu.

Allow webkitbugspy to edit the assignee and open or close issues.

  • Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:

(Tracker.set): Send a put request to modify assignee or bug state.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py:

(Tracker.set): Send a patch request to modify assignee or bug state.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/issue.py:

(Issue.open): Re-open a closed issue, provide an optional reason.
(Issue.close): Close an open issue, with an optional reason.
(Issue.assign): Assign issue to the provided user, along with an optional reason.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/bugzilla.py:

(Bugzilla._issue): Edit mocked representation of an issue.
(Bugzilla.request): Handle put request modifying issue.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/github.py:

(GitHub._issue): Edit mocked representation of an issue.
(GitHub.request): Handle patch request modifying issue.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/radar.py:

(RadarModel.Person.init): Accept dictionary.
(RadarModel.init): Correct 'state' values, mock radar parameters.
(RadarModel.commit_changes): Modify assignee and state.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py:

(Priority): Add radar priority integers.
(Tracker.set): Modify assignee and state.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py:

(TestBugzilla.test_assign):
(TestBugzilla.test_assign_why):
(TestBugzilla.test_state):
(TestBugzilla.test_state_why):

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/github_unittest.py:

(TestGitHub.test_assign):
(TestGitHub.test_assign_why):
(TestGitHub.test_state):
(TestGitHub.test_state_why):

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/radar_unittest.py:

(TestRadar.test_assign):
(TestRadar.test_assign_why):
(TestRadar.test_state):
(TestRadar.test_state_why):

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tracker.py:

(Tracker.set): Generic API for Issues to modify their representation in their
respective tracker.

Canonical link: https://commits.webkit.org/246927@main

3:03 PM Changeset in webkit [289242] by Jean-Yves Avenard
  • 2 edits in trunk/Source/WebKit

Improve fullscreen transition when going to/from fullscreen
https://bugs.webkit.org/show_bug.cgi?id=236058
rdar://88415100

Reviewed by Dean Jackson.

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):

2:27 PM Changeset in webkit [289241] by Alan Bujtas
  • 4 edits
    2 adds in trunk

Updating grid gap value does not recalculate styles
https://bugs.webkit.org/show_bug.cgi?id=233252
<rdar://problem/85727334>

Reviewed by Simon Fraser.

Source/WebCore:

Both column and row gap style value change need to initiate layout in order to update their geometries.

Test: fast/dynamic/gap-style-change-should-initiate-layout.html

  • rendering/style/RenderStyle.cpp:

(WebCore::rareNonInheritedDataChangeRequiresLayout):

LayoutTests:

  • fast/dynamic/gap-style-change-should-initiate-layout-expected.html: Added.
  • fast/dynamic/gap-style-change-should-initiate-layout.html: Added.
2:26 PM Changeset in webkit [289240] by Simon Fraser
  • 14 edits in trunk

Tidy up some ImageBuffer-related classes
https://bugs.webkit.org/show_bug.cgi?id=236170

Reviewed by Darin Adler.
Source/WebCore:

Remove some forward declarations in ImageBuffer.h unused by ImageBuffer.

DisplayList::ImageBuffer can be final.
ImageBufferCGBitmapBackend can be final.

No need to WEBCORE_EXPORT ImageBufferCGBitmapBackend functions now that TestWebKitAPI
is using ImageBuffer functions.

  • html/canvas/CanvasRenderingContext2DBase.h:
  • platform/graphics/ImageBuffer.h:
  • platform/graphics/cg/ImageBufferCGBitmapBackend.h:
  • platform/graphics/displaylists/DisplayListImageBuffer.h:

(WebCore::DisplayList::ImageBuffer::create): Deleted.
(WebCore::DisplayList::ImageBuffer::ImageBuffer): Deleted.
(WebCore::DisplayList::ImageBuffer::~ImageBuffer): Deleted.

Source/WebKit:

CGDisplayListImageBufferBackend can be final.
ImageBufferShareableBitmapBackend can be final.
Functions on ImageBufferShareableIOSurfaceBackend can be final.

  • Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.h:
  • WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:

(WebKit::ImageBufferShareableBitmapBackend::setOwnershipIdentity): Deleted.

  • WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.h:

Tools:

ImageBufferTests should use the functions on ImageBuffer, not WebCore-internal
classes.

  • TestWebKitAPI/Tests/WebCore/ImageBufferTests.cpp:

(TestWebKitAPI::TEST):

2:07 PM Changeset in webkit [289239] by Ben Nham
  • 21 edits
    2 adds in trunk

Add PushService
https://bugs.webkit.org/show_bug.cgi?id=235857

Reviewed by Brady Eidson.

Source/WebKit:

This adds PushService to webpushd. It handles requests to create, remove, and get push
subscriptions. It also decrypts incoming pushes and pass them back to the UI process via the
existing machinery in WebPushDaemon.

PushService primarily interacts with two objects:

  1. PushServiceConnection: this creates and removes push subscriptions from the push server. It also receives incoming pushes from the push server.
  2. PushDatabase: this persists push subscriptions to disk.

Several things are not yet implemented; for instance, we currently always grant a page the
permission to receive pushes. This will be fixed in future patches.

Covered by new API tests. The current tests use a MockPushServiceConnection that vends
subscription with fixed data, but this can be improved in the future.

  • Shared/API/Cocoa/WKMain.h:
  • Shared/API/Cocoa/WKMain.mm:

(WKWebPushDaemonMain):

  • Shared/Cocoa/WebPushMessageCocoa.mm: add ability to distinguish between an empty vs. null payload.

(WebKit::WebPushMessage::fromDictionary):
(WebKit::WebPushMessage::toDictionary const):

  • Shared/WebPushDaemonConstants.h:

(WebKit::WebPushD::messageTypeSendsReply):

  • Shared/WebPushMessage.h:

(WebKit::WebPushMessage::decode):

  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/MockPushServiceConnection.h:
  • webpushd/MockPushServiceConnection.mm:

(WebPushD::MockPushServiceConnection::generateClientKeys):
(WebPushD::MockPushServiceConnection::subscribe):
(WebPushD::MockPushServiceConnection::unsubscribe):

  • webpushd/PushService.h: Added.

(WebPushD::PushService::connection):
(WebPushD::PushService::database):
(WebPushD::PushService::didReceivePushMessage):

  • webpushd/PushService.mm: Added.

(WebPushD::updateTopicLists):
(WebPushD::PushService::create):
(WebPushD::PushService::createMockService):
(WebPushD::PushService::PushService):
(WebPushD::makePushSubscriptionFromRecord):
(WebPushD::makePushTopic):
(WebPushD::PushServiceRequest::bundleIdentifier):
(WebPushD::PushServiceRequest::scope):
(WebPushD::PushServiceRequest::PushServiceRequest):
(WebPushD::PushServiceRequestImpl::PushServiceRequestImpl):
(WebPushD::PushServiceRequestImpl::fulfill):
(WebPushD::PushServiceRequestImpl::reject):
(WebPushD::GetSubscriptionRequest::GetSubscriptionRequest):
(WebPushD::GetSubscriptionRequest::startInternal):
(WebPushD::SubscribeRequest::SubscribeRequest):
(WebPushD::SubscribeRequest::startImpl):
(WebPushD::SubscribeRequest::attemptToRecoverFromTopicAlreadyInFilterError):
(WebPushD::UnsubscribeRequest::UnsubscribeRequest):
(WebPushD::UnsubscribeRequest::startInternal):
(WebPushD::PushService::enqueuePushServiceRequest):
(WebPushD::PushService::finishedPushServiceRequest):
(WebPushD::PushService::getSubscription):
(WebPushD::PushService::didCompleteGetSubscriptionRequest):
(WebPushD::PushService::subscribe):
(WebPushD::PushService::didCompleteSubscribeRequest):
(WebPushD::PushService::unsubscribe):
(WebPushD::PushService::didCompleteUnsubscribeRequest):
(WebPushD::makeRawPushMessage):
(WebPushD::PushService::didReceivePushMessage):

  • webpushd/PushServiceConnection.h:
  • webpushd/PushServiceConnection.mm:

(WebPushD::PushServiceConnection::generateClientKeys):

  • webpushd/WebPushDaemon.h:
  • webpushd/WebPushDaemon.mm:

(WebPushD::MessageInfo::injectEncryptedPushMessageForTesting::encodeReply):
(WebPushD::Daemon::startMockPushService):
(WebPushD::Daemon::startPushService):
(WebPushD::Daemon::setPushService):
(WebPushD::Daemon::runAfterStartingPushService):
(WebPushD::Daemon::decodeAndHandleMessage):
(WebPushD::Daemon::injectEncryptedPushMessageForTesting):
(WebPushD::Daemon::handleIncomingPush):
(WebPushD::Daemon::getPendingPushMessages):
(WebPushD::Daemon::subscribeToPushService):
(WebPushD::Daemon::unsubscribeFromPushService):
(WebPushD::Daemon::getPushSubscription):
(WebPushD::Daemon::getPushPermissionState):

  • webpushd/WebPushDaemonMain.h:
  • webpushd/WebPushDaemonMain.mm:

(WebKit::WebPushDaemonMain):

  • webpushd/com.apple.webkit.webpushd.mac.plist:
  • webpushd/webpushd.cpp:

(main):

Source/WTF:

Add PushAPIEnabled to WebKitLegacy so we can enable it on in API tests via _WKExperimentalFeature.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Tools:

  • Modifed the existing injected push test to inject different types of real push objects from APS (an empty push, an aesgcm-encrypted push, and an aes128gcm-encrypted push).
  • Add a few basic test cases for subscribing and unsubscribing from push.
  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

(-[NotificationScriptMessageHandler setMessageHandler:]):
(-[NotificationScriptMessageHandler userContentController:didReceiveScriptMessage:]):
(TestWebKitAPI::testWebPushDaemonPList):
(TestWebKitAPI::createMessageDictionary):
(TestWebKitAPI::sendMessageToDaemon):
(TestWebKitAPI::sendMessageToDaemonWaitingForReply):
(TestWebKitAPI::sendConfigurationWithAuditToken):
(TestWebKitAPI::TEST):
(TestWebKitAPI::function): Deleted.

1:19 PM Changeset in webkit [289238] by Tyler Wilcock
  • 11 edits
    3 adds in trunk

AX: The isolated tree needs to fix-up table cell parent relationships
https://bugs.webkit.org/show_bug.cgi?id=236156

Reviewed by Chris Fleizach.

Source/WebCore:

Tables are not very navigable by AX clients in isolated tree mode.
This is because our current representation of table elements doesn't
perfectly follow the normal parent-child relationship of other elements,
i.e. some non-row elements can return cells from children(), but the cells
must regard their row as the "real" parent.

We've had to work around this in the live tree in AccessibilityObject::insertChild, too:

https://github.com/WebKit/WebKit/blob/main/Source/WebCore/accessibility/AccessibilityObject.cpp#L626#L628

In this patch, when creating an isolated object, we override the "assumed" parent ID
to the correct parent ID for cell-like elements.

Test: accessibility/table-search-traversal.html

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::parentIDForObject):
Added.
(WebCore::AXIsolatedTree::nodeChangeForObject):
Call parentIDForObject to determine the correct parent for the
to-be-created isolated object.

  • accessibility/isolatedtree/AXIsolatedTree.h:

Tools:

Add AccessibilityUIElement::role implementation for use in new
accessibility/table-search-traversal.html test.

  • DumpRenderTree/ios/AccessibilityUIElementIOS.mm:

(AccessibilityUIElement::role):
Added implementation.

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::role):
Added implementation.

LayoutTests:

Add test verifying the the new, more correct isolated tree behavior.

  • platform/glib/TestExpectations:
  • platform/win/TestExpectations:

Skip new accessibility/table-search-traversal.html test due to
missing AccessibilityUIElement::uiElementForSearchPredicate implementation.

  • platform/ios/TestExpectations:

Enable new accessibility/table-search-traversal.html test.

  • accessibility/table-search-traversal.html: Added.
  • platform/ios/accessibility/table-search-traversal-expected.txt: Added.
  • platform/mac/accessibility/table-search-traversal-expected.txt: Added.
  • platform/ios/imported/blink/accessibility/link-inside-label-expected.txt:

This patch implements AccessibilityUIElement::role on iOS, which
changes this test's output (in a positive way).

12:18 PM Changeset in webkit [289237] by Wenson Hsieh
  • 12 edits in trunk/Source

Add PageClient plumbing for video frame extraction
https://bugs.webkit.org/show_bug.cgi?id=236100
rdar://86237608

Reviewed by Eric Carlson.

Source/WebCore:

Add a method to grab the AVPlayerViewController from a VideoFullscreenInterfaceAVKit. See WebKit/ChangeLog for
more details.

  • platform/ios/VideoFullscreenInterfaceAVKit.h:
  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(-[WebAVPlayerViewController avPlayerViewController]):
(VideoFullscreenInterfaceAVKit::avPlayerViewController const):

Source/WebKit:

Finish off support for fullscreen video extraction by adding a new iOS PageClient hook, and calling into it
after grabbing a video frame from the GPU process when the video extraction timer fires.

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:

(WebKit::VideoFullscreenManagerProxy::findInterface const):
(WebKit::VideoFullscreenManagerProxy::playerViewController const):
(WebKit::VideoFullscreenManagerProxy::findInterface): Deleted.

Mark this method as const, so that we can invoke it from VideoFullscreenManagerProxy::playerViewController.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::updateFullscreenVideoExtraction):
(WebKit::WebPageProxy::fullscreenVideoExtractionTimerFired):

Request video frame data from the GPU process and hand it over to the page client along with the
AVPlayerViewController corresponding to the current fullscreen video.

  • UIProcess/PageClient.h:

(WebKit::PageClient::isFullscreenVideoExtractionEnabled const):

  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::beginFullscreenVideoExtraction):
(WebKit::PageClientImpl::cancelFullscreenVideoExtraction):
(WebKit::PageClientImpl::isFullscreenVideoExtractionEnabled const):

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

Add a new WebKitAdditions extension point that contains the implementations of the three methods below; when
compiling without WebKitAdditions, we simply stub out these methods.

(-[WKContentView beginFullscreenVideoExtraction:playerViewController:]):
(-[WKContentView cancelFullscreenVideoExtraction:]):
(-[WKContentView isFullscreenVideoExtractionEnabled]):

11:57 AM Changeset in webkit [289236] by Chris Dumez
  • 4 edits in trunk

WorkerGlobalScope.importScripts() should protect blob urls that were passed in until the imports are done