Timeline



Mar 5, 2022:

10:59 PM Changeset in webkit [290873] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix JITOperationList::addPointers() to support JIT_OPERATION_VALIDATION_ASSERT_ENABLED.
https://bugs.webkit.org/show_bug.cgi?id=237504
<rdar://problem/89770507>

Reviewed by Saam Barati.

According to tagJSCCodePtrImpl(), we will only use an operation's validation entry
if Options::useJITCage(). Make JITOperationList::addPointers() conform to this.

  • assembler/JITOperationList.cpp:

(JSC::JITOperationList::addPointers):

10:50 PM Changeset in webkit [290872] by Simon Fraser
  • 13 edits
    1 delete in trunk/Source/WebCore

Replace IntRectExtent with RectEdges<int>
https://bugs.webkit.org/show_bug.cgi?id=237495

Reviewed by Sam Weinig.

IntRectExtent was just like RectEdges<int>, so remove it.

Add operator+= for RectEdges<>, and helpers to convert from RectEdges<int> to RectEdges<LayoutUnit>.

Code that previously added a IntRectExtent to a rect now uses .expand().

For some reason initializing a RectEdges<T> with arguments std::max<T> fails to
compile, so use intermediate variables in two places.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/LengthBox.cpp:

(WebCore::operator<<):

  • platform/LengthBox.h:

(WebCore::toLayoutBoxExtent):

  • platform/RectEdges.h:

(WebCore::RectEdges::isZero const):
(WebCore::operator+=):

  • platform/graphics/IntRectExtent.h: Removed.
  • platform/graphics/filters/FEDropShadow.cpp:

(WebCore::FEDropShadow::outsets const):

  • platform/graphics/filters/FilterFunction.h:
  • platform/graphics/filters/FilterOperations.cpp:

(WebCore::FilterOperations::outsets const):

  • platform/graphics/filters/FilterOperations.h:
  • rendering/CSSFilter.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
(WebCore::transparencyClipBox):
(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::beginFilterEffect):

1:55 PM Changeset in webkit [290871] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Optimize VMTraps::maybeNeedHandling().
https://bugs.webkit.org/show_bug.cgi?id=237503

Reviewed by Saam Barati.

There's no need for VMTraps::maybeNeedHandling() to mask the VMTraps bits for
events. Under normal circumstances, there are no traps firing and the traps bits
are 0 anyway. We should optimize for this and do away with the masking. Clients
who use VMTraps::maybeNeedHandling() should and current do call VMTraps::needHandling()
to get the real story on whether there are actually traps to handle or not. Hence,
the masking in VMTraps::maybeNeedHandling() is also not needed for correctness.

We know from experience that changes in RETURN_IN_EXCEPTION can have an impact on
performance. Perhaps this change can also help performance.

  • runtime/ExceptionScope.h:
  • runtime/VMTraps.h:

(JSC::VMTraps::maybeNeedHandling const):

1:24 PM Changeset in webkit [290870] by Alan Bujtas
  • 4 edits in trunk

Remove non-standard display:block UA stylesheet rule for <layer>
https://bugs.webkit.org/show_bug.cgi?id=236730
<rdar://problem/89372670>

Reviewed by Antti Koivisto.

Source/WebCore:

This looks to be an old WebKit (khtml?) quirk.
See also https://bugs.chromium.org/p/chromium/issues/detail?id=1298197

  • css/html.css:

(address, article, aside, div, footer, header, hgroup, main, nav, section):
(address, article, aside, div, footer, header, hgroup, layer, main, nav, section): Deleted.

LayoutTests:

  • inspector/css/shadow-scoped-style-expected.txt:
10:55 AM Changeset in webkit [290869] by mark.lam@apple.com
  • 8 edits in trunk/Source

Fix broken SuspendExceptionScope and remove redundant VM::DeferExceptionScope.
https://bugs.webkit.org/show_bug.cgi?id=237441
<rdar://problem/89769627>

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

SuspendExceptionScope was meant to do exactly the same thing that VM::DeferExceptionScope
does, except that SuspendExceptionScope hasn't been updated to handle exception
handling via VMTraps bits.

This patch will fix SuspendExceptionScope to work like VM::DeferExceptionScope,
and remove the now redundant VM::DeferExceptionScope. SuspendExceptionScope is
the better name here because the scope actually suspends any pending exception.
This is different from other Defer scopes where we prevent some new event from
arising and defer the event to a later time.

  • interpreter/FrameTracers.h:

(JSC::SuspendExceptionScope::SuspendExceptionScope):
(JSC::SuspendExceptionScope::~SuspendExceptionScope):

  • interpreter/Interpreter.cpp:

(JSC::UnwindFunctor::notifyDebuggerOfUnwinding):

  • runtime/TypeProfilerLog.cpp:

(JSC::TypeProfilerLog::processLogEntries):

  • runtime/VM.h:

(JSC::VM::restorePreviousException): Deleted.
(JSC::VM::DeferExceptionScope::DeferExceptionScope): Deleted.
(JSC::VM::DeferExceptionScope::~DeferExceptionScope): Deleted.

Source/WebCore:

  • inspector/InspectorFrontendAPIDispatcher.cpp:

(WebCore::InspectorFrontendAPIDispatcher::evaluateExpression):

  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::evaluateScriptInExtensionTab):

9:18 AM Changeset in webkit [290868] by Alan Bujtas
  • 5 edits in trunk

[IFC][Integration] Do not bail out on IFC content with floats inside.
https://bugs.webkit.org/show_bug.cgi?id=237494

Reviewed by Antti Koivisto.

Source/WebCore:

We have support for such content now.
(This gives a noticeable coverage boost on PLT5 content.)

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForChild):

LayoutTests:

  • platform/ios/css2.1/t0905-c5525-fltcont-00-d-g-expected.txt:
  • platform/mac/css2.1/t0905-c5525-fltcont-00-d-g-expected.txt:
8:57 AM Changeset in webkit [290867] by Antti Koivisto
  • 24 edits in trunk

Resolve ::first-line style eagerly
https://bugs.webkit.org/show_bug.cgi?id=237362

Reviewed by Alan Bujtas.

Source/WebCore:

Compute ::first-line style during style resolution instead of lazily in render tree.
This fixes bugs and clarifies the architecture in ways that a helpful for features like
container queries.

As a side effect it also makes ::first-line style animatable.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::firstLineBlock const): Deleted.

  • rendering/RenderBlock.h:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::RenderElement):
(WebCore::RenderElement::firstLineStyle const):
(WebCore::RenderElement::styleWillChange):
(WebCore::RenderElement::computeFirstLineStyle const): Deleted.
(WebCore::RenderElement::invalidateCachedFirstLineStyle): Deleted.

  • rendering/RenderElement.h:
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::firstLineBlock const): Deleted.

  • rendering/RenderObject.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::firstLineBlock const): Deleted.

  • rendering/RenderRubyRun.h:
  • rendering/RenderTable.cpp:

(WebCore::RenderTable::firstLineBlock const): Deleted.

  • rendering/RenderTable.h:
  • rendering/RenderText.cpp:

(WebCore::RenderText::findByDisplayContentsInlineWrapperCandidate): Deleted.

  • rendering/RenderText.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::getCachedPseudoStyle const):

  • rendering/style/RenderStyle.h:

(WebCore::generatesBox):

  • rendering/svg/RenderSVGText.cpp:

(WebCore::RenderSVGText::firstLineBlock const): Deleted.

  • rendering/svg/RenderSVGText.h:
  • rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:

(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::resolvePseudoElement):
(WebCore::Style::TreeResolver::resolveInheritedFirstLinePseudoElement):
(WebCore::Style::TreeResolver::makeResolutionContextForInheritedFirstLine):
(WebCore::Style::TreeResolver::boxGeneratingParent const const):
(WebCore::Style::TreeResolver::parentBoxStyle const):
(WebCore::Style::TreeResolver::resolveComposedTree):
(WebCore::Style::TreeResolver::resolvePseudoStyle): Deleted.

  • style/StyleTreeResolver.h:

LayoutTests:

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

[LFC][Integration] RenderInline should use ADD_REASONS_AND_RETURN_IF_NEEDED
https://bugs.webkit.org/show_bug.cgi?id=237492

Reviewed by Antti Koivisto.

Content inside RenderInline should be accounted for when collecting coverage information.
(This patch also has a bit of a printModernLineLayoutCoverage&co refactoring.)

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::printTextForSubtree):
(WebCore::LayoutIntegration::contentLengthForSubtreeStayWithinBlockFlow):
(WebCore::LayoutIntegration::contentLengthForBlockFlow):
(WebCore::LayoutIntegration::printModernLineLayoutBlockList):
(WebCore::LayoutIntegration::printModernLineLayoutCoverage):
(WebCore::LayoutIntegration::canUseForChild):
(WebCore::LayoutIntegration::textLengthForSubtree): Deleted.
(WebCore::LayoutIntegration::collectNonEmptyLeafRenderBlockFlows): Deleted.
(WebCore::LayoutIntegration::collectNonEmptyLeafRenderBlockFlowsForCurrentPage): Deleted.

3:33 AM Changeset in webkit [290865] by youenn@apple.com
  • 5 edits in trunk

Implement remote-inbound-rtp packetsLost
https://bugs.webkit.org/show_bug.cgi?id=237443

Reviewed by Eric Carlson.

Source/WebCore:

Take benefit of latest backend to expose RemoteInboundRtpStreamStats values inherited from ReceivedRtpStreamStats.
Covered by updated test.

  • Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:

(WebCore::fillReceivedRtpStreamStats):
(WebCore::fillInboundRtpStreamStats):
(WebCore::fillRemoteInboundRtpStreamStats):

LayoutTests:

  • platform/mac/TestExpectations:
  • webrtc/video-stats.html:
3:18 AM Changeset in webkit [290864] by Oriol Brufau
  • 3 edits
    2 adds in trunk

[css-cascade] Let 'revert-layer' in lowest layer roll back to user styles
https://bugs.webkit.org/show_bug.cgi?id=237486

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add test. It still has some remaining failures due to bug 236272.

  • web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt: Added.
  • web-platform-tests/css/css-cascade/all-prop-revert-layer-noop.html: Added.

Source/WebCore:

When 'revert-layer' was used in the lowest @layer, then it would behave
as 'unset'. This patch fixes ensureRollbackCascadeForRevertLayer() to
not return nullptr and instead return ensureRollbackCascadeForRevert()
in that case. This imples that 'revert-layer' will behave like 'revert'
and roll back to user (or UA) styles.

Test: imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop.html

  • style/StyleBuilder.cpp:

(WebCore::Style::Builder::ensureRollbackCascadeForRevertLayer):

Mar 4, 2022:

11:22 PM Changeset in webkit [290863] by sihui_liu@apple.com
  • 3 edits in trunk/Source/WebKit

Stop setting NSURLIsExcludedFromBackupKey attribute for localSorageDirectory in UI process
https://bugs.webkit.org/show_bug.cgi?id=237447

Reviewed by Chris Dumez.

Let's do that on storage thread in network process when the directory is used.

Covered by existing test: WKWebView.LocalStorageDirectoryExcludedFromBackup.

  • NetworkProcess/storage/OriginStorageManager.cpp:

(WebKit::OriginStorageManager::StorageBucket::resolvedLocalStoragePath):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):

10:48 PM Clangd edited by Brandon
(diff)
10:02 PM Changeset in webkit [290862] by sihui_liu@apple.com
  • 4 edits in trunk

Add null check for path in makeAllDirectories
https://bugs.webkit.org/show_bug.cgi?id=237477

Reviewed by Darin Adler.

Source/WTF:

  • wtf/posix/FileSystemPOSIX.cpp:

(WTF::FileSystemImpl::makeAllDirectories):

Tools:

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp:

(TestWebKitAPI::TEST_F):

9:39 PM Changeset in webkit [290861] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Optimize the padding in StyleRareInheritedData
https://bugs.webkit.org/show_bug.cgi?id=237488

Reviewed by Cameron McCormack.

Shrink StyleRareInheritedData from 280 bytes to 264 bytes on macOS.

Also fix a missing comparison of wordSpacing in operator==.

  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):

  • rendering/style/StyleRareInheritedData.h:
6:38 PM Changeset in webkit [290860] by Tyler Wilcock
  • 2 edits in trunk/Source/WebCore

AX: Protect incoming object with Ref in AXObjectCache::textChanged
https://bugs.webkit.org/show_bug.cgi?id=237475

Reviewed by Chris Fleizach.

This is better practice as ascending the hierarchy could cause
the object to get deleted.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::textChanged):

6:21 PM Changeset in webkit [290859] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Change app launch scheme
https://bugs.webkit.org/show_bug.cgi?id=237480
rdar://89781553

Patch by Harrison Weinerman <hweinerman@apple.com> on 2022-03-04
Reviewed by Brady Eidson.

We need to change the app launch scheme and remove an entitlement that is no longer required.

  • Scripts/process-entitlements.sh:
  • webpushd/WebPushDaemon.mm:

(WebPushD::Daemon::notifyClientPushMessageIsAvailable):

6:03 PM Changeset in webkit [290858] by Tyler Wilcock
  • 9 edits
    3 adds in trunk

AX: [WebAccessibilityObjectWrapperMac AXAttributeStringSetFont] crashes when given a font with a nil postscript name, font family, or display name
https://bugs.webkit.org/show_bug.cgi?id=237373

Reviewed by Chris Fleizach and Andres Gonzalez.

Source/WebCore:

[WebAccessibilityObjectWrapperMac AXAttributeStringSetFont] crashes when given a font with a
nil postscript name, font family, or display name. This can be
triggered with a custom SVG @font-face -- for example:

@font-face {

font-family: 'Litherum';
src: url("resources/Litherum.svg") format(svg);

}

  • { font-family: 'Litherum'; }

We fix this by checking if these values are nil before trying to add
them to a dictionary.

This patch also centralizes application of fonts to attributed strings
by moving AXAttributeStringSetFont to the base wrapper. In doing so,
we fix a bug where if [WebAccessibilityObjectWrapperBase AXAttributeStringSetStyle] was
called from a Mac-context, it set iOS font properties (e.g.
UIAccessibilityTokenFontFamily instead of NSAccessibilityFontFamilyKey).

Test: accessibility/svg-font-face.html

  • accessibility/mac/WebAccessibilityObjectWrapperBase.h:
  • accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

(AXAttributedStringRangeIsValid): Added.
(AXAttributedStringSetFont): Added.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(AXAttributeStringSetStyle):
(AXAttributedStringAppendText):
(AXAttributedStringRangeIsValid):
Moved to base wrapper.
(AXAttributeStringSetFont):
Moved to base wrapper.

LayoutTests:

  • accessibility/resources/Litherum.svg: Added.
  • accessibility/svg-font-face-expected.txt: Added.
  • accessibility/svg-font-face.html: Added.
  • platform/glib/TestExpectations: Skip new test.
  • platform/ios/TestExpectations: Enable new test.
  • platform/win/TestExpectations: Skip new test.
  • platform/mac/accessibility/element-line-rects-and-text-expected.txt:

Before this patch, [WebAccessibilityObjectWrapperBase AXAttributeStringSetStyle] called the iOS
version of AXAttributeStringSetFont. This patch fixes this. The expectation for this test is updated as a result.

5:44 PM Changeset in webkit [290857] by Russell Epstein
  • 18 edits
    2 deletes in branches/safari-613-branch/Source/bmalloc

Apply patch. rdar://problem/89071706

5:06 PM Changeset in webkit [290856] by Patrick Angle
  • 16 edits in trunk/Source

REGRESSION (r284472): [ Monterey ] http/tests/websocket/tests/hybi/inspector/send-and-recieve-debugger.html is failing
https://bugs.webkit.org/show_bug.cgi?id=237280

Reviewed by Devin Rousso.

Source/WebCore:

Covered by existing http/tests/websocket/tests/hybi/inspector/* test cases.

On macOS Monterey we use NSURLSession-based WebSockets by default, unlike earlier versions of macOS. The channel
for these sockets is implemented in WebKit::WebSocketChannel. The non-NSURLSession WebSockets channel (at
least on Cocoa platforms) is implemented in WebCore::WebSocketChannel.

As of r284472 the logic to delay the dispatch of received WebSocket message on platforms using
NSURLSession-based WebSockets is handled by WebCore::WebSocket, not the WebKit::WebSocketChannel.
WebKit::WebSocketChannel now immediately does the work it needs to, and only the delegated work to WebSocket
is queued and taken care of when the socket has resumed. This resulted in some of the instrumentation in
WebKit::WebSocketChannel being able to be called while the socket was suspended leading to events being logged
in the frontend "in the future" (e.g. before the paused script would have been able to be aware of them). To
correct this the WebKit::WebSocketChannel now provides a hook into its helper WebSocketChannelInspector
object to allow the WebCore::WebSocket to notify Web Inspector of events at the same time it is being
logically handled by the page.

Other ThreadableWebSocketChannel implementations will instead provide nullptr in place of a pointer to a
WebInspectorChannelInspector. WebCore::WebSocketChannel was not affected by the changes in r284472 as it has
a different way to guarantee that the methods containing InspectorInstrumentation were not called while the
channel was suspended (and enforced with numerous ASSERT(!m_suspended) checks).

  • Modules/websockets/ThreadableWebSocketChannel.h:

(WebCore::ThreadableWebSocketChannel::channelInspector const):

  • Modules/websockets/WebSocketChannelClient.h:
  • Add reason for error messages so they can be sent to Web Inspector.
  • Modules/websockets/WebSocket.cpp:

(WebCore::WebSocket::didReceiveMessage):
(WebCore::WebSocket::didReceiveBinaryData):
(WebCore::WebSocket::didReceiveMessageError):
(WebCore::WebSocket::didClose):

  • Modules/websockets/WebSocket.h:
  • Move inspector instrumentation calls from WebKit::WebSocketChannel to here so that they are not called until

the socket is resumed.

  • We also now wrap these instrumentation calls in an unlikely check for frontends to avoid allocating the

simulated call frames when Web Inspector isn't even open.

  • Modules/websockets/WebSocketChannelInspector.cpp:

(WebCore::WebSocketChannelInspector::WebSocketChannelInspector):
(WebCore::WebSocketChannelInspector::didCreateWebSocket const):
(WebCore::WebSocketChannelInspector::willSendWebSocketHandshakeRequest const):
(WebCore::WebSocketChannelInspector::didReceiveWebSocketHandshakeResponse const):
(WebCore::WebSocketChannelInspector::didCloseWebSocket const):
(WebCore::WebSocketChannelInspector::didReceiveWebSocketFrame const):
(WebCore::WebSocketChannelInspector::didSendWebSocketFrame const):
(WebCore::WebSocketChannelInspector::didReceiveWebSocketFrameError const):
(WebCore::WebSocketChannelInspector::createFrame):
(WebCore::WebSocketChannelInspector::didCreateWebSocket): Deleted.
(WebCore::WebSocketChannelInspector::willSendWebSocketHandshakeRequest): Deleted.
(WebCore::WebSocketChannelInspector::didReceiveWebSocketHandshakeResponse): Deleted.
(WebCore::WebSocketChannelInspector::didCloseWebSocket): Deleted.
(WebCore::WebSocketChannelInspector::didReceiveWebSocketFrame): Deleted.
(WebCore::WebSocketChannelInspector::didSendWebSocketFrame): Deleted.
(WebCore::WebSocketChannelInspector::didReceiveWebSocketFrameError): Deleted.

  • Modules/websockets/WebSocketChannelInspector.h:
  • Update to keep a WeakRef to the Document to reduce the amount of plumbing necessary to call these methods

from WebSocket.

  • Move static utility method createFrame here from WebKit::WebSocketChannel since it is only used for

inspector instrumentation.

  • Modules/websockets/WorkerThreadableWebSocketChannel.cpp:

(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):

  • Modules/websockets/WorkerThreadableWebSocketChannel.h:
  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:

(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):

  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::fail):
(WebCore::WebSocketChannel::didFailSocketStream):

  • Modules/websockets/WebSocketChannel.h:
  • Update these classes to pass along a reason, if available, for errors.

Source/WebKit:

Move inspector instrumentation for things that should be delayed until the websocket has resumed (in general,
these are instrumentation points for receiving messages) into WebCore::WebSocket so that they are sent at the
expected time in the frontend, not "in the future" when script execution is suspended (e.g. while debugging).

  • WebProcess/Network/WebSocketChannel.cpp:

(WebKit::WebSocketChannel::notifySendFrame):
(WebKit::WebSocketChannel::connect):
(WebKit::WebSocketChannel::close):
(WebKit::WebSocketChannel::fail):
(WebKit::WebSocketChannel::disconnect):
(WebKit::WebSocketChannel::didReceiveText):
(WebKit::WebSocketChannel::didReceiveBinaryData):
(WebKit::WebSocketChannel::didClose):
(WebKit::WebSocketChannel::didReceiveMessageError):
(WebKit::WebSocketChannel::didSendHandshakeRequest):
(WebKit::WebSocketChannel::didReceiveHandshakeResponse):
(WebKit::createWebSocketFrameForWebInspector): Deleted.

  • WebProcess/Network/WebSocketChannel.h:
5:01 PM Changeset in webkit [290855] by Patrick Angle
  • 2 edits in trunk/Source/WebKit

Web Inspector: [Cocoa] Continually opening and closing Web Inspector sometimes crashes
https://bugs.webkit.org/show_bug.cgi?id=237484

Reviewed by Darin Adler.

We need to handle operations on the main queue because webView:stopURLSchemeTask: will be called from the main
queue, and we must not be in middle the operation when we get the request to stop said operation, otherwise we
may attempt to call [urlSchemeTask did*], which is not permitted after we have been asked to stop that task.
If we add the operation for the WKURLSchemeTask to a different queue it is possible we will have already
started the operation on a background queue while at the same time are receiving a request to stop that same
WKURLSchemeTask.

  • UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm:

(-[WKInspectorResourceURLSchemeHandler webView:startURLSchemeTask:]):
(-[WKInspectorResourceURLSchemeHandler webView:stopURLSchemeTask:]):

4:48 PM Changeset in webkit [290854] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Modernize OriginLock
https://bugs.webkit.org/show_bug.cgi?id=237485

Reviewed by Darin Adler.

OriginLock subclasses ThreadSafeRefCounted. As a result, it should have a create()
factory function instead of an error-prone public constructor. Its functions should
also take String parameters by const reference instead of by value.

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::originLockFor):

  • Modules/webdatabase/DatabaseTracker.h:
  • Modules/webdatabase/OriginLock.cpp:

(WebCore::lockFileNameForPath):
(WebCore::OriginLock::OriginLock):
(WebCore::OriginLock::deleteLockFile):
(WebCore::OriginLock::lockFileNameForPath): Deleted.

  • Modules/webdatabase/OriginLock.h:

(WebCore::OriginLock::create):

3:45 PM Changeset in webkit [290853] by Kate Cheney
  • 6 edits
    2 adds in trunk

about:blank iframes do not always inherit parent CSP
https://bugs.webkit.org/show_bug.cgi?id=236347
<rdar://problem/88669147>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/security/contentSecurityPolicy/block-eval-onload-in-nested-about-blank-iframe.html

Usually we initialize CSP for window when we create a jsWindowProxy
for that frame. In this case, we load an about:blank iframe that
attempts to run eval() in the onload function of its own nested
iframe. Since we never run script in frame, we don't initialize a
jsWindowProxy and thus never propogate its CSP.

This fix checks the document's CSP in FrameLoader::clear when we
initialize a new JSGlobalObject and sets the eval value in the window
accordingly to properly enforce CSP.

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::enableEval):

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

(WebCore::FrameLoader::clear):

  • page/csp/ContentSecurityPolicy.h:

(WebCore::ContentSecurityPolicy::evalErrorMessage const):

LayoutTests:

  • http/tests/security/contentSecurityPolicy/block-eval-onload-in-nested-about-blank-iframe-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/block-eval-onload-in-nested-about-blank-iframe.html: Added

We can't use modern js-test.js and related functions because
js-test.js uses eval() and loading it makes the test time out when the
eval is blocked by the document's CSP. We can't specify unsafe-eval
because the whole point of this test is to block eval.

3:31 PM Changeset in webkit [290852] by Robert Jenner
  • 2 edits in trunk/LayoutTests

Update WPT css-scroll-snap tests
https://bugs.webkit.org/show_bug.cgi?id=237358

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
3:30 PM Changeset in webkit [290851] by Russell Epstein
  • 9 edits in branches/safari-613-branch/Source

Versioning.

WebKit-7613.2.2

3:08 PM Changeset in webkit [290850] by mmaxfield@apple.com
  • 11 edits in trunk

[iOS] Books ASSERTs upon opening a book with a debug build of WebKit
https://bugs.webkit.org/show_bug.cgi?id=237445
<rdar://problem/89776531>

Reviewed by Alex Christensen.

Source/WebCore:

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::SQLiteDatabase::open):

Source/WebKit:

  • NetworkProcess/cache/NetworkCacheBlobStorage.cpp:

(WebKit::NetworkCache::BlobStorage::add):

  • UIProcess/API/APIContentRuleListStore.cpp:

(API::openAndMapContentRuleList):
(API::compiledToFile):

Source/WTF:

makeSafeToUseMemoryMapForPath() runs an ASSERT() that it was successful.
However, it's not always successful, so this ASSERT() was getting hit when
trying to open a book in Books. So, this patch makes the function return a
bool to indicate success, and updates callers to do something sensible if
it failed.

Test: FileSystemTest.makeSafeToUseMemoryMapForPath

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::makeSafeToUseMemoryMapForPath):
(WTF::FileSystemImpl::mapToFile):

  • wtf/FileSystem.h:
  • wtf/cocoa/FileSystemCocoa.mm:

(WTF::FileSystemImpl::makeSafeToUseMemoryMapForPath):

Tools:

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp:

(TestWebKitAPI::TEST_F):

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

Home link on weather.gov is not working
https://bugs.webkit.org/show_bug.cgi?id=237451
<rdar://60409277>

Reviewed by Geoff Garen.

LayoutTests/imported/w3c:

  • web-platform-tests/html/browsers/browsing-the-web/overlapping-navigations-and-traversals/tentative/anchor-fragment-history-back-on-click-expected.txt: Added.
  • web-platform-tests/html/browsers/browsing-the-web/overlapping-navigations-and-traversals/tentative/anchor-fragment-history-back-on-click.html: Added.

Add layout test coverage (already upstreamed to WPT).

  • web-platform-tests/html/browsers/browsing-the-web/overlapping-navigations-and-traversals/tentative/cross-document-traversal-same-document-nav-expected.txt:
  • web-platform-tests/html/browsers/browsing-the-web/overlapping-navigations-and-traversals/tentative/same-document-traversal-same-document-nav-expected.txt:

Rebaseline a couple of WPT tests that are now failing. I have verified that these tests are fully failing (and in the same way) in Blink.
In Gecko, only the second subtest in each of these tests is failing.

Source/WebCore:

According to the HTML specification [1], when history.back() is called, we are supposed to
resolve the history entry based on the delta (-1), then we're supposed to queue a task to
traverse the history to that particular entry.

However, WebKit was merely scheduling a task to navigate the history with a delta of -1.
We only resolve the target history entry once the scheduled task runs asynchronously.
As a result, we could end up navigating to a different history entry than we'd expect if
the history list changes between the call to history.back() and the actual execution of
the task to traverse the history list. In particular, fragment navigations can cause
synchronous navigations and thus add new history entries.

On weather.gov, the "HOME" anchor looks like so:
<a href="#" onclick="history.back();">HOME</a>

Per the DOM specification, when clicking the anchor, we'd first call history.back() and
then run the anchor activation behavior that would do a fragment navigation to "#".
The history.back() call would schedule to task to navigate back, then we'd navigate to
"#" synchronously, which would add a new history entry. Once the task to navigate back
would run asynchronously, we would navigate back to the same page (but without the fragment)
instead of going back to the home page.

[1] https://html.spec.whatwg.org/multipage/history.html#traverse-the-history-by-a-delta

Test: imported/w3c/web-platform-tests/html/browsers/browsing-the-web/overlapping-navigations-and-traversals/tentative/anchor-fragment-history-back-on-click.html

  • history/BackForwardClient.h:
  • history/BackForwardController.cpp:

(WebCore::BackForwardController::containsItem const):

  • history/BackForwardController.h:
  • loader/EmptyClients.cpp:
  • loader/NavigationScheduler.cpp:

(WebCore::ScheduledHistoryNavigation::ScheduledHistoryNavigation):
(WebCore::NavigationScheduler::scheduleHistoryNavigation):

Source/WebKit:

  • WebProcess/WebPage/WebBackForwardListProxy.cpp:

(WebKit::WebBackForwardListProxy::removeItem):
(WebKit::WebBackForwardListProxy::containsItem const):

  • WebProcess/WebPage/WebBackForwardListProxy.h:

Source/WebKitLegacy/mac:

  • History/BackForwardList.h:
  • History/BackForwardList.mm:

(BackForwardList::containsItem const):
(BackForwardList::containsItem): Deleted.

Source/WebKitLegacy/win:

  • BackForwardList.cpp:

(BackForwardList::containsItem):

  • BackForwardList.h:
  • WebBackForwardList.cpp:

(WebBackForwardList::containsItem):

LayoutTests:

Skip WPT tests that is timing out. I have verified that this WPT test is timing out in Blink as well.

2:43 PM Changeset in webkit [290848] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Use an OptionSet<> for GraphicsContextCGFlags
https://bugs.webkit.org/show_bug.cgi?id=237482

Reviewed by Wenson Hsieh.

Mechanical change to use an OptionSet<> for GraphicsContextCG::m_contextFlags.

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::GraphicsContextCG::setIsCALayerContext):
(WebCore::GraphicsContextCG::isCALayerContext const):
(WebCore::GraphicsContextCG::setIsAcceleratedContext):
(WebCore::GraphicsContextCG::renderingMode const):

  • platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:

(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
(): Deleted.

2:12 PM Changeset in webkit [290847] by Simon Fraser
  • 2 edits in trunk/Source/WebKit

Crash under ScrollingCoordinatorMac::hasNodeWithAnimatedScrollChanged()
https://bugs.webkit.org/show_bug.cgi?id=237478
<rdar://89072235>

Reviewed by Alan Bujtas.

Crash data show that r290109 failed to fix this crash; the actual cause of the crash is a
null m_page on TiledCoreAnimationScrollingCoordinator, diagnosed by noting that the crash
offset corresponds to the offset of m_renderingUpdateRemainingSteps in Page.

  • WebProcess/WebPage/mac/TiledCoreAnimationScrollingCoordinator.mm:

(WebKit::TiledCoreAnimationScrollingCoordinator::hasNodeWithAnimatedScrollChanged):

2:10 PM Changeset in webkit [290846] by Chris Dumez
  • 4 edits in trunk

URL's isolatedCopy() optimization when called on a r-value reference doesn't work
https://bugs.webkit.org/show_bug.cgi?id=237481

Reviewed by Geoffrey Garen.

Source/WTF:

URL has an isolatedCopy() implementation that attempts to optimize the case where
it is called on a r-value reference. The idea is to rely on the String's
isolatedCopy() implementation which is optimized when called on a r-value reference.

Note that there are some specific conditions under which the String implementation
is able to avoid the copy (see String::isSafeToSendToAnotherThread()).
Namely, the StringImpl's refcount needs to be 1 and it cannot be backed by an
AtomStringImpl.

The issue was that URL::isolatedCopy() would first copy the URL, which would copy
its m_string and thus bump its refcount. As a result, m_string's refcount could
never be 1 and the optimization could never kick in.

  • wtf/URL.cpp:

(WTF::URL::isolatedCopy):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WTF/URL.cpp:

(TestWebKitAPI::TEST_F):

2:08 PM Changeset in webkit [290845] by commit-queue@webkit.org
  • 6 edits
    3 adds in trunk/Source/WebCore

Support constants in IDL namespaces.
https://bugs.webkit.org/show_bug.cgi?id=232557
<radr://problem/85142162>

Patch by Dan Glastonbury <djg@apple.com> on 2022-03-04
Reviewed by Sam Weinig.

Test: bindings/script/test/TestNamespaceConst.idl

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateConstructorHelperMethods):
If namespace contains only constants, globalObject is unused
produces a compile error. Add UNUSED_PARAM to quiet error.

  • bindings/scripts/IDLAttributes.json:
  • bindings/scripts/IDLParser.pm:

(convertNamespaceToInterface): Copy namespace constants to new interface.
(applyTypedefs): Apply typedefs to namespace constants.
(parseNamespace): Added parsed constants to namespace's list of constants.
(parseNamespaceMember): Accept constants as namespace members.

  • bindings/scripts/test/BindingTestGlobalConstructors.idl:
  • bindings/scripts/test/JS/*: Updated.
  • bindings/scripts/test/SupplementalDependencies.dep:
  • bindings/scripts/test/TestNamespaceConst.idl: Added.
1:58 PM Changeset in webkit [290844] by Russell Epstein
  • 1 copy in tags/Safari-614.1.5.7

Tag Safari-614.1.5.7.

1:44 PM Changeset in webkit [290843] by Russell Epstein
  • 9 edits in branches/safari-614.1.5-branch/Source

Versioning.

WebKit-7614.1.5.7

1:00 PM Changeset in webkit [290842] by Russell Epstein
  • 1 copy in tags/Safari-613.2.1

Tag Safari-613.2.1.

12:35 PM Changeset in webkit [290841] by Chris Dumez
  • 8 edits
    2 adds in trunk

Load event never firing after form is submitted
https://bugs.webkit.org/show_bug.cgi?id=235407
<rdar://problem/87831049>

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are no longer timing out.

  • web-platform-tests/html/semantics/forms/form-submission-target/rel-base-target-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-target/rel-button-target-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-target/rel-form-target-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-target/rel-input-target-expected.txt:

Source/WebCore:

In Document::implicitClose(), we early return (and thus don't fire the load
event) if there is a location change pending. To determine if there is a
location change pending, we rely on NavigationScheduler::locationChangePending()
which checks if there is a schedule navigation or not. This usually works fine.

However, when a form gets submitted with a target that is "_blank",
FrameLoader::submitForm() is not able to find the target frame (since we'll need
to create one) and it ends up using the current frame's scheduler. The idea is
that once the navigation actually triggers, FrameLoader::loadFrameRequest() will
check the target and create the new Frame.

The issue is that as a result of this, NavigationScheduler::locationChangePending()
returns true for the submitter's frame while such form submission is scheduled,
even though the navigation will actually happen in another (new) frame. To address
the issue, I updated NavigationScheduler::locationChangePending() to check that
the pending navigation is actually for the current frame.

Test: http/tests/loading/form-submission-no-load-event.html

  • loader/NavigationScheduler.cpp:

(WebCore::ScheduledNavigation::targetIsCurrentFrame const):
(WebCore::NavigationScheduler::locationChangePending):
(WebCore::ScheduledFormSubmission::ScheduledFormSubmission): Deleted.

LayoutTests:

Add layout test coverage (Based on reduction from Sam Sneddon).

  • http/tests/loading/form-submission-no-load-event-expected.txt: Added.
  • http/tests/loading/form-submission-no-load-event.html: Added.
12:33 PM Changeset in webkit [290840] by J Pascoe
  • 2 edits in trunk/Source/WebKit

[WebAuthn] Don't use decidePolicyForLocalAuthenticator for Web Authentication Modern
https://bugs.webkit.org/show_bug.cgi?id=225646
rdar://78147681

Reviewed by Brent Fulgham.

decidePolicyForLocalAuthenticator is not implemented for the _WKWebAuthenticationPanelDelegate
used for modern because the prompt to allow Touch/FaceID comes earlier in the process.

  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:

(WebKit::LocalAuthenticator::makeCredential):

11:40 AM Changeset in webkit [290839] by Said Abou-Hallawa
  • 5 edits in trunk

[GPU Process] Canvas compositing buffer should be created through its GraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=237260
rdar://89196918

Reviewed by Simon Fraser.

Source/WebCore:

If the backend of the underlying ImageBuffer of the canvas is remote the
compositing ImageBuffer will also be remote. This will transfer the whole
compositing operation to GPUProcess.

The layout test fast/canvas/canvas-composite-canvas.html crashes because
of this bug on the GPUP layout bots.

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::fullCanvasCompositedDrawImage):
(WebCore::CanvasRenderingContext2DBase::createCompositingBuffer): Deleted.

  • html/canvas/CanvasRenderingContext2DBase.h:

LayoutTests:

  • gpu-process/TestExpectations:
11:15 AM Changeset in webkit [290838] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

"OffscreenCanvas" in IDLs doesn't seem to be able to be compiled
https://bugs.webkit.org/show_bug.cgi?id=232733
<rdar://problem/85318653>

Patch by Dan Glastonbury <djg@apple.com> on 2022-03-04
Reviewed by Sam Weinig.

OffscreenCanvas is controlled by ENABLE flags. Add conditional
compilation to handle OffscreenCanvas to the WebGPU IDL bindings
when the OffscreenCanvas feature is enabled.

  • Modules/WebGPU/GPUCanvasContext.cpp:

(WebCore::GPUCanvasContext::canvas):

  • Modules/WebGPU/GPUCanvasContext.h:
  • Modules/WebGPU/GPUCanvasContext.idl:

Add OffscreenCanvas to canvas attribute when it is enabled.

  • Modules/WebGPU/GPUImageCopyExternalImage.h:
  • Modules/WebGPU/GPUImageCopyExternalImage.idl:

Add OffscreenCanvas to source attribute when it is enabled.

10:46 AM Changeset in webkit [290837] by eric.carlson@apple.com
  • 5 edits in trunk/Source/WebCore

[Cocoa] Crash in MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL
https://bugs.webkit.org/show_bug.cgi?id=237456
rdar://80407863

Reviewed by Jer Noble.

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::enableInheritURIQueryComponent const): Create
and use a static, never destroyed, AtomString instead of creating one every time
a AVURLAsset is created. New method used by both AVF media players.

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
  • platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:

(WebCore::MediaPlayerPrivateAVFoundationCF::createAVAssetForURL): Call enableInheritURIQueryComponent.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Ditto.

10:03 AM Changeset in webkit [290836] by sihui_liu@apple.com
  • 5 edits in trunk/Source/WebCore

IDB serialization thread should pass isolated copy of IndexIDToIndexKeyMap to storage thread
https://bugs.webkit.org/show_bug.cgi?id=237455

Reviewed by Chris Dumez.

  • Modules/indexeddb/server/MemoryObjectStore.cpp:

(WebCore::IDBServer::MemoryObjectStore::addRecord):

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):

  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::generateIndexKeyMapForValueIsolatedCopy):
(WebCore::generateIndexKeyMapForValue): Deleted.

  • bindings/js/IDBBindingUtilities.h:
9:44 AM Changeset in webkit [290835] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[iOS] Hard link AVPictureInPictureController
https://bugs.webkit.org/show_bug.cgi?id=237227

Reviewed by Brent Fulgham.

Hard linking instead of soft linking should be a small performance improvement.

  • Configurations/WebKit.xcconfig:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

9:16 AM Changeset in webkit [290834] by Aditya Keerthi
  • 5 edits in trunk

[iOS] Unable to scroll to a found text range when there is an existing selection
https://bugs.webkit.org/show_bug.cgi?id=237407
rdar://89653213

Reviewed by Wenson Hsieh.

Source/WebCore:

Scrolling to a found text range is performed by creating a
TemporarySelectionChange and using the RevealSelectionBounds
TemporarySelectionOption. When a TemporarySelectionChange is
destroyed, the original selection is restored.

Currently, the selection is restored using the same set of selection
options used to make the temporary selection. Consequently, whenever a
"reveal" option is specified, WebKit scrolls to reveal the temporary
selection, and then scrolls again to reveal the original selection.
This behavior means that an attempt to scroll to a found text range
will fail if the document has an existing selection.

To fix, do not add any of the "reveal" options to the set of selection
options when restoring the original selection during a
TemporarySelectionChange. The only other features that use
TemporarySelectionChange with "reveal" options are App Highlights
and Scroll To Text Fragment. Neither of these features require WebKit
to scroll to the original selection.

  • editing/Editor.cpp:

(WebCore::TemporarySelectionChange::TemporarySelectionChange):
(WebCore::TemporarySelectionChange::~TemporarySelectionChange):
(WebCore::TemporarySelectionChange::setSelection):

  • editing/Editor.h:

Tools:

Add an API test that sets a selection in the document, finds some
text outside the viewport, and scrolls to make the found text
visible.

  • TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:

(-[TestScrollViewDelegate init]):
(-[TestScrollViewDelegate scrollViewDidEndScrollingAnimation:]):
(TEST):

8:51 AM Changeset in webkit [290833] by Tyler Wilcock
  • 3 edits in trunk/Source/WebCore

AX ITM: Updating m_pendingLoadingProgress can cause deadlock on AXIsolatedTree::m_changeLogLock
https://bugs.webkit.org/show_bug.cgi?id=237402

Reviewed by Chris Fleizach.

AXIsolatedTree::m_pendingLoadingProgress is currently guarded by
AXIsolatedTree::m_changeLogLock. Because loading can happen at any time,
deadlocks can happen in this sequence:

  1. AXIsolatedTree::updateLoadingProgress is called on the main thread while the secondary thread holds the lock
  2. The secondary thread is holding the lock to service an AX request, and said AX request does something to call into the main thread (e.g. AXLOGs an isolated object, which causes a dispatch to the main thread as part of AXIsolatedObject::outerHTML).
  3. Deadlock

This patch fixes this by making m_loadingProgress threadsafe
via std::atomic<double> and removing m_pendingLoadingProgress.

This patch also removes an unnecessary acquisition of m_changeLogLock
in AXIsolatedTree::focusedNode(). This function is only called on the
secondary-thread, and only accesses secondary-thread safe functions
and member variables (nodeForID, m_focusedNodeID), so we don't need the lock.

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::focusedNode):
Removed unnecessary m_changeLogLock acquisition.
(WebCore::AXIsolatedTree::updateLoadingProgress):
Update m_loadingProgress directly instead of the now deleted intermediary
m_pendingLoadingProgress.
(WebCore::AXIsolatedTree::applyPendingChanges):

  • accessibility/isolatedtree/AXIsolatedTree.h:

Remove m_pendingLoadingProgress.

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

Top layers should not be moved
https://bugs.webkit.org/show_bug.cgi?id=237305

Patch by Rob Buis <rbuis@igalia.com> on 2022-03-04
Reviewed by Tim Nguyen.

Top layers are always children of RenderView and should not be moved.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::moveLayers):

7:42 AM Changeset in webkit [290831] by graouts@webkit.org
  • 4 edits in trunk

[web-animations] "inherit" values should trigger keyframe recomputation if any previous effect has changed that property
https://bugs.webkit.org/show_bug.cgi?id=237471

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/responsive/textIndent-expected.txt:

Source/WebCore:

When we fixed 237371 we only looked at the unanimated style, but we should account for any previous keyframe effect
modifying a property set to "inherit" for the current effect.

  • animation/KeyframeEffectStack.cpp:

(WebCore::KeyframeEffectStack::applyKeyframeEffects):

7:11 AM Changeset in webkit [290830] by Kate Cheney
  • 4 edits
    2 adds in trunk

CSP report does not get sent to the document in the case of a detached element
https://bugs.webkit.org/show_bug.cgi?id=237440
<rdar://problem/89081463>

Reviewed by Chris Dumez.

Source/WebCore:

Test: http/tests/security/contentSecurityPolicy/report-violation-to-document-after-element-has-been-detached.html

Only send a violation report to the element if it is connected. Check
right before dispatching in case the element gets detached after the
security policy violation has been created. If the element is not
connected in this case, we send the report to the document.

  • dom/Element.cpp:

(WebCore::Element::enqueueSecurityPolicyViolationEvent):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::reportViolation const):
Also sets the composed value on the violation event as per the spec.

LayoutTests:

  • http/tests/security/contentSecurityPolicy/report-violation-to-document-after-element-has-been-detached-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/report-violation-to-document-after-element-has-been-detached.html: Added.
5:22 AM Changeset in webkit [290829] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

LibWebRTCCodecs::setEncodeRates should send LibWebRTCCodecsProxy::SetEncodeRates only when the encoder is live
https://bugs.webkit.org/show_bug.cgi?id=237421

Reviewed by Darin Adler.

We were previously not asserting in LibWebRTCCodecsProxy::setEncodeRates and we were missing some encode rate orders.
This is due to the fact that when creating an encoder, we are hopping to main thread, then to work queue to send the message to create an encoder.
In LibWebRTCCodecs::setEncodeRates, we were hopping to main thread if needed.
If the encoder connection is null, we are now hopping to main thread, then to work queue as done when creating an encoder.
Since there is a time where LibWebRTCCodecsProxy::setEncodeRates might have sent encode rates, we bail out early to not set based on old bitrates.

Covered by existing tests not crashing in LibWebRTCCodecsProxy::setEncodeRates.

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:

(WebKit::LibWebRTCCodecs::setEncodeRates):

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
5:16 AM Changeset in webkit [290828] by Angelos Oikonomopoulos
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Improve reuse of known register values on ARMv7
https://bugs.webkit.org/show_bug.cgi?id=237424

Reviewed by Žan Doberšek.

Reduce the generated code size by introducing and pervasively using
setupArmAddress(AbsoluteAddress address, ...). This effectively
replaces sequences of e.g.

movw r6, cst1
movt r6, cst2
strd r0, r1, [r6]

with

strd r0, r1, [r6, offset]

when a close enough address is already available in r6.

While here, change short_move to only emit an add/sub if this results in an
actual reduction in code size. When the add/sub would be neutral,
prefer loading an immediate as that doesn't introduce a data dependency
between the instructions.

This results in a measurable but small (< 1%) reduction in the
generated code size on JS2.

Hat tip to Geza Lore for the suggestions.

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::add32):
(JSC::MacroAssemblerARMv7::add64):
(JSC::MacroAssemblerARMv7::or8):
(JSC::MacroAssemblerARMv7::or16):
(JSC::MacroAssemblerARMv7::or32):
(JSC::MacroAssemblerARMv7::sub32):
(JSC::MacroAssemblerARMv7::load32):
(JSC::MacroAssemblerARMv7::load8):
(JSC::MacroAssemblerARMv7::load16):
(JSC::MacroAssemblerARMv7::store32):
(JSC::MacroAssemblerARMv7::store8):
(JSC::MacroAssemblerARMv7::store16):
(JSC::MacroAssemblerARMv7::storePair32):
(JSC::MacroAssemblerARMv7::short_move):
(JSC::MacroAssemblerARMv7::add32Impl):
(JSC::MacroAssemblerARMv7::branch8):
(JSC::MacroAssemblerARMv7::branchTest32):
(JSC::MacroAssemblerARMv7::branchTest8):
(JSC::MacroAssemblerARMv7::branchTest16):
(JSC::MacroAssemblerARMv7::farJump):
(JSC::MacroAssemblerARMv7::absoluteAddressWithinShortOffset):
(JSC::MacroAssemblerARMv7::setupArmAddress):

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

Iteration to search for least active WebGLRenderingContextBase could use min_element
https://bugs.webkit.org/show_bug.cgi?id=237464

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-04
Reviewed by Antti Koivisto.

Apply review comments after landing bug 222411 r290816.

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::addActiveContext):

3:55 AM Changeset in webkit [290826] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[Flatpak SDK] Upgrade from llvm12 to llvm13
https://bugs.webkit.org/show_bug.cgi?id=237430

Patch by Philippe Normand <pnormand@igalia.com> on 2022-03-04
Reviewed by Adrian Perez de Castro.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak._get_dependency_packages):

3:37 AM Changeset in webkit [290825] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] Documentation for webkit_web_context_set_spell_checking_languages() is incomplete
https://bugs.webkit.org/show_bug.cgi?id=237465

Reviewed by Carlos Garcia Campos.

  • UIProcess/API/glib/WebKitWebContext.cpp: Improve documentation.
1:15 AM Changeset in webkit [290824] by youenn@apple.com
  • 16 edits in trunk/Source/WebKit

Introduce routines to exchange SharedVideoFrame::Buffer directly
https://bugs.webkit.org/show_bug.cgi?id=237267

Reviewed by Eric Carlson.

Define explictly SharedVideoFrame::Buffer as Variant of the various buffer representations.
This allows to move more code in SharedVideoFrame for instance by adding direct support of sending webrtc::VideoFrame buffers in SharedVideoFrame.
Reuse that code in LibWebRTCCodecs as a refactoring/simplification.
Reuse that code in RemoteVideoFrameObjectHeap which allows to exchange IOSurfaces in case WebProcess can use them.
This is used when encoding such frames using software encoders.

Covered by existing tests.

  • GPUProcess/media/RemoteVideoFrameObjectHeap.cpp:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.h:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.messages.in:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/media/RemoteVideoFrameProxy.cpp:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxy.h:
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxyProcessor.cpp:
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxyProcessor.h:
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxyProcessor.messages.in:
  • WebProcess/GPU/webrtc/SharedVideoFrame.cpp:
  • WebProcess/GPU/webrtc/SharedVideoFrame.h:
12:53 AM Changeset in webkit [290823] by graouts@webkit.org
  • 8 edits in trunk

[web-animations] keyframe values set to "inherit" should recompute their values when the inherited value changes
https://bugs.webkit.org/show_bug.cgi?id=237371

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/responsive/lineHeight-expected.txt:
  • web-platform-tests/web-animations/responsive/opacity-expected.txt:
  • web-platform-tests/web-animations/responsive/textIndent-expected.txt:

Source/WebCore:

We now keep track of properties set to "inherit" in keyframes such that we may determine when the
computed value may have changed when resolving animations.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::processKeyframes):

  • animation/KeyframeEffect.h:

(WebCore::KeyframeEffect::inheritedProperties const):

  • animation/KeyframeEffectStack.cpp:

(WebCore::KeyframeEffectStack::applyKeyframeEffects):

12:42 AM Changeset in webkit [290822] by sihui_liu@apple.com
  • 3 edits in trunk/Source/WebCore

SQLiteDatabase::open should return early if journal mode cannot be set
https://bugs.webkit.org/show_bug.cgi?id=237130
<rdar://83130954>

Reviewed by Darin Adler.

Add early return in SQLiteDatabase::open if key operation fails; also make sure error is properly set and
database is closed in the case.

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::SQLiteDatabase::open):
(WebCore::SQLiteDatabase::useWALJournalMode):
(WebCore::SQLiteDatabase::close):

  • platform/sql/SQLiteDatabase.h:
12:10 AM Changeset in webkit [290821] by youenn@apple.com
  • 5 edits in trunk

webrtc/canvas-to-peer-connection.html is flakily failing a test assertion
https://bugs.webkit.org/show_bug.cgi?id=237423

Reviewed by Eric Carlson.

Source/WebCore:

Make sure the rotation session size is matching the buffer size.
Covered by updated test.

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

(WebCore::GraphicsContextGLCocoa::paintCompositedResultsToMediaSample):

LayoutTests:

WebRTC pipeline is lossy so frames might disappear.
For that reason, we need to send multiple times the same frame to ensure we can read the expected frame.
To ensure we are not reading a previous test frame, what we do is changing the size of the canvas before doing the test.
This patch reduces the number of iterations to ensure the test is not too long to run.

  • webrtc/canvas-to-peer-connection.html:
12:07 AM Changeset in webkit [290820] by youenn@apple.com
  • 4 edits in trunk/Source/WebCore

AVVideoCaptureSource should reuse CaptureDevice label
https://bugs.webkit.org/show_bug.cgi?id=237363
<rdar://88301613>

Reviewed by Eric Carlson.

We are getting AV device name through AVCaptureDevice.localizedName, first in UIProcess, then in GPUProcess.
To make sure we always use the ones from UIProcess (which are the ones exposed through mediaDevices.enumerateDevices),
We make sure to use CaptureDevice.label when creating an AVVideoCaptureSource.

Manually tested.

  • platform/mediastream/mac/AVVideoCaptureSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::create):
(WebCore::AVVideoCaptureSource::AVVideoCaptureSource):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

Mar 3, 2022:

11:55 PM Changeset in webkit [290819] by youenn@apple.com
  • 4 edits in trunk/LayoutTests

fast/mediastream/getUserMedia-to-canvas-1.html and fast/mediastream/getUserMedia-to-canvas-2.html are failing on MacOS when remote video frame flag is enabled
https://bugs.webkit.org/show_bug.cgi?id=237042
<rdar://problem/89298601>

Reviewed by Eric Carlson.

Video element videoWidth/videoHeight are updated when track settings are changed,
and not when video frames being received.

This does not guarantee that videoWidth/videoHeight (main thread) are fully in sync
with the actual video frames (background thread) when there is a change of size.

We might be able to tighten this in MediaPlayerPrivateMediaStreamAVFObjC by only resorting on video frames.
In the meantime, we update the test to use requestVideoFrameCallback which provides accurate per frame metadata.

  • fast/mediastream/getUserMedia-to-canvas-1.html:
  • fast/mediastream/getUserMedia-to-canvas-2.html:
  • webrtc/routines.js:
10:58 PM Changeset in webkit [290818] by beidson@apple.com
  • 13 edits in trunk/Source/WebKit

Add a new "Daemon -> Client" message type to webpushd
https://bugs.webkit.org/show_bug.cgi?id=237391

Reviewed by Alex Christensen.

Future work will need more messages like this.
So let's add the mechanism in a small standalone patch that uses it for debug messages.

No behavior change for now.

  • NetworkProcess/Notifications/Cocoa/WebPushDaemonConnectionCocoa.mm:

(WebKit::WebPushD::handleWebPushDaemonMessage):
(WebKit::WebPushD::Connection::connectionReceivedEvent):
(WebKit::WebPushD::Connection::connectionReceivedEvent const): Deleted.

  • NetworkProcess/Notifications/WebPushDaemonConnection.cpp:

(WebKit::WebPushD::Connection::debugMessage):

  • NetworkProcess/Notifications/WebPushDaemonConnection.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementConnection.h:
  • NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementConnectionCocoa.mm:

(WebKit::PCM::Connection::connectionReceivedEvent):
(WebKit::PCM::Connection::connectionReceivedEvent const): Deleted.

  • Platform/IPC/DaemonConnection.h:
  • Shared/WebPushDaemonConstants.h:

(WebKit::WebPushD::daemonMessageTypeSendsReply):

  • webpushd/ICAppBundle.mm:

(WebPushD::broadcastDebugMessage):

  • webpushd/PushClientConnection.h:
  • webpushd/PushClientConnection.mm:

(WebPushD::ClientConnection::broadcastDebugMessage):
(WebPushD::ClientConnection::sendDebugMessage):
(WebPushD::ClientConnection::sendDaemonMessage const):

  • webpushd/WebPushDaemon.h:
  • webpushd/WebPushDaemon.mm:

(WebPushD::Daemon::broadcastDebugMessage):
(WebPushD::Daemon::broadcastAllConnectionIdentities):
(WebPushD::Daemon::connectionAdded):

10:38 PM Changeset in webkit [290817] by Ross Kirsling
  • 2 edits in trunk/Source/WebKit

REGRESSION(r290815): Fix even more incorrect #if ENABLE(SERVICE_WORKER) usage in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=237461

Unreviewed build fix.

  • NetworkProcess/NetworkProcess.cpp:

The existence of NetworkProcess::{getPendingPushMessages, processPushMessages} depend on ENABLE(SERVICE_WORKER);
it is only when they exist that their implementation depends on ENABLE(BUILT_IN_NOTIFICATIONS).

10:02 PM Changeset in webkit [290816] by commit-queue@webkit.org
  • 14 edits
    2 deletes in trunk

WebGL context count is not limited for GPU process
https://bugs.webkit.org/show_bug.cgi?id=222411

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-03
Reviewed by Kenneth Russell.

Source/WebCore:

Move the context limit from the GraphicsContextGL implementation
level to WebGLRenderingContext level. This way the limit
is applied to the GPUP implementation too.

Recycle the context with the earliest activity (draw, readpixels)
instead of the creation order.

Stores the WebGL contexts to per-thread set and limits the size of the set.
The set is per-thread to support WebGL contexts in DOM as well as
offscreen canvas use-cases. Offscreen canvas is not implemented for Cocoa
but other ports may enable it.

Tested by:
LayoutTests/webgl/lose-context-after-context-lost.html
LayoutTests/webgl/many-contexts-access-after-loss.html
LayoutTests/webgl/many-contexts.html
LayoutTests/webgl/max-active-contexts-console-warning.html
LayoutTests/webgl/max-active-contexts-gc.html
LayoutTests/webgl/max-active-contexts-oldest-context-lost.html
LayoutTests/webgl/max-active-contexts-webglcontextlost-prevent-default.html

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::activeContexts):
(WebCore::addActiveContext):
(WebCore::removeActiveContext):
(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
(WebCore::WebGLRenderingContextBase::setGraphicsContextGL):
(WebCore::WebGLRenderingContextBase::destroyGraphicsContextGL):
(WebCore::WebGLRenderingContextBase::clearIfComposited):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):
(WebCore::WebGLRenderingContextBase::updateActiveOrdinal):

  • html/canvas/WebGLRenderingContextBase.h:

(WebCore::WebGLRenderingContextBase::activeOrdinal const):

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:

(WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE):

  • platform/graphics/cocoa/WebProcessGraphicsContextGLCocoa.mm:

(WebCore::createWebProcessGraphicsContextGL):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:

(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):

  • platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp: Removed.
  • platform/graphics/opengl/GraphicsContextGLOpenGLManager.h: Removed.
  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

(WebCore::createWebProcessGraphicsContextGL):

  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE):

LayoutTests:

  • platform/ios-wk2/TestExpectations:
9:28 PM Changeset in webkit [290815] by Ben Nham
  • 28 edits
    2 adds in trunk

Enforce silent push quota
https://bugs.webkit.org/show_bug.cgi?id=236863

Reviewed by Brady Eidson.

Source/WebCore:

All PushSubscriptions are created with the userVisibleOnly flag set. This means that all
push events should result in a user-facing notification.

To enforce this, we use a quota system. A push subscription can process up to three silent
pushes. After three silent pushes, we remove the push subscription. To continue to receive
pushes, the user must navigate back to the website and the site must request permission to
send pushes again.

Originally we were going to use a more complicated quota system that moved subscriptions
from waking to non-waking before finally unsubscribing, but this seemed like it could lead
to subscriptions being in a partially-working state that would be hard to explain and reason
about. As a result, I've removed the wakeState column from PushDatabase and replaced it
a silentPushCount column.

To track whether or not a service worker has shown a notification while processing a push
event, we use a boolean flag on ServiceWorkerGlobalScope. This should be sufficient because
we currently only process one push event at a time.

Covered by existing and new API tests.

  • Modules/push-api/PushDatabase.cpp:

(WebCore::PushRecord::isolatedCopy const):
(WebCore::PushRecord::isolatedCopy):
(WebCore::PushDatabase::insertRecord):
(WebCore::makePushRecordFromRow):
(WebCore::PushDatabase::getRecordByTopic):
(WebCore::PushDatabase::getRecordByBundleIdentifierAndScope):
(WebCore::PushDatabase::getTopics):
(WebCore::PushDatabase::incrementSilentPushCount):
(WebCore::PushDatabase::removeRecordsByBundleIdentifierAndSecurityOrigin):

  • Modules/push-api/PushDatabase.h:
  • workers/service/ServiceWorkerGlobalScope.h:
  • workers/service/ServiceWorkerRegistration.cpp:

(WebCore::ServiceWorkerRegistration::showNotification):

  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::ServiceWorkerThread::queueTaskToFirePushEvent):

Source/WebKit:

  • If a push event doesn't result in a notification or if the associated promise rejects, then we increment the silent push count associated with that origin.
  • PushService now removes a subscription if the origin has reached its quota of silent pushes.

Covered by existing and new API tests.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::processPushMessage):

  • NetworkProcess/Notifications/NetworkNotificationManager.cpp:

(WebKit::NetworkNotificationManager::incrementSilentPushCount):
(WebKit::ReplyCaller<int>::callReply):

  • Shared/WebPushDaemonConstants.h:

(WebKit::WebPushD::messageTypeSendsReply):

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _notificationManagerForTesting]):

  • webpushd/PushService.mm:

(WebPushD::updateTopicLists):
(WebPushD::PushService::incrementSilentPushCount):

  • webpushd/WebPushDaemon.mm:

(WebPushD::MessageInfo::incrementSilentPushCount::encodeReply):
(WebPushD::Daemon::decodeAndHandleMessage):
(WebPushD::Daemon::incrementSilentPushCount):

Tools:

Modified existing push tests to show a notification. Added a new test case to make sure that
subscriptions are removed when an origin reaches its quota of silent pushes.

  • TestWebKitAPI/TestNotificationProvider.cpp:

(TestWebKitAPI::notificationPermissions):
(TestWebKitAPI::TestNotificationProvider::TestNotificationProvider):
(TestWebKitAPI::TestNotificationProvider::~TestNotificationProvider):
(TestWebKitAPI::TestNotificationProvider::notificationPermissions):
(TestWebKitAPI::TestNotificationProvider::setPermission):

  • TestWebKitAPI/Tests/WebCore/PushDatabase.cpp:

(TestWebKitAPI::makeTemporaryDatabasePath):
(TestWebKitAPI::getTopicsSync):
(TestWebKitAPI::PushDatabaseTest::getTopics):
(TestWebKitAPI::PushDatabaseTest::removeRecordsByBundleIdentifierAndSecurityOrigin):
(TestWebKitAPI::PushDatabaseTest::incrementSilentPushCount):
(TestWebKitAPI::operator==):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/HTTPServer.mm:

(TestWebKitAPI::HTTPServer::origin const):

LayoutTests:

Update PushEvent tests to check that notifications are displayed.

  • http/wpt/push-api/pushEvent.any.js:

(promise_test.async const):
(promise_test.async if):

  • http/wpt/push-api/pushEvent.any.serviceworker-expected.txt:
8:40 PM Changeset in webkit [290814] by Ben Nham
  • 2 edits in trunk/Source/WebKit

Allow webpushd to launch browser in background
https://bugs.webkit.org/show_bug.cgi?id=237114

Reviewed by Brady Eidson.

Now that webpushd is sandboxed on Mac (r289566), the LaunchServices SPI call to launch
Safari is now failing, because LaunchServices goes down a different path when there is a
sandboxed caller. In particular, it fails to launch Safari because Safari doesn't register
for the webkit-app-launch scheme. Safari also doesn't want to list this scheme in its plist.

For now, to unblock our testing, we're giving ourselves an entitlement to restore the
pre-sandboxed behavior of being able to launch Safari even though it doesn't register for
the webkit-app-launch scheme. We are still in discussions with LaunchServices and Safari
about if there is a better and more restrictive way of granting ourselves this ability.

  • Scripts/process-entitlements.sh:
8:08 PM Changeset in webkit [290813] by Devin Rousso
  • 35 edits
    5 adds in trunk/Source

[GPU Process] dont load Apple Pay button/logo PDFs in the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=237177

Reviewed by Simon Fraser.

Source/WebCore:

  • platform/graphics/SystemImage.h: Added.

(WebCore::SystemImage::draw const):
(WebCore::SystemImage::SystemImage):
Introduce a new extendable class SystemImage that represents a collection of arguments
and methodology (that uses those arguments) to draw something from the system.
This patch introduces two concrete uses:

  • ApplePayButtonSystemImage uses PassKit SPI to draw an Apple Pay button.
  • ApplePayLogoSystemImage loads a PDF file of the Apple Pay logo from inside PassKit.

This architecture was chosen so that GraphicsContext doesn't have to know about Apple Pay
specific things, instead only dealing with a very generic interface (whos subclasses know
more specifically what to do with the data they're given).

  • Modules/applepay/ApplePayButtonSystemImage.h: Added.

(WebCore::ApplePayButtonSystemImage::create):
(WebCore::ApplePayButtonSystemImage::ApplePayButtonSystemImage):
(WebCore::ApplePayButtonSystemImage::encode const):
(WebCore::ApplePayButtonSystemImage::decode):
(isType):

  • Modules/applepay/ApplePayButtonSystemImage.mm: Added.

(WebCore::toPKPaymentButtonType):
(WebCore::toPKPaymentButtonStyle):
(WebCore::ApplePayButtonSystemImage::draw const):

  • css/CSSPrimitiveValueMappings.h:
  • rendering/style/RenderStyle.h:
  • rendering/style/RenderStyleConstants.cpp:
  • rendering/style/RenderStyleConstants.h:

Drive-by: Move ApplePayButtonStyle and ApplePayButtonType to ApplePayButtonSystemImage.h
so they can be used elsewhere (e.g. GPUProcess) without having to include everything else.

  • Modules/applepay/ApplePayLogoSystemImage.h: Added.

(WebCore::ApplePayLogoSystemImage::create):
(WebCore::ApplePayLogoSystemImage::ApplePayLogoSystemImage):
(WebCore::ApplePayLogoSystemImage::encode const):
(WebCore::ApplePayLogoSystemImage::decode):
(isType):

  • Modules/applepay/ApplePayLogoSystemImage.mm: Added.

(WebCore::passKitBundle):
(WebCore::loadPassKitPDFPage):
(WebCore::applePayLogoWhite):
(WebCore::applePayLogoBlack):
(WebCore::applePayLogoForStyle):
(WebCore::ApplePayLogoSystemImage::draw const):
Add a new ApplePayLogoStyle so that the WebProcess isn't able to provide an arbitrary PDF
to load when rendering -webkit-named-image(apple-pay-logo-[white,black]).

  • platform/cocoa/ThemeCocoa.mm:

(WebCore::ThemeCocoa::drawNamedImage const):
(WebCore::fitContextToBox): Deleted.
(WebCore::passKitBundle): Deleted.
(WebCore::loadPassKitPDFPage): Deleted.
(WebCore::applePayButtonLogoBlack): Deleted.
(WebCore::applePayButtonLogoWhite): Deleted.
(WebCore::drawApplePayButton): Deleted.

  • rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::paintApplePayButton):
(WebCore::toPKPaymentButtonStyle): Deleted.
(WebCore::toPKPaymentButtonType): Deleted.
Move the logic that draws the Apple Pay button to a method on GraphicsContext so that it
can hook into the various GPUProcess flags/systems.

  • platform/graphics/GraphicsContext.h:
  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::drawSystemImage): Added.

  • platform/graphics/BifurcatedGraphicsContext.h:
  • platform/graphics/BifurcatedGraphicsContext.cpp:

(WebCore::BifurcatedGraphicsContext::drawSystemImage): Added.

  • platform/graphics/NullGraphicsContext.h:

(WebCore::NullGraphicsContext::drawSystemImage): Added.

  • platform/graphics/displaylists/DisplayList.cpp:

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

  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:

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

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

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

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::DrawSystemImage::DrawSystemImage): Added.
(WebCore::DisplayList::DrawSystemImage::systemImage const): Added.
(WebCore::DisplayList::DrawSystemImage::destination const): Added.
(WebCore::DisplayList::DrawSystemImage::globalBounds const): Added.
(WebCore::DisplayList::DrawSystemImage::localBounds const): Added.
(WebCore::DisplayList::DrawSystemImage::encode const): Added.
(WebCore::DisplayList::DrawSystemImage::decode): Added.

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::DrawSystemImage::apply const): Added.
(WebCore::DisplayList::operator<<):

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

(WebCore::DisplayList::Recorder::drawSystemImage): Added.

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

(WebCore::DisplayList::RecorderImpl::recordDrawSystemImage): Added.
Add new DrawSystemImage display list item to handle GPUProcess drawing of SystemImage.

  • Headers.cmake:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • Modules/model-element/scenekit/SceneKitModelLoaderUSD.mm:

Drive-by: Unified sources build fix.

Source/WebKit:

See Source/WebCore/ChangeLog for an explanation of SystemImage.

  • Shared/WebCoreArgumentCoders.h:
  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<Ref<SystemImage>>::encode): Added.
(IPC::ArgumentCoder<Ref<SystemImage>>::decode): Added.
Support sending SystemImage (technically Ref<SystemImage>) across processes.

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

(WebKit::RemoteDisplayListRecorder::drawSystemImage): Added.

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:

(WebKit::RemoteDisplayListRecorderProxy::recordDrawSystemImage): Addded.
Add new DrawSystemImage display list item.

  • Scripts/webkit/messages.py:

(class_template_headers):
Add support for Ref<T> in IPC messages.

6:54 PM Changeset in webkit [290812] by Simon Fraser
  • 4 edits
    3 adds in trunk

Element with position: sticky after sticking, starts to move incorrectly when scrolling
https://bugs.webkit.org/show_bug.cgi?id=231953
<rdar://84662329>

Reviewed by Sam Weinig.

Source/WebCore:

Sometimes we'd fail to push new StickyPositionViewportConstraints to the scrolling
tree, because operator== failed to compare m_constrainingRectAtLastLayout. This breaks
the requirement that the "last committed scroll position" for the overflow scrolling
node has to be updated in the same commit as the "constraining-rect-at-last-layout"
on the sticky node.

Test: scrollingcoordinator/scrolling-tree/sticky-in-overflow-stale-constraints.html

  • page/scrolling/ScrollingConstraints.cpp:

(WebCore::operator<<):

  • page/scrolling/ScrollingConstraints.h:

(WebCore::StickyPositionViewportConstraints::operator== const):

LayoutTests:

  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/sticky-in-overflow-stale-constraints-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/sticky-in-overflow-stale-constraints-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/sticky-in-overflow-stale-constraints.html: Added.
6:40 PM Changeset in webkit [290811] by Dewei Zhu
  • 10 edits in trunk/Tools

'run-benchmark' script should log http requests during benchmark run.
https://bugs.webkit.org/show_bug.cgi?id=237076
<rdar://89270825>

Reviewed by Jonathan Bedard.

Relanding 290583 with fix.
Add support to log http requests during benchmark run for diagnostic purpose.
AutoInstall sets 'AUTOINSTALL_CA_CERT_PATH' to environment variables when certificate is specified,
and uses 'AUTOINSTALL_CA_CERT_PATH' when it's present in environment variables. This ensures scripts invoked
from subprocess can use autoinstalled correcctly.

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

(AutoInstall):
(AutoInstall.set_index):

  • Scripts/webkitpy/init.py: Update 'attr' package version to 20.3.0 so match upgraded twisted version
  • Scripts/webkitpy/autoinstalled/twisted.py: Upgrade twisted version to latest python2 & python3 compatibile

version with specified implicit dependencies.

  • Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Ensure benchmark diagnostic directory is created.

(BenchmarkRunner.init):

  • Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py: Add '--log-path'

arugment to allow specify logging output and it defaults to '/tmp/run-benchmark-http.log'

  • Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py:

(HTTPServerDriver.set_device_id):
(HTTPServerDriver):
(HTTPServerDriver.set_http_log):

  • Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: Pass http log path to

twisted http server if specified.
(SimpleHTTPServerDriver.init):
(SimpleHTTPServerDriver.serve):
(SimpleHTTPServerDriver.set_http_log):

  • Scripts/webkitpy/benchmark_runner/run_benchmark.py: Fix a tiny bug that default_diagnose_dir() is involked twice in

argument parser help message.
(config_argument_parser):

  • Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py: Set http request log path if diagnostic directory

is specified.
(WebServerBenchmarkRunner.init):

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

6:19 PM Changeset in webkit [290810] by Jonathan Bedard
  • 4 edits in trunk/Tools

[git-webkit] Handle new PR with old branch name
https://bugs.webkit.org/show_bug.cgi?id=237457
<rdar://problem/89788939>

Reviewed by Dewei Zhu.

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

(PullRequest.main):

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

5:38 PM Changeset in webkit [290809] by Russell Epstein
  • 1 copy in tags/Safari-614.1.5.6

Tag Safari-614.1.5.6.

5:38 PM Changeset in webkit [290808] by Russell Epstein
  • 1 delete in tags/Safari-614.1.5.6

Remove tag.

5:36 PM Changeset in webkit [290807] by Russell Epstein
  • 26 edits
    12 adds in branches/safari-614.1.5-branch/Source

Cherry-pick r290805. rdar://problem/89053248

Copy WebKit frameworks and XPC processes to Secondary Path
https://bugs.webkit.org/show_bug.cgi?id=237394

Reviewed by Saam Barati.

Source/JavaScriptCore:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • Configurations/Base.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/copy-frameworks-to-secondary-path.sh: Added.

Source/ThirdParty/ANGLE:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • ANGLE.xcodeproj/project.pbxproj:
  • Configurations/ANGLE-dynamic.xcconfig:
  • scripts/copy-frameworks-to-secondary-path.sh: Added.

Source/ThirdParty/libwebrtc:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • Configurations/libwebrtc.xcconfig:
  • Scripts/copy-frameworks-to-secondary-path.sh: Added.
  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • Configurations/WebCore.xcconfig:
  • Scripts/copy-frameworks-to-secondary-path.sh: Added.
  • WebCore.xcodeproj/project.pbxproj:

Source/WebGPU:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • Configurations/WebGPU.xcconfig:
  • Scripts/copy-frameworks-to-secondary-path.sh: Added.
  • WebGPU.xcodeproj/project.pbxproj:

Source/WebInspectorUI:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • Configurations/WebInspectorUIFramework.xcconfig:
  • Scripts/copy-frameworks-to-secondary-path.sh: Added.
  • WebInspectorUI.xcodeproj/project.pbxproj:

Source/WebKit:

Added build configuration variables and scripts to copy the built Framework as well as the XPC services
to the SYSTEM_SECONDARY_CONTENT_PATH when it is set. When copying the XPC services, we update the XPC
binaries to reference the frameworks from the SYSTEM_SECONDARY_CONTENT_PATH by updating
DYLD_VERSIONED_FRAMEWORK_PATH.

  • Configurations/Base.xcconfig:
  • Configurations/WebKitSwift.xcconfig:
  • Scripts/copy-frameworks-to-secondary-path.sh: Added.
  • Scripts/copy-xpc-services-to-secondary-path.sh: Added.
  • Scripts/update-dyld-environment-load-command: Added.
  • Scripts/webkitpy: Added.
  • Scripts/webkitpy/mach_o.py: Added. (_utf8_bytes_to_str): (_mach_o_int_field): (_mach_o_int_field._get_mach_o_int_field): (_mach_o_int_field._set_mach_o_int_field): (_mach_o_int_field._set_mach_o_int_field.func): (_mach_o_chararray_field): (_mach_o_chararray_field._get_mach_o_chararray_field): (_mach_o_chararray_field._set_mach_o_chararray_field): (_mach_o_chararray_field._set_mach_o_chararray_field.func): (_mach_o_varchar_field): (_mach_o_varchar_field._get_mach_o_varchar_field): (_mach_o_varchar_field._set_mach_o_varchar_field): (_mach_o_varchar_field._set_mach_o_varchar_field.func): (MachOCommand): (MachOCommand.init): (MachOSourceVersionCommand): (MachOSourceVersionCommand.version_str): (MachOSection): (MachOSection.init): (MachOSegmentCommand): (MachOSection32): (MachOSegment32Command): (MachOSegment32Command.init): (MachOSection64): (MachOSegment64Command): (MachOSegment64Command.init): (MachOLoadDylibCommand): (MachOLoadDylibCommand._version_str): (MachOLoadDylibCommand.compatibility_version_str): (MachOLoadDylibCommand.current_version_str): (MachODyldEnvironmentCommand): (MachODyldEnvironmentCommand.variable): (MachODyldEnvironmentCommand.value): (MachODyldEnvironmentCommand.build): (MachOIDDylibCommand): (MachOHeader): (MachOHeader.init): (MachOHeader.used_header_size): (MachOHeader.total_header_size): (MachOHeader.available_header_size): (MachOHeader.architecture_name): (MachOHeader.id_command): (MachOHeader.dyld_env_commands): (MachOHeader.dyld_versioned_framework_paths): (MachOHeader.filter_commands): (MachOHeader.update_file): (MachOHeader.parse_command): (MachOHeader32LE): (MachOHeader32LE.init): (MachOHeader64LE): (MachOHeader64LE.init): (MachOFile): (MachOFile.init): (is_macho_bytes): (is_macho_file): (enumerate_macho_files):
  • WebKit.xcodeproj/project.pbxproj:

Source/WebKitLegacy:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • WebKitLegacy.xcodeproj/project.pbxproj:
  • scripts/copy-frameworks-to-secondary-path.sh: Added.

Source/WebKitLegacy/mac:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • Configurations/Base.xcconfig:

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

5:32 PM Changeset in webkit [290806] by sihui_liu@apple.com
  • 9 edits in trunk

Text manipulation does not observe updated title element
https://bugs.webkit.org/show_bug.cgi?id=237435
rdar://87318842

Reviewed by Wenson Hsieh.

Source/WebCore:

TextManipulationController now monitors two types of nodes (after first-time manipulation):
(1) manipulated nodes with content update
(2) non-manipulated nodes (newly displayed or newly added)
We should make sure title element gets added to set (1) if it's newly created, and gets added to set (2) if its
text content is updated.

New test: TextManipulation.CompleteTextManipulationForTitleElement

  • dom/Document.cpp:

(WebCore::Document::setTitle):

  • dom/Text.cpp:

(WebCore::Text::setDataAndUpdate):

  • editing/TextManipulationController.cpp:

(WebCore::TextManipulationController::didUpdateContentForNode):
(WebCore::TextManipulationController::didAddOrCreateRendererForNode):
(WebCore::TextManipulationController::scheduleObservationUpdate):
(WebCore::TextManipulationController::replace):
(WebCore::TextManipulationController::didCreateRendererForElement): Deleted.
(WebCore::TextManipulationController::didUpdateContentForText): Deleted.
(WebCore::TextManipulationController::didCreateRendererForTextNode): Deleted.

  • editing/TextManipulationController.h:
  • html/HTMLTitleElement.cpp:
  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::createRenderer):
(WebCore::RenderTreeUpdater::createTextRenderer):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TestWebKitAPI::TEST):

5:26 PM Changeset in webkit [290805] by msaboff@apple.com
  • 26 edits
    14 adds in trunk/Source

Copy WebKit frameworks and XPC processes to Secondary Path
https://bugs.webkit.org/show_bug.cgi?id=237394

Reviewed by Saam Barati.

Source/JavaScriptCore:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • Configurations/Base.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/copy-frameworks-to-secondary-path.sh: Added.

Source/ThirdParty/ANGLE:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • ANGLE.xcodeproj/project.pbxproj:
  • Configurations/ANGLE-dynamic.xcconfig:
  • scripts/copy-frameworks-to-secondary-path.sh: Added.

Source/ThirdParty/libwebrtc:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • Configurations/libwebrtc.xcconfig:
  • Scripts/copy-frameworks-to-secondary-path.sh: Added.
  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • Configurations/WebCore.xcconfig:
  • Scripts/copy-frameworks-to-secondary-path.sh: Added.
  • WebCore.xcodeproj/project.pbxproj:

Source/WebGPU:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • Configurations/WebGPU.xcconfig:
  • Scripts/copy-frameworks-to-secondary-path.sh: Added.
  • WebGPU.xcodeproj/project.pbxproj:

Source/WebInspectorUI:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • Configurations/WebInspectorUIFramework.xcconfig:
  • Scripts/copy-frameworks-to-secondary-path.sh: Added.
  • WebInspectorUI.xcodeproj/project.pbxproj:

Source/WebKit:

Added build configuration variables and scripts to copy the built Framework as well as the XPC services
to the SYSTEM_SECONDARY_CONTENT_PATH when it is set. When copying the XPC services, we update the XPC
binaries to reference the frameworks from the SYSTEM_SECONDARY_CONTENT_PATH by updating
DYLD_VERSIONED_FRAMEWORK_PATH.

  • Configurations/Base.xcconfig:
  • Configurations/WebKitSwift.xcconfig:
  • Scripts/copy-frameworks-to-secondary-path.sh: Added.
  • Scripts/copy-xpc-services-to-secondary-path.sh: Added.
  • Scripts/update-dyld-environment-load-command: Added.
  • Scripts/webkitpy: Added.
  • Scripts/webkitpy/mach_o.py: Added.

(_utf8_bytes_to_str):
(_mach_o_int_field):
(_mach_o_int_field._get_mach_o_int_field):
(_mach_o_int_field._set_mach_o_int_field):
(_mach_o_int_field._set_mach_o_int_field.func):
(_mach_o_chararray_field):
(_mach_o_chararray_field._get_mach_o_chararray_field):
(_mach_o_chararray_field._set_mach_o_chararray_field):
(_mach_o_chararray_field._set_mach_o_chararray_field.func):
(_mach_o_varchar_field):
(_mach_o_varchar_field._get_mach_o_varchar_field):
(_mach_o_varchar_field._set_mach_o_varchar_field):
(_mach_o_varchar_field._set_mach_o_varchar_field.func):
(MachOCommand):
(MachOCommand.init):
(MachOSourceVersionCommand):
(MachOSourceVersionCommand.version_str):
(MachOSection):
(MachOSection.init):
(MachOSegmentCommand):
(MachOSection32):
(MachOSegment32Command):
(MachOSegment32Command.init):
(MachOSection64):
(MachOSegment64Command):
(MachOSegment64Command.init):
(MachOLoadDylibCommand):
(MachOLoadDylibCommand._version_str):
(MachOLoadDylibCommand.compatibility_version_str):
(MachOLoadDylibCommand.current_version_str):
(MachODyldEnvironmentCommand):
(MachODyldEnvironmentCommand.variable):
(MachODyldEnvironmentCommand.value):
(MachODyldEnvironmentCommand.build):
(MachOIDDylibCommand):
(MachOHeader):
(MachOHeader.init):
(MachOHeader.used_header_size):
(MachOHeader.total_header_size):
(MachOHeader.available_header_size):
(MachOHeader.architecture_name):
(MachOHeader.id_command):
(MachOHeader.dyld_env_commands):
(MachOHeader.dyld_versioned_framework_paths):
(MachOHeader.filter_commands):
(MachOHeader.update_file):
(MachOHeader.parse_command):
(MachOHeader32LE):
(MachOHeader32LE.init):
(MachOHeader64LE):
(MachOHeader64LE.init):
(MachOFile):
(MachOFile.init):
(is_macho_bytes):
(is_macho_file):
(enumerate_macho_files):

  • WebKit.xcodeproj/project.pbxproj:

Source/WebKitLegacy:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • WebKitLegacy.xcodeproj/project.pbxproj:
  • scripts/copy-frameworks-to-secondary-path.sh: Added.

Source/WebKitLegacy/mac:

Added build configuration variables and scripts to copy the built Framework to the SYSTEM_SECONDARY_CONTENT_PATH
when it is set.

  • Configurations/Base.xcconfig:
5:21 PM Changeset in webkit [290804] by Alan Coon
  • 1 copy in tags/Safari-614.1.5.6

Tag Safari-614.1.5.6.

5:08 PM Changeset in webkit [290803] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Allow [SecureContext] extended attribute on namespaces.
https://bugs.webkit.org/show_bug.cgi?id=237401

Patch by Dan Glastonbury <djg@apple.com> on 2022-03-03
Reviewed by Alexey Shvayka.

  • bindings/scripts/IDLAttributes.json:

Enable SecureContext as a valid extended attribute on namespace.

  • bindings/scripts/test/BindingTestGlobalConstructors.idl:
  • bindings/scripts/test/JS/*: Updated
  • bindings/scripts/test/TestNamespaceObject.idl:

Added [SecureContext] to namespace

5:06 PM Changeset in webkit [290802] by commit-queue@webkit.org
  • 6 edits in trunk

[JSC] Update wasm branch hinting
https://bugs.webkit.org/show_bug.cgi?id=237411

Patch by Tom Tartarin <tom@leaningtech.com> on 2022-03-03
Reviewed by Yusuke Suzuki.

JSTests:

Simplify the module tested with the updated format.

  • wasm/branch-hints/branchHintsModule.wasm:
  • wasm/branch-hints/branchHintsSection.js:

Source/JavaScriptCore:

Change the section's name.
Clarify semantics in the parser.

  • wasm/WasmBranchHintsSectionParser.cpp:

(JSC::Wasm::BranchHintsSectionParser::parse):

  • wasm/WasmSectionParser.cpp:

(JSC::Wasm::SectionParser::parseCustom):

5:04 PM Changeset in webkit [290801] by commit-queue@webkit.org
  • 2 edits in trunk

Add Dan Glastonbury's name to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=237453

Patch by Dan Glastonbury <djg@apple.com> on 2022-03-03
Reviewed by Alan Bujtas.

  • metadata/contributors.json:
4:57 PM Changeset in webkit [290800] by commit-queue@webkit.org
  • 2 edits in trunk

Add myself (Anjali Kumar) to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=237449

Patch by Anjali Kumar <anjalik_22@apple.com> on 2022-03-03
Reviewed by Patrick Angle.

  • metadata/contributors.json: Added myself.
4:53 PM Changeset in webkit [290799] by Lauro Moura
  • 7 edits in trunk/Tools

[Python3] Switch a few more glib scripts to Python3
https://bugs.webkit.org/show_bug.cgi?id=237442

Reviewed by Adrian Perez de Castro.

  • Scripts/check-for-global-bss-symbols-in-webkitgtk-libs: Update

shebang.
(bss_symbols): Decode Popen bytes output.

  • gtk/jhbuildrc: Update shebang.
  • gtk/ycm_extra_conf.py: Ditto.
  • jhbuild/jhbuild-wrapper: Ditto.

(jhbuild_at_expected_revision): Decode Popen bytes output.

  • jhbuild/jhbuildrc_common.py: Remove uneeded shebang.
  • wpe/jhbuildrc: Update shebang.
3:46 PM Changeset in webkit [290798] by Robert Jenner
  • 3 edits in trunk/Source/WebKit

Unreviewed, reverting r290752.

r290752 broke mutliple tests, slowing down the iOS15 EWS
queue.

Reverted changeset:

"[iOS] Hard link AVPictureInPictureController"
https://bugs.webkit.org/show_bug.cgi?id=237227
https://commits.webkit.org/r290752

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

WKContentView should explicitly request the system pointer in the fallback case
https://bugs.webkit.org/show_bug.cgi?id=237410
<rdar://79198381>

Reviewed by Anders Carlsson.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView pointerRegionForPositionInformation:point:]):
(-[WKContentView pointerInteraction:styleForRegion:]):
Instead of assuming a nil region and nil style will provide the system
pointer, provide a region the size of the WKContentView and explicitly
request the system pointer shape.

Also, drive-by adopt the API systemPointerStyle instead of the
deprecated SPI version.

2:51 PM Changeset in webkit [290796] by Jonathan Bedard
  • 7 edits in trunk/Tools

[webkitcorepy] Disable prompt when saving credentials
https://bugs.webkit.org/show_bug.cgi?id=237438
<rdar://problem/89764417>

Reviewed by Aakash Jain.

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

(Tracker.credentials): Pass 'save' to webkitcorepy.credentials.

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

(credentials): Unless caller explicitly disables saving, assume that all credentials
should be saved to a system's keyring.

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

(Setup.github): Automatically save any prompted credentials.
(Setup.git): Ditto.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:

(GitHub.credentials): Pass 'save' to github.Tracker.credentials.

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

2:38 PM Changeset in webkit [290795] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

[macOS] WebContent processes crash with XPC_EXIT_REASON_SIGTERM_TIMEOUT when logging out
https://bugs.webkit.org/show_bug.cgi?id=237398
<rdar://88940229>

Reviewed by Darin Adler.

Because we don't use RunningBoard on macOS, we leak an OS transaction to control the lifetime of our XPC
services ourselves. However, one of the side effects of leaking this transaction is that the default SIGTERM
handler doesn't cleanly exit our XPC services when logging out or rebooting. This led to crashes with
XPC_EXIT_REASON_SIGTERM_TIMEOUT as termination reason (rdar://88940229).

To address the issue, we now set our own SIGTERM handler that releases the OS transaction and calls the
default SIGTERM handler to exit cleanly. In the future, we should likely adopt RunningBoard on macOS and
control our lifetime via process assertions instead of leaking this OS transaction.

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:

(WebKit::XPCServiceInitializer):

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:

(WebKit::setOSTransaction):
(WebKit::XPCServiceExit):
(WebKit::osTransaction): Deleted.

2:07 PM Changeset in webkit [290794] by Wenson Hsieh
  • 9 edits in trunk/Source/WebKit

[iOS] Further reduce hangs underneath -[WKContentView requestAutocorrectionContextWithCompletionHandler:]
https://bugs.webkit.org/show_bug.cgi?id=237387
rdar://89654600

Reviewed by Tim Horton.

Tweak the mitigations landed in r288925 to be even more aggressive. Currently, we preemptively send an
autocorrection context from the web process to the UI process after receiving an IPC message from the UI process
indicating that an input view has been shown. However, this message might arrive too late in cases where the web
process hangs immediately after we're done setting element focus, within the very same runloop; in such a
scenario, we'll still end up hanging underneath the sync autocorrection request underneath -_elementDidFocus:
in the UI process.

We can instead make this mitigation even more aggressive, by setting a flag on WebPage when we're about to
propagate an ElementDidFocus message to the UI process that (in lieu of the WebKit client) would normally
cause the keyboard to appear. During the next DOM selection change, we then consult this flag and preemptively
send an autocorrection context to the UI process.

Additionally, remove another safeguard in the original change in r288925 which effectively invalidated the
cached autocorrection context after the end of the runloop by setting _autocorrectionContextNeedsUpdate. This
was only done to narrow the scope of the fix to just the scenario where UIKit requests autocorrection contexts
multiple times in the same runloop iteration. However, this appears to be insufficient to tackle more scenarios
where UIKit frequently requests autocorrection contexts even though the selection has not changed; hopefully, by
leaving _autocorrectionContextNeedsUpdate := NO, we can mitigate some of these other cases.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::notifySelectionChanged):

  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::respondToChangedSelection):

  • WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:

(WebKit::WebChromeClient::notifyRevealedSelectionByScrollingFrame):
(WebKit::WebChromeClient::didLayout):

  • WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:

(WebKit::WebEditorClient::overflowScrollPositionChanged):
(WebKit::WebEditorClient::subFrameScrollPositionChanged):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didScrollSelection):
(WebKit::WebPage::didChangeSelection):

Split didChangeSelection into two methods: didScrollSelection, which is invoked from codepaths where we're
scheduling an editor state after overflow or mainframe scrolling, and didChangeSelection, which now takes a
Frame indicating the frame that contains the changed selection. On iOS, we handle this by both scheduling an
editor state update, but also preemptively sending the autocorrection context to the UI process if we've just
focused an element that will probably cause the keyboard to appear (unless the client explicitly prevents it).

Note that we must check the frame containing the changed selection and bail if the render tree is in the
middle of being destroyed, so that we don't end up triggering layout (and release asserting) in the case where
we're clearing the selection during document teardown.

(WebKit::WebPage::resetFocusedElementForFrame):
(WebKit::WebPage::elementDidFocus):
(WebKit::WebPage::elementDidBlur):
(WebKit::WebPage::didCommitLoad):
(WebKit::WebPage::didChangeOverflowScrollPosition): Deleted.

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::setIsShowingInputViewForFocusedElement):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::updateSelectionAppearance):

Pass in frame to didChangeSelection.

(WebKit::WebPage::setIsShowingInputViewForFocusedElement): Deleted.

Move this back into the header, now that it's a straightforward setter again.

1:51 PM Changeset in webkit [290793] by Jonathan Bedard
  • 7 edits in trunk/Tools

[git-webkit] Open pre-populated GitHub page for new tokens
https://bugs.webkit.org/show_bug.cgi?id=237436
<rdar://problem/89763053>

Reviewed by Ryan Haddad.

GitHub gives us a way to pre-populate its token generation web page. We should
open this page with appropriate arguments during setup.

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

(Tracker.credentials): Make 'prompt' into a function, allowing us to open a url
and change the prompt based on the success of opening the url.

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

(credentials): Allow 'prompt' to be callable.

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

1:19 PM Changeset in webkit [290792] by Lauro Moura
  • 3 edits in trunk/Tools

[build.webkit.org] Add GTK queue using clang
https://bugs.webkit.org/show_bug.cgi?id=229637

Reviewed by Michael Catanzaro.

This commit adds a specific queue to build with clang in place of GCC.
It will help cover both toolchains and catch bugs and warnings
that happen to be raised by/to affect only clang.

Initially, it'll be a build-only queue, moving to a complete build and
tester in the future. It'll use clang-12, the version available in the
current SDK used by GTK and WPE.

  • CISupport/build-webkit-org/config.json:
  • CISupport/build-webkit-org/factories_unittest.py:

(TestExpectedBuildSteps):

1:02 PM Changeset in webkit [290791] by mmaxfield@apple.com
  • 40 edits in trunk/Source/WebGPU

[WebGPU] Abide by the WebKit Style Guide
https://bugs.webkit.org/show_bug.cgi?id=237437

Reviewed by Darin Adler.

The style guide says "Do not place a space between the type name and the protocol name."

  • WebGPU/Adapter.h:

(WebGPU::Adapter::create):

  • WebGPU/Adapter.mm:

(WebGPU::Adapter::Adapter):
(WebGPU::deviceMeetsRequiredLimits):

  • WebGPU/BindGroup.h:

(WebGPU::BindGroup::create):
(WebGPU::BindGroup::vertexArgumentBuffer const):
(WebGPU::BindGroup::fragmentArgumentBuffer const):
(WebGPU::BindGroup::computeArgumentBuffer const):

  • WebGPU/BindGroup.mm:

(WebGPU::Device::createBindGroup):
(WebGPU::BindGroup::BindGroup):

  • WebGPU/BindGroupLayout.h:

(WebGPU::BindGroupLayout::create):
(WebGPU::BindGroupLayout::vertexArgumentEncoder const):
(WebGPU::BindGroupLayout::fragmentArgumentEncoder const):
(WebGPU::BindGroupLayout::computeArgumentEncoder const):

  • WebGPU/BindGroupLayout.mm:

(WebGPU::Device::createBindGroupLayout):
(WebGPU::BindGroupLayout::BindGroupLayout):

  • WebGPU/Buffer.h:

(WebGPU::Buffer::create):
(WebGPU::Buffer::buffer const):

  • WebGPU/Buffer.mm:

(WebGPU::Buffer::Buffer):

  • WebGPU/CommandBuffer.h:

(WebGPU::CommandBuffer::create):
(WebGPU::CommandBuffer::commandBuffer const):

  • WebGPU/CommandBuffer.mm:

(WebGPU::CommandBuffer::CommandBuffer):

  • WebGPU/CommandEncoder.h:

(WebGPU::CommandEncoder::create):

  • WebGPU/CommandEncoder.mm:

(WebGPU::CommandEncoder::CommandEncoder):

  • WebGPU/ComputePassEncoder.h:

(WebGPU::ComputePassEncoder::create):

  • WebGPU/ComputePassEncoder.mm:

(WebGPU::ComputePassEncoder::ComputePassEncoder):

  • WebGPU/ComputePipeline.h:

(WebGPU::ComputePipeline::create):
(WebGPU::ComputePipeline::computePipelineState const):

  • WebGPU/ComputePipeline.mm:

(WebGPU::createLibrary):
(WebGPU::createFunction):
(WebGPU::createComputePipelineState):
(WebGPU::ComputePipeline::ComputePipeline):

  • WebGPU/Device.h:
  • WebGPU/Device.mm:

(WebGPU::Device::create):
(WebGPU::Device::Device):

  • WebGPU/Instance.mm:

(WebGPU::sortedDevices):
(WebGPU::Instance::requestAdapter):

  • WebGPU/QuerySet.h:

(WebGPU::QuerySet::create):
(WebGPU::QuerySet::counterSampleBuffer const):

  • WebGPU/QuerySet.mm:

(WebGPU::QuerySet::QuerySet):

  • WebGPU/Queue.h:

(WebGPU::Queue::create):

  • WebGPU/Queue.mm:

(WebGPU::Queue::Queue):

  • WebGPU/RenderBundle.h:

(WebGPU::RenderBundle::create):
(WebGPU::RenderBundle::indirectCommandBuffer const):

  • WebGPU/RenderBundle.mm:

(WebGPU::RenderBundle::RenderBundle):

  • WebGPU/RenderBundleEncoder.h:

(WebGPU::RenderBundleEncoder::create):

  • WebGPU/RenderBundleEncoder.mm:

(WebGPU::RenderBundleEncoder::RenderBundleEncoder):

  • WebGPU/RenderPassEncoder.h:

(WebGPU::RenderPassEncoder::create):

  • WebGPU/RenderPassEncoder.mm:

(WebGPU::RenderPassEncoder::RenderPassEncoder):

  • WebGPU/RenderPipeline.h:

(WebGPU::RenderPipeline::create):
(WebGPU::RenderPipeline::renderPipelineState const):

  • WebGPU/RenderPipeline.mm:

(WebGPU::RenderPipeline::RenderPipeline):

  • WebGPU/Sampler.h:

(WebGPU::Sampler::create):
(WebGPU::Sampler::samplerState const):

  • WebGPU/Sampler.mm:

(WebGPU::Sampler::Sampler):

  • WebGPU/ShaderModule.h:

(WebGPU::ShaderModule::create):
(WebGPU::ShaderModule::library const):

  • WebGPU/ShaderModule.mm:

(WebGPU::ShaderModule::createLibrary):
(WebGPU::earlyCompileShaderModule):
(WebGPU::ShaderModule::ShaderModule):

  • WebGPU/Texture.h:

(WebGPU::Texture::create):
(WebGPU::Texture::texture const):

  • WebGPU/Texture.mm:

(WebGPU::Texture::Texture):

  • WebGPU/TextureView.h:

(WebGPU::TextureView::create):
(WebGPU::TextureView::texture const):

  • WebGPU/TextureView.mm:

(WebGPU::TextureView::TextureView):

12:22 PM Changeset in webkit [290790] by Russell Epstein
  • 9 edits in branches/safari-613-branch/Source

Versioning.

WebKit-7613.2.1

12:21 PM Changeset in webkit [290789] by Russell Epstein
  • 3 edits in branches/safari-613-branch/Source/JavaScriptCore

Cherry-pick r288363. rdar://problem/88995092

Fix build when using Visual Studio 2022
https://bugs.webkit.org/show_bug.cgi?id=235440

Reviewed by Antti Koivisto.

It doesn't like having a switch with a default but no cases.
This is cleaner with if statements anyways.
Also make members const because I can.

  • jit/JITCode.cpp: (JSC::JITCode::calleeSaveRegisters const):
  • jit/JITCode.h:

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

11:51 AM Changeset in webkit [290788] by sbarati@apple.com
  • 13 edits in trunk/Source/JavaScriptCore

Add a DeferTraps scope
https://bugs.webkit.org/show_bug.cgi?id=237306
<rdar://83494949>

Reviewed by Mark Lam.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::jettison):
(JSC::CodeBlock::noticeIncomingCall):

  • bytecode/CodeBlock.h:
  • bytecode/RepatchInlines.h:

(JSC::linkFor):
(JSC::virtualForWithFunction):

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::executeProgram):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeModuleProgram):

  • interpreter/InterpreterInlines.h:

(JSC::Interpreter::execute):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setUpCall):

  • runtime/ExceptionScope.h:
  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::installCode):

  • runtime/VMTraps.cpp:

(JSC::VMTraps::handleTraps):
(JSC::VMTraps::takeTopPriorityTrap):

  • runtime/VMTraps.h:

(JSC::VMTraps::needHandling const):
(JSC::VMTraps::maybeNeedHandling const):
(JSC::VMTraps::hasTrapBit):
(JSC::VMTraps::setTrapBit):

  • runtime/VMTrapsInlines.h:

(JSC::DeferTraps::DeferTraps):
(JSC::DeferTraps::~DeferTraps):

11:04 AM Changeset in webkit [290787] by Russell Epstein
  • 8 edits
    2 adds in branches/safari-614.1.5-branch

Cherry-pick r290512. rdar://problem/89765722

[Tables] Incorrect table sizing when colgroup comes after tbody
https://bugs.webkit.org/show_bug.cgi?id=237205
<rdar://86582214>

Reviewed by Antti Koivisto.

Source/WebCore:

Let's use the colgroup for table sizing even when it comes after any thead, tbody, tfoot, and tr elements.
This makes WebKit match other rendering engines (see https://src.chromium.org/viewvc/blink?revision=159442&view=revision)

Test: fast/table/table-sizing-fails-when-colgroup-comes-after-content.html

  • rendering/RenderTable.cpp: (WebCore::RenderTable::firstColumn const):
  • rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::nextColumn const):

LayoutTests:

  • fast/table/table-sizing-fails-when-colgroup-comes-after-content-expected.html: Added.
  • fast/table/table-sizing-fails-when-colgroup-comes-after-content.html: Added.
  • platform/mac/tables/mozilla_expected_failures/dom/appendCol1-expected.txt: Progression.
  • platform/mac/tables/mozilla_expected_failures/dom/appendColGroup1-expected.txt: Progression.

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

11:00 AM Changeset in webkit [290786] by Russell Epstein
  • 9 edits in branches/safari-614.1.5-branch/Source

Versioning.

WebKit-7614.1.5.6

10:25 AM Changeset in webkit [290785] by Simon Fraser
  • 11 edits
    2 adds in trunk

nasa.gov page with fixed backgrounds paints incorrectly on scroll
https://bugs.webkit.org/show_bug.cgi?id=237405
<rdar://66568551>

Reviewed by Antti Koivisto.
Source/WebCore:

https://www.nasa.gov/specials/artemis/ shows an issue where elements with background-attachment:fixed
don't repaint on scroll. This page has scrollable <html> and <body>, and the elements with fixed
backgrounds are composited, so this reveals that we fail to repaint composited children
of an overflow scroll in this case.

Fix by having RenderLayerScrollableArea::scrollTo() do repaints on slow repaint objects
which are scrolled by the current scroller.

Do some unrelated cleanup in code that I was going to use in this patch but turned out
not to need: rename hasFixedBackgroundImage() to hasAnyFixedBackground() for clarity,
and share the implementation with hasAnyLocalBackground().

Test: fast/repaint/background-attachment-fixed-in-composited-scroll.html

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::styleWillChange):
(WebCore::RenderElement::willBeDestroyed):

  • rendering/RenderLayer.cpp:
  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::scrollTo):

  • rendering/style/FillLayer.cpp:

(WebCore::FillLayer::hasImageWithAttachment const):
(WebCore::FillLayer::hasFixedImage const): Deleted.

  • rendering/style/FillLayer.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::hasAnyLocalBackground const): Deleted.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::hasBackgroundImage const):
(WebCore::RenderStyle::hasAnyFixedBackground const):
(WebCore::RenderStyle::hasAnyLocalBackground const):
(WebCore::RenderStyle::hasFixedBackgroundImage const): Deleted.

LayoutTests:

Repaint test which is only valid for mac-wk2 (iOS does not support background-attachment:fixed).

  • TestExpectations:
  • fast/repaint/background-attachment-fixed-in-composited-scroll-expected.txt: Added.
  • fast/repaint/background-attachment-fixed-in-composited-scroll.html: Added.
  • platform/mac-wk2/TestExpectations:
10:20 AM Changeset in webkit [290784] by mmaxfield@apple.com
  • 4 edits in trunk

[Style] Forbid spaces between type names and protocol names in Objective-C
https://bugs.webkit.org/show_bug.cgi?id=237406

Reviewed by Darin Adler.

According to https://lists.webkit.org/pipermail/webkit-dev/2022-February/032130.html.

Tools:

Because the style checker uses regexes, we don't know what's a type name and what's
a protocol name, so the checker simplifies the problem and just checks for "id <".

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_objc_protocol):
(check_style):

Websites/webkit.org:

  • code-style.md:
10:01 AM Changeset in webkit [290783] by jonlee@apple.com
  • 3 edits in trunk/LayoutTests

Unreviewed test gardening.

  • gpu-process/TestExpectations:
  • platform/ios/TestExpectations:
9:56 AM Changeset in webkit [290782] by Alan Bujtas
  • 3 edits
    2 adds in trunk

A text node longer than 65,535 characters following another text node is invisible in a scrolling context
https://bugs.webkit.org/show_bug.cgi?id=237330
<rdar://problem/89645522>

Reviewed by Antti Koivisto.

Source/WebCore:

  1. We split text content at 65536 characters (see Text::createWithLengthLimit)
  2. InlineTextBox can only hold up to 65534 (max short unsigned) characters (unsigned short m_len { 0 };)

Arithmetic overflow produces 0 length inline text boxes and they get removed at
LegacyLineLayout::computeBlockDirectionPositionsForLine as redundant boxes.

Test: fast/text/text-overflow-over-64k.html

  • rendering/LegacyInlineTextBox.h: Let's just use unsigned. At this point we don't have that many

legacy inline text boxes anyway.

LayoutTests:

  • fast/text/text-overflow-over-64k-expected.html: Added.
  • fast/text/text-overflow-over-64k.html: Added.
9:30 AM Changeset in webkit [290781] by Ross Kirsling
  • 2 edits in trunk/Source/WebKit

REGRESSION(r290776): NetworkSession::swServer depends on ENABLE(SERVICE_WORKER)
https://bugs.webkit.org/show_bug.cgi?id=237432

Unreviewed build fix.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::terminateRemoteWorkerContextConnectionWhenPossible):

9:25 AM Changeset in webkit [290780] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Update IDLParser to support trailing commas in enums.
https://bugs.webkit.org/show_bug.cgi?id=232607
<rdar://problem/85189036>

Patch by Dan Glastonbury <djg@apple.com> on 2022-03-03
Reviewed by Sam Weinig.

Now compatible with the grammar specified by [1].

[1] https://webidl.spec.whatwg.org/#prod-EnumValueListComma

  • bindings/scripts/IDLParser.pm:

(parseEnumValues):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::convertEnumerationToString):
(WebCore::convertEnumerationToJS):
(WebCore::parseEnumeration<TestObj::EnumTrailingComma>):
(WebCore::expectedEnumerationValues<TestObj::EnumTrailingComma>):

  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/TestObj.idl:
9:24 AM Changeset in webkit [290779] by Antti Koivisto
  • 11 edits in trunk/Source/WebCore

Simplify pseudo element resolution
https://bugs.webkit.org/show_bug.cgi?id=237413

Reviewed by Antoine Quint.

Remove ElementUpdates struct with a map that contains pseudo element updates.
Instead use a single ElementUpdate struct and pass the pseudo element styles
as cached pseudo styles of the element RenderStyle. Previously RenderTreeUpdater
would move them there.

  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::Parent::Parent):
(WebCore::RenderTreeUpdater::updateRenderTree):
(WebCore::RenderTreeUpdater::pushParent):
(WebCore::RenderTreeUpdater::popParent):
(WebCore::RenderTreeUpdater::updateBeforeDescendants):
(WebCore::RenderTreeUpdater::updateAfterDescendants):
(WebCore::RenderTreeUpdater::updateElementRenderer):

  • rendering/updating/RenderTreeUpdater.h:
  • rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:

(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):
(WebCore::RenderTreeUpdater::GeneratedContent::needsPseudoElement):

  • rendering/updating/RenderTreeUpdaterGeneratedContent.h:
  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::computeDescendantsToResolve):
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::shouldResolveElement):
(WebCore::Style::TreeResolver::resetDescendantStyleRelations):
(WebCore::Style::TreeResolver::resolveComposedTree):
(WebCore::Style::computeDescendantsToResolve): Deleted.
(WebCore::Style::shouldResolveElement): Deleted.
(WebCore::Style::resetDescendantStyleRelations): Deleted.

  • style/StyleTreeResolver.h:
  • style/StyleUpdate.cpp:

(WebCore::Style::Update::elementUpdate const):
(WebCore::Style::Update::elementUpdate):
(WebCore::Style::Update::elementStyle const):
(WebCore::Style::Update::elementStyle):
(WebCore::Style::Update::addElement):
(WebCore::Style::Update::elementUpdates const): Deleted.
(WebCore::Style::Update::elementUpdates): Deleted.

  • style/StyleUpdate.h:
8:57 AM Changeset in webkit [290778] by youenn@apple.com
  • 6 edits
    2 adds in trunk

macOS Safari 15.2 Audio Echo Issue after camera pause/unpause
https://bugs.webkit.org/show_bug.cgi?id=235544
<rdar://problem/88297045>

Reviewed by Eric Carlson.

Source/WebCore:

After https://commits.webkit.org/r275600, the muted state of MediaPlayer would be set to the page muted state
without taking into consideration HTMLMediaElement.muted.
Update the call site to use effectiveMuted instead.
Add internals API to write a corresponding layout test.

Test: fast/mediastream/mediastreamtrack-audiovideo-mutepage.html

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

LayoutTests:

  • fast/mediastream/mediastreamtrack-audiovideo-mutepage-expected.txt: Added.
  • fast/mediastream/mediastreamtrack-audiovideo-mutepage.html: Added.
8:53 AM Changeset in webkit [290777] by Jonathan Bedard
  • 3 edits in trunk/Tools

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

Unreviewed follow-up fix.

  • Scripts/webkitpy/tool/commands/download.py:

(AbstractRevertPrepCommand._prepare_state): Reason may be spread accross multiple arguments.

  • Scripts/webkitpy/tool/commands/download_unittest.py:
8:09 AM Changeset in webkit [290776] by Chris Dumez
  • 22 edits in trunk

REGRESSION(r290356-r290351?): [ iOS EWS ] 3 imported/w3c/web-platform-tests/service-workers/service-worker/* tests are constant text failures.
https://bugs.webkit.org/show_bug.cgi?id=237160
<rdar://problem/89440067>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline test that is now passing.

  • web-platform-tests/service-workers/service-worker/fetch-request-no-freshness-headers.https-expected.txt:

Source/WebCore:

In r290352, I made a change so that the service worker is more likely to launch in the WebContent
process that caused it to launch. This is beneficial for performance and memory usage.

The partitioned-service-worker*.html service worker tests are relying on an ID variable that is
randomly generated inside the service worker and they expect this ID to not change during the
duration of the test. This means that if the service worker exits / relaunches, those tests start
failing because the ID changes.

The issue is that we have logic in WebProcessProxy::didStartProvisionalLoadForMainFrame() that
terminates the service workers running inside the WebProcess if a new eTLD+1 page is loaded inside
the process. We do so to try and achieve better process isolation between different sites. The
issue is that those tests launch a service worker and then open a new cross-site popup. When the
cross-site popup loads inside the same process, we'd make the decision to terminate the service
workers in this process and relaunch them in a new clean one, causing the tests to fail.

While it is true per the specification that service workers can be terminated / relaunched at
almost any point, there are exceptions. In particular, we should keep a service worker running
if it still has pending extendable events. For this reason, the tests rely on FetchEvent.waitUntil()
to keep the service worker running. Sadly, we would not obey that in this case.

To address the issue, we no longer unconditionally close the service worker context connection
when a WebProcess loads a new eTLD+1. Instead, we tell the network process to close that connection
as soon as possible. When the network process receives this IPC, it terminates the context
connection ONLY if the service workers using the connection have no pending events. If we cannot
close the context connection right away, we set a flag on the context connection to indicate that
we should close it as soon as possible. Currently, this flag is only used to close the connection
right away (no 10 second delay) once the connection no longer has any clients. I think that, ideally,
we'd close the connection as soon as the service workers no longer have pending events. However,
this adds complexity and is error-prone so I didn't implement it in this patch and merely added a
FIXME comment. As it stands, my patch STILL relaunches service workers in origin-clean processes
in the common case. It only fails to do so in the case where there are pending service worker
events which is a case where we had the correctness bug anyway.

No new tests, unskipped existing tests.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::forEachServiceWorker const):
(WebCore::SWServer::terminateContextConnectionWhenPossible):
(WebCore::SWServer::unregisterServiceWorkerClient):

  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerToContextConnection.cpp:

(WebCore::SWServerToContextConnection::SWServerToContextConnection):
(WebCore::SWServerToContextConnection::server const):
(WebCore::SWServerToContextConnection::terminateWhenPossible):

  • workers/service/server/SWServerToContextConnection.h:

(WebCore::SWServerToContextConnection::shouldTerminateWhenPossible const):

Source/WebKit:

In r290352, I made a change so that the service worker is more likely to launch in the WebContent
process that caused it to launch. This is beneficial for performance and memory usage.

The partitioned-service-worker*.html service worker tests are relying on an ID variable that is
randomly generated inside the service worker and they expect this ID to not change during the
duration of the test. This means that if the service worker exits / relaunches, those tests start
failing because the ID changes.

The issue is that we have logic in WebProcessProxy::didStartProvisionalLoadForMainFrame() that
terminates the service workers running inside the WebProcess if a new eTLD+1 page is loaded inside
the process. We do so to try and achieve better process isolation between different sites. The
issue is that those tests launch a service worker and then open a new cross-site popup. When the
cross-site popup loads inside the same process, we'd make the decision to terminate the service
workers in this process and relaunch them in a new clean one, causing the tests to fail.

While it is true per the specification that service workers can be terminated / relaunched at
almost any point, there are exceptions. In particular, we should keep a service worker running
if it still has pending extendable events. For this reason, the tests rely on FetchEvent.waitUntil()
to keep the service worker running. Sadly, we would not obey that in this case.

To address the issue, we no longer unconditionally close the service worker context connection
when a WebProcess loads a new eTLD+1. Instead, we tell the network process to close that connection
as soon as possible. When the network process receives this IPC, it terminates the context
connection ONLY if the service workers using the connection have no pending events. If we cannot
close the context connection right away, we set a flag on the context connection to indicate that
we should close it as soon as possible. Currently, this flag is only used to close the connection
right away (no 10 second delay) once the connection no longer has any clients. I think that, ideally,
we'd close the connection as soon as the service workers no longer have pending events. However,
this adds complexity and is error-prone so I didn't implement it in this patch and merely added a
FIXME comment. As it stands, my patch STILL relaunches service workers in origin-clean processes
in the common case. It only fails to do so in the case where there are pending service worker
events which is a case where we had the correctness bug anyway.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::terminateRemoteWorkerContextConnectionWhenPossible):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:

(WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection):
(WebKit::WebSWServerToContextConnection::~WebSWServerToContextConnection):
(WebKit::WebSWServerToContextConnection::postMessageToServiceWorkerClient):
(WebKit::WebSWServerToContextConnection::close):

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
  • NetworkProcess/SharedWorker/WebSharedWorkerServer.cpp:

(WebKit::WebSharedWorkerServer::terminateContextConnectionWhenPossible):

  • NetworkProcess/SharedWorker/WebSharedWorkerServer.h:
  • NetworkProcess/SharedWorker/WebSharedWorkerServerToContextConnection.cpp:

(WebKit::WebSharedWorkerServerToContextConnection::removeSharedWorkerObject):

  • NetworkProcess/SharedWorker/WebSharedWorkerServerToContextConnection.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::terminateRemoteWorkerContextConnectionWhenPossible):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didStartProvisionalLoadForMainFrame):

LayoutTests:

Unskip tests that are no longer failing.

  • platform/ios/TestExpectations:
7:22 AM Changeset in webkit [290775] by Adrian Perez de Castro
  • 7 edits in trunk/Source

Non-unified build fixes, early March 2022 edition
https://bugs.webkit.org/show_bug.cgi?id=237420

Unreviewed non-unified build fixes.

Source/JavaScriptCore:

  • llint/LLIntExceptions.h: Add forward declaration for WasmInstruction.

Source/WebCore:

  • inspector/agents/InspectorDOMDebuggerAgent.h: Add forward declaration for ScriptExecutionContext.

Source/WebKit:

  • UIProcess/API/APIDataTask.cpp: Add missing inclusion of DataReference.h, remove

"#pragma once" from non-header file.

  • UIProcess/API/APIDataTaskClient.h: Add missing inclusion of DataReference.h.
5:09 AM Changeset in webkit [290774] by Martin Robinson
  • 9 edits
    21 adds in trunk/LayoutTests

Update WPT css-scroll-snap tests
https://bugs.webkit.org/show_bug.cgi?id=237358

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • resources/resource-files.json:
  • web-platform-tests/css/css-scroll-snap/capturing-snap-positions-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/capturing-snap-positions.html: Added.
  • web-platform-tests/css/css-scroll-snap/input/keyboard.html:
  • web-platform-tests/css/css-scroll-snap/input/mouse-wheel-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/input/mouse-wheel.html: Added.
  • web-platform-tests/css/css-scroll-snap/input/snap-area-overflow-boundary-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/input/snap-area-overflow-boundary.html: Added.
  • web-platform-tests/css/css-scroll-snap/input/w3c-import.log:
  • web-platform-tests/css/css-scroll-snap/no-red-ref.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-root-001-ref.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-snap-root-002-ref.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-001-ref.html: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-margin-005-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-margin-005.html: Added.
  • web-platform-tests/css/css-scroll-snap/selection-target-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/selection-target.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/scroll-snap-initial-layout-000-ref.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/scroll-snap-writing-mode-000-ref.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/snap-after-initial-layout-ref.html: Added.
  • web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/w3c-import.log:
  • web-platform-tests/css/css-scroll-snap/support/common.js:

(waitForAnimationEnd.):
(waitForAnimationEnd):
(waitForWheelEvent):
(waitForScrollEnd):
(waitForScrollTo):

  • web-platform-tests/css/css-scroll-snap/w3c-import.log:

LayoutTests:

  • platform/glib/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-target-margin-005-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-target-margin-005-expected.txt: Added.
3:06 AM Changeset in webkit [290773] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

REGRESSION (r290512): imported/blink/fast/table/crash-output-element-as-column-group.html asserts sometimes
https://bugs.webkit.org/show_bug.cgi?id=237393

Reviewed by Simon Fraser.

Merging https://chromium.googlesource.com/chromium/src/+/1cfc9b9c37f43567529b09a9824d6d3a7bd9abb6%5E%21/#F2
The reason why crash-output-element-as-column-group.html crashes after r290512 is because
now we allow colgroup after the table content (thead, tbody) -prior to r290512, this test was pretty much a no-op.

  • rendering/RenderTableCol.cpp:

(WebCore::RenderTableCol::updateFromElement):

2:08 AM Changeset in webkit [290772] by commit-queue@webkit.org
  • 39 edits
    6 copies
    2 adds in trunk

Unreviewed, reverting r290756.
https://bugs.webkit.org/show_bug.cgi?id=237412

Speedometer2

Reverted changeset:

"[css] Implement 'text-decoration' as a shorthand."
https://bugs.webkit.org/show_bug.cgi?id=237175
https://commits.webkit.org/r290756

1:51 AM Changeset in webkit [290771] by commit-queue@webkit.org
  • 7 edits in trunk/Tools

[Python3] Switch a couple glib/flatpak scripts to Python3
https://bugs.webkit.org/show_bug.cgi?id=237377

Patch by Philippe Normand <pnormand@igalia.com> on 2022-03-03
Reviewed by Carlos Garcia Campos.

  • Scripts/update-webkit-flatpak: Update shebang to Python3.
  • Scripts/webkit-flatpak: Ditto.
  • glib/api_test_runner.py: Ditto.
  • glib/common.py: Remove useless shebang.
  • glib/generate-inspector-gresource-manifest.py: Update shebang to Python3.
  • glib/svn-revision: Ditto.

Mar 2, 2022:

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

Treat empty intersection correctly in RenderLayer::getRectToExpose
https://bugs.webkit.org/show_bug.cgi?id=237189

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

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/content-visibility/content-visibility-050-expected.txt:

Source/WebCore:

The case where the target rect to reveal had zero height and was outside of the visible rect, the
classification was wrongly that the target was visible, fix this to classify as hidden instead.

Test: imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-050.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::getRectToExpose const):

11:08 PM Changeset in webkit [290769] by commit-queue@webkit.org
  • 12 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r290717.
https://bugs.webkit.org/show_bug.cgi?id=237409

Speedometer2

Reverted changeset:

"Add a DeferTraps scope"
https://bugs.webkit.org/show_bug.cgi?id=237306
https://commits.webkit.org/r290717

10:49 PM Changeset in webkit [290768] by Justin Michaud
  • 93 edits in trunk/Source/JavaScriptCore

Refactor OpcodeTraits to support the possibility of having 2-byte WASM opcode ids in bytecode streams
https://bugs.webkit.org/show_bug.cgi?id=237347

The number of WASM opcodes will increase beyond 255 when WASM SIMD is implemented, and so this patch
changes OpcodeTraits to allow for the possibility of having two-byte WASM opcodes without regressing
JS. We have to thread these OpcodeTraits everywhere that they are used so that code can read the
correct value when decoding an instruction stream. This patch does not change the size of WASM opcodes
yet, although I have tested that the test suite still passes if we do increase the opcode size.

Reviewed by Keith Miller.

  • bytecode/BytecodeBasicBlock.cpp:

(JSC::BytecodeBasicBlock<OpcodeTraits>::BytecodeBasicBlock):
(JSC::BytecodeBasicBlock<OpcodeTraits>::addLength):
(JSC::BytecodeBasicBlock<OpcodeTraits>::shrinkToFit):
(JSC::isJumpTarget):
(JSC::BytecodeBasicBlock<OpcodeTraits>::computeImpl):
(JSC::BytecodeBasicBlock<JSOpcodeTraits>::compute):
(JSC::BytecodeBasicBlock::BytecodeBasicBlock): Deleted.
(JSC::BytecodeBasicBlock::addLength): Deleted.
(JSC::BytecodeBasicBlock::shrinkToFit): Deleted.
(JSC::BytecodeBasicBlock::computeImpl): Deleted.
(JSC::BytecodeBasicBlock::compute): Deleted.

  • bytecode/BytecodeBasicBlock.h:

(JSC::BytecodeBasicBlock::addSuccessor):

  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumperBase<InstructionStreamType>::printLocationAndOp):
(JSC::BytecodeDumperBase<InstructionStreamType>::dumpValue):
(JSC::BytecodeDumper<Block>::outOfLineJumpOffset const):
(JSC::BytecodeDumper<Block>::dumpBytecode):
(JSC::dumpHeader):
(JSC::CodeBlockBytecodeDumper<Block>::dumpBlock):
(JSC::CodeBlockBytecodeDumper<Block>::dumpGraph):
(JSC::Wasm::BytecodeDumper::dumpBlock):
(JSC::Wasm::BytecodeDumper::registerName const):
(JSC::Wasm::BytecodeDumper::outOfLineJumpOffset const):
(JSC::BytecodeDumperBase::printLocationAndOp): Deleted.
(JSC::BytecodeDumperBase::dumpValue): Deleted.

  • bytecode/BytecodeDumper.h:
  • bytecode/BytecodeGeneratorification.cpp:

(JSC::BytecodeGeneratorification::BytecodeGeneratorification):
(JSC::BytecodeGeneratorification::enterPoint const):
(JSC::BytecodeGeneratorification::instructions const):
(JSC::GeneratorLivenessAnalysis::run):
(JSC::performGeneratorification):

  • bytecode/BytecodeGeneratorification.h:
  • bytecode/BytecodeGraph.h:

(JSC::BytecodeGraph::blockContainsBytecodeOffset):
(JSC::BytecodeGraph::findBasicBlockForBytecodeOffset):
(JSC::BytecodeGraph::findBasicBlockWithLeaderOffset):
(JSC::BytecodeGraph::at const):
(JSC::BytecodeGraph::operator[] const):
(JSC::BytecodeGraph::first):
(JSC::BytecodeGraph::last):
(JSC::BytecodeGraph::dump):
(JSC::BytecodeGraph::BytecodeGraph):

  • bytecode/BytecodeLivenessAnalysis.cpp:

(JSC::BytecodeLivenessAnalysis::computeFullLiveness):
(JSC::BytecodeLivenessAnalysis::dumpResults):

  • bytecode/BytecodeLivenessAnalysis.h:
  • bytecode/BytecodeLivenessAnalysisInlines.h:

(JSC::BytecodeLivenessPropagation::stepOverBytecodeIndexDef):
(JSC::BytecodeLivenessPropagation::stepOverBytecodeIndexUse):
(JSC::BytecodeLivenessPropagation::stepOverBytecodeIndexUseInExceptionHandler):
(JSC::BytecodeLivenessPropagation::stepOverBytecodeIndex):
(JSC::BytecodeLivenessPropagation::stepOverInstruction):
(JSC::BytecodeLivenessPropagation::computeLocalLivenessForInstruction):
(JSC::BytecodeLivenessPropagation::computeLocalLivenessForBlock):
(JSC::BytecodeLivenessPropagation::getLivenessInfoAtInstruction):
(JSC::BytecodeLivenessPropagation::runLivenessFixpoint):

  • bytecode/BytecodeRewriter.cpp:

(JSC::BytecodeRewriter::insertImpl):
(JSC::BytecodeRewriter::adjustJumpTargets):

  • bytecode/BytecodeRewriter.h:

(JSC::BytecodeRewriter::InsertionPoint::InsertionPoint):
(JSC::BytecodeRewriter::Fragment::Fragment):
(JSC::BytecodeRewriter::BytecodeRewriter):
(JSC::BytecodeRewriter::insertFragmentBefore):
(JSC::BytecodeRewriter::insertFragmentAfter):
(JSC::BytecodeRewriter::replaceBytecodeWithFragment):
(JSC::BytecodeRewriter::adjustAbsoluteOffset):
(JSC::BytecodeRewriter::adjustJumpTarget):

  • bytecode/BytecodeUseDef.cpp:

(JSC::computeUsesForBytecodeIndexImpl):
(JSC::computeDefsForBytecodeIndexImpl):

  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeIndex):
(JSC::computeDefsForBytecodeIndex):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::hasOpDebugForLineAndColumn):
(JSC::CodeBlock::notifyLexicalBindingUpdate):
(JSC::CodeBlock::validate):
(JSC::CodeBlock::outOfLineJumpOffset):
(JSC::CodeBlock::outOfLineJumpTarget):
(JSC::CodeBlock::binaryArithProfileForPC):
(JSC::CodeBlock::unaryArithProfileForPC):
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::outOfLineJumpOffset):
(JSC::CodeBlock::bytecodeOffset):
(JSC::CodeBlock::bytecodeIndex):
(JSC::CodeBlock::instructions const):
(JSC::CodeBlock::instructionAt const):

  • bytecode/Instruction.h:

(JSC::BaseInstruction::opcodeID const):
(JSC::BaseInstruction::name const):
(JSC::BaseInstruction::isWide16 const):
(JSC::BaseInstruction::isWide32 const):
(JSC::BaseInstruction::width const):
(JSC::BaseInstruction::hasMetadata const):
(JSC::BaseInstruction::hasCheckpoints const):
(JSC::BaseInstruction::numberOfCheckpoints const):
(JSC::BaseInstruction::sizeShiftAmount const):
(JSC::BaseInstruction::opcodeIDWidth const):
(JSC::BaseInstruction::opcodeIDBytes const):
(JSC::BaseInstruction::size const):
(JSC::BaseInstruction::is const):
(JSC::BaseInstruction::as const):
(JSC::BaseInstruction::asKnownWidth const):
(JSC::BaseInstruction::cast):
(JSC::BaseInstruction::cast const):
(JSC::BaseInstruction::wide16 const):
(JSC::BaseInstruction::wide32 const):

  • bytecode/InstructionStream.cpp:

(JSC::InstructionStream::InstructionStream): Deleted.
(JSC::InstructionStream::sizeInBytes const): Deleted.
(JSC::InstructionStream::contains const): Deleted.

  • bytecode/InstructionStream.h:

(JSC::InstructionStream::sizeInBytes const):
(JSC::InstructionStream::BaseRef::operator-> const):
(JSC::InstructionStream::BaseRef::ptr const):
(JSC::InstructionStream::BaseRef::unwrap const):
(JSC::InstructionStream::MutableRef::operator->):
(JSC::InstructionStream::MutableRef::operator-> const):
(JSC::InstructionStream::MutableRef::ptr):
(JSC::InstructionStream::MutableRef::ptr const):
(JSC::InstructionStream::MutableRef::unwrap):
(JSC::InstructionStream::MutableRef::unwrap const):
(JSC::InstructionStream::iterator::operator++):
(JSC::InstructionStream::contains const):
(JSC::InstructionStream::InstructionStream):
(JSC::InstructionStreamWriter::InstructionStreamWriter):
(JSC::InstructionStreamWriter::finalize):
(JSC::InstructionStreamWriter::swap):
(JSC::InstructionStreamWriter::iterator::operator++):

  • bytecode/Opcode.h:
  • bytecode/OpcodeInlines.h:

(JSC::isOpcodeShape):

  • bytecode/OpcodeSize.h:
  • bytecode/PreciseJumpTargets.cpp:

(JSC::getJumpTargetsForInstruction):
(JSC::computePreciseJumpTargetsInternal):
(JSC::computePreciseJumpTargets):
(JSC::recomputePreciseJumpTargets):
(JSC::findJumpTargetsForInstruction):

  • bytecode/PreciseJumpTargets.h:
  • bytecode/PreciseJumpTargetsInlines.h:

(JSC::jumpTargetForInstruction):
(JSC::extractStoredJumpTargetsForInstruction):
(JSC::updateStoredJumpTargetsForInstruction):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::dumpLineColumnEntry):
(JSC::UnlinkedCodeBlock::instructions const):
(JSC::UnlinkedCodeBlock::outOfLineJumpOffset):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::instructionAt const):
(JSC::UnlinkedCodeBlock::bytecodeOffset):
(JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets const):
(JSC::UnlinkedCodeBlock::outOfLineJumpOffset):

  • bytecode/UnlinkedCodeBlockGenerator.cpp:

(JSC::UnlinkedCodeBlockGenerator::finalize):
(JSC::UnlinkedCodeBlockGenerator::applyModification):
(JSC::UnlinkedCodeBlockGenerator::addOutOfLineJumpTarget):
(JSC::UnlinkedCodeBlockGenerator::outOfLineJumpOffset):

  • bytecode/UnlinkedCodeBlockGenerator.h:

(JSC::UnlinkedCodeBlockGenerator::addOpProfileControlFlowBytecodeOffset):
(JSC::UnlinkedCodeBlockGenerator::outOfLineJumpOffset):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::instructions const):
(JSC::BytecodeGenerator::withWriter):

  • bytecompiler/BytecodeGeneratorBase.h:
  • bytecompiler/BytecodeGeneratorBaseInlines.h:

(JSC::BytecodeGeneratorBase<Traits>::recordOpcode):
(JSC::BytecodeGeneratorBase<Traits>::alignWideOpcode16):
(JSC::BytecodeGeneratorBase<Traits>::alignWideOpcode32):

  • bytecompiler/StaticPropertyAnalysis.h:

(JSC::StaticPropertyAnalysis::create):
(JSC::StaticPropertyAnalysis::StaticPropertyAnalysis):

  • bytecompiler/StaticPropertyAnalyzer.h:

(JSC::StaticPropertyAnalyzer::createThis):
(JSC::StaticPropertyAnalyzer::newObject):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleVarargsCall):
(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::parseGetById):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parseCodeBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGCapabilities.h:

(JSC::DFG::capabilityLevel):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::compileExit):

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::callerReturnPC):
(JSC::DFG::adjustAndJumpToTarget):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileLoopHint):

  • ftl/FTLLowerDFGToB3.cpp:

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

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • ftl/FTLOperations.cpp:

(JSC::FTL::JSC_DEFINE_JIT_OPERATION):

  • generator/Argument.rb:
  • generator/DSL.rb:
  • generator/Opcode.rb:
  • interpreter/AbstractPC.h:
  • interpreter/CallFrame.cpp:

(JSC::CallFrame::currentVPC const):
(JSC::CallFrame::setCurrentVPC):

  • interpreter/CallFrame.h:
  • interpreter/Interpreter.cpp:

(JSC::CatchInfo::CatchInfo):

  • interpreter/Interpreter.h:
  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):

  • jit/JIT.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_op_jless):
(JSC::JIT::emit_op_jlesseq):
(JSC::JIT::emit_op_jgreater):
(JSC::JIT::emit_op_jgreatereq):
(JSC::JIT::emit_op_jnless):
(JSC::JIT::emit_op_jnlesseq):
(JSC::JIT::emit_op_jngreater):
(JSC::JIT::emit_op_jngreatereq):
(JSC::JIT::emitSlow_op_jless):
(JSC::JIT::emitSlow_op_jlesseq):
(JSC::JIT::emitSlow_op_jgreater):
(JSC::JIT::emitSlow_op_jgreatereq):
(JSC::JIT::emitSlow_op_jnless):
(JSC::JIT::emitSlow_op_jnlesseq):
(JSC::JIT::emitSlow_op_jngreater):
(JSC::JIT::emitSlow_op_jngreatereq):
(JSC::JIT::emit_op_below):
(JSC::JIT::emit_op_beloweq):
(JSC::JIT::emit_op_jbelow):
(JSC::JIT::emit_op_jbeloweq):
(JSC::JIT::emit_op_unsigned):
(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareUnsignedAndJump):
(JSC::JIT::emit_compareUnsigned):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emit_op_inc):
(JSC::JIT::emit_op_dec):
(JSC::JIT::emit_op_mod):
(JSC::JIT::emitSlow_op_mod):
(JSC::JIT::emit_op_pow):
(JSC::JIT::emitSlow_op_pow):
(JSC::JIT::emit_op_negate):
(JSC::JIT::emitSlow_op_negate):
(JSC::JIT::emitBitBinaryOpFastPath):
(JSC::JIT::emit_op_bitnot):
(JSC::JIT::emit_op_bitand):
(JSC::JIT::emit_op_bitor):
(JSC::JIT::emit_op_bitxor):
(JSC::JIT::emit_op_lshift):
(JSC::JIT::emitRightShiftFastPath):
(JSC::JIT::emit_op_rshift):
(JSC::JIT::emit_op_urshift):
(JSC::JIT::emit_op_add):
(JSC::JIT::emitSlow_op_add):
(JSC::JIT::emitMathICFast):
(JSC::JIT::emitMathICSlow):
(JSC::JIT::emit_op_div):
(JSC::JIT::emit_op_mul):
(JSC::JIT::emitSlow_op_mul):
(JSC::JIT::emit_op_sub):
(JSC::JIT::emitSlow_op_sub):

  • jit/JITCall.cpp:

(JSC::JIT::emit_op_ret):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
(JSC::JIT::emit_op_call):
(JSC::JIT::emit_op_tail_call):
(JSC::JIT::emit_op_call_eval):
(JSC::JIT::emit_op_call_varargs):
(JSC::JIT::emit_op_tail_call_varargs):
(JSC::JIT::emit_op_tail_call_forward_arguments):
(JSC::JIT::emit_op_construct_varargs):
(JSC::JIT::emit_op_construct):
(JSC::JIT::emitSlow_op_call):
(JSC::JIT::emitSlow_op_tail_call):
(JSC::JIT::emitSlow_op_call_eval):
(JSC::JIT::emitSlow_op_call_varargs):
(JSC::JIT::emitSlow_op_tail_call_varargs):
(JSC::JIT::emitSlow_op_tail_call_forward_arguments):
(JSC::JIT::emitSlow_op_construct_varargs):
(JSC::JIT::emitSlow_op_construct):
(JSC::JIT::emit_op_iterator_open):
(JSC::JIT::emitSlow_op_iterator_open):
(JSC::JIT::emit_op_iterator_next):
(JSC::JIT::emitSlow_op_iterator_next):

  • jit/JITExceptions.cpp:

(JSC::genericUnwind):

  • jit/JITInlines.h:

(JSC::JIT::fastPathResumePoint const):
(JSC::JIT::jumpTarget):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_mov):
(JSC::JIT::emit_op_end):
(JSC::JIT::emit_op_jmp):
(JSC::JIT::emit_op_new_object):
(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emit_op_overrides_has_instance):
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::emit_op_is_empty):
(JSC::JIT::emit_op_typeof_is_undefined):
(JSC::JIT::emit_op_is_undefined_or_null):
(JSC::JIT::emit_op_is_boolean):
(JSC::JIT::emit_op_is_number):
(JSC::JIT::emit_op_is_big_int):
(JSC::JIT::emit_op_is_cell_with_type):
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_to_primitive):
(JSC::JIT::emit_op_to_property_key):
(JSC::JIT::emit_op_set_function_name):
(JSC::JIT::emit_op_not):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jundefined_or_null):
(JSC::JIT::emit_op_jnundefined_or_null):
(JSC::JIT::emit_op_jeq_ptr):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emit_op_eq):
(JSC::JIT::emit_op_jeq):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_neq):
(JSC::JIT::emit_op_jneq):
(JSC::JIT::emit_op_throw):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::emit_op_stricteq):
(JSC::JIT::emit_op_nstricteq):
(JSC::JIT::compileOpStrictEqJump):
(JSC::JIT::emit_op_jstricteq):
(JSC::JIT::emit_op_jnstricteq):
(JSC::JIT::emitSlow_op_jstricteq):
(JSC::JIT::emitSlow_op_jnstricteq):
(JSC::JIT::emit_op_to_number):
(JSC::JIT::emit_op_to_numeric):
(JSC::JIT::emit_op_to_string):
(JSC::JIT::emit_op_to_object):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_identity_with_profile):
(JSC::JIT::emit_op_get_parent_scope):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_enter):
(JSC::JIT::emit_op_get_scope):
(JSC::JIT::emit_op_to_this):
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emit_op_check_tdz):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emitSlow_op_jeq):
(JSC::JIT::emitSlow_op_jneq):
(JSC::JIT::emit_op_debug):
(JSC::JIT::emit_op_loop_hint):
(JSC::JIT::emitSlow_op_loop_hint):
(JSC::JIT::emit_op_check_traps):
(JSC::JIT::emit_op_nop):
(JSC::JIT::emit_op_super_sampler_begin):
(JSC::JIT::emit_op_super_sampler_end):
(JSC::JIT::emitSlow_op_check_traps):
(JSC::JIT::emit_op_new_regexp):
(JSC::JIT::emitNewFuncCommon):
(JSC::JIT::emit_op_new_func):
(JSC::JIT::emit_op_new_generator_func):
(JSC::JIT::emit_op_new_async_generator_func):
(JSC::JIT::emit_op_new_async_func):
(JSC::JIT::emitNewFuncExprCommon):
(JSC::JIT::emit_op_new_func_exp):
(JSC::JIT::emit_op_new_generator_func_exp):
(JSC::JIT::emit_op_new_async_func_exp):
(JSC::JIT::emit_op_new_async_generator_func_exp):
(JSC::JIT::emit_op_new_array):
(JSC::JIT::emit_op_new_array_with_size):
(JSC::JIT::emit_op_profile_type):
(JSC::JIT::emit_op_log_shadow_chicken_prologue):
(JSC::JIT::emit_op_log_shadow_chicken_tail):
(JSC::JIT::emit_op_profile_control_flow):
(JSC::JIT::emit_op_argument_count):
(JSC::JIT::emit_op_get_rest_length):
(JSC::JIT::emit_op_get_argument):
(JSC::JIT::emit_op_get_prototype_of):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_eq):
(JSC::JIT::emit_op_neq):
(JSC::JIT::emit_op_jeq):
(JSC::JIT::emit_op_jneq):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emitSlow_op_jeq):
(JSC::JIT::emitSlow_op_jneq):
(JSC::JIT::emit_op_stricteq):
(JSC::JIT::emit_op_nstricteq):
(JSC::JIT::emit_op_jstricteq):
(JSC::JIT::emit_op_jnstricteq):
(JSC::JIT::emitSlow_op_jstricteq):
(JSC::JIT::emitSlow_op_jnstricteq):

  • jit/JITOperations.cpp:

(JSC::JSC_DEFINE_JIT_OPERATION):

  • jit/JITOperations.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::emit_op_get_private_name):
(JSC::JIT::emitSlow_op_get_private_name):
(JSC::JIT::emit_op_set_private_brand):
(JSC::JIT::emitSlow_op_set_private_brand):
(JSC::JIT::emit_op_check_private_brand):
(JSC::JIT::emitSlow_op_check_private_brand):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emit_op_put_by_val_direct):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::emit_op_put_private_name):
(JSC::JIT::emitSlow_op_put_private_name):
(JSC::JIT::emit_op_put_getter_by_id):
(JSC::JIT::emit_op_put_setter_by_id):
(JSC::JIT::emit_op_put_getter_setter_by_id):
(JSC::JIT::emit_op_put_getter_by_val):
(JSC::JIT::emit_op_put_setter_by_val):
(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emitSlow_op_del_by_id):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emitSlow_op_del_by_val):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::emit_op_in_by_id):
(JSC::JIT::emitSlow_op_in_by_id):
(JSC::JIT::emit_op_in_by_val):
(JSC::JIT::emitSlow_op_in_by_val):
(JSC::JIT::emit_op_has_private_name):
(JSC::JIT::emitSlow_op_has_private_name):
(JSC::JIT::emit_op_has_private_brand):
(JSC::JIT::emitSlow_op_has_private_brand):
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emit_op_put_to_scope):
(JSC::JIT::emitSlow_op_put_to_scope):
(JSC::JIT::emit_op_get_from_arguments):
(JSC::JIT::emit_op_put_to_arguments):
(JSC::JIT::emit_op_get_internal_field):
(JSC::JIT::emit_op_put_internal_field):
(JSC::JIT::emit_op_get_property_enumerator):
(JSC::JIT::emit_op_enumerator_next):
(JSC::JIT::emit_op_enumerator_get_by_val):
(JSC::JIT::emitSlow_op_enumerator_get_by_val):
(JSC::JIT::emit_op_enumerator_in_by_val):
(JSC::JIT::emit_op_enumerator_has_own_property):

  • llint/LLIntData.cpp:

(JSC::LLInt::initialize):

  • llint/LLIntData.h:

(JSC::LLInt::exceptionInstructions):
(JSC::LLInt::wasmExceptionInstructions):

  • llint/LLIntExceptions.cpp:

(JSC::LLInt::returnToThrow):
(JSC::LLInt::wasmReturnToThrow):

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

(JSC::LLInt::llint_trace_operand):
(JSC::LLInt::llint_trace_value):
(JSC::LLInt::setupGetByIdPrototypeCache):
(JSC::LLInt::performLLIntGetByID):
(JSC::LLInt::varargsSetup):
(JSC::LLInt::commonCallEval):
(JSC::LLInt::dispatchToNextInstructionDuringExit):

  • llint/LLIntSlowPaths.h:
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter.cpp:

(JSC::CLoopRegister::operator const JSInstruction*):
(JSC::CLoop::execute):
(JSC::CLoopRegister::operator const Instruction*): Deleted.

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • llint/WebAssembly.asm:
  • runtime/CachedTypes.cpp:

(JSC::CachedInstructionStream::encode):
(JSC::CachedInstructionStream::decode const):
(JSC::CachedCodeBlock::instructions const):

  • runtime/CommonSlowPaths.cpp:

(JSC::updateArithProfileForBinaryArithOp):
(JSC::iteratorOpenTryFastImpl):
(JSC::iteratorNextTryFastImpl):

  • runtime/CommonSlowPaths.h:
  • runtime/JSCConfig.h:
  • runtime/JSCJSValue.h:
  • runtime/SlowPathFunction.h:
  • runtime/VM.cpp:

(JSC::VM::addLoopHintExecutionCounter):
(JSC::VM::getLoopHintExecutionCounter):
(JSC::VM::removeLoopHintExecutionCounter):

  • runtime/VM.h:
  • wasm/WasmCallee.cpp:

(JSC::Wasm::LLIntCallee::LLIntCallee):
(JSC::Wasm::LLIntCallee::outOfLineJumpOffset):
(JSC::Wasm::LLIntCallee::outOfLineJumpTarget):

  • wasm/WasmCallee.h:
  • wasm/WasmFunctionCodeBlockGenerator.cpp:

(JSC::Wasm::FunctionCodeBlockGenerator::setInstructions):
(JSC::Wasm::FunctionCodeBlockGenerator::addOutOfLineJumpTarget):
(JSC::Wasm::FunctionCodeBlockGenerator::outOfLineJumpOffset):

  • wasm/WasmFunctionCodeBlockGenerator.h:

(JSC::Wasm::FunctionCodeBlockGenerator::constantRegisters const):
(JSC::Wasm::FunctionCodeBlockGenerator::instructions const):
(JSC::Wasm::FunctionCodeBlockGenerator::addJumpTarget):
(JSC::Wasm::FunctionCodeBlockGenerator::numberOfJumpTargets):
(JSC::Wasm::FunctionCodeBlockGenerator::lastJumpTarget):
(JSC::Wasm::FunctionCodeBlockGenerator::outOfLineJumpOffset):
(JSC::Wasm::FunctionCodeBlockGenerator::bytecodeOffset):
(JSC::Wasm::FunctionCodeBlockGenerator::tierUpCounter):

  • wasm/WasmGeneratorTraits.h:
  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::addSwitch):
(JSC::GenericLabel<Wasm::GeneratorTraits>::setLocation):

  • wasm/WasmLLIntTierUpCounter.cpp:

(JSC::Wasm::LLIntTierUpCounter::addOSREntryDataForLoop):
(JSC::Wasm::LLIntTierUpCounter::osrEntryDataForLoop const const):

  • wasm/WasmLLIntTierUpCounter.h:

(JSC::Wasm::LLIntTierUpCounter::LLIntTierUpCounter):

  • wasm/WasmSlowPaths.cpp:

(JSC::LLInt::WASM_SLOW_PATH_DECL):
(JSC::LLInt::slow_path_wasm_throw_exception):
(JSC::LLInt::slow_path_wasm_popcount):
(JSC::LLInt::slow_path_wasm_popcountll):

  • wasm/WasmSlowPaths.h:
10:23 PM Changeset in webkit [290767] by Lauro Moura
  • 2 edits in trunk/Tools

[Tools] Fix linux_get_crash_log.py error logging with python3
https://bugs.webkit.org/show_bug.cgi?id=237404

Reviewed by Fujii Hironori.

Avoid issues generating error logs after 247736@main defaulted to
python3.

  • Scripts/webkitpy/port/linux_get_crash_log.py:

(GDBCrashLogGenerator._get_gdb_output): Encode returncode before
appending to bytes.

9:08 PM Changeset in webkit [290766] by sihui_liu@apple.com
  • 20 edits
    4 deletes in trunk/Source/WebKit

REGRESSION (r289474): cacheStoragePath is empty in NetworkStorageManager::localOriginStorageManager
https://bugs.webkit.org/show_bug.cgi?id=237335

Reviewed by Chris Dumez.

CacheStorage::Engine::storagePath returns emptyString if salt file under rootDirectory cannot be read or
written, so we need to make sure sandbox extension for rootDirectory is consumed before calling storagePath
(in createNetworkStorageManager of NetworkSession).

This patch also refactors code about adding session in network process. Now we would create
NetworkStorageManager when NetworkSession is created.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::updateQuotaBasedOnSpaceUsageForTesting):
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFilesForIndexedDB):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
(WebKit::NetworkProcess::addStorageSession):
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::hasLocalStorage):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData):
(WebKit::NetworkProcess::prepareToSuspend):
(WebKit::NetworkProcess::resume):
(WebKit::NetworkProcess::syncLocalStorage):
(WebKit::NetworkProcess::resetQuota):
(WebKit::NetworkProcess::clearStorage):
(WebKit::NetworkProcess::didIncreaseQuota):
(WebKit::NetworkProcess::renameOriginInWebsiteData):
(WebKit::NetworkProcess::uiProcessBundleIdentifier):
(WebKit::NetworkProcess::connectionToWebProcessClosed):
(WebKit::NetworkProcess::ensureSession): Deleted.

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::uiProcessBundleIdentifier const): Deleted.

  • NetworkProcess/NetworkSession.cpp:

(WebKit::createNetworkStorageManager):
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::invalidateAndCancel):
(WebKit::NetworkSession::lowMemoryHandler):
(WebKit::NetworkSession::addServiceWorkerSession): Deleted.
(WebKit::NetworkSession::addStorageManagerSession): Deleted.

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::storageManager):

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

  • NetworkProcess/NetworkSessionCreationParameters.h:
  • NetworkProcess/RemoteNetworkingContext.h: Removed.
  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::requestSpace):

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::uiProcessBundleIdentifier):

  • NetworkProcess/curl/RemoteNetworkingContextCurl.cpp: Removed.
  • NetworkProcess/mac/RemoteNetworkingContext.mm: Removed.
  • NetworkProcess/soup/RemoteNetworkingContextSoup.cpp: Removed.
  • PlatformPlayStation.cmake:
  • PlatformWin.cmake:
  • Shared/WebsiteDataStoreParameters.cpp:

(WebKit::WebsiteDataStoreParameters::encode const):
(WebKit::WebsiteDataStoreParameters::decode):
(WebKit::WebsiteDataStoreParameters::~WebsiteDataStoreParameters): Deleted.

  • Shared/WebsiteDataStoreParameters.h:

(): Deleted.

  • SourcesCocoa.txt:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::addSession):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::resolvedIndexedDBDirectory const):
(WebKit::WebsiteDataStore::resolvedIndexedDatabaseDirectory const): Deleted.

9:05 PM Changeset in webkit [290765] by sihui_liu@apple.com
  • 14 edits in trunk

Throw proper exception on failed removeEntry() calls
https://bugs.webkit.org/show_bug.cgi?id=237382
<rdar://89232969>

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.worker-expected.txt:

Source/WebKit:

Updated existing tests.

  • NetworkProcess/storage/FileSystemStorageError.h:

(WebKit::convertToException):

  • NetworkProcess/storage/FileSystemStorageHandle.cpp:

(WebKit::FileSystemStorageHandle::removeEntry):

LayoutTests:

  • storage/filesystemaccess/handle-move-expected.txt:
  • storage/filesystemaccess/handle-move-worker-expected.txt:
  • storage/filesystemaccess/resources/handle-move.js:

(async test):

6:56 PM Changeset in webkit [290764] by Robert Jenner
  • 2 edits in trunk/LayoutTests

WindowServer returned not alive with context:,unresponsive work processor(s)
<rdar://86037417>

Unreviewed test gardening. Skipping tests on iOS due to tests causing WindowServer to crash.

  • platform/ios-wk2/TestExpectations:
6:44 PM Changeset in webkit [290763] by Robert Jenner
  • 4 edits in trunk/LayoutTests

Unreviewed, reverting r290658.

r290658 broke two tests for iOS, slowing down EWS.

Reverted changeset:

"fast/mediastream/getUserMedia-to-canvas-1.html and
fast/mediastream/getUserMedia-to-canvas-2.html are failing on
MacOS when remote video frame flag is enabled"
https://bugs.webkit.org/show_bug.cgi?id=237042
https://commits.webkit.org/r290658

5:03 PM Changeset in webkit [290762] by Andres Gonzalez
  • 5 edits in trunk/Source/WebCore

ITM: Checkbox state change is not updated in isolated tree
https://bugs.webkit.org/show_bug.cgi?id=237381
rdar://89529486

Reviewed by Chris Fleizach.

Fixes the following test in isolated tree mode:
accessibility/mac/checked-status-tree-items.html
accessibility/aria-switch-checked.html

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
Properly initializes the properties SupportsCheckedState, IsChecked and
ButtonState.
(WebCore::AXIsolatedObject::getOrRetrievePropertyValue):
Uses the new template method propertyValue(PropertyName).

  • accessibility/isolatedtree/AXIsolatedObject.h:

(WebCore::AXIsolatedObject::propertyValue const):

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::updateNodeProperty):
Updates both IsChecked and ButtonState.

  • accessibility/isolatedtree/AXIsolatedTree.h:
4:29 PM Changeset in webkit [290761] by commit-queue@webkit.org
  • 8 edits in trunk/Source

[WebGPU] Implement GPUDeviceDescriptor.requiredLimits
https://bugs.webkit.org/show_bug.cgi?id=232741
Source/WebCore:

<rdar://problem/85325316>

Patch by Dan Glastonbury <djg@apple.com> on 2022-03-02
Reviewed by Myles C. Maxfield.

Implement IDL bindings for requiredLimits attribute of
GPUDeviceDescriptor.

  • Modules/WebGPU/GPUDeviceDescriptor.h:

(WebCore::GPUDeviceDescriptor::convertToBacking const):

  • Modules/WebGPU/GPUDeviceDescriptor.idl:

Source/WebCore/PAL:

<rdar://problem/85325316>

Patch by Dan Glastonbury <djg@apple.com> on 2022-03-02
Reviewed by Myles C. Maxfield.

Implement IDL bindings for requiredLimits attribute of
GPUDeviceDescriptor.

  • pal/graphics/WebGPU/WebGPUDeviceDescriptor.h:

Source/WebKit:

rdar://problem/85325316

Patch by Dan Glastonbury <djg@apple.com> on 2022-03-02
Reviewed by Myles C. Maxfield.

Implement IDL bindings for requiredLimits attribute of
GPUDeviceDescriptor.

  • Shared/WebGPU/WebGPUDeviceDescriptor.cpp:

(WebKit::WebGPU::ConvertToBackingContext::convertToBacking):
(WebKit::WebGPU::ConvertFromBackingContext::convertFromBacking):

  • Shared/WebGPU/WebGPUDeviceDescriptor.h:

(WebKit::WebGPU::DeviceDescriptor::encode const):
(WebKit::WebGPU::DeviceDescriptor::decode):

4:08 PM Changeset in webkit [290760] by Simon Fraser
  • 5 edits
    2 adds in trunk

Rendering issues with many dynamically-added sticky elements inside overflow scroll
https://bugs.webkit.org/show_bug.cgi?id=237378
<rdar://83745510>

Reviewed by Cameron McCormack.

Source/WebCore:

A bug was filed describing a symptom where position:sticky elements would eventually
fail to render when many of them were dynamically added inside a non-stacking context
overflow scroll.

Debugging showed that CALayers were accumulating, causing us to hit per-process IOSurface
limits, at which point content fails to render (this is being fixed via rdar://89640915).
Further debugging showed that these layers were unparented, and being entrained by
ScrollingStateStickyNodes, which were accumulating in ScrollingStateTree's m_unparentedNodes.

This happened because with this scrolling configuration, each ScrollingStateStickyNode
is parented via a ScrollingStateOverflowScrollProxyNode which is referenced by entries
in RenderLayerBacking's m_ancestorClippingStack. On cleanup, the ScrollingStateOverflowScrollProxyNode
was unparented first, leaving the ScrollingStateStickyNode in m_unparentedNodes.

The fix is to have ScrollingStateTree::unparentChildrenAndDestroyNode() remove nodes
from m_unparentedNodes.

To test, add a m_unparentedNodes count to scrollingStateTreeAsText output, which means
having scrollingStateTreeAsText() as a member function on ScrollingStateTree.

Test: scrollingcoordinator/scrolling-tree/accumulated-unparented-sticky-nodes.html

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText const):

  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::unparentChildrenAndDestroyNode):
(WebCore::ScrollingStateTree::scrollingStateTreeAsText const):

  • page/scrolling/ScrollingStateTree.h:

LayoutTests:

  • scrollingcoordinator/scrolling-tree/accumulated-unparented-sticky-nodes-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/accumulated-unparented-sticky-nodes.html: Added.
3:59 PM Changeset in webkit [290759] by Jonathan Bedard
  • 7 edits in trunk/Tools

[webkitcorepy] Add Terminal.open_url
https://bugs.webkit.org/show_bug.cgi?id=237386
<rdar://problem/89703756>

Reviewed by Don Olmstead.

Different platforms have different commands to open URLs.

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

(Terminal): Add list of valid URL prefixes.
(Terminal.open_url): If terminal is interactive, open the provided URL.

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

(Setup.main): Invoke Terminal.open_url.

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

3:25 PM Changeset in webkit [290758] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[AppSSO] Correct logging messages to avoid confusing screeners that an error has occurred
https://bugs.webkit.org/show_bug.cgi?id=237390
<rdar://problem/89710486>

Reviewed by Simon Fraser.

The phrasing of the message in 'SOAuthorizationCoordinator::tryAuthorize' when a URL is not relevant for
AppSSO flows is:

AUTHORIZATIONCOORDINATOR_RELEASE_LOG("tryAuthorize: Cannot authorize the requested URL.");

This leads people spelunking logs to believe that the URL can't be authorized (perhaps due to an error).

Instead, we should more accurately report that the URL is not one that is mediated through an AppSSO flow,
and so no AppSSO processing is needed.

  • UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.mm:

(WebKit::SOAuthorizationCoordinator::tryAuthorize):

3:09 PM Changeset in webkit [290757] by Chris Dumez
  • 2 edits in trunk/Tools

Unreviewed, address post-landing feedback from Darin on r290743

  • WebKitTestRunner/mac/EventSenderProxy.mm:

(WTR::EventSenderProxy::mouseMoveTo):

2:28 PM Changeset in webkit [290756] by Oriol Brufau
  • 39 edits
    4 deletes in trunk

[css] Implement 'text-decoration' as a shorthand.
https://bugs.webkit.org/show_bug.cgi?id=237175

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update tests to take into account that 'text-decoration' is a shorthand.

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/css-variables/variable-presentation-attribute-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Source/WebCore:

The 'text-decoration' property was considered to be a longhand, sharing
a computed value with 'text-decoration-line'.

This patch switches 'text-decoration' into a shorthand of the following
longhands: 'text-decoration-line', 'text-decoration-thickness',
'text-decoration-style' and 'text-decoration-color'. This is according
to https://www.w3.org/TR/css-text-decor-4/#text-decoration-property

For now I'm keeping the grammar as-is, so 'text-decoration' will only
accept values that are valid in 'text-decoration-line', but will set
the other longhands to the initial value. This should probably change
in a follow-up.

I'm also keeping '-webkit-text-decoration' as-is, as a shorthand of
'text-decoration-{line,style,color}', not including thickness for some
obscure reason. '-webkit-text-decoration' should probably be removed
anyways.

There is a bunch of editing code that was getting/setting/removing
'text-decoration' as a longhand, so I'm switching that to:

  • Use 'text-decoration-line' when getting values.
  • Use 'text-decoration' when setting values, and use a string for the value, this parses it and sets each longhand to the correct value.
  • Use 'text-decoration' get removing declarations, effectively removing all longhands.

This preserves the previous behavior as much as possible.

Tests: fast/css/getComputedStyle/computed-style.html

fast/css/getComputedStyle/computed-style-without-renderer.html
fast/css/getComputedStyle/getComputedStyle-text-decoration.html
fast/css/style-enumerate-properties.html
fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand.html
fast/css3-text/css3-text-decoration/text-decoration-dashed.html
fast/css3-text/css3-text-decoration/text-decoration-dotted-dashed.html
fast/css3-text/css3-text-decoration/text-decoration-dotted.html
imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml.html
imported/w3c/web-platform-tests/css/css-variables/variable-presentation-attribute.html
imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree.html
svg/css/getComputedStyle-basic.xhtml

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json:
  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):
(WebCore::StyleProperties::asText const):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseShorthand):

  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::styleWithResolvedTextDecorations const):
(WebCore::EditingStyle::collapseTextDecorationProperties):
(WebCore::textDecorationValueList):
(WebCore::EditingStyle::conflictsWithInlineStyleOfElement const):
(WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode const):
(WebCore::EditingStyle::mergeStyle):
(WebCore::EditingStyle::removeEquivalentProperties):
(WebCore::reconcileTextDecorationProperties):
(WebCore::StyleChange::StyleChange):
(WebCore::setTextDecorationProperty):
(WebCore::StyleChange::extractTextStyles):
(WebCore::diffTextDecorations):
(WebCore::extractPropertiesNotIn):

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverterCaches::propertyValueForNode):
(HTMLConverter::computedAttributesForElement):

  • editing/markup.cpp:

(WebCore::serializePreservingVisualAppearanceInternal):

  • style/PropertyAllowlist.cpp:

(WebCore::Style::isValidCueStyleProperty):

LayoutTests:

Update tests to take into account that 'text-decoration' is a shorthand.

  • editing/pasteboard/data-transfer-get-data-on-drop-rich-text-expected.txt:
  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • fast/css/getComputedStyle/getComputedStyle-text-decoration-expected.txt:
  • fast/css/getComputedStyle/getComputedStyle-text-decoration.html:
  • fast/css/getComputedStyle/resources/property-names.js:
  • fast/css/style-enumerate-properties-expected.txt:
  • fast/css/style-enumerate-properties.html:
  • fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand-expected.txt:
  • fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand.html:
  • fast/css3-text/css3-text-decoration/text-decoration-dashed-expected-mismatch.html:
  • fast/css3-text/css3-text-decoration/text-decoration-dashed.html:
  • fast/css3-text/css3-text-decoration/text-decoration-dotted-dashed-expected-mismatch.html:
  • fast/css3-text/css3-text-decoration/text-decoration-dotted-dashed.html:
  • fast/css3-text/css3-text-decoration/text-decoration-dotted-expected-mismatch.html:
  • fast/css3-text/css3-text-decoration/text-decoration-dotted.html:
  • fast/events/input-events-paste-rich-datatransfer-expected.txt:
  • platform/glib/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
  • platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
  • platform/glib/svg/css/getComputedStyle-basic-expected.txt: Removed.
  • platform/gtk/fast/events/input-events-paste-rich-datatransfer-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
  • platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
  • platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios/svg/css/getComputedStyle-basic-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • svg/css/getComputedStyle-basic-expected.txt:
2:07 PM Changeset in webkit [290755] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[WebAuthn] Completion handler is not called when WebAuthn invoked without proper entitlements
https://bugs.webkit.org/show_bug.cgi?id=237380
<rdar://problem/89700242>

Reviewed by Chris Dumez.

WebAuthn is not permitted outside of Web Browser applications. When an application that lacks
the full web browser entitlement attempts to invoke WebAuthn flows, we do an early return. However,
the completion handler for this flow is bypassed, preventing applications from being informed of
this problem.

  • WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:

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

1:25 PM Changeset in webkit [290754] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Seatbelt sandbox profile entitlement is deprecated
https://bugs.webkit.org/show_bug.cgi?id=237374

Reviewed by Brent Fulgham.

Replace with new entitlement.

  • Scripts/process-entitlements.sh:
1:12 PM Changeset in webkit [290753] by Jonathan Bedard
  • 2 edits in trunk/Tools

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

Reviewed by Ryan Haddad.

  • Scripts/webkit-patch: Change shebang to Python 3.
1:10 PM Changeset in webkit [290752] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[iOS] Hard link AVPictureInPictureController
https://bugs.webkit.org/show_bug.cgi?id=237227

Reviewed by Brent Fulgham.

Hard linking instead of soft linking should be a small performance improvement.

  • Configurations/WebKit.xcconfig:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

1:04 PM Changeset in webkit [290751] by J Pascoe
  • 5 edits in trunk/LayoutTests

[WebAuthn] Remove obsolete failed attestation tests
https://bugs.webkit.org/show_bug.cgi?id=237346
rdar://problem/89647260

Reviewed by Brent Fulgham.

The removed items tested that creation fails whenever attestation fails, however
we've changed behavior such that creation succeeds with 'none' attestation in this
case, making these failure tests obsolete.

  • http/wpt/webauthn/public-key-credential-create-failure-local-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-local-silent.https.html:
  • http/wpt/webauthn/public-key-credential-create-failure-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-local.https.html:
12:59 PM Changeset in webkit [290750] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ iOS Debug ] editing/async-clipboard/* 20 tests are flaky timeouts on iOS.
https://bugs.webkit.org/show_bug.cgi?id=237372

Unreviewed test gardening.

Patch by Matteo Flores <Matteo Flores> on 2022-03-02

  • platform/ios-wk2/TestExpectations:
12:56 PM Changeset in webkit [290749] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REGRESSION(r290539): [ iOS ] 2X http/wpt/webauthn/public-key-credential-create-failure-local (layout-tests) are constant text failures
https://bugs.webkit.org/show_bug.cgi?id=237346

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
12:53 PM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
12:53 PM Changeset in webkit [290748] by Jonathan Bedard
  • 5 edits in trunk/Tools

[git-webkit] Derive branch name from bug title
https://bugs.webkit.org/show_bug.cgi?id=237284
<rdar://problem/89578241 >

Reviewed by Dewei Zhu.

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

(Branch.to_branch_name): Convert string (particularly a bug title) to potential branch name.
(Branch.main): If provided branch name is actually a bug number or URL, use the title
of that bug as the branch name.

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

(TestBranch):
(TestBranch.test_prompt_git):
(TestBranch.test_prompt_number):
(TestBranch.test_prompt_url):
(TestBranch.test_invalid_branch):
(TestBranch.test_to_branch_name):

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

12:41 PM Changeset in webkit [290747] by Jonathan Bedard
  • 9 edits in trunk

[git-webkit] Sync personal fork by default
https://bugs.webkit.org/show_bug.cgi?id=237324
<rdar://problem/89618617>

Reviewed by Dewei Zhu.

  • metadata/project_config: Add webkitscmpy.update-fork option.
  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git): Add new webkitscmpy.update-fork option.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:

(PullRequest.main): If we are rebasing the source branch, we should push that synced branch
to a user's personal fork, if such a fork exists.

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

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

12:18 PM Changeset in webkit [290746] by Wenson Hsieh
  • 15 edits in trunk

[iOS] Copy context menu action should be titled "Copy Link" when long pressing a non-image link
https://bugs.webkit.org/show_bug.cgi?id=237367
rdar://77397886

Reviewed by Devin Rousso.

Source/WebCore:

Add a localizable string for "Copy Link". See WebKit/ChangeLog for more details.

  • en.lproj/Localizable.strings:

Source/WebKit:

Change the current title of the "Copy" context menu action to "Copy Link", when showing the context menu for a
non-image link. See below for more details.

Tests: fast/events/touch/ios/long-press-on-link.html

fast/events/touch/ios/long-press-on-image.html

  • UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:

(-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:userInfo:]):
(-[_WKActivatedElementInfo _isImage]):

Add a helper method to return whether or not the activated element represents an image. Crucially, this will
return YES in the case of image links, even though the activated element type is _WKActivatedElementTypeLink.
We consult this below to still show "Copy" in the case of image links, instead of "Copy Link".

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

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

Add a _WKActivatedElementInfo argument to -_elementActionWithType:assistant:, and use this to set a custom
title for the menu action in the case of the Copy action for non-image links.

(+[_WKElementAction _elementActionWithType:assistant:]): Deleted.

  • UIProcess/API/Cocoa/_WKElementActionInternal.h:
  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant _appendOpenActionsForURL:actions:elementInfo:]):
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):

Additionally use -_isImage instead of -image here when supplying several default Visual Look Up-related
items; -image is misleading here, since it returns a non-null result even in the case of non-image elements,
if a node snapshot was requested by the client. It's also a bit wasteful, since it means we currently create an
image from the bitmap data while performing this check, when we really only need to know whether the hit-tested
element was an image element.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _simulateElementAction:atLocation:]):
(-[WKContentView _contentsOfUserInterfaceItem:]):
(-[WKContentView _contextMenuInteraction:configurationForMenuAtLocation:completion:]):

Include the titles of all visible menu items as an additional argument in the "contents of user interface item"
dictionary, in the case of context menus. To do this, we take advantage of the -updateVisibleMenuWithBlock:
API, which passes the currently visible UIMenu, to collect the titles of each visible menu item, and then
simply return the visible menu as-is.

See adjusted layout tests for more information.

(-[WKContentView contextMenuInteraction:willDisplayMenuForConfiguration:animator:]):

Move the call to -_didShowContextMenu to the animation completion block, such that we invoke the testing
completion handler for didShowContextMenuCallback after the menu is actually visible. Importantly, this allows
us to query the list of visible menu item titles above, by calling -updateVisibleMenuWithBlock:.

  • UIProcess/mac/DisplayCaptureSessionManager.mm:

(WebKit::alertForWindowSelection):

Drive-by fix: add quotes around the description argument to the UI string macro to fix an error when running
the update-webkit-localizable-strings script.

LayoutTests:

Adjust a couple of layout tests to check for items labeled "Copy" (in the case of an image) and "Copy Link" (in
the case of a link).

  • fast/events/touch/ios/long-press-on-image-expected.txt:
  • fast/events/touch/ios/long-press-on-image.html:
  • fast/events/touch/ios/long-press-on-link-expected.txt:
  • fast/events/touch/ios/long-press-on-link.html:
11:58 AM Changeset in webkit [290745] by mmaxfield@apple.com
  • 4 edits
    2 adds in trunk/LayoutTests

[Cocoa] The behavior of navigator-language-ru changed in Monterey / iOS 15
https://bugs.webkit.org/show_bug.cgi?id=237384
<rdar://problem/80335706>

Unreviewed test gardening.

Add a new test for the new behavior, but keep the old one too for older OSes.

  • fast/text/international/system-language/navigator-language/navigator-language-ru-2-expected.txt: Added.
  • fast/text/international/system-language/navigator-language/navigator-language-ru-2.html: Added.
  • platform/ios-14/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk2/TestExpectations:
11:47 AM Changeset in webkit [290744] by J Pascoe
  • 2 edits in trunk/Source/WebKit

[WebAuthn] Ensure presenter gets dismissed on iOS
https://bugs.webkit.org/show_bug.cgi?id=237336
rdar://81609371

Reviewed by Brent Fulgham.

Always call [m_presenter dismissWithError] to ensure presenter gets dismissed.

  • UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm:

(WebKit::AuthenticatorPresenterCoordinator::dimissPresenter):

11:39 AM Changeset in webkit [290743] by Chris Dumez
  • 13 edits in trunk

Mousemove events double-firing in Safari
https://bugs.webkit.org/show_bug.cgi?id=237342
<rdar://88025610>

Reviewed by Wenson Hsieh.

Source/WebKit:

When we constructed a WebViewImpl, we would add a mouse tracking area to the view,
so that mouseMoved/mouseEntered/mouseExited would get called and we would be able
to forward these mouse events to the WebContent process. However, when the view
becomes first responder, an implicit mouse tracking area also gets added. As a
result, we would get duplicate calls to mouseMoved/mouseEntered/mouseExited.

We consulted with the AppKit team and their recommendation was to use a different
owner object for our mouse tracking area and have that object forward the
mouseMoved/mouseEntered/mouseExited calls to our WebViewImpl. In doing so, we
can stop forwarding mouseMoved/mouseEntered/mouseExited calls from WKWebView &
WKView, which are NOT for our mouse tracking area.

No new tests, I tried but wasn't able to write an API test for this.
I had trouble making the test window key so that the view would receive
the (duplicate) mousemove events. I validated via logging that we are no longer
getting duplicate mousemove events. I also checked on
https://www.vsynctester.com/testing/mouse.html that the output now looks correct.

  • UIProcess/API/Cocoa/WKViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/mac/WKView.mm:

(-[WKView _simulateMouseMove:]):
(-[WKView mouseMoved:]): Deleted.
(-[WKView mouseEntered:]): Deleted.
(-[WKView mouseExited:]): Deleted.

  • UIProcess/API/mac/WKWebViewMac.mm:

(-[WKWebView _simulateMouseMove:]):
(-[WKWebView mouseMoved:]): Deleted.
(-[WKWebView mouseEntered:]): Deleted.
(-[WKWebView mouseExited:]): Deleted.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKMouseTrackingObserver initWithViewImpl:]):
(-[WKMouseTrackingObserver mouseMoved:]):
(-[WKMouseTrackingObserver mouseEntered:]):
(-[WKMouseTrackingObserver mouseExited:]):
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::updatePrimaryTrackingAreaOptions):
(WebKit::WebViewImpl::setPrimaryTrackingArea): Deleted.

  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):

Tools:

Call [WKWebView _simulateMouseMove:] SPI instead of calling [WKWebView mouseMoved:]
since the latter calls are now being ignored.

  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[TestWKWebView mouseMoveToPoint:withFlags:]):

  • TestWebKitAPI/mac/PlatformWebViewMac.mm:

(TestWebKitAPI::PlatformWebView::simulateMouseMove):

  • WebKitTestRunner/mac/EventSenderProxy.mm:

(WTR::EventSenderProxy::mouseMoveTo):

11:26 AM Changeset in webkit [290742] by Russell Epstein
  • 1 copy in tags/Safari-614.1.3.8

Tag Safari-614.1.3.8.

11:21 AM Changeset in webkit [290741] by graouts@webkit.org
  • 5 edits in trunk

[web-animations] setting the composite property on a keyframe effect should invalidate the target style
https://bugs.webkit.org/show_bug.cgi?id=237356

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-context-filling-expected.txt:

Source/WebCore:

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::setComposite):

  • animation/KeyframeEffect.h:

(WebCore::KeyframeEffect::setComposite): Deleted.

11:06 AM Changeset in webkit [290740] by Russell Epstein
  • 9 edits in branches/safari-614.1.3-branch/Source

Versioning.

WebKit-7614.1.3.8

10:59 AM Changeset in webkit [290739] by sihui_liu@apple.com
  • 10 edits in trunk

Add assertion that no two sessions share the same general storage directory
https://bugs.webkit.org/show_bug.cgi?id=236844
<rdar://problem/89178566>

Reviewed by Chris Dumez.

Source/WebKit:

rdar://89190571 shows that there can be two WebsiteDataStores using the same general storage directory, when
initializing network process. This can lead to corruption because storage code of each session runs on its own
WorkQueue (or thread) in network process. If two sessions (WebsiteDataStores) use the same directory, the
directory and its files may be accessed concurrently. The correct usage is creating different persistent
sessions with different paths. Let's add an assertion to help find problematic use case.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::cacheStorageDirectory const):
(WebKit::WebsiteDataStore::resolvedGeneralStorageDirectory const):
(WebKit::WebsiteDataStore::generalStorageDirectory const): Deleted.

Tools:

Update the tests where two WebsiteDataStores are created with the same general storage directory.

  • TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:

(emptyObservationsDBPath):
(emptyPcmDBPath):
(cleanUp):

  • TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(runWebsiteDataStoreCustomPaths):

10:53 AM Changeset in webkit [290738] by Tyler Wilcock
  • 2 edits in trunk/Source/WebCore

AX: Handle null FileList in RenderFileUploadControl::fileTextValue()
https://bugs.webkit.org/show_bug.cgi?id=237349

Reviewed by Chris Fleizach.

In rare circumstances, it's possible for the FileList associated
with RenderFileUploadControl::inputElement (HTMLInputElement::files())
to be null. This causes a crash in RenderFileUploadControl::fileTextValue().

In this patch, we avoid this crash by handling a null FileList
and returning a null String.

  • rendering/RenderFileUploadControl.cpp:

(WebCore::RenderFileUploadControl::fileTextValue const):
Handle null input.files() and return a null String rather than ASSERTing.

10:52 AM Changeset in webkit [290737] by Alan Coon
  • 1 copy in branches/safari-test-branch

New branch.

10:48 AM Changeset in webkit [290736] by sihui_liu@apple.com
  • 2 edits in trunk/Tools

Add test coverage for deleting FileSystem data when file is being written
https://bugs.webkit.org/show_bug.cgi?id=237353

Reviewed by Chris Dumez.

Verify that file can be removed from disk, and active FileSystemSyncAccessHandle is invalidated in this case.

  • TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:
10:47 AM Changeset in webkit [290735] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

Outline-width with transition don't animate correctly
https://bugs.webkit.org/show_bug.cgi?id=173708

Reviewed by Antti Koivisto.

Source/WebCore:

Account for a change in outline size when checking whether a style change affects
visual overflow.

No new test for this, I'm not sure how to write one since the issue is failing to
repaint during an animation but WKTR seems to force a repaint for reftests.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::changeAffectsVisualOverflow const):

LayoutTests:

Add a repaint test that checks that the outline is accounted for during the transition.

  • fast/repaint/outline-transition-expected.txt: Added.
  • fast/repaint/outline-transition.html: Added.
9:09 AM Changeset in webkit [290734] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[RTL] Image alt text has incorrect bidi reordering
https://bugs.webkit.org/show_bug.cgi?id=237366
<rdar://problem/89687229>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/images/alt-text-with-right-to-left-inline-direction-reordering.html

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintReplaced): Enable bidi reordering.

LayoutTests:

  • fast/images/alt-text-with-right-to-left-inline-direction-reordering-expected-mismatch.html: Added.
  • fast/images/alt-text-with-right-to-left-inline-direction-reordering.html: Added.
9:07 AM Changeset in webkit [290733] by youenn@apple.com
  • 11 edits in trunk/Source

Rename MediaSampleAVFObjC::createImageSample to MediaSampleAVFObjC::createFromPixelBuffer
https://bugs.webkit.org/show_bug.cgi?id=237354

Reviewed by Eric Carlson.

Source/WebCore:

No change of behavior, this is a renaming.

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::toMediaSample):

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

(WebCore::MediaSampleAVFObjC::createFromPixelBuffer):
(WebCore::MediaSampleAVFObjC::createImageSample): Deleted.

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

(WebCore::MediaSampleAVFObjC::createFromPixelBuffer):
(WebCore::MediaSampleAVFObjC::createImageSample): Deleted.

  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:

(WebCore::GraphicsContextGLCocoa::paintCompositedResultsToMediaSample):

  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::adaptVideoSample):

Source/WebKit:

  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:

(WebKit::LibWebRTCCodecsProxy::createDecoderCallback):

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::SourceProxy::rotateVideoFrameIfNeeded):

  • WebProcess/GPU/webrtc/SharedVideoFrame.cpp:

(WebKit::SharedVideoFrameReader::read):

  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:

(WebKit::RemoteCaptureSampleManager::RemoteVideo::videoSampleAvailable):

8:59 AM Changeset in webkit [290732] by commit-queue@webkit.org
  • 13 edits in trunk/Source/WebKit

IPC_TESTING_API MessageArgumentDescriptions.cpp is slow to compile
https://bugs.webkit.org/show_bug.cgi?id=237195

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-02
Reviewed by Antti Koivisto.
Reland after revert:
Add missing includes to JSC inlines, needed for ASAN build. Compile
failure was hidden my unified build.

IPC testing API needs convert message data buffer, IPC::Decoder, to
JSValue. This is a run-time operation.
IPC message decoding is based on templates, a compile time operation.
IPC generator generates MessageArgumentDescriptions.cpp with
a big switch. The switch has a case for each message name. The case would
call templated jsValueForDecodedArguments<Arguments>, where the Arguments
is the type tuple for the message arguments.

The above would mean that MessageArgumentDescriptions would need to
include all the headers for all the messages in WebKit in order
to populate the Arguments tuple for particular message.
This would cause MessageArgumentDescriptions to be slow to compile because
it would need all the headers in Source/WebKit related to message parameter types.

This would show up as slow compiles that would consume much memory (5-6gb) and do a
lot of work.

It would also have to compile the MessageArgumentDescriptions each time
any of the headers were touched.

Change this so that the big switch calls a declared but not defined
template jsValueForDecodedMessage<MessageName> for each MessageName case in the
switch.

Instantiate the template for each message in the *MessageReceiver.cpp file
that each message receiver has. This file already has to include all the
headers used for that particular message receiver. These files are small and compile
fast.

After this change MessageArgumentDescriptions.cpp only includes the message
definition headers, does not use much more than the standard 1gb+ of memory
while compiling and is relatively fast to compile. Also if any of the dependent
headers are touched, only the corresponding small *MessageReceiver.cpp files are compiled.

This change is needed for further improve the JS testing API implementation.
Adding new operations that employ the same strategy, eg. switch and a complex
template instantiation, would possibly just make the matter worse. New operations
that are needed are message sends, which use templates similarly to the message
decode case that is implement here.

This change regenerates the checked-in test content that can be used to review
what kind of changes the real MessageArgumentDescriptions.cpp and MessageReceiver.cpps
get.

  • Platform/IPC/JSIPCBinding.h:
  • Scripts/webkit/messages.py:

(generate_message_handler):
(generate_js_value_conversion_function):
(generate_message_argument_description_implementation):

  • Scripts/webkit/tests/MessageArgumentDescriptions.cpp:

(IPC::jsValueForArguments):
(IPC::jsValueForReplyArguments):

  • Scripts/webkit/tests/TestWithCVPixelBufferMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithCVPixelBuffer_SendCVPixelBuffer>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithCVPixelBuffer_ReceiveCVPixelBuffer>):

  • Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithIfMessage_LoadURL>):

  • Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithImageData_SendImageData>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithImageData_ReceiveImageData>):

  • Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_LoadURL>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_LoadSomething>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_TouchEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_AddEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_LoadSomethingElse>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_DidReceivePolicyDecision>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_Close>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_PreferencesDidChange>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_SendDoubleAndFloat>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_SendInts>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_CreatePlugin>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_RunJavaScriptAlert>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_GetPlugins>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_GetPluginProcessConnection>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithLegacyReceiver_GetPluginProcessConnection>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_TestMultipleAttributes>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithLegacyReceiver_TestMultipleAttributes>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_TestParameterAttributes>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_TemplateTest>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_SetVideoLayerID>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_DidCreateWebProcessConnection>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_InterpretKeyEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_DeprecatedOperation>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_ExperimentalOperation>):

  • Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithSemaphore_SendSemaphore>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSemaphore_ReceiveSemaphore>):

  • Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithStreamBuffer_SendStreamBuffer>):

  • Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithStream_SendString>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithStream_SendStringSynchronized>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithStream_SendMachSendRight>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithStream_ReceiveMachSendRight>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithStream_SendAndReceiveMachSendRight>):

  • Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_LoadURL>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestAsyncMessage>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestAsyncMessage>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestAsyncMessageWithNoArguments>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestAsyncMessageWithNoArguments>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestAsyncMessageWithMultipleArguments>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestAsyncMessageWithMultipleArguments>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestAsyncMessageWithConnection>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestAsyncMessageWithConnection>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestSyncMessage>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestSyncMessage>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestSynchronousMessage>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestSynchronousMessage>):

  • Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_LoadURL>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_LoadSomething>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_TouchEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_AddEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_LoadSomethingElse>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_DidReceivePolicyDecision>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_Close>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_PreferencesDidChange>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_SendDoubleAndFloat>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_SendInts>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_CreatePlugin>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_RunJavaScriptAlert>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_GetPlugins>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_GetPluginProcessConnection>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithoutAttributes_GetPluginProcessConnection>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_TestMultipleAttributes>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithoutAttributes_TestMultipleAttributes>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_TestParameterAttributes>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_TemplateTest>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_SetVideoLayerID>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_DidCreateWebProcessConnection>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_InterpretKeyEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_DeprecatedOperation>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_ExperimentalOperation>):

8:45 AM Changeset in webkit [290731] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][WP] Stop generating certain sandbox violation reports
https://bugs.webkit.org/show_bug.cgi?id=237364

Reviewed by Chris Dumez.

Stop generating certain common sandbox violation reports in the WebContent process on iOS, since that
can improve performance. We will still get telemetry for these violations.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
7:27 AM Changeset in webkit [290730] by graouts@webkit.org
  • 15 edits in trunk

[web-animations] changes to font-size should recompute keyframes
https://bugs.webkit.org/show_bug.cgi?id=237357

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-animations/responsive/column-width-001-expected.txt:
  • web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-context-expected.txt:
  • web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-context-filling-expected.txt:
  • web-platform-tests/web-animations/responsive/fontSize-expected.txt:
  • web-platform-tests/web-animations/responsive/perspective-expected.txt:
  • web-platform-tests/web-animations/responsive/textIndent-expected.txt:
  • web-platform-tests/web-animations/responsive/to-style-change-expected.txt:

Source/WebCore:

When we compute keyframes, it's possible that some values are specified using "em" units
and thus dependent on the current value for font-size. If the font-size changes over time,
we must recompute keyframes to ensure that any such value is updated.

To ensure that we correctly determine when the font-size changed, we pass a pointer to the
style seen when we last udpated animations so that we only consider a change in font-size
provided we've ever resolved animations.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::propertyAffectingKeyframeResolutionDidChange):
(WebCore::KeyframeEffect::propertyAffectingLogicalPropertiesDidChange): Deleted.

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

(WebCore::KeyframeEffectStack::applyKeyframeEffects):

  • animation/KeyframeEffectStack.h:
  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

  • style/Styleable.h:

(WebCore::Styleable::applyKeyframeEffects const):

7:23 AM Changeset in webkit [290729] by Oriol Brufau
  • 6 edits in trunk

[css-cascade] Support 'revert-layer' in @keyframes
https://bugs.webkit.org/show_bug.cgi?id=237152

Reviewed by Antti Koivisto.

Source/WebCore:

In @keyframes, 'revert-layer' should roll back the cascaded value to
author origin. Resolver::styleForKeyframe already has the base style of
the element, so we only need to avoid applying properties with the
'revert-layer' value.

Test: imported/w3c/web-platform-tests/css/css-cascade/revert-layer-010.html.html

  • style/StyleBuilder.cpp:

(WebCore::Style::Builder::applyProperty):

  • style/StyleBuilderState.h:

(WebCore::Style::BuilderState::setIsBuildingKeyframeStyle):

  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::styleForKeyframe):

LayoutTests:

Expect test to pass.

7:06 AM Changeset in webkit [290728] by commit-queue@webkit.org
  • 15 edits in trunk/Source

[GTK] setDragImage ignores offset
https://bugs.webkit.org/show_bug.cgi?id=237292

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

Source/WebCore:

To fix this, I need DataTransfer to expose its dragLocation, which is the offset passed to
setDragImage.

  • dom/DataTransfer.h:

(WebCore::DataTransfer::dragLocation const):

Source/WebKit:

Plumb the offset from the last place we have access to a DataTransfer object down to
DragSource, where it's ultimately used. This allows web content to properly position the
drag image under the mouse cursor.

  • UIProcess/API/gtk/DragSource.h:
  • UIProcess/API/gtk/DragSourceGtk3.cpp:

(WebKit::DragSource::begin):

  • UIProcess/API/gtk/DragSourceGtk4.cpp:

(WebKit::DragSource::begin):

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::startDrag):

  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseStartDrag):

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::startDrag):

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

(WebKit::WebDragClient::startDrag):

7:03 AM Changeset in webkit [290727] by Adrian Perez de Castro
  • 2 edits in trunk

[CMake] Build failure with libstdc++ (>= 6) when cross-compiling (fatal error: stdlib.h: No such file or directory)
https://bugs.webkit.org/show_bug.cgi?id=161697
<rdar://problem/89613152>

Reviewed by Carlos Garcia Campos.

  • Source/cmake/WebKitCompilerFlags.cmake: Go through CMake instead of the plain "env"

program for the sake of portability.

6:49 AM Changeset in webkit [290726] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[RTL] Incorrect alt text position in right to left context
https://bugs.webkit.org/show_bug.cgi?id=237352
<rdar://problem/89657704>

Reviewed by Simon Fraser.

Source/WebCore:

Take the inline direction into account when computing the alt text location.

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintReplaced): This is mostly moving things around/modernizing it.

LayoutTests:

  • fast/images/alt-text-with-right-to-left-inline-direction-expected-mismatch.html: Added.
  • fast/images/alt-text-with-right-to-left-inline-direction.html: Added.
5:49 AM Changeset in webkit [290725] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Annotate LibWebRTC with thread safety macros
https://bugs.webkit.org/show_bug.cgi?id=237321
<rdar://problem/89625577>

Unreviewed, addressing post commit style change.
No change of behavior.

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
12:50 AM Changeset in webkit [290724] by Carlos Garcia Campos
  • 6 edits in trunk

REGRESSION(r216096): [GTK] Test accessibility/gtk/menu-list-unfocused-notifications.html is failing since r216096
https://bugs.webkit.org/show_bug.cgi?id=171598

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Enable accessibility when a WTR observer is added.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::addNotificationObserver):

LayoutTests:

Since r216096 the notification for menu list changes is deffered, so we need to wait one run loop cycle to get
the notifications. Also update the test to ignore notifications that are not interesting like AXLoadComplete and
AXElementBusyChanged, and update expectations for the new behavior with ATSPI where the notification is emitted
on the menu and not the combo.

  • accessibility/gtk/menu-list-unfocused-notifications-expected.txt:
  • accessibility/gtk/menu-list-unfocused-notifications.html:
  • platform/gtk/TestExpectations:
12:49 AM Changeset in webkit [290723] by Carlos Garcia Campos
  • 3 edits in trunk/LayoutTests

[ATSPI] Test accessibility/select-element-at-index.html is failing
https://bugs.webkit.org/show_bug.cgi?id=237315

Reviewed by Adrian Perez de Castro.

This is because the test contains platform specific behavior for ATK that was migrated to ATSPI by mistake. We
should behave like all other ports now.

  • accessibility/select-element-at-index.html:
  • platform/glib/TestExpectations:
12:09 AM Changeset in webkit [290722] by commit-queue@webkit.org
  • 31 edits
    7 copies
    3 adds in trunk

Add SPI _WKDataTask
https://bugs.webkit.org/show_bug.cgi?id=237234

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-02
Reviewed by Tim Horton.

Source/WebKit:

When I added WKWebView._requestResource:completionHandler: I overlooked a few things.
First, it is unable to support HTTPS because I didn't hook up authentication challenge handling to it.
Second, it is unable to have a maximum accepted response length, which is a requirement for an adopter.
To make these possible, I made _WKDataTask which is related to WKDownload and NSURLSessionDataTask.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::dataTaskWithRequest):
(WebKit::NetworkProcess::cancelDataTask):
(WebKit::NetworkProcess::requestResource): Deleted.

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

(WebKit::NetworkSession::dataTaskWithRequest):
(WebKit::NetworkSession::cancelDataTask):
(WebKit::NetworkSession::requestResource): Deleted.

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::dataTaskWithRequest):
(WebKit::NetworkSessionCocoa::cancelDataTask):
(WebKit::NetworkSessionCocoa::removeDataTask):
(WebKit::NetworkSessionCocoa::requestResource): Deleted.

  • NetworkProcess/cocoa/WKURLSessionTaskDelegate.h: Copied from Source/WebKit/Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h.
  • NetworkProcess/cocoa/WKURLSessionTaskDelegate.mm: Added.

(-[WKURLSessionTaskDelegate initWithIdentifier:session:]):
(-[WKURLSessionTaskDelegate connection]):
(-[WKURLSessionTaskDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(-[WKURLSessionTaskDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
(-[WKURLSessionTaskDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
(-[WKURLSessionTaskDelegate URLSession:dataTask:didReceiveData:]):
(-[WKURLSessionTaskDelegate URLSession:task:didCompleteWithError:]):

  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):

  • Shared/API/APIObject.h:
  • Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h:
  • Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm:

(WebKit::fromAuthenticationChallengeDisposition):

  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):

  • Shared/DataTaskIdentifier.h: Copied from Source/WebKit/Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h.
  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/API/APIDataTask.cpp: Copied from Source/WebKit/UIProcess/API/APIInspectorExtensionClient.h.

(API::DataTask::setClient):
(API::DataTask::cancel):
(API::DataTask::DataTask):

  • UIProcess/API/APIDataTask.h: Copied from Source/WebKit/UIProcess/API/APIInspectorExtensionClient.h.

(API::DataTask::create):
(API::DataTask::page):
(API::DataTask::client const):

  • UIProcess/API/APIDataTaskClient.h: Copied from Source/WebKit/UIProcess/API/APIInspectorExtensionClient.h.

(API::DataTaskClient::create):
(API::DataTaskClient::~DataTaskClient):
(API::DataTaskClient::didReceiveChallenge const):
(API::DataTaskClient::willPerformHTTPRedirection const):
(API::DataTaskClient::didReceiveResponse const):
(API::DataTaskClient::didReceiveData const):
(API::DataTaskClient::didCompleteWithError const):

  • UIProcess/API/APIInspectorExtensionClient.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _dataTaskWithRequest:completionHandler:]):
(-[WKWebView _requestResource:completionHandler:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/_WKDataTask.h: Copied from Source/WebKit/UIProcess/API/APIInspectorExtensionClient.h.
  • UIProcess/API/Cocoa/_WKDataTask.mm: Added.

(-[_WKDataTask cancel]):
(-[_WKDataTask webView]):
(-[_WKDataTask delegate]):
(-[_WKDataTask setDelegate:]):
(-[_WKDataTask dealloc]):
(-[_WKDataTask _apiObject]):

  • UIProcess/API/Cocoa/_WKDataTaskDelegate.h: Added.
  • UIProcess/API/Cocoa/_WKDataTaskInternal.h: Copied from Source/WebKit/Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h.
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::dataTaskWithRequest):
(WebKit::NetworkProcessProxy::dataTaskReceivedChallenge):
(WebKit::NetworkProcessProxy::dataTaskWillPerformHTTPRedirection):
(WebKit::NetworkProcessProxy::dataTaskDidReceiveResponse):
(WebKit::NetworkProcessProxy::dataTaskDidReceiveData):
(WebKit::NetworkProcessProxy::dataTaskDidCompleteWithError):
(WebKit::NetworkProcessProxy::requestResource): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::dataTaskWithRequest):
(WebKit::WebPageProxy::requestResource): Deleted.

  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:

Source/WTF:

  • wtf/PlatformHave.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:

(-[TestDataTaskDelegate dataTask:didReceiveAuthenticationChallenge:completionHandler:]):
(-[TestDataTaskDelegate dataTask:didReceiveResponse:decisionHandler:]):
(-[TestDataTaskDelegate dataTask:didReceiveData:]):
(-[TestDataTaskDelegate dataTask:didCompleteWithError:]):
(TEST):

Mar 1, 2022:

11:08 PM Changeset in webkit [290721] by youenn@apple.com
  • 17 edits in trunk/Source

Remove RemoteVideoSample support from ImageTransferSessionVT
https://bugs.webkit.org/show_bug.cgi?id=237318

Reviewed by Eric Carlson.

Source/WebCore:

No change of behavior.

  • platform/graphics/cv/ImageTransferSessionVT.h:
  • platform/graphics/cv/ImageTransferSessionVT.mm:
  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeVideoCaptureSource.cpp:

Source/WebKit:

Remove no longer needed forward declaration or include of RemoteVideoSample.
Remove ImageTransferSessionVT::createMediaSample(RemoteVideoSample&&) and replace it with direct use of MediaSampleAVFObjC.

No change of behavior.

  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:
  • GPUProcess/webrtc/RemoteMediaRecorder.h:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:
  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:
  • WebProcess/cocoa/RemoteCaptureSampleManager.h:
  • WebProcess/cocoa/RemoteRealtimeAudioSource.h:
  • WebProcess/cocoa/RemoteRealtimeMediaSourceProxy.h:
  • WebProcess/cocoa/UserMediaCaptureManager.h:
10:42 PM Changeset in webkit [290720] by Devin Rousso
  • 13 edits
    2 adds in trunk

Web Inspector: add a switch to control whether breakpoint evaluations (condition, ignore count, actions) are also affected by script blackboxing
https://bugs.webkit.org/show_bug.cgi?id=235274

Reviewed by Patrick Angle.

Source/JavaScriptCore:

Being able to defer breakpoint evaluations until the next actual pause can sometimes be far
more useful than doing the breakpoint evaluations at the breakpoint's original location.

As an example, configuring the All Events breakpoint with a console.trace() action and
auto-continue enabled would not provide much useful information without also blackboxing
breakpoint evaluations as the original pause location of the All Events breakpoint is on the
first line of the event handler, meaning that if the script containing the event handler is
blackboxed then the console.trace() would still only show that location even though the
Sources Tab would show the first line of code outside of that script (due to the blackbox).
Being able to also blackbox breakpoint evaluations would instead cause the console.trace()
action to have the same output as the Sources Tab, since it's evaluation would be deferred
until execution actually paused, which is further inside the event handler.

  • debugger/Debugger.cpp:

(JSC::Debugger::Debugger):
(JSC::Debugger::didHitBreakpoint):
(JSC::Debugger::evaluateBreakpointCondition):
(JSC::Debugger::continueProgram):
(JSC::Debugger::pauseIfNeeded):
(JSC::Debugger::didExecuteProgram):
(JSC::Debugger::setBlackboxBreakpointEvaluations): Added.
Keep track of every Breakpoint wants to pause but is deferred due to blackboxing.
Depending on whether breakpoint evaluations are also blackboxed (based on the flag set via
the piping code/logic below), check if the script attempting to be paused in is blackboxed
before or after handling breakpoint evaluations.
Side effects of this change are:

  • breakpoint conditions are now evaluated right before that breakpoint's actions, instead of evaluating all breakpoint conditions before all breakpoint actions
  • if breakpoint evaluations are blackboxed, more than two breakpoints can now be evaluated

during a single pause attempt depending on how may deferrals (with breakpoints) happened

  • debugger/Debugger.h:

(JSC::Debugger::Observer::didDeferBreakpointPause): Added.
Add a way to notify InspectorDebuggerAgent of deferred breakpoint pauses so that the
correct originalReason will be used after a deferred pause.

  • inspector/protocol/Debugger.json:
  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::setBlackboxBreakpointEvaluations): Added.
(Inspector::InspectorDebuggerAgent::didDeferBreakpointPause): Added.
Add a setBlackboxBreakpointEvaluations command that passes directly to Debugger.

Source/WebInspectorUI:

Being able to defer breakpoint evaluations until the next actual pause can sometimes be far
more useful than doing the breakpoint evaluations at the breakpoint's original location.

As an example, configuring the All Events breakpoint with a console.trace() action and
auto-continue enabled would not provide much useful information without also blackboxing
breakpoint evaluations as the original pause location of the All Events breakpoint is on the
first line of the event handler, meaning that if the script containing the event handler is
blackboxed then the console.trace() would still only show that location even though the
Sources Tab would show the first line of code outside of that script (due to the blackbox).
Being able to also blackbox breakpoint evaluations would instead cause the console.trace()
action to have the same output as the Sources Tab, since it's evaluation would be deferred
until execution actually paused, which is further inside the event handler

  • UserInterface/Base/Setting.js:
  • UserInterface/Controllers/DebuggerManager.js:

(WI.DebuggerManager.supportsBlackboxingBreakpointEvaluations): Added.
(WI.DebuggerManager.prototype.async initializeTarget):
(WI.DebuggerManager.prototype._setBlackboxBreakpointEvaluations): Added.
(WI.DebuggerManager.prototype._handleBlackboxBreakpointEvaluationsChange): Added.
Create a global WI.Setting for this feature and handle changes from the code below.

  • UserInterface/Views/BlackboxSettingsView.js:

(WI.BlackboxSettingsView.prototype.initialLayout):

  • UserInterface/Views/BlackboxSettingsView.css:

(.settings-view.blackbox > p > label): Added.
(.settings-view.blackbox > p > label > input): Added.
(.settings-view.blackbox > p > label > span): Added.
Add a checkbox and explanation of this new feature in the Blackbox pane of the Settings Tab.

  • Localizations/en.lproj/localizedStrings.js:

LayoutTests:

  • inspector/debugger/setBlackboxBreakpointEvaluations.html: Added.
  • inspector/debugger/setBlackboxBreakpointEvaluations-expected.txt: Added.
10:05 PM Changeset in webkit [290719] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/bmalloc

[libpas] Add missing PlayStation implementation.
https://bugs.webkit.org/show_bug.cgi?id=237341

Reviewed by Yusuke Suzuki.

  • libpas/src/libpas/pas_monotonic_time.c:

(pas_get_current_monotonic_time_nanoseconds):

10:03 PM Changeset in webkit [290718] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

Fix deprecations for ERB.new in GenerateSettings.rb
https://bugs.webkit.org/show_bug.cgi?id=237237

Reviewed by Don Olmstead.

Ruby 3.1.0 reported the following warning:

GenerateSettings.rb:283: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
GenerateSettings.rb:283: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.

r290104 and r290331 fixed the same problem for
GeneratePreferences.rb, but forgot GenerateSettings.rb.

  • Scripts/GenerateSettings.rb: Use the keyword argument for ERB.new for Ruby 2.6+.
7:42 PM Changeset in webkit [290717] by sbarati@apple.com
  • 12 edits in trunk/Source/JavaScriptCore

Add a DeferTraps scope
https://bugs.webkit.org/show_bug.cgi?id=237306
<rdar://83494949>

Reviewed by Mark Lam.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::jettison):
(JSC::CodeBlock::noticeIncomingCall):

  • bytecode/CodeBlock.h:
  • bytecode/RepatchInlines.h:

(JSC::linkFor):
(JSC::virtualForWithFunction):

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::executeProgram):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeModuleProgram):

  • interpreter/InterpreterInlines.h:

(JSC::Interpreter::execute):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setUpCall):

  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::installCode):

  • runtime/VMTraps.cpp:

(JSC::VMTraps::handleTraps):
(JSC::VMTraps::takeTopPriorityTrap):

  • runtime/VMTraps.h:

(JSC::VMTraps::needHandling const):
(JSC::VMTraps::hasTrapBit):
(JSC::VMTraps::setTrapBit):

  • runtime/VMTrapsInlines.h:

(JSC::DeferTraps::DeferTraps):
(JSC::DeferTraps::~DeferTraps):

6:11 PM Changeset in webkit [290716] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ iOS ] pointerevents/mouse/* 10 pointer event tests are constant timeouts or failures on iOS.
https://bugs.webkit.org/show_bug.cgi?id=237348

Unreviewed test gardening.

Patch by Matteo Flores <Matteo Flores> on 2022-03-01

  • platform/ios-wk2/TestExpectations:
6:03 PM Changeset in webkit [290715] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

Unnecessary copy of Vector of children IDs in AXIsolatedTree::updateChildren.
https://bugs.webkit.org/show_bug.cgi?id=237338
<rdar://problem/89633856>

Reviewed by Chris Fleizach.

Changed the copy of this Vector to a move.

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::updateChildren):

5:53 PM Changeset in webkit [290714] by Robert Jenner
  • 13 edits in trunk/Source/WebKit

Unreviewed, reverting r290588.

Patch r290588 caused ASAN build to fail on macOS

Reverted changeset:

"IPC_TESTING_API MessageArgumentDescriptions.cpp is slow to
compile"
https://bugs.webkit.org/show_bug.cgi?id=237195
https://commits.webkit.org/r290588

5:42 PM Changeset in webkit [290713] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix clean build

  • UnifiedSources-output.xcfilelist:
5:07 PM Changeset in webkit [290712] by Wenson Hsieh
  • 8 edits in trunk

Clipboard Paste dialog doesn't show on external monitors
https://bugs.webkit.org/show_bug.cgi?id=236395
rdar://88943577

Reviewed by Tim Horton.

Source/WebKit:

Fix the bug by aligning the way we generate synthetic mouse click NSEvents in WebKit2 macOS, when:

  1. Showing the standard web content context menu
  2. Showing the DOM paste menu
  3. Showing the context menu for PDFs

Critically, this makes AppKit choose the correct NSScreen when presenting the popup menu when showing the DOM
paste menu, if the last mouse down event is nil upon presenting the menu.

Covered by adding a debug assertion to verify that we aren't trying to present popup menus from a nil event
during DOM paste.

  • UIProcess/API/mac/WKWebViewTestingMac.mm:

(-[WKWebView _activeMenu]):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::requestDOMPasteAccess):

  • UIProcess/WebPageProxy.h:
  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::WebContextMenuProxyMac::showContextMenuWithItems):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::showPDFContextMenu):
(WebKit::WebPageProxy::activeContextMenu const):

Renamed from platformActiveContextMenu. The "platform" prefix in front of this method was unnecessary, since
this is only invoked from macOS-only code that expects an NSMenu anyways.

(WebKit::WebPageProxy::createSyntheticEventForContextMenu const):

Add a helper method to create a synthetic NSEvent at the given location that's suitable for presenting a context
menu; use this new helper in the three places described above.

(WebKit::WebPageProxy::platformActiveContextMenu const): Deleted.

Tools:

Adjust the swizzled implementation of -popUpContextMenu:withEvent:forView: to additionally verify that the
NSEvent we're presenting the menu with isn't nil.

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::swizzledPopUpContextMenu):

4:41 PM Changeset in webkit [290711] by jonlee@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening.

  • gpu-process/TestExpectations: r290542 fixed a number of crashing tests.
4:29 PM Changeset in webkit [290710] by jonlee@apple.com
  • 3 edits in trunk/LayoutTests

Unreviewed gardening.

  • gpu-process/TestExpectations:
  • platform/ios/TestExpectations: r290438 fixed a test failure.
4:27 PM Changeset in webkit [290709] by Alan Coon
  • 1 edit in branches/safari-613-branch/Source/WTF/Scripts/Preferences/WebPreferences.yaml

Apply patch. rdar://problem/89126114

4:27 PM Changeset in webkit [290708] by Alan Coon
  • 14 edits
    2 deletes in branches/safari-613-branch

Revert r289282. rdar://problem/88876661

4:20 PM Changeset in webkit [290707] by jonlee@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening.

  • gpu-process/TestExpectations: r290542 fixed a number of crashing tests.
3:59 PM Changeset in webkit [290706] by Alan Bujtas
  • 3 edits
    2 adds in trunk

REGRESSION(r285232) https://alvaromontoro.github.io/almond.css/demo/ looks wrong in Safari, ok in Chrome and Firefox
https://bugs.webkit.org/show_bug.cgi?id=237276
<rdar://problem/89566459>

Reviewed by Simon Fraser.

Source/WebCore:

r285232 introduced the isFixed() check as a resolvable preferred width type, but percent values are also resolvable as
block layout gets the horizontal constraint from the containing block chain (unlike the height percent values) -i.e. 'width: 50%' can be resolved during preferred width computation.

Test: fast/css-grid-layout/ascpect-ratio-with-percent-width.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const):

LayoutTests:

  • fast/css-grid-layout/ascpect-ratio-with-percent-width-expected.html: Added.
  • fast/css-grid-layout/ascpect-ratio-with-percent-width.html: Added.
3:51 PM Changeset in webkit [290705] by Fujii Hironori
  • 12 edits in trunk

WTF::SentinelLinkedList::iterator should have operator++ for range-for loop
https://bugs.webkit.org/show_bug.cgi?id=237265

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

SentinelLinkedList::iterator isn't a pointer of node now, it
should be deferenced before comparing with a pointer.

  • bytecode/Watchpoint.cpp:

(JSC::WatchpointSet::fireAllWatchpoints):

  • heap/HandleSet.cpp:

(JSC::HandleSet::visitStrongHandles):
(JSC::HandleSet::protectedGlobalObjectCount):

  • heap/HandleSet.h:

(JSC::HandleSet::forEachStrongHandle):

  • heap/IsoSubspace.cpp:

(JSC::IsoSubspace::tryAllocateFromLowerTier):

  • heap/SubspaceInlines.h:

(JSC::Subspace::forEachPreciseAllocation):

  • jsc.cpp:

(Workers::broadcast):

Source/WTF:

SentinelLinkedList had three problems.

  1. Even though it has begin() and end(), using SentinelLinkedList with range-for loop resulted in a broken node because iterator::operator++ didn't work as expected.
  2. If I used a SentinelLinkedList in a movable type, the sentinel pointer gets stale after moving the object. move-ctor should be deleted.
  3. It didn't have const_iterator.
  • wtf/OrderMaker.h:

(WTF::OrderMaker::iterator::iterator):
(WTF::OrderMaker::iterator::operator*):
(WTF::OrderMaker::iterator::operator++):
(WTF::OrderMaker::iterator::operator== const):

  • wtf/SentinelLinkedList.h:

(WTF::BasicRawSentinelNode::prev const):
(WTF::BasicRawSentinelNode::next const):
(WTF::SentinelLinkedList::BaseIterator::BaseIterator):
(WTF::SentinelLinkedList::BaseIterator::operator* const):
(WTF::SentinelLinkedList::BaseIterator::operator-> const):
(WTF::SentinelLinkedList::BaseIterator::operator++):
(WTF::SentinelLinkedList::BaseIterator::operator--):
(WTF::SentinelLinkedList::BaseIterator::operator== const):
(WTF::SentinelLinkedList::BaseIterator::operator!= const):
(WTF::SentinelLinkedList::forEach):
(WTF::RawNode>::begin):
(WTF::RawNode>::end):
(WTF::RawNode>::begin const):
(WTF::RawNode>::end const):
(WTF::BasicRawSentinelNode::prev): Deleted.
(WTF::BasicRawSentinelNode::next): Deleted.

Tools:

  • TestWebKitAPI/Tests/WTF/SentinelLinkedList.cpp:

(TestWebKitAPI::TEST):

3:50 PM Changeset in webkit [290704] by Alan Coon
  • 4 edits
    2 adds in branches/safari-613-branch

Cherry-pick r290087. rdar://problem/88713302

Source/ThirdParty/ANGLE:
Metal ANGLE: vertex array does not correctly observe contents of data buffers
https://bugs.webkit.org/show_bug.cgi?id=236733
<rdar://problem/88713302>
<rdar://problem/88499073>

Patch by Kyle Piddington <Kyle Piddington> on 2022-02-17
Reviewed by Dean Jackson.

Similar to previous bug (236427), we were not correctly observing changes to the
vertex buffer data. This caused us to miss rebinding vertex buffers
when data was updated without causing conversion

  • src/libANGLE/renderer/metal/VertexArrayMtl.h:
  • src/libANGLE/renderer/metal/VertexArrayMtl.mm: (rx::VertexArrayMtl::syncState): (rx::VertexArrayMtl::setupDraw): (rx::VertexArrayMtl::syncDirtyAttrib):

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

3:50 PM Changeset in webkit [290703] by Alan Coon
  • 3 edits in branches/safari-613-branch/Source/ThirdParty/ANGLE

Apply patch. rdar://problem/87136345

3:50 PM Changeset in webkit [290702] by Alan Coon
  • 6 edits in branches/safari-613-branch

Apply patch. rdar://problem/89009881

3:50 PM Changeset in webkit [290701] by Alan Coon
  • 8 edits
    2 adds in branches/safari-613-branch

Cherry-pick r290512. rdar://problem/86582214

[Tables] Incorrect table sizing when colgroup comes after tbody
https://bugs.webkit.org/show_bug.cgi?id=237205
<rdar://86582214>

Reviewed by Antti Koivisto.

Source/WebCore:

Let's use the colgroup for table sizing even when it comes after any thead, tbody, tfoot, and tr elements.
This makes WebKit match other rendering engines (see https://src.chromium.org/viewvc/blink?revision=159442&view=revision)

Test: fast/table/table-sizing-fails-when-colgroup-comes-after-content.html

  • rendering/RenderTable.cpp: (WebCore::RenderTable::firstColumn const):
  • rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::nextColumn const):

LayoutTests:

  • fast/table/table-sizing-fails-when-colgroup-comes-after-content-expected.html: Added.
  • fast/table/table-sizing-fails-when-colgroup-comes-after-content.html: Added.
  • platform/mac/tables/mozilla_expected_failures/dom/appendCol1-expected.txt: Progression.
  • platform/mac/tables/mozilla_expected_failures/dom/appendColGroup1-expected.txt: Progression.

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

3:49 PM Changeset in webkit [290700] by Alan Coon
  • 3 edits
    6 adds in branches/safari-613-branch

Cherry-pick r290156. rdar://problem/89154452

ServiceWorkerGlobalScope+PushAPI requires PushAPIEnabled
https://bugs.webkit.org/show_bug.cgi?id=236846

Patch by Sam Sneddon <Sam Sneddon> on 2022-02-18
Reviewed by Chris Dumez.

Source/WebCore:

Tests: http/wpt/push-api/onpush-disabled.html

http/wpt/push-api/onpush-enabled.html

  • Modules/push-api/ServiceWorkerGlobalScope+PushAPI.idl:

LayoutTests:

  • http/wpt/push-api/onpush-disabled-expected.txt: Added.
  • http/wpt/push-api/onpush-disabled.html: Added.
  • http/wpt/push-api/onpush-disabled.js: Added. (test):
  • http/wpt/push-api/onpush-enabled-expected.txt: Added.
  • http/wpt/push-api/onpush-enabled.html: Added.
  • http/wpt/push-api/onpush-enabled.js: Added. (test):

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

3:49 PM Changeset in webkit [290699] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290152. rdar://problem/88327814

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

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-18
Reviewed by Darin Adler.

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

  • Modules/fetch/FetchBodyConsumer.cpp: (WebCore::FetchBodyConsumer::resolveWithFormData):

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

3:49 PM Changeset in webkit [290698] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290109. rdar://problem/89072235

Crash under ScrollingCoordinatorMac::hasNodeWithAnimatedScrollChanged()
https://bugs.webkit.org/show_bug.cgi?id=236810
<rdar://89072235>

Reviewed by Dean Jackson.

Crash data suggests that r288933 didn't fix the crash entirely.

Although the code paths I can find appear to hold the lock, there may be an
opportunity for m_scrollingCoordinator to get nulled out after we null-check it
but before the copy for the main thread dispatch.

So make a RefPtr on the stack, null-check it, and then move it into the callback.

  • page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::reportSynchronousScrollingReasonsChanged): (WebCore::ThreadedScrollingTree::reportExposedUnfilledArea): (WebCore::ThreadedScrollingTree::currentSnapPointIndicesDidChange): (WebCore::ThreadedScrollingTree::handleWheelEventPhase): (WebCore::ThreadedScrollingTree::setActiveScrollSnapIndices): (WebCore::ThreadedScrollingTree::hasNodeWithAnimatedScrollChanged):

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

3:49 PM Changeset in webkit [290697] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r290066. rdar://problem/89072361

[macOS][WP] Add required syscall to sandbox
https://bugs.webkit.org/show_bug.cgi?id=236781
<rdar://89072361>

Reviewed by Chris Dumez.

Add required syscall to the WebContent process' sandbox on macOS. This patch also adds back a set of
syscalls that were removed in https://commits.webkit.org/r286778 for current and previous versions
of macOS. These syscalls will be denied going forward.

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

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

3:49 PM Changeset in webkit [290696] by Alan Coon
  • 3 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290054. rdar://problem/89093315

[macOS] Light appearance text fields are invisible in Increased Contrast mode
https://bugs.webkit.org/show_bug.cgi?id=236753
rdar://89093315

Reviewed by Wenson Hsieh.

In Big Sur, the artwork for many form controls, including text fields, was
changed at the system level. When painting native text fields, WebKit has
long used the "borders only" option to support painting custom background
colors. System-level changes in Big Sur broke the behavior of light appearance
"borders only" text fields in Increased Contrast mode.

Until the artwork is updated at the system-level, work around the issue
in WebKit by painting our own borders for text fields under the necessary
conditions.

No new tests, as tests that change system preferences are often unreliable,
and we do not have existing hooks to toggle Increased Contrast mode.

  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::shouldPaintCustomTextField const): (WebCore::RenderThemeMac::paintTextField):

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

3:49 PM Changeset in webkit [290695] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/ThirdParty/ANGLE

Cherry-pick r290011. rdar://problem/89024095

REGRESSION (iOS 15.4b3): Catastrophic (20x) performance regression in texImage2D from mp4 video
https://bugs.webkit.org/show_bug.cgi?id=236699

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

Disable the validation for IOSurface pixel formats.
We might pass non-public formats that do not have sensible IOSurfaceGetBytesPerElementOfPlane
to verify with this logic.

Will add test in bug 236759.

Previous bugs of the same:
EAGL:
Textures Fail to Render in WebGL from HLS Stream on iPhone 12 [iOS 14.2]
bug 218637, r273582, 234632@main
CGL:
REGRESSION(Safari 15, BigSur): Poor video texture upload performance with MacBook M1, ANGLE OpenGL backend
bug 232235, r286960, 245183@main

  • src/libANGLE/renderer/metal/IOSurfaceSurfaceMtl.mm: (rx::IOSurfaceSurfaceMtl::ValidateAttributes):

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

3:49 PM Changeset in webkit [290694] by Alan Coon
  • 18 edits in branches/safari-613-branch/Source

Cherry-pick r290005. rdar://problem/87596724

CrashTracer: com.apple.WebKit.WebContent at JavaScriptCore: bmalloc_allocate_impl_impl_slow
https://bugs.webkit.org/show_bug.cgi?id=236695
rdar://87596724

Reviewed by Jer Noble.

Source/WebCore:

When a new FragmentedSharedBuffer is received from the network process, it is proactively coalesced
into a SharedBuffer during each call to CachedResource::updateBuffer(). This causes a large number
of re-allocations and copies; essentially re-allocating each time the resource's buffer receives
one more chunk of data.
Instead we only flatten the data buffer once all data have been received.

Running speedtest.net with a gigabit link, we see a reduction of peak
memory use in the content process by about 40% (from 740MB to under 440MB of
physical memory, 1.7GB of memory allocation vs 535MB)

Covered by existing tests.

  • editing/ios/EditorIOS.mm: (WebCore::Editor::writeImageToPasteboard):
  • editing/mac/EditorMac.mm: (WebCore::Editor::writeImageToPasteboard):
  • loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::didFinishLoading):
  • loader/cache/CachedApplicationManifest.cpp: (WebCore::CachedApplicationManifest::finishLoading):
  • loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::finishLoading):
  • loader/cache/CachedFont.cpp: (WebCore::CachedFont::ensureCustomFontData):
  • loader/cache/CachedImage.cpp: (WebCore::CachedImage::updateImageData):
  • loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::calculateIncrementalDataChunk const): (WebCore::CachedRawResource::updateBuffer): (WebCore::CachedRawResource::finishLoading):
  • loader/cache/CachedRawResource.h:
  • loader/cache/CachedResource.h: (WebCore::CachedResource::resourceBuffer const):
  • loader/cache/CachedScript.cpp: (WebCore::CachedScript::script):
  • loader/cache/CachedXSLStyleSheet.cpp: (WebCore::CachedXSLStyleSheet::finishLoading):

Source/WebKit:

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::finishedLoading): Fly-by fix, the IPC::DataReference would reference a SharedBuffer going out of scope before it was sent over IPC.

Source/WebKitLegacy/mac:

  • WebView/WebHTMLView.mm: (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):

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

3:49 PM Changeset in webkit [290693] by Alan Coon
  • 3 edits
    2 adds in branches/safari-613-branch

Cherry-pick r289995. rdar://problem/87462825

REGRESSION(r285885) Unable to exit Trip Details in Amtrak app
https://bugs.webkit.org/show_bug.cgi?id=236732
<rdar://87462825>

Reviewed by Simon Fraser.

Source/WebCore:

Starting from r285885 an (effective)”overflow: clip” value is set on any block box with “contain: paint”.
It is supposed to ensure we don’t paint outside of the box’s border box (note that "contain: paint", as the name implies, should only affect painting).

However this effective value trickles in to layout affecting certain layout constraints.
In case of flex, it makes the flex layout think that the box is really a clipped box and it starts flexing it accordingly producing incorrect size.
What it means is that the minimum preferred size ends up being 0px because now with "let's clip all the overflow content"
0px is indeed the smallest size a box could take that does not produce overflow (while with the initial, “overflow: visible” value,
its minimum width would likely be > 0px -provided it has some content. Also note that setting “overflow: clip” on the box in the markup
(so it becomes an explicit clip value and not just an “effective” implicit clip through “contain: paint”) produces
the exact same rendering meaning that this effective property value does affect layout).

This is a partial revert of r285885 (focusing on where the flex algorithm consults with the flex items' overflow values).

Test: fast/flexbox/incorrect-min-size-with-paint-contain.html

  • rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::mainAxisOverflowForChild const): (WebCore::RenderFlexibleBox::crossAxisOverflowForChild const):

LayoutTests:

  • fast/flexbox/incorrect-min-size-with-paint-contain-expected.html: Added.
  • fast/flexbox/incorrect-min-size-with-paint-contain.html: Added.

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

3:49 PM Changeset in webkit [290692] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WTF

Cherry-pick r289974. rdar://problem/89008799

Unreviewed, reverting r286874.
https://bugs.webkit.org/show_bug.cgi?id=236734

Broke Apple Music pages which use the resolution media query

Reverted changeset:

"Enable the 'resolution' media query by default"
https://bugs.webkit.org/show_bug.cgi?id=78087
https://commits.webkit.org/r286874

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

3:49 PM Changeset in webkit [290691] by Alan Coon
  • 4 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r289942. rdar://problem/88827167

[Cocoa] Update audio session category before setting NowPlaying status
https://bugs.webkit.org/show_bug.cgi?id=236620
rdar://88827167

Reviewed by Jer Noble.

NowPlaying doesn't update correctly when the audio category changes from Ambient
to Playback after becoming active, so always set the category first.

Tested manually.

  • platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::clientWillBeginPlayback): Set "preparingToPlay" before calling sessionWillBeginPlayback so updateSessionState can tell that playback is about to begin.
  • platform/audio/PlatformMediaSession.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm: (WebCore::MediaSessionManagerCocoa::updateSessionState): Consider a session to potentially have audio if it is preparing to play.

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

3:49 PM Changeset in webkit [290690] by Alan Coon
  • 7 edits
    2 adds in branches/safari-613-branch

Cherry-pick r289693. rdar://problem/88264857

Suppress style invalidation when matching :checked
https://bugs.webkit.org/show_bug.cgi?id=235910

Patch by Rob Buis <rbuis@igalia.com> on 2022-02-12
Reviewed by Antti Koivisto.

Source/WebCore:

Suppress style invalidation when matching :checked for option elements.

Test: fast/selectors/has-select-option-crash.html

  • css/SelectorCheckerTestFunctions.h: (WebCore::isChecked):
  • html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::selected const): (WebCore::HTMLOptionElement::setSelectedState):
  • html/HTMLOptionElement.h:
  • html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::updateListItemSelectedStates): (WebCore::HTMLSelectElement::recalcListItems const):
  • html/HTMLSelectElement.h:

LayoutTests:

  • fast/selectors/has-select-option-crash-expected.txt: Added.
  • fast/selectors/has-select-option-crash.html: Added.

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

3:49 PM Changeset in webkit [290689] by Alan Coon
  • 6 edits
    2 adds in branches/safari-613-branch

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

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

Reviewed by Cameron McCormack.

LayoutTests/imported/w3c:

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

Source/WebCore:

Test: fast/selectors/malformed-has.html

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

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

LayoutTests:

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

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

3:49 PM Changeset in webkit [290688] by Alan Coon
  • 4 edits in branches/safari-613-branch

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

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

Reviewed by Brent Fulgham.

Source/WebCore:

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

API test URLSchemeHandler.Ranges was updated.

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

Tools:

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

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

3:49 PM Changeset in webkit [290687] by Alan Coon
  • 4 edits in branches/safari-613-branch/Source/WebCore

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

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

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

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

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

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

3:49 PM Changeset in webkit [290686] by Alan Coon
  • 14 edits
    2 adds in branches/safari-613-branch

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

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

Reviewed by Mark Lam.

Source/WebCore:

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

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

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

LayoutTests:

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

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

3:48 PM Changeset in webkit [290685] by Alan Coon
  • 3 edits
    2 adds in branches/safari-613-branch

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

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

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

LayoutTests/imported/w3c:

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

Source/WebCore:

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

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

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

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

3:48 PM Changeset in webkit [290684] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

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

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

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

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

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

3:48 PM Changeset in webkit [290683] by Alan Coon
  • 6 edits in branches/safari-613-branch

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

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

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

Source/WebCore:

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

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

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

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

LayoutTests:

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

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

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

3:47 PM Changeset in webkit [290682] by Fujii Hironori
  • 2 edits in trunk/Tools

[WinCairo][pywebsocket3] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 640: character maps to <undefined>
https://bugs.webkit.org/show_bug.cgi?id=237339

Reviewed by Jonathan Bedard.

After r290580 started to use pywebsocket3 and Python 3, Windows
Python couldn't start WebSocket server due to UnicodeDecodeError.

  • Scripts/webkitpy/port/win.py:

(WinPort.setup_environ_for_server): Added PYTHONUTF8 environment variable.

3:46 PM WebKitGTK/2.36.x edited by Michael Catanzaro
(diff)
3:35 PM Changeset in webkit [290681] by commit-queue@webkit.org
  • 13 edits in trunk/Source

Misc compiler warnings, late Feb 2022 edition
https://bugs.webkit.org/show_bug.cgi?id=237275

Patch by Michael Catanzaro <Michael Catanzaro> on 2022-03-01
Reviewed by Adrian Perez de Castro.

Source/JavaScriptCore:

Suppress suspected false-positive -Wstringop-overflow and -Wformat-overflow warnings. Also,
remove an unused variable.

  • API/tests/MultithreadedMultiVMExecutionTest.cpp:

(startMultithreadedMultiVMExecutionTest):

  • ftl/FTLLowerDFGToB3.cpp:

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

  • ftl/FTLOSRExit.cpp:

(JSC::FTL::OSRExitDescriptor::prepareOSRExitHandle):

  • yarr/YarrJIT.cpp:

Source/WebCore:

Remove a redundant move. Sprinkle RELEASE_ASSERT_NOT_REACHED() as required to avoid
-Wreturn-type warnings.

  • Modules/push-api/PushDatabase.cpp:

(WebCore::openAndMigrateDatabaseImpl):

  • style/ContainerQueryEvaluator.cpp:

(WebCore::Style::ContainerQueryEvaluator::evaluateCondition const):
(WebCore::Style::ContainerQueryEvaluator::evaluateSizeFeature const):

  • style/ContainerQueryEvaluator.h:

(WebCore::Style::operator!):

  • style/StyleScope.cpp:

(WebCore::Style::Scope::updateQueryContainerState):

Source/WebKit:

Delete an unused function. Remove a redundant move.

  • Shared/AuxiliaryProcess.cpp:

(WebKit::applySandboxProfileForDaemon): Deleted.

  • Shared/WebFoundTextRange.cpp:

(WebKit::WebFoundTextRange::decode):

3:30 PM Changeset in webkit [290680] by achristensen@apple.com
  • 4 edits in trunk/Source/WebKit

Prepare to add more files to WebKit
https://bugs.webkit.org/show_bug.cgi?id=237343

Reviewed by Chris Dumez.

This fixes the build after bug 237234, and it's unrelated so I pulled it into a different patch.

  • Scripts/generate-unified-sources.sh:
  • UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:
  • WebKit.xcodeproj/project.pbxproj:
3:16 PM Changeset in webkit [290679] by Said Abou-Hallawa
  • 32 edits
    2 adds in trunk

Source/WebCore:
[macOS][REGRESSION] (r289518): Form controls are scaled twice on Retina display
https://bugs.webkit.org/show_bug.cgi?id=237128
rdar://89064642

Reviewed by Darin Adler.

Using the name GraphicsContext::createImageBuffer() for different behaviors
was a mistake in r289518. To clean this up, the createImageBuffer() version
which scales the GraphicsContext of the ImageBuffer will be renamed
createScaledImageBuffer(). and the existing createCompatibleImageBuffer()
will be renamed createAlignedImageBuffer(). So we will have these three
methods in GraphicsContext:

1) createImageBuffer(): The default behavior of this method is to create

an ImageBuffer similar to the underlying ImageBuffer of GraphicsContext.
But it gives ability to change the renderingMode and the renderingMethod.
It can be forced to create a non-accelerated local ImageBuffer for example.

The caller of this method usually uses a framework to draw some custom
drawing and it just needs a scratch buffer to be drawn in the place of
a render object. The caller does not require any transformation to be
applied to the GraphicsContext of the ImageBuffer before starting its
custom drawing. Drawing the form controls using AppKit is an example
of such case.

2) createScaledImageBuffer(): This is similar to createImageBuffer() but

it always creates the ImageBuffer with resolutionScale = 1 so it has
to scale the size by the scaleFactor before calling createImageBuffer().
It also scales the GraphicsContext of the created ImageBuffer with the
scaleFactor and it translates its coordinates origin for the FloatRect
version. It also handles the clamping if needed.

This method is suitable for cases when the overall scaleFatcor
(device ScaleFactor + clamping ScaleFactor) has be known to the caller
in advance. No clamping will be required in this case. SVG filter,
masker, clipper and gradient are the callers to this function.

3) createAlignedImageBuffer(): This is similar to createScaledImageBuffer()

but it does not take a scaling factor argument. It inherits it from
the GraphicsContext.

Usually the purpose of this method is to transfer the drawing from a
layer to a scratch ImageBuffer temporarily then draw the scratch
ImageBuffer in the place of the original drawing. Drawing a PDFDocument
image, for example, requires using this method.

To fix this bug:

Form controls have to use the first version of createImageBuffer() which
still has the same name instead of using the second version which will
be renamed createScaledImageBuffer().

Another cleaning is to pass RenderingMethod as an std::optional argument
the three methods. This means we do not need the value "Default" since
passing std::nullopt will have the same meaning.

Test: fast/hidpi/hidpi-form-controls-drawing-size.html

  • html/CustomPaintCanvas.cpp:

(WebCore::CustomPaintCanvas::replayDisplayList const):

  • html/CustomPaintImage.cpp:

(WebCore::CustomPaintImage::drawPattern):

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::drawImage):
(WebCore::CanvasRenderingContext2DBase::drawTextUnchecked):

  • platform/cocoa/ThemeCocoa.mm:

(WebCore::drawApplePayButton):

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::drawPattern):

  • platform/graphics/GradientImage.cpp:

(WebCore::GradientImage::drawPattern):

  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::createImageBuffer const):
(WebCore::GraphicsContext::createScaledImageBuffer const):
(WebCore::GraphicsContext::createAlignedImageBuffer const):
(WebCore::GraphicsContext::createCompatibleImageBuffer const): Deleted.

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::createScaledImageBuffer):
(WebCore::GraphicsContext::createImageBuffer): Deleted.

  • platform/graphics/ImageBuffer.cpp:

(WebCore::ImageBuffer::clone const):

  • platform/graphics/NamedImageGeneratedImage.cpp:

(WebCore::NamedImageGeneratedImage::drawPattern):

  • platform/graphics/cg/PDFDocumentImage.cpp:

(WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
(WebCore::PDFDocumentImage::draw):

  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:

(WebCore::DrawGlyphsRecorder::drawOTSVGRun):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::createImageBuffer const):

  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/mac/ThemeMac.mm:

(WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended):

  • rendering/RenderLayerBacking.cpp:

(WebCore::patternForDescription):

  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::allocateBackingStoreIfNeeded):

  • rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::paintApplePayButton):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::paintListButtonForInput):
(WebCore::RenderThemeMac::paintProgressBar):

  • rendering/svg/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::applyClippingToContext):

  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::applyResource):

  • rendering/svg/RenderSVGResourceGradient.cpp:

(WebCore::createMaskAndSwapContextForTextGradient):

  • rendering/svg/RenderSVGResourceMasker.cpp:

(WebCore::RenderSVGResourceMasker::applyResource):

  • rendering/svg/RenderSVGResourcePattern.cpp:

(WebCore::RenderSVGResourcePattern::createTileImage const):

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::bufferForeground):

Source/WebKit:
[macOS][REGRESSION] (rr289518): Form controls are scaled twice on Retina display
https://bugs.webkit.org/show_bug.cgi?id=237128
rdar://89064642

Reviewed by Darin Adler.

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:

(WebKit::RemoteDisplayListRecorderProxy::createImageBuffer const):
(WebKit::RemoteDisplayListRecorderProxy::createAlignedImageBuffer const):
(WebKit::RemoteDisplayListRecorderProxy::createCompatibleImageBuffer const): Deleted.

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

LayoutTests:
[macOS][REGRESSION] (rr289518): Form controls are scaled twice on Retina display
https://bugs.webkit.org/show_bug.cgi?id=237128
rdar://89064642

Reviewed by Darin Adler.

  • fast/hidpi/hidpi-form-controls-drawing-size-expected.html: Added.
  • fast/hidpi/hidpi-form-controls-drawing-size.html: Added.
3:07 PM Changeset in webkit [290678] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ Win ] 4X imported/mozilla/svg/blend(layout-tests) are constant Image Only Failures
https://bugs.webkit.org/show_bug.cgi?id=237344

Unreviewed test gardening. Skipping, for Windows instead of adding an expectation.

  • platform/win/TestExpectations:
3:03 PM Changeset in webkit [290677] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ Win ] 4X imported/mozilla/svg/blend(layout-tests) are constant Image Only Failures
https://bugs.webkit.org/show_bug.cgi?id=237344

Unreviewed test gardening.

  • platform/win/TestExpectations:
2:27 PM Changeset in webkit [290676] by eric.carlson@apple.com
  • 7 edits
    4 adds in trunk

[Cocoa] HLS stream currentTime sometimes jumps backwards
https://bugs.webkit.org/show_bug.cgi?id=235087
rdar://83831093

Reviewed by Dean Jackson.

Source/WebCore:

Test: http/tests/media/hls/hls-non-zero-start-time.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by: pass log identifier
to lambda so the method name will be logged correctly.
(WebCore::HTMLMediaElement::currentMediaTime const): Remove LOG_CACHED_TIME_WARNINGS
build flag, always log time drift warnings when log level is DEBUG.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Log when periodic
time observer is passed unexpected values.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Use
NSKeyValueObservingOptionInitial KVO option for "@duration" property because we
sometimes don't get a duration changed event for HLS streams, so m_cachedDuration
remains invalid.
(WebCore::MediaPlayerPrivateAVFoundationObjC::currentMediaTimeDidChange const):
Drive-by: fix use-after-move.

Source/WebKit:

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::currentTimeChanged): Always notify player when
time jumps backwards.

LayoutTests:

  • http/tests/media/hls/hls-non-zero-start-time-expected.txt: Added.
  • http/tests/media/hls/hls-non-zero-start-time.html: Added.
  • http/tests/media/resources/hls/bip-bop-live.m3u8: Added.
  • http/tests/media/resources/hls/bipbop/start-offset.m3u8: Added.
  • http/tests/media/resources/hls/bipbop/start-offset.ts: Added.
2:06 PM Changeset in webkit [290675] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

Remove release assert when UI process is blocking IOSurface IOKit access
https://bugs.webkit.org/show_bug.cgi?id=237278
<rdar://problem/89585043>

Unreviewed, address review comments.

Log error instead of creating CrashTracer reports.

  • platform/graphics/cocoa/IOSurface.mm:

(WebCore::IOSurface::bytesPerRowAlignment):

1:57 PM Changeset in webkit [290674] by Matt Woodrow
  • 4 edits in trunk

Use static position relative to parent for abs-pos items within nested grids.
https://bugs.webkit.org/show_bug.cgi?id=236957

Reviewed by Dean Jackson.

Source/WebCore:

In the case where an absolutely positioned element's parent and containing block
are both grid container, but they are not the same grid container, then the static position
of the abs-pos item should be relative to the parent, not the CB.

Existing subgrid tests marked as passing.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::setLogicalOffsetForChild const):

LayoutTests:

Existing subgrid tests marked as passing.

1:44 PM Changeset in webkit [290673] by Andres Gonzalez
  • 4 edits in trunk

Make accessibility/aria-hidden-false-works-in-subtrees.html async to pass in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=237051
<rdar://problem/89312156>

Reviewed by Chris Fleizach.

Tools:

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:

(WTR::AccessibilityController::accessibleElementById):
Convert the JSStringRef to NSString on the main thread and capture the
NSString to be used on the AX secondary thread. This may be safer since
JSStringRefs are supposed to be used on the main thread.

LayoutTests:

  • accessibility/aria-hidden-false-works-in-subtrees.html:

Made both the main script and the iframe onload function async to pass
in isolated tree mode.

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

[IFC][Integration] Add InlineIterator::Box::visualRect
https://bugs.webkit.org/show_bug.cgi?id=237309

Reviewed by Antti Koivisto.

This is the final, flipped version of the box rect.

  • layout/integration/InlineIteratorBox.h:

(WebCore::InlineIterator::Box::visualRect const):

  • rendering/InlineBoxPainter.cpp:

(WebCore::InlineBoxPainter::paintMask):
(WebCore::InlineBoxPainter::paintDecorations):

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::computePaintRect):

1:19 PM Changeset in webkit [290671] by Patrick Angle
  • 5 edits in trunk/Source/WebCore

Web app fails only when dev tools is open
https://bugs.webkit.org/show_bug.cgi?id=235017

Reviewed by Devin Rousso.

Using the ScriptExecutionContext from event.target()->scriptExecutionContext() can result the either having a
different script context from the one used when calling willHandleEvent, or the event target's context could be
nullptr. This can occur when handling the event in EventTarget::innerInvokeEventListeners results in a
context change for the event's target, like a MessagePort that has been disentangled, which sets the script
execution context to nullptr. Because we only need the script execution context to get the correct injected
script, and the correct injected script for the action below will always be the same injected script used in
willHandleEvent, we ignore the current script execution context of the event's target and use the context the
event's target had when it began invoking event listeners.

This change protects us both from the reported crash, as well as leaving an injected script in a bad state
because we did not call setEventValue and clearEventValue on matching injected scripts for a single event.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::willHandleEventImpl):
(WebCore::InspectorInstrumentation::didHandleEventImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::willHandleEvent):
(WebCore::InspectorInstrumentation::didHandleEvent):

  • inspector/agents/InspectorDOMDebuggerAgent.cpp:

(WebCore::InspectorDOMDebuggerAgent::willHandleEvent):
(WebCore::InspectorDOMDebuggerAgent::didHandleEvent):

  • inspector/agents/InspectorDOMDebuggerAgent.h:
1:02 PM Changeset in webkit [290670] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ Monterey wk2 ] http/tests/media/video-webm-stall.html is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=236788

Unreviewed test gardening.

Patch by Matteo Flores <Matteo Flores> on 2022-03-01

  • platform/mac-wk2/TestExpectations:
12:57 PM Changeset in webkit [290669] by sihui_liu@apple.com
  • 3 edits in trunk/Source/WebKit

Move StorageBucket function definitions outside the class definition
https://bugs.webkit.org/show_bug.cgi?id=237300

Reviewed by Chris Dumez.

  • NetworkProcess/storage/NetworkStorageManager.h:
  • NetworkProcess/storage/OriginStorageManager.cpp:

(WebKit::OriginStorageManager::StorageBucket::mode const):
(WebKit::OriginStorageManager::StorageBucket::setMode):
(WebKit::OriginStorageManager::StorageBucket::StorageBucket):
(WebKit::OriginStorageManager::StorageBucket::connectionClosed):
(WebKit::OriginStorageManager::StorageBucket::toStorageIdentifier const):
(WebKit::OriginStorageManager::StorageBucket::typeStoragePath const):
(WebKit::OriginStorageManager::StorageBucket::fileSystemStorageManager):
(WebKit::OriginStorageManager::StorageBucket::localStorageManager):
(WebKit::OriginStorageManager::StorageBucket::existingLocalStorageManager):
(WebKit::OriginStorageManager::StorageBucket::sessionStorageManager):
(WebKit::OriginStorageManager::StorageBucket::existingSessionStorageManager):
(WebKit::OriginStorageManager::StorageBucket::idbStorageManager):
(WebKit::OriginStorageManager::StorageBucket::existingIDBStorageManager):
(WebKit::OriginStorageManager::StorageBucket::isActive const):
(WebKit::OriginStorageManager::StorageBucket::isEmpty):
(WebKit::OriginStorageManager::StorageBucket::fetchDataTypesInList):
(WebKit::OriginStorageManager::StorageBucket::fetchDataTypesInListFromMemory):
(WebKit::OriginStorageManager::StorageBucket::fetchDataTypesInListFromDisk):
(WebKit::OriginStorageManager::StorageBucket::deleteData):
(WebKit::OriginStorageManager::StorageBucket::deleteFileSystemStorageData):
(WebKit::OriginStorageManager::StorageBucket::deleteLocalStorageData):
(WebKit::OriginStorageManager::StorageBucket::deleteSessionStorageData):
(WebKit::OriginStorageManager::StorageBucket::deleteIDBStorageData):
(WebKit::OriginStorageManager::StorageBucket::moveData):
(WebKit::OriginStorageManager::StorageBucket::resolvedLocalStoragePath):
(WebKit::OriginStorageManager::StorageBucket::resolvedIDBStoragePath):
(WebKit::OriginStorageManager::StorageBucket::toWebsiteDataType): Deleted.
(WebKit::OriginStorageManager::StorageBucket::toStorageIdentifier): Deleted.

12:08 PM Changeset in webkit [290668] by Russell Epstein
  • 1 copy in tags/Safari-614.1.3.7

Tag Safari-614.1.3.7.

12:01 PM Changeset in webkit [290667] by Martin Robinson
  • 19 edits in trunk

When interpolating between transform lists partial prefix matches should not use matrix interpolation
https://bugs.webkit.org/show_bug.cgi?id=235757
<rdar://problem/88477922>

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt: Mark subtests as passing.
  • web-platform-tests/css/css-transforms/animation/transform-composition-expected.txt: Ditto.
  • web-platform-tests/css/css-transforms/animation/transform-interpolation-004-expected.txt: Ditto.

Source/WebCore:

No new tests. This is covered by existing WPT tests.

When interpolation between keyframes in transform animations, interpolate prefixes of
compatible transform functions directly. For instance if there are three keyframes:

  1. transform: rotateX(...) translateY(...) skew(...)
  2. transform: rotateY(...) translateY(...)
  3. transform: rotateZ(...) translateZ(...) matrix3d(...)

There will be a directly interpolated rotation animation, a directly interpolated
translation animation, and finally a matrix animation for the remaining functions.
This is important for preserving transforms (such as full rotations) that are lost
during matrix decompose and recompose operations.

This change adds a new helper class SharedPrimitivesPrefix which is used to calculate
the prefix of shared primitives that are shared between keyframes.

Currently, the Core Animation backend only supports animation transformation primitives
across the entire animation, so shared primitive prefixes must span the entire animation
if an animation is accelerated. In the case that an animation is rendered in software,
this prefix can simply be between the current next and previous keyframes.

TransformOperations::blend is extended to blend any two TransformationOperations, which
makes it the only blend function necessary for software animations, computed CSS values,
and for the Nicosia backend, simplifying the interpolation code path.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):

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

(WebCore::KeyframeEffect::checkForMatchingTransformFunctionLists):
(WebCore::KeyframeEffect::computeExtentOfTransformAnimation const):

  • animation/KeyframeEffect.h:
  • platform/graphics/GraphicsLayer.cpp:

(WebCore::operationsAt): Deleted.
(WebCore::GraphicsLayer::getSharedPrimitivesForTransformKeyframes): Deleted.

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
(WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/nicosia/NicosiaAnimation.cpp:

(Nicosia::applyTransformAnimation):
(Nicosia::Animation::Animation):
(Nicosia::Animation::operator=):
(Nicosia::Animation::applyInternal):

  • platform/graphics/nicosia/NicosiaAnimation.h:
  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::addAnimation):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::addAnimation):

  • platform/graphics/transforms/TransformOperations.cpp:

(WebCore::SharedPrimitivesPrefix::update):
(WebCore::TransformOperations::blend const):
(WebCore::TransformOperations::createBlendedMatrixOperationFromOperationsSuffix const):
(WebCore::TransformOperations::operationsMatch const): Deleted.
(WebCore::TransformOperations::updateSharedPrimitives const): Deleted.
(WebCore::TransformOperations::blendByMatchingOperations const): Deleted.
(WebCore::TransformOperations::blendByUsingMatrixInterpolation const): Deleted.

  • platform/graphics/transforms/TransformOperations.h:

(WebCore::TransformOperations::apply const):
(WebCore::SharedPrimitivesPrefix::hadIncompatibleTransformFunctions):
(WebCore::SharedPrimitivesPrefix::primitives):

11:53 AM Changeset in webkit [290666] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ Monterey ] webaudio/decode-audio-data-webm-vorbis.html is constantly failing
https://bugs.webkit.org/show_bug.cgi?id=236328

Unreviewed test gardening.

Patch by Matteo Flores <Matteo Flores> on 2022-03-01

  • platform/mac-wk2/TestExpectations:
11:42 AM Changeset in webkit [290665] by Robert Jenner
  • 2 edits in trunk/LayoutTests

WindowServer returned not alive with context:,unresponsive work processor(s)
<rdar://86037417>

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
11:38 AM Changeset in webkit [290664] by ysuzuki@apple.com
  • 15 edits in trunk/PerformanceTests

Fix Speedometer's setTimeout throttling issue
https://bugs.webkit.org/show_bug.cgi?id=237303
rdar://89444976

Reviewed by Geoffrey Garen.

Speedometer is driving each test via setTimeout. Because we are using setTimeout to
measure async time in each subtest of Speedometer, our measurement included 4ms
throttle introduced due to nested setTimeout. This is happening in the test
harness (not test itself), and the intention of this test harness is not measuring
the throttle time. In this patch, we fix this nesting level propagation by inserting
window.requestAnimationFrame for each test run and BenchmarkRunner.prototype.waitForElement
so that we can reset nesting level count of setTimeout, which prevents the rendering
engine to insert 4ms throttle.

Since this affects on the score of async measurement, we bump the version number from 2.0 to 2.1

  • Speedometer/InteractiveRunner.html:
  • Speedometer/index.html:
  • Speedometer/resources/benchmark-runner.js:

(resolveIfReady):
(BenchmarkRunner.prototype.waitForElement):
(BenchmarkRunner.prototype._runTest):

  • Speedometer/resources/todomvc/architecture-examples/angular/README.md:
  • Speedometer/resources/todomvc/architecture-examples/angularjs/readme.md:
  • Speedometer/resources/todomvc/architecture-examples/backbone/readme.md:
  • Speedometer/resources/todomvc/architecture-examples/emberjs/README.md:
  • Speedometer/resources/todomvc/architecture-examples/preact/README.md:
  • Speedometer/resources/todomvc/architecture-examples/react-redux/README.md:
  • Speedometer/resources/todomvc/architecture-examples/react/README.md:
  • Speedometer/resources/todomvc/architecture-examples/vuejs-cli/README.md:
  • Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/README.md:
  • Speedometer/resources/todomvc/vanilla-examples/es2015/README.md:
  • Speedometer/resources/todomvc/vanilla-examples/vanillajs/readme.md:
11:34 AM Changeset in webkit [290663] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Unreviewed, reverting r290619.
https://bugs.webkit.org/show_bug.cgi?id=237337

Introduced build failure

Reverted changeset:

"[iOS] Weak link AVPictureInPictureController"
https://bugs.webkit.org/show_bug.cgi?id=237227
https://commits.webkit.org/r290619

11:29 AM Changeset in webkit [290662] by graouts@webkit.org
  • 5 edits in trunk

[web-animations] ::placeholder should not be a valid pseudo-element for a KeyframeEffect target
https://bugs.webkit.org/show_bug.cgi?id=237334

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/target-expected.txt:

Source/WebCore:

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::setPseudoElement):

11:07 AM Changeset in webkit [290661] by Jonathan Bedard
  • 5 edits in trunk/Tools

[git-webkit] Gate information URL on initial setup
https://bugs.webkit.org/show_bug.cgi?id=237325
<rdar://problem/89620175>

Reviewed by Aakash Jain.

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

(Setup.main): Offer to open documentation URL if repository has not been setup.

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

(TestSetup.test_github):

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

11:06 AM Changeset in webkit [290660] by youenn@apple.com
  • 2 edits in trunk/Source/WTF

Enable WebRTCRemoteVideoFrameEnabled by default on Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=237201

Reviewed by Eric Carlson.

  • Scripts/Preferences/WebPreferencesInternal.yaml:
10:43 AM Changeset in webkit [290659] by commit-queue@webkit.org
  • 17 edits in trunk/Source

If the main resource was loaded over private relay, load all sub resources over private relay
https://bugs.webkit.org/show_bug.cgi?id=237296

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-01
Reviewed by Geoffrey Garen.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

I manually verified that this fixes rdar://88965550 when using the CFNetwork change in the related bug.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::createSocketChannel):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::transferToNewWebProcess):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::createWebSocketTask):

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

(WebKit::NetworkSocketChannel::create):
(WebKit::NetworkSocketChannel::NetworkSocketChannel):

  • NetworkProcess/NetworkSocketChannel.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
(WebKit::NetworkSessionCocoa::createWebSocketTask):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):

  • WebProcess/Network/WebSocketChannel.cpp:

(WebKit::WebSocketChannel::connect):

10:34 AM Changeset in webkit [290658] by youenn@apple.com
  • 4 edits in trunk/LayoutTests

fast/mediastream/getUserMedia-to-canvas-1.html and fast/mediastream/getUserMedia-to-canvas-2.html are failing on MacOS when remote video frame flag is enabled
https://bugs.webkit.org/show_bug.cgi?id=237042
<rdar://problem/89298601>

Reviewed by Eric Carlson.

Video element videoWidth/videoHeight are updated when track settings are changed,
and not when video frames being received.

This does not guarantee that videoWidth/videoHeight (main thread) are fully in sync
with the actual video frames (background thread) when there is a change of size.

We might be able to tighten this in MediaPlayerPrivateMediaStreamAVFObjC by only resorting on video frames.
In the meantime, we update the test to set the orientation before creating the source.
This makes sure the video frames have the expected size and rotation.

  • fast/mediastream/getUserMedia-to-canvas-1.html:
  • fast/mediastream/getUserMedia-to-canvas-2.html:
  • fast/mediastream/resources/getUserMedia-to-canvas.js:
10:34 AM Changeset in webkit [290657] by Russell Epstein
  • 9 edits in branches/safari-614.1.3-branch/Source

Versioning.

WebKit-7614.1.3.7

10:22 AM Changeset in webkit [290656] by commit-queue@webkit.org
  • 8 edits in trunk/Source

[AppleWin] Start using Visual Studio 2022
https://bugs.webkit.org/show_bug.cgi?id=234933

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-01
Reviewed by Maciej Stachowiak.

Source/JavaScriptCore:

Source/WebCore:

  • WebCore.vcxproj/WebCore.proj:

Source/WebKitLegacy:

  • WebKitLegacy.vcxproj/WebKitLegacy.proj:

Source/WTF:

  • WTF.vcxproj/WTF.proj:
10:14 AM Changeset in webkit [290655] by graouts@webkit.org
  • 6 edits in trunk

[web-animations] add support for passing an optional timeline to Element.animate()
https://bugs.webkit.org/show_bug.cgi?id=237312

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:

Source/WebCore:

  • animation/KeyframeAnimationOptions.h:
  • animation/KeyframeAnimationOptions.idl:
  • dom/Element.cpp:

(WebCore::Element::animate):

10:12 AM Changeset in webkit [290654] by jer.noble@apple.com
  • 6 edits
    3 adds in trunk/Source/WebKit

[Cocoa] Allow logging to be configured by NSDefaults (without regressing launch time)
https://bugs.webkit.org/show_bug.cgi?id=237183

Reviewed by Darin Adler.

In r220780, code was added to WebProcessPoolCocoa to explicitly pass the results of a NSUserDefaults
to newly created WebContent processes to determine log channel levels. Later, in r232158, NSUserDefaults
were removed from the default logLevelString() implementations in WTF, WebCore, and WebKit to improve
process launch time performance. In r279796, the same technique sued in WebProcessPoolCocoa was added
to GPUProcessProxyCocoa to pass those log level strings to the GPUProcess. And then in r286484, all the
uses of NSUserDefaults were removed from WebProcessPoolCocoa and GPUProcessProxyCocoa were removed,
removing the ability to increase the log channel levels at runtime through NSUserDefualts.

Add back in the ability to define log levels for the UIProcess and all AuxiliaryProcesses without
regressing launch time by only checking the NSUserDefault once, only in the UIProcess, storing the result
in a static variable, and passing the results of that check to all AuxiliaryProcesses at creation time.

  • UIProcess/AuxiliaryProcessProxy.cpp:

(WebKit::AuxiliaryProcessProxy::auxiliaryProcessParameters):

  • UIProcess/Cocoa/UIProcessLogInitializationCocoa.mm: Added.

(WebKit::UIProcess::wtfLogLevelString):
(WebKit::UIProcess::webCoreLogLevelString):
(WebKit::UIProcess::webKitLogLevelString):

  • UIProcess/UIProcessLogInitialization.cpp: Added.

(WebKit::UIProcess::initializeLoggingIfNecessary):
(WebKit::UIProcess::wtfLogLevelString):
(WebKit::UIProcess::webCoreLogLevelString):
(WebKit::UIProcess::webKitLogLevelString):

  • UIProcess/UIProcessLogInitialization.h: Added.
  • UIProcess/WebProcessPool.cpp:
9:56 AM Changeset in webkit [290653] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

Annotate LibWebRTC with thread safety macros
https://bugs.webkit.org/show_bug.cgi?id=237321

Reviewed by Eric Carlson.

LibWebRTCCodecs works with 3 threads and we add macros to make it clear where each thread is used:

  • the main thread to get its GPU process connection (isMainRunLoop()).
  • the libwebrtc thread where it gets orders to decode/encode frames (!isMainRunLoop())
  • the work queue thread where it is receiving encode/decode results (assertIsCurrent(workQueue())).

Rename m_encodersLock to m_encodersConnectionLock to make it clear this is about locking the encoder connection and not the encoder map.
Both decoder and encoder maps should only be touched on the workQueue thread.

Introduce encoderConnection/setEncoderConnection and decoderConnection/setDecoderConnection routines.
These methods are guarded by corresponding locks.
This requires adding some additional locks when accessing connections in workQueue thread.
Fix a potential issue when creating the encoder: we lock the encoderConnection lock earlier when setting the connection.

Covered by existing tests.

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:

(WebKit::LibWebRTCCodecs::gpuProcessConnectionMayNoLongerBeNeeded):
(WebKit::LibWebRTCCodecs::createDecoder):
(WebKit::LibWebRTCCodecs::releaseDecoder):
(WebKit::LibWebRTCCodecs::decodeFrame):
(WebKit::LibWebRTCCodecs::registerDecodeFrameCallback):
(WebKit::LibWebRTCCodecs::failedDecoding):
(WebKit::LibWebRTCCodecs::completedDecoding):
(WebKit::LibWebRTCCodecs::completedDecodingCV):
(WebKit::LibWebRTCCodecs::createEncoder):
(WebKit::LibWebRTCCodecs::releaseEncoder):
(WebKit::LibWebRTCCodecs::initializeEncoder):
(WebKit::LibWebRTCCodecs::copySharedVideoFrame):
(WebKit::LibWebRTCCodecs::encodeFrame):
(WebKit::LibWebRTCCodecs::registerEncodeFrameCallback):
(WebKit::LibWebRTCCodecs::setEncodeRates):
(WebKit::LibWebRTCCodecs::completedEncoding):
(WebKit::LibWebRTCCodecs::gpuProcessConnectionDidClose):
(WebKit::LibWebRTCCodecs::encoderConnection):
(WebKit::LibWebRTCCodecs::setEncoderConnection):
(WebKit::LibWebRTCCodecs::decoderConnection):
(WebKit::LibWebRTCCodecs::setDecoderConnection):
(WebKit::copySharedVideoFrame): Deleted.

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:

(WebKit::LibWebRTCCodecs::workQueue const):

9:40 AM Changeset in webkit [290652] by J Pascoe
  • 2 edits in trunk/Tools

REGRESSION(r290539-r290538): [ iOS ] 3 TestWebKitAPI.WebAuthenticationPanel.* tests are constantly failing/crashing.
https://bugs.webkit.org/show_bug.cgi?id=237285
rdar://problem/89579460

Reviewed by Brent Fulgham.

Remove obsolete API test and ensure another has clean state.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

9:17 AM Changeset in webkit [290651] by Jonathan Bedard
  • 1 edit
    200 deletes in trunk/LayoutTests/imported/w3c

[Python 3] Delete old pywebsocket
https://bugs.webkit.org/show_bug.cgi?id=237274
<rdar://problem/89558809>

Rubber-stamped by Aakash Jain.

  • LayoutTests/imported/w3c/web-platform-tests/tools/pywebsocket: Removed.

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

9:08 AM Changeset in webkit [290650] by commit-queue@webkit.org
  • 5 edits in trunk

Unreviewed, reverting r290325.
https://bugs.webkit.org/show_bug.cgi?id=237326

Broken patch

Reverted changeset:

"[GStreamer] Switch media player to playbin3"
https://bugs.webkit.org/show_bug.cgi?id=236884
https://commits.webkit.org/r290325

8:19 AM Changeset in webkit [290649] by Alan Bujtas
  • 17 edits in trunk/Source/WebCore

[IFC][Integration] InlineIterator::Box::rect() returns the unflipped visual rect
https://bugs.webkit.org/show_bug.cgi?id=237304

Reviewed by Antti Koivisto.

Rename InlineIterator::Box::rect() to visualRectIgnoringBlockDirection().
This is the unflipped version of the visual rect. It's no longer logical but
when the writing mode sets right-to-left/bottom-to-top block direction, it's not yet visual either.
It'll help to indentify callsites where we actually need the flipped version of this visual rect.

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

(WebCore::InlineDisplay::Box::unflippedVisualRect const):
(WebCore::InlineDisplay::Box::top const):
(WebCore::InlineDisplay::Box::bottom const):
(WebCore::InlineDisplay::Box::left const):
(WebCore::InlineDisplay::Box::right const):
(WebCore::InlineDisplay::Box::width const):
(WebCore::InlineDisplay::Box::height const):
(WebCore::InlineDisplay::Box::moveVertically):
(WebCore::InlineDisplay::Box::moveHorizontally):
(WebCore::InlineDisplay::Box::setLeft):
(WebCore::InlineDisplay::Box::setRight):
(WebCore::InlineDisplay::Box::setTop):
(WebCore::InlineDisplay::Box::setBottom):
(WebCore::InlineDisplay::Box::setRect):
(WebCore::InlineDisplay::Box::Box):
(WebCore::InlineDisplay::Box::truncate):
(WebCore::InlineDisplay::Box::rect const): Deleted.

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

(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):

  • layout/integration/InlineIteratorBox.h:

(WebCore::InlineIterator::Box::logicalTop const):
(WebCore::InlineIterator::Box::logicalBottom const):
(WebCore::InlineIterator::Box::logicalLeft const):
(WebCore::InlineIterator::Box::logicalRight const):
(WebCore::InlineIterator::Box::logicalWidth const):
(WebCore::InlineIterator::Box::logicalHeight const):
(WebCore::InlineIterator::Box::unflippedVisualRect const):
(WebCore::InlineIterator::Box::rect const): Deleted.

  • layout/integration/InlineIteratorBoxLegacyPath.h:

(WebCore::InlineIterator::BoxLegacyPath::unflippedVisualRect const):
(WebCore::InlineIterator::BoxLegacyPath::rect const): Deleted.

  • layout/integration/InlineIteratorBoxModernPath.h:

(WebCore::InlineIterator::BoxModernPath::unflippedVisualRect const):
(WebCore::InlineIterator::BoxModernPath::createTextRun const):
(WebCore::InlineIterator::BoxModernPath::rect const): Deleted.

  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::showInlineContent):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::firstInlineBoxRect const):
(WebCore::LayoutIntegration::LineLayout::collectInlineBoxRects const):
(WebCore::LayoutIntegration::LineLayout::hitTest):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::showInlineTreeAndRuns):

  • rendering/InlineBoxPainter.cpp:

(WebCore::InlineBoxPainter::paintMask):
(WebCore::InlineBoxPainter::paintDecorations):
(WebCore::InlineBoxPainter::paintFillLayer):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry const):
(WebCore::pixelSnapBackgroundImageGeometryForPainting): Deleted.

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::paintOutline):

  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::linesBoundingBox const):
(WebCore::RenderLineBreak::absoluteRects const):
(WebCore::RenderLineBreak::absoluteQuads const):

  • rendering/RenderText.cpp:

(WebCore::RenderText::absoluteRects const):
(WebCore::boundariesForTextRun):
(WebCore::localQuadForTextRun):
(WebCore::RenderText::firstRunLocation const):
(WebCore::RenderText::linesBoundingBox const):

  • rendering/RenderTreeAsText.cpp:

(WebCore::write):

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::computePaintRect):

8:18 AM Changeset in webkit [290648] by Chris Dumez
  • 2 edits in trunk/LayoutTests

[Debug] imported/w3c/web-platform-tests/url/toascii.window.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=236442
<rdar://problem/89085190>

Unreviewed, unskip test as it no longer appears to crash in Debug.

7:42 AM Changeset in webkit [290647] by commit-queue@webkit.org
  • 35 edits
    1 add in trunk/Source

[JSC] Port EXTRA_CTI_THUNKS to all platforms
https://bugs.webkit.org/show_bug.cgi?id=233822

Patch by Geza Lore <Geza Lore> on 2022-03-01
Reviewed by Saam Barati.

Source/JavaScriptCore:

Port and enable all code paths under #ifdef ENABLE(EXTRA_CTI_THUNKS)
on all platforms, and remove the now unused code paths.

To port the extra thunks to all platforms, it was necessary to enable
them to do function calls to C++ slow path operations, which on some
platforms require passing arguments on the stack. To enable this,
CCallHelpers::emitCTIThunkPrologue and
CCallHelpers::emitCTIThunkEpilogue are introduced that allocate some
additional stack space on platforms where this is necessary.

Additionally, the thunks that require subsequent exception checking
now tail call directly to the exception check thunk, rather than
returning to the baseline code and do a separate call to the exception
check thunk. This saves an extra call site in the generated baseline
ops and reduces code size on all platforms (~1.5% reduction on x86_64).

Also factored out the statically allocated register definitions for
baseline ops into BaselineJITRegisters.h, as there are now quite a lot
of them and some are somewhat elaborate. This necessitates moving the
noOverlap and preferredArgumentGPR/preferredArgumentJSR constexpr
functions out from their previous place, so these now live in
GPRInfo.h

Enabling the extra CTI thunks on ARMv7/Thumb-2 saves about 25%
baseline code size, according to --dumpLinkBufferStats.

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::subPtr):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::scratchRegister):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::sub64):

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessGenerationState::emitExplicitExceptionHandler):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::initializeFromUnlinkedStructureStubInfo):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):

  • dfg/DFGJITCompiler.h:
  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::emitCTIThunkPrologue):
(JSC::CCallHelpers::emitCTIThunkEpilogue):

  • jit/JIT.cpp:

(JSC::JIT::emitSlowCaseCall):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::compileAndLinkWithoutFinalizing):
(JSC::JIT::link):

  • jit/JIT.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emitSlow_op_mod):
(JSC::JIT::emit_op_mod):
(JSC::JIT::emit_op_div):

  • jit/JITCall.cpp:

(JSC::JIT::emit_op_iterator_open):
(JSC::JIT::emit_op_iterator_next):
(JSC::JIT::emitSlow_op_iterator_next):

  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITGetByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITGetByIdWithThisGenerator::generateBaselineDataICFastPath):
(JSC::JITPutByIdGenerator::generateBaselineDataICFastPath):

  • jit/JITInlineCacheGenerator.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_jfalse):
(JSC::JIT::valueIsFalseyGenerator):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::valueIsTruthyGenerator):
(JSC::JIT::emit_op_throw):
(JSC::JIT::op_throw_handlerGenerator):
(JSC::JIT::emit_op_enter):
(JSC::JIT::op_enter_handlerGenerator):
(JSC::JIT::emitSlow_op_check_traps):
(JSC::JIT::op_check_traps_handlerGenerator):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::generateGetByValSlowCase):
(JSC::JIT::slow_op_get_by_val_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_get_private_name):
(JSC::JIT::emitSlow_op_get_private_name):
(JSC::JIT::slow_op_get_private_name_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_set_private_brand):
(JSC::JIT::emitSlow_op_set_private_brand):
(JSC::JIT::emit_op_check_private_brand):
(JSC::JIT::emitSlow_op_check_private_brand):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::slow_op_put_by_val_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_put_private_name):
(JSC::JIT::emitSlow_op_put_private_name):
(JSC::JIT::slow_op_put_private_name_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emitSlow_op_del_by_id):
(JSC::JIT::slow_op_del_by_id_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emitSlow_op_del_by_val):
(JSC::JIT::slow_op_del_by_val_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::slow_op_get_by_id_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::slow_op_get_by_id_with_this_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::slow_op_put_by_id_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emitSlow_op_in_by_id):
(JSC::JIT::emitSlow_op_in_by_val):
(JSC::JIT::emitHasPrivateSlow):
(JSC::JIT::emitSlow_op_has_private_name):
(JSC::JIT::emitSlow_op_has_private_brand):
(JSC::JIT::emitSlow_op_put_to_scope):
(JSC::JIT::slow_op_put_to_scopeGenerator):
(JSC::JIT::emit_op_get_property_enumerator):
(JSC::JIT::emit_op_enumerator_next):
(JSC::JIT::emit_enumerator_has_propertyImpl):
(JSC::JIT::emit_op_enumerator_get_by_val):
(JSC::JIT::emit_op_enumerator_in_by_val):
(JSC::JIT::emit_op_enumerator_has_own_property):

  • jit/JITThunks.cpp:
  • jit/JITThunks.h:
  • jit/SlowPathCall.cpp:

(JSC::JITSlowPathCall::call):
(JSC::JITSlowPathCall::generateThunk):

  • jit/SlowPathCall.h:

(JSC::JITSlowPathCall::JITSlowPathCall):

  • jit/ThunkGenerators.cpp:

(JSC::handleExceptionGenerator):
(JSC::checkExceptionGenerator):

  • jit/ThunkGenerators.h:

Source/WTF:

  • wtf/PlatformEnable.h:

Remove EXTRA_CTI_THUNKS define (now always on on all platforms)

7:16 AM Changeset in webkit [290646] by Wenson Hsieh
  • 27 edits
    4 adds in trunk

focus({preventScroll: true}) does not prevent scrolling on iOS
https://bugs.webkit.org/show_bug.cgi?id=236584
rdar://88911184

Reviewed by Simon Fraser.

Source/WebCore:

Plumb FocusOptions through Element::dispatchFocusEvent() as well as the chrome client hooks for
elementDidRefocus and elementDidFocus, instead of just a FocusDirection flag.

  • dom/Document.cpp:

(WebCore::Document::setFocusedElement):

  • dom/Element.cpp:

(WebCore::Element::focus):
(WebCore::Element::dispatchFocusEvent):

  • dom/Element.h:
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::dispatchFocusEvent):

  • html/HTMLSelectElement.h:
  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::dispatchFocusEvent):

  • html/HTMLTextFormControlElement.h:
  • loader/EmptyClients.h:
  • page/ChromeClient.h:

(WebCore::ChromeClient::elementDidFocus):
(WebCore::ChromeClient::elementDidRefocus):

  • page/FocusController.cpp:

(WebCore::dispatchEventsOnWindowAndFocusedElement):
(WebCore::FocusController::setFocusedElement):

Source/WebKit:

Add support for preventScroll on iOS by avoiding UI-side zooming/scrolling to reveal the focused element if it
was focused with preventScroll: true. See below for more details.

Tests: fast/forms/select-focus-prevent-scroll.html

fast/forms/text-field-focus-prevent-scroll.html

  • Shared/FocusedElementInformation.cpp:

(WebKit::FocusedElementInformation::encode const):
(WebKit::FocusedElementInformation::decode):

  • Shared/FocusedElementInformation.h:

Add a boolean flag to FocusedElementInformation to indicate whether or not scrolling to reveal the focused
element should be prevented.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _zoomToRevealFocusedElement]):

Only zoom to reveal the focused element if the focused element information's preventScroll flag is NO.

(-[WKContentView _elementDidBlur]):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::elementDidFocus):
(WebKit::WebChromeClient::elementDidRefocus):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::elementDidRefocus):
(WebKit::WebPage::elementDidFocus):

Use FocusOptions to set the preventScroll flag when propagating FocusedElementInformation.

  • WebProcess/WebPage/WebPage.h:

Source/WebKitLegacy/ios:

Adjust the method signature of elementDidFocus. See WebCore ChangeLog for more information.

  • WebCoreSupport/WebChromeClientIOS.h:
  • WebCoreSupport/WebChromeClientIOS.mm:

(WebChromeClientIOS::elementDidFocus):

Source/WebKitLegacy/mac:

Adjust the method signature of elementDidFocus. See WebCore ChangeLog for more information.

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::elementDidFocus):

LayoutTests:

Add a couple of new layout tests to verify that passing in { preventScroll: true } for focus options causes
us to avoid scrolling to reveal focused select elements and text fields.

  • fast/forms/select-focus-prevent-scroll-expected.txt: Added.
  • fast/forms/select-focus-prevent-scroll.html: Added.
  • fast/forms/text-field-focus-prevent-scroll-expected.txt: Added.
  • fast/forms/text-field-focus-prevent-scroll.html: Added.
  • resources/ui-helper.js:

Also make it safe to call waitForInputSessionToDismiss() in a platform-agnostic test, by bailing early if
we're not on iOS, using WebKit2.

7:09 AM Changeset in webkit [290645] by Alan Bujtas
  • 6 edits
    2 adds in trunk

REGRESSION (r273129): Text contents in <span> with opacity not repainting/updating when sibling element has "will-change: transform"
https://bugs.webkit.org/show_bug.cgi?id=236876
<rdar://problem/89180092>

Reviewed by Simon Fraser.

Source/WebCore:

This patch implements a slightly naive repaint for inline boxes with self painting layers.

  1. Mark the line when it gains an inline box (RenderInline) with self painting layer (e.g. <span style="position: relative">this has dedicated layer</span>)
  2. Issue repaint at the end of the line layout on such renderers.

Test: fast/repaint/inline-box-with-self-paint-layer.html

  • rendering/LegacyInlineFlowBox.cpp:

(WebCore::LegacyInlineFlowBox::addToLine):

  • rendering/LegacyInlineFlowBox.h:

(WebCore::LegacyInlineFlowBox::LegacyInlineFlowBox):
(WebCore::LegacyInlineFlowBox::hasSelfPaintInlineBox const):

  • rendering/LegacyLineLayout.cpp:

(WebCore::repaintSelfPaintInlineBoxes):
(WebCore::LegacyLineLayout::layoutRunsAndFloats):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::clippedOverflowRect const): expand the ASSERT to enclsing inline boxes too.

LayoutTests:

  • fast/repaint/inline-box-with-self-paint-layer-expected.html: Added.
  • fast/repaint/inline-box-with-self-paint-layer.html: Added.
6:42 AM Changeset in webkit [290644] by graouts@webkit.org
  • 6 edits in trunk

[web-animations] web-animations/interfaces/Animatable/getAnimations-iframe.html is a unique failure
https://bugs.webkit.org/show_bug.cgi?id=237314

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add a new test to check that both Document.getAnimations() and Element.getAnimations() correctly
update layout on the owner document.

  • web-platform-tests/web-animations/interfaces/Animatable/getAnimations-iframe-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animatable/getAnimations-iframe.html:

Source/WebCore:

We need to update the layout of a potential owner document in case some layout-dependent media queries
trigger declarative animations.

  • dom/Document.cpp:

(WebCore::Document::matchingAnimations):

  • dom/Element.cpp:

(WebCore::Element::getAnimations):

6:32 AM Changeset in webkit [290643] by commit-queue@webkit.org
  • 8 edits
    5 adds in trunk

WebGL GPUP OpenGL context is not used even if WebGL via Metal is deselected
https://bugs.webkit.org/show_bug.cgi?id=236505

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-01
Reviewed by Myles C. Maxfield.

Source/WebCore:

Encode, decode also useMetal property.

Tests: webgl/webgl-via-metal-flag-off.html

webgl/webgl-via-metal-flag-on.html

  • platform/graphics/GraphicsContextGLAttributes.h:

(WebCore::GraphicsContextGLAttributes::encode const):
(WebCore::GraphicsContextGLAttributes::decode):

Source/WebKit:

  • Shared/WebCoreArgumentCoders.cpp:
  • Shared/WebCoreArgumentCoders.h:

LayoutTests:

  • webgl/resources/test-shader-implementation-language.js: Added.

(runTest):

  • webgl/webgl-via-metal-flag-off-expected.txt: Added.
  • webgl/webgl-via-metal-flag-off.html: Added.
  • webgl/webgl-via-metal-flag-on-expected.txt: Added.
  • webgl/webgl-via-metal-flag-on.html: Added.
6:23 AM Changeset in webkit [290642] by commit-queue@webkit.org
  • 18 edits
    1 move
    1 delete in trunk/Source

GraphicsContextGL related includes are inconsistent, slowing the build
https://bugs.webkit.org/show_bug.cgi?id=237270

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-01
Reviewed by Alexey Proskuryakov.

Source/WebCore:

Remove include "GraphicsContextGL.h" from files not needing that.
Most notably, add ChromeClient.cpp and move the non-trivial
ChromeClient::createGraphicsContextGL() function to .cpp file, so
that ChromeClient.h does not need to include GraphicsContextGL.h.

This makes incremental compiles better, as not all changes to
GraphicsContextGL.h and its dependencies force big rebuilds.

GraphicsContextGL.h and dependents maintainance:

Remove unneeded forward declarations. Types referenced by overridden virtual
functions must already be declared. Remove forward declarartion ExtensionsGL,
the class was removed

Use forward declares instead of includes (MediaPlayer).

Remove RemoteGraphicsContextGLProxyBase.cpp/h, the use was removed.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/canvas/WebGLActiveInfo.h:
  • html/canvas/WebGLShaderPrecisionFormat.h:
  • inspector/InspectorShaderProgram.cpp:
  • page/ChromeClient.cpp: Renamed from Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.cpp.

(WebCore::ChromeClient::createGraphicsContextGL const):

  • page/ChromeClient.h:
  • platform/HostWindow.h:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/GraphicsContextGLState.h:
  • platform/graphics/RemoteGraphicsContextGLProxyBase.h: Removed.
  • platform/graphics/angle/GraphicsContextGLANGLE.h:
  • platform/graphics/cocoa/IOSurface.mm:
  • platform/graphics/opengl/ExtensionsGLOpenGL.h:
  • platform/xr/openxr/OpenXRSwapchain.h:
  • platform/xr/openxr/PlatformXROpenXR.cpp:
  • platform/xr/openxr/PlatformXROpenXR.h:

Source/WebKit:

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
4:53 AM Changeset in webkit [290641] by Adrian Perez de Castro
  • 2 edits in trunk

[CMake] Build failure with libstdc++ (>= 6) when cross-compiling (fatal error: stdlib.h: No such file or directory)
https://bugs.webkit.org/show_bug.cgi?id=161697

Reviewed by Carlos Garcia Campos.

  • Source/cmake/WebKitCompilerFlags.cmake: Set LANG=C in compiler invocation to ensure its

output is consistent and the checks are independent from the system locale configuration.

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

Explicitly disable style sharing for form controls
https://bugs.webkit.org/show_bug.cgi?id=237236

Reviewed by Antti Koivisto.

There was a typo introduced in bug 153768 and bug 138769, which essentially disables
style sharing completely for form controls. Let's make that explicit.

  • style/StyleSharingResolver.cpp:

(WebCore::Style::SharingResolver::canShareStyleWithControl): Removed.
(WebCore::Style::SharingResolver::canShareStyleWithElement const):

2:28 AM Changeset in webkit [290639] by Cameron McCormack
  • 26 edits
    5 adds in trunk

Make input element UA shadow tree creation lazy
https://bugs.webkit.org/show_bug.cgi?id=236747

Reviewed by Aditya Keerthi.

Source/WebCore:

We currently delay InputType creation for parser inserted elements until
just after the attributes have been set, so that we don't wastefully
create an InputType and the UA shadow tree creation if a non-text
type="" was specified on the tag. We don't do anything similar for
script inserted input elements. We could make the InputType creation
lazy, but most of the wasted time is due to the shadow tree creation.

This patch makes InputType shadow tree creation lazy by delaying it
until one of the following happens:

  1. the element is inserted into the document
  2. the type="" or value="" attributes are changed before the element is inserted into the document
  3. any DOM methods that need access to the innerTextElement() are called on the element before the element is inserted into the document

Not all places where we call innerTextElement() on the
HTMLInputElement are safe to lazily create the shadow trees, so we
have two accessors:

  • innerTextElement() returns the inner text element if it's been created already
  • innerTextElementCreatingShadowSubtreeIfNeeded will perform the lazy shadow tree construction if it hasn't already been done

Since the existing
createShadowSubtreeAndUpdateInnerTextElementEditability function has
more responsibility than just creating the subtree and ensuring the
editability is set appropriately, it's renamed to a more manageable
createShadowSubtree.

This change is a 0.5% progression on Speedometer 2.

Test: fast/forms/lazy-shadow-tree-creation.html

  • html/BaseDateAndTimeInputType.h:
  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::createShadowSubtree):
(WebCore::BaseDateAndTimeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/ColorInputType.h:
  • html/ColorInputType.cpp:

(WebCore::ColorInputType::createShadowSubtree):
(WebCore::ColorInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/FileInputType.h:
  • html/FileInputType.cpp:

(WebCore::FileInputType::createShadowSubtree):
(WebCore::FileInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/InputType.cpp:

(WebCore::InputType::createShadowSubtree):
(WebCore::InputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/RangeInputType.h:
  • html/RangeInputType.cpp:

(WebCore::RangeInputType::createShadowSubtree):
(WebCore::RangeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/SearchInputType.h:
  • html/SearchInputType.cpp:

(WebCore::SearchInputType::createShadowSubtree):
(WebCore::SearchInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
Renamed createShadowSubtreeAndUpdateInnerTextElementEditability to
createShadowSubtree and remove the "isInnerTextElementEditable"
argument, since we can ask the element() for its value if needed.
createShadowSubtree is now also responsible for creating the shadow
root.

  • html/TextFieldInputType.h:
  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::createShadowSubtree):
(WebCore::TextFieldInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
Renamed. Ensure all shadow tree state is up to date now that it can be
created later.

  • html/InputType.h:
  • html/InputType.cpp:

(WebCore::InputType::createShadowSubtree):
(WebCore::InputType::hasCreatedShadowSubtree const):
New functions to create the shadow subtree if it hasn't been done
already, and to query whether it's been done.

  • html/HTMLInputElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::innerTextElementCreatingShadowSubtreeIfNeeded):

  • html/HTMLTextAreaElement.h:
  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::innerTextElementCreatingShadowSubtreeIfNeeded):

  • html/HTMLTextFormControlElement.h:
  • html/InputType.h:
  • html/InputType.cpp:

(WebCore::InputType::innerTextElementCreatingShadowSubtreeIfNeeded):
New functions to first create the shadow subtree before returning
innerTextElement(). HTMLTextAreaElement never lazily creates its
shadow subtree and so just returns innerTextElement().

  • html/HTMLInputElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::createShadowSubtreeAndUpdateInnerTextElementEditability):
Deleted. Just call through to m_inputType->createShadowTree()
directly.

(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::create):
(WebCore::HTMLInputElement::initializeInputType):
(WebCore::HTMLInputElement::updateType):
Don't immediately create the shadow tree.

(WebCore::HTMLInputElement::didFinishInsertingNode):
Create the shadow subtree now that the element's been inserted. No
need to call dataListMayHaveChanged since
TextFieldInputType::createShadowSubtree will now do this.

  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::updateInnerTextValue):
Ensure the shadow subtree is created since we need to poke at it.

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::forwardEvent):
Don't forward the event if the shadow tree hasn't been created yet.

(WebCore::HTMLTextFormControlElement::setSelectionRange):
Ensure the shadow tree has been created. This is needed if the
selection APIs are called on the input element before it's inserted
into the document.

(WebCore::HTMLTextFormControlElement::visiblePositionForIndex const):
Assert that the shadow tree has been created, since editing
functionality should only be needed if the element's been inserted
into the document.

(WebCore::HTMLTextFormControlElement::setInnerTextValue):
Ensure the shadow tree has been created.

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::handleMouseDownEvent):
(WebCore::RangeInputType::handleTouchEvent):
Ensure the shadow tree has been created in case the event will change
the value.

(WebCore::RangeInputType::sliderTrackElement const):
Only return the element if it's been created.

(WebCore::RangeInputType::typedSliderThumbElement const):
Assert that the element has been created.

(WebCore::RangeInputType::dataListMayHaveChanged):
Only try to re-layout if the shadow tree has been created.

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::isEmptyValue const):
Avoid creating the shadow subtree.

(WebCore::TextFieldInputType::forwardEvent):
Move the element assertion up to be consistent with other functions.

(WebCore::TextFieldInputType::innerTextElement const):
Don't assert, since this now can legitimately return null.

  • html/FileInputType.cpp:

(WebCore::FileInputType::disabledStateChanged):
(WebCore::FileInputType::attributeChanged):

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::disabledStateChanged):
(WebCore::RangeInputType::attributeChanged):
(WebCore::RangeInputType::setValue):

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::disabledStateChanged):
(WebCore::TextFieldInputType::readOnlyStateChanged):
(WebCore::TextFieldInputType::updatePlaceholderText):
(WebCore::TextFieldInputType::updateAutoFillButton):
(WebCore::TextFieldInputType::dataListMayHaveChanged):
Don't update the shadow tree contents if it hasn't been created yet.
createShadowTree is responsible for ensuring it creates the shadow
tree contents reflecting the current state.

LayoutTests:

  • fast/forms/lazy-shadow-tree-creation-expected.html: Added.
  • fast/forms/lazy-shadow-tree-creation.html: Added.
  • fast/forms/lazy-shadow-tree-creation.js: Added.

(supportsType):
(makeAndAppendInput):

  • LayoutTests/fast/forms/lazy-shadow-tree-creation-crash.html:
  • LayoutTests/fast/forms/lazy-shadow-tree-creation-crash-expected.html:

Crashtest.

  • fast/shadow-dom/style-resolver-sharing-expected.txt:

Update to account for the lazy shadow tree being created later.

2:15 AM Changeset in webkit [290638] by commit-queue@webkit.org
  • 9 edits
    4 adds in trunk/LayoutTests

[GLIB] Update test expectations and baselines. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=237310

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2022-03-01

  • platform/glib/css3/flexbox/line-wrapping-expected.txt:
  • platform/glib/fast/block/positioning/auto/vertical-lr/007-expected.txt:
  • platform/glib/fast/dom/scroll-reveal-top-overflow-expected.txt: Added.
  • platform/glib/tables/mozilla_expected_failures/dom/appendColGroup1-expected.txt:
  • platform/gtk/TestExpectations:
  • platform/gtk/fast/repaint/vertical-text-repaint-expected.txt: Added.
  • platform/gtk/fast/writing-mode/japanese-lr-selection-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/dom/appendCol1-expected.txt:
  • platform/wpe/fast/repaint/vertical-text-repaint-expected.txt: Added.
  • platform/wpe/fast/writing-mode/japanese-lr-selection-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/dom/appendCol1-expected.txt:
2:11 AM Changeset in webkit [290637] by Angelos Oikonomopoulos
  • 3 edits in trunk/Tools

[JSC] Implement chunking for the GNU parallel runner
https://bugs.webkit.org/show_bug.cgi?id=237028

Reviewed by Adrian Perez de Castro.

The GNU parallel runner can't keep up with the scheduling when using
multiple fast remotes. This results in poor CPU utilization on the
remotes and more waiting time.

As a quick fix, allow the user to specify a --gnu-parallel-chunk-size,
the value of which specifies the number of test jobs to schedule as a
unit (defaults to 1). Specifying a higher value means longer-running
jobs, so that GNU parallel can more efficiently schedule them.

  • Scripts/run-javascriptcore-tests:

(runJSCStressTests):

  • Scripts/run-jsc-stress-tests:
1:36 AM Changeset in webkit [290636] by basuke.suzuki@sony.com
  • 3 edits in trunk

[CMake] Disabling ENABLE_WEBCORE is ignored when cmake configuration runs again.
https://bugs.webkit.org/show_bug.cgi?id=237170

Reviewed by Fujii Hironori.

CMake variables which has chance to set from outside should be cached in CMake configuration cache.
Unless cacheing, the result of building the generated project is not consisitent because the other
configuration may run while building.

To make it complete, I've changed ENABLE_JAVASCRIPTCORE, ENABLE_WEBCORE and ENABLE_WEBKIT to option()
which is stored in cached and reused while building even if the confuguration runs again.

  • Source/cmake/OptionsPlayStation.cmake:
  • Source/cmake/WebKitCommon.cmake:
1:01 AM Changeset in webkit [290635] by Ziran Sun
  • 4 edits in trunk

[Selection] Selection Range should be clamped by the current value length
https://bugs.webkit.org/show_bug.cgi?id=237210

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update the test expectations as some sub-tests are now passing.

  • web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt:

Source/WebCore:

As per https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#set-the-selection-range,
if start or end "is greater than the length of the relevant value of the text control, then set it to
the length of the relevant value of the text control".

This CL makes selection range clamp to the current value length.

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setSelectionRange):

12:55 AM Changeset in webkit [290634] by Matt Woodrow
  • 4 edits in trunk

Handle perpendicular containing blocks when computing available logical height.
https://bugs.webkit.org/show_bug.cgi?id=236953

Reviewed by Dean Jackson.

Source/WebCore:

Handles the case where the containing block uses a perpendicular writing mode
to the current box, and we need to check the containing block's width in order
to determine height.

Existing subgrid tests marked as passing.
These subgrid reftests were failing because the -expected files were rendering incorrectly
(which don't use subgrid).

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::availableLogicalHeightUsing const):

LayoutTests:

Existing subgrid tests marked as passing.

12:48 AM Changeset in webkit [290633] by Carlos Garcia Campos
  • 10 edits
    4 deletes in trunk

[ATSPI] Remove layout tests checking children added/removed notifications
https://bugs.webkit.org/show_bug.cgi?id=237272

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Do not send children-changed notifications to WTR observers.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::childrenChanged):
(WebCore::AccessibilityAtspi::notifyChildrenChanged const): Deleted.

  • accessibility/atspi/AccessibilityAtspi.h:

LayoutTests:

Children changed notifications are not expected by any other tests because other ports don't support them. We
already have unit tests to ensure they work as expected so we can just remove the layout tests and ensure we
don't emit those notifications either.

  • accessibility/children-changed-sends-notification-expected.txt: Removed.
  • accessibility/children-changed-sends-notification.html: Removed.
  • accessibility/gtk/menu-list-unfocused-notifications-expected.txt:
  • accessibility/gtk/no-notification-for-unrendered-iframe-children-expected.txt: Removed.
  • accessibility/gtk/no-notification-for-unrendered-iframe-children.html: Removed.
  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
  • platform/wincairo-wk1/TestExpectations:
12:00 AM Changeset in webkit [290632] by sihui_liu@apple.com
  • 7 edits
    1 add in trunk

Migrate third-party IndexedDB data to GeneralStorageDirectory
https://bugs.webkit.org/show_bug.cgi?id=237283

Reviewed by Chris Dumez.

Source/WebKit:

In current storage layout, third-party IndexedDB data is stored in a subdirectory of top origin directory, e.g.
[IndexedDBDirectory]/[TopOrigin]/[ThirdPartyOrigin]/[Database]. First-party data is stored in the top origin
directory, e.g. [IndexedDBDirectory]/[TopOrigin]/[Database]. Our current migration code directly renames the
origin directory without checking whether it has subdirectory that is a third-party directory. That means,
[IndexedDBDirectory]/[TopOrigin]/ is moved to [GeneralStorageDirectory]/[TopOrigin]/[TopOrigin]/[IndexedDB]/,
and [IndexedDBDirectory]/[TopOrigin]/[ThirdPartyOrigin]/ is moved to
[GeneralStorageDirectory]/[TopOrigin]/[TopOrigin]/[IndexedDB]/[ThirdPartyOrigin] ([ThirdPartyOrigin]/ here is
treated as a database directory). This is wrong: the new third-party directory should actually be
[GeneralStorageDirectory]/[TopOrigin]/[ThirdPartyOrigin]/[IndexedDB]/.

To fix this, we now make sure only first-party data is migrated when first-party IndexedDB database is visited,
by moving only database directories under origin directory.

Test: IndexedDB.MigrateThirdPartyDataToGeneralStorageDirectory

  • NetworkProcess/storage/IDBStorageManager.cpp:

(WebKit::migrateOriginDataImpl):
(WebKit::IDBStorageManager::idbStorageOriginDirectory):
(WebKit::IDBStorageManager::migrateOriginData):
(WebKit::migrateOriginData): Deleted.

  • NetworkProcess/storage/IDBStorageManager.h:
  • NetworkProcess/storage/OriginStorageManager.cpp:

(WebKit::OriginStorageManager::StorageBucket::resolvedIDBStoragePath):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/indexeddb-persistence-third-party.sqlite3: Added.
Note: See TracTimeline for information about the timeline view.