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

Timeline



Feb 4, 2021:

11:40 PM Changeset in webkit [272404] by Devin Rousso
  • 3 edits in trunk/LayoutTests

Add intermediate volume icon states between "mute" and "max"
https://bugs.webkit.org/show_bug.cgi?id=221371

Unreviewed test fix.

  • media/modern-media-controls/mute-button/mute-button.html:
  • media/modern-media-controls/mute-button/mute-button-expected.txt:
7:56 PM Changeset in webkit [272403] by Lauro Moura
  • 3 edits
    1 add in trunk/LayoutTests

[GLIB] Gardening accessibility and font failures

Unreviewed test gardening.

The img-with-svg-source.html test differed only in the content of the
image.description field, with empty AXDescription text, like other
accessibility tests.

  • platform/glib/TestExpectations:
  • platform/glib/accessibility/img-with-svg-source-expected.txt: Added.
  • platform/gtk/TestExpectations:
5:36 PM Changeset in webkit [272402] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.31.1

WPE WebKit 2.31.31

5:35 PM Changeset in webkit [272401] by Adrian Perez de Castro
  • 4 edits in trunk

Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.31.1 release

.:

  • Source/cmake/OptionsWPE.cmake: Bump version numbers.

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.31.1.
5:11 PM Changeset in webkit [272400] by Ross Kirsling
  • 3 edits in trunk/Source/WebKit

REGRESSION (r272382): 2 webkit.messages_unittest.GeneratedFileContentsTest tests failing after Semaphore.h rename
https://bugs.webkit.org/show_bug.cgi?id=221433

Reviewed by Don Olmstead.

Looks like some changes were accidentally dropped prior to landing.

  • Scripts/webkit/tests/MessageArgumentDescriptions.cpp:
  • Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp:
4:55 PM Changeset in webkit [272399] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[build.webkit.org] Update dashboard links for layout test results
https://bugs.webkit.org/show_bug.cgi?id=221280

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/public_html/dashboard/Scripts/Buildbot.js:

(Buildbot): Set baseURLForResults.
(Buildbot.prototype.layoutTestResultsDirectoryURLForIteration): Use baseURLForResults if available.

  • CISupport/build-webkit-org/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot): Pass baseURLForResults appropriately.

4:54 PM Changeset in webkit [272398] by Jonathan Bedard
  • 3 edits
    1 delete in trunk/Tools

[Python-3] Change shebang in test-webkitpy (Part-2)
https://bugs.webkit.org/show_bug.cgi?id=221415
<rdar://problem/73986503>

Reviewed by Michael Catanzaro.

  • CISupport/build-webkit-org/steps.py:

(RunWebKitPyTests): Run test-webkitpy with Python 3.

  • Scripts/test-webkitpy: Change shebang.
  • Scripts/test-webkitpy-python3: Removed.
4:27 PM Changeset in webkit [272397] by Jonathan Bedard
  • 2 edits in trunk/Tools

[Python-3] Change shebang in git-webkit (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=221412
<rdar://problem/73983881>

Unreviewed follow-up fix.

  • Scripts/libraries/webkitcorepy/webkitcorepy/subprocess_utils.py:

(run): Python 3.6 does not support capture_output in subprocess.run()

4:17 PM Changeset in webkit [272396] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

Null dereference in DocumentLoader::commitData()
https://bugs.webkit.org/show_bug.cgi?id=221097

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-02-04
Reviewed by Alex Christensen.

Source/WebCore:

Be careful to check the return value of DocumentWriter::begin()
before calling DocumentWriter::setDocumentWasLoadedAsPartOfNavigation().
This work involves exposing MediaDocument.h.

Test: loader/cancel-load-crash.html

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::commitData):

Source/WebKit:

As we add another return-early case to commitData(),
WebFrameLoaderClient::committedLoad() has to allow for
the absence of a Document.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::committedLoad):

LayoutTests:

Add a test that catches the null dereference
in DocumentLoader::commitData().

  • loader/cancel-load-crash-expected.txt: Added.
  • loader/cancel-load-crash.html: Added.
4:15 PM Changeset in webkit [272395] by Chris Dumez
  • 5 edits
    3 adds in trunk

Potential crash under BaseAudioContext's toJSNewlyCreated()
https://bugs.webkit.org/show_bug.cgi?id=221423
<rdar://73352543>

Reviewed by Darin Adler.

Source/WebCore:

BaseAudioContext has subclasses (AudioContext & OfflineAudioContext) that are exposed to JS
(for which we call toJS() for). As a result, BaseAudioContext needs a custom toJS()
implementation which returns the correct subclass wrapper (JSOfflineAudioContext &
JSAudioContext), instead of a JSBaseAudioContext.

Test: webaudio/base-audio-context-wrapper-gc.html

  • Modules/webaudio/BaseAudioContext.idl:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBaseAudioContextCustom.cpp: Added.

(WebCore::toJSNewlyCreated):
(WebCore::toJS):

LayoutTests:

Add layout test coverage.

  • webaudio/base-audio-context-wrapper-gc-expected.txt: Added.
  • webaudio/base-audio-context-wrapper-gc.html: Added.
4:10 PM Changeset in webkit [272394] by rniwa@webkit.org
  • 5 edits in trunk/Source/WebCore

Avoid creating JS wrapper on a removed node when the subtree is not observable
https://bugs.webkit.org/show_bug.cgi?id=221243
<rdar://problem/73719386>

Reviewed by Geoffrey Garen.

Prior to this patch, WebKit forced the creation the JS wrapper on the root DOM node of a removed subtree
to avoid script observable deletion of nodes. This is necessary because DOM nodes are reference counted
in the C++ side, and while a DOM node keeps its child nodes alive, it won't keep its parent node alive
to avoid reference cycles (leaks). If we didn't force the creation of the JS wrapper and the root node
of the removed subtree didn't have any external reference to it in C++ side, we would happily delete it
and all its descendant nodes above any subtree with a JS wrapper or an external C++ reference.

While this turned out to be an effective strategy for implementing DOM nodes' GC semantics correctly,
it has a significant runtime and memory cost - the latter is because we don't collect the JS wrappers
of DOM nodes once they're created until they're ready to be destructed.

This patch introduces a new optimization to avoid creating these JS wrappers when the removed subtree
won't be observable by scripts in the future. The current heuristic is to check if the removed node
has any external reference to it (i.e. refCount() > 0 excluding any reference counting that happens within
our algorithm). This is sufficient because a given node should not be observable at a later time unless
it has an external reference to it. This is ~0.5% progression on Speedometer-2.0 on MacBookAir7,2.

To do this, we take advantage of the fact notifyChildNodeRemoved already traverses each removed subtree,
and check if any of them has a reference count greater than 1 (greater than 1 because notifyChildNodeRemoved
itself increments node's reference count before calling itself on child nodes). Note that we exclude the
root node of the removed subtree as these JS wrapper creation is only needed to keep the root node alive.
If the root node is already kept alive by some external reference to it, there is no need to keep it alive
again by creating a JS wrapper on it.

No new tests since existing tests such as fast/dom/gc-3.html covers it.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::removeAllChildrenWithScriptAssertion): Call willCreatePossiblyOrphanedTreeByRemoval
if the removed subtree contains an observable node.
(WebCore::ContainerNode::removeNodeWithScriptAssertion): Ditto.
(WebCore::ContainerNode::removeSelfOrChildNodesForInsertion): Renamed from collectChildrenAndRemoveFromOldParent.
Avoid collecting the removed nodes in this function in addition to removeAllChildrenWithScriptAssertion.
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck):
(WebCore::dispatchChildRemovalEvents): Don't call willCreatePossiblyOrphanedTreeByRemoval here.

  • dom/ContainerNode.h:
  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::observabilityOfRemovedNode): Added. Checks the observability of a node excluding the root node of
the removed subtree since it needs a special case in removeAllChildrenWithScriptAssertion.
As notifyNodeRemovedFromDocument and notifyNodeRemovedFromTree ref's each child node before recursing on itself,
we check refCount() > 1 here.
(WebCore::updateObservability): Added. A helper function to update RemovedSubtreeObservability.
(WebCore::notifyNodeRemovedFromDocument): Now returns RemovedSubtreeObservability,
(WebCore::notifyNodeRemovedFromTree): Ditto.
(WebCore::notifyChildNodeRemoved): Ditto.

  • dom/ContainerNodeAlgorithms.h:
3:59 PM Changeset in webkit [272393] by Chris Dumez
  • 13 edits
    2 adds in trunk

RELEASE_ASSERT(bigInt) in VM constructor when constructing a WorkletGlobalScope
https://bugs.webkit.org/show_bug.cgi?id=221425
<rdar://73747997>

Reviewed by Keith Miller.

Source/WebCore:

WorkletGlobalScope should use VM::tryCreate() instead of VM::create() to deal with out-of-memory
errors.

Test: webaudio/audioworket-out-of-memory.html

  • Modules/webaudio/AudioWorkletGlobalScope.cpp:

(WebCore::AudioWorkletGlobalScope::tryCreate):
(WebCore::AudioWorkletGlobalScope::AudioWorkletGlobalScope):

  • Modules/webaudio/AudioWorkletGlobalScope.h:
  • Modules/webaudio/AudioWorkletThread.cpp:

(WebCore::AudioWorkletThread::createGlobalScope):

  • Modules/webaudio/AudioWorkletThread.h:
  • WebCore.xcodeproj/project.pbxproj:
  • workers/WorkerOrWorkletThread.cpp:

(WebCore::WorkerOrWorkletThread::workerOrWorkletThread):

  • workers/WorkerOrWorkletThread.h:
  • workers/WorkerThread.cpp:

(WebCore::WorkerThread::createGlobalScope):

  • workers/WorkerThread.h:
  • worklets/WorkletGlobalScope.cpp:

(WebCore::WorkletGlobalScope::WorkletGlobalScope):

  • worklets/WorkletGlobalScope.h:

LayoutTests:

Add layout test coverage.

  • webaudio/audioworket-out-of-memory-expected.txt: Added.
  • webaudio/audioworket-out-of-memory.html: Added.
3:52 PM Changeset in webkit [272392] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

WTF::dynamic_cf_cast<> should not assert in Debug builds
<https://webkit.org/b/221428>
<rdar://problem/73451079>

Reviewed by Geoff Garen.

  • wtf/cf/TypeCastsCF.h:

(WTF::dynamic_cf_cast):

  • Remove ASSERT_WITH_SECURITY_IMPLICATION().

(WTF::checked_cf_cast):

  • Add comments about how to use these template functions correctly.
3:48 PM Changeset in webkit [272391] by Alan Coon
  • 8 edits in branches/safari-612.1.2-branch/Source

Versioning.

WebKit-7612.1.2.1

2:33 PM Changeset in webkit [272390] by Chris Fleizach
  • 5 edits
    2 adds in trunk

AX: expose focusable elements even if element or ancestor has aria-hidden=true
https://bugs.webkit.org/show_bug.cgi?id=220534
<rdar://problem/71865875>

Reviewed by Zalan Bujtas.

Source/WebCore:

ARIA states that if an item is focused, then it should override aria-hidden status.
https://github.com/w3c/aria/pull/1387/files

Test: accessibility/focusable-inside-hidden.html

  • accessibility/AXObjectCache.cpp:

(WebCore::isNodeAriaVisible):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isAXHidden const):
(WebCore::AccessibilityObject::setIsIgnoredFromParentDataForChild):

LayoutTests:

  • accessibility/focusable-inside-hidden-expected.txt: Added.
  • accessibility/focusable-inside-hidden.html: Added.
2:29 PM Changeset in webkit [272389] by Alan Coon
  • 1 copy in tags/Safari-612.1.2

Tag Safari-612.1.2.

2:25 PM Changeset in webkit [272388] by Alan Coon
  • 3 edits in branches/safari-612.1.2-branch/Source/WebKit

Cherry-pick r272229. rdar://problem/73997275

REGRESSION(r271744): Broke Microsoft live login in internal builds
https://bugs.webkit.org/show_bug.cgi?id=221271
<rdar://problem/73848416>

Reviewed by Alex Christensen.

If a user goes straight to login.live.com without first visiting
microsoft.com, we crash when checking for storage access because
we assume the user has interacted with the page. Since this is a
quirked flow, we should not assume that, and should insert the
domain into the database.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt): (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt const): Deleted.
  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:

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

2:24 PM Changeset in webkit [272387] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

Link libnetworkextension at compile time
https://bugs.webkit.org/show_bug.cgi?id=221372
<rdar://problem/73855844>

Reviewed by Brent Fulgham.

Network Extension is not available on tvOS.

  • Configurations/WebKit.xcconfig:
2:20 PM Changeset in webkit [272386] by Megan Gardner
  • 4 edits in trunk/Source/WebKit

Allow highlight delegate to be set on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=221362

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
1:59 PM Changeset in webkit [272385] by Jonathan Bedard
  • 1 edit
    1 add in trunk/Tools

[Python-3] Change shebang in test-webkitpy (Part-1)
https://bugs.webkit.org/show_bug.cgi?id=221415
<rdar://problem/73986503>

Reviewed by Michael Catanzaro.

  • Scripts/test-webkitpy-python2: Added.
1:59 PM Changeset in webkit [272384] by Jonathan Bedard
  • 3 edits in trunk/Tools

[Python-3] Change shebang in git-webkit (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=221412
<rdar://problem/73983881>

Reviewed by Michael Catanzaro.

  • CISupport/ews-build/steps.py:

(ShowIdentifier.start): Invoke git-webkit with Python 3.

  • CISupport/ews-build/steps_unittest.py:
1:54 PM Changeset in webkit [272383] by achristensen@apple.com
  • 4 edits in trunk

Don't launch a network process when registering URL schemes
https://bugs.webkit.org/show_bug.cgi?id=221427

Reviewed by Chris Dumez.

Source/WebKit:

When Safari on macOS is launching, it calls registerURLSchemeAsSecure and registerURLSchemeAsBypassingContentSecurityPolicy.
This causes the network process to launch before the app has finished launching. Since values are stored in the UI process
and sent in NetworkProcessCreationParameters whenever a network process starts, so it's not necessary to start the network
process when calling these two functions. This should decrease Safari's launch time.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::registerURLSchemeAsSecure):
(WebKit::WebProcessPool::registerURLSchemeAsBypassingContentSecurityPolicy):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:

(TEST):

1:41 PM Changeset in webkit [272382] by Ross Kirsling
  • 11 edits
    3 moves in trunk/Source/WebKit

Don't use Semaphore.h as a filename
https://bugs.webkit.org/show_bug.cgi?id=221418

Reviewed by Don Olmstead.

IPC::Semaphore was recently moved to IPC/Semaphore.h; let's ensure that it's IPC/IPCSemaphore.h instead.
Semaphore.h is a filename that may exist in platform SDKs and thus can cause a WK build break based on ordering.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:
  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/media/RemoteAudioDestinationManager.cpp:
  • GPUProcess/media/RemoteAudioDestinationManager.h:
  • Platform/IPC/IPCSemaphore.cpp: Renamed from Source/WebKit/Platform/IPC/Semaphore.cpp.
  • Platform/IPC/IPCSemaphore.h: Renamed from Source/WebKit/Platform/IPC/Semaphore.h.
  • Platform/IPC/darwin/IPCSemaphoreDarwin.cpp: Renamed from Source/WebKit/Platform/IPC/darwin/SemaphoreDarwin.cpp.
  • Scripts/webkit/messages.py:
  • Scripts/webkit/tests/MessageArgumentDescriptions.cpp:
  • Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
  • WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
1:32 PM Changeset in webkit [272381] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

Test landed flaky: [iOS] TestWebKitAPI.WebKit2.CrashGPUProcessWhileCapturing
https://bugs.webkit.org/show_bug.cgi?id=221331
<rdar://problem/73935129>

Reviewed by Eric Carlson.

For video sources tied to a remote source in GPUProcess, we are calling requestToEnd instead of end
since the same remote source may be shared with other cloned video sources.
In that case, the source in WebProcess should be considered as ended as soon as requestToEnd is called.

This is important as in case of GPUProcess, we are recreating sources that are not ended.
We were thus recreating a source which was actually ended in WebProcess.
This appears in particular on iOS where only one source can be active at a time.

A further refactoring should probably change the way we clone video sources given we are now supporting size and frame rate adaptations in RealtimeVideoSource.

Covered by API test no longer falkily failing.

  • WebProcess/cocoa/RemoteRealtimeMediaSource.cpp:

(WebKit::RemoteRealtimeMediaSource::captureFailed):
(WebKit::RemoteRealtimeMediaSource::requestToEnd):

  • WebProcess/cocoa/RemoteRealtimeMediaSource.h:
1:31 PM Changeset in webkit [272380] by Jonathan Bedard
  • 4 edits in trunk/Tools

[Python-3] Change shebang in check-webkit-style
https://bugs.webkit.org/show_bug.cgi?id=221420
<rdar://problem/73990232>

Reviewed by Michael Catanzaro.

  • CISupport/ews-build/steps.py:

(CheckStyle): Invoke check-webkit-style with python3.

  • CISupport/ews-build/steps_unittest.py:

(TestCheckStyle.test_success_internal): Invoke check-webkit-style with python3.
(TestCheckStyle.test_failure_unknown_try_codebase): Ditto.
(TestCheckStyle.test_failures_with_style_issues): Ditto.
(test_failures_no_style_issues): Ditto.
(test_failures_no_changes): Ditto.

  • Scripts/check-webkit-style: Change python shebang to Python 3.
1:28 PM Changeset in webkit [272379] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk

Supplementary code points (U+10000 - U+10FFFF) are not shaped correctly in the fast text codepath
https://bugs.webkit.org/show_bug.cgi?id=221356
<rdar://problem/72555297>

Reviewed by Zalan Bujtas.

Source/WebCore:

Supplementary code points are represented in UTF-16 as two adjacent (surrogate) code units. When we map code
points to glyphs, we were originally mapping these two code units to a single glyph. However, shaping
routines require that the number of code units and glyphs be equal, by injecting a 0 glyph for the trailing
surrogate.

Luckily, we don't actually have to delete these extra 0 glyphs, because the shaping engine will do that for us.

Test: fast/text/multi-code-unit-simple-path.html

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::advanceInternal):

LayoutTests:

  • fast/text/multi-code-unit-simple-path-expected-mismatch.html: Added.
  • fast/text/multi-code-unit-simple-path.html: Added.
11:38 AM Changeset in webkit [272378] by Jonathan Bedard
  • 5 edits in trunk/Tools

[Python-3] Change shebang in git-webkit
https://bugs.webkit.org/show_bug.cgi?id=221412
<rdar://problem/73983881>

Reviewed by Stephanie Lewis.

  • Scripts/git-webkit: Change python shebang to python3.
  • Scripts/libraries/webkitscmpy/git-webkit: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/program/canonicalize/committer.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/program/canonicalize/message.py: Ditto.
11:16 AM Changeset in webkit [272377] by Megan Gardner
  • 6 edits
    1 add in trunk/Source/WebCore

Process LocalizableAdditions string file correctly.
https://bugs.webkit.org/show_bug.cgi?id=221358

Reviewed by Tim Horton.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/scripts/preprocessor.pm:

(applyPreprocessor):

10:10 AM Changeset in webkit [272376] by achristensen@apple.com
  • 9 edits in trunk

REGRESSION(r267763) Network process launches earlier than before
https://bugs.webkit.org/show_bug.cgi?id=221384
<rdar://problem/73507706>

Patch by Alex Christensen <achristensen@apple.com> on 2021-02-04
Reviewed by Chris Dumez.

Source/WebKit:

Before r267763 we could have an app launch, allocate a WKWebView, and set _resourceLoadStatisticsEnabled
all without having a network process launch.

When setting _resourceLoadStatisticsEnabled, we don't need to launch a network process if we haven't already
because when we do, WebsiteDataStore::parameters will send the correct value. I added a test that verifies this doesn't
launch the network process if it hasn't already been launched.

We also don't need to update the process assertion or the process suspension state if there is no network process.

sendNetworkProcessXPCEndpointToWebProcess is also called when opening Safari on iOS and would be the next thing to
unnecessarily launch the network process during app initialization. I manually verified that if we add an early return
if there is no network process yet, we do send the XPC endpoint to the web process when the network process does launch
through the call site in sendNetworkProcessXPCEndpointToAllWebProcesses.

I verified on my phone that this is the minimal change needed for Safari on iOS to not launch the network process before
application:didFinishLaunchingWithOptions: is called as it did before r267763.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::updateProcessSuppressionState):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::updateProcessAssertions):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::sendNetworkProcessXPCEndpointToWebProcess):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::networkProcessIfExists):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:

(TEST):

10:01 AM Changeset in webkit [272375] by Devin Rousso
  • 29 edits
    4 copies
    4 moves
    12 adds
    11 deletes in trunk

Add intermediate volume icon states between "mute" and "max"
https://bugs.webkit.org/show_bug.cgi?id=221371

Reviewed by Eric Carlson.

Source/WebCore:

  • Modules/modern-media-controls/controls/mute-button.js:

(MuteButton):
(MuteButton.prototype.get volume): Added.
(MuteButton.prototype.set volume): Added.
(MuteButton.prototype.set usesLTRUserInterfaceLayoutDirection): Added.
(MuteButton.prototype.layout):
(MuteButton.prototype.set usesRTLIconVariant): Removed.
Keep track of the volume in addition to muted so that the icon can change more granularly:

  • muted (VolumeMuted.svg and VolumeMuted-RTL.svg)
  • 0% < 25% (Volume0.svg and Volume0-RTL.svg)
  • 25% < 50% (Volume1.svg and Volume1-RTL.svg)
  • 50% < 75% (Volume2.svg and Volume2-RTL.svg)
  • 75% <= 100% (Volume3.svg and Volume3-RTL.svg)

Drive-by: rename set usesRTLIconVariant to set usesLTRUserInterfaceLayoutDirection so

that it matches MediaControls.prototype.set usesLTRUserInterfaceLayoutDirection.

  • Modules/modern-media-controls/controls/media-controls.js:

(MediaControls.prototype.set usesLTRUserInterfaceLayoutDirection):

  • Modules/modern-media-controls/controls/inline-media-controls.js:

(InlineMediaControls.prototype.layout):
(InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren):
Propagate usesLTRUserInterfaceLayoutDirection to volumeButton whenever it's changed.

  • Modules/modern-media-controls/media/mute-support.js:

(MuteSupport.prototype.syncControl):
Also pass along the volume.

  • Modules/modern-media-controls/media/volume-support.js:

(VolumeSupport.prototype.controlValueWillStartChanging):
Don't unmute in controlValueWillStartChanging (from "pointerdown") as the user hasn't
actually changed the volume yet.

  • Modules/modern-media-controls/js-files:
  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:

(MacOSFullscreenMediaControls.prototype._volumeControlsForCurrentDirection):

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:

(.media-controls.mac.fullscreen:not(.uses-ltr-user-interface-layout-direction) .volume.slider): Added.
(.media-controls.mac.fullscreen:not(.uses-ltr-user-interface-layout-direction) :is(.volume-down, .volume.slider, .volume-up)): Deleted.

  • Modules/modern-media-controls/controls/volume-down-button.js: Removed.
  • Modules/modern-media-controls/controls/volume-up-button.js: Removed.
  • Modules/modern-media-controls/media/media-controller.js:

(MediaController.prototype._supportingObjectClasses):

  • Modules/modern-media-controls/media/volume-down-support.js: Removed.
  • Modules/modern-media-controls/media/volume-up-support.js: Removed.

Use the same MuteButton in fullscreen instead of VolumeDownButton and VolumeUpButton.

  • Modules/modern-media-controls/controls/icon-service.js:
  • Modules/modern-media-controls/images/iOS/Mute-RTL.svg: Removed.
  • Modules/modern-media-controls/images/iOS/Mute.svg: Removed.
  • Modules/modern-media-controls/images/iOS/Volume0-RTL.svg: Added.
  • Modules/modern-media-controls/images/iOS/Volume0.svg: Added.
  • Modules/modern-media-controls/images/iOS/Volume1-RTL.svg: Added.
  • Modules/modern-media-controls/images/iOS/Volume1.svg: Added.
  • Modules/modern-media-controls/images/iOS/Volume2-RTL.svg: Added.
  • Modules/modern-media-controls/images/iOS/Volume2.svg: Added.
  • Modules/modern-media-controls/images/iOS/Volume3-RTL.svg: Copied from Source/WebCore/Modules/modern-media-controls/images/macOS/VolumeHi-RTL.svg.
  • Modules/modern-media-controls/images/iOS/Volume3.svg: Copied from Source/WebCore/Modules/modern-media-controls/images/macOS/VolumeHi.svg.
  • Modules/modern-media-controls/images/iOS/VolumeHi-RTL.svg: Removed.
  • Modules/modern-media-controls/images/iOS/VolumeHi.svg: Removed.
  • Modules/modern-media-controls/images/iOS/VolumeMuted-RTL.svg: Copied from Source/WebCore/Modules/modern-media-controls/images/macOS/Mute-RTL.svg.
  • Modules/modern-media-controls/images/iOS/VolumeMuted.svg: Copied from Source/WebCore/Modules/modern-media-controls/images/macOS/Mute.svg.
  • Modules/modern-media-controls/images/macOS/Volume0-RTL.svg: Added.
  • Modules/modern-media-controls/images/macOS/Volume0.svg: Added.
  • Modules/modern-media-controls/images/macOS/Volume1-RTL.svg: Added.
  • Modules/modern-media-controls/images/macOS/Volume1.svg: Added.
  • Modules/modern-media-controls/images/macOS/Volume2-RTL.svg: Added.
  • Modules/modern-media-controls/images/macOS/Volume2.svg: Added.
  • Modules/modern-media-controls/images/macOS/Volume3-RTL.svg: Renamed from Source/WebCore/Modules/modern-media-controls/images/macOS/VolumeHi-RTL.svg.
  • Modules/modern-media-controls/images/macOS/Volume3.svg: Renamed from Source/WebCore/Modules/modern-media-controls/images/macOS/VolumeHi.svg.
  • Modules/modern-media-controls/images/macOS/VolumeLo.svg: Removed.
  • Modules/modern-media-controls/images/macOS/VolumeMuted-RTL.svg: Renamed from Source/WebCore/Modules/modern-media-controls/images/macOS/Mute-RTL.svg.
  • Modules/modern-media-controls/images/macOS/VolumeMuted.svg: Renamed from Source/WebCore/Modules/modern-media-controls/images/macOS/Mute.svg.
  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
Add an ENGINEERING_BUILD compile flag so that the media controls JS/CSS is also available
in Web Inspector for engineering builds (in addition to debug builds).

LayoutTests:

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-is-prevented-over-button.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-is-prevented-over-button-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-styles-expected.txt:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl-expected.txt:
  • media/modern-media-controls/mute-button/mute-button.html:
  • media/modern-media-controls/mute-button/mute-button-expected.txt:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
  • media/modern-media-controls/volume-down-support/volume-down-support.html: Removed.
  • media/modern-media-controls/volume-down-support/volume-down-support-expected.txt: Removed.
  • media/modern-media-controls/volume-up-support/volume-up-support.html: Removed.
  • media/modern-media-controls/volume-up-support/volume-up-support-expected.txt: Removed.
9:39 AM Changeset in webkit [272374] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION(r272217): clang warnings in ExtensionsGLOpenGLCommon.h
https://bugs.webkit.org/show_bug.cgi?id=221409

Patch by Philippe Normand <pnormand@igalia.com> on 2021-02-04
Reviewed by Darin Adler.

  • platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: Re-add the override qualifier for a

few methods, which was removed in r272217.

9:39 AM Changeset in webkit [272373] by Devin Rousso
  • 17 edits in trunk

[macOS] Default to showing the total duration, only switching to time remaining when clicked
https://bugs.webkit.org/show_bug.cgi?id=221364

Reviewed by Eric Carlson.

Source/WebCore:

  • Modules/modern-media-controls/controls/time-label.js:

(TimeLabel.prototype.setValueWithNumberOfDigits):
(TimeLabel.prototype.commitProperty):
(TimeLabel.prototype._formattedTime):
Add TimeLabel.Type.Duration.
Drive-by: rename Types to Type as most enums are singular.

  • Modules/modern-media-controls/controls/time-control.js:

(TimeControl):
(TimeControl.prototype.get minimumWidth):
(TimeControl.prototype.get idealMinimumWidth):
(TimeControl.prototype.layout):
(TimeControl.prototype.handleEvent): Added.
(TimeControl.prototype._durationOrRemainingTimeLabel): Added.
(TimeControl.prototype._performIdealLayout):
Add another TimeLabel with the new TimeLabel.Type.Duration that is used instead of the
existing TimeLabel.Type.Remaining after the latter has been clicked (and the former has
not also been clicked to switch back).

  • en.lproj/modern-media-controls-localized-strings.js:

Add "Duration".

LayoutTests:

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-time-control-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-time-control-styles-expected.txt:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout-expected.txt:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles-expected.txt:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls-expected.txt:
  • media/modern-media-controls/time-label/ios-time-label.html:
  • media/modern-media-controls/time-label/ios-time-label-expected.txt:
  • media/modern-media-controls/time-label/time-label.html:
  • media/modern-media-controls/time-label/time-label-expected.txt:
  • media/modern-media-controls/time-labels-support/remaining-time.html:
9:34 AM Changeset in webkit [272372] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Update .eslintrc to account for ECMAScript 2020
https://bugs.webkit.org/show_bug.cgi?id=221402

Patch by Razvan Caliman <Razvan Caliman> on 2021-02-04
Reviewed by Devin Rousso.

Add ES2020 parser option so ESLint-based linters don't throw errors
for newer JavaScript language features used in WebInspectorUI.

Note: The linter in an editor must support ESLint v6.2.0 or newer to
understand ES2020.

  • .eslintrc:

Drive-by: add 4 spaces indentation rule to match Coding Style Guidelines.

9:16 AM Changeset in webkit [272371] by Nikita Vasilyev
  • 17 edits
    1 copy
    1 add in trunk

Web Inspector: Collapse blackboxed call frames in Sources
https://bugs.webkit.org/show_bug.cgi?id=216897

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Stack traces often have dozens of blackboxed call frames when using blackboxing for JS-frameworks such as React.js.
It makes it hard to see more relevant non-framework code.

To improve this, introduce "Collapse blackboxed call frames" experimental setting, that collapses adjacent
blackboxed call frames into expandable items.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Setting.js:
  • UserInterface/Base/Utilities.js:
  • UserInterface/Images/TypeIcons.svg:
  • UserInterface/Main.html:
  • UserInterface/Models/CallFrame.js:

(WI.CallFrame):
(WI.CallFrame.prototype.get blackboxed):
(WI.CallFrame.fromDebuggerPayload):
(WI.CallFrame.fromPayload):

  • UserInterface/Views/BlackboxedGroupTreeElement.css: Added.

(.tree-outline .item.blackboxed-group):
(.tree-outline .item.blackboxed-group .icon):
(@media (prefers-color-scheme: dark) .tree-outline .item.blackboxed-group .icon):

  • UserInterface/Views/BlackboxedGroupTreeElement.js: Added.

(WI.BlackboxedGroupTreeElement):
(WI.BlackboxedGroupTreeElement.prototype.expand):

  • UserInterface/Views/CallFrameTreeElement.css:

(.tree-outline .item.call-frame.blackboxed:not(.selected)):

  • UserInterface/Views/CallFrameView.css:

(.call-frame.blackboxed > .title,):

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):

  • UserInterface/Views/ThreadTreeElement.js:

(WI.ThreadTreeElement.prototype.refresh):

  • UserInterface/Views/TreeElement.js:

(WI.TreeElement.treeElementToggled):
This is necessary since WI.BlackboxedGroupTreeElement removes itself when expanded.

  • UserInterface/Views/Variables.css:

(:root):

LayoutTests:

Test Array.prototype.groupBy.

  • inspector/unit-tests/array-utilities-expected.txt:
  • inspector/unit-tests/array-utilities.html:
8:56 AM Changeset in webkit [272370] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

Remove the Timer from Style::Scope
https://bugs.webkit.org/show_bug.cgi?id=221221
<rdar://problem/73918532>

Reviewed by Sam Weinig.

Just request a rendering update instead. It already flushes any pending style scope updates.

  • dom/Document.cpp:

(WebCore::Document::didInsertInDocumentShadowRoot):

  • dom/Element.cpp:

(WebCore::Element::isVisibleWithoutResolvingFullStyle const):

Flush.

  • style/StyleScope.cpp:

(WebCore::Style::Scope::Scope):
(WebCore::Style::Scope::flushPendingSelfUpdate):
(WebCore::Style::Scope::scheduleUpdate):
(WebCore::Style::Scope::insertedInDocument):

Ensure that m_hasDescendantWithPendingUpdate bit gets set if a shadow root with pending update is inserted in document.

(WebCore::Style::Scope::clearPendingUpdate): Deleted.
(WebCore::Style::Scope::pendingUpdateTimerFired): Deleted.

  • style/StyleScope.h:
8:36 AM Changeset in webkit [272369] by Philippe Normand
  • 9 edits in trunk

[GStreamer] Misc Thunder nitpicks
https://bugs.webkit.org/show_bug.cgi?id=221398

Reviewed by Xabier Rodriguez-Calvar.

.:

  • Source/cmake/FindThunder.cmake: Look-up Thunder through pkg-config before attempting a

direct libocdm lookup.

Source/WebCore:

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresFirefoxBrowser): For Netflix we should use a Firefox User-Agent, when
Thunder is enabled.

  • platform/graphics/gstreamer/eme/CDMThunder.cpp:

(WebCore::CDMFactoryThunder::singleton): Use a dedicated gst debug category for this module,
in order to decouple from the decryptor.
(WebCore::CDMFactoryThunder::supportedKeySystems const): Use explicit return value, removing
possible misunderstandings.
(WebCore::CDMPrivateThunder::CDMPrivateThunder):
(WebCore::CDMPrivateThunder::supportedRobustnesses const): Thunder supports secure decode/crypto in software.
(WebCore::CDMPrivateThunder::supportsServerCertificates const): Plumb to new
opencdm_system_supports_certificate API.
(WebCore::CDMInstanceThunder::setStorageDirectory): Ensure storage directory exists.
(WebCore::ParsedResponseMessage::hasType const): Simplify a bit.
(WebCore::CDMInstanceSessionThunder::updateLicense):

  • platform/graphics/gstreamer/eme/CDMThunder.h:
  • platform/graphics/gstreamer/eme/WebKitThunderDecryptorGStreamer.cpp:

(webkit_media_thunder_decrypt_class_init): Use a more explicit name for the debug category.

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST): Add test for Netflix WPE/GTK UA quirk.

6:59 AM Changeset in webkit [272368] by Aditya Keerthi
  • 15 edits
    2 adds in trunk

[macOS] Selecting a date on datetime-local inputs unexpectedly adds second and millisecond fields
https://bugs.webkit.org/show_bug.cgi?id=221350
<rdar://problem/73943517>

Reviewed by Devin Rousso.

Source/WebCore:

Currently, when setting the value of a datetime-local input using the
picker, the length of the current value of the input is used to determine
whether or not to return a value with second/millisecond precision.

This is approach is incorrect, since the value could be empty, while the
step attribute can specify second/millisecond precision. To fix, ensure
the DateTimeChooserParameters knows whether the input has second and
millisecond fields. That information can then be used by the UIProcess
to return a correctly formatted value to the WebProcess.

Test: fast/forms/datetimelocal/datetimelocal-editable-components/datetimelocal-choose-value-from-picker.html

  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::handleDOMActivateEvent):
(WebCore::BaseDateAndTimeInputType::didChangeValueFromControl):
(WebCore::BaseDateAndTimeInputType::setupDateTimeChooserParameters):

Moved this method from HTMLInputElement to the input type, since it is
specific to date/time input types, and to leverage the existing
shouldHaveSecondField and shouldHaveMillisecondField methods when
building the DateTimeChooserParameters.

  • html/BaseDateAndTimeInputType.h:
  • html/HTMLInputElement.cpp:
  • html/HTMLInputElement.h:
  • platform/DateTimeChooserParameters.h:

Added hasSecondField and hasMillisecondField members, so that the UIProcess
knows whether or not to return a string that contains seconds/milliseconds.

(WebCore::DateTimeChooserParameters::encode const):
(WebCore::DateTimeChooserParameters::decode):

Source/WebKit:

  • UIProcess/mac/WebDateTimePickerMac.mm:

(-[WKDateTimePicker updatePicker:]):
(-[WKDateTimePicker dateFormatStringForType:]):

Do not use the length of the value to determine whether or seconds and
milliseconds should be present, since the value can be empty.

Instead, use the new information in DateTimeChooserParameters, matching
the visual appearance of the input.

Tools:

Added a method to UIScriptController to simulate selecting a date using
the presented date picker.

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.h:

(WTR::UIScriptController::chooseDateTimePickerValue):

  • WebKitTestRunner/mac/UIScriptControllerMac.h:
  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptControllerMac::chooseDateTimePickerValue):

LayoutTests:

Added a test to to verify that the presence of seconds and milliseconds
in the value of a datetime-local input after selecting a date using the
picker matches the configuration.

  • fast/forms/datetimelocal/datetimelocal-editable-components/datetimelocal-choose-value-from-picker-expected.txt: Added.
  • fast/forms/datetimelocal/datetimelocal-editable-components/datetimelocal-choose-value-from-picker.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.chooseDateTimePickerValue):

4:48 AM Changeset in webkit [272367] by commit-queue@webkit.org
  • 6 edits
    2 deletes in trunk

Unreviewed, reverting r272338.
https://bugs.webkit.org/show_bug.cgi?id=221403

Broke a layout test percentage-height-in-flexbox.html

Reverted changeset:

"the nested grid container which has replaced item with 'max-
height' has wrong width(0px)."
https://bugs.webkit.org/show_bug.cgi?id=219194
https://trac.webkit.org/changeset/272338

4:01 AM Changeset in webkit [272366] by Martin Robinson
  • 19 edits in trunk

Improve the serialization of scroll-snap-type and scroll-snap-align
https://bugs.webkit.org/show_bug.cgi?id=221324

LayoutTests/imported/w3c:

Reviewed by Alex Christensen.

  • web-platform-tests/css/css-scroll-snap/inheritance-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-computed-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-align-valid-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-valid-expected.txt:
  • web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Source/WebCore:

Reviewed by Alex Christensen.

Improve serialization of scroll-snap-type and scroll-snap-align. When the values
are the same for both dimensions or a default value is used, don't add it to
the list of consumed tokens. The primitive conversion process will handle this
default correctly and serialization will produce a canonical serialization correctly.

We handle this case for both serialization of the style (eg getPropertyValue) and
for serialization of computed style.

No new tests.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForScrollSnapAlignment): For the computed style don't serialize
the second value if it is the same as the first.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeScrollSnapAlign): Only add the second value to the value list if it
exists and if it is different than the first value.
(WebCore::consumeScrollSnapType): Only add the second value if it is a non-default value.

LayoutTests:

Reviewed by Alex Christensen.

  • css3/scroll-snap/resources/iframe-content-rtl.html:
  • css3/scroll-snap/resources/iframe-content.html:
  • css3/scroll-snap/scroll-snap-inherit-expected.txt:
  • css3/scroll-snap/scroll-snap-inherit.html:
  • css3/scroll-snap/scroll-snap-initial-expected.txt:
  • css3/scroll-snap/scroll-snap-initial.html:
  • css3/scroll-snap/scroll-snap-property-computed-style-expected.txt:
  • css3/scroll-snap/scroll-snap-property-computed-style.js:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
3:02 AM Changeset in webkit [272365] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Modifications to Tools/wpe/install-dependencies
https://bugs.webkit.org/show_bug.cgi?id=221254

Patch by Eleni Maria Stea <hikiko> on 2021-02-04
Reviewed by Adrian Perez de Castro.

  • wpe/install-dependencies: python-psutil is replaced with

python3-psutil that is present in Debian/Ubuntu/Raspbian. libegl-mesa0
is added in the dependencies list as it's required for libegl1-mesa-dev
to be installed.

2:42 AM Changeset in webkit [272364] by ysuzuki@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

[JSC] Implement Object.entries in C++
https://bugs.webkit.org/show_bug.cgi?id=221380

Reviewed by Alexey Shvayka.

This patch implements Object.entries in C++ because it is more efficient.
It is not using dynamic feature (like, calling a callback). And in C++,
we can avoid JSArray allocations for @Object.@getOwnPropertyNames.

This patch also removes unnecessary JS private functions, @propertyIsEnumerable,
and @getOwnPropertyNames.

  • builtins/BuiltinNames.h:
  • builtins/ObjectConstructor.js:

(entries): Deleted.

  • bytecode/LinkTimeConstant.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObjectFunctions.cpp:
  • runtime/JSGlobalObjectFunctions.h:
  • runtime/ObjectConstructor.cpp:

(JSC::ObjectConstructor::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):

1:11 AM Changeset in webkit [272363] by commit-queue@webkit.org
  • 4 edits in trunk

Make shouldComputeLogicalWidthFromAspectRatioAndInsets writing mode aware
https://bugs.webkit.org/show_bug.cgi?id=221328

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

Source/WebCore:

Commit r271061 added support for aspect-ratio on positioned elements, taking into account
insets, but it failed to take writing-mode into account when checking insets. This change fixes
that by asking logical values.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatioAndInsets const):

LayoutTests:

Enable some tests that pass now.

12:47 AM Changeset in webkit [272362] by Lauro Moura
  • 2 edits in trunk/Source/WebKit

REGRESSION(r267763): [GTK][WPE] Broken main thread assertion in MemoryPressureMonitor
https://bugs.webkit.org/show_bug.cgi?id=217363

Reviewed by Carlos Garcia Campos.

r267763 changed a number of NetworkProcessProxy methods to be
accessible only from the main thread, including allNetworkProcesses().
This function was called from the memory pressure monitor thread
directly to notify high memory usage.

This was causing the debug bots to abort prematurely with many crashes
when in reality just a memory pressure warning would be enough.

Covered by existing tests.

  • UIProcess/linux/MemoryPressureMonitor.cpp:

(WebKit::MemoryPressureMonitor::start): Dispatch the memory pressure
notification in the main thread.

12:42 AM Changeset in webkit [272361] by magomez@igalia.com
  • 4 edits in trunk

[WPE][GTK] Wrong rendering when using opacity filters on hw accelerated layers
https://bugs.webkit.org/show_bug.cgi?id=221330

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Apply the opacity filter value to the color components as well, as we need premultiplied alpha
for blending.

Covered by existent tests.

  • platform/graphics/texmap/TextureMapperShaderProgram.cpp:

LayoutTests:

Update expected image.

  • platform/gtk/css3/filters/effect-opacity-hw-expected.png:

Feb 3, 2021:

11:59 PM Changeset in webkit [272360] by commit-queue@webkit.org
  • 4 edits in trunk

Handle aspect-ratio: auto m/n for replaced elements
https://bugs.webkit.org/show_bug.cgi?id=221323

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

Source/WebCore:

In the aspect-ratio: auto m/n case, replaced elements with natural aspect ratio
should use that aspect-ratio instead of the provided aspect ratio [1].

[1] https://drafts.csswg.org/css-sizing-4/#ratios

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeLogicalWidthInFragment const):

LayoutTests:

replaced-element-030.html now passes.

10:00 PM Changeset in webkit [272359] by Peng Liu
  • 5 edits in trunk

[MSE] Move the call to didParseInitializationDataCallback() from the beginning of a cluster to the end of "tracks" element
https://bugs.webkit.org/show_bug.cgi?id=221120

Reviewed by Daniel Bates.

Source/WebCore:

This patch updates the WebM parser regarding the timing to call didParseInitializationDataCallback()
based on a discussion with Jer.

Based on the spec, https://w3c.github.io/mse-byte-stream-format-webm/#webm-init-segments, "The user
agent MUST accept and ignore any elements other than an EBML Header or a Cluster that occur before,
in between, or after the Segment Information and Tracks elements." So the parser should have collected
all required information of the initialization segment when it finishes parsing the "Tracks" element.

Tests: media/media-source/media-source-webm.html

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::SourceBufferParserWebM::OnElementEnd):
(WebCore::SourceBufferParserWebM::OnClusterBegin):

LayoutTests:

  • media/media-source/media-source-webm-expected.txt:
  • media/media-source/media-source-webm.html:
9:21 PM Changeset in webkit [272358] by Simon Fraser
  • 8 edits in trunk/Source/WebCore

Avoid an ancestor walk in HTMLFormControlElement::computeWillValidate()
https://bugs.webkit.org/show_bug.cgi?id=221357

Reviewed by Ryosuke Niwa.

HTMLFormControlElement::computeWillValidate() does an ancestor DOM walk to look
for enclosing data list elements, but these are fairly uncommon so we can avoid
this work if we know the Document has none.

  • dom/Document.h:

(WebCore::Document::hasDataListElements const):
(WebCore::Document::incrementDataListElementCount):
(WebCore::Document::decrementDataListElementCount):

  • dom/Element.cpp:

(WebCore::Element::removedFromAncestor): Avoid fetching the page twice.

  • html/HTMLDataListElement.cpp:

(WebCore::HTMLDataListElement::HTMLDataListElement):
(WebCore::HTMLDataListElement::~HTMLDataListElement):
(WebCore::HTMLDataListElement::didMoveToNewDocument):

  • html/HTMLDataListElement.h:
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::computeWillValidate const):

  • page/PointerLockController.cpp:

(WebCore::PointerLockController::elementWasRemoved): Renamed for consistency.
(WebCore::PointerLockController::elementRemoved): Deleted.

  • page/PointerLockController.h:
9:13 PM Changeset in webkit [272357] by Lauro Moura
  • 3 edits in trunk/LayoutTests

[GLIB] Gardening more debug crashes

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/wpe/TestExpectations:
9:07 PM Changeset in webkit [272356] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore
REGRESSION(r272128): ASSERTION FAILED: run.inlineItem.isText()
run.inlineItem.isInlineBoxStart() run.inlineItem.isInlineBoxEnd() on fast/layoutformattingcontext/table-basic-row-baseline-align.html

https://bugs.webkit.org/show_bug.cgi?id=221275
<rdar://problem/73888807>

Reviewed by Simon Fraser.

Normally due to soft wrap opportunity rules, text followed by image can never be in the same continuous inline content (input to line breaking). However due to
a table quirk, inside the table cells there's no soft wrap opportunity (see InlineFormattingContext::Quirks::hasSoftWrapOpportunityAtImage).
Let's loosen the ASSERT at processOverflowingContentWithText::isBreakableRun by including image content (and adjust some of the function names to reflect the not-only-text nature).

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::hasTrailingTextContent):
(WebCore::Layout::hasLeadingTextContent):
(WebCore::Layout::hasTextRun):
(WebCore::Layout::InlineContentBreaker::processInlineContent):
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::processOverflowingContentWithText const):
(WebCore::Layout::isTextContent): Deleted.
(WebCore::Layout::InlineContentBreaker::processOverflowingTextContent const): Deleted.

  • layout/inlineformatting/InlineContentBreaker.h:
8:43 PM Changeset in webkit [272355] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

ASSERTION FAILED: !size.isEmpty() under platformInitializeWebProcess

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):
Follow-up to r272335; don't call IOSurface::setMaximumSize if the UI process
did not send us a size. Caused all Web Content processes to assert in debug on launch.

8:09 PM Changeset in webkit [272354] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Avoid frequent calls to HTMLFormControlElement::updateValidity() when constructing form control elements
https://bugs.webkit.org/show_bug.cgi?id=221320

Reviewed by Geoffrey Garen.

HTMLFormControlElement::updateValidity() can get called multiple times inside
HTMLInputElement::parserDidSetAttributes(), so add a simple delaying scope so that
validity is only updated once at the end.

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::endDelayingUpdateValidity):
(WebCore::HTMLFormControlElement::computeWillValidate const):
(WebCore::HTMLFormControlElement::updateValidity):

  • html/HTMLFormControlElement.h:

(WebCore::HTMLFormControlElement::startDelayingUpdateValidity):
(WebCore::DelayedUpdateValidityScope::DelayedUpdateValidityScope):
(WebCore::DelayedUpdateValidityScope::~DelayedUpdateValidityScope):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::parserDidSetAttributes):

8:06 PM Changeset in webkit [272353] by jer.noble@apple.com
  • 7 edits in trunk/Source

[Cocoa] WebM audio goes out-of-sync or stops playing after a seek
https://bugs.webkit.org/show_bug.cgi?id=221354
<rdar://73471690>

Reviewed by Eric Carlson.

Source/WebCore:

Add a new flag to MediaSample indicating whether the sample has any information about whether
it is an sync-sample or not, and expose that through a new method hasSyncInfo().

Drive-by Fix: Force all video samples to contain a sample attachments dictionary, whether or
not the sample is sync.

Drive-by Fix #2: SampleMap does an equality comparison for flags() == MediaSample::IsSync.
This breaks as soon as any sample has both IsSync and any other flag. Replace with a specific
call to isSync() instead.

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

(WebCore::doesCMSampleBufferHaveSyncInfo):
(WebCore::MediaSampleAVFObjC::flags const):

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::SourceBufferParserWebM::VideoTrackData::createSampleBuffer):

Source/WebKit:

The MTPluginFormatReader will attempt to determine whether an audio sample needs priming frames
by querying for, among other things, its "syncInfo". Previously, we had just presumed all samples
without a sample attachment dictionary were sync samples, and reported them as such from
MediaSampleCursor, but this causes the format reader plugin to walk backwards all the way to the
beginning of the audio track looking for priming samples. Instead, since the sample in question
has no sync info (it was synthesized by MediaSample), return kCMBaseObjectError_ValueNotAvailable
in this case, which causes the plugin format reader to assume all samples are both sync and do
not require explicit priming frames.

  • Shared/mac/MediaFormatReader/MediaSampleCursor.cpp:

(WebKit::MediaSampleCursor::getSampleTiming const):
(WebKit::MediaSampleCursor::getSyncInfo const):

7:55 PM Changeset in webkit [272352] by Devin Rousso
  • 6 edits in trunk/Source/WebCore

[macOS] update media controls time scrubber styles
https://bugs.webkit.org/show_bug.cgi?id=221360

Reviewed by Eric Carlson.

  • Modules/modern-media-controls/controls/slider.js:

(Slider):
(Slider.prototype.commit):

  • Modules/modern-media-controls/controls/slider.css:

(.slider > .custom-slider > .fill):
(.slider > .custom-slider > .primary):
(.slider > .custom-slider > .secondary):
(.slider > .custom-slider > .knob):
(.slider > .custom-slider > .knob.circle): Added.
(.slider > .custom-slider > .knob.bar): Added.
(.slider > .custom-slider > .track): Deleted.
Add a new KnobStyle enum that's used to control the CSS applied to the knob. Currently
there are two values: Circle (default) and Bar.

  • Modules/modern-media-controls/controls/time-control.js:

Use Slider.KnobStyle.Bar.

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:

(MacOSInlineMediaControls):

  • Modules/modern-media-controls/controls/macos-inline-media-controls.js:

(MacOSFullscreenMediaControls):
Set the secondaryValue so that the track after the knob is visible. The default value of
secondaryValue is 0, meaning that it sets right: 100%; on the track after the knob.
By setting the secondaryValue to 1 it causes right: 0%;, which fills the space.

6:43 PM Changeset in webkit [272351] by ysuzuki@apple.com
  • 31 edits
    17 adds in trunk/JSTests

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

Reviewed by Ross Kirsling.

This patch updates test262 results. And since test262 bot is upgraded to Big Sur,
we also clean up some of failures in config.yaml.
Still some of Intl tests are failing because test262 strongly assumes a certain
kind of format. We should fix it in test262 side since the spec does not require that.

  • test262/config.yaml:
  • test262/latest-changes-summary.txt:
  • test262/test/built-ins/Function/property-order.js: Added.
  • test262/test/built-ins/Function/prototype/property-order.js: Added.
  • test262/test/built-ins/Object/property-order.js: Added.
  • test262/test/built-ins/Promise/all/resolve-element-function-property-order.js: Added.

(thenable.then):
(NotPromise):
(NotPromise.resolve):

  • test262/test/built-ins/Promise/allSettled/reject-element-function-property-order.js: Added.

(thenable.then):
(NotPromise):
(NotPromise.resolve):

  • test262/test/built-ins/Promise/allSettled/resolve-element-function-property-order.js: Added.

(thenable.then):
(NotPromise):
(NotPromise.resolve):

  • test262/test/built-ins/Promise/any/reject-element-function-property-order.js: Added.

(thenable.then):
(NotPromise):
(NotPromise.resolve):

  • test262/test/built-ins/Promise/executor-function-property-order.js: Added.

(NotPromise):

  • test262/test/built-ins/Promise/property-order.js: Added.
  • test262/test/built-ins/Promise/reject-function-property-order.js: Added.

(new.Promise):

  • test262/test/built-ins/Promise/resolve-function-property-order.js: Added.

(new.Promise):

  • test262/test/built-ins/Proxy/property-order.js: Added.
  • test262/test/built-ins/Proxy/revocable/revocation-function-property-order.js: Added.
  • test262/test/built-ins/ThrowTypeError/property-order.js: Added.

(ThrowTypeError.Object.getOwnPropertyDescriptor):

  • test262/test/intl402/Collator/prototype/compare/compare-function-property-order.js: Added.
  • test262/test/intl402/DateTimeFormat/prototype/format/format-function-property-order.js: Added.
  • test262/test/intl402/NumberFormat/prototype/format/format-function-property-order.js: Added.
  • test262/test/language/export/escaped-as-export-specifier.js:
  • test262/test/language/export/escaped-default.js:
  • test262/test/language/export/escaped-from.js:
  • test262/test/language/expressions/async-arrow-function/escaped-async-line-terminator.js:
  • test262/test/language/expressions/async-arrow-function/escaped-async.js:
  • test262/test/language/expressions/async-function/escaped-async.js:
  • test262/test/language/expressions/async-generator/escaped-async.js:
  • test262/test/language/expressions/dynamic-import/escape-sequence-import.js:
  • test262/test/language/expressions/import.meta/syntax/escape-sequence-import.js:
  • test262/test/language/expressions/import.meta/syntax/escape-sequence-meta.js:
  • test262/test/language/expressions/new.target/escaped-new.js:
  • test262/test/language/expressions/new.target/escaped-target.js:
  • test262/test/language/expressions/object/method-definition/async-gen-meth-escaped-async.js:
  • test262/test/language/expressions/object/method-definition/async-meth-escaped-async.js:
  • test262/test/language/expressions/object/method-definition/escaped-get.js:
  • test262/test/language/expressions/object/method-definition/escaped-set.js:
  • test262/test/language/import/escaped-as-import-specifier.js:
  • test262/test/language/import/escaped-as-namespace-import.js:
  • test262/test/language/import/escaped-from.js:
  • test262/test/language/statements/async-function/escaped-async.js:
  • test262/test/language/statements/async-generator/escaped-async.js:
  • test262/test/language/statements/class/async-gen-meth-escaped-async.js:
  • test262/test/language/statements/class/async-meth-escaped-async.js:
  • test262/test/language/statements/class/syntax/escaped-static.js:
  • test262/test/language/statements/for-await-of/escaped-of.js:
  • test262/test/language/statements/for-of/escaped-of.js:
  • test262/test/language/statements/let/syntax/escaped-let.js:
  • test262/test262-Revision.txt:
5:43 PM Changeset in webkit [272350] by aestes@apple.com
  • 3 edits in trunk/Source/WebKit

[macOS] Shrink MediaSampleByteRange by 8 bytes
https://bugs.webkit.org/show_bug.cgi?id=221363

Reviewed by Eric Carlson.

Reordered member variables to shrink MediaSampleByteRange from 160 bytes to 152 bytes.

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.cpp:

(WebKit::MediaSampleByteRange::MediaSampleByteRange):

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.h:
4:10 PM Changeset in webkit [272349] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Insert PhantomLocal just before SetLocal for |this| to ensure liveness
https://bugs.webkit.org/show_bug.cgi?id=221353
<rdar://problem/70373862>

Reviewed by Saam Barati.

Let's consider the following case before SSA conversion.

BB#0:

SetArgumentDefinitely(this)
...

@a: SomethingFun()

MoveHint(@a, this)
SetLocal(@a, this)
Jump #1

BB#1:

...
ExitOK (this point)
...

@b: SomethingFun()

MoveHint(@b, this)
SetLocal(@b, this)
...

BB#2: (Catch entry point)

...

@c: SetArgumentDefinitely(this)

...
Jump #1

We have two entry points. And BB#0 sets @a to |this| while BB#2 does not update |this|, so it is using @c.
We have several patterns we can store |this|: arrow functions' |this| loading, derived constructors' |this| update. So we can see
SetLocal(@x, this) at arbitrary code points in CodeBlocks having them.

The problem is that DFG strongly assumed that |this| is initialized in the root basic block only once. So usually, we do not insert Flush/PhantomLocal for |this|.
But this is problematic when we can store |this| at arbitrary basic blocks since we do not properly insert Flush/PhantomLocal(this) in BB#1's just before Store.

Not inserting that in the above case makes |this| dead in BB#1's head liveness. Then we do not properly insert Phi(BB#0, BB#2) for |this|.
This is OK for non |this| locals since literally that local is not used at all in BB#1. But |this| is special since it is always live in bytecode.
So, OSR availability will be broken in the above graph: at ExitOK place, |this| must be live in bytecode. But |this| is pointing ConflictingFlush since
BB#0 says @a and BB#2 says @c while we do not have Phi.

The problem is that we do not keep liveness of |this| properly in BB#1. When setting a new |this|, we insert PhantomLocal to keep liveness so that appropriate Phi
will be inserted when two predecessors have different DFG nodes for |this|, and this graph can appear in arrow functions, derived constructors, and code with catch.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::setArgument):

  • dfg/DFGVariableAccessDataDump.cpp:

(JSC::DFG::VariableAccessDataDump::dump const):

4:08 PM Changeset in webkit [272348] by achristensen@apple.com
  • 2 edits in trunk/Source/WTF

Fix Catalyst build after r272228
https://bugs.webkit.org/show_bug.cgi?id=220683
<rdar://problem/73940814>

  • wtf/PlatformHave.h:

Turn off our use of UIEventAttribution on Catalyst until we update our internal bots.

3:59 PM Changeset in webkit [272347] by Diego Pino Garcia
  • 2 edits in trunk/Source/WebCore

Unreviewed, GTK Ubuntu LTS build fix after r272311.

  • platform/graphics/ColorSpace.h: Include <functional>, needed for std::invoke().
3:58 PM Changeset in webkit [272346] by Kate Cheney
  • 9 edits in trunk/Source/WebKit

PCM: earliestTimeToSend should be treated as an independent time value, not relative to timeOfAdClick
https://bugs.webkit.org/show_bug.cgi?id=221303
<rdar://problem/73902668>

Reviewed by John Wilander.

r270136 assumed that PCM's earliestTimeToSend attribute was the
difference between timeOfAdClick and when the attribution should be
sent. As a result, it began each new browser session by adjusting
this value based on the amount of time the session was closed.
In reality, earliestTimeToSend is a raw secondsSinceEpoch() value, so we don't
need any adjustment after a new session.

No new tests, this is covered by
http/tests/privateClickMeasurement/expired-attribution-report-gets-sent-on-session-start.html
now that the corresponding test SPI has been updated.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::createTableQueries):
(WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):
(WebKit::ResourceLoadStatisticsDatabaseStore::createSchema):
(WebKit::ResourceLoadStatisticsDatabaseStore::destroyStatements):
(WebKit::ResourceLoadStatisticsDatabaseStore::markAttributedPrivateClickMeasurementsAsExpiredForTesting):
Update the testing SPI to insert an expired time of now minus one
hour as the earliestTimeToSend.

(WebKit::ResourceLoadStatisticsDatabaseStore::updateTimerLastFired): Deleted.
(WebKit::ResourceLoadStatisticsDatabaseStore::timerLastFired): Deleted.
(WebKit::ResourceLoadStatisticsDatabaseStore::updatePrivateClickMeasurementAttributionTimes): Deleted.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::updateTimerLastFired): Deleted.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
  • NetworkProcess/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests):
(WebKit::PrivateClickMeasurementManager::updateTimerLastFired): Deleted.

  • NetworkProcess/PrivateClickMeasurementManager.h:
3:46 PM Changeset in webkit [272345] by jiewen_tan@apple.com
  • 46 edits in trunk

[WebAuthn] Allow one user gesture free prompt for each navigation
https://bugs.webkit.org/show_bug.cgi?id=220897
<rdar://problem/73541303>

Reviewed by Brent Fulgham.

Source/WebCore:

  • Modules/webauthn/AuthenticatorCoordinator.cpp:

(WebCore::AuthenticatorCoordinator::resetUserGestureRequirement):

  • Modules/webauthn/AuthenticatorCoordinator.h:
  • Modules/webauthn/AuthenticatorCoordinatorClient.h:
  • page/Quirks.cpp:
  • page/Quirks.cpp.h:
  • replay/UserInputBridge.cpp:

(WebCore::UserInputBridge::loadRequest):
(WebCore::UserInputBridge::reloadFrame):
Adds the ability to reset the user gesture requirement flag for user initiated reloads and quirks.

Source/WebKit:

This is a quirk that only allows certain websites.

Covered by existing tests.

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManager::filterTransports const):
(WebKit::AuthenticatorManager::runPanel):
(WebKit::AuthenticatorManager::runPresenter):
Cancel the whole WebAuthn operation if no user gesture is indicated.

  • WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:

(WebKit::WebAuthenticatorCoordinator::makeCredential):
(WebKit::WebAuthenticatorCoordinator::getAssertion):

  • WebProcess/WebAuthentication/WebAuthenticatorCoordinator.h:

Set a boolean to indicate a free coupon for each navigation.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

LayoutTests:

  • http/wpt/webauthn/ctap-hid-failure.https-expected.txt:
  • http/wpt/webauthn/ctap-hid-success.https-expected.txt:
  • http/wpt/webauthn/ctap-nfc-failure.https-expected.txt:
  • http/wpt/webauthn/idl.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-hid.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-local-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-u2f.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-u2f.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-hid.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-local-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-nfc.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-u2f.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-success-hid.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-success-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-success-nfc.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-success-u2f.https-expected.txt:
3:37 PM Changeset in webkit [272344] by weinig@apple.com
  • 10 edits
    12 adds in trunk

Add support for hwb() colors defined in CSS Color 4
https://bugs.webkit.org/show_bug.cgi?id=221352

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Add some new WPT tests for hwb() that will be upstreamed shortly.

  • web-platform-tests/css/css-color/color-resolving-hwb-expected.txt: Added.
  • web-platform-tests/css/css-color/color-resolving-hwb.html: Added.
  • web-platform-tests/css/css-color/hwb-001-expected.html: Added.
  • web-platform-tests/css/css-color/hwb-001.html: Added.
  • web-platform-tests/css/css-color/hwb-002-expected.html: Added.
  • web-platform-tests/css/css-color/hwb-002.html: Added.
  • web-platform-tests/css/css-color/hwb-003-expected.html: Added.
  • web-platform-tests/css/css-color/hwb-003.html: Added.
  • web-platform-tests/css/css-color/hwb-004-expected.html: Added.
  • web-platform-tests/css/css-color/hwb-004.html: Added.
  • web-platform-tests/css/css-color/hwb-005-expected.html: Added.
  • web-platform-tests/css/css-color/hwb-005.html: Added.

Source/WebCore:

Add support for hwb() colors. They are similar to the existing
hsl()/hsla() colors, in that they are a transformation of sRGB
specified using a "hue" component and two additional values.
In the case of hwb(), it is hue, whiteness and blackness.

Tests: imported/w3c/web-platform-tests/css/css-color/color-resolving-hwb.html

imported/w3c/web-platform-tests/css/css-color/hwb-001.html
imported/w3c/web-platform-tests/css/css-color/hwb-002.html
imported/w3c/web-platform-tests/css/css-color/hwb-003.html
imported/w3c/web-platform-tests/css/css-color/hwb-004.html
imported/w3c/web-platform-tests/css/css-color/hwb-005.html

  • css/CSSValueKeywords.in:

Add hwb keyword.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseHWBParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunction):
Add parsing support for hwb(). Canonicalizing to 0-1 to match
how HSL/HSLA is canonicalized.

  • platform/graphics/ColorConversion.cpp:

(WebCore::calculateHSLHue):
(WebCore::toHSLA):
(WebCore::toSRGBA):
(WebCore::toHWBA):
(WebCore::toXYZA):
(WebCore::calcHue): Deleted.

  • platform/graphics/ColorConversion.h:

Implement conversions to/from sRGB, refactoring HSL conversion
code to reuse hue calculation which is the same.

  • platform/graphics/ColorModels.h:

Add HWBModel and fix HSLModel which incorrectly expanded allowed ranges
to the parsed form, rather than the form we use internally. We may want
change this in the future, as it is a bit confusing and pretty unnessary.

  • platform/graphics/ColorTypes.h:

(WebCore::HWBA::HWBA):
(WebCore::asColorComponents):
Add HWBA color type.

LayoutTests:

  • tests-options.json:

Mark WPT test as slow, matching the HSL/HSLA test it based on.

3:17 PM Changeset in webkit [272343] by jiewen_tan@apple.com
  • 3 edits in trunk/Source

PCM: Add fraud prevention experimental feature flag
https://bugs.webkit.org/show_bug.cgi?id=221292
<rdar://problem/73581064>

Reviewed by John Wilander.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
3:17 PM Changeset in webkit [272342] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GTK] webkit_settings_set_enable_plugins deprecation warning breaks unit tests
https://bugs.webkit.org/show_bug.cgi?id=220620

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-02-03
Reviewed by Carlos Garcia Campos.

Don't print a warning when calling webkit_settings_set_enable_plugins() to disable plugins.
We'll still print a warning if attempting to enable plugins, or if checking whether plugins
are enabled.

  • UIProcess/API/glib/WebKitSettings.cpp:

(webkit_settings_get_enable_plugins):
(webkit_settings_set_enable_plugins):

3:07 PM Changeset in webkit [272341] by ysuzuki@apple.com
  • 8 edits
    5 adds in trunk

[JSC] Atomics should support BigInt64Array / BigUint64Array
https://bugs.webkit.org/show_bug.cgi?id=221245

Reviewed by Keith Miller.

JSTests:

  • stress/atomic-increment-bigint64.js: Added.

(shouldBe):
(i.agent.start.262.agent.receiveBroadcast):

  • stress/bigint-atomics-fail.js: Added.

(shouldThrow):

  • stress/bigint64-atomics.js: Added.

(shouldBe):
(test):

  • stress/biguint64-atomics.js: Added.

(shouldBe):
(test):

  • stress/isLockFree.js:

(foo6):
(foo7):
(foo8):
(foo9):

  • stress/shared-array-buffer-bigint.js: Added.

(shouldFail):
(shouldSucceed):
(runAtomic):

  • test262/config.yaml:

Source/JavaScriptCore:

This patch adds BigInt64Array / BigUint64Array support for Atomics.

  1. Atomics.store should be rewritten since it returns non-type-coerced result, so we cannot use atomicReadModifyWrite. The spec also describes Atomics.store without using AtomicReadModifyWrite[1].
  2. Extend Atomics.isLockFree to also accept a size of 8.
  3. Currently, DFG / FTL handle Atomics + BigInt64Array/BigUint64Array as Array::Generic.

[1]: https://tc39.es/ecma262/#sec-atomics.store

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileAtomicsIsLockFree):

  • runtime/AtomicsObject.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::atomicsWaitImpl):
(JSC::JSC_DEFINE_JIT_OPERATION):

  • runtime/ToNativeFromValue.h:

(JSC::toNativeFromValue):

2:46 PM Changeset in webkit [272340] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebCore

Add missing header to fix non-unified builds.

Unreviewed non-unified build fix.

No new tests needed.

  • platform/network/soup/AuthenticationChallengeSoup.cpp:
2:20 PM Changeset in webkit [272339] by Devin Rousso
  • 25 edits in trunk

[macOS] update media controls to use new SF Symbols
https://bugs.webkit.org/show_bug.cgi?id=221307

Reviewed by Eric Carlson.

Source/WebCore:

  • Modules/modern-media-controls/images/macOS/Airplay-fullscreen.svg:
  • Modules/modern-media-controls/images/macOS/Airplay.svg:
  • Modules/modern-media-controls/images/macOS/EnterFullscreen.svg:
  • Modules/modern-media-controls/images/macOS/ExitFullscreen.svg:
  • Modules/modern-media-controls/images/macOS/Forward.svg:
  • Modules/modern-media-controls/images/macOS/MediaSelector-fullscreen.svg:
  • Modules/modern-media-controls/images/macOS/MediaSelector.svg:
  • Modules/modern-media-controls/images/macOS/Mute-RTL.svg:
  • Modules/modern-media-controls/images/macOS/Mute.svg:
  • Modules/modern-media-controls/images/macOS/Pause.svg:
  • Modules/modern-media-controls/images/macOS/PipIn-fullscreen.svg:
  • Modules/modern-media-controls/images/macOS/PipIn.svg:
  • Modules/modern-media-controls/images/macOS/Play.svg:
  • Modules/modern-media-controls/images/macOS/Rewind.svg:
  • Modules/modern-media-controls/images/macOS/SkipBack15.svg:
  • Modules/modern-media-controls/images/macOS/SkipForward15.svg:
  • Modules/modern-media-controls/images/macOS/VolumeHi-RTL.svg:
  • Modules/modern-media-controls/images/macOS/VolumeHi.svg:
  • Modules/modern-media-controls/images/macOS/VolumeLo.svg:

LayoutTests:

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt:
1:22 PM Changeset in webkit [272338] by commit-queue@webkit.org
  • 6 edits
    2 adds in trunk

the nested grid container which has replaced item with 'max-height' has wrong width(0px).
https://bugs.webkit.org/show_bug.cgi?id=219194

Patch by Ziran Sun <Ziran Sun> on 2021-02-03
Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

The test is imported from WPT.

  • web-platform-tests/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001-expected.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html: Added.

Source/WebCore:

Width of a nested grid container with margin:auto returns 0 when their item has "max-height".
This causes the grid item's position wrong due to the wrongly comuputed auto-margin value.
This change is to check whether the preferred logical width is dirty when the grid area changes.

This is an import of Chromium change at
https://chromium-review.googlesource.com/c/chromium/src/+/2503910
This change also imported needsPreferredWidthsRecalculation() from Chromium to RenderReplaced to
address the test case specified here.

Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::GridTrackSizingAlgorithmStrategy::minContentForChild const):
(WebCore::GridTrackSizingAlgorithmStrategy::maxContentForChild const):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::needsPreferredWidthsRecalculation const):

  • rendering/RenderReplaced.h:
12:40 PM Changeset in webkit [272337] by commit-queue@webkit.org
  • 7 edits in trunk/Source

Create a SpeechRecognizer for each SpeechRecognitionRequest
https://bugs.webkit.org/show_bug.cgi?id=219699
<rdar://problem/72392097>

Patch by Sihui Liu <sihui_liu@appe.com> on 2021-02-03
Reviewed by Youenn Fablet.

Source/WebCore:

Make SpeechRecognizer take the ownerwhip of the SpeechRecognitionRequest it's about to handle, and manage its
state.

  • Modules/speech/SpeechRecognizer.cpp:

(WebCore::SpeechRecognizer::SpeechRecognizer):
(WebCore::SpeechRecognizer::~SpeechRecognizer):
(WebCore::SpeechRecognizer::abort):
(WebCore::SpeechRecognizer::stop):
(WebCore::SpeechRecognizer::clientIdentifier const):
(WebCore::SpeechRecognizer::start):
(WebCore::SpeechRecognizer::startCapture):
(WebCore::SpeechRecognizer::stopCapture):
(WebCore::SpeechRecognizer::startRecognition):
(WebCore::SpeechRecognizer::abortRecognition):
(WebCore::SpeechRecognizer::stopRecognition):
(WebCore::SpeechRecognizer::reset): Deleted.
(WebCore::SpeechRecognizer::resetRecognition): Deleted.

  • Modules/speech/SpeechRecognizer.h:

(WebCore::SpeechRecognizer::setInactive):
(WebCore::SpeechRecognizer::currentClientIdentifier const): Deleted.

  • Modules/speech/cocoa/SpeechRecognizerCocoa.mm:

(WebCore::SpeechRecognizer::startRecognition):
(WebCore::SpeechRecognizer::resetRecognition): Deleted.

Source/WebKit:

We used the same SpeechRecognizer for multiple requests, so we had to reset SpeechRecognizer state between
requests, which makes things complicated and hard to debug (like nested reset calls). Now we have one dedicated
SpeechRecognizer for each request.

  • UIProcess/SpeechRecognitionServer.cpp:

(WebKit::SpeechRecognitionServer::requestPermissionForRequest):
(WebKit::SpeechRecognitionServer::handleRequest):
(WebKit::SpeechRecognitionServer::stop):
(WebKit::SpeechRecognitionServer::abort):
(WebKit::SpeechRecognitionServer::invalidate):

  • UIProcess/SpeechRecognitionServer.h:
12:36 PM Changeset in webkit [272336] by Ryan Haddad
  • 4 edits in trunk/Source/WebCore

Unreviewed, reverting r272300.

Caused imported/w3c/web-platform-tests/css/css-scoping/css-
scoping-shadow-dynamic-remove-style-detached.html to
consistently fail on bots

Reverted changeset:

"Remove the Timer from Style::Scope"
https://bugs.webkit.org/show_bug.cgi?id=221221
https://trac.webkit.org/changeset/272300

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

REGRESSION (r270392): Launch time regression under IOSurface::maximumSize()
https://bugs.webkit.org/show_bug.cgi?id=221346
<rdar://problem/73507706>

Reviewed by Sam Weinig.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):
Scope r270392 to only the case where it is needed, when DOM rendering in the GPU process
is enabled and the Web Content process does not have access to IOSurface,
because it causes a small launch time regression.

12:27 PM Changeset in webkit [272334] by Aditya Keerthi
  • 9 edits
    2 adds in trunk

[iOS][FCR] Add new picker for select elements
https://bugs.webkit.org/show_bug.cgi?id=221153
<rdar://problem/73770389>

Reviewed by Tim Horton.

Source/WebKit:

Tapping on a select element should display an context menu that allows
users to choose one of the specified options. Rather than presenting a
UIPickerView, tapping on select elements now create UIContextMenuInteractions,
similar to date and file inputs.

Test: fast/forms/ios/form-control-refresh/select/choose-select-option.html

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

(-[WKContentView _shouldShowAutomaticKeyboardUIIgnoringInputMode]):

The new picker does not bring up the keyboard view on all devices.

(-[WKContentView _elementTypeRequiresAccessoryView:]):

Changed from a static method to an instance method, as the returned
value depends on a flag which is only accessible through the instance.

(-[WKContentView requiresAccessoryView]):
(-[WKContentView _formControlRefreshEnabled]):
(-[WKContentView _shouldShowKeyboardForElement:]):
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):
(-[WKContentView _removeContextMenuViewIfPossible]):

Do not remove the context menu if an select element is actively being
interacted with.

(-[WKContentView selectControl]):

  • UIProcess/ios/forms/WKFormSelectControl.mm:

(-[WKFormSelectControl initWithView:]):

  • UIProcess/ios/forms/WKFormSelectPicker.h:
  • UIProcess/ios/forms/WKFormSelectPicker.mm:

(-[WKSelectPicker initWithView:]):
(-[WKSelectPicker controlView]):
(-[WKSelectPicker controlBeginEditing]):

Ensure the position information is up-to-date prior to presenting the
context menu.

(-[WKSelectPicker controlEndEditing]):
(-[WKSelectPicker dealloc]):
(-[WKSelectPicker didSelectOptionIndex:]):
(-[WKSelectPicker createMenu]):

Build the menu using UIActions and UIMenus. Since optgroup elements
cannot be nested, only the root UIMenu can contain UIMenus. Submenus
can only contain UIActions.

(-[WKSelectPicker actionForOptionItem:withIndex:]):
(-[WKSelectPicker contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]):
(-[WKSelectPicker _contextMenuInteraction:styleForMenuWithConfiguration:]):
(-[WKSelectPicker contextMenuInteraction:configurationForMenuAtLocation:]):
(-[WKSelectPicker contextMenuInteraction:willDisplayMenuForConfiguration:animator:]):
(-[WKSelectPicker contextMenuInteraction:willEndForConfiguration:animator:]):
(-[WKSelectPicker removeContextMenuInteraction]):
(-[WKSelectPicker ensureContextMenuInteraction]):
(-[WKSelectPicker showSelectPicker]):
(-[WKSelectPicker selectRow:inComponent:extendingSelection:]):

Implement method for testing select pickers.

LayoutTests:

  • fast/forms/ios/form-control-refresh/select/choose-select-option-expected.txt: Added.
  • fast/forms/ios/form-control-refresh/select/choose-select-option.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.waitForContextMenuToShow):

Added a new UIHelper method to wait until a context menu is displayed.

12:16 PM Changeset in webkit [272333] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Remove access to graphics related user clients
https://bugs.webkit.org/show_bug.cgi?id=221327
<rdar://problem/70496539>

Reviewed by Brent Fulgham.

Remove access to graphics related IOKit classes in the WebContent process on macOS when the GPU process is enabled.

  • WebProcess/com.apple.WebProcess.sb.in:
11:48 AM Changeset in webkit [272332] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Move away from using RenderStyle::preserveNewline
https://bugs.webkit.org/show_bug.cgi?id=221338

Reviewed by Antti Koivisto.

RenderStyle should just be a collection of setter and getter functions.

  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::createAndAppendTextItems):

  • layout/inlineformatting/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::shouldPreserveSpacesAndTabs):
(WebCore::Layout::TextUtil::shouldPreserveNewline):

  • layout/inlineformatting/text/TextUtil.h:
10:41 AM Changeset in webkit [272331] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Optimize PointerCaptureController::elementWasRemoved()
https://bugs.webkit.org/show_bug.cgi?id=221316

Reviewed by Ryosuke Niwa.

Speedometer profiles show HashTable iteration code under PointerCaptureController::elementWasRemoved()
because we always add a hash entry for the mouse pointer.

Optimize away by setting a flag that's only true if any element is referenced by pointer capture.

  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::pointerCaptureElement const):
(WebCore::PointerCaptureController::setPointerCapture):
(WebCore::PointerCaptureController::releasePointerCapture):
(WebCore::PointerCaptureController::hasPointerCapture):
(WebCore::PointerCaptureController::pointerLockWasApplied):
(WebCore::PointerCaptureController::elementWasRemoved):
(WebCore::PointerCaptureController::reset):
(WebCore::PointerCaptureController::updateHaveAnyCapturingElement):
(WebCore::PointerCaptureController::touchWithIdentifierWasRemoved):
(WebCore::PointerCaptureController::hasCancelledPointerEventForIdentifier const):
(WebCore::PointerCaptureController::preventsCompatibilityMouseEventsForIdentifier const):
(WebCore::PointerCaptureController::pointerCaptureElement): Deleted.
(WebCore::PointerCaptureController::hasCancelledPointerEventForIdentifier): Deleted.
(WebCore::PointerCaptureController::preventsCompatibilityMouseEventsForIdentifier): Deleted.

  • page/PointerCaptureController.h:
10:40 AM Changeset in webkit [272330] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[AppleWin 32bit][LLInt] LLIntData.h(104) : warning C4172: returning address of local variable or temporary: id
https://bugs.webkit.org/show_bug.cgi?id=220714

Reviewed by Mark Lam.

This patch fixes LLInt build when ENABLE(COMPUTED_GOTO_OPCODES) is false.

  • llint/LLIntData.h:

(JSC::LLInt::getOpcode):
(JSC::LLInt::getOpcodeWide16):
(JSC::LLInt::getOpcodeWide32):
(JSC::LLInt::getOpcodeAddress):
(JSC::LLInt::getOpcodeWide16Address):
(JSC::LLInt::getOpcodeWide32Address):
(JSC::LLInt::getCodePtr):
(JSC::LLInt::getWide16CodePtr):
(JSC::LLInt::getWide32CodePtr):

10:39 AM Changeset in webkit [272329] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Remove access to com.apple.cvmsServ
https://bugs.webkit.org/show_bug.cgi?id=221336
<rdar://problem/70495789>

Reviewed by Brent Fulgham.

Remove access to com.apple.cvmsServ in the WebContent process when the GPU Process is enabled.

  • WebProcess/com.apple.WebProcess.sb.in:
10:35 AM Changeset in webkit [272328] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Remove access to RootDomainUserClient
https://bugs.webkit.org/show_bug.cgi?id=221326
<rdar://problem/73928098>

Reviewed by Brent Fulgham.

After r272241, access to the IOKit class RootDomainUserClient can be removed from the WebContent process.

  • WebProcess/com.apple.WebProcess.sb.in:
10:35 AM Changeset in webkit [272327] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

Add internal additions to NetworkSessionCocoa
https://bugs.webkit.org/show_bug.cgi?id=221060
<rdar://problem/68431471>

Reviewed by Brent Fulgham.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):

10:34 AM Changeset in webkit [272326] by Devin Rousso
  • 5 edits in trunk

[iOS] delay +[BKSMousePointerService sharedInstance] so that it doesn't impact launch perf
https://bugs.webkit.org/show_bug.cgi?id=221298

Reviewed by Geoffrey Garen.

Source/WebKit:

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

(-[WKMouseDeviceObserver init]): Added.
(-[WKMouseDeviceObserver startWithCompletionHandler:]): Added.
(-[WKMouseDeviceObserver start]):
(-[WKMouseDeviceObserver stop]):
(-[WKMouseDeviceObserver stopWithCompletionHandler:]): Added.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm:

(iOSMouseSupport.MouseInitiallyDisconnected):
(iOSMouseSupport.MouseInitiallyConnected):
(iOSMouseSupport.MouseLaterDisconnected):
(iOSMouseSupport.MouseLaterConnected):

10:26 AM Changeset in webkit [272325] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Every leading whitespace character is tested twice
https://bugs.webkit.org/show_bug.cgi?id=221335

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::moveToNextNonWhitespacePosition):
(WebCore::Layout::InlineTextItem::createAndAppendTextItems):
(WebCore::Layout::isWhitespaceCharacter): Deleted.

9:48 AM Changeset in webkit [272324] by youenn@apple.com
  • 13 edits
    1 add in trunk

Make sure GPUProcess MediaRecorder handles correctly muted tracks
https://bugs.webkit.org/show_bug.cgi?id=221325

Reviewed by Eric Carlson.

Source/WebCore:

Export new methods.
Covered by updated test.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/cocoa/WebAudioBufferList.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h:

Source/WebKit:

In case of muted audio, zero the audio buffer before writing it in the ring buffer.
In case of muted video, send a black frame instead of the real frame.
For that purpose, create a black frame and convert it to IOSurface.
Apply this to any non IOSurface based video sample.

Fix unified build.

  • GPUProcess/webrtc/RemoteMediaRecorder.h:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:

(WebKit::MediaRecorderPrivate::videoSampleAvailable):
(WebKit::MediaRecorderPrivate::audioSamplesAvailable):

  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.mm: Added.
  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:

LayoutTests:

  • http/wpt/mediarecorder/mute-tracks.html:

Enable media recorder in GPUProcess and reduce the number of retries to have the test fail and not timeout.

9:44 AM Changeset in webkit [272323] by achristensen@apple.com
  • 2 edits in trunk/Tools

Flaky API Test: TestWebKitAPI.WebKitLegacy.CrossPartitionFileSchemeAccess
https://bugs.webkit.org/show_bug.cgi?id=206956

Reviewed by Alexey Proskuryakov.

createPartition is timing out on the bots but not locally.
Don't hide the output of hdiutil so we can see what is happening on the bots.

  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm:

(createPartition):

9:38 AM Changeset in webkit [272322] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Fix watch and tv build after r272228
https://bugs.webkit.org/show_bug.cgi?id=220683

UIEventAttribution is special in that the symbol is declared as unavailable on watchOS and tvOS.
To fix the build, we need to not use this symbol on those operating systems.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:
9:36 AM Changeset in webkit [272321] by Russell Epstein
  • 6 edits in branches/safari-611-branch/Source/WebCore

Apply patch. rdar://problem/73890906

9:33 AM Changeset in webkit [272320] by Russell Epstein
  • 4 edits in branches/safari-611-branch/Source/WebCore

Apply patch. rdar://problem/73904694

9:18 AM Changeset in webkit [272319] by Ryan Haddad
  • 2 edits in trunk/Tools

Replace Apple-Catalina-Release-JSC-Tests bot due to hardware failure
https://bugs.webkit.org/show_bug.cgi?id=221315

Reviewed by Alexey Proskuryakov.

  • CISupport/build-webkit-org/config.json: Replace bot157 with bot610.
9:17 AM Changeset in webkit [272318] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271898. rdar://problem/73935028

ScopedHighPerformanceGPURequest.h not marked framework private
https://bugs.webkit.org/show_bug.cgi?id=220989

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-01-26
Reviewed by Simon Fraser.

The header was listed twice in the project, causing build failures.

No new tests, build fix.

  • WebCore.xcodeproj/project.pbxproj:

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

9:14 AM Changeset in webkit [272317] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Make sure samples stay valid in LocalSampleBufferDisplayLayer::requestNotificationWhenReadyForVideoData
https://bugs.webkit.org/show_bug.cgi?id=221264

Reviewed by Eric Carlson.

Covered by existing tests.

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

(WebCore::LocalSampleBufferDisplayLayer::requestNotificationWhenReadyForVideoData):

8:41 AM Changeset in webkit [272316] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[GStreamer] Add DASH support in the registry scanner
https://bugs.webkit.org/show_bug.cgi?id=215922

Patch by Fernando Jimenez Moreno <Fernando Jiménez Moreno> on 2021-02-03
Reviewed by Philippe Normand.

Source/WebCore:

Test: platform/glib/media/media-can-play-dash.html

  • platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:

(WebCore::GStreamerRegistryScanner::initializeDecoders):

LayoutTests:

Add test to check that 'application/dash+xml' can potentially be played

  • platform/glib/media/media-can-play-dash-expected.txt: Added.
  • platform/glib/media/media-can-play-dash.html: Added.
8:12 AM Changeset in webkit [272315] by commit-queue@webkit.org
  • 4 edits
    6 moves in trunk/LayoutTests

Rename aspect-ratio/parsing/contain-intrinsic-size*
https://bugs.webkit.org/show_bug.cgi?id=221329

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

LayoutTests/imported/w3c:

Rename aspect-ratio/parsing/contain-intrinsic-size* since they deal with
parsing aspect-ratio, not contain-intrinsic-size.

Relevant WPT PR is https://github.com/web-platform-tests/wpt/pull/27457.

  • web-platform-tests/css/css-sizing/aspect-ratio/parsing/aspect-ratio-computed-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-computed-expected.txt.
  • web-platform-tests/css/css-sizing/aspect-ratio/parsing/aspect-ratio-computed.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-computed.html.
  • web-platform-tests/css/css-sizing/aspect-ratio/parsing/aspect-ratio-invalid-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-invalid-expected.txt.
  • web-platform-tests/css/css-sizing/aspect-ratio/parsing/aspect-ratio-invalid.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-invalid.html.
  • web-platform-tests/css/css-sizing/aspect-ratio/parsing/aspect-ratio-valid-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-valid-expected.txt.
  • web-platform-tests/css/css-sizing/aspect-ratio/parsing/aspect-ratio-valid.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-valid.html.

LayoutTests:

Remove entry for test that passes.

7:34 AM Changeset in webkit [272314] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Remove font.size() == 0 optimization in TextUtil::width
https://bugs.webkit.org/show_bug.cgi?id=221301

Reviewed by Simon Fraser.

It does not work with tabs (see tab-size property) and probably not much of a win anyway.

  • layout/inlineformatting/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::width):

7:08 AM Changeset in webkit [272313] by graouts@webkit.org
  • 20 edits in trunk

Add a loader for <model> resources
https://bugs.webkit.org/show_bug.cgi?id=221255

Reviewed by Youenn Fablet.

Source/WebCore:

In order to load <model> resources, we make the MediaResourceLoader constructor take
a FetchOptions::Destination to determine the type of resource loaded. We piggyback on
the media loading code for <model> resources since it handles things like CORS and CSP,
contrary to CachedRawResource.

  • Modules/fetch/FetchRequest.idl:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader):

  • loader/FetchOptions.h:
  • loader/LinkLoader.cpp:

(WebCore::createLinkPreloadResourceClient):

  • loader/MediaResourceLoader.cpp:

(WebCore::MediaResourceLoader::MediaResourceLoader):
(WebCore::MediaResourceLoader::contextDestroyed):
(WebCore::MediaResourceLoader::requestResource):

  • loader/MediaResourceLoader.h:
  • loader/ResourceLoadInfo.cpp:

(WebCore::ContentExtensions::toResourceType):

  • loader/SubresourceLoader.cpp:

(WebCore::logResourceLoaded):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::defaultPriorityForResourceType):

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::createResource):
(WebCore::CachedResourceLoader::requestMedia):
(WebCore::contentTypeFromResourceType):
(WebCore::CachedResourceLoader::checkInsecureContent const):
(WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const):
(WebCore::destinationForType):

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

(WebCore::CachedResourceMediaLoader::create): Explicitly set the destination, which used to
default to EmptyString, to ensure we don't hit the ASSERT_NOT_REACHED() added to
CachedResourceLoader::requestMedia().

  • platform/network/ResourceRequestBase.h:

Source/WebKit:

  • NetworkProcess/NetworkLoadChecker.cpp:

(WebKit::NetworkLoadChecker::isAllowedByContentSecurityPolicy):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::resourceLoadInfo):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::maximumBufferingTime):

Tools:

  • TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm:

(TestWebKitAPI::WebCoreNSURLSessionTest::SetUp):

6:40 AM Changeset in webkit [272312] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Handles cases when the candidate content is overflowing from the get-go
https://bugs.webkit.org/show_bug.cgi?id=221306

Reviewed by Antti Koivisto.

This is the case when we keep adding content to a line with "white-space: nowrap". At some point the candidate content overlaps from
the get-go and while the run is breakable, there's no trailing run.
(see imported/w3c/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-trailing-spaces-011.html).

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingTextContent const):

6:38 AM Changeset in webkit [272311] by weinig@apple.com
  • 19 edits
    10 adds in trunk

Add support for color(xyz ...) as part of CSS Color 4
https://bugs.webkit.org/show_bug.cgi?id=221190

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Add some new WPT tests for color(xyz ) that will be upstreamed shortly.

  • web-platform-tests/css/css-color/xyz-001-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-001.html: Added.
  • web-platform-tests/css/css-color/xyz-002-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-002.html: Added.
  • web-platform-tests/css/css-color/xyz-003-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-003.html: Added.
  • web-platform-tests/css/css-color/xyz-004-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-004.html: Added.
  • web-platform-tests/css/css-color/xyz-005-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-005.html: Added.

Source/WebCore:

Add final (for now) predefined color space supported by color() in CSS Color 4, XYZ.

The specific XYZ use by CSS is the XYZ with D50 white point. To make the generic
XYZA<T, WhitePoint> type work in the infrastrucure, the colorSpace member was removed
from the color types, and the mapping from ColorSpace enum value to ColorType was
converted to use template specialization and can now be extracted using the syntax:

ColorSpaceFor<ColorType>

This change also removed the inclusion of all of the color type specific serialiazation
function declarations in ColorSerialization.h, and instead moved them to the cpp file.
They weren't being used, and to support the XYZA<float, WhitePoint::D50> would have required
incluing more headers, which seemed like the wrong tradeoff. If accessing serialization
without constructing a WebCore::Color is useful in the future, we can always add them back.

Tests: imported/w3c/web-platform-tests/css/css-color/xyz-001.html

imported/w3c/web-platform-tests/css/css-color/xyz-002.html
imported/w3c/web-platform-tests/css/css-color/xyz-003.html
imported/w3c/web-platform-tests/css/css-color/xyz-004.html
imported/w3c/web-platform-tests/css/css-color/xyz-005.html

  • css/CSSValueKeywords.in:

Add xyz keyword.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseColorFunctionForXYZParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):
Add parsing for color(xyz ) parameters. This can't reuse the RGB parameter
parsing because xyz does not allow percentages for any parameter.

  • platform/graphics/ColorConversion.h:

(WebCore::callWithColorType): Deleted.
Moved callWithColorType to ColorSpace.h, where it makes a bit more sense
now that the color mapping is also defined there. This puts most of the
color mapping in one place.

  • platform/graphics/ColorModels.h:

Add some needed includes that fiddling with headers exposed.

  • platform/graphics/ColorSerialization.cpp:

(WebCore::serialization):
(WebCore::serializationForCSS):
(WebCore::serializationForHTML):
(WebCore::serializationForRenderTreeAsText):

  • platform/graphics/ColorSerialization.h:

Add support for serializing XYZA<float, WhitePoint::D50>, taking the chance
to move all the unnecessarily exposed type specific serialization functions.

  • platform/graphics/ColorSpace.cpp:

(WebCore::operator<<):
Add support for XYZ_D50.

  • platform/graphics/ColorSpace.h:

Add color mapping replacing previous explicit static members for colorSpace
mapping which are no longer usable due to the generic nature of XYZA.

(WebCore::callWithColorType):
Moved from ColorConversion.h.

  • platform/graphics/ColorTypes.h:

Remove colorSpace members. Replaced by color space mapping in ColorSpace.h

  • platform/graphics/ColorUtilities.h:

(WebCore::isBlack):
(WebCore::isWhite):
Add overloads for XYZA needed by Color.

  • platform/graphics/ExtendedColor.h:

(WebCore::ExtendedColor::create):
Replace color.colorSpace with ColorSpaceFor<ColorType>.

  • platform/graphics/cg/ColorSpaceCG.cpp:

(WebCore::xyzD50ColorSpaceRef):

  • platform/graphics/cg/ColorSpaceCG.h:

(WebCore::cachedCGColorSpace):
Add CoreGraphics support for the XYZ color space. (kCGColorSpaceGenericXYZ maps to XYZ with a D50 white point.)

LayoutTests:

Remove now passing xyz test. Update comment for the other xyz test which is invalid.
Getting it removed in https://github.com/web-platform-tests/wpt/pull/27416.

  • fast/css/parsing-color-function-expected.txt:
  • fast/css/parsing-color-function.html:

Add xyz specific parsing tests, as the rgb ones can't be reusued due to xyz
not supporting percentages for any component.

6:28 AM Changeset in webkit [272310] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Use the overflowing run to decide if the unbreakable content should stay on the current line
https://bugs.webkit.org/show_bug.cgi?id=221295

Reviewed by Antti Koivisto.

When an unbreakable set of runs overflow the available space, we need to check if the content is allowed to get wrapped to the next line.
Let's use the _overflowing_ run's style to decided if the content stays on the line (e.g. white-space: nowrap)
e.g. <span><nowrap>this_content_should_not_wrapped</nowrap>this_overflows</span>
in this case the overflowing run's style allows wrapping so we wrap entire content (see imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-white-space-crash-002.html)

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):

6:04 AM Changeset in webkit [272309] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

[css-grid] max-height percentages are wrongly resolved for replaced grid items
https://bugs.webkit.org/show_bug.cgi?id=220733

Patch by Ziran Sun <Ziran Sun> on 2021-02-03
Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

The following tests are imported from WPT.

  • web-platform-tests/css/css-grid/grid-items/grid-img-item-percent-max-height-001-expected.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-img-item-percent-max-height-001.html: Added.

Source/WebCore:

Make replacedMinMaxLogicalHeightComputesAsNone check the override cb height. If the
override height is indefinite, this function should return true. Otherwise returns false.

This is an import of Chromium changes at
https://chromium-review.googlesource.com/c/chromium/src/+/2100771
and
https://chromium-review.googlesource.com/c/chromium/src/+/2287370.
The Chromium code checks on Quirks mode. In WebKit, this check doesn't seem making any
impact.
Test percentage-max-height-001.html already works in WebKit without this change. Test
percentage-max-height-002.html is not ported as it still doesn't work even with this
change. This change intends to fix the grid bug raised.

Test grid-img-item-percent-max-height-001.html was ported to WPT at
https://github.com/web-platform-tests/wpt/commit/4816b3d70f98777afd1757995af84c3adc67d433

Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-img-item-percent-max-height-001.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::replacedMinMaxLogicalHeightComputesAsNone const):

6:03 AM Changeset in webkit [272308] by commit-queue@webkit.org
  • 4 edits in trunk

[css-grid][css-flex] <table> grid item should fill the grid area for 'stretch'/'normal' self alignment
https://bugs.webkit.org/show_bug.cgi?id=191463

Patch by Ziran Sun <Ziran Sun> on 2021-02-03
Reviewed by Sergio Villar Senin.

Source/WebCore:

Avoid table sizing peculiarities for grid items. Let the grid render algorithm determine
the size of tables that are grid items. Don't let the intrinsic width of table columns
affect the width of the item. This change only deals with widths.

This is an import of Chromium changes at
https://chromium-review.googlesource.com/c/chromium/src/+/781859/
This issue seems only affect grid-items and not flexbox any more hence only changes from
grid are imported.

Test for this change has already been imported from WPT

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::updateLogicalWidth):

LayoutTests:

5:05 AM Changeset in webkit [272307] by commit-queue@webkit.org
  • 5 edits in trunk

Support aspect-ratio on grid items
https://bugs.webkit.org/show_bug.cgi?id=220977

Patch by Rob Buis <rbuis@igalia.com> on 2021-02-03
Reviewed by Javier Fernandez.

Source/WebCore:

Support aspect-ratio for grid items by correcting
the auto-size determination for row/columns-axis
when the child has aspect-ratio set.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::hasAutoSizeInColumnAxis const):
(WebCore::RenderGrid::hasAutoSizeInRowAxis const):

  • rendering/RenderGrid.h:

LayoutTests:

Enable some tests that pass now.

3:48 AM Changeset in webkit [272306] by Ryan Haddad
  • 2 edits in trunk/Tools

Big Sur test262 queues failing download-built-product step
https://bugs.webkit.org/show_bug.cgi?id=221314

Reviewed by Aakash Jain.

  • CISupport/build-webkit-org/config.json: Since we are building both x86

and arm64 on Big Sur, we need to both architectures to be listed in the
config so that the test262 bots can find the archives.

3:13 AM Changeset in webkit [272305] by commit-queue@webkit.org
  • 23 edits
    1 copy
    2 moves
    5 adds
    1 delete in trunk/Source

MachSemaphore does not work well with IPC messages
https://bugs.webkit.org/show_bug.cgi?id=220919
<rdar://problem/73826848>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-02-03
Reviewed by Sam Weinig.

Move WTF::MachSemaphore to WebKit IPC::Semaphore. Currently the
MachSemaphore is useful only in cross-process IPC, implemented by the
IPC::.

Source/WebKit:

Adds a stub IPC::Semaphore to all non-COCOA platforms, so that
constructors do not need to ifdef'ed to be able to compile platforms
that do not yet support GPU process fully.

Implement move constructor and move assignment operator for Semaphore.
Makes it possible to create types that hold Semaphore but still are
decode()able from a IPC message. The decoded objects are held with
Optional, and this forces the subobjects to have move assignment
operator.

Add asserts that the moved-away object is not used. Add the asserts as
asserts on the call return values, so the values are also checked on
normal objects on normal operation.

Implement an encoder and decoder for IPC::Semaphore. Makes it possible
to send it via IPC as its own type, not as MachSendRight.

As an example, changes existing uses of MachSendRight for semaphores in
messages as Semaphores, described below.

No new tests, a refactor.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::createRenderingBackend):

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

(WebKit::RemoteRenderingBackend::create):
(WebKit::RemoteRenderingBackend::RemoteRenderingBackend):
(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • Shared/RemoteRenderingBackendCreationParameters.h: Removed.

Changes RemoteRenderingBackend to receive its parameters from the normal
message parameters instead of redundant
RemoteRenderingBackendCreationParameters. The IPC generator already
generates 1:1 identical structure, it is just the message
Messages::GPUConnectionToWebProcess::CreateRenderingBackend. There is no
need to double-wrap the simple list of parameters. The double-wrapping
is a problem: The message system parameters are of ownership "const
reference", which is what is expected.
RemoteRenderingBackendCreationParameters contents were of ownership
"value", which works as expected only for simple primitive types.
Essentially previously calling the IPC function meant transfering
objects to RemoteRenderingBackendCreationParameters. This is not how the
IPC system is meant to work. The intention of a IPC call is to, by
default, reference its arguments for the purpose of encoding.

  • GPUProcess/media/RemoteAudioDestinationManager.cpp:

(WebKit::RemoteAudioDestination::create):
(WebKit::RemoteAudioDestination::RemoteAudioDestination):
(WebKit::RemoteAudioDestinationManager::createAudioDestination):

  • GPUProcess/media/RemoteAudioDestinationManager.h:
  • GPUProcess/media/RemoteAudioDestinationManager.messages.in:

Receive the semaphore from RemoteAudioDestinationProxy. Previously
it was created during RemoteAudioDestination creation and
be sent back by RemoteAudioDestinationManager.

  • Platform/IPC/Semaphore.cpp: Renamed from Source/WTF/wtf/cocoa/MachSemaphore.cpp.

(IPC::Semaphore::encode const):
(IPC::Semaphore::decode):

  • Platform/IPC/Semaphore.h: Renamed from Source/WTF/wtf/cocoa/MachSemaphore.h.

(IPC::Semaphore::operator bool const):

  • Platform/IPC/cocoa/SemaphoreCocoa.cpp: Added.

(IPC::Semaphore::Semaphore):
(IPC::Semaphore::~Semaphore):
(IPC::Semaphore::operator=):
(IPC::Semaphore::signal):
(IPC::Semaphore::wait):
(IPC::Semaphore::waitFor):
(IPC::Semaphore::createSendRight const):
(IPC::Semaphore::encode const):
(IPC::Semaphore::decode):
(IPC::Semaphore::destroy):

  • Scripts/webkit/messages.py:
  • Scripts/webkit/messages_unittest.py:
  • Scripts/webkit/tests/Makefile:
  • Scripts/webkit/tests/MessageArgumentDescriptions.cpp:

(IPC::jsValueForArguments):
(IPC::messageArgumentDescriptions):

  • Scripts/webkit/tests/MessageNames.cpp:

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

  • Scripts/webkit/tests/MessageNames.h:
  • Scripts/webkit/tests/TestWithMachSemaphore.messages.in: Copied from Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in.
  • Scripts/webkit/tests/TestWithMachSemaphoreMessageReceiver.cpp: Added.
  • Scripts/webkit/tests/TestWithMachSemaphoreMessages.h: Added.
  • Scripts/webkit/tests/TestWithMachSemaphoreMessagesReplies.h: Added.
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::connectToGPUProcess):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
  • WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:

(WebKit::RemoteAudioDestinationProxy::startRenderingThread):
(WebKit::RemoteAudioDestinationProxy::stopRenderingThread):
Change the semaphore usage from unique_ptr to the normal
object access. The semaphore is now created by the proxy,
so there is no unique_ptr.

(WebKit::RemoteAudioDestinationProxy::connectToGPUProcess):
(WebKit::RemoteAudioDestinationProxy::gpuProcessConnectionDidClose):

  • WebProcess/GPU/media/RemoteAudioDestinationProxy.h:

Changes RemoteAudioDestinationProxy to send its own semaphore from
WebProcess to GPUProcess. Previously the semaphore would be sent back by
RemoteAudioDestinationManager. Previously the code structure is more
complicated than neccessary, as the semaphore holder was being
null-checked, reset and re-seated. The WebProcess gets already to choose
the semaphores GPUProcess uses, so this should not increase security
surface. The change chosen here side-steps the shortcoming of the IPC
system where unpacking objects from the Reply messages mandates that a
constructed version of that type exists. For previous MachSendRight
empty-constructed object is simple, but for MachSemaphore
empty-constructed object creates unnecessary complication that is not
required otherwise at the moment. The alternative to what was chosen
here would be to hold with Optional<MachSemaphore> and add a
empty-initializing constructor to hold the object where to unpack the
semaphore object from the Reply.

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
2:34 AM Changeset in webkit [272304] by youenn@apple.com
  • 7 edits in trunk

Enable webrtc video capture in GPUProcess for iOS WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=220966

Reviewed by Eric Carlson.

Tools:

  • WebKitTestRunner/TestOptions.cpp:

LayoutTests:

Disable capture in GPUProcess for now in these tests as:

  • SpeechRecognition in GPUProcess needs some work
  • Internals API in platform/ios/mediastream/video-muted-in-background-tab.html are not supported with GPUProcess.
  • fast/speechrecognition/ios/audio-capture.html:
  • fast/speechrecognition/ios/restart-recognition-after-stop.html:
  • fast/speechrecognition/ios/start-recognition-then-stop.html:
  • platform/ios/mediastream/video-muted-in-background-tab.html:
2:15 AM WebKitGTK/Debugging edited by fred.wang@free.fr
(diff)
2:02 AM WebKitFlatpakSDK/DebugWithRR edited by fred.wang@free.fr
Add alternative way by running in the flatpack shell, as well as how … (diff)
1:44 AM Changeset in webkit [272303] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

Animation of "rotate" or "scale" property does not correctly account for static "translate" property
https://bugs.webkit.org/show_bug.cgi?id=219894
<rdar://problem/72342798>

Unreviewed build fix for Mojave.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::updateAnimations):

12:42 AM Changeset in webkit [272302] by commit-queue@webkit.org
  • 4 edits in trunk

[css-grid] WPT test css/css-grid/grid-model/grid-box-sizing-001.html fails
https://bugs.webkit.org/show_bug.cgi?id=204578

Patch by Ziran Sun <Ziran Sun> on 2021-02-03
Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

All test cases in grid-box-sizing-001.html should pass now due to this change.

  • web-platform-tests/css/css-grid/grid-model/grid-box-sizing-001-expected.txt:

Source/WebCore:

For a positioned element that specified both top/bottom should be treated as though
it has a height explicitly specified. Check on this case is missing in
RenderGrid::layoutBlock. This change adds check on hasDefiniteLogicalHeight() and make
sure we have a specific value of logical-height for the positioned elment that has
both top/bottom specified.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::layoutBlock):

12:30 AM Changeset in webkit [272301] by Carlos Garcia Campos
  • 5 edits in trunk/Source

[GTK][WPE] Reduce the use of SoupURI in preparation for libsoup3
https://bugs.webkit.org/show_bug.cgi?id=221251

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • platform/network/soup/AuthenticationChallengeSoup.cpp:

(WebCore::protectionSpaceServerTypeFromURL):
(WebCore::protectionSpaceFromSoupAuthAndURL):
(WebCore::AuthenticationChallenge::AuthenticationChallenge):
(WebCore::protectionSpaceServerTypeFromURI): Deleted.
(WebCore::protectionSpaceFromSoupAuthAndMessage): Deleted.

Source/WebKit:

  • UIProcess/API/glib/WebKitURISchemeRequest.cpp:

(webkit_uri_scheme_request_get_scheme):
(webkit_uri_scheme_request_get_path):

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkit_web_view_load_uri):

Note: See TracTimeline for information about the timeline view.