Timeline



Sep 30, 2021:

9:18 PM Changeset in webkit [283358] by Lauro Moura
  • 3 edits in trunk/LayoutTests

[GLIB] Gardening some mediastream consistent failures

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/wpe/TestExpectations:
9:14 PM Changeset in webkit [283357] by achristensen@apple.com
  • 2 edits in trunk/Tools

Stop making a file named null when running API tests

https://bugs.webkit.org/show_bug.cgi?id=230191

r283298 did the trick, but I need to pipe stderr to /dev/null instead of null

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::TEST):

8:24 PM Changeset in webkit [283356] by weinig@apple.com
  • 2 edits in trunk/Source/WebKit

Add dumping for UIViews with separated layers
https://bugs.webkit.org/show_bug.cgi?id=231056

Reviewed by Tim Horton.

  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(allowListedClassToString):
Fix typo from previous patch where a comma was missed
and remove unnecessary assertion.

(dumpUIView):
Use the new dumpSeparatedLayerProperties when separated layers
are present.

6:30 PM Changeset in webkit [283355] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Rename snapRubberBand() to have a clearer name
https://bugs.webkit.org/show_bug.cgi?id=231051

Reviewed by Myles C. Maxfield.

It wasn't clear that snapRubberBand() started the timer, sometimes. Make that
more obvious.

  • platform/ScrollingEffectsController.h:
  • platform/mac/ScrollingEffectsController.mm:

(WebCore::ScrollingEffectsController::handleWheelEvent):
(WebCore::ScrollingEffectsController::updateRubberBandAnimatingState):
(WebCore::ScrollingEffectsController::stopRubberbanding):
(WebCore::ScrollingEffectsController::stopRubberbandAnimation):
(WebCore::ScrollingEffectsController::startRubberbandAnimationIfNecessary):
(WebCore::ScrollingEffectsController::stopSnapRubberbandAnimation): Deleted.
(WebCore::ScrollingEffectsController::snapRubberBand): Deleted.

6:23 PM Changeset in webkit [283354] by cathiechen
  • 3 edits in trunk/Source/WebCore

[Performance] Optimize RenderLayer::clipCrossesPaintingBoundary
https://bugs.webkit.org/show_bug.cgi?id=230885

Reviewed by Simon Fraser.

In RenderLayer::clipCrossesPaintingBoundary, to check if the layer and its parent layer are in the same
compositing layer, it calls enclosingCompositingLayerForRepaint() twice, which need to travel up the layer tree.
This patch adds RenderLayer::sharesCompositingLayerForRepaint, to check the repaintTargetForLayer and paintOrderParents.

  • rendering/RenderLayer.cpp:

(WebCore::repaintTargetForLayer):
(WebCore::RenderLayer::enclosingCompositingLayerForRepaint const):
(WebCore::RenderLayer::sharesCompositingLayerForRepaint const):
(WebCore::RenderLayer::clipCrossesPaintingBoundary const):

  • rendering/RenderLayer.h:
5:40 PM Changeset in webkit [283353] by Simon Fraser
  • 16 edits in trunk/Source

Simplify some scrolling-related code in WebKit with use of RectEdges<bool>
https://bugs.webkit.org/show_bug.cgi?id=231037

Reviewed by Tim Horton.

Source/WebCore:

Export edgePinnedState().

  • platform/ScrollableArea.h:

Source/WebKit:

Use RectEdges<bool> in code that tracks rubber banding state, and edge pinned state.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<RectEdges<bool>>::encode):
(IPC::ArgumentCoder<RectEdges<bool>>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/API/C/WKPage.cpp:

(WKPageIsPinnedToLeftSide):
(WKPageIsPinnedToRightSide):
(WKPageIsPinnedToTopSide):
(WKPageIsPinnedToBottomSide):
(WKPageRubberBandsAtLeft):
(WKPageRubberBandsAtRight):
(WKPageRubberBandsAtTop):
(WKPageRubberBandsAtBottom):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::toWKRectEdge):
(WebKit::toRectEdges):
(WebKit::WebViewImpl::pinnedState):
(WebKit::WebViewImpl::rubberBandingEnabled):
(WebKit::WebViewImpl::setRubberBandingEnabled):

  • UIProcess/ViewGestureController.cpp:

(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::setRubberBandsAtLeft):
(WebKit::WebPageProxy::setRubberBandsAtRight):
(WebKit::WebPageProxy::setRubberBandsAtTop):
(WebKit::WebPageProxy::setRubberBandsAtBottom):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
(WebKit::WebPageProxy::rubberBandsAtLeft const): Deleted.
(WebKit::WebPageProxy::rubberBandsAtRight const): Deleted.
(WebKit::WebPageProxy::rubberBandsAtTop const): Deleted.
(WebKit::WebPageProxy::rubberBandsAtBottom const): Deleted.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::wheelEvent):

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

(WebKit::WebPage::updateMainFrameScrollOffsetPinning):

  • WebProcess/WebPage/WebPage.h:
5:30 PM Changeset in webkit [283352] by Russell Epstein
  • 1 copy in tags/Safari-612.2.9.3.1

Tag Safari-612.2.9.3.1.

5:29 PM Changeset in webkit [283351] by Russell Epstein
  • 1 copy in tags/Safari-612.2.9.2.1

Tag Safari-612.2.9.2.1.

5:27 PM Changeset in webkit [283350] by Russell Epstein
  • 1 copy in tags/Safari-612.2.9.0.2

Tag Safari-612.2.9.0.2.

5:26 PM Changeset in webkit [283349] by Russell Epstein
  • 1 copy in tags/Safari-612.2.9.1.2

Tag Safari-612.2.9.1.2.

5:26 PM Changeset in webkit [283348] by ysuzuki@apple.com
  • 4 edits in trunk

Upgrade GCC requirement to 8.3.0
https://bugs.webkit.org/show_bug.cgi?id=231042

Reviewed by Darin Adler.

.:

Based on the roadmap[1], we upgrade GCC requirement to 8.3.0, which is default GCC in Debian one-old-stable (buster) right now.
This paves the way to enabling some of useful C++20 features, e.g. default initializer for bitfields.

[1]: https://trac.webkit.org/wiki/WebKitGTK/GCCRequirement

  • Source/cmake/WebKitCommon.cmake:

Source/JavaScriptCore:

  • runtime/ConfigFile.cpp:

(JSC::ConfigFile::canonicalizePaths):

4:38 PM Changeset in webkit [283347] by sihui_liu@apple.com
  • 33 edits
    2 copies
    5 adds in trunk

Make File System Access API available in Worker
https://bugs.webkit.org/show_bug.cgi?id=230805
<rdar://problem/83552511>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any.worker-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.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-sync-access-handle-lock.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-flush.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-getSize.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-read-write.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-truncate.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any.worker-expected.txt:

Source/WebCore:

Introduce WorkerFileSystemStorageConnection to provide connection to storage backend for handles in Worker.
WorkerFileSystemStorageConnection sends request to FileSystemStorageConnection on the main thread, and
dispaches the result back to handes on worker thread.

Test: storage/filesystemaccess/directory-handle-basics-worker.html

  • Headers.cmake:
  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp: Added.

(WebCore::WorkerFileSystemStorageConnection::create):
(WebCore::WorkerFileSystemStorageConnection::WorkerFileSystemStorageConnection):
(WebCore::WorkerFileSystemStorageConnection::~WorkerFileSystemStorageConnection):
(WebCore::WorkerFileSystemStorageConnection::connectionClosed):
(WebCore::WorkerFileSystemStorageConnection::scopeClosed):
(WebCore::WorkerFileSystemStorageConnection::isSameEntry):
(WebCore::WorkerFileSystemStorageConnection::didIsSameEntry):
(WebCore::WorkerFileSystemStorageConnection::getFileHandle):
(WebCore::WorkerFileSystemStorageConnection::getDirectoryHandle):
(WebCore::WorkerFileSystemStorageConnection::didGetHandle):
(WebCore::WorkerFileSystemStorageConnection::removeEntry):
(WebCore::WorkerFileSystemStorageConnection::didRemoveEntry):
(WebCore::WorkerFileSystemStorageConnection::resolve):
(WebCore::WorkerFileSystemStorageConnection::didResolve):

  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.h: Added.
  • Modules/filesystemaccess/WorkerFileSystemStorageConnectionCallbackIdentifier.h: Added.
  • Modules/storage/StorageConnection.h:
  • Modules/storage/WorkerStorageConnection.cpp:

(WebCore::WorkerStorageConnection::scopeClosed):
(WebCore::WorkerStorageConnection::fileSystemGetDirectory):
(WebCore::WorkerStorageConnection::didGetDirectory):

  • Modules/storage/WorkerStorageConnection.h:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/ExceptionOr.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::prepareForDestruction):
(WebCore::WorkerGlobalScope::getFileSystemStorageConnection):
(WebCore::WorkerGlobalScope::fileSystemStorageConnection):

  • workers/WorkerGlobalScope.h:

Source/WTF:

  • wtf/CrossThreadCopier.h:

LayoutTests:

  • storage/filesystemaccess/directory-handle-basics-worker-expected.txt: Added.
  • storage/filesystemaccess/directory-handle-basics-worker.html: Added.
  • storage/filesystemaccess/directory-handle-basics.html:
  • storage/filesystemaccess/resources/directory-handle-basics.js: Copied from LayoutTests/storage/filesystemaccess/directory-handle-basics.html.

(finishTest):
(getDirectory):

4:12 PM Changeset in webkit [283346] by Russell Epstein
  • 5 edits
    2 adds in branches/safari-611.4.2.0-branch

Cherry-pick r281613. rdar://problem/83369963

Crash in GraphicsContextGLOpenGL::reshapeDisplayBufferBacking
https://bugs.webkit.org/show_bug.cgi?id=229309

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-25
Reviewed by Myles C. Maxfield.

Source/WebCore:

Test: fast/canvas/xr-compatible-crash.html

Null check m_swapChain because reshapeDisplayBufferBacking can be called before it is set.

  • html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::addContextObject):
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::reshapeFBOs):
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking):

LayoutTests:

  • fast/canvas/xr-compatible-crash.html: Added.
  • fast/canvas/xr-compatible-crash-expected.txt: Added.

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

4:12 PM Changeset in webkit [283345] by Russell Epstein
  • 2 edits in branches/safari-611.4.2.0-branch/Source/WebCore

Cherry-pick r280861. rdar://problem/81757530

Deploy some more smart pointers in DOMWindow.cpp
https://bugs.webkit.org/show_bug.cgi?id=228883

Reviewed by Darin Adler.

A follow up to r279661. Deploy even more smart pointers.

  • page/DOMWindow.cpp: (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents): (WebCore::DOMWindow::failedToRegisterDeviceMotionEventListener): (WebCore::DOMWindow::dispatchEvent):

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

4:06 PM Changeset in webkit [283344] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Regressions (r283288): [ macOS Debug ] webgl/2.0.0/conformance/state/gl-object-get-calls.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=231024
<rdar://problem/83723856>

Reviewed by Mark Lam.

Speed up our debug assert by not using a probe.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

3:58 PM Changeset in webkit [283343] by Russell Epstein
  • 8 edits in branches/safari-611.4.2.0-branch/Source

Versioning.

WebKit-7611.4.2.0.1

3:42 PM Changeset in webkit [283342] by wilander@apple.com
  • 6 edits in trunk

PCM: Change WebIDL attributes from all lowercase to camelcase to match spec and align with Attribution Reporting API
https://bugs.webkit.org/show_bug.cgi?id=230914
<rdar://problem/83639923>

Reviewed by Brent Fulgham.

This patch changes Private Click Measurement's WebIDL attributes from
all lowercase to camelcase to match the spec and align with the
Attribution Reporting API proposal.

References

Source/WebCore:

Existing tests updated.

  • html/HTMLAnchorElement.idl:

LayoutTests:

  • http/tests/privateClickMeasurement/anchor-tag-attributes-reflect-expected.txt:
  • http/tests/privateClickMeasurement/anchor-tag-attributes-reflect.html:
  • http/tests/privateClickMeasurement/anchor-tag-attributes-validation.html:
3:34 PM Changeset in webkit [283341] by Russell Epstein
  • 1 copy in branches/safari-611.4.2.0-branch

New branch.

2:20 PM Changeset in webkit [283340] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

Move canCompositeClipPath to RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=231014

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

Move canCompositeClipPath to RenderLayer since the
code almost exclusively deals with layers. Also
remove unneeded ASSERTs.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::adjustStyleDifference const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::willCompositeClipPath const):

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

(WebCore::RenderLayerCompositor::canCompositeClipPath): Deleted.

  • rendering/RenderLayerCompositor.h:
2:13 PM Changeset in webkit [283339] by Devin Rousso
  • 11 edits in trunk/Source/WebCore

[iOS][GPU Process] support <attachment>
https://bugs.webkit.org/show_bug.cgi?id=230781
<rdar://problem/70884096>

Reviewed by Myles Maxfield.

Source/WebCore:

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderAttachmentInfo::addLine):
(WebCore::RenderAttachmentInfo::buildWrappedLines):
(WebCore::RenderAttachmentInfo::buildSingleLine):
(WebCore::paintAttachmentText):
Instead of drawing directly into the GraphicsContext::platformContext (which will not be
valid in the WebProcess when DOM rendering happens in the GPUProcess), use DrawGlyphsRecorder
to "translate" native CTLineDraw into a sequence of actions from which a GraphicsContext
method can be derived, thereby hooking into and benefiting from existing GPUProcess support.

  • platform/graphics/DrawGlyphsRecorder.h:

(WebCore::DrawGlyphsRecorder::deconstructDrawGlyphs const): Renamed from drawGlyphsDeconstruction.

  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:

(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):
(WebCore::DrawGlyphsRecorder::recordDrawGlyphs):
(WebCore::DrawGlyphsRecorder::drawGlyphs):
(WebCore::DrawGlyphsRecorder::drawNativeText):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:
  • platform/graphics/harfbuzz/DrawGlyphsRecorderHarfBuzz.cpp:

(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):

  • platform/graphics/win/DrawGlyphsRecorderWin.cpp:

(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):
Add a new parameter to DrawGlyphsRenderer that controls whether fonts other than the one
initially provided to drawGlyphs/drawNativeText can be used to draw glyphs. This is only
used by the above as we know that the initial font is a system font, and therefore that the
fallback list will also only contain system fonts, meaning that sending the font to the
GPUProcess is cheap (a file path instead of actual data).

(WebCore::DisplayList::Recorder::Recorder):

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

(WebCore::FontCascade::displayListForTextRun const):
Drive-by: Rename DrawGlyphsDeconstruction to DeconstructDrawGlyphs as it reads better.

Source/WebCore/PAL:

  • pal/spi/cg/CoreGraphicsSPI.h:
2:03 PM Changeset in webkit [283338] by Russell Epstein
  • 2 edits in branches/safari-612.2.9.1-branch/Source/WebKit

Cherry-pick r283294. rdar://problem/83733583

Add weakThis check in addition to null check added in r282881
https://bugs.webkit.org/show_bug.cgi?id=231000
<rdar://83605614>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-09-29
Reviewed by Brady Eidson.

r282881 made NetworkLoad::start call didCompleteWithError, which can cause the
NetworkResourceLoader to be deleted. It added a null check on m_networkLoad which
sometimes reads freed memory. This certainly isn't great, but luckily we have a way
to check if this object has been deleted. Let's do that.

  • NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::startNetworkLoad):

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

2:00 PM Changeset in webkit [283337] by Russell Epstein
  • 2 edits in branches/safari-612.2.9.3-branch/Source/WebKit

Cherry-pick r283294. rdar://problem/83733561

Add weakThis check in addition to null check added in r282881
https://bugs.webkit.org/show_bug.cgi?id=231000
<rdar://83605614>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-09-29
Reviewed by Brady Eidson.

r282881 made NetworkLoad::start call didCompleteWithError, which can cause the
NetworkResourceLoader to be deleted. It added a null check on m_networkLoad which
sometimes reads freed memory. This certainly isn't great, but luckily we have a way
to check if this object has been deleted. Let's do that.

  • NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::startNetworkLoad):

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

1:59 PM Changeset in webkit [283336] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.1-branch/Source

Versioning.

WebKit-7612.2.9.1.2

1:58 PM Changeset in webkit [283335] by Simon Fraser
  • 15 edits in trunk/Source/WebCore

Replace the confusing isPinnedForScrollDelta() logic with code that uses BoxSide
https://bugs.webkit.org/show_bug.cgi?id=231004

Reviewed by Tim Horton.

isPinnedForScrollDelta()/isPinnedForScrollDeltaOnAxis() are ambiguous because it's
easy to interpret them as looking at the magnitude of the delta to determine whether
the delta will cause stretching on an edge. However, they don't do this; they simply
use the delta to choose which edge to look at, and the "is pinned" refers to whether
the scroller is already scrolled to that edge or stretching at that edge.

To reduce ambiguity, rewrite the code in terms of BoxSides, separating the code
that determines which BoxSide to look at for a given event delta from the code that
computed pinned state. It's now clearer that it's the caller's responsibility to
do "dominant axis" delta transformations too.

  • page/EventHandler.cpp:

(WebCore::EventHandler::scrollableAreaCanHandleEvent):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::mainFrameCanRubberBandOnSide):
(WebCore::ScrollingTree::mainFrameCanRubberBandInDirection): Deleted.

  • page/scrolling/ScrollingTree.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:

(WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsHorizontalStretching const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsVerticalStretching const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::isPinnedOnSide const): Remove the old "scrollOffsetLimit" threshold. Our scroll offsets
are currently all integral so I don't think this did anything.
(WebCore::ScrollingTreeScrollingNodeDelegateMac::shouldRubberBandOnSide const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::isPinnedForScrollDeltaOnAxis const): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateMac::isPinnedForScrollDelta const): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateMac::shouldRubberBandInDirection const): Deleted.

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::isPinnedOnSide const):
(WebCore::ScrollAnimator::isPinnedForScrollDelta const): Deleted.

  • platform/ScrollAnimator.h:
  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::isPinnedOnSide const):
(WebCore::ScrollableArea::targetSideForScrollDelta):
(WebCore::ScrollableArea::isPinnedForScrollDeltaOnAxis const): Deleted.
(WebCore::ScrollableArea::isPinnedForScrollDelta const): Deleted.

  • platform/ScrollableArea.h:
  • platform/ScrollingEffectsController.h:
  • platform/ios/ScrollAnimatorIOS.mm:

(WebCore::ScrollAnimatorIOS::determineScrollableAreaForTouchSequence):

  • platform/mac/ScrollAnimatorMac.h:
  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::allowsVerticalStretching const):
(WebCore::ScrollAnimatorMac::allowsHorizontalStretching const):
(WebCore::ScrollAnimatorMac::shouldRubberBandOnSide const):
(WebCore::ScrollAnimatorMac::shouldRubberBandInDirection const): Deleted.

  • platform/mac/ScrollingEffectsController.mm:

(WebCore::dominantAxisFavoringVertical):
(WebCore::deltaAlignedToAxis):
(WebCore::deltaAlignedToDominantAxis):
(WebCore::affectedSideOnDominantAxis):
(WebCore::isHorizontalSide):
(WebCore::isVerticalSide):
(WebCore::ScrollingEffectsController::handleWheelEvent):
(WebCore::ScrollingEffectsController::wheelDeltaBiasingTowardsVertical):
(WebCore::ScrollingEffectsController::shouldRubberBandOnSide const):
(WebCore::convertToProminentAxisFavoringVertical): Deleted.
(WebCore::ScrollingEffectsController::directionFromEvent): Deleted.
(WebCore::ScrollingEffectsController::shouldRubberBandInHorizontalDirection const): Deleted.
(WebCore::ScrollingEffectsController::shouldRubberBandInDirection const): Deleted.

1:51 PM Changeset in webkit [283334] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.3-branch/Source

Versioning.

WebKit-7612.2.9.3.1

1:44 PM Changeset in webkit [283333] by chris.reid@sony.com
  • 3 edits in trunk/Source/WebKit

Fix !ENABLE(WIRELESS_PLAYBACK_TARGET) build after r283319
https://bugs.webkit.org/show_bug.cgi?id=231036

Unreviewed build fix.

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp: MediaPlaybackTargetContext.h is already included with WIRELESS_PLAYBACK_TARGET
  • GPUProcess/media/RemoteMediaPlayerProxy.h:
1:37 PM Changeset in webkit [283332] by sbarati@apple.com
  • 5 edits
    3 adds in trunk

The DFG/FTL need to be aware that Proxy's can produce "function" for typeof and might be callable
https://bugs.webkit.org/show_bug.cgi?id=230804
<rdar://problem/83543951>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/ai-typeof-needs-to-be-aware-of-proxy-2.js: Added.

(assert):
(builtin.vm.createBuiltin):
(builtin2.vm.createBuiltin):
(let.p.new.Proxy):

  • stress/ai-typeof-needs-to-be-aware-of-proxy.js: Added.

(assert):
(builtin.vm.createBuiltin):
(let.p.new.Proxy):

  • stress/is-callable-in-ftl-needs-to-be-aware-of-proxy.js: Added.

(main):

Source/JavaScriptCore:

This patch fixes a couple bugs:

  • We were constant folding typeof on ProxyObject to "object" even when ProxyObject might produce a callable Proxy, and hence, should produce "function". This was a bug in AI.
  • This also fixes a similar bug in IsCallable's implementation in the FTL where we assumed that ProxyObject's type can't be callable.
  • bytecode/SpeculatedType.h:
  • dfg/DFGAbstractInterpreterInlines.h:

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

  • ftl/FTLLowerDFGToB3.cpp:

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

1:21 PM Changeset in webkit [283331] by Devin Rousso
  • 3 edits in trunk/Source/WebCore

[GPU Process] support rendering Apple Pay buttons
https://bugs.webkit.org/show_bug.cgi?id=230648
<rdar://problem/72061985>

Reviewed by Tim Horton.

  • rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::paintApplePayButton):
Instead of drawing directly into the GraphicsContext::platformContext (which will not be
valid in the WebProcess when DOM rendering happens in the GPUProcess), first draw into a
temporary ImageBuffer and then consume it to draw into the actual/used GraphicsContext.
While it is possible to create a dedicated display list item for this, we don't want to do
that because PKDrawApplePayButtonWithCornerRadius involves dealing with PDFs, which are
not as secure as we'd like for use in the GPUProcess.

1:17 PM Changeset in webkit [283330] by Alan Coon
  • 2 edits in branches/safari-612.2.9.2-branch/Source/WebKit

Cherry-pick r283294. rdar://problem/83733551

Add weakThis check in addition to null check added in r282881
https://bugs.webkit.org/show_bug.cgi?id=231000
<rdar://83605614>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-09-29
Reviewed by Brady Eidson.

r282881 made NetworkLoad::start call didCompleteWithError, which can cause the
NetworkResourceLoader to be deleted. It added a null check on m_networkLoad which
sometimes reads freed memory. This certainly isn't great, but luckily we have a way
to check if this object has been deleted. Let's do that.

  • NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::startNetworkLoad):

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

1:13 PM Changeset in webkit [283329] by Fujii Hironori
  • 4 edits in trunk

Python 3 fails to run run-builtins-generator-tests : ModuleNotFoundError: No module named 'builtins_model'
https://bugs.webkit.org/show_bug.cgi?id=230870

Reviewed by Jonathan Bedard.

Source/JavaScriptCore:

BaseException.message has been deprecated as of Python 2.6. Use
str(e) instead.

Implicit relative imports have been deprecated in Python 3.
Basically, relative imports should be used. However, the scripts
in wkbuiltins directory are flattened when they are copied to
WebKitBuild directory. So, relative imports can't be used.

So, append wkbuiltins directory to sys.path as a workaround.

  • Scripts/generate-js-builtins.py:

Tools:

After r282424 (Bug 229879) switched to python3 for running
run-builtins-generator-tests on Buildbot, only WinCairo buildbot
was failing run-builtins-generator-tests.

run-builtins-generator-tests was invoking generate-js-builtins.py
explictly with 'python'. This is Python 2 on other bots.

Use sys.executable instead of 'python' to invoke
generate-js-builtins.py.

  • Scripts/webkitpy/codegen/main.py:

(BuiltinsGeneratorTests.generate_from_js_builtins):

1:05 PM Changeset in webkit [283328] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[GPUP] Add syscall filter telemetry
https://bugs.webkit.org/show_bug.cgi?id=230960
<rdar://problem/83674166>

Reviewed by Brent Fulgham.

Add syscall filter telemetry in the GPU process' sandbox on iOS and macOS.
Syscall observed being in use are added without telemetry.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
1:05 PM Changeset in webkit [283327] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Add syscall filter telemetry for the Networking process
https://bugs.webkit.org/show_bug.cgi?id=230961
<rdar://problem/83674634>

Reviewed by Brent Fulgham.

Add syscall filter telemetry for the Networking process on iOS and macOS.
Syscalls that are known to be used are added without telemetry.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1:05 PM Changeset in webkit [283326] by Alan Coon
  • 2 edits in branches/safari-612.2.9.0-branch/Source/WebKit

Cherry-pick r283294. rdar://problem/83733571

Add weakThis check in addition to null check added in r282881
https://bugs.webkit.org/show_bug.cgi?id=231000
<rdar://83605614>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-09-29
Reviewed by Brady Eidson.

r282881 made NetworkLoad::start call didCompleteWithError, which can cause the
NetworkResourceLoader to be deleted. It added a null check on m_networkLoad which
sometimes reads freed memory. This certainly isn't great, but luckily we have a way
to check if this object has been deleted. Let's do that.

  • NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::startNetworkLoad):

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

1:04 PM Changeset in webkit [283325] by Alan Coon
  • 8 edits in branches/safari-612.2.9.2-branch/Source

Versioning.

WebKit-7612.2.9.2.1

12:59 PM Changeset in webkit [283324] by Alan Coon
  • 8 edits in branches/safari-612.2.9.0-branch/Source

Versioning.

WebKit-7612.2.9.0.2

12:53 PM Changeset in webkit [283323] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[macOS] Reduce sandbox telemetry
https://bugs.webkit.org/show_bug.cgi?id=231026
<rdar://83694937>

Reviewed by Brent Fulgham.

Remove sandbox telemetry for resources that we already see are in use.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
12:23 PM Changeset in webkit [283322] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Web Audio panner node quality deteriorates over time
https://bugs.webkit.org/show_bug.cgi?id=230950
<rdar://problem/83675934>

Reviewed by Eric Carlson.

When profiling the test case, I noticed what we were spending most of the CPU time
under AudioParamTimeline::valuesForFrameRangeImpl() / isEventCurrent() called from
PannerNode::process(). The reason for that is that the number of events in the
AudioParamTimeline would keep growing unboundedly and it would make the
valuesForFrameRangeImpl() implementation more and more expensive over time, since
it has to iterate over all events.

To address the issue, valuesForFrameRangeImpl() now keeps track of the events
that it had to skip because they were in the past. Then, at the end of the loop,
it removes the outdated events so it won't have to iterate over them the next
time around. This behavior is similar to what Blink does.

  • Modules/webaudio/AudioParamTimeline.cpp:

(WebCore::AudioParamTimeline::removeOldEvents):
(WebCore::AudioParamTimeline::valuesForFrameRangeImpl):

  • Modules/webaudio/AudioParamTimeline.h:
12:15 PM Changeset in webkit [283321] by Ziran Sun
  • 4 edits in trunk

[css-grid] Transfer sizes from the aspect-ratio while resolving min-length for auto repetitions
https://bugs.webkit.org/show_bug.cgi?id=230676

Source/WebCore:

Reviewed by Sergio Villar Senin.

When resolving min-length for auto repetitions, if the min-length on the axis considered is not specified,
we need to check if the min-length on the other axis and the aspect ratio are specified. When both are
specified, we will fetch the transferred min-length for the axis we are considering.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::computeAutoRepeatTracksCount const):

LayoutTests:

Reviewed by Sergio Villar Senin.

Updated TestExpectations file as two tests with image failures are now passing.

10:48 AM Changeset in webkit [283320] by commit-queue@webkit.org
  • 27 edits in trunk/Source

Adopt presentationSceneIdentifierForPaymentAuthorizationController delegate call from PassKit
https://bugs.webkit.org/show_bug.cgi?id=230874

Patch by Eddy Wong <eddy_wong@apple.com> on 2021-09-30
Reviewed by Devin Rousso.

Source/WebKit:

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm:

(WebKit::NetworkConnectionToWebProcess::getWindowSceneIdentifierForPaymentPresentation): Implements getWindowSceneIdentifierForPaymentPresentation() by asking parent process (UIProcess) for scene ID via new XPC message.

  • Platform/cocoa/PaymentAuthorizationPresenter.h:

(WebKit::PaymentAuthorizationPresenter::sceneIdentifier const): Holds temporarily the scene ID we'd like to use when presenting the payment sheet, to be read by WKPaymentAuthorizationControllerDelegate.

  • Platform/cocoa/PaymentAuthorizationViewController.h: Declares presentInScene() which is just for conformance to PaymentAuthorizationPresenter
  • Platform/cocoa/PaymentAuthorizationViewController.mm:

(WebKit::PaymentAuthorizationViewController::presentInScene): Provides a dummy implementation for presentInScene() for conformance.

  • Platform/cocoa/WKPaymentAuthorizationDelegate.h: Surfaces _presenter for PaymentAuthorizationPresenter's use.
  • Platform/cocoa/WKPaymentAuthorizationDelegate.mm: Ditto.
  • Platform/ios/PaymentAuthorizationController.h:
  • Platform/ios/PaymentAuthorizationController.mm:

(-[WKPaymentAuthorizationControllerDelegate presentationSceneIdentifierForPaymentAuthorizationController:]): Implements the new PassKit delegate call returning the scene ID for the UIProcess.
(WebKit::PaymentAuthorizationController::dismiss): House keeping.
(WebKit::PaymentAuthorizationController::presentInScene): Stores the scene ID from the caller for WKPaymentAuthorizationControllerDelegate to read from.

  • Shared/ApplePay/WebPaymentCoordinatorProxy.cpp:

(WebKit::WebPaymentCoordinatorProxy::showPaymentUI): Relays webPageProxyID for use by UIProcess ultimately to look up the correct WebPageProxy.

  • Shared/ApplePay/WebPaymentCoordinatorProxy.h: Ditto.
  • Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in: Ditto.
  • Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:

(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI): Presents payment sheet with scene ID if applicable.

  • Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:

(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI): Signature change.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::getWindowSceneIdentifierForPaymentPresentation): Looks up the correct WebPageProxy and retrieve the scene ID for the caller (NetworkProcess).

  • UIProcess/Network/NetworkProcessProxy.h: Ditto.
  • UIProcess/Network/NetworkProcessProxy.messages.in: Ditto.
  • UIProcess/PageClient.h: Adds ability to retrieve scene ID.
  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/PageClientImplIOS.h: Ditto.
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::sceneID): Ditto.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::getWindowSceneIdentifierForPaymentPresentation): Dummy implementation for conformance to WebPageProxy. WebProcess does not talk to UIProcess directly for this function.

  • WebProcess/ApplePay/WebPaymentCoordinator.cpp:

(WebKit::WebPaymentCoordinator::showPaymentUI): Passes the WebPageProxyIdentifier along.

Source/WTF:

  • wtf/PlatformEnableCocoa.h: Defines new flag ENABLE_APPLE_PAY_REMOTE_UI_USES_SCENE
10:39 AM Changeset in webkit [283319] by Ryan Haddad
  • 3 edits in trunk/Source/WebKit

Unreviewed Catalyst build fix; forward-declare in RemoteMediaPlayerProxy.h and include the correct file in RemoteMediaPlayerProxy.cpp.

Patch by Jer Noble <jer.noble@apple.com> on 2021-09-30

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:
  • GPUProcess/media/RemoteMediaPlayerProxy.h:
10:11 AM Changeset in webkit [283318] by commit-queue@webkit.org
  • 8 edits
    2 copies
    5 adds
    1 delete in trunk/LayoutTests

[GLIB] Rebaseline a number of tests. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=230996

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-09-30

  • platform/glib/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window-expected.txt: Added.
  • platform/glib/http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt:
  • platform/glib/security/block-test-expected.txt:
  • platform/gtk/fast/encoding/charset-replacement-expected.txt: Copied from LayoutTests/platform/glib/fast/encoding/charset-replacement-expected.txt.
  • platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/gtk/inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
  • platform/wpe/fast/encoding/charset-replacement-expected.txt: Renamed from LayoutTests/platform/glib/fast/encoding/charset-replacement-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
10:09 AM Changeset in webkit [283317] by Darin Adler
  • 2 edits in trunk/Source/WTF

Add StdLibExtras.h include to a file that uses bitwise_cast without including it
https://bugs.webkit.org/show_bug.cgi?id=231027

Reviewed by Yusuke Suzuki.

  • wtf/RawPtrTraits.h: Include StdLibExtras.h.
9:22 AM Changeset in webkit [283316] by wilander@apple.com
  • 35 edits
    2 adds in trunk

PCM: Take app bundle ID into consideration when matching triggering events with pending clicks
https://bugs.webkit.org/show_bug.cgi?id=230778
<rdar://problem/83516528>

Reviewed by Alex Christensen.

https://commits.webkit.org/r282884 added app bundle IDs to unattributed
and attributed clicks in PCM. This patch makes sure we take those IDs
into consideration in PCM::Database::attributePrivateClickMeasurement().

Source/WebCore:

The WebCore part makes sure that a temporary app bundle ID can be set
on attributions that get stored in PCM's database.

Test: http/tests/privateClickMeasurement/multiple-app-bundle-ids.html

  • loader/PrivateClickMeasurement.cpp:

(WebCore::PrivateClickMeasurement::setSourceApplicationBundleIDForTesting):

  • loader/PrivateClickMeasurement.h:

Source/WebKit:

A lot of the WebKit part is:

  • Piping through app bundle IDs from the network session to the PCM

database where the ID will be matched against stored app bundle IDs.

  • Piping through test configuration for app bundle ID.

The real change is in PCM::Database which is explained below.

Test: http/tests/privateClickMeasurement/multiple-app-bundle-ids.html

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::setPrivateClickMeasurementAppBundleIDForTesting):

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

(WebKit::NetworkSession::handlePrivateClickMeasurementConversion):
(WebKit::NetworkSession::setPrivateClickMeasurementAppBundleIDForTesting):

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:

(WebKit::PCM::Database::findPrivateClickMeasurement):

Now takes an app bundle ID supplied from the network session and
includes it in the database query to find matching entries. If and
attribution was saved with app bundle ID XYZ, it should only be
be converted in an application with app bundle ID XYZ.

(WebKit::PCM::Database::attributePrivateClickMeasurement):

This function calls PCM::Database::findPrivateClickMeasurement()
which needs the app bundle ID so that ID is forwarded through.

(WebKit::PCM::Database::removeUnattributed):

Also needs to take the app bundle ID into consideration.

(WebKit::PCM::Database::clearSentAttribution):

Also needs to take the app bundle ID into consideration.

(WebKit::PCM::Database::markReportAsSentToDestination):

Also needs to take the app bundle ID into consideration.

(WebKit::PCM::Database::markReportAsSentToSource):

Also needs to take the app bundle ID into consideration.

(WebKit::PCM::Database::earliestTimesToSend):

Also needs to take the app bundle ID into consideration.

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::storeUnattributed):
(WebKit::PrivateClickMeasurementManager::handleAttribution):
(WebKit::PrivateClickMeasurementManager::setPrivateClickMeasurementAppBundleIDForTesting):
(WebKit::PrivateClickMeasurementManager::attribute):
(WebKit::PrivateClickMeasurementManager::clear):

Clears the test setting for app bundle ID.

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerInterface.cpp:

(WebKit::PCM::messageTypeSendsReply):
(WebKit::PCM::decodeMessageAndSendToManager):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerInterface.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerProxy.cpp:

(WebKit::PCM::ManagerProxy::handleAttribution):
(WebKit::PCM::ManagerProxy::setPrivateClickMeasurementAppBundleIDForTesting):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManagerProxy.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.cpp:

(WebKit::PCM::Store::attributePrivateClickMeasurement):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.h:
  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPCMFraudPreventionValuesForTesting):
(WKPageSetPrivateClickMeasurementAppBundleIDForTesting):

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm:

(-[WKWebView _setPrivateClickMeasurementAppBundleIDForTesting:completionHandler:]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setPrivateClickMeasurementAppBundleIDForTesting):

  • UIProcess/WebPageProxy.h:

Tools:

The TestRunner changes are all test infrastructure to enable different
app bundle IDs in the eyes of PCM. The API test changes are to make use
of the app bundle ID test infrastructure.

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::runBasicEventAttributionTest):
(TestWebKitAPI::TEST):

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

(WTR::TestRunner::setPrivateClickMeasurementAppBundleIDForTesting):

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

(WTR::TestController::setPrivateClickMeasurementAppBundleIDForTesting):

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/privateClickMeasurement/multiple-app-bundle-ids-expected.txt: Added.
  • http/tests/privateClickMeasurement/multiple-app-bundle-ids.html: Added.
  • http/tests/privateClickMeasurement/resources/util.js:

(tearDownAndFinish):

9:05 AM Changeset in webkit [283315] by youenn@apple.com
  • 6 edits in trunk/Source

Support AES GCM ciphers in WebRTC
https://bugs.webkit.org/show_bug.cgi?id=214402
<rdar://problem/65700381>

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:

Source/WebCore:

Enable GCM ciphers in WebRTC as done by Chrome.
The default ciphers remain the same so use of these ciphers is opt-in by SFUs.

Manually tested.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::setConfiguration):

8:43 AM Changeset in webkit [283314] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] RootInlineBox should use the first-line style when applicable
https://bugs.webkit.org/show_bug.cgi?id=231003

Reviewed by Antti Koivisto.

This is in preparation for supporting first-line style.

  • layout/formattingContexts/inline/InlineLineBox.cpp:

(WebCore::Layout::LineBox::LineBox):

  • layout/formattingContexts/inline/InlineLineBox.h:
  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::LineBoxBuilder::build):

8:42 AM Changeset in webkit [283313] by commit-queue@webkit.org
  • 15 edits in trunk

Clean up PrivateClickMeasurement
https://bugs.webkit.org/show_bug.cgi?id=230978

Patch by Alex Christensen <achristensen@webkit.org> on 2021-09-30
Reviewed by Kate Cheney.

Source/WebCore:

In r270669 I added sourceDescription and purchaser to PrivateClickMeasurement,
but they're actually only needed for the UIEventAttribution getter on WKWebView.
I moved them to a new struct PrivateClickMeasurementAndMetadata which stores this additional
information only on WebPageProxy instead of all the PCM infrastructure.

I reduced the size of SourceID.id to 1 byte. Now a SourceID is always valid, so we don't need
to check after it has been created. We still check when creating one from parsing web content,
but everywhere else we know that it is valid because of its type.

I removed the default constructor of PrivateClickMeasurement and default parameter values.
There aren't very many places where we construct one except for the tests, and it's good to see
what values we are using so we don't forget anything.

No change in behavior.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):

  • loader/PrivateClickMeasurement.cpp:

(WebCore::PrivateClickMeasurement::isValid const):
(WebCore::PrivateClickMeasurement::isolatedCopy const):
(WebCore::PrivateClickMeasurement::parseAttributionRequest):

  • loader/PrivateClickMeasurement.h:

(WebCore::PrivateClickMeasurement::SourceID::SourceID):
(WebCore::PrivateClickMeasurement::Priority::Priority):
(WebCore::PrivateClickMeasurement::AttributionTriggerData::AttributionTriggerData):
(WebCore::PrivateClickMeasurement::PrivateClickMeasurement):
(WebCore::PrivateClickMeasurement::isEphemeral const):
(WebCore::PrivateClickMeasurement::setEphemeral):
(WebCore::PrivateClickMeasurement::encode const):
(WebCore::PrivateClickMeasurement::decode):
(WebCore::PrivateClickMeasurement::AttributionTriggerData::decode):
(WTF::HashTraits<WebCore::PrivateClickMeasurement::SourceSite>::emptyValue):
(WebCore::PrivateClickMeasurement::SourceID::isValid const): Deleted.
(WebCore::PrivateClickMeasurement::sourceDescription const): Deleted.
(WebCore::PrivateClickMeasurement::purchaser const): Deleted.

Source/WebKit:

  • NetworkProcess/DatabaseUtilities.cpp:

(WebKit::DatabaseUtilities::buildPrivateClickMeasurementFromDatabase const):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::insertPrivateClickMeasurement):

  • UIProcess/API/Cocoa/WKWebViewTesting.mm:

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

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _setUIEventAttribution:]):
(-[WKWebView _uiEventAttribution]):
(-[WKWebView _setEphemeralUIEventAttribution:forApplicationWithBundleID:]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::createNewPage):

  • UIProcess/WebPageProxy.h:

Tools:

I removed the InvalidSourceID test because it is now impossible to make an invalid source ID
because it uses a uint8_t and allows the values 0-255.

  • TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::TEST):

8:26 AM Changeset in webkit [283312] by Alan Bujtas
  • 7 edits
    2 adds in trunk

(REGRESSION r282150) Missing background-color on inline box while hovering
https://bugs.webkit.org/show_bug.cgi?id=230977
<rdar://problem/83682736>

Reviewed by Antti Koivisto.

Source/WebCore:

Check if the RenderInline is still eligible for the modern line layout codepath after style change.

Test: fast/inline/inline-box-background-dynamic.html

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForRenderInlineChild):
(WebCore::LayoutIntegration::canUseForChild):
(WebCore::LayoutIntegration::canUseForLineLayoutAfterInlineBoxStyleChange):

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

(WebCore::LayoutIntegration::LineLayout::canUseForAfterInlineBoxStyleChange):

  • layout/integration/LayoutIntegrationLineLayout.h:
  • rendering/RenderInline.cpp:

(WebCore::RenderInline::styleDidChange):

LayoutTests:

  • fast/inline/inline-box-background-dynamic-expected.html: Added.
  • fast/inline/inline-box-background-dynamic.html: Added.
7:53 AM Changeset in webkit [283311] by Antti Koivisto
  • 9 edits
    2 adds in trunk

Source/WebCore:
Regression (283158): Having unused TextIterator instance shouldn't crash if document is mutated
https://bugs.webkit.org/show_bug.cgi?id=231013
rdar://83690985

Reviewed by Alan Bujtas.

By using bundle APIs it is possible to create a retained TextIterator and hit CheckedPtr assertion because layout
is torn down while iterator still exists. This is not dangerous in itself so can be supported.

This patch ensures LineLayout disconnects cleanly from (refcounted) InlineContent.

Test: editing/text-iterator/text-iterator-document-mutation.html

  • layout/integration/LayoutIntegrationInlineContent.cpp:

(WebCore::LayoutIntegration::InlineContent::clearAndDetach):

Remove all content and clear the LineLayout pointer.

This is safe since iterators refer to content via indexes and any attempt to access
via them will hit nullptrs or vector asserts.

  • layout/integration/LayoutIntegrationInlineContent.h:

(WebCore::LayoutIntegration::InlineContent::lineLayout const):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::~LineLayout):
(WebCore::LayoutIntegration::LineLayout::layout):
(WebCore::LayoutIntegration::LineLayout::hitTest):
(WebCore::LayoutIntegration::LineLayout::clearInlineContent):

Clear InlineContent before nulling it as it can still be kept alive by iterators.

  • layout/integration/LayoutIntegrationLineLayout.h:
  • testing/Internals.cpp:

(WebCore::Internals::retainTextIteratorForDocumentContent):

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

LayoutTests:
Having unused TextIterator instance shouldn't crash if document is mutated
https://bugs.webkit.org/show_bug.cgi?id=231013
rdar://83690985

Reviewed by Alan Bujtas.

  • editing/text-iterator/text-iterator-document-mutation-expected.txt: Added.
  • editing/text-iterator/text-iterator-document-mutation.html: Added.
6:41 AM Changeset in webkit [283310] by Lauro Moura
  • 27 edits in trunk/LayoutTests

[WPE] Rebaseline a number of text-only text-related failures

Unreviewed test gardening.

Also small spacing diffs like the previous gardening commit.

  • platform/wpe/fast/encoding/invalid-UTF-8-expected.txt:
  • platform/wpe/fast/events/updateLayoutForHitTest-expected.txt:
  • platform/wpe/fast/multicol/vertical-rl/float-multicol-expected.txt:
  • platform/wpe/fast/multicol/vertical-rl/nested-columns-expected.txt:
  • platform/wpe/fast/table/col-and-colgroup-offsets-expected.txt:
  • platform/wpe/fast/text/capitalize-boundaries-expected.txt:
  • platform/wpe/fast/text/emoji-expected.txt:
  • platform/wpe/fast/text/fallback-traits-fixup-expected.txt:
  • platform/wpe/fast/text/fixed-pitch-control-characters-expected.txt:
  • platform/wpe/fast/text/in-rendered-text-rtl-expected.txt:
  • platform/wpe/fast/text/international/bidi-L2-run-reordering-expected.txt:
  • platform/wpe/fast/text/international/bidi-LDB-2-CSS-expected.txt:
  • platform/wpe/fast/text/international/bidi-LDB-2-HTML-expected.txt:
  • platform/wpe/fast/text/international/bidi-LDB-2-formatting-characters-expected.txt:
  • platform/wpe/fast/text/international/bidi-european-terminators-expected.txt:
  • platform/wpe/fast/text/international/bidi-ignored-for-first-child-inline-expected.txt:
  • platform/wpe/fast/text/international/bidi-innertext-expected.txt:
  • platform/wpe/fast/text/international/bidi-listbox-atsui-expected.txt:
  • platform/wpe/fast/text/international/bidi-listbox-expected.txt:
  • platform/wpe/fast/text/international/bidi-menulist-expected.txt:
  • platform/wpe/fast/text/international/bidi-override-expected.txt:
  • platform/wpe/fast/text/international/rtl-caret-expected.txt:
  • platform/wpe/fast/text/midword-break-after-breakable-char-expected.txt:
  • platform/wpe/fast/text/midword-break-before-surrogate-pair-expected.txt:
  • platform/wpe/fast/text/orientation-sideways-expected.txt:
  • platform/wpe/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt:
5:47 AM Changeset in webkit [283309] by eocanha@igalia.com
  • 5 edits in trunk

[MSE][GStreamer] Allow infinite duration on MSE
https://bugs.webkit.org/show_bug.cgi?id=231017

Reviewed by Alicia Boya Garcia.

Source/WebCore:

Positive infinite duration isn't properly working on MSE in the glib (GStreamer) ports. When
such a duration is set, nothing happens and the default zero duration remains. This can break
some live streams, because the wrong duration has influence in the real seek target time
used[1], so the seek may end up being done to the wrong time (before the buffered ranges in
my case) and the playback never starts.

[1] https://github.com/WebKit/WebKit/blob/a12c487/Source/WebCore/html/HTMLMediaElement.cpp#L3153

Covered by existing tests.

  • platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp:

(WebCore::MediaSourcePrivateGStreamer::durationChanged): Don't discard the change on infinite duration.

LayoutTests:

  • platform/glib/TestExpectations: mediasource-seekable.html now passes.
  • platform/glib/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit-expected.txt: Changed expectations because this test now passes for audio/mpeg <-> audio/mpeg.
5:47 AM Changeset in webkit [283308] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

GraphicsContextGLAttributes::hasFenceSync should be a property of GraphicsContextGLOpenGL
https://bugs.webkit.org/show_bug.cgi?id=230939

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-09-30
Reviewed by Antti Koivisto.

Move hasFenceSync from GraphicsContextGLAttributes to GraphicsContextGLOpenGL.

No new tests, a refactor.

  • platform/graphics/GraphicsContextGLAttributes.h:
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::prepareForDisplay):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
4:20 AM Changeset in webkit [283307] by youenn@apple.com
  • 8 edits in trunk

Layout Test imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=203256
<rdar://problem/56506063>

Reviewed by Eric Carlson.

Source/WebCore:

Test was flaky for a few reasons:

  • Setting local/remote descriptions may change the ICE transports in use so we need to update the ice connection state when setting local/remote descriptions.
  • We start observing ICE transport backend state asynchronously and we might miss the checking state which can happen very quickly. Synthesize it if needed.
  • We were using the ICE connection state value from the backend as well as computing it from our RTCIceTransport objects. We now fully compute it from RTCIceTransport objects. This ensures we have consistent state between RTCIceTransport and RTCPeerConnection objects with regards to ICE state.

Covered by no longer flaky test.

  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::updateIceGatheringState):
(WebCore::RTCPeerConnection::updateIceConnectionState):
(WebCore::RTCPeerConnection::computeIceConnectionStateFromIceTransports):

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/libwebrtc/LibWebRTCIceTransportBackend.cpp:

(WebCore::LibWebRTCIceTransportBackendObserver::start):

LayoutTests:

Mark webrtc/connection-state.html as flaky as it is probably too restrictive and should be reworked.

  • platform/mac-wk2/TestExpectations:

Unflake test.

1:42 AM Changeset in webkit [283306] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Unreviewed GTK build fix after r283304

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::registerRoot): Use Ref instead of makeRef.

12:45 AM Changeset in webkit [283305] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Unreviewed GTK build fix after r283304

  • accessibility/atspi/AccessibilityObjectAtspi.h: Move the final keyword to the right place.
12:37 AM Changeset in webkit [283304] by Carlos Garcia Campos
  • 25 edits
    2 copies
    25 adds in trunk/Source

[GTK][a11y] Connect UI process a11y tree with the web process when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=230255

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Add AccessibilityAtspi class to connect to the ATSPI DBus service using the address provided. Also add
AccessibilityRootAtspi class that will be the parent object of the accessibility root wrapper, and the children
of the UI process web view. In ATK the AtkSocket and AtkPlug use a private DBus message to send the unique name
of the UI process connection to the web process. That's not possible with GDBus, so we wait for the first
GetState message to be received (which is called right after atk_socket_embed() is called in the UI process) to
get the unique name of the UI process connection. PlatformDisplay has now API to get the DBus address of the
ATSPI service. This is used only in the UI process that sends the address to the web process, so that we don't
need to get it on every web process again.

  • PlatformGTK.cmake:
  • SourcesGTK.txt:
  • accessibility/atspi/AccessibilityAtspi.cpp: Added.

(WebCore::AccessibilityAtspi::AccessibilityAtspi):
(WebCore::AccessibilityAtspi::uniqueName const):
(WebCore::AccessibilityAtspi::nullReference const):
(WebCore::AccessibilityAtspi::registerRoot):

  • accessibility/atspi/AccessibilityAtspi.h: Added.
  • accessibility/atspi/AccessibilityRootAtspi.cpp: Added.

(WebCore::AccessibilityRootAtspi::create):
(WebCore::AccessibilityRootAtspi::AccessibilityRootAtspi):
(WebCore::AccessibilityRootAtspi::registerObject):
(WebCore::AccessibilityRootAtspi::setPath):
(WebCore::AccessibilityRootAtspi::setParentPath):
(WebCore::AccessibilityRootAtspi::applicationReference const):
(WebCore::AccessibilityRootAtspi::reference const):

  • accessibility/atspi/AccessibilityRootAtspi.h: Added.

(WebCore::AccessibilityRootAtspi::atspi const):

  • accessibility/atspi/xml/Accessibility.xml: Added.
  • accessibility/atspi/xml/Accessible.xml: Added.
  • accessibility/atspi/xml/Action.xml: Added.
  • accessibility/atspi/xml/Application.xml: Added.
  • accessibility/atspi/xml/Cache.xml: Added.
  • accessibility/atspi/xml/Collection.xml: Added.
  • accessibility/atspi/xml/Component.xml: Added.
  • accessibility/atspi/xml/DeviceEventController.xml: Added.
  • accessibility/atspi/xml/DeviceEventListener.xml: Added.
  • accessibility/atspi/xml/Document.xml: Added.
  • accessibility/atspi/xml/EditableText.xml: Added.
  • accessibility/atspi/xml/Event.xml: Added.
  • accessibility/atspi/xml/Hyperlink.xml: Added.
  • accessibility/atspi/xml/Hypertext.xml: Added.
  • accessibility/atspi/xml/Image.xml: Added.
  • accessibility/atspi/xml/Registry.xml: Added.
  • accessibility/atspi/xml/Selection.xml: Added.
  • accessibility/atspi/xml/Socket.xml: Added.
  • accessibility/atspi/xml/Table.xml: Added.
  • accessibility/atspi/xml/TableCell.xml: Added.
  • accessibility/atspi/xml/Text.xml: Added.
  • accessibility/atspi/xml/Value.xml: Added.
  • platform/graphics/PlatformDisplay.cpp:

(WebCore::PlatformDisplay::createPlatformDisplay):
(WebCore::PlatformDisplay::accessibilityBusAddress const):

  • platform/graphics/PlatformDisplay.h:

(WebCore::PlatformDisplay::setAccessibilityBusAddress):
(WebCore::PlatformDisplay::plartformAccessibilityBusAddress const):

  • platform/graphics/x11/PlatformDisplayX11.cpp:

(WebCore::PlatformDisplayX11::plartformAccessibilityBusAddress const):

  • platform/graphics/x11/PlatformDisplayX11.h:

Source/WebKit:

Change BindAccessibilityTree IPC message API to have an async reply. When using ATSPI the UI process replies to
the message including the object path of the AtkSocket, to be used by the web process root object as its parent
property (building the reference with the UI process unique name we get from GetState message).

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const): Encode accessibilityBusAddress.
(WebKit::WebProcessCreationParameters::decode): Decode accessibilityBusAddress.

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::bindA11y): Set the accessibilityBusAddress to the shared PlatformDisplay so that it doesn't need to be
get again.

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
(WebKit::ProvisionalPageProxy::bindAccessibilityTree):
(WebKit::ProvisionalPageProxy::didReceiveMessage):

  • UIProcess/ProvisionalPageProxy.h:

(WebKit::ProvisionalPageProxy::CompletionHandler<void):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::swapToProvisionalPage):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/glib/WebProcessPoolGLib.cpp:

(WebKit::WebProcessPool::platformInitializeWebProcess): Set the accessibilityBusAddress parameter.

  • UIProcess/gtk/WebPageProxyGtk.cpp:

(WebKit::WebPageProxy::bindAccessibilityTree): Call atk_object_ref_state_set() right after atk_socket_embed() to
make sure that's the first GetState message received by the web process root object. Then build the AtkSocket
path and send the async reply.

  • UIProcess/wpe/WebPageProxyWPE.cpp:

(WebKit::WebPageProxy::bindAccessibilityTree):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::accessibilityRootObject const):

  • WebProcess/WebPage/gtk/WebPageGtk.cpp:

(WebKit::WebPage::platformInitialize): Create the root object and send BindAccessibilityTree to the UI process,
setting the root object parent path using the socket path received from the UI process.

  • WebProcess/WebPage/wpe/WebPageWPE.cpp:

(WebKit::WebPage::platformInitialize):

  • WebProcess/WebProcess.h:

(WebKit::WebProcess::accessibilityAtspi const):

  • WebProcess/glib/WebProcessGLib.cpp:

(WebKit::WebProcess::platformInitializeWebProcess): Create the AccessibilityAtspi instance for the given address.

Sep 29, 2021:

10:41 PM Changeset in webkit [283303] by youenn@apple.com
  • 4 edits
    10 adds in trunk/LayoutTests

Import WPT push api tests
https://bugs.webkit.org/show_bug.cgi?id=230945

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • web-platform-tests/push-api/META.yml: Added.
  • web-platform-tests/push-api/idlharness.https.any-expected.txt: Added.
  • web-platform-tests/push-api/idlharness.https.any.html: Added.
  • web-platform-tests/push-api/idlharness.https.any.js: Added.
  • web-platform-tests/push-api/idlharness.https.any.serviceworker-expected.txt: Added.
  • web-platform-tests/push-api/idlharness.https.any.serviceworker.html: Added.
  • web-platform-tests/push-api/idlharness.https.any.worker-expected.txt: Added.
  • web-platform-tests/push-api/idlharness.https.any.worker.html: Added.
  • web-platform-tests/push-api/w3c-import.log: Added.

LayoutTests:

  • platform/mac-wk1/TestExpectations:

Skip tests in WK1

10:39 PM Changeset in webkit [283302] by youenn@apple.com
  • 3 edits
    2 adds in trunk/LayoutTests

Import WPT notification service worker test
https://bugs.webkit.org/show_bug.cgi?id=230944

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/notifications/idlharness.https.any.serviceworker.html: Added.

LayoutTests:

  • platform/mac-wk1/TestExpectations:

Skip test in WK1

10:30 PM Changeset in webkit [283301] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

GPUP Cocoa GraphicsContextGLOpenGL should check for ANGLE presence
https://bugs.webkit.org/show_bug.cgi?id=230946

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

For consistency, avoid crashing the GPUP mode when trying
to create GraphicsContextGLOpenGL when the ANGLE-shared dylib
is not present.

No new tests, refactor.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::isANGLEAvailable):
(WebCore::initializeEGLDisplay):
(WebCore::GraphicsContextGLOpenGL::create):
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::makeContextCurrent):
(WebCore::InitializeEGLDisplay): Deleted.

10:27 PM Changeset in webkit [283300] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

DFG strength reduction on % operator should handle an INT_MIN divisor.
https://bugs.webkit.org/show_bug.cgi?id=230391
<rdar://problem/83229740>

Reviewed by Robin Morisset.

JSTests:

  • stress/dfg-strength-reduction-on-mod-should-handle-INT_MIN.js: Added.

Source/JavaScriptCore:

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):

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

Cocoa GraphicsContextGLOpenGL should be more robust in destruction
https://bugs.webkit.org/show_bug.cgi?id=230940

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

Delete resources based on checking if they exist, not based on
a flag that should cause them to exist. Currently the constructor can return early,
so various resources might not exist even if their flag condition would
indicate they should.

No new tests, refactor.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):

10:00 PM Changeset in webkit [283298] by achristensen@apple.com
  • 2 edits in trunk/Tools

Terminate PCM daemon before and after unit test that uses it
https://bugs.webkit.org/show_bug.cgi?id=230191

In r282368 I added a unit test that creates a daemon, uses it, then terminates it.
On some bots it has been timing out. Once it starts timing out, it probably won't stop because
it won't get to the part of the test that terminates the problematic daemon.

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::TEST):

9:18 PM Changeset in webkit [283297] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[WebXR] Hold a foreground assertion for the duration of the immersive session
https://bugs.webkit.org/show_bug.cgi?id=230991

Patch by Ada Chan <ada.chan@apple.com> on 2021-09-29
Reviewed by Chris Dumez.

  • UIProcess/XR/PlatformXRSystem.cpp:

(WebKit::PlatformXRSystem::initializeTrackingAndRendering):

7:33 PM Changeset in webkit [283296] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Minor cleanup of some rubber-banding code in ScrollingEffectsController
https://bugs.webkit.org/show_bug.cgi?id=230981

Reviewed by Tim Horton.

As a precursor to unraveling some of the complexity of the rubber-banding code,
tidy up naming and code in ScrollingEffectsController::handleWheelEvent(). No
behavior change.

  • platform/PlatformWheelEvent.h:

(WebCore::PlatformWheelEvent::unacceleratedScrollingDelta const):
(WebCore::PlatformWheelEvent::unacceleratedScrollingDeltaX const): Deleted.
(WebCore::PlatformWheelEvent::unacceleratedScrollingDeltaY const): Deleted.

  • platform/ScrollingEffectsController.h:
  • platform/mac/ScrollingEffectsController.mm:

(WebCore::convertToProminentAxisFavoringVertical):
(WebCore::ScrollingEffectsController::handleWheelEvent):
(WebCore::ScrollingEffectsController::wheelDeltaBiasingTowardsVertical):

7:19 PM Changeset in webkit [283295] by Chris Dumez
  • 43 edits
    1 add in trunk

Add support for running service workers on the main thread
https://bugs.webkit.org/show_bug.cgi?id=230649

Reviewed by Alex Christensen.

Source/WebCore:

Add support for running service workers on the main thread (off by default).

This is to support use cases where the InjectedBundle needs to have access
to a service worker's JS global object and script it. It wouldn't be practical
in such cases to have the service worker running off the main thread. Note that
this is not meant to be used for service workers in general, only for some very
specific service workers that require interaction with WebKit's injected bundle.

  • Headers.cmake:
  • Modules/indexeddb/client/IDBConnectionProxy.cpp:

(WebCore::IDBClient::IDBConnectionProxy::forgetActivityForCurrentThread):

  • Modules/websockets/WorkerThreadableWebSocketChannel.cpp:

(WebCore::WorkerThreadableWebSocketChannel::Bridge::waitForMethodCompletion):

  • WebCore.xcodeproj/project.pbxproj:
  • inspector/WorkerDebugger.cpp:

(WebCore::WorkerDebugger::runEventLoopWhilePaused):

  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::loadResourceSynchronously):

  • page/PerformanceUserTiming.cpp:

(WebCore::PerformanceUserTiming::convertMarkToTimestamp const):

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

(WebCore::WorkerOrWorkletScriptController::loadModuleSynchronously):

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

(WebCore::constructRunLoop):
(WebCore::WorkerOrWorkletThread::WorkerOrWorkletThread):
(WebCore::WorkerOrWorkletThread::startRunningDebuggerTasks):
(WebCore::WorkerOrWorkletThread::runEventLoop):
(WebCore::WorkerOrWorkletThread::workerOrWorkletThread):
(WebCore::WorkerOrWorkletThread::stop):
(WebCore::WorkerOrWorkletThread::suspend):
(WebCore::WorkerOrWorkletThread::resume):

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

(WebCore::ModePredicate::operator() const):
(WebCore::WorkerDedicatedRunLoop::WorkerDedicatedRunLoop):
(WebCore::WorkerDedicatedRunLoop::~WorkerDedicatedRunLoop):
(WebCore::RunLoopSetup::RunLoopSetup):
(WebCore::WorkerDedicatedRunLoop::run):
(WebCore::WorkerDedicatedRunLoop::runInDebuggerMode):
(WebCore::WorkerDedicatedRunLoop::runInMode):
(WebCore::WorkerDedicatedRunLoop::runCleanupTasks):
(WebCore::WorkerDedicatedRunLoop::terminate):
(WebCore::WorkerDedicatedRunLoop::postTaskAndTerminate):
(WebCore::WorkerDedicatedRunLoop::postTaskForMode):
(WebCore::WorkerDedicatedRunLoop::Task::performTask):
(WebCore::WorkerDedicatedRunLoop::Task::Task):
(WebCore::WorkerMainRunLoop::WorkerMainRunLoop):
(WebCore::WorkerMainRunLoop::setGlobalScope):
(WebCore::WorkerMainRunLoop::postTaskAndTerminate):
(WebCore::WorkerMainRunLoop::postTaskForMode):
(WebCore::WorkerMainRunLoop::runInMode):

  • workers/WorkerRunLoop.h:

(WebCore::WorkerRunLoop::createUniqueId):
(isType):

  • workers/WorkerThread.cpp:

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

  • workers/WorkerThread.h:
  • workers/WorkerThreadMode.h: Added.
  • workers/service/ServiceWorkerGlobalScope.cpp:

(WebCore::ServiceWorkerGlobalScope::updateExtendedEventsSet):

  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::generateWorkerParameters):
(WebCore::ServiceWorkerThread::ServiceWorkerThread):
(WebCore::ServiceWorkerThread::finishedEvaluatingScript):
(WebCore::ServiceWorkerThread::startHeartBeatTimer):

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

(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):

  • workers/service/context/ServiceWorkerThreadProxy.h:
  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::SWServer):
(WebCore::SWServer::installContextData):
(WebCore::SWServer::runServiceWorker):

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

Source/WebKit:

Add support for running service workers on the main thread (off by default).

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::swServerForSession):

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::NetworkSession):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::shouldRunServiceWorkersOnMainThread const):

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

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

  • NetworkProcess/NetworkSessionCreationParameters.h:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:

(WebKit::WebSWServerToContextConnection::installServiceWorkerContext):

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:

(-[_WKWebsiteDataStoreConfiguration shouldRunServiceWorkersOnMainThread]):
(-[_WKWebsiteDataStoreConfiguration setShouldRunServiceWorkersOnMainThread:]):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::copy const):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:

(WebKit::WebsiteDataStoreConfiguration::shouldRunServiceWorkersOnMainThread const):
(WebKit::WebsiteDataStoreConfiguration::setShouldRunServiceWorkersOnMainThread):

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::installServiceWorker):

  • WebProcess/Storage/WebSWContextManagerConnection.h:
  • WebProcess/Storage/WebSWContextManagerConnection.messages.in:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
7:01 PM Changeset in webkit [283294] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Add weakThis check in addition to null check added in r282881
https://bugs.webkit.org/show_bug.cgi?id=231000
<rdar://83605614>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-09-29
Reviewed by Brady Eidson.

r282881 made NetworkLoad::start call didCompleteWithError, which can cause the
NetworkResourceLoader to be deleted. It added a null check on m_networkLoad which
sometimes reads freed memory. This certainly isn't great, but luckily we have a way
to check if this object has been deleted. Let's do that.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::startNetworkLoad):

6:39 PM Changeset in webkit [283293] by sbarati@apple.com
  • 11 edits in trunk

Print values in a nicer way in the jsc shell
https://bugs.webkit.org/show_bug.cgi?id=230931

Reviewed by Tadeu Zagallo.

JSTests:

  • ChakraCore/test/jsc-lib.js:

Source/JavaScriptCore:

Currently, print(1), print("1"), and print([1]) all print to stdout
simply as "1" (without the quotes). Same for values when running the
REPL. This isn't super helpful. Let's print quotes for strings, and
brackets for arrays.

Some tests rely on the old print behavior. Those tests now use the legacyPrint
instead.

  • jsc.cpp:

(toCString):
(printInternal):
(JSC_DEFINE_HOST_FUNCTION):
(runInteractive):
(cStringFromViewWithString): Deleted.

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::toWTFStringForConsole const):

  • runtime/JSCJSValue.h:

LayoutTests:

  • resources/standalone-pre.js:
6:25 PM Changeset in webkit [283292] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Contributors may be undefined
https://bugs.webkit.org/show_bug.cgi?id=230997
<rdar://problem/83693400>

Reviewed by Dewei Zhu.

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

(main): Ensure that repositories always have defined contributors.

5:57 PM Changeset in webkit [283291] by Alan Coon
  • 2 edits in branches/safari-613.1.3-branch/Tools

Cherry-pick r283172. rdar://problem/83697127

REGRESSION (r283102): [ MacOS Debug ] TestWebKitAPI.WebKit2.CaptureIndicatorDelay is failing
https://bugs.webkit.org/show_bug.cgi?id=230847
<rdar://problem/83577251>

Reviewed by Saam Barati.

As identified by Saam, the promise resolution callback is racing with the stop function.
To prevent this, we check in a loop whether the page has a stream and call stop when that is the case.

  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm: (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKit/getUserMedia.html:

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

5:57 PM Changeset in webkit [283290] by Alan Coon
  • 3 edits
    2 adds in branches/safari-613.1.3-branch

Cherry-pick r283087. rdar://problem/83697121

Line iterator firstRun/lastRun may return runs from wrong lines
https://bugs.webkit.org/show_bug.cgi?id=230770
<rdar://problem/83509753>

Reviewed by Alan Bujtas.

Source/WebCore:

In some situation line iterator firstRun/lastRun could return runs from different lines.
This could lead to inconsistencies like firstRun being non-null while lastRun is null.

Test: editing/iterator-line-start-end.html

  • layout/integration/LayoutIntegrationLineIteratorModernPath.h: (WebCore::LayoutIntegration::LineIteratorModernPath::firstRun const): (WebCore::LayoutIntegration::LineIteratorModernPath::lastRun const):

Take care to only return runs from this line.

LayoutTests:

  • editing/iterator-line-start-end-expected.txt: Added.
  • editing/iterator-line-start-end.html: Added.

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

5:55 PM Changeset in webkit [283289] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Allow audio service in the WebContent process on older versions
https://bugs.webkit.org/show_bug.cgi?id=230974
<rdar://82445437>

Reviewed by Brent Fulgham.

Older versions of macOS still need access to "com.apple.audio.AudioComponentRegistrar" in the WebContent process.

  • WebProcess/com.apple.WebProcess.sb.in:
5:47 PM Changeset in webkit [283288] by sbarati@apple.com
  • 6 edits
    1 add in trunk

We need to load the baseline JIT's constant pool register after OSR exit to checkpoints if we return to baseline code
https://bugs.webkit.org/show_bug.cgi?id=230972
<rdar://83659469>

Reviewed by Mark Lam and Yusuke Suzuki.

JSTests:

  • stress/checkpoint-osr-exit-needs-to-reload-baseline-jit-constant-pool-gpr.js: Added.

(empty):
(empty2):
(test):

Source/JavaScriptCore:

Consider the following:

  • We have a CodeBlock A.
  • DFG or FTL compiles an exit to A when A is still LLInt code. This means the OSR exit code will materialize registers as if A is LLInt.
  • We tier up A to Baseline JIT code.
  • Now, we take the exit to A as if it's LLInt. But the checkpoint OSR exit code will actually jump to the tiered up baseline code when it's done, because it determines where to jump at runtime. Because of this, when we return from the checkpoint code, and if we are jumping into baseline code, we must always load the constant pool register.
  • There's no need to load the metadata register because that register is shared with LLInt code, and will already contain the right value.
  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::dispatchToNextInstructionDuringExit):
(JSC::LLInt::llint_slow_path_checkpoint_osr_exit_from_inlined_call):
(JSC::LLInt::llint_slow_path_checkpoint_osr_exit):
(JSC::LLInt::dispatchToNextInstruction): Deleted.

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter64.asm:
5:21 PM Changeset in webkit [283287] by basuke.suzuki@sony.com
  • 8 edits in trunk/Source

Suppress warnings for implicit copy assignment operator/copy constructor with clang 13
https://bugs.webkit.org/show_bug.cgi?id=230963

Reviewed by Mark Lam.

Source/JavaScriptCore:

Added default copy constructor to suppress warning.

  • bytecode/Operands.h:

Source/WebCore:

No new tests because there is no behavior change.

Added default copy constructor / copy assignment operator to suppress warning.

  • platform/LayoutUnit.h:
  • platform/LengthBox.h:
  • platform/RectEdges.h:
  • platform/graphics/FontSelectionAlgorithm.h:
  • platform/graphics/ImagePaintingOptions.h:
5:19 PM Changeset in webkit [283286] by basuke.suzuki@sony.com
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Add objectTypeCounts to JSGetMemoryUsageStatistics
https://bugs.webkit.org/show_bug.cgi?id=230957

Reviewed by Yusuke Suzuki.

  • API/JSBase.cpp: Added objectTypeCounts property

(JSGetMemoryUsageStatistics):

  • API/JSBasePrivate.h: Added description of objectTypeCounts property
  • jsc.cpp: Added memoryUsageStatistics() function
5:07 PM Changeset in webkit [283285] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/bmalloc

[bmalloc] ChunkHash is not used since r261667
https://bugs.webkit.org/show_bug.cgi?id=230762

Reviewed by Alex Christensen.

The structure is the leftover when ObjectTypeTable was introduced at r261667.

  • bmalloc/Chunk.h:
5:00 PM Changeset in webkit [283284] by Fujii Hironori
  • 5 edits in trunk/Source

[WinCairo] REGRESSION(r280726): registry keys enabling GPU process mode don't work
https://bugs.webkit.org/show_bug.cgi?id=230871

Reviewed by Don Olmstead.

Source/WebKit:

r270175 (Bug 219294) added registry keys to enable GPU process
mode for WinCairo port. But after r280726 (Bug 228803) changed the
function signature, they didn't work.

  • Shared/WebPreferencesDefaultValues.cpp:
  • Shared/win/WebPreferencesDefaultValuesWin.cpp:

(WebKit::isFeatureFlagEnabled):

Source/WTF:

  • wtf/PlatformHave.h: r270175 defined HAVE_SYSTEM_FEATURE_FLAGS

for Windows to use WebKit::isFeatureFlagEnabled. But, it is no
longer needed.

4:56 PM Changeset in webkit [283283] by Chris Dumez
  • 4 edits in trunk

[ iOS Debug ] http/tests/xmlhttprequest/access-control-preflight-credential-sync.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=228305
<rdar://problem/81136891>

Reviewed by Alex Christensen.

Source/WebKit:

When a NetworkResourceLoader for a synchronous XHR gets aborted (e.g. because the connection to
the WebProcess was severed), NetworkResourceLoader::abort() would fail to call
sendReplyToSynchronousRequest() (sendReplyToSynchronousRequest was only called in didFailLoading() and
didFinishLoading()). As a result, we would hit the following assertion in the NetworkResourceLoader

destructor later on: ASSERT(!isSynchronous()
!m_synchronousLoadData->delayedReply)

No new tests, covered by existing test that I am unskipping.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::abort):

LayoutTests:

Unskip test that should no longer be flaky.

  • platform/ios-wk2/TestExpectations:
4:53 PM Changeset in webkit [283282] by basuke.suzuki@sony.com
  • 2 edits in trunk/Tools

[webkitpy] LOG_CHANNEL is widely used in the codebase and shouldn't be treated as error
https://bugs.webkit.org/show_bug.cgi?id=230995

Reviewed by Jonathan Bedard.

LOG_CHANNEL is the macro which is defined in each framework to define list of all channels
in the framework.

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

(check_identifier_name_in_declaration):

4:36 PM Changeset in webkit [283281] by achristensen@apple.com
  • 2 edits in trunk/Tools

Update PCM Daemon name
https://bugs.webkit.org/show_bug.cgi?id=230516

In r282883 I updated the daemon name but not in this one place.
I think this might cause TestWebKitAPI.EventAttribution.Daemon to stop timing out on one of the bots.

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::TEST):

4:31 PM Changeset in webkit [283280] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebKit

Add a default return value in convertToExceptionCode
https://bugs.webkit.org/show_bug.cgi?id=230989

Reviewed by Chris Dumez.

To fix non-Cocoa build.

  • NetworkProcess/storage/FileSystemStorageError.h:

(WebKit::convertToExceptionCode):

4:31 PM Changeset in webkit [283279] by commit-queue@webkit.org
  • 37 edits
    9 adds in trunk

Implement the 'ic' unit from CSS Values 4
https://bugs.webkit.org/show_bug.cgi?id=204276
<rdar://problem/57256127>

Patch by Kiet Ho <Kiet Ho> on 2021-09-29
Reviewed by Myles C. Maxfield.

LayoutTests/imported/w3c:

Fix ic-unit-{001..012} tests and references to use the IcTestFullWidth font,
which includes the CJK water glyph as a full width character. This avoids an
issue on macOS Catalina where the chosen fallback font renders the glyph
outside of the em box.

Fix ic-unit-{001..004} references to not use the ic unit.

Add two new tests where the CJK water glyph is half-width (ic-unit-013) and zero-width
(ic-unit-014).

  • web-platform-tests/css/css-values/ic-unit-001-expected.html:
  • web-platform-tests/css/css-values/ic-unit-001.html:
  • web-platform-tests/css/css-values/ic-unit-002-expected.html:
  • web-platform-tests/css/css-values/ic-unit-002.html:
  • web-platform-tests/css/css-values/ic-unit-003-expected.html:
  • web-platform-tests/css/css-values/ic-unit-003.html:
  • web-platform-tests/css/css-values/ic-unit-004-expected.html:
  • web-platform-tests/css/css-values/ic-unit-004.html:
  • web-platform-tests/css/css-values/ic-unit-008-expected.html:
  • web-platform-tests/css/css-values/ic-unit-008.html:
  • web-platform-tests/css/css-values/ic-unit-009-expected.html:
  • web-platform-tests/css/css-values/ic-unit-009.html:
  • web-platform-tests/css/css-values/ic-unit-010-expected.html:
  • web-platform-tests/css/css-values/ic-unit-010.html:
  • web-platform-tests/css/css-values/ic-unit-011-expected.html:
  • web-platform-tests/css/css-values/ic-unit-011.html:
  • web-platform-tests/css/css-values/ic-unit-012-expected.html:
  • web-platform-tests/css/css-values/ic-unit-012.html:
  • web-platform-tests/css/css-values/ic-unit-013-expected.html: Added.
  • web-platform-tests/css/css-values/ic-unit-013.html: Added.
  • web-platform-tests/css/css-values/ic-unit-014-expected.html: Added.
  • web-platform-tests/css/css-values/ic-unit-014.html: Added.
  • web-platform-tests/css/css-values/resources/IcTestFullWidth.woff2: Added.
  • web-platform-tests/css/css-values/resources/IcTestHalfWidth.woff2: Added.
  • web-platform-tests/css/css-values/resources/IcTestZeroWidth.woff2: Added.

Source/WebCore:

Tests: fast/css/CSSPrimitiveValue-ic.html

imported/w3c/web-platform-tests/css/css-values/ic-unit-013.html
imported/w3c/web-platform-tests/css/css-values/ic-unit-014.html

  • css/CSSPrimitiveValue.cpp:

(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::isStringType):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::computeUnzoomedNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::unitTypeString):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
(WebCore::CSSPrimitiveValue::equals const):
(WebCore::CSSPrimitiveValue::collectDirectComputationalDependencies const):

  • css/CSSPrimitiveValue.h:

(WebCore::CSSPrimitiveValue::isFontRelativeLength):
(WebCore::CSSPrimitiveValue::isLength):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle const):

  • css/CSSUnits.cpp:

(WebCore::unitCategory):
(WebCore::operator<<):

  • css/CSSUnits.h:
  • css/DeprecatedCSSOMPrimitiveValue.cpp:

(WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType const):

  • css/calc/CSSCalcCategoryMapping.cpp:

(WebCore::calcUnitCategory):
(WebCore::calculationCategoryForCombination):
(WebCore::hasDoubleValue):

  • css/parser/CSSParserToken.cpp:

(WebCore::cssPrimitiveValueUnitFromTrie):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeLengthRawWithKnownTokenTypeDimension):

  • css/parser/SizesAttributeParser.cpp:

(WebCore::SizesAttributeParser::computeLength):

  • platform/graphics/Font.cpp:

(WebCore::Font::platformGlyphInit): simplyfy logic, reorder misplaced comment.

  • platform/graphics/Font.h: remove property m_zeroGlyph only used once in

WebCore::Font::platformGlyphInit. Remove unused getters adjustedSpaceWidth(),
setSpaceWidths(), setSpaceGlyph(), setZeroWidthSpaceGlyph(), zeroGlyph(), setZeroGlyph().
(WebCore::Font::spaceWidth const):
(WebCore::Font::spaceGlyph const):
(WebCore::Font::zeroWidthSpaceGlyph const):
(WebCore::Font::isZeroWidthSpaceGlyph const):

  • platform/graphics/FontMetrics.h:

(WebCore::FontMetrics::ideogramWidth const): add metric containing the width of an ideogram
glyph in the font. This width is approximated from the width of the CJK water glyph (U+6C34).
(WebCore::FontMetrics::setIdeogramWidth):
(WebCore::FontMetrics::reset):

Source/WTF:

  • wtf/unicode/CharacterNames.h: add CJK water glyph (U+6C34) constant.

LayoutTests:

Added tests for behavior of CSSPrimitiveValue on ic unit.

  • TestExpectations: remove ImageOnlyFailure expectations for ic-unit-* tests, now that they should pass.
  • fast/css/CSSPrimitiveValue-ic-expected.txt: Added.
  • fast/css/CSSPrimitiveValue-ic.html: Added.
4:30 PM Changeset in webkit [283278] by Alan Coon
  • 1 copy in tags/Safari-612.2.9.0.1

Tag Safari-612.2.9.0.1.

4:30 PM Changeset in webkit [283277] by Alan Coon
  • 1 copy in tags/Safari-612.2.9.1.1

Tag Safari-612.2.9.1.1.

4:28 PM Changeset in webkit [283276] by BJ Burg
  • 29 edits
    2 copies
    3 adds in trunk

[Cocoa] add _WKInspectorExtension SPI to evaluate script on an extension tab
https://bugs.webkit.org/show_bug.cgi?id=230646
<rdar://problem/83420328>

Reviewed by Devin Rousso.

Source/WebCore:

Exercised by new API test: WKInspectorExtension.CanEvaluateScriptInExtensionTab

  • inspector/InspectorFrontendHost.h:
  • inspector/InspectorFrontendHost.idl:
  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::evaluateScriptInExtensionTab):
Find the global object that corresponds to the passed-in <iframe> and
try to evaluate scriptSource in the mainThreadNormalWorld() of that <iframe>.

  • html/HTMLIFrameElement.idl: Add [JSGenerateToNativeObject] so that

it's possible to pass HTMLIFrameElement to the IDL function and convert it
to the native object (HTMLIFrameElement&) from a JSValue.

Source/WebInspectorUI:

Add a new InspectorFrontendAPI method to evaluate script on an iframe within
Web Inspector. This in turn calls out to InspectorFrontendHost to do the actual evaluation.
Otherwise, the CSP policy set by the tab content may block any such evaluation
if the 'script-src' directive does not include 'unsafe-eval'.

  • UserInterface/Protocol/InspectorFrontendAPI.js:

(InspectorFrontendAPI.showExtensionTab):
(InspectorFrontendAPI.evaluateScriptInExtensionTab):
Call through to the WebInspectorExtensionController method.

  • UserInterface/Controllers/WebInspectorExtensionController.js:

(WI.WebInspectorExtensionController.prototype.evaluateScriptInExtensionTab): Added.
Try to get the <iframe> for a extensionTabID, and use InspectorFrontendHost to
evaluate script in the context of the <iframe>. Be sure to correctly wrap the result.

  • UserInterface/Views/WebInspectorExtensionTabContentView.js:

(WI.WebInspectorExtensionTabContentView):
(WI.WebInspectorExtensionTabContentView.prototype.get iframeElement):
(WI.WebInspectorExtensionTabContentView.shouldSaveTab):
(WI.WebInspectorExtensionTabContentView.prototype.initialLayout): Deleted.
While writing the API test, I saw that the first evaluation frequently failed
because the <iframe> did not exist. Change this class so that the <iframe>
is created in the constructor. Add a getter for the <iframe> element.

(WI.WebInspectorExtensionTabContentView.prototype._extensionFrameDidLoad):
(WI.WebInspectorExtensionTabContentView.prototype._maybeDispatchDidShowExtensionTab):
While writing this patch, it became apparent that didShowExtensionTab() was being
called prior to the iframe actually completing its initial load. Then, the test
would try to evaluate script on about:blank instead of the actual tab content.
To fix this, require that the <iframe> be attached and have fired the onload event
before we notify clients that it has been 'shown'.

  • UserInterface/Main.html:

Adjust the default CSP policy to not mention img-src. This allows ports such as
Cocoa to set their own img-src CSP directive. These changes are necessary to allow
images to load from custom URL schemes.

  • UserInterface/Views/TabBrowser.js:

(WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
The new API test exposes a bug in this assertion, namely, that it does not account
for the situation where a tab does not wish to be saved. In that case, the displayed
WebInspectorExtensionTabContentView is *not* at index 0 of WI.TabBrowser.recentTabContentViews.
This is correctly handled with a special case in WI.TabBrowser._tabBarItemSelected,
so incorporate that logic into the assertion.

Source/WebKit:

Add new testing API for evaluating script expressions in the context of a
tab created by _WKInspectorExtension. For the most part, this is implemented
in the same way as the -evaluateScript: method, but the script is evaluated
within the Web Inspector frontend itself rather than in the inspected page.

To avoid CSP issues, the actual evaluation is performed on subframes using a
new InspectorFrontendHost method which takes an <iframe> and script source.

Along the way, tweak Web Inspector's CSP policy to allow loading images from
custom URL schemes as specified using _WKInspectorConfiguration. This is so
that tab icons from the test-resource: scheme can be loaded in the main frame
of Web Inspector's WKWebView under testing situations.

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:

Add new files.

  • UIProcess/API/APIInspectorExtension.h:
  • UIProcess/API/APIInspectorExtension.cpp:

(API::InspectorExtension::evaluateScriptInExtensionTab):
Based on evaluateScript(). Call through to the shared extension controller.

  • UIProcess/API/Cocoa/_WKInspectorExtensionPrivateForTesting.h: Added.
  • UIProcess/API/Cocoa/_WKInspectorExtensionTesting.mm: Added.

(-[_WKInspectorExtension _evaluateScript:inExtensionTabWithIdentifier:completionHandler:]):
Added. Call through to the shared extension controller.

  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h:
  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp:

(WebKit::WebInspectorUIExtensionControllerProxy::evaluateScriptInExtensionTab):
Based on evaluateScript(). Send IPC to the Inspector WebProcess.

  • WebProcess/Inspector/WebInspectorUIExtensionController.h:
  • WebProcess/Inspector/WebInspectorUIExtensionController.messages.in:
  • WebProcess/Inspector/WebInspectorUIExtensionController.cpp:

(WebKit::WebInspectorUIExtensionController::evaluateScriptInExtensionTab):
Based on evaluateScriptForExtension. Call into the frontend API
which will perform the actual evaluation on the <iframe> contentWindow.

  • UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm:

(-[WKInspectorResourceURLSchemeHandler webView:startURLSchemeTask:]):
Specify the list of custom protocols as allowable sources for 'img-src'.
The 'img-src' directive also includes 'file: blob: resource:' as allowable
sources, since this was the previous CSP policy defined in Main.html.

  • UIProcess/Cocoa/GroupActivities/GroupActivitiesSessionNotifier.mm:

Fix UnifiedSources fallout by including a missing header.

Tools:

Add a new test to exercise the SPI. The test sets up an _WKInspectorExtension,
creates a tab, evaluates script on the tab, and later reads back the stored value.

Notably, this test would fail if the extension tab is not currently showing.
This is a bug and will be addressed as part of https://bugs.webkit.org/show_bug.cgi?id=230758.

  • TestWebKitAPI/SourcesCocoa.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Add new files.

  • TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-basic-tab.html:

Add inline <script> to set window._secretValue. This is checked by the API test.

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm: Added.

(resetGlobalState):
(-[UIDelegateForTestingInspectorExtension _webView:didAttachLocalInspector:]):
(-[UIDelegateForTestingInspectorExtension _webView:configurationForLocalInspector:]):
(-[InspectorExtensionDelegateForTestingInspectorExtension inspectorExtension:didShowTabWithIdentifier:]):
(-[InspectorExtensionDelegateForTestingInspectorExtension inspectorExtension:didHideTabWithIdentifier:]):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm:

(-[UIDelegateForTestingInspectorExtensionDelegate _webView:configurationForLocalInspector:]):
(TEST):
Adopt fixes from WKInspectorExtension that allow extension tab content and icons to load.

  • TestWebKitAPI/cocoa/TestInspectorURLSchemeHandler.h: Added.
  • TestWebKitAPI/cocoa/TestInspectorURLSchemeHandler.mm: Copied from Source/WebKit/UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm.

(-[TestInspectorURLSchemeHandler webView:startURLSchemeTask:]):
(-[TestInspectorURLSchemeHandler webView:stopURLSchemeTask:]):
Add a simple URLSchemeHandler which allows serving test resources from the TestWebKitAPI.resources directory.
This is necessary to test _WKInspectorExtension tabs, which must load their content from a custom URL scheme.

  • TestWebKitAPI/cocoa/TestWKWebView.mm:

Fix UnifiedSources fallout by adding a missing include.

4:27 PM Changeset in webkit [283275] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Use the first-line style when measuring text content when applicable
https://bugs.webkit.org/show_bug.cgi?id=230925

Reviewed by Antti Koivisto.

Disable "simplified content measuring" when first-style is present.

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::inlineItemWidth const):

  • layout/formattingContexts/inline/InlineTextItem.cpp:

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

4:08 PM Changeset in webkit [283274] by Chris Dumez
  • 10 edits
    1 copy
    2 moves
    1 add
    2 deletes in trunk

Use isolated NSURLSessions for each first party registrable domain
https://bugs.webkit.org/show_bug.cgi?id=230750
<rdar://83159358>

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing more checks.

  • web-platform-tests/fetch/connection-pool/network-partition-key-expected.txt:

Source/WebCore:

Fix bug where service worker soft-update requests would have their "first-party-for-cookies"
field set to "https:" instead of a full origin (e.g. "https://localhost:8080"). This was
causing some service worker test failures now that we use different NSURLSession based on
the "first-party-for-cookies" field.

  • workers/service/server/SWServer.cpp:

(WebCore::originURL):

Source/WebKit:

Previously would use up to 10 isolated NSURLSessions only for domains marked as prevalent
by ITP *and* that the user interacts with as first party website. We now use different
isolated NSURLSession for each top-level registrable domain, not matter their ITP status.
This significantly improves privacy.

To avoid having too many NSURLSession, we clear the ones that haven't been used in the
last 10 minutes, every time we add a new one.

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::sessionWrapperForTask):
(WebKit::SessionSet::isolatedSession):

LayoutTests:

This test is now passing more checks on WebKit2 but still completely fails on WebKit1 so I am
adding a WK1-specific baseline.

  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/connection-pool/network-partition-key-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/connection-pool/network-partition-key-expected.txt.
4:04 PM Changeset in webkit [283273] by Devin Rousso
  • 8 edits in trunk/Source/WebCore

Allow DrawGlyphsRecorder to be used with any GraphicsContext instead of just DisplayList::Recorder
https://bugs.webkit.org/show_bug.cgi?id=230913

Reviewed by Myles Maxfield.

There's really nothing about DrawGlyphsRecorder that's specific to display lists other
than it's currently only being used by DisplayList::Recorder.

This patch replaces DisplayList::Recorder with GraphicsContext in DrawGlyphsRecorder.
It also requires that new methods be added to GraphicsContext that are overridden by
DisplayList::Recorder. This is being done to make <attachment> drawing work in the
GPUProcess (<https://webkit.org/b/230781>).

  • platform/graphics/DrawGlyphsRecorder.h:
  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:

(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):
(WebCore::DrawGlyphsRecorder::populateInternalState):
(WebCore::DrawGlyphsRecorder::prepareInternalContext):
(WebCore::DrawGlyphsRecorder::recordDrawGlyphs):
(WebCore::DrawGlyphsRecorder::drawGlyphs):

  • platform/graphics/harfbuzz/DrawGlyphsRecorderHarfBuzz.cpp:

(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):
(WebCore::DrawGlyphsRecorder::drawGlyphs):

  • platform/graphics/win/DrawGlyphsRecorderWin.cpp:

(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):
(WebCore::DrawGlyphsRecorder::drawGlyphs):

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::drawGlyphsAndCacheFont): Added.

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

(WebCore::DisplayList::Recorder::state const): Added.
(WebCore::DisplayList::Recorder::drawGlyphsAndCacheFont): Renamed from appendDrawGlyphsItemWithCachedFont.
AFAICT it seems like the m_state in GraphicsContext has the same values (but is a
different object) as the currentState().stateChange.m_state in DisplayList::Recorder.
Many of the non-overriden methods on GraphicsContext (e.g. setStrokeColor) both modify
the m_state and call updateState, which DisplayList::Recorder uses to modify its
currentState().stateChange.m_state. As such, we should be able to expose it as an override
for the state "getter" so that DrawGlyphsRecorder is able to access the current state in
a GraphicsContext-subclass agnostic way.

4:02 PM Changeset in webkit [283272] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

Migrate _WKDownload tests from TCPServer to HTTPServer
https://bugs.webkit.org/show_bug.cgi?id=230980
<rdar://82100878>

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

The former is very picky when it comes to numbers of TCP connections, and causes tests to time out when
the number of connections changes. The latter is more forgiving and runs code on the main thread.

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:

(TestWebKitAPI::respondSlowly):
(TestWebKitAPI::downloadAtRate):
(TEST):

  • TestWebKitAPI/cocoa/HTTPServer.mm:

(TestWebKitAPI::Connection::send const):

3:45 PM Changeset in webkit [283271] by sihui_liu@apple.com
  • 30 edits
    4 moves in trunk/Source

Replace FileSystemHandleImpl with FileSystemStorageConnection
https://bugs.webkit.org/show_bug.cgi?id=230861
<rdar://problem/83606465>

Reviewed by Youenn Fablet.

Source/WebCore:

Introduce WorkerStorageConnection class, which dispatches StorageManager task to main-thread StorageConnection
and dispatches result back to worker thread.

Rebaselined existing test.

  • Headers.cmake:
  • Modules/filesystemaccess/FileSystemDirectoryHandle.cpp:

(WebCore::FileSystemDirectoryHandle::create):
(WebCore::FileSystemDirectoryHandle::FileSystemDirectoryHandle):
(WebCore::FileSystemDirectoryHandle::getFileHandle):
(WebCore::FileSystemDirectoryHandle::getDirectoryHandle):
(WebCore::FileSystemDirectoryHandle::removeEntry):
(WebCore::FileSystemDirectoryHandle::resolve):

  • Modules/filesystemaccess/FileSystemDirectoryHandle.h:
  • Modules/filesystemaccess/FileSystemFileHandle.cpp:

(WebCore::FileSystemFileHandle::create):
(WebCore::FileSystemFileHandle::FileSystemFileHandle):

  • Modules/filesystemaccess/FileSystemFileHandle.h:
  • Modules/filesystemaccess/FileSystemHandle.cpp:

(WebCore::FileSystemHandle::FileSystemHandle):
(WebCore::FileSystemHandle::isSameEntry const):

  • Modules/filesystemaccess/FileSystemHandle.h:

(WebCore::FileSystemHandle::identifier const):
(WebCore::FileSystemHandle::connection):
(WebCore::FileSystemHandle::impl const): Deleted.

  • Modules/filesystemaccess/FileSystemHandleIdentifier.h: Renamed from Source/WebKit/NetworkProcess/storage/FileSystemStorageHandleIdentifier.h.
  • Modules/filesystemaccess/FileSystemStorageConnection.h: Renamed from Source/WebCore/Modules/filesystemaccess/FileSystemHandleImpl.h.

(WebCore::FileSystemStorageConnection::~FileSystemStorageConnection):

  • Modules/storage/DummyStorageProvider.h:
  • Modules/storage/StorageConnection.h:
  • Modules/storage/StorageManager.cpp:

(WebCore::StorageManager::fileSystemAccessGetDirectory):

  • Modules/storage/WorkerStorageConnection.cpp:
  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

Replace FileSystemStorageHandleProxy with WebFileSystemStorageConnection.

  • NetworkProcess/storage/FileSystemStorageHandle.cpp:

(WebKit::FileSystemStorageHandle::FileSystemStorageHandle):
(WebKit::FileSystemStorageHandle::isSameEntry):
(WebKit::FileSystemStorageHandle::requestCreateHandle):
(WebKit::FileSystemStorageHandle::getFileHandle):
(WebKit::FileSystemStorageHandle::getDirectoryHandle):
(WebKit::FileSystemStorageHandle::resolve):

  • NetworkProcess/storage/FileSystemStorageHandle.h:

(WebKit::FileSystemStorageHandle::identifier const):

  • NetworkProcess/storage/FileSystemStorageHandleRegistry.cpp:

(WebKit::FileSystemStorageHandleRegistry::registerHandle):
(WebKit::FileSystemStorageHandleRegistry::unregisterHandle):
(WebKit::FileSystemStorageHandleRegistry::getHandle):

  • NetworkProcess/storage/FileSystemStorageHandleRegistry.h:
  • NetworkProcess/storage/FileSystemStorageManager.cpp:

(WebKit::FileSystemStorageManager::createHandle):
(WebKit::FileSystemStorageManager::getPath):
(WebKit::FileSystemStorageManager::getDirectory):

  • NetworkProcess/storage/FileSystemStorageManager.h:
  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::NetworkStorageManager::fileSystemGetDirectory):
(WebKit::NetworkStorageManager::isSameEntry):
(WebKit::NetworkStorageManager::getFileHandle):
(WebKit::NetworkStorageManager::getDirectoryHandle):
(WebKit::NetworkStorageManager::removeEntry):
(WebKit::NetworkStorageManager::resolve):

  • NetworkProcess/storage/NetworkStorageManager.h:
  • NetworkProcess/storage/NetworkStorageManager.messages.in:
  • NetworkProcess/storage/OriginStorageManager.h:
  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):

  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp: Renamed from Source/WebKit/WebProcess/WebCoreSupport/FileSystemStorageHandleProxy.cpp.

(WebKit::WebFileSystemStorageConnection::create):
(WebKit::WebFileSystemStorageConnection::WebFileSystemStorageConnection):
(WebKit::WebFileSystemStorageConnection::connectionClosed):
(WebKit::WebFileSystemStorageConnection::isSameEntry):
(WebKit::WebFileSystemStorageConnection::getFileHandle):
(WebKit::WebFileSystemStorageConnection::getDirectoryHandle):
(WebKit::WebFileSystemStorageConnection::removeEntry):
(WebKit::WebFileSystemStorageConnection::resolve):

  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h: Renamed from Source/WebKit/WebProcess/WebCoreSupport/FileSystemStorageHandleProxy.h.
  • WebProcess/WebCoreSupport/WebStorageConnection.cpp:

(WebKit::WebStorageConnection::persist):
(WebKit::WebStorageConnection::fileSystemGetDirectory):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::networkProcessConnectionClosed):
(WebKit::WebProcess::fileSystemStorageConnection):

  • WebProcess/WebProcess.h:
3:44 PM Changeset in webkit [283270] by Ryan Haddad
  • 3 edits in trunk/Tools

Unreviewed built trigger fix.

Patch by Matt Lewis <Matt Lewis> on 2021-09-29

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

(_should_file_trigger_build):

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

(ShouldBuildTest):
(ShouldBuildTest.test_should_build):

3:25 PM Changeset in webkit [283269] by Aditya Keerthi
  • 41 edits in trunk

[css-ui] getComputedStyle() must return the specified value for '-webkit-appearance'
https://bugs.webkit.org/show_bug.cgi?id=230916
rdar://83640938

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:

Rebaseline for progression.

Source/WebCore:

Currently, an element's appearance can be adjusted to "none" depending
on the applied CSS properties. For example, buttons that specify a
background-color lose their native appearance. The existing behavior is
implemented by modifying the appearance field on RenderStyle.

While the spec allows certain properties to affect appearance, it
also asserts that the computed value must be equal to the specific
value [1]. However, since the specified and adjusted values are stored
in the same field in RenderStyle, the computed value does not always
equal the specified value.

To fix, introduce an effectiveAppearance field to RenderStyle, which
stores the used appearance. The specified appearance remains in the
appearance field, ensuring the computed value adheres to the spec.

The new behavior matches Chrome and Firefox. This work is also necessary
for WebKit to support 'auto' as a valid appearance value, since the
used value will need to be adjusted depending on the element type, but
the computed value should remain 'auto'.

[1] https://www.w3.org/TR/css-ui-4/#appearance-switching

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::boundingBoxForQuads):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::isApplePayButton const):

  • accessibility/AccessibilitySlider.cpp:

(WebCore::AccessibilitySlider::orientation const):

  • dom/Element.cpp:

(WebCore::Element::setActive):
(WebCore::Element::setHovered):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::focusedOrActiveStateChanged):

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::disabledStateChanged):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::setIndeterminate):

  • html/HTMLMeterElement.cpp:

(WebCore::HTMLMeterElement::createElementRenderer):

  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::parseAttribute):

  • html/HTMLProgressElement.cpp:

(WebCore::HTMLProgressElement::createElementRenderer):

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::handleKeydownEvent):

  • html/shadow/ProgressShadowElement.cpp:

(WebCore::ProgressShadowElement::rendererIsNeeded):
(WebCore::ProgressInnerElement::rendererIsNeeded):

  • html/shadow/SliderThumbElement.cpp:

(WebCore::hasVerticalAppearance):
(WebCore::RenderSliderThumb::updateAppearance):
(WebCore::SliderThumbElement::resolveCustomStyle):
(WebCore::SliderContainerElement::resolveCustomStyle):

  • html/shadow/TextControlInnerElements.cpp:

(WebCore::SearchFieldResultsButtonElement::resolveCustomStyle):

  • rendering/RenderAttachment.cpp:

(WebCore::RenderAttachment::shouldDrawBorder const):
(WebCore::RenderAttachment::paintReplaced):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::addVisualOverflowFromTheme):
(WebCore::RenderBlock::baselinePosition const):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::determineBackgroundBleedAvoidance const):
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect const):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::hasVisibleBoxDecorationStyle const):
(WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateCustomAppearance):
(WebCore::hasVisibleBoxDecorations):

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterStyleChange):
(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterLayout):

  • rendering/RenderMenuList.cpp:

(RenderMenuList::menuStyle const):
(RenderMenuList::clientPaddingLeft const):
(RenderMenuList::clientPaddingRight const):

  • rendering/RenderProgress.cpp:

(WebCore::RenderProgress::updateAnimationState):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle):

Ensure the specified value is not modified by adjusting the
effectiveAppearance field instead of the appearance field.

(WebCore::RenderTheme::adjustSearchFieldDecorationStyle const):
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::paintBorderOnly):
(WebCore::RenderTheme::paintDecorations):
(WebCore::RenderTheme::baselinePosition const):
(WebCore::RenderTheme::isControlStyled const):
(WebCore::RenderTheme::adjustRepaintRect):
(WebCore::RenderTheme::supportsFocusRing const):
(WebCore::RenderTheme::isDefault const):
(WebCore::RenderTheme::paintSliderTicks):

  • rendering/RenderThemeAdwaita.cpp:

(WebCore::RenderThemeAdwaita::supportsFocusRing const):
(WebCore::RenderThemeAdwaita::popupInternalPaddingBox const):
(WebCore::RenderThemeAdwaita::paintSliderTrack):
(WebCore::RenderThemeAdwaita::adjustSliderThumbSize const):
(WebCore::RenderThemeAdwaita::paintSliderThumb):

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::adjustedPaintRect const):
(WebCore::RenderThemeIOS::baselinePosition const):
(WebCore::RenderThemeIOS::isControlStyled const):
(WebCore::RenderThemeIOS::popupInternalPaddingBox const):
(WebCore::RenderThemeIOS::adjustRoundBorderRadius):
(WebCore::RenderThemeIOS::paintSliderTrack):
(WebCore::RenderThemeIOS::adjustSliderThumbSize const):
(WebCore::RenderThemeIOS::adjustButtonStyle const):
(WebCore::RenderThemeIOS::supportsBoxShadow const):
(WebCore::RenderThemeIOS::paintSliderTicks):
(WebCore::RenderThemeIOS::paintSliderTrackWithFormControlRefresh):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::isControlStyled const):
(WebCore::RenderThemeMac::adjustRepaintRect):
(WebCore::RenderThemeMac::controlSupportsTints const):
(WebCore::RenderThemeMac::meterSizeForBounds const):
(WebCore::RenderThemeMac::levelIndicatorFor const):
(WebCore::RenderThemeMac::progressBarRectForBounds const):
(WebCore::RenderThemeMac::popupInternalPaddingBox const):
(WebCore::RenderThemeMac::paintSliderTrack):
(WebCore::RenderThemeMac::paintSliderThumb):
(WebCore::RenderThemeMac::adjustSliderThumbSize const):

  • rendering/RenderThemeWin.cpp:

(WebCore::RenderThemeWin::supportsFocusRing const):
(WebCore::RenderThemeWin::determineClassicState):
(WebCore::RenderThemeWin::determineState):
(WebCore::RenderThemeWin::determineSliderThumbState):
(WebCore::RenderThemeWin::determineButtonState):
(WebCore::RenderThemeWin::getClassicThemeData):
(WebCore::RenderThemeWin::getThemeData):
(WebCore::drawControl):
(WebCore::RenderThemeWin::paintSliderTrack):
(WebCore::RenderThemeWin::adjustSliderThumbSize const):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::hashForTextAutosizing const):
(WebCore::RenderStyle::equalForTextAutosizing const):
(WebCore::rareNonInheritedDataChangeRequiresLayout):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::hasEffectiveAppearance const):
(WebCore::RenderStyle::effectiveAppearance const):
(WebCore::RenderStyle::setAppearance):
(WebCore::RenderStyle::setEffectiveAppearance):

  • rendering/style/StyleRareNonInheritedData.cpp:

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

  • rendering/style/StyleRareNonInheritedData.h:
  • style/MatchedDeclarationsCache.cpp:

(WebCore::Style::MatchedDeclarationsCache::isCacheable):

  • style/StyleAdjuster.cpp:

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

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveElement):

LayoutTests:

  • platform/gtk/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
3:22 PM Changeset in webkit [283268] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ Catalina+ Debug wk2 ] fast/speechrecognition/start-recognition-after-gum.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=228209

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:11 PM Changeset in webkit [283267] by Ayumi Kojima
  • 3 edits in trunk/LayoutTests

[ iOS Debug ] fast/selectors/ backtracking tests are timing out.
https://bugs.webkit.org/show_bug.cgi?id=230988

Unreviewed test gardening.

  • platform/ios-14/TestExpectations:
  • platform/ios-wk2/TestExpectations:
2:58 PM Changeset in webkit [283266] by basuke.suzuki@sony.com
  • 2 edits in trunk/Tools

[PlayStation] Make build-webkit configurable using environment variable
https://bugs.webkit.org/show_bug.cgi?id=230958

Reviewed by Fujii Hironori.

The cmake toolchain file is hard coded in the script. Make it configurable using
environment variable.

  • Scripts/webkitdirs.pm:

(generateBuildSystemFromCMakeProject):

2:52 PM Changeset in webkit [283265] by Ayumi Kojima
  • 3 edits in trunk/LayoutTests

[ iOS ] fast/events/ios/viewport-shrink-to-fit-allows-double-tap.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=230987

Unreviewed test gardening.

  • platform/ios-14/TestExpectations:
  • platform/ios-wk2/TestExpectations:
2:45 PM Changeset in webkit [283264] by Eric Hutchison
  • 3 edits in trunk/Source/bmalloc

Unreviewed, reverting r282850.

Patch causing many crashes in
bmalloc::Heap::decommitLargeRange

Reverted changeset:

"[bmalloc] freeableMemory and footprint of Heap are completely
broken"
https://bugs.webkit.org/show_bug.cgi?id=230245
https://commits.webkit.org/r282850

2:16 PM Changeset in webkit [283263] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ BigSur Debug arm64 ] streams/readableStream-then.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=230984.

Unreviewed test gardening.

  • platform/mac/TestExpectations:
2:12 PM Changeset in webkit [283262] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Unreviewed, reverting r281602.

These tests are working now

Reverted changeset:

"25 webkit imported/w3c/web-platform-tests/css/ layout tests
failing with black bars"
https://commits.webkit.org/r281602

1:55 PM Changeset in webkit [283261] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

Update test expectations to include x86 for imported/w3c/web-platform-tests/resource-timing/sizes-redirect-img.html.
https://bugs.webkit.org/show_bug.cgi?id=230862.

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:53 PM Changeset in webkit [283260] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] LineBoxBuilder should use the first-line style when applicable
https://bugs.webkit.org/show_bug.cgi?id=230930

Reviewed by Antti Koivisto.

This is in preparation for supporting first-line style.

  • layout/formattingContexts/inline/InlineFormattingContext.cpp:

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

  • layout/formattingContexts/inline/InlineFormattingContext.h:
  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

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

  • layout/formattingContexts/inline/InlineLineBoxBuilder.h:
1:46 PM Changeset in webkit [283259] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[iOS EWS] imported/w3c/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_worker.https.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=230979.

Unreviewed test gardening.

  • platform/ios-14-wk2/TestExpectations:
1:38 PM Changeset in webkit [283258] by Alan Bujtas
  • 4 edits
    2 adds in trunk

Thin hairline gap displayed for subpixel sized inset box-shadows
https://bugs.webkit.org/show_bug.cgi?id=230814

Reviewed by Simon Fraser.

Source/WebCore:

Add missing device pixel snapping for inset offset.

Test: fast/box-shadow/hidpi-box-shadow-inset-on-subpixel-position.html

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintBoxShadow):

LayoutTests:

  • fast/box-shadow/hidpi-box-shadow-inset-on-subpixel-position-expected.html: Added.
  • fast/box-shadow/hidpi-box-shadow-inset-on-subpixel-position.html: Added.
  • platform/win/TestExpectations:
1:35 PM Changeset in webkit [283257] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

Fixed incorrect test expectations for imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.html.
https://bugs.webkit.org/show_bug.cgi?id=230866.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:29 PM Changeset in webkit [283256] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] InlineDisplayContentBuilder should use the first-line style when applicable
https://bugs.webkit.org/show_bug.cgi?id=230932

Reviewed by Antti Koivisto.

This is in preparation for supporting first-line style.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::build):
(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineContent):
(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineSpanningInlineBoxes):

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

[LFC][IFC] Pass in the first-line style to the InlineContentBreaker::ContinuousContent runs if applicable
https://bugs.webkit.org/show_bug.cgi?id=230924

Reviewed by Antti Koivisto.

Now the inline content breaker has the correct set of style values when first-line style is set.

  • layout/formattingContexts/inline/InlineItem.h:

(WebCore::Layout::InlineItem::firstLineStyle const):

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineCandidate::InlineContent::appendInlineItem):
(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::computedIntrinsicWidth):
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::candidateContentForLine):

  • layout/formattingContexts/inline/InlineLineBuilder.h:
1:14 PM Changeset in webkit [283254] by Aditya Keerthi
  • 3 edits in trunk/Source/WebCore

Remove references to '-webkit-clear-button'
https://bugs.webkit.org/show_bug.cgi?id=230971

Reviewed by Simon Fraser.

The pseudo-element was removed in r150876.

  • css/html.css:
  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::splitCompoundAtImplicitShadowCrossingCombinator):

Updated comment to use a pseudo-element which exists.

1:06 PM Changeset in webkit [283253] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Add telemetry to the Networking process sandbox
https://bugs.webkit.org/show_bug.cgi?id=230919
<rdar://problem/83641392>

Reviewed by Brent Fulgham.

Add telemetry to the Networking process sandbox on iOS and macOS.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
12:49 PM Changeset in webkit [283252] by Alan Coon
  • 1 copy in tags/Safari-612.2.6.1.3

Tag Safari-612.2.6.1.3.

12:46 PM Changeset in webkit [283251] by Alan Coon
  • 8 edits in branches/safari-612.2.6.1-branch/Source

Versioning.

WebKit-7612.2.6.1.3

12:45 PM Changeset in webkit [283250] by Alan Coon
  • 2 edits in branches/safari-612.2.9.1-branch/Source/WebKitLegacy/mac

Cherry-pick r283225. rdar://problem/83683566

Make WebLocalizedString() thread-safe
https://bugs.webkit.org/show_bug.cgi?id=230954

Reviewed by Alexey Proskuryakov.

Make WebLocalizedString() thread-safe. It takes minimal effort to make it thread-safe given
that the NSBundle API is thread-safe [1] and clients keep calling it on the background thread.

[1] https://developer.apple.com/documentation/foundation/nslocalizedstringwithdefaultvalue
"As of OS X 10.11 and iOS 9, NSBundle is thread-safe. As such, you can safely call

NSLocalizedStringWithDefaultValue from any execution context."

  • Misc/WebLocalizableStrings.mm:

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

12:43 PM Changeset in webkit [283249] by Alan Coon
  • 2 edits in branches/safari-612.2.9.0-branch/Source/WebKitLegacy/mac

Cherry-pick r283225. rdar://problem/83683557

Make WebLocalizedString() thread-safe
https://bugs.webkit.org/show_bug.cgi?id=230954

Reviewed by Alexey Proskuryakov.

Make WebLocalizedString() thread-safe. It takes minimal effort to make it thread-safe given
that the NSBundle API is thread-safe [1] and clients keep calling it on the background thread.

[1] https://developer.apple.com/documentation/foundation/nslocalizedstringwithdefaultvalue
"As of OS X 10.11 and iOS 9, NSBundle is thread-safe. As such, you can safely call

NSLocalizedStringWithDefaultValue from any execution context."

  • Misc/WebLocalizableStrings.mm:

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

12:21 PM Changeset in webkit [283248] by Alan Coon
  • 5 edits in branches/safari-612.2.9.0-branch/Source

Cherry-pick r283156. rdar://problem/83648190

Vorbis decoder can't be instantiated - Remove workaround added in bug 228139
https://bugs.webkit.org/show_bug.cgi?id=230742
rdar://83484414

Reviewed by Eric Carlson.

Source/WebKit:

This is already covered by test; however this will fail on Monterey without the updated
CoreMedia framework.

  • Scripts/process-entitlements.sh: Add new required entitlement.
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::initializeSandbox): Only have bug workaround on BigSur and earlier.

Source/WTF:

  • wtf/PlatformUse.h: Add USE_VORBIS_AUDIOCOMPONENT_WORKAROUND

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

12:19 PM Changeset in webkit [283247] by Alan Coon
  • 8 edits in branches/safari-612.2.9.0-branch/Source

Versioning.

WebKit-7612.2.9.0.1

12:17 PM Changeset in webkit [283246] by Alan Coon
  • 3 edits in branches/safari-612.2.9.1-branch/Source/WebKit

Cherry-pick r283209. rdar://problem/83681911

Crash in WebKit::DisplayLink::displayLinkCallback()
https://bugs.webkit.org/show_bug.cgi?id=230917
<rdar://82528370>

Reviewed by Tim Horton.

We have evidence of a divide-by-zero crash in DisplayLink::notifyObserversDisplayWasRefreshed()
where m_currentUpdate.updatesPerSecond is zero. The only way I can see this happening
is if DisplayLink::DisplayLink() returns early, which should log. Protect against
this by initializing m_displayNominalFramesPerSecond to 60, and do another check,
with a log, in DisplayLink::addObserver() before we use m_displayNominalFramesPerSecond
for the first time.

Convert the logging to RELEASE_LOG_FAULT reports.

  • UIProcess/mac/DisplayLink.cpp: (WebKit::DisplayLink::DisplayLink): (WebKit::DisplayLink::addObserver):
  • UIProcess/mac/DisplayLink.h:

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

12:17 PM Changeset in webkit [283245] by Alan Coon
  • 5 edits in branches/safari-612.2.9.1-branch/Source

Cherry-pick r283156. rdar://problem/83681765

Vorbis decoder can't be instantiated - Remove workaround added in bug 228139
https://bugs.webkit.org/show_bug.cgi?id=230742
rdar://83484414

Reviewed by Eric Carlson.

Source/WebKit:

This is already covered by test; however this will fail on Monterey without the updated
CoreMedia framework.

  • Scripts/process-entitlements.sh: Add new required entitlement.
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::initializeSandbox): Only have bug workaround on BigSur and earlier.

Source/WTF:

  • wtf/PlatformUse.h: Add USE_VORBIS_AUDIOCOMPONENT_WORKAROUND

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

12:17 PM Changeset in webkit [283244] by mmaxfield@apple.com
  • 3 edits in trunk/LayoutTests/imported/w3c

Update WPT's IDL for font palettes
https://bugs.webkit.org/show_bug.cgi?id=230794
<rdar://problem/83530497>

Reviewed by Tim Horton.

Updating to the latest spec.

  • web-platform-tests/css/css-fonts/idlharness-expected.txt:
  • web-platform-tests/interfaces/css-fonts.idl:
12:16 PM Changeset in webkit [283243] by Alan Coon
  • 8 edits in branches/safari-612.2.9.1-branch/Source

Versioning.

WebKit-7612.2.9.1.1

11:42 AM Changeset in webkit [283242] by Alan Coon
  • 1 copy in branches/safari-612.2.9.3-branch

New branch.

11:41 AM Changeset in webkit [283241] by Alan Coon
  • 1 copy in branches/safari-612.2.9.2-branch

New branch.

11:41 AM Changeset in webkit [283240] by Alan Coon
  • 1 copy in branches/safari-612.2.9.1-branch

New branch.

11:41 AM Changeset in webkit [283239] by Alan Coon
  • 1 copy in branches/safari-612.2.9.0-branch

New branch.

11:21 AM Changeset in webkit [283238] by commit-queue@webkit.org
  • 21 edits
    2 adds in trunk

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

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

.:

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

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

Source/WebCore:

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

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

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

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

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

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

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

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:

(WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged):

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::toMediaSample):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::paintCompositedResultsToMediaSample):

  • html/canvas/WebGLRenderingContextBase.h:

(WebCore::WebGLRenderingContextBase::isPreservingDrawingBuffer const):

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

(WebCore::RemoteGraphicsContextGLProxyBase::paintCompositedResultsToMediaSample):

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

(WebCore::MediaSampleAVFObjC::createImageSample):

  • platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp:

(WebCore::GraphicsContextGLIOSurfaceSwapChain::present):

  • platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h:
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample):

  • platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm:

(WebCore::RemoteGraphicsContextGLProxyBase::paintCompositedResultsToMediaSample):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:

(WebCore::GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:

LayoutTests:

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

  • fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events-expected.txt:
  • fast/mediastream/captureStream/canvas3d-expected.txt:
11:19 AM Changeset in webkit [283237] by jer.noble@apple.com
  • 52 edits
    6 copies in trunk

Build-time optimization: forward declare more things in MediaPlayer.h and HTMLMediaElement.h
https://bugs.webkit.org/show_bug.cgi?id=230853

Reviewed by Eric Carlson.

Source/WebCore:

Forward-declare more things in MediaPlayer.h, and break apart *TrackPrivateClient into its
own file, so that clients don't need to include the entire class's file. This requires
other classes who got those includes "for free" previously to explicitly include headers in
their source files.

Drive-by fixes: Fixed a number of places where '0' was being used for 'null'.

  • Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.cpp:
  • Modules/mediasource/MediaSource.cpp:
  • Modules/mediasource/SourceBuffer.cpp:
  • Modules/mediasource/SourceBuffer.h:
  • Modules/webaudio/ScriptProcessorNode.cpp:

(WebCore::ScriptProcessorNode::initialize):

  • WebCore.xcodeproj/project.pbxproj:
  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFilterOperations):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeBasicShapeInset):
(WebCore::consumeBorderImageSlice):
(WebCore::consumeBorderImageOutset):

  • dom/Element.cpp:

(WebCore::Element::getAttributeNodeNS):

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::addConsoleMessage):

  • dom/TextEvent.cpp:

(WebCore::TextEvent::createForPlainTextPaste):

  • editing/InsertListCommand.cpp:

(WebCore::InsertListCommand::listifyParagraph):

  • html/HTMLMediaElement.cpp:
  • html/HTMLMediaElement.h:
  • html/track/AudioTrack.cpp:

(WebCore::AudioTrack::AudioTrack):
(WebCore::AudioTrack::~AudioTrack):
(WebCore::AudioTrack::setPrivate):

  • html/track/AudioTrack.h:

(WebCore::AudioTrackClient::audioTrackEnabledChanged): Deleted.
(WebCore::AudioTrackClient::audioTrackIdChanged): Deleted.
(WebCore::AudioTrackClient::audioTrackKindChanged): Deleted.
(WebCore::AudioTrackClient::audioTrackLabelChanged): Deleted.
(WebCore::AudioTrackClient::audioTrackLanguageChanged): Deleted.
(WebCore::AudioTrackClient::willRemoveAudioTrack): Deleted.

  • html/track/AudioTrackClient.h:

(WebCore::AudioTrackClient::audioTrackEnabledChanged):
(WebCore::AudioTrackClient::audioTrackIdChanged):
(WebCore::AudioTrackClient::audioTrackKindChanged):
(WebCore::AudioTrackClient::audioTrackLabelChanged):
(WebCore::AudioTrackClient::audioTrackLanguageChanged):
(WebCore::AudioTrackClient::willRemoveAudioTrack):

  • html/track/InbandTextTrack.cpp:

(WebCore::InbandTextTrack::InbandTextTrack):
(WebCore::InbandTextTrack::~InbandTextTrack):
(WebCore::InbandTextTrack::setPrivate):

  • html/track/VideoTrack.cpp:

(WebCore::VideoTrack::VideoTrack):
(WebCore::VideoTrack::~VideoTrack):
(WebCore::VideoTrack::setPrivate):

  • html/track/VideoTrack.h:

(WebCore::VideoTrackClient::videoTrackIdChanged): Deleted.
(WebCore::VideoTrackClient::videoTrackKindChanged): Deleted.
(WebCore::VideoTrackClient::videoTrackLabelChanged): Deleted.
(WebCore::VideoTrackClient::videoTrackLanguageChanged): Deleted.
(WebCore::VideoTrackClient::videoTrackSelectedChanged): Deleted.
(WebCore::VideoTrackClient::willRemoveVideoTrack): Deleted.

  • html/track/VideoTrack.idl:
  • html/track/VideoTrackClient.h:

(WebCore::VideoTrackClient::videoTrackIdChanged):
(WebCore::VideoTrackClient::videoTrackKindChanged):
(WebCore::VideoTrackClient::videoTrackLabelChanged):
(WebCore::VideoTrackClient::videoTrackLanguageChanged):
(WebCore::VideoTrackClient::videoTrackSelectedChanged):
(WebCore::VideoTrackClient::willRemoveVideoTrack):

  • page/PageConsoleClient.cpp:

(WebCore::PageConsoleClient::addMessage):

  • platform/graphics/AudioTrackPrivate.h:

(WebCore::AudioTrackPrivate::setClient):
(WebCore::AudioTrackPrivate::clearClient):

  • platform/graphics/AudioTrackPrivateClient.h:
  • platform/graphics/InbandTextTrackPrivate.h:

(WebCore::InbandTextTrackPrivate::setClient):
(WebCore::InbandTextTrackPrivate::clearClient):

  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::MediaPlayer):

  • platform/graphics/MediaPlayer.h:
  • platform/graphics/SourceBufferPrivate.cpp:
  • platform/graphics/TrackPrivateBase.h:
  • platform/graphics/TrackPrivateBaseClient.h:
  • platform/graphics/VideoTrackPrivate.h:

(WebCore::VideoTrackPrivate::setClient):
(WebCore::VideoTrackPrivate::clearClient):

  • platform/graphics/VideoTrackPrivateClient.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
  • platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp:
  • platform/mock/mediasource/MockMediaSourcePrivate.h:
  • rendering/RenderEmbeddedObject.cpp:

(WebCore::RenderEmbeddedObject::getReplacementTextGeometry const):

  • rendering/RenderSearchField.cpp:

(WebCore::RenderSearchField::RenderSearchField):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::setFontFromControlSize const):

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLParserContext::createMemoryParser):

Source/WebKit:

Use new WeakPtr based client setters on TrackPrivates.

  • GPUProcess/media/RemoteAudioTrackProxy.cpp:

(WebKit::RemoteAudioTrackProxy::RemoteAudioTrackProxy):
(WebKit::RemoteAudioTrackProxy::~RemoteAudioTrackProxy):

  • GPUProcess/media/RemoteTextTrackProxy.cpp:

(WebKit::RemoteTextTrackProxy::RemoteTextTrackProxy):
(WebKit::RemoteTextTrackProxy::~RemoteTextTrackProxy):

  • GPUProcess/media/RemoteVideoTrackProxy.cpp:

(WebKit::RemoteVideoTrackProxy::RemoteVideoTrackProxy):
(WebKit::RemoteVideoTrackProxy::~RemoteVideoTrackProxy):

Source/WebKitLegacy:

Use nullptr rather than zero for null values.

  • Storage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::StorageNamespaceImpl):

11:12 AM Changeset in webkit [283236] by ysuzuki@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Remove CodeBlock::m_llintExecuteCounter
https://bugs.webkit.org/show_bug.cgi?id=230938

Reviewed by Keith Miller.

CodeBlock::m_llintExecuteCounter is a pointer pointing the middle of UnlinkedCodeBlock.
So this is not necessary to have this pointer separately to access to that from LLInt,
since loading UnlinkedCodeBlock and accessing to the middle of that do the same number
of loads.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::jitSoon):
(JSC::CodeBlock::jitNextInvocation):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::checkIfJITThresholdReached):
(JSC::CodeBlock::dontJITAnytimeSoon):
(JSC::CodeBlock::llintExecuteCounter const):
(JSC::CodeBlock::addressOfJITExecuteCounter): Deleted.

  • llint/LowLevelInterpreter.asm:
11:05 AM Changeset in webkit [283235] by youenn@apple.com
  • 3 edits in trunk/LayoutTests

[ iOS macOS wk2 ] webrtc/datachannel/mdns-ice-candidates.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=230700
<rdar://problem/83456565>

Reviewed by Eric Carlson.

  • platform/mac-wk2/TestExpectations:
  • webrtc/datachannel/mdns-ice-candidates.html:

Close connections test after test.

10:58 AM Changeset in webkit [283234] by Alan Bujtas
  • 14 edits in trunk/Source/WebCore

[LFC][IFC] Layout::Box should be able to return the first-line style when applicable
https://bugs.webkit.org/show_bug.cgi?id=230921

Reviewed by Antti Koivisto.

This is in preparation for supporting first-line style.

  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::rootBoxFirstLineStyle):
(WebCore::LayoutIntegration::BoxTree::BoxTree):
(WebCore::LayoutIntegration::BoxTree::buildTree):
(WebCore::LayoutIntegration::BoxTree::updateStyle):

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::Box): Use the rare data to store first-line style.
(WebCore::Layout::Box::updateStyle):

  • layout/layouttree/LayoutBox.h:

(WebCore::Layout::Box::firstLineStyle const):

  • layout/layouttree/LayoutContainerBox.cpp:

(WebCore::Layout::ContainerBox::ContainerBox):

  • layout/layouttree/LayoutContainerBox.h:

(WebCore::Layout::ContainerBox::ContainerBox):

  • layout/layouttree/LayoutInitialContainingBlock.cpp:

(WebCore::Layout::InitialContainingBlock::InitialContainingBlock):

  • layout/layouttree/LayoutInitialContainingBlock.h:
  • layout/layouttree/LayoutInlineTextBox.cpp:

(WebCore::Layout::InlineTextBox::InlineTextBox):

  • layout/layouttree/LayoutInlineTextBox.h:
  • layout/layouttree/LayoutLineBreakBox.cpp:

(WebCore::Layout::LineBreakBox::LineBreakBox):

  • layout/layouttree/LayoutLineBreakBox.h:
  • layout/layouttree/LayoutReplacedBox.cpp:

(WebCore::Layout::ReplacedBox::ReplacedBox):

  • layout/layouttree/LayoutReplacedBox.h:
10:17 AM Changeset in webkit [283233] by Alexey Shvayka
  • 84 edits
    5 adds in trunk

[WebIDL] Align property order of DOM constructors with ECMA-262 counterparts
https://bugs.webkit.org/show_bug.cgi?id=230584

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

This is being upstreamed at https://github.com/web-platform-tests/wpt/pull/30333.

  • web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any-expected.txt: Added.
  • web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.html: Added.
  • web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.js: Added.
  • web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.worker-expected.txt: Added.
  • web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.worker.html: Added.

Source/WebCore:

This patch implements spec proposal [1] on matching property order of DOM constructors
with ECMA-262 functions: "length", "name", "prototype". Aligns WebKit with Blink and Gecko.
Also, groups property puts to remove 2 extra $interface->isNamespaceObject checks.

No behavior change except for enumeration order.

[1] https://github.com/heycam/webidl/pull/914

Tests: imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.html

imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/builtin-function-properties.any.worker.html

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateConstructorHelperMethods):

  • bindings/scripts/test/JS/*: Updated.
10:03 AM Changeset in webkit [283232] by sbarati@apple.com
  • 3 edits
    1 add in trunk

Code inside strength reduction can incorrectly prove that we know what lastIndex is
https://bugs.webkit.org/show_bug.cgi?id=230802
<rdar://problem/83543699>

Reviewed by Mark Lam.

JSTests:

  • stress/dont-fold-regexp-exec-when-we-dont-know-last-index-and-regexp-is-constant.js: Added.

(assert):
(let.reg.RegExp.foo.g.doExec):
(noInline.doExec):

Source/JavaScriptCore:

The phase was searching backwards in the graph to see if it found the RegExp
node. However, the RegExp node might be a JSConstant. Hence, the program
didn't allocate it. So we can't assume that we know what the lastIndex is.
We were incorrectly assuming it was "0" in a program like this:
a: JSConstant(RegExp)
b: RegExpExec(@a)

And we assumed we're invoking RegExpExec with lastIndex is 0, because we found
our RegExp in a backwards search. This is likely because we're also matching
NewRegExp nodes, in which case, it is valid to say lastIndex is 0.

This caused us to return a constant value that would've been the exec
result had we invoked it with a NewRegExpNode.

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::run):
(JSC::DFG::StrengthReductionPhase::handleNode):

9:56 AM Changeset in webkit [283231] by sbarati@apple.com
  • 2 edits in trunk/JSTests

DoesGCCheck does not use enough bits for nodeIndex
https://bugs.webkit.org/show_bug.cgi?id=230915
<rdar://83297515>

Unreviewed. Forgot to add a try/catch in the test.

  • stress/verify-can-gc-node-index.js:
9:54 AM Changeset in webkit [283230] by youenn@apple.com
  • 3 edits in trunk/Tools

WPT importer should create serviceworker template for templated test that have worker as global
https://bugs.webkit.org/show_bug.cgi?id=230943

Reviewed by Jonathan Bedard.

Tests with a worker global should run in all worker global scope (dedicated worker, shared worker and service worker).
Let's add service worker by default for now.

  • Scripts/webkitpy/w3c/test_importer.py:
  • Scripts/webkitpy/w3c/test_importer_unittest.py:
9:44 AM Changeset in webkit [283229] by ysuzuki@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

[JSC] Use FixedVector in JITConstantPool
https://bugs.webkit.org/show_bug.cgi?id=230937

Reviewed by Keith Miller.

This patch changes JITConstantPool to use FixedVector. This allocates exact size
of memory and Making sizeof(JITConstantPool) smaller. We also use CompactPointerTuple
for JITConstantPool::Value since it is faster for access.

To achieve that, in JIT, we append Value to normal Vector. And when finalizing BaselineJITCode
we construct JITConstantPool from that Vector.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::setupWithUnlinkedBaselineCode):

  • jit/BaselineJITCode.h:

(JSC::JITConstantPool::JITConstantPool):
(JSC::JITConstantPool::add): Deleted.

  • jit/JIT.cpp:

(JSC::JIT::JIT):
(JSC::JIT::addToConstantPool):

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

(JSC::JIT::compileOpCall):
(JSC::JIT::emit_op_iterator_open):
(JSC::JIT::emit_op_iterator_next):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitNewFuncCommon):
(JSC::JIT::emitNewFuncExprCommon):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_get_private_name):
(JSC::JIT::emit_op_set_private_brand):
(JSC::JIT::emit_op_check_private_brand):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emit_op_put_private_name):
(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emit_op_in_by_id):
(JSC::JIT::emit_op_in_by_val):
(JSC::JIT::emitHasPrivate):
(JSC::JIT::emit_op_enumerator_get_by_val):

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

Fix typo in RenderSVGBlock::updateFromStyle comment
https://bugs.webkit.org/show_bug.cgi?id=230955

Patch by Olivier Blin <Olivier Blin> on 2021-09-29
Reviewed by Simon Fraser.

No new tests, just a comment fix.

  • rendering/svg/RenderSVGBlock.cpp:

(WebCore::RenderSVGBlock::updateFromStyle): refactor instead of reactor.

9:28 AM Changeset in webkit [283227] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit

Reduce allocations in DatabaseUtilities::sortedTables
https://bugs.webkit.org/show_bug.cgi?id=230933

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

No change in behavior except no more memory allocations. What a wonderful thing.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::sortedTables):

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/DatabaseUtilities.cpp:

(WebKit::DatabaseUtilities::migrateDataToNewTablesIfNecessary):

  • NetworkProcess/DatabaseUtilities.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:

(WebKit::PCM::Database::sortedTables):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.h:
9:26 AM Changeset in webkit [283226] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS ] fast/scrolling/ios/click-events-after-long-press-during-momentum-scroll-in-overflow.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=230959

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
9:12 AM Changeset in webkit [283225] by Chris Dumez
  • 2 edits in trunk/Source/WebKitLegacy/mac

Make WebLocalizedString() thread-safe
https://bugs.webkit.org/show_bug.cgi?id=230954

Reviewed by Alexey Proskuryakov.

Make WebLocalizedString() thread-safe. It takes minimal effort to make it thread-safe given
that the NSBundle API is thread-safe [1] and clients keep calling it on the background thread.

[1] https://developer.apple.com/documentation/foundation/nslocalizedstringwithdefaultvalue
"As of OS X 10.11 and iOS 9, NSBundle is thread-safe. As such, you can safely call

NSLocalizedStringWithDefaultValue from any execution context."

  • Misc/WebLocalizableStrings.mm:
9:10 AM Changeset in webkit [283224] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS BigSur ] http/tests/appcache/fail-on-update.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=227891

Unreviewed test gardening.

  • platform/mac/TestExpectations:
9:04 AM Changeset in webkit [283223] by Aditya Keerthi
  • 62 edits
    7 copies
    2 moves
    28 adds
    2 deletes in trunk/LayoutTests

Update css-ui WPT
https://bugs.webkit.org/show_bug.cgi?id=230900
rdar://83641111

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Update css/css-ui from WPT 016d2ddbb67ad29f36d175320e99986e7ad2571a.

  • resources/import-expectations.json:
  • resources/resource-files.json:
  • web-platform-tests/css/css-ui/accent-color-checkbox-checked-001-notref.html: Added.
  • web-platform-tests/css/css-ui/accent-color-checkbox-checked-001.tentative-expected.html: Added.
  • web-platform-tests/css/css-ui/accent-color-checkbox-checked-001.tentative.html: Added.
  • web-platform-tests/css/css-ui/accent-color-computed-expected.txt: Added.
  • web-platform-tests/css/css-ui/accent-color-computed.html: Added.
  • web-platform-tests/css/css-ui/accent-color-invalidation-currentcolor-expected.html: Added.
  • web-platform-tests/css/css-ui/accent-color-invalidation-currentcolor.html: Added.
  • web-platform-tests/css/css-ui/accent-color-parent-currentcolor-expected.html: Added.
  • web-platform-tests/css/css-ui/accent-color-parent-currentcolor.html: Added.
  • web-platform-tests/css/css-ui/accent-color-parsing-expected.txt: Added.
  • web-platform-tests/css/css-ui/accent-color-parsing.html: Added.
  • web-platform-tests/css/css-ui/accent-color-visited.tentative-expected.html: Added.
  • web-platform-tests/css/css-ui/accent-color-visited.tentative.html: Added.
  • web-platform-tests/css/css-ui/animation/accent-color-interpolation-expected.txt: Added.
  • web-platform-tests/css/css-ui/animation/accent-color-interpolation.html: Added.
  • web-platform-tests/css/css-ui/animation/w3c-import.log:
  • web-platform-tests/css/css-ui/appearance-auto-001-expected.html:
  • web-platform-tests/css/css-ui/appearance-auto-001.html:
  • web-platform-tests/css/css-ui/appearance-auto-input-non-widget-001-expected.html: Added.
  • web-platform-tests/css/css-ui/appearance-auto-input-non-widget-001.html: Added.
  • web-platform-tests/css/css-ui/appearance-auto-non-html-namespace-001-expected.html: Added.
  • web-platform-tests/css/css-ui/appearance-auto-non-html-namespace-001.html: Added.
  • web-platform-tests/css/css-ui/appearance-button-001-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-menulist-001-expected.html.
  • web-platform-tests/css/css-ui/appearance-button-001.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-auto-001.html.
  • web-platform-tests/css/css-ui/appearance-checkbox-001-expected.html:
  • web-platform-tests/css/css-ui/appearance-checkbox-001.html:
  • web-platform-tests/css/css-ui/appearance-cssom-001.html:
  • web-platform-tests/css/css-ui/appearance-initial-value-001.html:
  • web-platform-tests/css/css-ui/appearance-listbox-001-expected.html:
  • web-platform-tests/css/css-ui/appearance-listbox-001.html:
  • web-platform-tests/css/css-ui/appearance-menulist-001-expected.html:
  • web-platform-tests/css/css-ui/appearance-menulist-001.html:
  • web-platform-tests/css/css-ui/appearance-menulist-button-001-expected.html:
  • web-platform-tests/css/css-ui/appearance-menulist-button-001.html:
  • web-platform-tests/css/css-ui/appearance-menulist-button-002-expected.html: Removed.
  • web-platform-tests/css/css-ui/appearance-menulist-button-002.tentative-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-menulist-001-expected.html.
  • web-platform-tests/css/css-ui/appearance-menulist-button-002.tentative.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-menulist-button-002.html.
  • web-platform-tests/css/css-ui/appearance-meter-001-expected.html:
  • web-platform-tests/css/css-ui/appearance-meter-001.html:
  • web-platform-tests/css/css-ui/appearance-progress-bar-001-expected.html:
  • web-platform-tests/css/css-ui/appearance-progress-bar-001.html:
  • web-platform-tests/css/css-ui/appearance-progress-bar-002-expected.html:
  • web-platform-tests/css/css-ui/appearance-progress-bar-002.html:
  • web-platform-tests/css/css-ui/appearance-push-button-001-expected.html:
  • web-platform-tests/css/css-ui/appearance-push-button-001.html:
  • web-platform-tests/css/css-ui/appearance-radio-001-expected.html:
  • web-platform-tests/css/css-ui/appearance-radio-001.html:
  • web-platform-tests/css/css-ui/appearance-searchfield-001-expected.html:
  • web-platform-tests/css/css-ui/appearance-searchfield-001.html:
  • web-platform-tests/css/css-ui/appearance-slider-horizontal-001-expected.html:
  • web-platform-tests/css/css-ui/appearance-slider-horizontal-001.html:
  • web-platform-tests/css/css-ui/appearance-square-button-001-expected.html:
  • web-platform-tests/css/css-ui/appearance-square-button-001.html:
  • web-platform-tests/css/css-ui/appearance-textarea-001-expected.html:
  • web-platform-tests/css/css-ui/appearance-textarea-001.html:
  • web-platform-tests/css/css-ui/appearance-textfield-001.html:
  • web-platform-tests/css/css-ui/outline-005.html:
  • web-platform-tests/css/css-ui/outline-006.html:
  • web-platform-tests/css/css-ui/parsing/resize-computed-expected.txt:
  • web-platform-tests/css/css-ui/parsing/resize-computed.html:
  • web-platform-tests/css/css-ui/resize-child-will-change-transform-expected.html: Added.
  • web-platform-tests/css/css-ui/resize-child-will-change-transform.html: Added.
  • web-platform-tests/css/css-ui/resize-generated-content-expected.html: Added.
  • web-platform-tests/css/css-ui/resize-generated-content.html: Added.
  • web-platform-tests/css/css-ui/text-overflow-002-expected.html:
  • web-platform-tests/css/css-ui/text-overflow-004-expected.html:
  • web-platform-tests/css/css-ui/text-overflow-022-expected.html:
  • web-platform-tests/css/css-ui/translucent-outline-expected.html: Added.
  • web-platform-tests/css/css-ui/translucent-outline.html: Added.
  • web-platform-tests/css/css-ui/w3c-import.log:
  • web-platform-tests/css/css-ui/webkit-appearance-auto-001-expected.html:
  • web-platform-tests/css/css-ui/webkit-appearance-auto-input-non-widget-001-expected.html: Added.
  • web-platform-tests/css/css-ui/webkit-appearance-auto-input-non-widget-001.html: Added.
  • web-platform-tests/css/css-ui/webkit-appearance-button-001-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-menulist-001-expected.html.
  • web-platform-tests/css/css-ui/webkit-appearance-button-001.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-auto-001.html.
  • web-platform-tests/css/css-ui/webkit-appearance-checkbox-001-expected.html:
  • web-platform-tests/css/css-ui/webkit-appearance-listbox-001-expected.html:
  • web-platform-tests/css/css-ui/webkit-appearance-menulist-001-expected.html:
  • web-platform-tests/css/css-ui/webkit-appearance-menulist-button-001-expected.html:
  • web-platform-tests/css/css-ui/webkit-appearance-menulist-button-002-expected.html: Removed.
  • web-platform-tests/css/css-ui/webkit-appearance-menulist-button-002.tentative-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-menulist-001-expected.html.
  • web-platform-tests/css/css-ui/webkit-appearance-menulist-button-002.tentative.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-ui/webkit-appearance-menulist-button-002.html.
  • web-platform-tests/css/css-ui/webkit-appearance-meter-001-expected.html:
  • web-platform-tests/css/css-ui/webkit-appearance-progress-bar-001-expected.html:
  • web-platform-tests/css/css-ui/webkit-appearance-progress-bar-002-expected.html: Added.
  • web-platform-tests/css/css-ui/webkit-appearance-progress-bar-002.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-progress-bar-002.html.
  • web-platform-tests/css/css-ui/webkit-appearance-push-button-001-expected.html:
  • web-platform-tests/css/css-ui/webkit-appearance-radio-001-expected.html:
  • web-platform-tests/css/css-ui/webkit-appearance-searchfield-001-expected.html:
  • web-platform-tests/css/css-ui/webkit-appearance-slider-horizontal-001-expected.html:
  • web-platform-tests/css/css-ui/webkit-appearance-square-button-001-expected.html:
  • web-platform-tests/css/css-ui/webkit-appearance-textarea-001-expected.html:

LayoutTests:

Remove deleted tests.

  • platform/gtk/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
9:02 AM Changeset in webkit [283222] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[iOS] http/tests/appcache/fail-on-update.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=227891

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
8:40 AM Changeset in webkit [283221] by mmaxfield@apple.com
  • 43 edits in trunk

Font palette names have to start with two hyphens
https://bugs.webkit.org/show_bug.cgi?id=230790
<rdar://problem/83530013>

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Tests are being upstreamed at https://github.com/web-platform-tests/wpt/pull/30963.

  • web-platform-tests/css/css-fonts/font-palette-add-2-expected.html:
  • web-platform-tests/css/css-fonts/font-palette-add-2.html:
  • web-platform-tests/css/css-fonts/font-palette-add-expected-mismatch.html:
  • web-platform-tests/css/css-fonts/font-palette-add.html:
  • web-platform-tests/css/css-fonts/font-palette-empty-font-family-expected-mismatch.html:
  • web-platform-tests/css/css-fonts/font-palette-empty-font-family.html:
  • web-platform-tests/css/css-fonts/font-palette-modify-2-expected.html:
  • web-platform-tests/css/css-fonts/font-palette-modify-2.html:
  • web-platform-tests/css/css-fonts/font-palette-modify-expected-mismatch.html:
  • web-platform-tests/css/css-fonts/font-palette-modify.html:
  • web-platform-tests/css/css-fonts/font-palette-remove-2-expected.html:
  • web-platform-tests/css/css-fonts/font-palette-remove-2.html:
  • web-platform-tests/css/css-fonts/font-palette-remove-expected-mismatch.html:
  • web-platform-tests/css/css-fonts/font-palette-remove.html:
  • web-platform-tests/css/css-fonts/font-palette.html:
  • web-platform-tests/css/css-fonts/palette-values-rule-add-2-expected.html:
  • web-platform-tests/css/css-fonts/palette-values-rule-add-2.html:
  • web-platform-tests/css/css-fonts/palette-values-rule-add-expected-mismatch.html:
  • web-platform-tests/css/css-fonts/palette-values-rule-add.html:
  • web-platform-tests/css/css-fonts/palette-values-rule-delete-2-expected.html:
  • web-platform-tests/css/css-fonts/palette-values-rule-delete-2.html:
  • web-platform-tests/css/css-fonts/palette-values-rule-delete-expected-mismatch.html:
  • web-platform-tests/css/css-fonts/palette-values-rule-delete.html:
  • web-platform-tests/css/css-fonts/parsing/font-palette-computed-expected.txt:
  • web-platform-tests/css/css-fonts/parsing/font-palette-computed.html:
  • web-platform-tests/css/css-fonts/parsing/font-palette-invalid-expected.txt:
  • web-platform-tests/css/css-fonts/parsing/font-palette-invalid.html:
  • web-platform-tests/css/css-fonts/parsing/font-palette-valid-expected.txt:
  • web-platform-tests/css/css-fonts/parsing/font-palette-valid.html:
  • web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html:
  • web-platform-tests/css/css-fonts/parsing/font-palette-values-valid.html:

Source/WebCore:

The spec changed in
https://github.com/w3c/csswg-drafts/commit/9ddf9388a2fe0ac300c41b7244e10c0a40fe0cae.

Font palettes now have to be named with a <dashed-ident>.

Updated existing tests.

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeFontPaletteValuesRule):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontPalette):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeDashedCustomIdent):

  • css/parser/CSSPropertyParserHelpers.h:
8:39 AM Changeset in webkit [283220] by Devin Rousso
  • 9 edits in trunk/Source/WebKit

Add support for sending Expected<void, E> in IPC messages
https://bugs.webkit.org/show_bug.cgi?id=230907

Reviewed by Chris Dumez.

  • Platform/IPC/ArgumentCoders.h:
  • WebProcess/Inspector/WebInspectorUIExtensionController.messages.in:
  • WebProcess/Inspector/WebInspectorUIExtensionController.h:
  • WebProcess/Inspector/WebInspectorUIExtensionController.cpp:

(WebKit::WebInspectorUIExtensionController::registerExtension):
(WebKit::WebInspectorUIExtensionController::unregisterExtension):
(WebKit::WebInspectorUIExtensionController::showExtensionTab):

  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h:
  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp:

(WebKit::WebInspectorUIExtensionControllerProxy::registerExtension):
(WebKit::WebInspectorUIExtensionControllerProxy::unregisterExtension):
(WebKit::WebInspectorUIExtensionControllerProxy::showExtensionTab):

  • UIProcess/API/Cocoa/_WKInspector.mm:

(-[_WKInspector unregisterExtension:completionHandler:]):
(-[_WKInspector showExtensionTabWithIdentifier:completionHandler:]):

  • UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:

(-[_WKRemoteWebInspectorViewController unregisterExtension:completionHandler:]):
(-[_WKRemoteWebInspectorViewController showExtensionTabWithIdentifier:completionHandler:]):
Replace Expected<bool, ...> with Expected<void, ...> now that it can be sent over IPC.
No change in functionality as the bool was never actually used (it was a hardcoded true).

8:38 AM Changeset in webkit [283219] by mmaxfield@apple.com
  • 7 edits in trunk

CSSFontPaletteValuesRule should not be maplike
https://bugs.webkit.org/show_bug.cgi?id=230793
<rdar://problem/83530242>

Reviewed by Wenson Hsieh.

LayoutTests/imported/w3c:

The tests are being upstreamed in https://github.com/web-platform-tests/wpt/pull/30966.

  • web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html:
  • web-platform-tests/css/css-fonts/parsing/font-palette-values-valid.html:

Source/WebCore:

The spec changed in
https://github.com/w3c/csswg-drafts/commit/c10855a2c65f51a09697613b977059fae78ff0bc
from "maplike<unsigned long, CSSOMString>" to "attribute CSSOMString overrideColor".

Tests: imported/w3c/web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html

imported/w3c/web-platform-tests/css/css-fonts/parsing/font-palette-values-valid.html

  • css/CSSFontPaletteValuesRule.cpp:

(WebCore::CSSFontPaletteValuesRule::basePalette const):
(WebCore::CSSFontPaletteValuesRule::overrideColor const):
(WebCore::CSSFontPaletteValuesRule::cssText const):
(WebCore::CSSFontPaletteValuesRule::initializeMapLike): Deleted.

  • css/CSSFontPaletteValuesRule.h:
  • css/CSSFontPaletteValuesRule.idl:
8:36 AM Changeset in webkit [283218] by Antti Koivisto
  • 2 edits in trunk/Source/WTF

[CSS Cascade Layers] Enable by default
https://bugs.webkit.org/show_bug.cgi?id=230948

Reviewed by Simon Fraser.

Flip the switch.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
8:31 AM Changeset in webkit [283217] by eric.carlson@apple.com
  • 16 edits
    5 adds in trunk

[Cocoa] Support in-band chapter tracks
https://bugs.webkit.org/show_bug.cgi?id=230380
<rdar://problem/83218578>

Reviewed by Jer Noble.
Source/WebCore:

Create a text track for every non-empty AVAssetChapterMetadataGroup, and create
a VTT cue for every chapter.

Test: media/track/track-in-band-chapters.html

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/InbandTextTrackPrivate.h:

(WebCore::InbandTextTrackPrivate::setClient):
(WebCore::InbandTextTrackPrivate::cueFormat const):

  • platform/graphics/avfoundation/objc/InbandChapterTrackPrivateAVFObjC.h: Added.

(WebCore::InbandChapterTrackPrivateAVFObjC::create):
(WebCore::InbandChapterTrackPrivateAVFObjC::setTextTrackIndex):
(WebCore::InbandChapterTrackPrivateAVFObjC::ChapterData::operator== const):

  • platform/graphics/avfoundation/objc/InbandChapterTrackPrivateAVFObjC.mm: Added.

(WebCore::InbandChapterTrackPrivateAVFObjC::InbandChapterTrackPrivateAVFObjC):
(WebCore::InbandChapterTrackPrivateAVFObjC::processChapters):
(WebCore::InbandChapterTrackPrivateAVFObjC::language const):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setAsset):
(WebCore::MediaPlayerPrivateAVFoundationObjC::metadataLoaded):
(WebCore::MediaPlayerPrivateAVFoundationObjC::processChapterTracks):
(WebCore::assetMetadataKeyNames):
(-[WebCoreAVFMovieObserver chapterMetadataDidChange:]):

  • platform/graphics/iso/ISOVTTCue.cpp:

(WebCore::ISOWebVTTCue::ISOWebVTTCue):

  • platform/graphics/iso/ISOVTTCue.h:

Source/WebCore/PAL:

  • pal/cocoa/AVFoundationSoftLink.h:
  • pal/cocoa/AVFoundationSoftLink.mm:

LayoutTests:

  • media/content/multi-language-chapters.mp4: Added.
  • media/track/track-in-band-chapters-expected.txt: Added.
  • media/track/track-in-band-chapters.html: Added.
  • media/track/track-manual-mode.html: Updated because the movie file this uses has

in-band chapter tracks.

  • media/track/track-manual-mode-expected.txt: Ditto.
  • platform/glib/TestExpectations: Skipped.
  • platform/win/TestExpectations: Skipped.
8:23 AM Changeset in webkit [283216] by Antti Koivisto
  • 6 edits in trunk

[CSS Cascade Layers] Add fonts and keyframes in cascade layer order
https://bugs.webkit.org/show_bug.cgi?id=230947

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/layer-font-face-override-expected.txt:
  • web-platform-tests/css/css-cascade/layer-keyframes-override-expected.txt:

Source/WebCore:

Ensure font and keyframe rules respect cascade layer ordering.

  • style/RuleSet.cpp:

(WebCore::Style::RuleSet::Builder::addChildRules):

Collect resolver mutating rules instead of processing them immediately.

(WebCore::Style::RuleSet::Builder::~Builder):
(WebCore::Style::RuleSet::Builder::addMutatingRulesToResolver):

Process the rules in correct order after cascade layer order has been established.

In additive case we need to also re-process rules added from earlier stylesheets as they might
have higher priority than the newly added ones.

(WebCore::Style::RuleSet::shrinkToFit):

  • style/RuleSet.h:

(WebCore::Style::RuleSet::cascadeLayerOrderForIdentifier const):
(WebCore::Style::RuleSet::cascadeLayerOrderFor const):

7:38 AM Changeset in webkit [283215] by commit-queue@webkit.org
  • 2 edits
    2 adds in trunk/Tools/buildstream

[Flatpak SDK] Add bwrap and xdg-dbus-proxy
https://bugs.webkit.org/show_bug.cgi?id=230456

Patch by Philippe Normand <pnormand@igalia.com> on 2021-09-29
Reviewed by Sergio Villar Senin.

These are needed in order to enable the Bubblewrap launcher in WPE/GTK at build time.

  • elements/sdk-platform.bst:
  • elements/sdk/bubblewrap.bst: Added.
  • elements/sdk/xdg-dbus-proxy.bst: Added.
7:25 AM Changeset in webkit [283214] by commit-queue@webkit.org
  • 2 edits in trunk/Tools/buildstream

[Flatpak SDK] rr replay is broken
https://bugs.webkit.org/show_bug.cgi?id=230952

Patch by Philippe Normand <pnormand@igalia.com> on 2021-09-29
Reviewed by Sergio Villar Senin.

  • patches/rr/0001-cmake-Look-for-resources-in-cmake-s-install-lib-dir.patch: As lib

resources and bin resources don't necessarily share the same parent directory, one lookup
function is needed for each use-case.

4:12 AM Changeset in webkit [283213] by commit-queue@webkit.org
  • 2 edits
    2 adds in trunk/Tools/buildstream

[Flatpak SDK] rr unable to locate librrpage.so
https://bugs.webkit.org/show_bug.cgi?id=230942

Patch by Philippe Normand <pnormand@igalia.com> on 2021-09-29
Reviewed by Sergio Villar Senin.

Look for resources in cmake's install lib dir.

  • elements/sdk/rr.bst:
  • patches/rr/0001-cmake-Look-for-resources-in-cmake-s-install-lib-dir.patch: Added.

Sep 28, 2021:

11:32 PM Changeset in webkit [283212] by BJ Burg
  • 5 edits
    1 add in trunk/Source/WebInspectorUI

Web Inspector: add settings option for 'Show Mock Web Extension Tab' in engineering builds
https://bugs.webkit.org/show_bug.cgi?id=230923

Reviewed by Devin Rousso.

This is an engineering-only facility to quickly check the behavior of
WebInspectorExtensionTabContentView (aka Web Extension Tabs). The behavior
of these tabs differs from other tabs, so it is important to make this easy to verify.

  • UserInterface/Base/Setting.js: Add new setting.
  • UserInterface/Debug/Bootstrap.js:

(updateMockWebExtensionTab):
(WI.runBootstrapOperations):
Call the InspectorFrontendAPI commands that would be called by WebInspectorUIExtensionController
to register an extension and create a tab for it.

  • UserInterface/Debug/MockWebExtensionTab.html: Added.

This is adapted from InspectorExtension-basic-tab.html as used in TestWebKitAPI.

  • UserInterface/Protocol/InspectorFrontendAPI.js: Fix a typo in the headerdoc

for createTabForExtension.

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createEngineeringSettingsView):

11:23 PM Changeset in webkit [283211] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WTF

iOS simulator build should use PTHREAD_JIT_PERMISSIONS_API
https://bugs.webkit.org/show_bug.cgi?id=230920
rdar://77494871

Reviewed by Filip Pizlo.

In AppleSilicon macOS, we should use PTHREAD_JIT_PERMISSIONS_API for OSS build.
However, we are not enabling that for iOS simulator build. This patch enables that.
This API exists after iOS 14.0 SDK.

  • wtf/PlatformUse.h:
9:52 PM Changeset in webkit [283210] by mmaxfield@apple.com
  • 18 edits in trunk/Source/WebCore

Factor out rare members of FontCreationContext into FontCreationContextRareData
https://bugs.webkit.org/show_bug.cgi?id=230800
<rdar://problem/83538227>

Reviewed by Alan Bujtas.

FontCreationContext is used inside HashMap keys in font caches, so we want the type to be
small. Palettes and font features are rare, so we can move those into a heap-allocated
rare data object, thereby decreasing the size of FontCreationContext for most fonts.
Importantly, if palettes and font features aren't used, the RefPtr will just be null, and
no allocation is performed.

No new tests because there is no behavior change.

  • css/CSSFontFace.h:
  • css/CSSFontFaceSource.h:
  • css/CSSSegmentedFontFace.h:
  • loader/FontLoadRequest.h:
  • loader/cache/CachedFont.h:
  • loader/cache/CachedFontLoadRequest.h:
  • loader/cache/CachedSVGFont.h:
  • platform/graphics/FontCreationContext.h:

(WebCore::FontCreationContextRareData::create):
(WebCore::FontCreationContextRareData::fontFaceFeatures const):
(WebCore::FontCreationContextRareData::fontPaletteValues const):
(WebCore::FontCreationContextRareData::operator== const):
(WebCore::FontCreationContextRareData::operator!= const):
(WebCore::FontCreationContextRareData::FontCreationContextRareData):
(WebCore::FontCreationContext::FontCreationContext):
(WebCore::FontCreationContext::fontFaceFeatures const):
(WebCore::FontCreationContext::fontFaceCapabilities const):
(WebCore::FontCreationContext::fontPaletteValues const):
(WebCore::FontCreationContext::operator== const):
(WebCore::add):

  • platform/graphics/FontPaletteValues.h:

(WebCore::FontPaletteValues::operator bool const):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::addAttributesForFontPalettes):
(WebCore::preparePlatformFont):

  • platform/graphics/cocoa/FontCacheCoreText.h:
  • platform/graphics/freetype/FontCacheFreeType.cpp:
  • platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
  • platform/graphics/mac/FontCustomPlatformData.h:
  • workers/WorkerFontLoadRequest.h:
8:52 PM Changeset in webkit [283209] by Simon Fraser
  • 3 edits in trunk/Source/WebKit

Crash in WebKit::DisplayLink::displayLinkCallback()
https://bugs.webkit.org/show_bug.cgi?id=230917
<rdar://82528370>

Reviewed by Tim Horton.

We have evidence of a divide-by-zero crash in DisplayLink::notifyObserversDisplayWasRefreshed()
where m_currentUpdate.updatesPerSecond is zero. The only way I can see this happening
is if DisplayLink::DisplayLink() returns early, which should log. Protect against
this by initializing m_displayNominalFramesPerSecond to 60, and do another check,
with a log, in DisplayLink::addObserver() before we use m_displayNominalFramesPerSecond
for the first time.

Convert the logging to RELEASE_LOG_FAULT reports.

  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::DisplayLink):
(WebKit::DisplayLink::addObserver):

  • UIProcess/mac/DisplayLink.h:
8:16 PM Changeset in webkit [283208] by Takashi Komori
  • 2 edits in trunk/Source/WebCore

[Curl] Set CURL_LOCK_DATA_SSL_SESSION option to reduce SSL/TLS handshake time
https://bugs.webkit.org/show_bug.cgi?id=230818

Reviewed by Fujii Hironori.

Set CURL_LOCK_DATA_SSL_SESSION option to reuse Session ID.
It reduces SSL/TLS handshake time.

Covered by existing tests.

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlShareHandle::CurlShareHandle):
(WebCore::CurlShareHandle::mutexFor):

6:45 PM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
6:33 PM Changeset in webkit [283207] by sbarati@apple.com
  • 9 edits
    1 add in trunk

DoesGCCheck does not use enough bits for nodeIndex
https://bugs.webkit.org/show_bug.cgi?id=230915
<rdar://83297515>

Reviewed by Mark Lam.

JSTests:

  • stress/verify-can-gc-node-index.js: Added.

(gen):
(f):

Source/JavaScriptCore:

  • dfg/DFGDoesGCCheck.h:

(JSC::DFG::DoesGCCheck::DoesGCCheck):
(JSC::DFG::DoesGCCheck::encode):
(JSC::DFG::DoesGCCheck::set):
(JSC::DFG::DoesGCCheck::expectDoesGC const):
(JSC::DFG::DoesGCCheck::isSpecial const):
(JSC::DFG::DoesGCCheck::special):
(JSC::DFG::DoesGCCheck::nodeOp):
(JSC::DFG::DoesGCCheck::nodeIndex):

  • dfg/DFGOSRExit.cpp:

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

  • dfg/DFGSpeculativeJIT.cpp:

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

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLLowerDFGToB3.cpp:

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

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

6:31 PM Changeset in webkit [283206] by commit-queue@webkit.org
  • 2 edits
    5 adds in trunk/LayoutTests

[GLIB] Update test expectations and baselines. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=230927

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-09-28

  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/content-security-policy/media-src/media-src-7_1-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/content-security-policy/media-src/media-src-7_2-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/content-security-policy/media-src/media-src-7_3.sub-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/content-security-policy/media-src/media-src-redir-bug.sub-expected.txt: Added.
5:26 PM Changeset in webkit [283205] by Alan Coon
  • 5 edits in branches/safari-612-branch/Source

Cherry-pick r283156. rdar://problem/83648190

Vorbis decoder can't be instantiated - Remove workaround added in bug 228139
https://bugs.webkit.org/show_bug.cgi?id=230742
rdar://83484414

Reviewed by Eric Carlson.

Source/WebKit:

This is already covered by test; however this will fail on Monterey without the updated
CoreMedia framework.

  • Scripts/process-entitlements.sh: Add new required entitlement.
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::initializeSandbox): Only have bug workaround on BigSur and earlier.

Source/WTF:

  • wtf/PlatformUse.h: Add USE_VORBIS_AUDIOCOMPONENT_WORKAROUND

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

5:26 PM Changeset in webkit [283204] by Brent Fulgham
  • 5 edits in trunk/Source/WebKit

Remove unused "com.apple.security.exception.file*" rules from WebKit sandboxes
https://bugs.webkit.org/show_bug.cgi?id=230918
<rdar://problem/66585844>

Reviewed by Per Arne Vollan.

The Sandbox implementation provides a mechanism where apps can extend the default app
sandbox with entitled extension properties attached to their binary at signing time.
WebKit does not need or use this feature. However, the rules were imported to our custom
sandbox when we stopped using the system one. We should remove these rules since we don't
need them, and they add to the size and complexity of the sandbox rule set.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
5:25 PM Changeset in webkit [283203] by Alan Coon
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.2.10

4:16 PM Changeset in webkit [283202] by Alan Coon
  • 1 copy in branches/safari-613.1.3-branch

New branch.

3:32 PM Changeset in webkit [283201] by Alan Coon
  • 1 copy in tags/Safari-612.2.9

Tag Safari-612.2.9.

3:23 PM Changeset in webkit [283200] by Alan Coon
  • 1 copy in tags/Safari-612.2.6.1.2

Tag Safari-612.2.6.1.2.

3:19 PM Changeset in webkit [283199] by Devin Rousso
  • 9 edits
    4 moves in trunk/Source/WebCore

Move DrawGlyphsRecorder outside of DisplayList
https://bugs.webkit.org/show_bug.cgi?id=230912

Reviewed by Myles Maxfield.

There's really nothing about DrawGlyphsRecorder that's specific to display lists other
than it's currently only being used by DisplayList::Recorder.

This patch moves DrawGlyphsRecorder outside of namespace DisplayList (and the related
folder in the source tree). The next patch (<https://webkit.org/b/230913>) will generalize
it to allow any GraphicsContext instead of just DisplayList::Recorder. This is being
done to make <attachment> drawing work in the GPUProcess (<https://webkit.org/b/230781>).

  • platform/graphics/DrawGlyphsRecorder.h: Renamed from Source/WebCore/platform/graphics/displaylists/DisplayListDrawGlyphsRecorder.h.
  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp: Renamed from Source/WebCore/platform/graphics/displaylists/DisplayListDrawGlyphsRecorderCoreText.cpp.
  • platform/graphics/harfbuzz/DrawGlyphsRecorderHarfBuzz.cpp: Renamed from Source/WebCore/platform/graphics/displaylists/DisplayListDrawGlyphsRecorderHarfBuzz.cpp.
  • platform/graphics/win/DrawGlyphsRecorderWin.cpp: Renamed from Source/WebCore/platform/graphics/displaylists/DisplayListDrawGlyphsRecorderWin.cpp.
  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::displayListForTextRun const):

  • platform/graphics/displaylists/DisplayListRecorder.h:
  • Headers.cmake:
  • PlatformAppleWin.cmake:
  • PlatformWinCairo.cmake:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/FreeType.cmake:
3:06 PM Changeset in webkit [283198] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Marking more tests crashing with uncaught exception 'NSInvalidArgumentException'
rdar://83592102

Unreviewed test gardening.

3:03 PM Changeset in webkit [283197] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Negative integers in @font-palette-values are invalid
https://bugs.webkit.org/show_bug.cgi?id=230788

Reviewed by Simon Fraser.
<rdar://problem/83528806>

Addressing post-commit review.

No new tests because there is no behavior change.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::addAttributesForFontPalettes):

2:28 PM Changeset in webkit [283196] by BJ Burg
  • 14 edits
    3 adds in trunk

[Cocoa] Add SPI to select a tab created by _WKInspectorExtension
https://bugs.webkit.org/show_bug.cgi?id=230580
<rdar://problem/83372851>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Add a method to look up a WebInspectorExtensionTabContentView
by its extensionTabID and then show it with WI.tabBrowser.

  • UserInterface/Controllers/WebInspectorExtensionController.js:

(WI.WebInspectorExtensionController.prototype.reloadForExtension):
Remove extra newlines.
(WI.WebInspectorExtensionController.prototype.showExtensionTab): Added.

  • UserInterface/Protocol/InspectorFrontendAPI.js:

(InspectorFrontendAPI.showExtensionTab): Added.

Source/WebKit:

Add a new method for selecting an extension tab in WebInspectorUI
that was previously created by using
-[_WKInspectorExtension createNewTab:tabIconURL:sourceURL:completionHandler].

This is a straightforward plumbing exercise. The API test uses the new method
to test the existing _WKInspectorExtensionDelegate callback methods for
didShowTab and didHideTab.

New API test: WKInspectorExtensionDelegate.ShowAndHideTabCallbacks.

  • UIProcess/API/Cocoa/_WKInspector.mm:

(-[_WKInspector showExtensionTabWithIdentifier:completionHandler:]):

  • UIProcess/API/Cocoa/_WKInspectorExtensionHost.h:
  • UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:

(-[_WKRemoteWebInspectorViewController showExtensionTabWithIdentifier:completionHandler:]):

  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp:

(WebKit::WebInspectorUIExtensionControllerProxy::showExtensionTab):

  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h:
  • WebProcess/Inspector/WebInspectorUIExtensionController.cpp:

(WebKit::WebInspectorUIExtensionController::showExtensionTab):

  • WebProcess/Inspector/WebInspectorUIExtensionController.h:
  • WebProcess/Inspector/WebInspectorUIExtensionController.messages.in:

Tools:

Create a new test file for _WKInspectorExtensionDelegate. Add a
new test case that exercises creating an extension tab, showing an
extension tab, and uses delegate callbacks for didShowTab/didHideTab.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-TabIcon-30x30.png: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-basic-tab.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm: Added.

(resetGlobalState):
(-[UIDelegateForTestingInspectorExtensionDelegate _webView:didAttachLocalInspector:]):
(-[InspectorExtensionDelegateForTesting inspectorExtension:didShowTabWithIdentifier:]):
(-[InspectorExtensionDelegateForTesting inspectorExtension:didHideTabWithIdentifier:]):
(TEST):

2:16 PM Changeset in webkit [283195] by Brent Fulgham
  • 4 edits in trunk/Source/WebKit

Remove redundant sandbox exception rules for registering mach extensions
https://bugs.webkit.org/show_bug.cgi?id=230909
<rdar://problem/66583587>

Reviewed by Per Arne Vollan.

The Sandbox implementation offers a mechanism for apps to extend their sandbox at compile
time. WebKit does not use those extensions in its sandbox design, so we should remove those
unused rules. They are left-over from importing the global App Sandbox rules long ago, and
are not needed by WebKit.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
2:13 PM Changeset in webkit [283194] by Kate Cheney
  • 9 edits in trunk

PCM: different bundleID entries will override each other
https://bugs.webkit.org/show_bug.cgi?id=230839

Reviewed by Alex Christensen.

Source/WebKit:

We recently added a bundleID column to PCM tables. We want to make
sure entries with different bundleIDs do not override each other,
so we should make it a part of the unique constraint on both PCM
tables that contain it. This requires creating new tables and
migrating existing data to them. Luckily this code already exists
in the ITP database, and we can just move it to the shared
DatabaseUtilities class.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::expectedTableAndIndexQueries):
(WebKit::stripIndexQueryToMatchStoredValue): Deleted.
(WebKit::expectedTableAndIndexQueries): Deleted.
(WebKit::ResourceLoadStatisticsDatabaseStore::currentTableAndIndexQueries): Deleted.
(WebKit::insertDistinctValuesInTableStatement): Deleted.
(WebKit::ResourceLoadStatisticsDatabaseStore::migrateDataToNewTablesIfNecessary): Deleted.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/DatabaseUtilities.cpp:

(WebKit::DatabaseUtilities::stripIndexQueryToMatchStoredValue):
(WebKit::DatabaseUtilities::currentTableAndIndexQueries):
(WebKit::insertDistinctValuesInTableStatement):
(WebKit::DatabaseUtilities::migrateDataToNewTablesIfNecessary):

  • NetworkProcess/DatabaseUtilities.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:

(WebKit::PCM::Database::Database):
(WebKit::PCM::Database::expectedTableAndIndexQueries):
(WebKit::PCM::Database::createUniqueIndices):
(WebKit::PCM::Database::needsUpdatedSchema):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.h:

Tools:

API test coverage for the case of existing PCM data with a bundleID
column but an expired unique index.

  • TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:

(addUnattributedPCMv4):
(addAttributedPCMv4):
(dumpedPCM):
(pollUntilPCMIsMigrated):
(emptyPcmDBPath):
(createAndPopulatePCMObservedDomainTable):
(setUpFromResourceLoadStatisticsDatabase):
(setUpFromPCMDatabase):
(TEST):
(setUp): Deleted.

2:10 PM Changeset in webkit [283193] by Cameron McCormack
  • 7 edits in trunk

Preserve color space when structured cloning ImageBitmaps
https://bugs.webkit.org/show_bug.cgi?id=230429
<rdar://problem/83293533>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

The test added in https://bugs.webkit.org/show_bug.cgi?id=230429 was
buggy, in that by the time the "message" event handler ran, the
values for the various test configuration variables had changed. The
key bugfix here is checking for the right testID value in the message
event handler, but the test is rewritten more substantially to be a bit
clearer and less indented.

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned-expected.txt:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html:

Source/WebCore:

The logic for serializing the CGColorSpace is copied and adapted from
the ArgumentCoder<CGColorSpaceRef> specialization, which we cannot
easily re-use.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::dumpImageBitmap):
(WebCore::CloneSerializer::write):
(WebCore::CloneDeserializer::read):
(WebCore::CloneDeserializer::readImageBitmap):

LayoutTests:

  • fast/storage/serialized-script-value.html: Bump the current version

number.

2:00 PM Changeset in webkit [283192] by Kate Cheney
  • 18 edits
    14 adds
    1 delete in trunk

CSP: Implement 'strict-dynamic' source expression
https://bugs.webkit.org/show_bug.cgi?id=184031
<rdar://problem/38900632>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

Included passing tests and also expectations for partially passing
tests where the failures are unrelated to strict-dynamic because it
will help prevent regressions to the passing components.

  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_and_unsafe_eval_eval-expected.txt: Added.
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_and_unsafe_eval_new_function-expected.txt: Added.
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_discard_source_expressions-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_different_nonce-expected.txt: Added.
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_honor_source_expressions-expected.txt: Removed.

This doesn't go with a corresponding html file, so I deleted it.

  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_honor_source_expressions.sub-expected.txt:

We strip cross origin blocked URIs before reporting them, so this test
times out because it never receives the correct blockedURI in the
report.

  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_report_only-expected.txt: Added.
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_hashes-expected.txt: Added.
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_in_img-src-expected.txt: Added.
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_javascript_uri-expected.txt: Added.
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_meta_tag-expected.txt: Added.
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted-expected.txt: Added.
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted_incorrect_nonce-expected.txt: Added.
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted-expected.txt: Added.

Timing out because we don't specify the violation target ID in our
report. Tracking in rdar://83425187.

  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted_correct_nonce-expected.txt: Added.
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_worker-importScripts.https-expected.txt: Added.
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_worker.https-expected.txt: Added.

Test failure related to workers, not strict-dynamic.

Source/WebCore:

Partially implements 'strict-dynamic' CSP source expression. strict-dynamic
allows scripts with specified nonces and hashes to run, as well as
descendents of those scripts, or "non parser inserted" scripts.
It ignores unsafe-inline and self source expressions.

This patch creates a new algorithm ContentSecurityPolicy::allScriptPoliciesAllow
which makes sure each loaded script is allowed by some part of the
policy. If it violates each of the script policies, then we block it
and report a violation.

We only have access to whether a script is parser-inserted in ScriptElement.
To avoid having to pass that value and the script nonce through a lot of
places, we check for script violations in
ScriptElement::requestClassicScript. To avoid unnecessarily blocking
scripts with correct nonces or non-parser inserted scripts in
ContentSecurityPolicy::allowScriptFromSource which is called later on,
we skip the extra check if strictDynamic is enabled. This is not
ideal and in the future we should figure out a way to put all checks
in one place.

  • dom/ScriptElement.cpp:

Update m_parserInserted to be an enum.

(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::didFinishInsertingNode):
(WebCore::ScriptElement::childrenChanged):
(WebCore::ScriptElement::prepareScript):
(WebCore::ScriptElement::requestClassicScript):
(WebCore::ScriptElement::executeClassicScript):
strict-dynamic checks happen here.

(WebCore::ScriptElement::ignoresLoadRequest const):

  • dom/ScriptElement.h:

(WebCore::ScriptElement::isParserInserted const):
(WebCore::ScriptElement::insertedIntoAncestor const):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allScriptPoliciesAllow const):
Algorithm to check for policy violations. Here we check if the script
is non-parser inserted AND it does not have a recognized nonce or hash
AND it is not listed in the URL list of the policy. If it fails all
checks then the policy does not support it and we refuse to load it.

(WebCore::ContentSecurityPolicy::allowJavaScriptURLs const):
(WebCore::ContentSecurityPolicy::shouldPerformEarlyCSPCheck const):
(WebCore::ContentSecurityPolicy::allowNonParserInsertedScripts const):
(WebCore::ContentSecurityPolicy::allowInlineScript const):
To avoid blocking scripts that are OK with strict-dynamic, we should
skip unsafe-inline checks (which should be ignored per the spec).

(WebCore::ContentSecurityPolicy::allowScriptFromSource const):
(WebCore::ContentSecurityPolicy::reportViolation const):

  • page/csp/ContentSecurityPolicy.h:
  • page/csp/ContentSecurityPolicyDirectiveList.cpp:

(WebCore::checkNonParserInsertedScripts):
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForParserInsertedScript const):
(WebCore::ContentSecurityPolicyDirectiveList::strictDynamicIncluded):
A separate function to tell us if strict-dynamic is included in the
CSP policies.

  • page/csp/ContentSecurityPolicyDirectiveList.h:
  • page/csp/ContentSecurityPolicyDirectiveNames.cpp:
  • page/csp/ContentSecurityPolicyDirectiveNames.h:
  • page/csp/ContentSecurityPolicySourceList.cpp:

(WebCore::ContentSecurityPolicySourceList::matches const):
(WebCore::ContentSecurityPolicySourceList::parseSource):
Ignore 'self' and 'unsafe-inline' directives if 'strict-dynamic' is
specified.

  • page/csp/ContentSecurityPolicySourceList.h:

(WebCore::ContentSecurityPolicySourceList::allowNonParserInsertedScripts const):

  • page/csp/ContentSecurityPolicySourceListDirective.h:

(WebCore::ContentSecurityPolicySourceListDirective::allowNonParserInsertedScripts const):

LayoutTests:

1:34 PM Changeset in webkit [283191] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Catalina BigSur wk1 Debug ] storage/websql/multiple-databases-garbage-collection.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=230910.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
1:04 PM Changeset in webkit [283190] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Added GlobalSign R3/R5 Root CA cert to webkitcorepy to resolve certain pip module download SSL error.
https://bugs.webkit.org/show_bug.cgi?id=230904

Patch by Eddy Wong <eddy_wong@apple.com> on 2021-09-28
Reviewed by Jonathan Bedard.

  • Scripts/libraries/webkitcorepy/webkitcorepy/cacert.pem:
1:00 PM Changeset in webkit [283189] by Alan Coon
  • 8 edits in branches/safari-612.2.6.1-branch/Source

Versioning.

WebKit-7612.2.6.1.2

12:53 PM Changeset in webkit [283188] by mmaxfield@apple.com
  • 11 edits in trunk

Negative integers in @font-palette-values are invalid
https://bugs.webkit.org/show_bug.cgi?id=230788
<rdar://problem/83528806>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

This is being upstreamed at https://github.com/web-platform-tests/wpt/pull/30961.

  • web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid-expected.txt:
  • web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html:
  • web-platform-tests/css/css-fonts/parsing/font-palette-values-valid-expected.txt:
  • web-platform-tests/css/css-fonts/parsing/font-palette-values-valid.html:

Source/WebCore:

The spec made it illegal in
https://github.com/w3c/csswg-drafts/commit/09b3c45238feb6c0e8526e010cd3780f4fc4900b.

Test: web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html

  • css/CSSFontPaletteValuesRule.cpp:

(WebCore::CSSFontPaletteValuesRule::basePalette const):
(WebCore::CSSFontPaletteValuesRule::initializeMapLike):
(WebCore::CSSFontPaletteValuesRule::cssText const):

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeFontPaletteValuesRule):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeBasePaletteDescriptor):
(WebCore::consumeOverrideColorDescriptor):

  • platform/graphics/FontPaletteValues.h:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::addAttributesForFontPalettes):

12:15 PM Changeset in webkit [283187] by Brent Fulgham
  • 9 edits in trunk/Source/WebKit

Explicitly deny 'system-privilege' in the sandbox profile as a hardening measure
https://bugs.webkit.org/show_bug.cgi?id=230782
<rdar://problem/66582813>

Reviewed by Per Arne Vollan.

Although we do not need 'system-privilege', the default sandbox state includes it as a convenience
for backwards-compatibility.

Update our sandboxes to tell the kernel we don't need the support, except for one case in the
Networking process.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
12:06 PM Changeset in webkit [283186] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

[BigSur wk2 Debug iOS14 ] webrtc/video-mute.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=230865
<rdar://problem/83594770>

Reviewed by Eric Carlson.

Covered by webrtc/video-mute.html being no longer flaky.

  • Modules/mediastream/libwebrtc/LibWebRTCIceTransportBackend.cpp:

(WebCore::LibWebRTCIceTransportBackendObserver::start):

11:42 AM Changeset in webkit [283185] by Eric Hutchison
  • 3 edits in trunk/LayoutTests

[ iOS, Mac ] imported/w3c/web-platform-tests/css/css-cascade/layer-counter-style-override.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=230905.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk1/TestExpectations:
11:08 AM Changeset in webkit [283184] by sihui_liu@apple.com
  • 47 edits
    1 copy
    1 add in trunk

Make StorageManager available in Worker
https://bugs.webkit.org/show_bug.cgi?id=230675
<rdar://problem/83448115>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any.worker-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.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-sync-access-handle-lock.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-flush.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-getSize.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-read-write.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-truncate.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any.worker-expected.txt:
  • web-platform-tests/storage/estimate-indexeddb.https.any.worker-expected.txt:
  • web-platform-tests/storage/estimate-parallel.https.any.worker-expected.txt:
  • web-platform-tests/storage/estimate-usage-details-caches.https.tentative.any.worker-expected.txt:
  • web-platform-tests/storage/estimate-usage-details-indexeddb.https.tentative.any.worker-expected.txt:
  • web-platform-tests/storage/estimate-usage-details.https.tentative.any.worker-expected.txt:
  • web-platform-tests/storage/idlharness.https.any.worker-expected.txt:
  • web-platform-tests/storage/persisted.https.any.worker-expected.txt:
  • web-platform-tests/storage/storagemanager-estimate.https.any.worker-expected.txt:
  • web-platform-tests/storage/storagemanager-persist.https.worker-expected.txt:
  • web-platform-tests/storage/storagemanager-persisted.https.any.worker-expected.txt:

Source/WebCore:

Introduce WorkerStorageConnection class, which dispatches StorageManager task to main-thread StorageConnection
and dispatches result back to worker thread.

Rebaselined existing test.

  • Modules/storage/DummyStorageProvider.h:
  • Modules/storage/StorageConnection.h:

(WebCore::StorageConnection::persist):

  • Modules/storage/StorageManager.cpp:

(WebCore::connectionInfo):

  • Modules/storage/WorkerStorageConnection.cpp: Added.

(WebCore::WorkerStorageConnection::create):
(WebCore::WorkerStorageConnection::WorkerStorageConnection):
(WebCore::WorkerStorageConnection::scopeClosed):
(WebCore::WorkerStorageConnection::getPersisted):
(WebCore::WorkerStorageConnection::didGetPersisted):
(WebCore::WorkerStorageConnection::fileSystemGetDirectory):

  • Modules/storage/WorkerStorageConnection.h: Copied from Source/WebCore/Modules/storage/StorageConnection.h.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.h:
  • dom/ScriptExecutionContext.h:

(WebCore::ScriptExecutionContext::permissionController):
(WebCore::ScriptExecutionContext::storageConnection): Deleted.

  • page/NavigatorStorage.idl:
  • page/WorkerNavigator.idl:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::prepareForDestruction):
(WebCore::WorkerGlobalScope::storageConnection):

  • workers/WorkerGlobalScope.h:
  • workers/WorkerLoaderProxy.h:

(WebCore::WorkerLoaderProxy::storageConnection):

  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::storageConnection):

  • workers/WorkerMessagingProxy.h:

Source/WebKit:

  • WebProcess/WebCoreSupport/WebStorageConnection.cpp:

(WebKit::WebStorageConnection::getPersisted):

  • WebProcess/WebCoreSupport/WebStorageConnection.h:
11:06 AM Changeset in webkit [283183] by pvollan@apple.com
  • 14 edits in trunk/Source/WebKit

Enable CFPrefs direct mode in all WebKit processes
https://bugs.webkit.org/show_bug.cgi?id=230771
<rdar://problem/83510055>

Reviewed by Brent Fulgham.

We currently enable CFPrefs direct mode in the WebContent and GPU Process, and we should enable it in all WebKit processes.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::notifyPreferencesChanged):

  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb:
  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:

(WebKit::XPCServiceMain):
(WebKit::shouldEnableCFPrefsDirectMode): Deleted.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::notifyPreferencesChanged):

  • UIProcess/WebAuthentication/WebAuthnProcessProxy.cpp:

(WebKit::WebAuthnProcessProxy::singletonIfCreated):

  • UIProcess/WebAuthentication/WebAuthnProcessProxy.h:
  • WebAuthnProcess/WebAuthnProcess.cpp:

(WebKit::WebAuthnProcess::notifyPreferencesChanged):

  • WebAuthnProcess/WebAuthnProcess.h:
  • WebAuthnProcess/WebAuthnProcess.messages.in:
  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
11:06 AM Changeset in webkit [283182] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[GPUP] Add sandbox telemetry
https://bugs.webkit.org/show_bug.cgi?id=230859
<rdar://problem/83591291>

Reviewed by Brent Fulgham.

Add more sandbox telemetry to the GPU process' sandbox on iOS and macOS.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
10:55 AM Changeset in webkit [283181] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Allow access to mach service for root in the Networking process
https://bugs.webkit.org/show_bug.cgi?id=230843
<rdar://problem/83576091>

Reviewed by Alexey Proskuryakov.

Allow access to the mach service com.apple.trustd for root in the Networking process on macOS.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
10:55 AM Changeset in webkit [283180] by youenn@apple.com
  • 5 edits
    1 add in trunk

Validate DeviceIdHashSaltStorage persistent data
https://bugs.webkit.org/show_bug.cgi?id=230852
<rdar://problem/83615408>

Reviewed by Eric Carlson.

Source/WebKit:

Add nullptr check to decoded data.
Covered by API test.

  • UIProcess/DeviceIdHashSaltStorage.cpp:

(WebKit::DeviceIdHashSaltStorage::loadStorageFromDisk):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
  • TestWebKitAPI/Tests/WebKit/invalidDeviceIDHashSalts: Added.
10:22 AM ControlFlowIntegrityinWebKit created by Jon Davis
10:22 AM WPEAndroid edited by Jon Davis
(diff)
10:22 AM ContributingtoWebInspector created by Jon Davis
10:21 AM Divingintobmalloc created by Jon Davis
10:21 AM Changeset in webkit [283179] by Chris Dumez
  • 58 edits
    1 copy
    1 add in trunk

Move Cross-Origin-Opener-Policy handling to the NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=230812
<rdar://83504842>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline a couple of WPT tests due to some extra logging.

  • web-platform-tests/html/cross-origin-opener-policy/coop-coep-sandbox.https-expected.txt:
  • web-platform-tests/html/cross-origin-opener-policy/coop-sandbox.https-expected.txt:

Source/WebCore:

Previous, COOP handling was fully implemented in the WebContent process. This meant that a
WebProcess for origin A could get a network response with COOP header from origin B, decide
that cross-origin isolation is needed and ask the UIProcess to process-swap. This was not a
good design given that the WebContent process is not a trusted process. We should not trust
the WebProcess for origin A to make the swap on behavior of origin B. Also, the network
response from origin B may contain sensitive headers that we don't want origin A's WebProcess
to see.

To address these issues, I have moved COOP handling from the WebContent process to the
NetworkProcess. As soon as the NetworkProcess gets the network response, it makes the decision
whether or not cross-origin isolation is needed. If isolation is needed, the network process
asks the UIProcess directly to continue the load in a new WebProcess instead of sending the
network response to the currently associated WebProcess. When the new WebProcess resumes the
load, the network process sends it the network response it already has.

I moved most of the COOP specification implementation from DocumentLoader.cpp/h to
CrossOriginOpenerPolicy.cpp/h so that we can leverage it from the NetworkResourceLoader in
the network process. We still have to do *some* COOP handling at DocumentLoader level
currently for non-initial navigations to about:blank given that those can trigger a browsing
context group switch but currently do not involve the network process. I also had to add
more information to NetworkResourceLoadParameters so that we are able to make appropriate
COOP decisions in the NetworkProcess.

No new tests, covered by existing COOP tests that are still passing.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.h:
  • loader/CrossOriginOpenerPolicy.cpp:

(WebCore::checkIfCOOPValuesRequireBrowsingContextGroupSwitch):
(WebCore::checkIfEnforcingReportOnlyCOOPWouldRequireBrowsingContextGroupSwitch):
(WebCore::computeResponseOriginAndCOOP):
(WebCore::enforceResponseCrossOriginOpenerPolicy):
(WebCore::obtainCrossOriginOpenerPolicy):
(WebCore::sendViolationReportWhenNavigatingToCOOPResponse):
(WebCore::sendViolationReportWhenNavigatingAwayFromCOOPResponse):
(WebCore::doCrossOriginOpenerHandlingOfResponse):
(WebCore::CrossOriginOpenerPolicyEnforcementResult::from):

  • loader/CrossOriginOpenerPolicy.h:

(WebCore::CrossOriginOpenerPolicy::reportingEndpointForDisposition const):
(WebCore::CrossOriginOpenerPolicy::hasReportingEndpoint const):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::doCrossOriginOpenerHandlingOfResponse):
(WebCore::DocumentLoader::responseReceived):
(WebCore::DocumentLoader::maybeLoadEmpty):
(WebCore::DocumentLoader::clearMainResource):

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::crossOriginOpenerPolicy const):
(WebCore::DocumentLoader::isContinuingLoadAfterProvisionalLoadStarted const):
(WebCore::DocumentLoader::setIsContinuingLoadAfterProvisionalLoadStarted):
Move most of the COOP logic from DocumentLoader.cpp to CrossOriginOpenerPolicy.cpp, so that
it can be reused by NetworkResourceLoader in the network process.

  • loader/EmptyClients.cpp:

(WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForResponse):

  • loader/EmptyFrameLoaderClient.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::checkContentPolicy):
(WebCore::FrameLoader::load):

  • loader/FrameLoader.h:
  • loader/FrameLoaderClient.h:
  • loader/NavigationAction.cpp:

(WebCore::NavigationAction::NavigationAction):

  • loader/NavigationAction.h:

(WebCore::NavigationAction::requester const):
(WebCore::NavigationAction::isEmpty const):

  • loader/NavigationRequester.cpp: Added.
  • loader/NavigationRequester.h: Added.

Extracted NavigationAction::Requester to its own header and rename it to NavigationRequester,
so that its implementation can be shared between NavigationAction, NetworkResourceLoadParameters
and COOP.

  • loader/ReportingEndpointsCache.cpp:

(WebCore::ReportingEndpointsCache::addEndPointsFromResponse):
(WebCore::ReportingEndpointsCache::addEndPointsFromReportToHeader):

  • loader/ReportingEndpointsCache.h:
  • loader/ShouldTreatAsContinuingLoad.h:
  • page/Page.h:

Source/WebKit:

Implement COOP handling in the NetworkProcess, inside the NetworkResourceLoader class.
This was logic that was currently implemented at DocumentLoader-level, in the WebProcess.

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

(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):

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

(WebKit::NetworkResourceLoader::doCrossOriginOpenerHandlingOfResponse):
(WebKit::toBrowsingContextGroupSwitchDecision):
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::sendDidReceiveResponsePotentiallyInNewBrowsingContextGroup):
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:

(WebKit::ServiceWorkerFetchTask::didReceiveResponse):

  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):
(headers_for_type):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::triggerBrowsingContextGroupSwitchForNavigation):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::decidePolicyForResponse):

  • UIProcess/ProvisionalPageProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
(WebKit::WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::sendViolationReportWhenNavigatingToCOOPResponse):
(WebKit::WebPage::sendViolationReportWhenNavigatingAwayFromCOOPResponse):

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

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::dispatchDecidePolicyForResponse):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::dispatchDecidePolicyForResponse):

  • WebCoreSupport/WebFrameLoaderClient.h:

Tools:

Port COOP API tests from PSONSchemeHandler to HTTPServer. This was necessary since custom scheme handler
loads do not go via the networkProcess (Where COOP handling is now implemented).

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

(-[PSONNavigationDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):
(-[PSONScheme webView:startURLSchemeTask:]):

  • TestWebKitAPI/cocoa/HTTPServer.h:
10:21 AM September 2021 Meeting edited by Jon Davis
Removed Standards Discussion (diff)
10:20 AM WPEAndroid created by Jon Davis
10:19 AM SVGinWebKitStatusofCompositing created by Jon Davis
10:19 AM RenderingUIandPrivacychallengesinWebXRBrowsers created by Jon Davis
10:18 AM WebGL2ANGLEandthedirecttoMetalCompilerinWebKit created by Jon Davis
10:17 AM DialogInert created by Jon Davis
10:17 AM TVontheWeb created by Jon Davis
10:14 AM September 2021 Meeting edited by Jon Davis
Updated schedule (diff)
9:59 AM Changeset in webkit [283178] by fpizlo@apple.com
  • 9 edits
    1 add
    1 delete in trunk/Source/bmalloc

[libpas] Fix coalescing of the large sharing pool and make it easy to introspect it (update to e4d20851ee9ff00f2962b349a9ff8465695a83d7)
https://bugs.webkit.org/show_bug.cgi?id=230867

Reviewed by Yusuke Suzuki.

This adds the ability to enable the libpas status reporter, adds a large sharing pool dump to
the status report, and fixes a large sharing pool coalescing bug found by doing that. Previously
we weren't coalescing things that are not free+committed.

Also updates the export script that I use to keep the libpas git repo in sync with what's in WK.

The large sharing pool is the mechanism by which libpas can find memory that can be decommitted
across isolated large heaps, even if those large heaps share pages with one another. The main
data structure is a red-black tree of nodes that represent memory ranges. If there are two
adjacent ranges of memory that are both fully live and committed or both decommitted, then we
want those to be represented using a single node. That wasn't quite working right. Even the
libpas test for this was testing the wrong thing. This fixes the behavior and the test. It's
perf-neutral since large heaps usually have a small number of objects in them anyway.

The new status reporting functionality can be enabled with the WebKitPasStatusReporter
environment variable. This takes an integer that tells the amount of data in the report. Here
are the recognized values:

1 - just report number of heaps
2 - something in between 1 and 3
3 - report everything that the status reporter can report right now (per-page data for

segregated/bitfit heaps, lots of details for large heaps)

If the status reporter ever reported per-object information, it would be at level 4 or higher.
It's safe to pass 9999 or whatever if you just want the maximum report that libpas supports.
TL;DR for now you usually want WebKitPasStatusReporter=3.

  • bmalloc/Environment.cpp:

(bmalloc::Environment::Environment):

  • libpas/export.rb: Added.
  • libpas/export.sh: Removed.
  • libpas/src/libpas/pas_bitfit_directory.c:

(pas_bitfit_directory_construct): I needed to rationalize how we initialize disabled directories to make status reporting work.
(pas_bitfit_directory_get_first_free_view):

  • libpas/src/libpas/pas_large_sharing_pool.c:

(states_match):

  • libpas/src/libpas/pas_status_reporter.c:

(pas_status_reporter_dump_bitfit_directory):
(dump_large_sharing_pool_node_callback):
(pas_status_reporter_dump_large_sharing_pool):
(pas_status_reporter_dump_everything):

  • libpas/src/libpas/pas_status_reporter.h:
  • libpas/src/test/LargeSharingPoolDump.cpp:
  • libpas/src/test/LargeSharingPoolDump.h:
  • libpas/src/test/LargeSharingPoolTests.cpp:

(std::Range::Range):
(std::Range::operator== const):
(std::Range::operator!= const):
(std::operator<<):
(std::assertState):
(std::testGoodCoalesceEpochUpdate):
(addLargeSharingPoolTests):
(std::testBadCoalesceEpochUpdate): Deleted.

9:55 AM Changeset in webkit [283177] by Matt Lewis
  • 5 edits in trunk/Tools

Move iOS, watchOS, and tvOS queues to latest releases
https://bugs.webkit.org/show_bug.cgi?id=230837

Reviewed by Jonathan Bedard.

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

(TestExpectedBuildSteps):

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

(WebKitBuildbot):

  • CISupport/build-webkit-org/public_html/dashboard/Styles/Main.css:

(table.queue-grid tr.platform.ios-simulator-14 img.logo): Deleted.
(table.queue-grid tr.platform.ios-14 img.logo): Deleted.
(table.queue-grid tr.platform.tvos-simulator-14 img.logo): Deleted.
(table.queue-grid tr.platform.tvos-14 img.logo): Deleted.
(table.queue-grid tr.platform.watchos-simulator-7 img.logo): Deleted.
(table.queue-grid tr.platform.watchos-7 img.logo): Deleted.

9:32 AM Changeset in webkit [283176] by aboya@igalia.com
  • 2 edits in trunk/Source/WebCore

[MSE][GStreamer] Don't create MediaSourceTrackGStreamer objects twice for the same track
https://bugs.webkit.org/show_bug.cgi?id=230829

Reviewed by Xabier Rodriguez-Calvar.

The existing code in
SourceBufferPrivateGStreamer::didReceiveInitializationSegment()
was not checking if the track already existing, creating and
immediately destroying a MediaSourceTrackGStreamer, which then crashed
on an assertion (ASSERTION FAILED: m_isRemoved).

This fixes the following two tests which were crashing with the former
assertion when running in Debug:

  • media/media-source/media-mp4-h264-partial-abort.html
  • media/media-source/media-source-abort-resets-parser.html
  • platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:

(WebCore::SourceBufferPrivateGStreamer::didReceiveInitializationSegment):

9:24 AM Changeset in webkit [283175] by commit-queue@webkit.org
  • 3 edits in trunk

[GTK][WPE] Bump libsoup3 version to 3.0.0
https://bugs.webkit.org/show_bug.cgi?id=230601

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-09-28
Reviewed by Philippe Normand.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:
9:22 AM Changeset in webkit [283174] by commit-queue@webkit.org
  • 20 edits
    2 adds in trunk

Mostly fix Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=230868

Patch by Alex Christensen <achristensen@webkit.org> on 2021-09-28
Reviewed by Don Olmstead.

Source/JavaScriptCore:

  • shell/PlatformMac.cmake:

Source/ThirdParty/ANGLE:

  • Compiler.cmake:
  • Metal.cmake:

Source/ThirdParty/libwebrtc:

  • CMakeLists.txt:

Source/WebCore:

  • PlatformMac.cmake:
  • platform/graphics/cg/ImageBufferUtilitiesCG.cpp:

(WebCore::encode):

Source/WebCore/PAL:

  • pal/PlatformMac.cmake:

Source/WebKit:

  • PlatformMac.cmake:

Source/WebKitLegacy:

  • PlatformMac.cmake:

Source/WTF:

  • wtf/PlatformMac.cmake:

Tools:

  • DumpRenderTree/PlatformMac.cmake:
  • DumpRenderTree/TestNetscapePlugIn/PlatformMac.cmake: Added.
  • TestRunnerShared/PlatformMac.cmake: Added.
9:20 AM Changeset in webkit [283173] by youenn@apple.com
  • 4 edits
    2 adds in trunk

applyConstraints throws OverconstrainedError if specify exact for deviceId
https://bugs.webkit.org/show_bug.cgi?id=230819
<rdar://problem/83577361>

Reviewed by Eric Carlson.

Source/WebKit:

We were not setting properly the persistent device ID of remote sources.
Set values according provided device.

Test: fast/mediastream/applyConstraints-deviceId.html

  • WebProcess/cocoa/RemoteRealtimeAudioSource.cpp:

(WebKit::RemoteRealtimeAudioSource::RemoteRealtimeAudioSource):

  • WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:

(WebKit::RemoteRealtimeVideoSource::RemoteRealtimeVideoSource):

LayoutTests:

  • fast/mediastream/applyConstraints-deviceId-expected.txt: Added.
  • fast/mediastream/applyConstraints-deviceId.html: Added.
9:17 AM Changeset in webkit [283172] by youenn@apple.com
  • 2 edits in trunk/Tools

REGRESSION (r283102): [ MacOS Debug ] TestWebKitAPI.WebKit2.CaptureIndicatorDelay is failing
https://bugs.webkit.org/show_bug.cgi?id=230847
<rdar://problem/83577251>

Reviewed by Saam Barati.

As identified by Saam, the promise resolution callback is racing with the stop function.
To prevent this, we check in a loop whether the page has a stream and call stop when that is the case.

  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/getUserMedia.html:
9:09 AM Changeset in webkit [283171] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Fix build with non-internal Monterey SDK
https://bugs.webkit.org/show_bug.cgi?id=230872

Patch by Alex Christensen <achristensen@webkit.org> on 2021-09-28
Reviewed by Jonathan Bedard.

Source/WebCore:

  • platform/mac/PlatformSpeechSynthesizerMac.mm:

(WebCore::speechSynthesisGetDefaultVoiceIdentifierForLocale):

Source/WebCore/PAL:

  • pal/spi/cocoa/PassKitSPI.h:
  • pal/spi/mac/SystemPreviewSPI.h:
8:40 AM Changeset in webkit [283170] by Antti Koivisto
  • 14 edits
    4 adds in trunk

[CSS Cascade Layers] Add CSSOM interface
https://bugs.webkit.org/show_bug.cgi?id=230882

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/parsing/layer-expected.txt: Added.

Source/WebCore:

Add a minimal CSSLayerRule interface. This is yet unspecified (https://github.com/w3c/csswg-drafts/issues/6576)
but the final version likely won't differ much or at all. This also matches Firefox.

This makes parsing and serialization WPT tests work.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSLayerRule.cpp: Added.

(WebCore::CSSLayerRule::CSSLayerRule):
(WebCore::CSSLayerRule::create):
(WebCore::CSSLayerRule::cssText const):

The only available functionality is getting the cssText.

  • css/CSSLayerRule.h: Added.
  • css/CSSLayerRule.idl: Added.
  • css/CSSRule.h:
  • css/StyleRule.cpp:

(WebCore::StyleRuleBase::createCSSOMWrapper const):

Make the wrapper.

  • css/StyleRuleType.h:

Update the type constant to match Firefox (this is not specified).

  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::wrapperInsertRule):

Remember the return after succesful insert.

LayoutTests:

8:36 AM Changeset in webkit [283169] by Philippe Normand
  • 7 edits in trunk/Tools/buildstream

[Flatpak SDK] Update libsoup3 and friends
https://bugs.webkit.org/show_bug.cgi?id=230891

Reviewed by Michael Catanzaro.

  • elements/sdk/glib.bst: Bump to 2.70, the most recent stable version.
  • elements/sdk/libsoup3.bst: Bump to 3.0.0.
  • elements/sdk/rr.bst: Drive-by update to latest master.
  • elements/sdk/wpebackend-fdo.bst: Update to 1.10.0.
8:32 AM Changeset in webkit [283168] by sbarati@apple.com
  • 15 edits in trunk/Source/JavaScriptCore

Make byte codes with arithmetic profiles switch to using an index instead of a pointer in metadata
https://bugs.webkit.org/show_bug.cgi?id=230798

Reviewed by Yusuke Suzuki.

This patch makes each bytecode that uses a BinaryArithProfile/UnaryArithProfile
have an index into a table instead of storing a pointer to the profile in its metadata.
Then, we can just load the profile using the index in the bytecode, which saves memory.

  • bytecode/BytecodeList.rb:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::binaryArithProfileForPC):
(JSC::CodeBlock::unaryArithProfileForPC):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::allocateSharedProfiles):

  • bytecode/UnlinkedCodeBlock.h:
  • bytecode/UnlinkedCodeBlockGenerator.cpp:

(JSC::UnlinkedCodeBlockGenerator::finalize):

  • bytecode/UnlinkedCodeBlockGenerator.h:

(JSC::UnlinkedCodeBlockGenerator::addBinaryArithProfile):
(JSC::UnlinkedCodeBlockGenerator::addUnaryArithProfile):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitUnaryOp):
(JSC::BytecodeGenerator::emitInc):
(JSC::BytecodeGenerator::emitDec):

  • bytecompiler/BytecodeGenerator.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_op_negate):
(JSC::JIT::emit_op_add):
(JSC::JIT::emit_op_div):
(JSC::JIT::emit_op_mul):
(JSC::JIT::emit_op_sub):

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

(JSC::updateArithProfileForUnaryArithOp):
(JSC::JSC_DEFINE_COMMON_SLOW_PATH):

6:37 AM Changeset in webkit [283167] by Alexey Shvayka
  • 3 edits
    3 adds in trunk

Speed up setting JSFunction's "prototype" property
https://bugs.webkit.org/show_bug.cgi?id=230864

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/class-creation.js: Added.
  • microbenchmarks/function-prototype-put-non-reified.js: Added.
  • microbenchmarks/function-prototype-put-reified.js: Added.

Source/JavaScriptCore:

This patch:

  1. Removes "prototype" lookup from put(), which was non-inlineable and created an interim object with "constructor" field. Instead, the new value is put directly, with correct attributes, and respecting an altered receiver. This results in 2.8X perf boost for very common case of setting "prototype": Cat.prototype = new Animal.
  1. Simplifies initialization of class constructor's prototype object, removing tentacles from getOwnPropertySlot() and extracting constructPrototypeObject() helper. Provides a fast path for op_define_data_property, speeding up class creation by ~40%, while reifies normal function's prototype with correct attributes for Object.defineProperty().
  • runtime/JSFunction.cpp:

(JSC::constructPrototypeObject):
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::put):
(JSC::JSFunction::defineOwnProperty):

6:21 AM Changeset in webkit [283166] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

Unreviewed, reverting r283136.

An assertion failure for WinCairo Debug

Reverted changeset:

"[Curl] Set CURL_LOCK_DATA_SSL_SESSION option to reduce
SSL/TLS handshake time"
https://bugs.webkit.org/show_bug.cgi?id=230818
https://commits.webkit.org/r283136

5:55 AM Changeset in webkit [283165] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

REGRESSION(r283158): TestWebKitAPI.WebKit.AddAndRemoveDataDetectors is crashing on iOS
https://bugs.webkit.org/show_bug.cgi?id=230890

Unreviewed.

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::detectContentInRange):

Scope TextIterator so it is not in stack when DOM is being mutated.

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

Fix rounding issue in run-jsc-stress-tests
https://bugs.webkit.org/show_bug.cgi?id=230889

Patch by Geza Lore <gezalore@gmail.com> on 2021-09-28
Reviewed by Adrian Perez de Castro.

  • Scripts/run-jsc-stress-tests:
3:29 AM Changeset in webkit [283163] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WTF

Unreviewed, fix Windows build
https://bugs.webkit.org/show_bug.cgi?id=230876

  • wtf/GenericTimeMixin.h:

(WTF::GenericTimeMixin::operator+=):
(WTF::GenericTimeMixin::operator-=):

3:15 AM Changeset in webkit [283162] by Antti Koivisto
  • 7 edits
    3 copies
    31 adds
    10 deletes in trunk/LayoutTests

[CSS Cascade Layers] Import more WPT tests
https://bugs.webkit.org/show_bug.cgi?id=230883

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Import new tests.

  • resources/import-expectations.json:
  • web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt: Added.
  • web-platform-tests/css/css-cascade/layer-counter-style-override.html: Added.
  • web-platform-tests/css/css-cascade/layer-font-face-override-expected.txt: Added.
  • web-platform-tests/css/css-cascade/layer-font-face-override.html: Added.
  • web-platform-tests/css/css-cascade/layer-keyframes-override-expected.txt: Added.
  • web-platform-tests/css/css-cascade/layer-keyframes-override.html: Added.
  • web-platform-tests/css/css-cascade/layer-property-override-expected.txt: Added.
  • web-platform-tests/css/css-cascade/layer-property-override.html: Added.
  • web-platform-tests/css/css-cascade/layer-scroll-timeline-override-expected.txt: Added.
  • web-platform-tests/css/css-cascade/layer-scroll-timeline-override.html: Added.
  • web-platform-tests/css/css-cascade/layer-stylesheet-sharing-expected.html: Added.
  • web-platform-tests/css/css-cascade/layer-stylesheet-sharing.html: Added.
  • web-platform-tests/css/css-cascade/layer-vs-inline-style-expected.txt: Added.
  • web-platform-tests/css/css-cascade/layer-vs-inline-style.html: Added.
  • web-platform-tests/css/css-cascade/parsing/layer.html: Added.
  • web-platform-tests/css/css-cascade/parsing/w3c-import.log:
  • web-platform-tests/css/css-cascade/presentational-hints-cascade-expected.txt: Added.
  • web-platform-tests/css/css-cascade/presentational-hints-cascade.html: Added.
  • web-platform-tests/css/css-cascade/w3c-import.log:
  • web-platform-tests/css/support/parsing-testcommon.js:
  • web-platform-tests/fonts/OWNERS: Removed.
  • web-platform-tests/fonts/math/fraction-denominatordisplaystyleshiftdown6000-rulethickness1000.woff: Removed.
  • web-platform-tests/fonts/math/fraction-denominatorshiftdown3000-rulethickness1000.woff: Removed.
  • web-platform-tests/fonts/math/fraction-numeratordisplaystyleshiftup2000-rulethickness1000.woff: Removed.
  • web-platform-tests/fonts/math/fraction-numeratorshiftup11000-rulethickness1000.woff: Removed.
  • web-platform-tests/fonts/math/stack-axisheight7000.woff: Removed.
  • web-platform-tests/fonts/math/stack-bottomdisplaystyleshiftdown5000.woff: Removed.
  • web-platform-tests/fonts/math/stack-bottomshiftdown6000.woff: Removed.
  • web-platform-tests/fonts/math/stack-topdisplaystyleshiftup3000.woff: Removed.
  • web-platform-tests/fonts/math/stack-topshiftup9000.woff: Removed.
  • web-platform-tests/fonts/noto/NotoNaskhArabic-regular.woff2: Added.
  • web-platform-tests/fonts/noto/NotoSansAdlam-hinted/LICENSE_OFL.txt: Added.
  • web-platform-tests/fonts/noto/NotoSansAdlam-hinted/NotoSansAdlam-Regular.ttf: Added.
  • web-platform-tests/fonts/noto/NotoSansAdlam-hinted/README: Added.
  • web-platform-tests/fonts/noto/NotoSansAdlam-hinted/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/parsing/w3c-import.log.
  • web-platform-tests/fonts/noto/NotoSansCypriot-hinted/LICENSE_OFL.txt: Added.
  • web-platform-tests/fonts/noto/NotoSansCypriot-hinted/NotoSansCypriot-Regular.ttf: Added.
  • web-platform-tests/fonts/noto/NotoSansCypriot-hinted/README: Added.
  • web-platform-tests/fonts/noto/NotoSansCypriot-hinted/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/parsing/w3c-import.log.
  • web-platform-tests/fonts/noto/NotoSansDeseret-Regular.ttf: Added.
  • web-platform-tests/fonts/noto/NotoSansMongolian-regular.woff2: Added.
  • web-platform-tests/fonts/noto/NotoSansNko-regular-webfont.woff2: Added.
  • web-platform-tests/fonts/noto/noto-sans-v8-latin-regular.woff: Added.
  • web-platform-tests/fonts/noto/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/parsing/w3c-import.log.

LayoutTests:

2:49 AM Changeset in webkit [283161] by ysuzuki@apple.com
  • 17 edits
    1 copy
    5 adds in trunk

[WTF] Add ApproximateTime
https://bugs.webkit.org/show_bug.cgi?id=230876

Reviewed by Filip Pizlo.

JSTests:

  • microbenchmarks/approximate-time-now.js: Added.
  • microbenchmarks/monotonic-time-now.js: Added.
  • microbenchmarks/wall-time-now.js: Added.

Source/JavaScriptCore:

This patch adds ApproximateTime, which offers monotonically increasing time but with coarse-grained resolution.
ApproximateTime::now() is faster than normal MonotonicTime::now(), so that we can use this when we do not care
about high resolution. For example, in Darwin x64, it is ~4x faster.
Internally, it is using mach_approximate_time() in Darwin, clock_gettime+CLOCK_MONOTONIC_COARSE in Linux, and
clock_gettime+CLOCK_MONOTONIC_FAST in FreeBSD. On the other platforms, we simply use the same source to MonotonicTime.

wall-time-now 102.2614+-0.2449
approximate-time-now 23.2583+-0.4083
monotonic-time-now 88.8518+-2.4106

We would like to use it in some places in JavaScriptCore in a subsequent patch: CodeBlock's creation time, GC time etc.

  • tools/JSDollarVM.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSDollarVM::finishCreation):

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
  • wtf/ApproximateTime.cpp: Copied from Source/WTF/wtf/ClockType.cpp.

(WTF::ApproximateTime::approximateWallTime const):
(WTF::ApproximateTime::approximateMonotonicTime const):
(WTF::ApproximateTime::dump const):

  • wtf/ApproximateTime.h: Copied from Source/WTF/wtf/MonotonicTime.h.

(WTF::ApproximateTime::MarkableTraits::isEmptyValue):
(WTF::ApproximateTime::MarkableTraits::emptyValue):
(std::isnan):
(std::isinf):
(std::isfinite):

  • wtf/CMakeLists.txt:
  • wtf/ClockType.cpp:

(WTF::printInternal):

  • wtf/ClockType.h:
  • wtf/CurrentTime.cpp:

(WTF::MonotonicTime::fromMachAbsoluteTime):
(WTF::MonotonicTime::toMachAbsoluteTime const):
(WTF::ApproximateTime::fromMachApproximateTime):
(WTF::ApproximateTime::toMachApproximateTime const):
(WTF::ApproximateTime::now):

  • wtf/MonotonicTime.h:
  • wtf/Seconds.cpp:

(WTF::Seconds::operator+ const):
(WTF::Seconds::operator- const):

  • wtf/Seconds.h:
  • wtf/TimeWithDynamicClockType.cpp:

(WTF::TimeWithDynamicClockType::now):
(WTF::TimeWithDynamicClockType::approximateTime const):
(WTF::TimeWithDynamicClockType::approximateWallTime const):
(WTF::TimeWithDynamicClockType::approximateMonotonicTime const):

  • wtf/TimeWithDynamicClockType.h:
  • wtf/WallTime.h:

Tools:

  • TestWebKitAPI/Tests/WTF/Time.cpp:

(WTF::operator<<):
(TestWebKitAPI::TEST):

2:39 AM Changeset in webkit [283160] by Alexey Shvayka
  • 2 edits in trunk/Source/JavaScriptCore

Tweak isCallable() to early return true for InternalFunction instances
https://bugs.webkit.org/show_bug.cgi?id=230869

Reviewed by Yusuke Suzuki.

With this change, isCallable() avoids calling into InternalFunction::getCallData(),
which is concurrency-aware and guaranteed to never return CallData::Type::None.
We have a similar optimization for JSFunction.

  • runtime/JSCellInlines.h:

(JSC::JSCell::isCallableWithConcurrency):

Sep 27, 2021:

11:45 PM Changeset in webkit [283159] by mmaxfield@apple.com
  • 22 edits
    2 moves in trunk

override-color has been renamed to override-colors
https://bugs.webkit.org/show_bug.cgi?id=230789
<rdar://problem/83529354>

Reviewed by Devin Rousso.

LayoutTests/imported/w3c:

This is being upstreamed in https://github.com/web-platform-tests/wpt/pull/30962.

  • web-platform-tests/css/css-fonts/font-palette-modify-2-expected.html:
  • web-platform-tests/css/css-fonts/font-palette-modify-2.html:
  • web-platform-tests/css/css-fonts/font-palette-modify-expected-mismatch.html:
  • web-platform-tests/css/css-fonts/font-palette-modify.html:
  • web-platform-tests/css/css-fonts/font-palette.html:
  • web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html:
  • web-platform-tests/css/css-fonts/parsing/font-palette-values-valid.html:

Source/WebCore:

The spec was changed in
https://github.com/w3c/csswg-drafts/commit/9de250d6692d07ddb8af3e3face37b909e5aad7b.
No browser has shipped the old name, so this is just a mechanical find/replace.

Updated existing tests.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSFontPaletteValuesOverrideColorsValue.cpp: Renamed from Source/WebCore/css/CSSFontPaletteValuesOverrideColorValue.cpp.

(WebCore::CSSFontPaletteValuesOverrideColorsValue::customCSSText const):
(WebCore::CSSFontPaletteValuesOverrideColorsValue::equals const):

  • css/CSSFontPaletteValuesOverrideColorsValue.h: Renamed from Source/WebCore/css/CSSFontPaletteValuesOverrideColorValue.h.
  • css/CSSFontPaletteValuesRule.cpp:

(WebCore::CSSFontPaletteValuesRule::initializeMapLike):
(WebCore::CSSFontPaletteValuesRule::cssText const):

  • css/CSSProperties.json:
  • css/CSSValue.cpp:

(WebCore::CSSValue::equals const):
(WebCore::CSSValue::cssText const):
(WebCore::CSSValue::destroy):

  • css/CSSValue.h:

(WebCore::CSSValue::isFontPaletteValuesOverrideColorsValue const):
(WebCore::CSSValue::isFontPaletteValuesOverrideColorValue const): Deleted.

  • css/StyleRule.cpp:

(WebCore::StyleRuleFontPaletteValues::StyleRuleFontPaletteValues):

  • css/StyleRule.h:
  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeFontPaletteValuesRule):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeOverrideColorsDescriptor):
(WebCore::CSSPropertyParser::parseFontPaletteValuesDescriptor):
(WebCore::consumeOverrideColorDescriptor): Deleted.

  • platform/graphics/FontPaletteValues.h:

(WebCore::FontPaletteValues::FontPaletteValues):
(WebCore::FontPaletteValues::overrideColors const):
(WebCore::FontPaletteValues::operator== const):
(WebCore::add):
(WebCore::FontPaletteValues::overrideColor const): Deleted.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::addAttributesForFontPalettes):

10:24 PM Changeset in webkit [283158] by Antti Koivisto
  • 31 edits in trunk/Source

[LFC] Use CheckedRef/Ptr instead of WeakPtr
https://bugs.webkit.org/show_bug.cgi?id=230821

Reviewed by Alan Bujtas.

Source/WebCore:

WeakPtrs are used for layout boxes for safety only. Replace with simpler, faster CheckedPtr.

  • display/DisplayTreeBuilder.cpp:

(WebCore::Display::TreeBuilder::build):

  • editing/TextManipulationController.cpp:

(WebCore::TextManipulationController::replace):

This was leaving a text iterator in stack while mutating the render tree.

  • layout/FormattingState.h:

(WebCore::Layout::FormattingState::addOutOfFlowBox):

  • layout/LayoutState.cpp:

(WebCore::Layout::LayoutState::LayoutState):
(WebCore::Layout::LayoutState::formattingStateForFormattingContext const):
(WebCore::Layout::LayoutState::formattingStateForInlineFormattingContext const):
(WebCore::Layout::LayoutState::ensureInlineFormattingState):

  • layout/LayoutState.h:

(WebCore::Layout::LayoutState::root const):
(WebCore::Layout::LayoutState::hasRoot const): Deleted.

  • layout/floats/FloatAvoider.h:
  • layout/floats/FloatingState.cpp:

(WebCore::Layout::FloatingState::FloatItem::FloatItem):
(WebCore::Layout::FloatingState::FloatingState):

  • layout/floats/FloatingState.h:

(WebCore::Layout::FloatingState::root const):

  • layout/formattingContexts/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::FormattingContext):
(WebCore::Layout::FormattingContext::layoutOutOfFlowContent):

  • layout/formattingContexts/FormattingContext.h:

(WebCore::Layout::FormattingContext::root const):

  • layout/formattingContexts/block/BlockFormattingState.h:
  • layout/formattingContexts/inline/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeStaticPositionForOutOfFlowContent):

  • layout/formattingContexts/inline/InlineLevelBox.h:

(WebCore::Layout::InlineLevelBox::layoutBox const):
(WebCore::Layout::InlineLevelBox::InlineLevelBox):

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

(WebCore::InlineDisplay::Box::layoutBox const):
(WebCore::InlineDisplay::Box::Box):

  • layout/formattingContexts/table/TableGrid.cpp:

(WebCore::Layout::TableGrid::Column::Column):
(WebCore::Layout::TableGrid::Row::Row):
(WebCore::Layout::TableGrid::Cell::Cell):

  • layout/formattingContexts/table/TableGrid.h:

(WebCore::Layout::TableGrid::Row::box const):

  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::BoxTree::buildTree):
(WebCore::LayoutIntegration::BoxTree::appendChild):
(WebCore::LayoutIntegration::BoxTree::layoutBoxForRenderer):
(WebCore::LayoutIntegration::BoxTree::rendererForLayoutBox):

  • layout/integration/LayoutIntegrationBoxTree.h:
  • layout/integration/LayoutIntegrationInlineContent.cpp:

(WebCore::LayoutIntegration::InlineContent::InlineContent):
(WebCore::LayoutIntegration::InlineContent::rendererForLayoutBox const):
(WebCore::LayoutIntegration::InlineContent::containingBlock const):
(WebCore::LayoutIntegration::InlineContent::lineLayout const): Deleted.

  • layout/integration/LayoutIntegrationInlineContent.h:

(WebCore::LayoutIntegration::InlineContent::lineLayout const):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::constructContent):

  • layout/integration/LayoutIntegrationLineLayout.h:
  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::setCachedGeometryForLayoutState const):

  • layout/layouttree/LayoutBox.h:
  • layout/layouttree/LayoutReplacedBox.h:
  • layout/layouttree/LayoutTreeBuilder.h:

Source/WTF:

  • wtf/CheckedRef.h:

(WTF::CanMakeCheckedPtrBase::incrementPtrCount const):
(WTF::CanMakeCheckedPtrBase::decrementPtrCount const):
(WTF::CanMakeCheckedPtrBase::incrementPtrCount): Deleted.
(WTF::CanMakeCheckedPtrBase::decrementPtrCount): Deleted.

Make const so CheckedPtr<const Foo> works.

10:17 PM Changeset in webkit [283157] by Cameron McCormack
  • 2 edits in trunk/Source/WebKit

Avoid building log messages when IPCMessages log stream is off
https://bugs.webkit.org/show_bug.cgi?id=230878
<rdar://problem/83605670>

Reviewed by Alex Christensen.

  • Platform/IPC/HandleMessage.h:

(IPC::logMessageImpl):

5:49 PM Changeset in webkit [283156] by Jean-Yves Avenard
  • 5 edits in trunk/Source

Vorbis decoder can't be instantiated - Remove workaround added in bug 228139
https://bugs.webkit.org/show_bug.cgi?id=230742
rdar://83484414

Reviewed by Eric Carlson.

Source/WebKit:

This is already covered by test; however this will fail on Monterey without the updated
CoreMedia framework.

  • Scripts/process-entitlements.sh: Add new required entitlement.
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::initializeSandbox): Only have bug workaround on BigSur and earlier.

Source/WTF:

  • wtf/PlatformUse.h: Add USE_VORBIS_AUDIOCOMPONENT_WORKAROUND
5:16 PM Changeset in webkit [283155] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Catalina BigSur wk2 ] imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.html is a flaky failure and crash.
https://bugs.webkit.org/show_bug.cgi?id=230866.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:53 PM ApplePlansForWebKit2022Edition edited by Jon Davis
(diff)
4:44 PM Changeset in webkit [283154] by mmaxfield@apple.com
  • 2 edits in trunk/LayoutTests/imported/w3c

Add test to make sure CSSFontPaletteValuesRule's attributes are readonly
https://bugs.webkit.org/show_bug.cgi?id=230791
<rdar://problem/83530165>

Reviewed by Simon Fraser.

The spec enforces this in w3c/csswg-drafts@9ddf938. This is already the case in WebKit.

This is being upstreamed in https://github.com/web-platform-tests/wpt/pull/30964.

  • web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html:
4:44 PM OffscreenCanvas2021Update edited by Jon Davis
(diff)
4:42 PM GitHubandNewProcesses edited by Jon Davis
(diff)
4:41 PM ProtectedCollaborationTree edited by Jon Davis
(diff)
4:40 PM ProtectedCollaborationTree edited by Jon Davis
(diff)
4:39 PM ProtectedCollaborationTree edited by Jon Davis
(diff)
4:37 PM GPUProcess2021 created by Jon Davis
4:37 PM IntroductiontoLFC created by Jon Davis
4:36 PM WPTUpdate created by Jon Davis
4:34 PM September 2021 Meeting edited by Jon Davis
Schedule changes. (diff)
4:33 PM Changeset in webkit [283153] by Dewei Zhu
  • 4 edits in trunk/Websites/perf.webkit.org

Summary page should support calculating summary using weighted mean.
https://bugs.webkit.org/show_bug.cgi?id=230810

Reviewed by Ryosuke Niwa.

Add a way to specify weight for a platform or (plafform, metric) which will be used while calculating a summary.

  • public/shared/statistics.js: Added 'weightedMean' function.

(Statistics.new.this.weightedMean):

  • public/v3/pages/summary-page.js: Added support for specifying a weight for platform or (platform, metric).

(SummaryPage):
(SummaryPage.prototype._createConfigurationGroup):
(SummaryPageConfigurationGroup):

  • unit-tests/statistics-tests.js: Added unit tests.
4:25 PM September 2021 Meeting edited by Jon Davis
(diff)
4:05 PM Changeset in webkit [283152] by Alan Coon
  • 1 copy in tags/Safari-612.2.8

Tag Safari-612.2.8.

4:05 PM Changeset in webkit [283151] by Alan Coon
  • 1 delete in tags/Safari-612.2.8

Delete tag.

3:51 PM Changeset in webkit [283150] by Eric Hutchison
  • 3 edits in trunk/LayoutTests

[BigSur wk2 Debug iOS14 ] webrtc/video-mute.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=230865.

Unreviewed test gardening.

  • platform/ios-14-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
3:50 PM Changeset in webkit [283149] by Alan Coon
  • 1 copy in tags/Safari-612.2.8

Tag Safari-612.2.8.

3:49 PM Changeset in webkit [283148] by Alan Coon
  • 30 edits
    2 adds in branches/safari-612-branch

Cherry-pick r283098. rdar://problem/83584491

[JSC] Optimize PutByVal with for-in
https://bugs.webkit.org/show_bug.cgi?id=230801

Reviewed by Saam Barati.

JSTests:

  • stress/for-in-sentinel.js: Added. (shouldBe): (test):

Source/JavaScriptCore:

We found that some of Speedometer2 subtests are heavily using for-in with PutByVal or the other DFG nodes.
And we also found that we are using polluted non-good type for the property names from for-in: String | Other.
The reason is that we are returning null when op_enumerator_next finishes instead of string. And this design
forces DFG and FTL to return null from EnumeratorNextUpdatePropertyName at the end of iteration. This pollutes
the type of property names as String | Other instead of String, and leading to suboptimal DFG nodes.

In this patch, we add special sentinel string in vm.smallString.sentinelString(). We know that this string cell
pointer will be never returned from EnumeratorNextUpdatePropertyName in the normal for-in iteration. This is easy
since we are always allocating a JSString when creating JSPropertyNameEnumerator. So this string cell (not the content)
is always different from pre-allocated vm.smallString.sentinelString(). So, we use this special string pointer
as a sentinel instead of null so that we can avoid polluting return type of EnumeratorNextUpdatePropertyName.

To check the sentinel in LLInt / Baseline, this patch adds jeq_ptr, which performs cell pointer comparison and do
not check string content equality. We do not need to have an implementation in DFG since we already have CompareEqPtr
for existing jneq_ptr bytecode.

We also clean up DFG operation related to PutByVal.

----------------------------------------------------------------------------------------------------------------------------------
| subtest | ms | ms | b / a | pValue (significance using False Discovery Rate) |
----------------------------------------------------------------------------------------------------------------------------------
| Elm-TodoMVC |116.010000 |112.701667 |0.971482 | 0.000000 (significant) |
| VueJS-TodoMVC |22.995000 |23.023333 |1.001232 | 0.907086 |
| EmberJS-TodoMVC |125.498333 |125.525000 |1.000212 | 0.932546 |
| BackboneJS-TodoMVC |45.700000 |45.975000 |1.006018 | 0.084799 |
| Preact-TodoMVC |16.681667 |16.610000 |0.995704 | 0.722758 |
| AngularJS-TodoMVC |123.753333 |123.740000 |0.999892 | 0.971431 |
| Vanilla-ES2015-TodoMVC |61.255000 |61.380000 |1.002041 | 0.300654 |
| Inferno-TodoMVC |58.646667 |58.948333 |1.005144 | 0.267611 |
| Flight-TodoMVC |73.283333 |72.801667 |0.993427 | 0.207389 |
| Angular2-TypeScript-TodoMVC |39.746667 |40.015000 |1.006751 | 0.449821 |
| VanillaJS-TodoMVC |50.096667 |49.823333 |0.994544 | 0.162020 |
| jQuery-TodoMVC |212.870000 |213.196667 |1.001535 | 0.371944 |
| EmberJS-Debug-TodoMVC |331.878333 |332.710000 |1.002506 | 0.094499 |
| React-TodoMVC |83.078333 |82.726667 |0.995767 | 0.076143 |
| React-Redux-TodoMVC |136.018333 |133.935000 |0.984683 | 0.000000 (significant) |
| Vanilla-ES2015-Babel-Webpack-TodoMVC |59.743333 |59.643333 |0.998326 | 0.393671 |
----------------------------------------------------------------------------------------------------------------------------------
a mean = 271.75873
b mean = 272.45804
pValue = 0.0263030803
(Bigger means are better.)
1.003 times better
Results ARE significant

  • builtins/BuiltinNames.h:
  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeUseDef.cpp: (JSC::computeUsesForBytecodeIndexImpl): (JSC::computeDefsForBytecodeIndexImpl):
  • bytecode/LinkTimeConstant.h:
  • bytecode/Opcode.h: (JSC::isBranch):
  • bytecode/PreciseJumpTargetsInlines.h:
  • bytecompiler/BytecodeGenerator.cpp: (JSC::GenericLabel<JSGeneratorTraits>::setLocation): (JSC::BytecodeGenerator::emitJumpIfSentinelString):
  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp: (JSC::ForInNode::emitBytecode):
  • dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseBlock):
  • dfg/DFGCapabilities.cpp: (JSC::DFG::capabilityLevel):
  • dfg/DFGOperations.cpp: (JSC::DFG::putByVal): (JSC::DFG::putByValInternal): (JSC::DFG::putByValCellInternal): (JSC::DFG::JSC_DEFINE_JIT_OPERATION):
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileEnumeratorNextUpdatePropertyName):
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass):
  • jit/JIT.h:
  • jit/JITOpcodes.cpp: (JSC::JIT::emit_op_jeq_ptr):
  • jit/JITOpcodes32_64.cpp: (JSC::JIT::emit_op_jeq_ptr):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_enumerator_next):
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp: (JSC::JSC_DEFINE_COMMON_SLOW_PATH):
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::init):
  • runtime/SmallStrings.cpp: (JSC::SmallStrings::initializeCommonStrings): (JSC::SmallStrings::visitStrongReferences):
  • runtime/SmallStrings.h: (JSC::SmallStrings::sentinelString const):

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

3:49 PM Changeset in webkit [283147] by Alan Coon
  • 4 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r283081. rdar://problem/83584464

Pending preconnect key should include User-Agent
https://bugs.webkit.org/show_bug.cgi?id=230565

Reviewed by Chris Dumez.

When using an HTTPS proxy, the HTTP connection cache key used for connection coalescing in
CFNetwork includes the User-Agent (<rdar://problem/59434166>). This means we should also
include it in the preconnect cache key. Otherwise, we might delay the main resource load on
preconnect unnecessarily in cases where the User-Agent mismatches and the preconnect gets
thrown away. This can happen if (for instance) a page is force-loaded into desktop or mobile
mode on iOS, which causes a UA change after the call to decidePolicyForNavigationAction.

  • NetworkProcess/NetworkLoadScheduler.cpp: (WebKit::mainResourceLoadKey): (WebKit::NetworkLoadScheduler::scheduleMainResourceLoad): (WebKit::NetworkLoadScheduler::unscheduleMainResourceLoad): (WebKit::NetworkLoadScheduler::startedPreconnectForMainResource): (WebKit::NetworkLoadScheduler::finishedPreconnectForMainResource):
  • NetworkProcess/NetworkLoadScheduler.h:
  • NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::preconnectTo):

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

3:49 PM Changeset in webkit [283146] by Alan Coon
  • 17 edits
    6 adds in branches/safari-612-branch

Cherry-pick r283035. rdar://problem/83584492

<video> element rendered incorrectly when provided with a portrait orientation stream in Safari 15
https://bugs.webkit.org/show_bug.cgi?id=229792
<rdar://problem/82776741>

Reviewed by Eric Carlson.

Source/WebCore:

We need to swap the bounds for both m_rootLayer and m_sampleBufferDisplayLayer if the sample is rotated by 90.
We also need to ompute m_sampleBufferDisplayLayer position based on m_rootLayer coordinates.
This means we swap root layer bounds width and height before computing m_sampleBufferDisplayLayer position based on it.

Test: fast/mediastream/video-rotation.html

  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm: (WebCore::LocalSampleBufferDisplayLayer::setRootLayerBoundsAndPositions): (WebCore::LocalSampleBufferDisplayLayer::updateRootLayerBoundsAndPosition):
  • platform/graphics/cg/ImageBufferUtilitiesCG.h:

Source/WebKit:

Helper routined used in WTR.

  • Shared/API/c/cg/WKImageCG.cpp: (WKImageCreateDataURLFromImage):
  • Shared/API/c/cg/WKImageCG.h:

Tools:

Add testRunner API to take a view port snapshot as a PNG data URL.
We can then use this data URL to validate some rendered pixel values.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage):
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::takeViewPortSnapshot): (WTR::TestRunner::viewPortSnapshotTaken):
  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp: (WTR::TestController::takeViewPortSnapshot):
  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::takeViewPortSnapshot):

LayoutTests:

  • fast/mediastream/video-rotation-expected.txt: Added.
  • fast/mediastream/video-rotation.html: Added.
  • platform/ios-simulator/fast/mediastream/video-rotation-expected.png: Added.
  • platform/mac/fast/mediastream/video-rotation-expected.png: Added.

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

3:49 PM Changeset in webkit [283145] by Alan Coon
  • 4 edits in branches/safari-612-branch

Cherry-pick r282924. rdar://problem/83584505

Make SharedBuffer inherit from ThreadSafeRefCounted
https://bugs.webkit.org/show_bug.cgi?id=230662
rdar://83419269

Source/WebCore:

The SourceBufferPrivateAVFObjC uses dispatch_async that takes an objective-C class.
This copies its argument rather than move it and we end up with the SharedBuffer
captured in the lambda to have its ref count be > 1.
The easiest workaround is to make SharedBuffer use thread-safe refcount.
Of course, this doesn't make a SharedBuffer a thread-safe class, but it allows
to safely move it between threads.

Already covered by existing tests.

Reviewed by Chris Dumez.

  • platform/SharedBuffer.h:

LayoutTests:

Revert bug 230644.

Reviewed by Chris Dumez.

  • platform/mac-wk1/TestExpectations:

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

3:49 PM Changeset in webkit [283144] by Alan Coon
  • 2 edits in branches/safari-612-branch/LayoutTests

Cherry-pick r282895. rdar://problem/83584505

REGRESSION (r282865?): ASSERTION FAILED: Unsafe to ref/deref from different threads m_isOwnedByMainThread == isMainThread().
https://bugs.webkit.org/show_bug.cgi?id=230644

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:

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

3:49 PM Changeset in webkit [283143] by Alan Coon
  • 4 edits in branches/safari-612-branch

Revert r280963. rdar://problem/83587220

3:30 PM Changeset in webkit [283142] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ macOS wk1 ] webanimations/relative-ordering-of-translate-and-rotate-properties-accelerated.html is a flaky image failure.
https://bugs.webkit.org/show_bug.cgi?id=230863

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
3:27 PM Changeset in webkit [283141] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Catalina BigSur arm64 ] imported/w3c/web-platform-tests/resource-timing/sizes-redirect-img.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=230862.

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:19 PM Changeset in webkit [283140] by mmaxfield@apple.com
  • 6 edits in trunk

Add support for CSSFontPaletteValuesRule.name
https://bugs.webkit.org/show_bug.cgi?id=230787
<rdar://problem/83528540>

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

This is being upstreamed in https://github.com/web-platform-tests/wpt/pull/30960.

  • web-platform-tests/css/css-fonts/parsing/font-palette-values-valid.html:

Source/WebCore:

This was added to the CSS spec in
https://github.com/w3c/csswg-drafts/commit/8868476c571d63b7f3f2718e22601a711a2d8683.

Test: web-platform-tests/css/css-fonts/parsing/font-palette-values-valid.html

  • css/CSSFontPaletteValuesRule.cpp:

(WebCore::CSSFontPaletteValuesRule::name const):

  • css/CSSFontPaletteValuesRule.h:
  • css/CSSFontPaletteValuesRule.idl:
2:53 PM Changeset in webkit [283139] by sbarati@apple.com
  • 100 edits
    1 copy
    1 add in trunk

Build an unlinked baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=229223
<rdar://problem/82321772>

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

This patch adds an "unlinked" baseline JIT to JSVALUE64 platforms. The JIT
code produced by this baseline JIT can be shared between all CodeBlocks that
share an UnlinkedCodeBlock. The benefit of this is, if we're creating a CodeBlock
from an UnlinkedCodeBlock that already compiled an unlinked baseline JIT
instance, this new CodeBlock just starts off executing in the baseline JIT
"for free".

To make this work, the code we emit now needs to be independent of a specific
CodeBlock instance. We use a CodeBlock instance for minimal profiling information
when compiling, but otherwise, the code is tied to the UnlinkedCodeBlock. When
we need CodeBlock specific information, we load it. This usually means things
like we'll load things from the Metadata dynamically. This patch also adds a
"linked constant pool" concept, and anytime we instantiate such a CodeBlock,
we also need to instantiate this "linked constant pool". This contains things
like our inline cache data structures (StructureStubInfo*), JSGlobalObject*,
etc.

Unlinked baseline JIT always runs ICs in the "data" mode. To make this work, I
made data ICs work on x86_64. To do this, we no longer call/ret to the IC.
Instead, we jump to the IC, and the IC jumps back by loading the "done" location
from the StructureStubInfo dynamically. This simplifies the design to not be
based on the arm64 calling convention, and keeps the same performance characteristics.

This patch also adds a new version of InlineAccess that is only used in baseline
JIT (for now). In the future, we can make the DFG/FTL also use this for Data
ICs. But we don't need to do that yet since those tiers don't use data ICs by
default. The baseline JIT now has a pure data IC approach to InlineAccess. So
instead of repatching code, we repatch fields we load dynamically.

This patch also cleans up a few things in OSR exit, where both DFG/FTL were
storing callee saves to the callee saves buffer in a weird place, and separate
from one another. I noticed this code can be simplified if we just store
callee saves at the end of the OSR exit handler, and from common JIT emission
code.

This patch also fixes a bug where we could end up with the wrong (and always
more negative) SP in the baseline JIT. This could happen when we OSR exit
from an inlined getter/setter. The OSR exit code puts the return PC when
returning to the call site of the getter/setter to be the inline cache's
"done location". However, this "done location" didn't used to restore SP.
This patch conservatively makes it so that we restore the SP at these sites.

This is measured as a 1% speedup on Speedometer2.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/AccessCase.cpp:

(JSC::AccessCase::fromStructureStubInfo):
(JSC::AccessCase::generateImpl):

  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeOperandsForCheckpoint.h:

(JSC::valueProfileOffsetFor):

  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::fastPathStart):
(JSC::CallLinkInfo::emitFastPathImpl):
(JSC::CallLinkInfo::emitFastPath):
(JSC::CallLinkInfo::emitTailCallFastPath):
(JSC::CallLinkInfo::emitDataICFastPath):
(JSC::CallLinkInfo::emitTailCallDataICFastPath):
(JSC::CallLinkInfo::emitDataICSlowPath):
(JSC::CallLinkInfo::initializeDataIC):
(JSC::CallLinkInfo::emitDirectFastPath):
(JSC::CallLinkInfo::emitDirectTailCallFastPath):

  • bytecode/CallLinkInfo.h:

(JSC::CallLinkInfo::offsetOfMaxArgumentCountIncludingThis):
(JSC::CallLinkInfo::slowStub): Deleted.
(JSC::CallLinkInfo::addressOfMaxArgumentCountIncludingThis): Deleted.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::setupWithUnlinkedBaselineCode):
(JSC::CodeBlock::isConstantOwnedByUnlinkedCodeBlock const):
(JSC::CodeBlock::setConstantRegisters):
(JSC::CodeBlock::finalizeJITInlineCaches):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::frameRegisterCount):
(JSC::CodeBlock::binaryArithProfileForPC):
(JSC::CodeBlock::unaryArithProfileForPC):
(JSC::CodeBlock::findPC):
(JSC::CodeBlock::jitSoon):
(JSC::CodeBlock::jitNextInvocation):
(JSC::CodeBlock::dumpMathICStats):
(JSC::CodeBlock::finalizeBaselineJITInlineCaches): Deleted.
(JSC::CodeBlock::addJITAddIC): Deleted.
(JSC::CodeBlock::addJITMulIC): Deleted.
(JSC::CodeBlock::addJITSubIC): Deleted.
(JSC::CodeBlock::addJITNegIC): Deleted.
(JSC::CodeBlock::setPCToCodeOriginMap): Deleted.
(JSC::CodeBlock::thresholdForJIT): Deleted.
(JSC::CodeBlock::jitAfterWarmUp): Deleted.

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::JITData::offsetOfJITConstantPool):
(JSC::CodeBlock::offsetOfJITData):
(JSC::CodeBlock::offsetOfArgumentValueProfiles):
(JSC::CodeBlock::offsetOfConstantsVectorBuffer):
(JSC::CodeBlock::baselineJITConstantPool):
(JSC::CodeBlock::checkIfJITThresholdReached):
(JSC::CodeBlock::dontJITAnytimeSoon):
(JSC::CodeBlock::llintExecuteCounter const):
(JSC::CodeBlock::offsetOfDebuggerRequests):
(JSC::CodeBlock::offsetOfShouldAlwaysBeInlined):
(JSC::CodeBlock::loopHintsAreEligibleForFuzzingEarlyReturn):
(JSC::CodeBlock::addressOfNumParameters): Deleted.
(JSC::CodeBlock::isKnownCell): Deleted.
(JSC::CodeBlock::addMathIC): Deleted.
(JSC::CodeBlock::setJITCodeMap): Deleted.
(JSC::CodeBlock::jitCodeMap): Deleted.
(JSC::CodeBlock::switchJumpTable): Deleted.
(JSC::CodeBlock::stringSwitchJumpTable): Deleted.

  • bytecode/CodeBlockInlines.h:

(JSC::CodeBlock::forEachValueProfile):
(JSC::CodeBlock::jitCodeMap):
(JSC::CodeBlock::baselineSwitchJumpTable):
(JSC::CodeBlock::baselineStringSwitchJumpTable):
(JSC::CodeBlock::dfgSwitchJumpTable):
(JSC::CodeBlock::dfgStringSwitchJumpTable):

  • bytecode/ExecutableToCodeBlockEdge.h:
  • bytecode/ExecutionCounter.cpp:

(JSC::ExecutionCounter<countingVariant>::setThreshold):

  • bytecode/ExecutionCounter.h:

(JSC::ExecutionCounter::clippedThreshold):

  • bytecode/GetByIdMetadata.h:

(JSC::GetByIdModeMetadataArrayLength::offsetOfArrayProfile):
(JSC::GetByIdModeMetadata::offsetOfMode):

  • bytecode/GetByStatus.cpp:

(JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/GetterSetterAccessCase.cpp:

(JSC::GetterSetterAccessCase::emitDOMJITGetter):

  • bytecode/InByStatus.cpp:

(JSC::InByStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/InlineAccess.cpp:

(JSC::InlineAccess::generateSelfPropertyAccess):
(JSC::InlineAccess::canGenerateSelfPropertyReplace):
(JSC::InlineAccess::generateSelfPropertyReplace):
(JSC::InlineAccess::isCacheableArrayLength):
(JSC::InlineAccess::generateArrayLength):
(JSC::InlineAccess::isCacheableStringLength):
(JSC::InlineAccess::generateStringLength):
(JSC::InlineAccess::generateSelfInAccess):
(JSC::InlineAccess::rewireStubAsJumpInAccess):
(JSC::InlineAccess::resetStubAsJumpInAccess):

  • bytecode/InlineAccess.h:
  • bytecode/IterationModeMetadata.h:

(JSC::IterationModeMetadata::offsetOfSeenModes):

  • bytecode/LLIntCallLinkInfo.h:

(JSC::LLIntCallLinkInfo::offsetOfArrayProfile):

  • bytecode/Opcode.h:
  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessGenerationState::succeed):
(JSC::AccessGenerationState::calculateLiveRegistersForCallAndExceptionHandling):
(JSC::AccessGenerationState::preserveLiveRegistersToStackForCallWithoutExceptions):
(JSC::PolymorphicAccess::regenerate):

  • bytecode/PolymorphicAccess.h:

(JSC::AccessGenerationState::preserveLiveRegistersToStackForCallWithoutExceptions): Deleted.

  • bytecode/PutByStatus.cpp:

(JSC::PutByStatus::computeForStubInfo):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::initGetByIdSelf):
(JSC::StructureStubInfo::initPutByIdReplace):
(JSC::StructureStubInfo::initInByIdSelf):
(JSC::StructureStubInfo::addAccessCase):
(JSC::StructureStubInfo::reset):
(JSC::StructureStubInfo::visitWeakReferences):
(JSC::StructureStubInfo::propagateTransitions):
(JSC::StructureStubInfo::initializeFromUnlinkedStructureStubInfo):

  • bytecode/StructureStubInfo.h:

(JSC::StructureStubInfo::offsetOfByIdSelfOffset):
(JSC::StructureStubInfo::offsetOfInlineAccessBaseStructure):
(JSC::StructureStubInfo::inlineAccessBaseStructure):
(JSC::StructureStubInfo::offsetOfDoneLocation):

  • bytecode/SuperSampler.cpp:

(JSC::printSuperSamplerState):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::UnlinkedCodeBlock::hasIdentifier):
(JSC::UnlinkedCodeBlock::thresholdForJIT):
(JSC::UnlinkedCodeBlock::allocateSharedProfiles):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::constantRegister):
(JSC::UnlinkedCodeBlock::instructionAt const):
(JSC::UnlinkedCodeBlock::bytecodeOffset):
(JSC::UnlinkedCodeBlock::instructionsSize const):
(JSC::UnlinkedCodeBlock::loopHintsAreEligibleForFuzzingEarlyReturn):
(JSC::UnlinkedCodeBlock::outOfLineJumpOffset):
(JSC::UnlinkedCodeBlock::binaryArithProfile):
(JSC::UnlinkedCodeBlock::unaryArithProfile):
(JSC::UnlinkedCodeBlock::llintExecuteCounter):

  • bytecode/UnlinkedMetadataTable.h:

(JSC::UnlinkedMetadataTable::offsetInMetadataTable):

  • bytecode/ValueProfile.h:

(JSC::ValueProfileBase::ValueProfileBase):
(JSC::ValueProfileBase::clearBuckets):
(JSC::ValueProfile::offsetOfFirstBucket):

  • dfg/DFGCommonData.h:
  • dfg/DFGJITCode.cpp:
  • dfg/DFGJITCode.h:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):

  • dfg/DFGOSRExit.cpp:

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

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::handleExitCounts):
(JSC::DFG::callerReturnPC):
(JSC::DFG::reifyInlinedCallFrames):
(JSC::DFG::adjustAndJumpToTarget):

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compilePutPrivateName):
(JSC::DFG::SpeculativeJIT::compileValueAdd):
(JSC::DFG::SpeculativeJIT::compileValueSub):
(JSC::DFG::SpeculativeJIT::compileValueNegate):
(JSC::DFG::SpeculativeJIT::compileValueMul):
(JSC::DFG::SpeculativeJIT::compileLogShadowChickenTail):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLJITCode.h:
  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::addMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compileUnaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compileBinaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compilePutPrivateName):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • generator/Metadata.rb:
  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::storeProperty):
(JSC::AssemblyHelpers::emitVirtualCall):
(JSC::AssemblyHelpers::emitVirtualCallWithoutMovingGlobalObject):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::copyCalleeSavesToEntryFrameCalleeSavesBuffer):

  • jit/BaselineJITCode.cpp: Added.

(JSC::MathICHolder::addJITAddIC):
(JSC::MathICHolder::addJITMulIC):
(JSC::MathICHolder::addJITSubIC):
(JSC::MathICHolder::addJITNegIC):
(JSC::MathICHolder::adoptMathICs):
(JSC::BaselineJITCode::BaselineJITCode):
(JSC::BaselineJITCode::~BaselineJITCode):

  • jit/BaselineJITCode.h: Added.

(JSC::JITConstantPool::add):
(JSC::JITConstantPool::size const):
(JSC::JITConstantPool::at const):

  • jit/BaselineJITPlan.cpp:

(JSC::BaselineJITPlan::finalize):

  • jit/CCallHelpers.cpp:

(JSC::CCallHelpers::logShadowChickenTailPacketImpl):
(JSC::CCallHelpers::logShadowChickenTailPacket):

  • jit/CCallHelpers.h:
  • jit/CallFrameShuffleData.cpp:

(JSC::CallFrameShuffleData::setupCalleeSaveRegisters):

  • jit/CallFrameShuffleData.h:
  • jit/CallFrameShuffler.cpp:

(JSC::CallFrameShuffler::CallFrameShuffler):
(JSC::CallFrameShuffler::prepareForTailCall):

  • jit/CallFrameShuffler.h:

(JSC::CallFrameShuffler::snapshot const):

  • jit/JIT.cpp:

(JSC::JIT::JIT):
(JSC::JIT::emitEnterOptimizationCheck):
(JSC::JIT::emitNotifyWriteWatchpoint):
(JSC::JIT::emitVarReadOnlyCheck):
(JSC::JIT::assertStackPointerOffset):
(JSC::JIT::resetSP):
(JSC::JIT::emitPutCodeBlockToFrameInPrologue):
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::emitMaterializeMetadataAndConstantPoolRegisters):
(JSC::JIT::emitRestoreCalleeSaves):
(JSC::JIT::compileAndLinkWithoutFinalizing):
(JSC::JIT::link):
(JSC::JIT::finalizeOnMainThread):
(JSC::JIT::privateCompile):
(JSC::JIT::frameRegisterCountFor):
(JSC::JIT::stackPointerOffsetFor):

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

(JSC::JIT::emit_compareAndJumpSlowImpl):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emit_op_negate):
(JSC::JIT::emit_op_add):
(JSC::JIT::emitMathICFast):
(JSC::JIT::emitMathICSlow):
(JSC::JIT::emit_op_div):
(JSC::JIT::emit_op_mul):
(JSC::JIT::emit_op_sub):

  • jit/JITCall.cpp:

(JSC::JIT::emitPutCallResult):
(JSC::JIT::compileSetupFrame):
(JSC::JIT::compileCallEval):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileTailCall):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
(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/JITCall32_64.cpp:

(JSC::JIT::emitPutCallResult):
(JSC::JIT::compileSetupFrame):
(JSC::JIT::compileCallEval):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
(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/JITCode.h:

(JSC::JITCode::useDataIC):
(JSC::JITCode::pcToCodeOriginMap):

  • jit/JITCompilationKey.cpp:

(JSC::JITCompilationKey::dump const):

  • jit/JITCompilationKey.h:

(JSC::JITCompilationKey::JITCompilationKey):
(JSC::JITCompilationKey::operator! const):
(JSC::JITCompilationKey::isHashTableDeletedValue const):
(JSC::JITCompilationKey::operator== const):
(JSC::JITCompilationKey::hash const):
(JSC::JITCompilationKey::profiledBlock const): Deleted.

  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITInlineCacheGenerator::JITInlineCacheGenerator):
(JSC::JITInlineCacheGenerator::finalize):
(JSC::JITInlineCacheGenerator::generateBaselineDataICFastPath):
(JSC::JITGetByIdGenerator::JITGetByIdGenerator):
(JSC::generateGetByIdInlineAccess):
(JSC::JITGetByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITGetByIdWithThisGenerator::generateBaselineDataICFastPath):
(JSC::JITPutByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITDelByValGenerator::generateFastPath):
(JSC::JITDelByIdGenerator::generateFastPath):
(JSC::JITInByValGenerator::generateFastPath):
(JSC::JITInByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITInstanceOfGenerator::generateFastPath):
(JSC::JITGetByValGenerator::generateFastPath):
(JSC::JITPutByValGenerator::generateFastPath):
(JSC::JITPrivateBrandAccessGenerator::generateFastPath):

  • jit/JITInlineCacheGenerator.h:
  • jit/JITInlines.h:

(JSC::JIT::isOperandConstantDouble):
(JSC::JIT::isOperandConstantInt):
(JSC::JIT::isKnownCell):
(JSC::JIT::getConstantOperand):
(JSC::JIT::appendCallWithExceptionCheckSetJSValueResultWithProfile):
(JSC::JIT::linkSlowCaseIfNotJSCell):
(JSC::JIT::advanceToNextCheckpoint):
(JSC::JIT::emitJumpSlowToHotForCheckpoint):
(JSC::JIT::isOperandConstantChar):
(JSC::JIT::emitValueProfilingSite):
(JSC::JIT::emitValueProfilingSiteIfProfiledOpcode):
(JSC::JIT::emitArrayProfilingSiteWithCell):
(JSC::JIT::emitLoadDouble):
(JSC::JIT::emitJumpSlowCaseIfNotJSCell):
(JSC::JIT::emitGetVirtualRegister):
(JSC::JIT::jumpTarget):
(JSC::JIT::loadPtrFromMetadata):
(JSC::JIT::load32FromMetadata):
(JSC::JIT::load8FromMetadata):
(JSC::JIT::store8ToMetadata):
(JSC::JIT::store32ToMetadata):
(JSC::JIT::materializePointerIntoMetadata):
(JSC::JIT::loadConstant):
(JSC::JIT::loadGlobalObject):
(JSC::JIT::loadCodeBlockConstant):
(JSC::JIT::copiedGetPutInfo): Deleted.
(JSC::JIT::copiedArithProfile): Deleted.

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_mov):
(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_typeof_is_undefined):
(JSC::JIT::op_ret_handlerGenerator):
(JSC::JIT::emit_op_to_primitive):
(JSC::JIT::emit_op_set_function_name):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::valueIsFalseyGenerator):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jeq_ptr):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::valueIsTruthyGenerator):
(JSC::JIT::emit_op_throw):
(JSC::JIT::op_throw_handlerGenerator):
(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_object):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emit_op_debug):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_enter):
(JSC::JIT::op_enter_handlerGenerator):
(JSC::JIT::emit_op_to_this):
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emitSlow_op_jeq):
(JSC::JIT::emitSlow_op_jneq):
(JSC::JIT::emitSlow_op_instanceof_custom):
(JSC::JIT::emit_op_loop_hint):
(JSC::JIT::emitSlow_op_check_traps):
(JSC::JIT::op_check_traps_handlerGenerator):
(JSC::JIT::emit_op_new_regexp):
(JSC::JIT::emitNewFuncCommon):
(JSC::JIT::emitNewFuncExprCommon):
(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_tail):
(JSC::JIT::emit_op_profile_control_flow):
(JSC::JIT::emit_op_get_argument):
(JSC::JIT::emit_op_get_prototype_of):

  • jit/JITOpcodes32_64.cpp:

(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::emitSlow_op_instanceof_custom):
(JSC::JIT::emit_op_typeof_is_undefined):
(JSC::JIT::emit_op_set_function_name):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::compileOpEqJumpSlow):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emitSlow_op_jstricteq):
(JSC::JIT::emitSlow_op_jnstricteq):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_throw):
(JSC::JIT::emit_op_to_number):
(JSC::JIT::emit_op_to_numeric):
(JSC::JIT::emit_op_to_object):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emit_op_enter):
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emit_op_to_this):
(JSC::JIT::emit_op_profile_type):
(JSC::JIT::emit_op_log_shadow_chicken_tail):

  • jit/JITOperations.cpp:

(JSC::JSC_DEFINE_JIT_OPERATION):

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

(JSC::JITPlan::key):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::generateGetByValSlowCase):
(JSC::JIT::slow_op_get_by_val_prepareCallGenerator):
(JSC::JIT::emit_op_get_private_name):
(JSC::JIT::emitSlow_op_get_private_name):
(JSC::JIT::slow_op_get_private_name_prepareCallGenerator):
(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_prepareCallGenerator):
(JSC::JIT::emit_op_put_private_name):
(JSC::JIT::emitSlow_op_put_private_name):
(JSC::JIT::slow_op_put_private_name_prepareCallGenerator):
(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::slow_op_del_by_id_prepareCallGenerator):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emitSlow_op_del_by_val):
(JSC::JIT::slow_op_del_by_val_prepareCallGenerator):
(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::slow_op_get_by_id_prepareCallGenerator):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::slow_op_get_by_id_with_this_prepareCallGenerator):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::slow_op_put_by_id_prepareCallGenerator):
(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::emitHasPrivate):
(JSC::JIT::emitHasPrivateSlow):
(JSC::JIT::emitSlow_op_has_private_name):
(JSC::JIT::emitSlow_op_has_private_brand):
(JSC::JIT::emitVarInjectionCheck):
(JSC::JIT::emitResolveClosure):
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::generateOpResolveScopeThunk):
(JSC::JIT::slow_op_resolve_scopeGenerator):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::generateOpGetFromScopeThunk):
(JSC::JIT::slow_op_get_from_scopeGenerator):
(JSC::JIT::emit_op_put_to_scope):
(JSC::JIT::emitSlow_op_put_to_scope):
(JSC::JIT::slow_op_put_to_scopeGenerator):
(JSC::JIT::emit_op_get_from_arguments):
(JSC::JIT::emit_op_get_internal_field):
(JSC::JIT::emit_op_enumerator_next):
(JSC::JIT::emit_op_enumerator_get_by_val):
(JSC::JIT::emit_enumerator_has_propertyImpl):
(JSC::JIT::emitWriteBarrier):
(JSC::JIT::emitPutGlobalVariable): Deleted.
(JSC::JIT::emitPutGlobalVariableIndirect): Deleted.
(JSC::JIT::emitPutClosureVar): Deleted.

  • jit/JITPropertyAccess32_64.cpp:

(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::emit_op_del_by_val):
(JSC::JIT::emitSlow_op_del_by_val):
(JSC::JIT::emitSlow_op_del_by_id):
(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_put_private_name):
(JSC::JIT::emitSlow_op_put_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::emitSlow_op_put_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::emitHasPrivate):
(JSC::JIT::emitHasPrivateSlow):
(JSC::JIT::emitVarInjectionCheck):
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emitSlow_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_get_internal_field):

  • jit/Repatch.cpp:

(JSC::tryCacheGetBy):
(JSC::tryCachePutBy):
(JSC::tryCacheInBy):
(JSC::unlinkCall):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CacheableIdentifier.h:
  • runtime/CacheableIdentifierInlines.h:

(JSC::CacheableIdentifier::createFromIdentifierOwnedByCodeBlock):

  • runtime/CachedTypes.cpp:

(JSC::CachedCodeBlock::numBinaryArithProfiles const):
(JSC::CachedCodeBlock::numUnaryArithProfiles const):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::CachedCodeBlock<CodeBlockType>::encode):

  • runtime/CommonSlowPaths.cpp:

(JSC::updateArithProfileForUnaryArithOp):

  • runtime/FunctionExecutable.h:
  • runtime/Options.cpp:

(JSC::Options::recomputeDependentOptions):

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

(JSC::ScriptExecutable::prepareForExecutionImpl):

  • wasm/WasmLLIntTierUpCounter.h:

(JSC::Wasm::LLIntTierUpCounter::optimizeAfterWarmUp):
(JSC::Wasm::LLIntTierUpCounter::optimizeSoon):

  • wasm/WasmTierUpCount.cpp:

(JSC::Wasm::TierUpCount::TierUpCount):

  • wasm/WasmTierUpCount.h:

(JSC::Wasm::TierUpCount::optimizeAfterWarmUp):
(JSC::Wasm::TierUpCount::optimizeNextInvocation):
(JSC::Wasm::TierUpCount::optimizeSoon):

Source/WTF:

  • wtf/Bag.h:
  • wtf/Packed.h:

(WTF::PackedAlignedPtr::operator* const):

Tools:

  • Scripts/run-jsc-stress-tests:
2:50 PM Changeset in webkit [283138] by Truitt Savell
  • 2 edits in trunk/LayoutTests

6 editing spelling tests crashing with uncaught exception 'NSInvalidArgumentException'
rdar://83592102

Unreviewed test gardening.

2:33 PM Changeset in webkit [283137] by Truitt Savell
  • 2 edits in trunk/LayoutTests

8 editing/ tests crashing with Assertion failed
rdar://83591040

Unreviewed test gardening.

2:28 PM Changeset in webkit [283136] by Takashi.Komori@sony.com
  • 2 edits in trunk/Source/WebCore

[Curl] Set CURL_LOCK_DATA_SSL_SESSION option to reduce SSL/TLS handshake time
https://bugs.webkit.org/show_bug.cgi?id=230818

Reviewed by Fujii Hironori.

Set CURL_LOCK_DATA_SSL_SESSION option to reuse Session ID.
It reduces SSL/TLS handshake time.

Covered by existing tests.

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlShareHandle::CurlShareHandle):

2:27 PM Changeset in webkit [283135] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC][32bit] Fix build after r283098
https://bugs.webkit.org/show_bug.cgi?id=230856

Unreviewed build fix.

Patch by Xan López <Xan Lopez> on 2021-09-27

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_jeq_ptr): remove unused (broken) line.

2:21 PM Changeset in webkit [283134] by ntim@apple.com
  • 6 edits in trunk/Source/WebCore

Rename Style::queuePostResolutionCallback to Style::deprecatedQueuePostResolutionCallback
https://bugs.webkit.org/show_bug.cgi?id=230851

Reviewed by Simon Fraser.

The HTML5 event loop should be used instead.
Also fix pre-existing webkit-style errors.

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::didAttachRenderers):
(WebCore::HTMLFormControlElement::didRecalcStyle):

  • html/HTMLFrameOwnerElement.cpp:

(WebCore::HTMLFrameOwnerElement::scheduleInvalidateStyleAndLayerComposition):

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::deprecatedQueuePostResolutionCallback):
(WebCore::Style::queuePostResolutionCallback): Deleted.

  • style/StyleTreeResolver.h:
2:07 PM Changeset in webkit [283133] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 14 & 15 ] fast/images/image-subsampling.html is a flaky image failure.
https://bugs.webkit.org/show_bug.cgi?id=230857

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
2:05 PM Changeset in webkit [283132] by Sam Sneddon
  • 3 edits in trunk/Tools

Port._natural_sort_key should sort a01 before a001
https://bugs.webkit.org/show_bug.cgi?id=230764

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/port/base.py:

(Port._natural_sort_key):

  • Scripts/webkitpy/port/base_unittest.py:

(NaturalCompareTest.test_natural_compare):
(KeyCompareTest.test_test_key):

1:47 PM September 2021 Meeting edited by Jon Davis
Added placeholders for more session transcripts (diff)
1:18 PM Changeset in webkit [283131] by Alan Coon
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.2.9

1:06 PM WebKit2021-2022Igalia edited by Jon Davis
Added notes captured (diff)
12:50 PM Changeset in webkit [283130] by mmaxfield@apple.com
  • 10 edits in trunk

The CSS Fonts spec has deleted CSSRule.FONT_PALETTE_VALUES_RULE
https://bugs.webkit.org/show_bug.cgi?id=230786
<rdar://problem/83528219>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

The test is being upstreamed at https://github.com/web-platform-tests/wpt/pull/30959.

  • web-platform-tests/css/css-fonts/idlharness-expected.txt:
  • web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid-expected.txt:
  • web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html:
  • web-platform-tests/css/css-fonts/parsing/font-palette-values-valid.html:
  • web-platform-tests/interfaces/css-fonts.idl:

Source/WebCore:

Update WebKit according to
https://github.com/w3c/csswg-drafts/commit/45bda92646e0438c1fcd44497144aa86f0df1b61.

Test: web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html

  • css/CSSRule.h:
  • css/CSSRule.idl:
  • css/StyleRuleType.h:
12:33 PM WebKit2021-2022Igalia edited by Jon Davis
Added link to the slide deck (diff)
12:33 PM Changeset in webkit [283129] by commit-queue@webkit.org
  • 100 edits
    2 deletes in trunk

Unreviewed, reverting r283102, r283103 and r283104.
https://bugs.webkit.org/show_bug.cgi?id=230854

It regresses JetStream2 on iOS devices

Reverted changesets:

"Build an unlinked baseline JIT"
https://bugs.webkit.org/show_bug.cgi?id=229223
https://commits.webkit.org/r283102

"Unreviewed, fix CLoop build"
https://bugs.webkit.org/show_bug.cgi?id=229223
https://commits.webkit.org/r283103

"Unreviewed, fix CLoop build part 2"
https://bugs.webkit.org/show_bug.cgi?id=229223
https://commits.webkit.org/r283104

11:53 AM Changeset in webkit [283128] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 14 ] remote-layer-tree/ios/uiview-tree-basic.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=230850

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:34 AM OffscreenCanvas2021Update created by Jon Davis
11:34 AM GitHubandNewProcesses created by Jon Davis
11:33 AM ProtectedCollaborationTree created by Jon Davis
11:17 AM ApplePlansForWebKit2022Edition created by Jon Davis
11:17 AM WebKit2021-2022Igalia created by Jon Davis
11:16 AM September 2021 Meeting edited by Jon Davis
Added Transcript placeholders for day 1 (diff)
10:59 AM Changeset in webkit [283127] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

Boundary check of AccessibilityMathMLElement::mathOverObject is incorrect
https://bugs.webkit.org/show_bug.cgi?id=230828
<rdar://problem/83571752>

Reviewed by Chris Fleizach.

  • accessibility/AccessibilityMathMLElement.cpp:

(WebCore::AccessibilityMathMLElement::mathOverObject):

10:27 AM September 2021 Meeting edited by Jon Davis
Updated more titles (diff)
10:18 AM Changeset in webkit [283126] by Jonathan Bedard
  • 5 edits in trunk/Tools

Exception in run-webkit-tests: Bad file descriptor (Revert)
https://bugs.webkit.org/show_bug.cgi?id=229994
<rdar://problem/82826083>

Unreviewed revert.

Revert of 241391@main, 241474@main, 241546@main and 241782@main

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

(FileSystem.rmtree):

  • Scripts/webkitpy/port/server_process.py:

(ServerProcess.write):
(ServerProcess._wait_for_data_and_update_buffers_using_select):

  • Scripts/webkitpy/port/simulator_process.py:

(SimulatorProcess):
(SimulatorProcess._start):

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDevice.launch_app):

10:13 AM Changeset in webkit [283125] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ MacOS ] inspector/dom/getAccessibilityPropertiesForNode.html is failing
https://bugs.webkit.org/show_bug.cgi?id=230840

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-09-27
Reviewed by Ryan Haddad.

Remove expanded property from expected output for this test.
Following https://trac.webkit.org/changeset/283078/webkit, we don't
expose expanded in this case anymore.

  • inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
10:05 AM September 2021 Meeting edited by Jon Davis
Updated presentation titles (diff)
9:55 AM Changeset in webkit [283124] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Catalina BigSur wk1 Debug ] webrtc/datachannel/datachannel-gc.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=230848.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
9:43 AM Changeset in webkit [283123] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Catalina Debug wk1 EWS ] svg/filters/big-height-filter.svg is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=230846.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
9:35 AM Changeset in webkit [283122] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][GPUP] Remove access to unused mach services in sandbox
https://bugs.webkit.org/show_bug.cgi?id=230832
<rdar://problem/83573640>

Reviewed by Brent Fulgham.

Remove access to mach services on iOS in the GPU process that are unused, according to telemetry.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
9:29 AM Changeset in webkit [283121] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Catalina Debug wk1 EWS ] storage/indexeddb/mozilla/cursor-mutation.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=230844.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
9:27 AM Changeset in webkit [283120] by Antti Koivisto
  • 11 edits in trunk

[CSS Cascade Layers] Support @layer statement before @import statements
https://bugs.webkit.org/show_bug.cgi?id=230826

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/layer-import-expected.txt:

Source/WebCore:

Support case like

@layer a, b;
@import url(foo.css);

Before this patch @import rules could only be preceded by a @charset rule.

  • css/StyleRule.cpp:

(WebCore::StyleRuleLayer::createStatement):
(WebCore::StyleRuleLayer::createBlock):
(WebCore::StyleRuleLayer::create): Deleted.

Some clarifying renaming.

  • css/StyleRule.h:
  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::parserAppendRule):

Add a new m_layerRulesBeforeImportRules vector and put any early layer statements there.

(WebCore::StyleSheetContents::ruleAt const):
(WebCore::StyleSheetContents::ruleCount const):
(WebCore::StyleSheetContents::clearRules):
(WebCore::StyleSheetContents::wrapperInsertRule):
(WebCore::StyleSheetContents::wrapperDeleteRule):

  • css/StyleSheetContents.h:
  • css/parser/CSSParserImpl.cpp:

(WebCore::computeNewAllowedRules):
(WebCore::CSSParserImpl::consumeImportRule):
(WebCore::CSSParserImpl::consumeLayerRule):

Parsing support.

  • css/parser/CSSParserImpl.h:
  • style/RuleSet.cpp:

(WebCore::Style::RuleSet::Builder::addChildRules):
(WebCore::Style::RuleSet::Builder::addRulesFromSheet):

Register layers before imports.

(WebCore::Style::RuleSet::Builder::registerLayers):

Factor into a function.

  • style/RuleSet.h:
9:19 AM Changeset in webkit [283119] by BJ Burg
  • 11 edits
    1 copy in trunk/Source/WebKit

[Cocoa] backport showConsole() and showResources() for RemoteWebInspectorUI
https://bugs.webkit.org/show_bug.cgi?id=230573
<rdar://problem/83365814>

Reviewed by Devin Rousso.

These methods already exist for _WKInspector. A test will be added in
future patch that tests _WKInspectorExtensionDelegate shown/hidden callback methods.

  • UIProcess/API/Cocoa/_WKInspectorIBActions.h: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKInspector.h.

Added. API and SPI that are shared between local and remote Web Inspector
should go in this class. Since these methods are used to implement IBActions for a
detached Web Inspector window, the protocol is named _WKInspectorIBActions.
Hoist showResources() and showConsole() to this shared protocol.

  • UIProcess/API/Cocoa/_WKInspectorExtensionHost.h:
  • UIProcess/API/Cocoa/_WKInspector.h: Remove methods that are

part of the _WKInspectorIBActions protocol.

  • UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:

(-[_WKRemoteWebInspectorViewController showConsole]):
(-[_WKRemoteWebInspectorViewController showResources]):
Added. Call into RemoteWebInspectorUIProxy.

  • UIProcess/Inspector/RemoteWebInspectorUIProxy.h:
  • UIProcess/Inspector/RemoteWebInspectorUIProxy.cpp:

(WebKit::RemoteWebInspectorUIProxy::showConsole):
(WebKit::RemoteWebInspectorUIProxy::showResources):
Added. Send an IPC message to the Inspector web process.

  • WebProcess/Inspector/RemoteWebInspectorUI.h:
  • WebProcess/Inspector/RemoteWebInspectorUI.messages.in:

Add new messages.

  • WebProcess/Inspector/RemoteWebInspectorUI.cpp:

(WebKit::RemoteWebInspectorUI::showConsole):
(WebKit::RemoteWebInspectorUI::showResources):
Added. Backport the implementation from WebInspectorUI.

9:12 AM Changeset in webkit [283118] by Lauro Moura
  • 2 edits in trunk/LayoutTests

Garden passing flexbox abspos tests since updated in 242101@main

Unreviewed test gardening.

These tests are passing in all platforms according to
results.webkit.org.

9:09 AM Changeset in webkit [283117] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Catalina BigSur wk1 Debug ] media/track/audio-track.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=230842.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
9:06 AM Changeset in webkit [283116] by youenn@apple.com
  • 14 edits
    1 add in trunk/Source

iPadOS 15 / iOS 15 unable to decode VP9 stream
https://bugs.webkit.org/show_bug.cgi?id=230604
<rdar://problem/83391595>

Reviewed by Eric Carlson.

Source/WebCore:

Export a utility function to know whether HW VP9 is supported by VTB.
No change of behavior.

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

(WebCore::vp9HardwareDecoderAvailable):

Source/WebKit:

Update code to retrieve some parameters when synchronously creating the GPU process connection.
The sole parameter is currently to know the HW VP9 decoder availability.
If HW VP9 decoder is not supported by GPUProcess code, we fallback to SW libvpx.

Manually tested.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::createGPUConnectionToWebProcess):

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

(WebKit::GPUProcessProxy::getGPUProcessConnection):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::GPUProcessConnection):

  • WebProcess/GPU/GPUProcessConnection.h:

(WebKit::GPUProcessConnection::create):
(WebKit::GPUProcessConnection::hasVP9HardwareDecoder const):

  • WebProcess/GPU/GPUProcessConnectionInfo.h:

(WebKit::GPUProcessConnectionInfo::encode const):
(WebKit::GPUProcessConnectionInfo::decode):

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:

(WebKit::LibWebRTCCodecs::setCallbacks):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::ensureGPUProcessConnection):

9:03 AM Changeset in webkit [283115] by Andres Gonzalez
  • 9 edits in trunk/Source/WebCore

Fix for crash in accessibility/Mac/search-predicate-for-adhoc-radio-groups.html in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=230754
<rdar://problem/83498599>

Reviewed by Chris Fleizach.

Test: accessibility/Mac/search-predicate-for-adhoc-radio-groups.html

The crash was caused by the call in isRadioButtonInDifferentAdhocGroup
to axObject->element()->getNameAttribute(), since element() should not
be called off of the main thread. That brins up the question of how to
get element attributes on the AX thread. For that purpose, I added the
attributeValue method to the AXCoreObject interface, and removed the
related methods that take QualifiedNames and return an AtomString, since
they cannot be used off of the main thread.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::attributeValue const):
(WebCore::AccessibilityObject::setIsIgnoredFromParentDataForChild):
(WebCore::Accessibility::isRadioButtonInDifferentAdhocGroup):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/AccessibilityTableCell.cpp:

(WebCore::AccessibilityTableCell::columnHeaders):
(WebCore::AccessibilityTableCell::rowHeaders):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityIdentifier]):

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::attributeValue const):
(WebCore::AXIsolatedObject::hasAttribute const): Deleted.
(WebCore::AXIsolatedObject::getAttribute const): Deleted.

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/isolatedtree/AXIsolatedTree.h:
9:01 AM Changeset in webkit [283114] by youenn@apple.com
  • 20 edits
    4 adds in trunk

Make sure to reset presenting application pid in case of mediaserverd crash
https://bugs.webkit.org/show_bug.cgi?id=230822
<rdar://83474184>

Reviewed by Eric Carlson.

Source/WebCore:

Before the patch, we were asking MediaSessionHelper client to set the pid in case of mediaserverd crash.
Given GPUProcess is the only one receiving the notification now, only the GPUProcess client could do it,
which was not the case as MediaSessionManager in WebProcess was responsible to do so.

Instead of relying on MediaSessionHelper client to do the setup, we now let MediaSessionHelper do it on its own.
Everything will happen in GPUProcess which should also be faster.

We also make sure to reset the affine transform of m_sampleBufferDisplayLayer so that rotation is applied correctly
after mediaserverd crash.

Manually tested by crashing mediaserverd.
Test: fast/mediastream/video-rotation-gpu-process-crash.html (covers affine transform change).

  • platform/audio/ios/MediaSessionHelperIOS.h:
  • platform/audio/ios/MediaSessionHelperIOS.mm:

(MediaSessionHelperiOS::providePresentingApplicationPID):
(MediaSessionHelperiOS::mediaServerConnectionDied):

  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):

Source/WebKit:

Add API to crash GPUProcess from WebKitTestRunner.

Make sure to forward to MediaPlayer the fact that the layer failed.
This was handled for GPUProcess crash but not for other cases like mediaserverd crashes.

  • UIProcess/API/C/WKContext.cpp:

(WKContextTerminateGPUProcess):

  • UIProcess/API/C/WKContextPrivate.h:
  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::terminateForTesting):

  • UIProcess/GPU/GPUProcessProxy.h:
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:

(WebKit::SampleBufferDisplayLayer::setDidFail):

Tools:

Add test runner API to crash GPUProcess.

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

(WTR::TestRunner::terminateGPUProcess):

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

(WTR::TestController::terminateGPUProcess):

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • fast/mediastream/video-rotation-gpu-process-crash-expected.txt: Added.
  • fast/mediastream/video-rotation-gpu-process-crash.html: Added.
  • platform/ios-simulator/fast/mediastream/video-rotation-gpu-process-crash-expected.png: Added.
  • platform/mac/fast/mediastream/video-rotation-gpu-process-crash-expected.png: Added.
8:57 AM Changeset in webkit [283113] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Windows ] svg/as-background-image/svg-as-background-body.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=230838.

Unreviewed test gardening.

  • platform/win/TestExpectations:
8:50 AM Changeset in webkit [283112] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

prepare-ChangeLog does not show the correct result with using --git-commit
https://bugs.webkit.org/show_bug.cgi?id=230816

Patch by Hoa Dinh <dvh@apple.com> on 2021-09-27
Reviewed by Jonathan Bedard.

When we pass the parameter --git-commit, we need to use the correct reference version when
computing the difference between the version before and after the change.
This patch fixes it by passing the version before the specified commit.

Also, when --git-commit is used, we need compare against the correct version of the file.
This patch fixes that part by calling git to retrieve the accurate version.

  • Scripts/prepare-ChangeLog:

(originalFile):
(generateFunctionLists):

8:41 AM Changeset in webkit [283111] by Kate Cheney
  • 178 edits in trunk

Send CSP violation reports to the DOM window
https://bugs.webkit.org/show_bug.cgi?id=230728

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

Rebaseline CSP tests now that many are no longer timing out. In some
cases this will require removing console logging because in general
for CSP tests we dump console logging to stderr to avoid flakiness.

  • web-platform-tests/content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub-expected.txt:
  • web-platform-tests/content-security-policy/blob/blob-urls-do-not-match-self.sub-expected.txt:
  • web-platform-tests/content-security-policy/blob/self-doesnt-match-blob.sub-expected.txt:
  • web-platform-tests/content-security-policy/blob/star-doesnt-match-blob.sub-expected.txt:
  • web-platform-tests/content-security-policy/child-src/child-src-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/child-src/child-src-conflicting-frame-src.sub-expected.txt:
  • web-platform-tests/content-security-policy/child-src/child-src-redirect-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/child-src/child-src-worker-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/connect-src/connect-src-beacon-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/connect-src/connect-src-beacon-redirect-to-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/connect-src/connect-src-eventsource-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/connect-src/connect-src-eventsource-redirect-to-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/connect-src/connect-src-websocket-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/connect-src/connect-src-xmlhttprequest-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/connect-src/connect-src-xmlhttprequest-redirect-to-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/default-src/default-src-inline-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/font-src/font-stylesheet-font-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/form-action/form-action-src-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/form-action/form-action-src-get-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/form-action/form-action-src-javascript-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/frame-src/frame-src-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/frame-src/frame-src-cross-origin-load.sub-expected.txt:
  • web-platform-tests/content-security-policy/frame-src/frame-src-redirect-expected.txt:
  • web-platform-tests/content-security-policy/frame-src/frame-src-same-document-meta.sub-expected.txt:
  • web-platform-tests/content-security-policy/frame-src/frame-src-same-document.sub-expected.txt:
  • web-platform-tests/content-security-policy/frame-src/frame-src-self-unique-origin-expected.txt:
  • web-platform-tests/content-security-policy/generic/304-response-should-update-csp.sub-expected.txt:
  • web-platform-tests/content-security-policy/generic/directive-name-case-insensitive.sub-expected.txt:
  • web-platform-tests/content-security-policy/generic/generic-0_1-img-src-expected.txt:
  • web-platform-tests/content-security-policy/generic/generic-0_1-script-src-expected.txt:
  • web-platform-tests/content-security-policy/generic/generic-0_10_1.sub-expected.txt:
  • web-platform-tests/content-security-policy/generic/generic-0_2_2.sub-expected.txt:
  • web-platform-tests/content-security-policy/generic/generic-0_2_3-expected.txt:
  • web-platform-tests/content-security-policy/generic/generic-0_8_1.sub-expected.txt:
  • web-platform-tests/content-security-policy/generic/only-valid-whitespaces-are-allowed-expected.txt:
  • web-platform-tests/content-security-policy/generic/policy-inherited-correctly-by-plznavigate-expected.txt:
  • web-platform-tests/content-security-policy/img-src/img-src-self-unique-origin-expected.txt:
  • web-platform-tests/content-security-policy/img-src/report-blocked-data-uri.sub-expected.txt:
  • web-platform-tests/content-security-policy/inheritance/document-write-iframe-expected.txt:
  • web-platform-tests/content-security-policy/inheritance/frame-src-javascript-url-expected.txt:
  • web-platform-tests/content-security-policy/inheritance/iframe-srcdoc-inheritance-expected.txt:
  • web-platform-tests/content-security-policy/inheritance/inherited-csp-list-modifications-are-local-expected.txt:
  • web-platform-tests/content-security-policy/inheritance/javascript-url-srcdoc-cross-origin-iframe-inheritance-expected.txt:
  • web-platform-tests/content-security-policy/inheritance/location-reload-expected.txt:
  • web-platform-tests/content-security-policy/media-src/media-src-7_1_2.sub-expected.txt:
  • web-platform-tests/content-security-policy/media-src/media-src-7_2_2.sub-expected.txt:
  • web-platform-tests/content-security-policy/media-src/media-src-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/meta/combine-header-and-meta-policies.sub-expected.txt:
  • web-platform-tests/content-security-policy/navigate-to/form-action/form-action-blocks-navigate-to-allows.sub-expected.txt:
  • web-platform-tests/content-security-policy/navigate-to/form-action/form-action-blocks-navigate-to-blocks.sub-expected.txt:
  • web-platform-tests/content-security-policy/navigation/javascript-url-navigation-inherits-csp-expected.txt:
  • web-platform-tests/content-security-policy/navigation/to-javascript-parent-initiated-parent-csp-expected.txt:
  • web-platform-tests/content-security-policy/object-src/object-src-no-url-blocked-expected.txt:
  • web-platform-tests/content-security-policy/reporting-api/report-to-directive-allowed-in-meta.https.sub-expected.txt:
  • web-platform-tests/content-security-policy/reporting-api/reporting-api-report-only-sends-reports-on-violation.https.sub-expected.txt:
  • web-platform-tests/content-security-policy/reporting-api/reporting-api-report-to-only-sends-reports-to-first-endpoint.https.sub-expected.txt:
  • web-platform-tests/content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-1.https.sub-expected.txt:
  • web-platform-tests/content-security-policy/reporting-api/reporting-api-report-to-overrides-report-uri-2.https.sub-expected.txt:
  • web-platform-tests/content-security-policy/reporting-api/reporting-api-sends-reports-on-violation.https.sub-expected.txt:
  • web-platform-tests/content-security-policy/reporting-api/reporting-api-works-on-frame-src.https.sub-expected.txt:
  • web-platform-tests/content-security-policy/reporting/report-same-origin-with-cookies-expected.txt:
  • web-platform-tests/content-security-policy/reporting/report-uri-effective-directive-expected.txt:
  • web-platform-tests/content-security-policy/script-src/hash-always-converted-to-utf-8/iso-8859-1-expected.txt:
  • web-platform-tests/content-security-policy/script-src/hash-always-converted-to-utf-8/iso-8859-3-expected.txt:
  • web-platform-tests/content-security-policy/script-src/hash-always-converted-to-utf-8/iso-8859-7-expected.txt:
  • web-platform-tests/content-security-policy/script-src/hash-always-converted-to-utf-8/iso-8859-9-expected.txt:
  • web-platform-tests/content-security-policy/script-src/hash-always-converted-to-utf-8/utf-8-lone-surrogate-expected.txt:
  • web-platform-tests/content-security-policy/script-src/injected-inline-script-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/script-src/javascript-window-open-blocked-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-1_1-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-1_10-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-1_2-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-1_2_1-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-1_4_1-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-external-hash-policy-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-hash-policy-expected.txt:
  • web-platform-tests/content-security-policy/script-src/scriptnonce-and-scripthash.sub-expected.txt:
  • web-platform-tests/content-security-policy/script-src/scriptnonce-basic-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/script-src/scriptnonce-ignore-unsafeinline.sub-expected.txt:
  • web-platform-tests/content-security-policy/script-src/srcdoc-doesnt-bypass-script-src.sub-expected.txt:
  • web-platform-tests/content-security-policy/securitypolicyviolation/img-src-redirect.sub-expected.txt:
  • web-platform-tests/content-security-policy/securitypolicyviolation/inside-dedicated-worker-expected.txt:
  • web-platform-tests/content-security-policy/securitypolicyviolation/securitypolicyviolation-block-cross-origin-image.sub-expected.txt:
  • web-platform-tests/content-security-policy/securitypolicyviolation/securitypolicyviolation-block-image-from-script.sub-expected.txt:
  • web-platform-tests/content-security-policy/securitypolicyviolation/securitypolicyviolation-block-image.sub-expected.txt:
  • web-platform-tests/content-security-policy/securitypolicyviolation/upgrade-insecure-requests-reporting.https-expected.txt:
  • web-platform-tests/content-security-policy/style-src/injected-inline-style-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/style-src/inline-style-allowed-while-cloning-objects.sub-expected.txt:
  • web-platform-tests/content-security-policy/style-src/inline-style-attribute-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-error-event-fires-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-hash-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-imported-style-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-injected-inline-style-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-injected-stylesheet-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-inline-style-attribute-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-inline-style-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked-error-event-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-none-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src/style-src-stylesheet-nonce-blocked-expected.txt:
  • web-platform-tests/content-security-policy/style-src/stylehash-basic-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/style-src/stylenonce-allowed.sub-expected.txt:
  • web-platform-tests/content-security-policy/style-src/stylenonce-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/svg/object-in-svg-foreignobject.sub-expected.txt:
  • web-platform-tests/content-security-policy/svg/svg-inline.sub-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-eval/eval-scripts-setInterval-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-eval/eval-scripts-setTimeout-blocked.sub-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_allowed-href-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_allowed-href_blank-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_allowed-window_location-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_allowed-window_open-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href_blank-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-window_location-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-window_open-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href_blank-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-window_location-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-window_open-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/script_event_handlers_allowed-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/script_event_handlers_denied_missing_unsafe_hashes-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/script_event_handlers_denied_wrong_hash-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/style_attribute_denied_missing_unsafe_hashes-expected.txt:
  • web-platform-tests/content-security-policy/unsafe-hashes/style_attribute_denied_wrong_hash-expected.txt:
  • web-platform-tests/content-security-policy/worker-src/dedicated-worker-src-child-fallback-blocked.sub-expected.txt:

Source/WebCore:

No new tests. This will fix numerous test timeouts.

Many imported CSP tests are timing out because they wait for security
violation events to be sent to the DOM window. This patch bubbles up
violation reports so attached documents will also report violations
to the window.

  • dom/Document.cpp:

(WebCore::Document::enqueueSecurityPolicyViolationEvent):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::reportViolation const):
We should only report the name of the violated directive to match
the spec, which specifies this should be "a non-empty string
representing the directive whose enforcement caused the violation."

LayoutTests:

Unskip tests that are no longer timing out after this fix. Rebaseline
tests that previously expected a different violated directive text.

  • TestExpectations:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-https-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-https-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/script-blocked-sends-multiple-reports-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy2-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-enforced-policy-and-allowed-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-enforced-policy-and-allowed-by-report-policy-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image-from-script-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-from-script-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-https-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-child-src-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-default-src-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-frame-src-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-blocked-data-uri-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-blocked-uri-and-do-not-follow-redirect-when-sending-report-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-blocked-uri-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-multiple-violations-01-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-multiple-violations-02-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-only-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-only-upgrade-insecure-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-uri-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-uri-scheme-relative-expected.txt:
  • http/tests/security/contentSecurityPolicy/same-origin-plugin-document-blocked-in-child-window-report-expected.txt:
8:36 AM Changeset in webkit [283110] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Catalina BigSur wk1 Debug ] Assertion Failure: WebGL tests are flaky crashes.
https://bugs.webkit.org/show_bug.cgi?id=230835.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
8:13 AM Changeset in webkit [283109] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Catalina Debug wk1 EWS] performance-api/performance-observer-order.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=230833.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
7:59 AM Changeset in webkit [283108] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Catalina Debug wk1 EWS ] storage/websql/multiple-transactions-on-different-handles.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=230831.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
7:45 AM Changeset in webkit [283107] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

imported/w3c/web-platform-tests/webrtc/RTCDataChannel-close.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=230696.

Unreviewed test gardening.

  • platform/ios-14-wk2/TestExpectations:
5:34 AM Changeset in webkit [283106] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Rename RemoteCaptureSampleManager::RemoteAudio thread appropriately
https://bugs.webkit.org/show_bug.cgi?id=230745

Reviewed by Eric Carlson.

No change of behavior.

  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:

(WebKit::RemoteCaptureSampleManager::RemoteAudio::startThread):

4:25 AM Changeset in webkit [283105] by ntim@apple.com
  • 9 edits in trunk/Source

Replace Node::isInert() with RenderStyle::effectiveInert()
https://bugs.webkit.org/show_bug.cgi?id=230686

Reviewed by Antti Koivisto.

This replaces Node::isInert() in favor of RenderStyle::effectiveInert() which is more accurate. We can't use it in
Element::isFocusable(), since there's a bug with invalidation when accessing the cached computedStyle, hence
the Node::deprecatedIsInert() method.

Source/WebCore:

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::defaultObjectInclusion const):

  • dom/Element.cpp:

(WebCore::Element::isFocusable const):

  • dom/Node.cpp:

(WebCore::Node::canStartSelection const):
(WebCore::Node::deprecatedIsInert const): Added.

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

(WebCore::Position::nodeIsInertOrUserSelectNone):
(WebCore::Position::nodeIsUserSelectAll):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::collectSelectionGeometriesInternal):

Source/WebKit:

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::selectionPositionInformation):

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

Unreviewed, fix CLoop build part 2
https://bugs.webkit.org/show_bug.cgi?id=229223

  • llint/LowLevelInterpreter64.asm:
1:55 AM Changeset in webkit [283103] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed, fix CLoop build
https://bugs.webkit.org/show_bug.cgi?id=229223

  • llint/LLIntOfflineAsmConfig.h:
  • llint/LowLevelInterpreter64.asm:
12:52 AM Changeset in webkit [283102] by sbarati@apple.com
  • 99 edits
    1 copy
    1 add in trunk

Build an unlinked baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=229223
<rdar://problem/82321772>

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

This patch adds an "unlinked" baseline JIT to JSVALUE64 platforms. The JIT
code produced by this baseline JIT can be shared between all CodeBlocks that
share an UnlinkedCodeBlock. The benefit of this is, if we're creating a CodeBlock
from an UnlinkedCodeBlock that already compiled an unlinked baseline JIT
instance, this new CodeBlock just starts off executing in the baseline JIT
"for free".

To make this work, the code we emit now needs to be independent of a specific
CodeBlock instance. We use a CodeBlock instance for minimal profiling information
when compiling, but otherwise, the code is tied to the UnlinkedCodeBlock. When
we need CodeBlock specific information, we load it. This usually means things
like we'll load things from the Metadata dynamically. This patch also adds a
"linked constant pool" concept, and anytime we instantiate such a CodeBlock,
we also need to instantiate this "linked constant pool". This contains things
like our inline cache data structures (StructureStubInfo*), JSGlobalObject*,
etc.

Unlinked baseline JIT always runs ICs in the "data" mode. To make this work, I
made data ICs work on x86_64. To do this, we no longer call/ret to the IC.
Instead, we jump to the IC, and the IC jumps back by loading the "done" location
from the StructureStubInfo dynamically. This simplifies the design to not be
based on the arm64 calling convention, and keeps the same performance characteristics.

This patch also adds a new version of InlineAccess that is only used in baseline
JIT (for now). In the future, we can make the DFG/FTL also use this for Data
ICs. But we don't need to do that yet since those tiers don't use data ICs by
default. The baseline JIT now has a pure data IC approach to InlineAccess. So
instead of repatching code, we repatch fields we load dynamically.

This patch also cleans up a few things in OSR exit, where both DFG/FTL were
storing callee saves to the callee saves buffer in a weird place, and separate
from one another. I noticed this code can be simplified if we just store
callee saves at the end of the OSR exit handler, and from common JIT emission
code.

This patch also fixes a bug where we could end up with the wrong (and always
more negative) SP in the baseline JIT. This could happen when we OSR exit
from an inlined getter/setter. The OSR exit code puts the return PC when
returning to the call site of the getter/setter to be the inline cache's
"done location". However, this "done location" didn't used to restore SP.
This patch conservatively makes it so that we restore the SP at these sites.

This is measured as a 1% speedup on Speedometer2.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/AccessCase.cpp:

(JSC::AccessCase::fromStructureStubInfo):
(JSC::AccessCase::generateImpl):

  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeOperandsForCheckpoint.h:

(JSC::valueProfileOffsetFor):

  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::fastPathStart):
(JSC::CallLinkInfo::emitFastPathImpl):
(JSC::CallLinkInfo::emitFastPath):
(JSC::CallLinkInfo::emitTailCallFastPath):
(JSC::CallLinkInfo::emitDataICFastPath):
(JSC::CallLinkInfo::emitTailCallDataICFastPath):
(JSC::CallLinkInfo::emitDataICSlowPath):
(JSC::CallLinkInfo::initializeDataIC):
(JSC::CallLinkInfo::emitDirectFastPath):
(JSC::CallLinkInfo::emitDirectTailCallFastPath):

  • bytecode/CallLinkInfo.h:

(JSC::CallLinkInfo::offsetOfMaxArgumentCountIncludingThis):
(JSC::CallLinkInfo::slowStub): Deleted.
(JSC::CallLinkInfo::addressOfMaxArgumentCountIncludingThis): Deleted.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::setupWithUnlinkedBaselineCode):
(JSC::CodeBlock::isConstantOwnedByUnlinkedCodeBlock const):
(JSC::CodeBlock::setConstantRegisters):
(JSC::CodeBlock::finalizeJITInlineCaches):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::frameRegisterCount):
(JSC::CodeBlock::binaryArithProfileForPC):
(JSC::CodeBlock::unaryArithProfileForPC):
(JSC::CodeBlock::findPC):
(JSC::CodeBlock::jitSoon):
(JSC::CodeBlock::jitNextInvocation):
(JSC::CodeBlock::dumpMathICStats):
(JSC::CodeBlock::finalizeBaselineJITInlineCaches): Deleted.
(JSC::CodeBlock::addJITAddIC): Deleted.
(JSC::CodeBlock::addJITMulIC): Deleted.
(JSC::CodeBlock::addJITSubIC): Deleted.
(JSC::CodeBlock::addJITNegIC): Deleted.
(JSC::CodeBlock::setPCToCodeOriginMap): Deleted.
(JSC::CodeBlock::thresholdForJIT): Deleted.
(JSC::CodeBlock::jitAfterWarmUp): Deleted.

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::JITData::offsetOfJITConstantPool):
(JSC::CodeBlock::offsetOfJITData):
(JSC::CodeBlock::offsetOfArgumentValueProfiles):
(JSC::CodeBlock::offsetOfConstantsVectorBuffer):
(JSC::CodeBlock::baselineJITConstantPool):
(JSC::CodeBlock::checkIfJITThresholdReached):
(JSC::CodeBlock::dontJITAnytimeSoon):
(JSC::CodeBlock::llintExecuteCounter const):
(JSC::CodeBlock::offsetOfDebuggerRequests):
(JSC::CodeBlock::offsetOfShouldAlwaysBeInlined):
(JSC::CodeBlock::loopHintsAreEligibleForFuzzingEarlyReturn):
(JSC::CodeBlock::addressOfNumParameters): Deleted.
(JSC::CodeBlock::isKnownCell): Deleted.
(JSC::CodeBlock::addMathIC): Deleted.
(JSC::CodeBlock::setJITCodeMap): Deleted.
(JSC::CodeBlock::jitCodeMap): Deleted.
(JSC::CodeBlock::switchJumpTable): Deleted.
(JSC::CodeBlock::stringSwitchJumpTable): Deleted.

  • bytecode/CodeBlockInlines.h:

(JSC::CodeBlock::forEachValueProfile):
(JSC::CodeBlock::jitCodeMap):
(JSC::CodeBlock::baselineSwitchJumpTable):
(JSC::CodeBlock::baselineStringSwitchJumpTable):
(JSC::CodeBlock::dfgSwitchJumpTable):
(JSC::CodeBlock::dfgStringSwitchJumpTable):

  • bytecode/ExecutableToCodeBlockEdge.h:
  • bytecode/ExecutionCounter.cpp:

(JSC::ExecutionCounter<countingVariant>::setThreshold):

  • bytecode/ExecutionCounter.h:

(JSC::ExecutionCounter::clippedThreshold):

  • bytecode/GetByIdMetadata.h:

(JSC::GetByIdModeMetadataArrayLength::offsetOfArrayProfile):
(JSC::GetByIdModeMetadata::offsetOfMode):

  • bytecode/GetByStatus.cpp:

(JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/GetterSetterAccessCase.cpp:

(JSC::GetterSetterAccessCase::emitDOMJITGetter):

  • bytecode/InByStatus.cpp:

(JSC::InByStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/InlineAccess.cpp:

(JSC::InlineAccess::generateSelfPropertyAccess):
(JSC::InlineAccess::canGenerateSelfPropertyReplace):
(JSC::InlineAccess::generateSelfPropertyReplace):
(JSC::InlineAccess::isCacheableArrayLength):
(JSC::InlineAccess::generateArrayLength):
(JSC::InlineAccess::isCacheableStringLength):
(JSC::InlineAccess::generateStringLength):
(JSC::InlineAccess::generateSelfInAccess):
(JSC::InlineAccess::rewireStubAsJumpInAccess):
(JSC::InlineAccess::resetStubAsJumpInAccess):

  • bytecode/InlineAccess.h:
  • bytecode/IterationModeMetadata.h:

(JSC::IterationModeMetadata::offsetOfSeenModes):

  • bytecode/LLIntCallLinkInfo.h:

(JSC::LLIntCallLinkInfo::offsetOfArrayProfile):

  • bytecode/Opcode.h:
  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessGenerationState::succeed):
(JSC::AccessGenerationState::calculateLiveRegistersForCallAndExceptionHandling):
(JSC::AccessGenerationState::preserveLiveRegistersToStackForCallWithoutExceptions):
(JSC::PolymorphicAccess::regenerate):

  • bytecode/PolymorphicAccess.h:

(JSC::AccessGenerationState::preserveLiveRegistersToStackForCallWithoutExceptions): Deleted.

  • bytecode/PutByStatus.cpp:

(JSC::PutByStatus::computeForStubInfo):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::initGetByIdSelf):
(JSC::StructureStubInfo::initPutByIdReplace):
(JSC::StructureStubInfo::initInByIdSelf):
(JSC::StructureStubInfo::addAccessCase):
(JSC::StructureStubInfo::reset):
(JSC::StructureStubInfo::visitWeakReferences):
(JSC::StructureStubInfo::propagateTransitions):
(JSC::StructureStubInfo::initializeFromUnlinkedStructureStubInfo):

  • bytecode/StructureStubInfo.h:

(JSC::StructureStubInfo::offsetOfByIdSelfOffset):
(JSC::StructureStubInfo::offsetOfInlineAccessBaseStructure):
(JSC::StructureStubInfo::inlineAccessBaseStructure):
(JSC::StructureStubInfo::offsetOfDoneLocation):

  • bytecode/SuperSampler.cpp:

(JSC::printSuperSamplerState):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::UnlinkedCodeBlock::hasIdentifier):
(JSC::UnlinkedCodeBlock::thresholdForJIT):
(JSC::UnlinkedCodeBlock::allocateSharedProfiles):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::constantRegister):
(JSC::UnlinkedCodeBlock::instructionAt const):
(JSC::UnlinkedCodeBlock::bytecodeOffset):
(JSC::UnlinkedCodeBlock::instructionsSize const):
(JSC::UnlinkedCodeBlock::loopHintsAreEligibleForFuzzingEarlyReturn):
(JSC::UnlinkedCodeBlock::outOfLineJumpOffset):
(JSC::UnlinkedCodeBlock::binaryArithProfile):
(JSC::UnlinkedCodeBlock::unaryArithProfile):
(JSC::UnlinkedCodeBlock::llintExecuteCounter):

  • bytecode/UnlinkedMetadataTable.h:

(JSC::UnlinkedMetadataTable::offsetInMetadataTable):

  • bytecode/ValueProfile.h:

(JSC::ValueProfileBase::ValueProfileBase):
(JSC::ValueProfileBase::clearBuckets):
(JSC::ValueProfile::offsetOfFirstBucket):

  • dfg/DFGCommonData.h:
  • dfg/DFGJITCode.cpp:
  • dfg/DFGJITCode.h:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):

  • dfg/DFGOSRExit.cpp:

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

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::handleExitCounts):
(JSC::DFG::callerReturnPC):
(JSC::DFG::reifyInlinedCallFrames):
(JSC::DFG::adjustAndJumpToTarget):

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compilePutPrivateName):
(JSC::DFG::SpeculativeJIT::compileValueAdd):
(JSC::DFG::SpeculativeJIT::compileValueSub):
(JSC::DFG::SpeculativeJIT::compileValueNegate):
(JSC::DFG::SpeculativeJIT::compileValueMul):
(JSC::DFG::SpeculativeJIT::compileLogShadowChickenTail):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLJITCode.h:
  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::addMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compileUnaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compileBinaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compilePutPrivateName):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • generator/Metadata.rb:
  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::storeProperty):
(JSC::AssemblyHelpers::emitVirtualCall):
(JSC::AssemblyHelpers::emitVirtualCallWithoutMovingGlobalObject):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::copyCalleeSavesToEntryFrameCalleeSavesBuffer):

  • jit/BaselineJITCode.cpp: Added.

(JSC::MathICHolder::addJITAddIC):
(JSC::MathICHolder::addJITMulIC):
(JSC::MathICHolder::addJITSubIC):
(JSC::MathICHolder::addJITNegIC):
(JSC::MathICHolder::adoptMathICs):
(JSC::BaselineJITCode::BaselineJITCode):
(JSC::BaselineJITCode::~BaselineJITCode):

  • jit/BaselineJITCode.h: Added.

(JSC::JITConstantPool::add):
(JSC::JITConstantPool::size const):
(JSC::JITConstantPool::at const):

  • jit/BaselineJITPlan.cpp:

(JSC::BaselineJITPlan::finalize):

  • jit/CCallHelpers.cpp:

(JSC::CCallHelpers::logShadowChickenTailPacketImpl):
(JSC::CCallHelpers::logShadowChickenTailPacket):

  • jit/CCallHelpers.h:
  • jit/CallFrameShuffleData.cpp:

(JSC::CallFrameShuffleData::setupCalleeSaveRegisters):

  • jit/CallFrameShuffleData.h:
  • jit/CallFrameShuffler.cpp:

(JSC::CallFrameShuffler::CallFrameShuffler):
(JSC::CallFrameShuffler::prepareForTailCall):

  • jit/CallFrameShuffler.h:

(JSC::CallFrameShuffler::snapshot const):

  • jit/JIT.cpp:

(JSC::JIT::JIT):
(JSC::JIT::emitEnterOptimizationCheck):
(JSC::JIT::emitNotifyWriteWatchpoint):
(JSC::JIT::emitVarReadOnlyCheck):
(JSC::JIT::assertStackPointerOffset):
(JSC::JIT::resetSP):
(JSC::JIT::emitPutCodeBlockToFrameInPrologue):
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::emitMaterializeMetadataAndConstantPoolRegisters):
(JSC::JIT::emitRestoreCalleeSaves):
(JSC::JIT::compileAndLinkWithoutFinalizing):
(JSC::JIT::link):
(JSC::JIT::finalizeOnMainThread):
(JSC::JIT::privateCompile):
(JSC::JIT::frameRegisterCountFor):
(JSC::JIT::stackPointerOffsetFor):

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

(JSC::JIT::emit_compareAndJumpSlowImpl):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emit_op_negate):
(JSC::JIT::emit_op_add):
(JSC::JIT::emitMathICFast):
(JSC::JIT::emitMathICSlow):
(JSC::JIT::emit_op_div):
(JSC::JIT::emit_op_mul):
(JSC::JIT::emit_op_sub):

  • jit/JITCall.cpp:

(JSC::JIT::emitPutCallResult):
(JSC::JIT::compileSetupFrame):
(JSC::JIT::compileCallEval):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileTailCall):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
(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/JITCall32_64.cpp:

(JSC::JIT::emitPutCallResult):
(JSC::JIT::compileSetupFrame):
(JSC::JIT::compileCallEval):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
(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/JITCode.h:

(JSC::JITCode::useDataIC):
(JSC::JITCode::pcToCodeOriginMap):

  • jit/JITCompilationKey.cpp:

(JSC::JITCompilationKey::dump const):

  • jit/JITCompilationKey.h:

(JSC::JITCompilationKey::JITCompilationKey):
(JSC::JITCompilationKey::operator! const):
(JSC::JITCompilationKey::isHashTableDeletedValue const):
(JSC::JITCompilationKey::operator== const):
(JSC::JITCompilationKey::hash const):
(JSC::JITCompilationKey::profiledBlock const): Deleted.

  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITInlineCacheGenerator::JITInlineCacheGenerator):
(JSC::JITInlineCacheGenerator::finalize):
(JSC::JITInlineCacheGenerator::generateBaselineDataICFastPath):
(JSC::JITGetByIdGenerator::JITGetByIdGenerator):
(JSC::generateGetByIdInlineAccess):
(JSC::JITGetByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITGetByIdWithThisGenerator::generateBaselineDataICFastPath):
(JSC::JITPutByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITDelByValGenerator::generateFastPath):
(JSC::JITDelByIdGenerator::generateFastPath):
(JSC::JITInByValGenerator::generateFastPath):
(JSC::JITInByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITInstanceOfGenerator::generateFastPath):
(JSC::JITGetByValGenerator::generateFastPath):
(JSC::JITPutByValGenerator::generateFastPath):
(JSC::JITPrivateBrandAccessGenerator::generateFastPath):

  • jit/JITInlineCacheGenerator.h:
  • jit/JITInlines.h:

(JSC::JIT::isOperandConstantDouble):
(JSC::JIT::isOperandConstantInt):
(JSC::JIT::isKnownCell):
(JSC::JIT::getConstantOperand):
(JSC::JIT::appendCallWithExceptionCheckSetJSValueResultWithProfile):
(JSC::JIT::linkSlowCaseIfNotJSCell):
(JSC::JIT::advanceToNextCheckpoint):
(JSC::JIT::emitJumpSlowToHotForCheckpoint):
(JSC::JIT::isOperandConstantChar):
(JSC::JIT::emitValueProfilingSite):
(JSC::JIT::emitValueProfilingSiteIfProfiledOpcode):
(JSC::JIT::emitArrayProfilingSiteWithCell):
(JSC::JIT::emitLoadDouble):
(JSC::JIT::emitJumpSlowCaseIfNotJSCell):
(JSC::JIT::emitGetVirtualRegister):
(JSC::JIT::jumpTarget):
(JSC::JIT::loadPtrFromMetadata):
(JSC::JIT::load32FromMetadata):
(JSC::JIT::load8FromMetadata):
(JSC::JIT::store8ToMetadata):
(JSC::JIT::store32ToMetadata):
(JSC::JIT::materializePointerIntoMetadata):
(JSC::JIT::loadConstant):
(JSC::JIT::loadGlobalObject):
(JSC::JIT::loadCodeBlockConstant):
(JSC::JIT::copiedGetPutInfo): Deleted.
(JSC::JIT::copiedArithProfile): Deleted.

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_mov):
(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_typeof_is_undefined):
(JSC::JIT::op_ret_handlerGenerator):
(JSC::JIT::emit_op_to_primitive):
(JSC::JIT::emit_op_set_function_name):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::valueIsFalseyGenerator):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jeq_ptr):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::valueIsTruthyGenerator):
(JSC::JIT::emit_op_throw):
(JSC::JIT::op_throw_handlerGenerator):
(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_object):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emit_op_debug):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_enter):
(JSC::JIT::op_enter_handlerGenerator):
(JSC::JIT::emit_op_to_this):
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emitSlow_op_jeq):
(JSC::JIT::emitSlow_op_jneq):
(JSC::JIT::emitSlow_op_instanceof_custom):
(JSC::JIT::emit_op_loop_hint):
(JSC::JIT::emitSlow_op_check_traps):
(JSC::JIT::op_check_traps_handlerGenerator):
(JSC::JIT::emit_op_new_regexp):
(JSC::JIT::emitNewFuncCommon):
(JSC::JIT::emitNewFuncExprCommon):
(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_tail):
(JSC::JIT::emit_op_profile_control_flow):
(JSC::JIT::emit_op_get_argument):
(JSC::JIT::emit_op_get_prototype_of):

  • jit/JITOpcodes32_64.cpp:

(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::emitSlow_op_instanceof_custom):
(JSC::JIT::emit_op_typeof_is_undefined):
(JSC::JIT::emit_op_set_function_name):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::compileOpEqJumpSlow):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emitSlow_op_jstricteq):
(JSC::JIT::emitSlow_op_jnstricteq):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_throw):
(JSC::JIT::emit_op_to_number):
(JSC::JIT::emit_op_to_numeric):
(JSC::JIT::emit_op_to_object):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emit_op_enter):
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emit_op_to_this):
(JSC::JIT::emit_op_profile_type):
(JSC::JIT::emit_op_log_shadow_chicken_tail):

  • jit/JITOperations.cpp:

(JSC::JSC_DEFINE_JIT_OPERATION):

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

(JSC::JITPlan::key):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::generateGetByValSlowCase):
(JSC::JIT::slow_op_get_by_val_prepareCallGenerator):
(JSC::JIT::emit_op_get_private_name):
(JSC::JIT::emitSlow_op_get_private_name):
(JSC::JIT::slow_op_get_private_name_prepareCallGenerator):
(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_prepareCallGenerator):
(JSC::JIT::emit_op_put_private_name):
(JSC::JIT::emitSlow_op_put_private_name):
(JSC::JIT::slow_op_put_private_name_prepareCallGenerator):
(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::slow_op_del_by_id_prepareCallGenerator):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emitSlow_op_del_by_val):
(JSC::JIT::slow_op_del_by_val_prepareCallGenerator):
(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::slow_op_get_by_id_prepareCallGenerator):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::slow_op_get_by_id_with_this_prepareCallGenerator):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::slow_op_put_by_id_prepareCallGenerator):
(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::emitHasPrivate):
(JSC::JIT::emitHasPrivateSlow):
(JSC::JIT::emitSlow_op_has_private_name):
(JSC::JIT::emitSlow_op_has_private_brand):
(JSC::JIT::emitVarInjectionCheck):
(JSC::JIT::emitResolveClosure):
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::generateOpResolveScopeThunk):
(JSC::JIT::slow_op_resolve_scopeGenerator):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::generateOpGetFromScopeThunk):
(JSC::JIT::slow_op_get_from_scopeGenerator):
(JSC::JIT::emit_op_put_to_scope):
(JSC::JIT::emitSlow_op_put_to_scope):
(JSC::JIT::slow_op_put_to_scopeGenerator):
(JSC::JIT::emit_op_get_from_arguments):
(JSC::JIT::emit_op_get_internal_field):
(JSC::JIT::emit_op_enumerator_next):
(JSC::JIT::emit_op_enumerator_get_by_val):
(JSC::JIT::emit_enumerator_has_propertyImpl):
(JSC::JIT::emitWriteBarrier):
(JSC::JIT::emitPutGlobalVariable): Deleted.
(JSC::JIT::emitPutGlobalVariableIndirect): Deleted.
(JSC::JIT::emitPutClosureVar): Deleted.

  • jit/JITPropertyAccess32_64.cpp:

(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::emit_op_del_by_val):
(JSC::JIT::emitSlow_op_del_by_val):
(JSC::JIT::emitSlow_op_del_by_id):
(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_put_private_name):
(JSC::JIT::emitSlow_op_put_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::emitSlow_op_put_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::emitHasPrivate):
(JSC::JIT::emitHasPrivateSlow):
(JSC::JIT::emitVarInjectionCheck):
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emitSlow_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_get_internal_field):

  • jit/Repatch.cpp:

(JSC::tryCacheGetBy):
(JSC::tryCachePutBy):
(JSC::tryCacheInBy):
(JSC::unlinkCall):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CacheableIdentifier.h:
  • runtime/CacheableIdentifierInlines.h:

(JSC::CacheableIdentifier::createFromIdentifierOwnedByCodeBlock):

  • runtime/CachedTypes.cpp:

(JSC::CachedCodeBlock::numBinaryArithProfiles const):
(JSC::CachedCodeBlock::numUnaryArithProfiles const):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::CachedCodeBlock<CodeBlockType>::encode):

  • runtime/CommonSlowPaths.cpp:

(JSC::updateArithProfileForUnaryArithOp):

  • runtime/FunctionExecutable.h:
  • runtime/Options.cpp:

(JSC::Options::recomputeDependentOptions):

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

(JSC::ScriptExecutable::prepareForExecutionImpl):

  • wasm/WasmLLIntTierUpCounter.h:

(JSC::Wasm::LLIntTierUpCounter::optimizeAfterWarmUp):
(JSC::Wasm::LLIntTierUpCounter::optimizeSoon):

  • wasm/WasmTierUpCount.cpp:

(JSC::Wasm::TierUpCount::TierUpCount):

  • wasm/WasmTierUpCount.h:

(JSC::Wasm::TierUpCount::optimizeAfterWarmUp):
(JSC::Wasm::TierUpCount::optimizeNextInvocation):
(JSC::Wasm::TierUpCount::optimizeSoon):

Source/WTF:

  • wtf/Bag.h:
  • wtf/Packed.h:

(WTF::PackedAlignedPtr::operator* const):

Tools:

  • Scripts/run-jsc-stress-tests:
12:48 AM Changeset in webkit [283101] by ysuzuki@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Use op_jeq_ptr for empty JSPropertyNameEnumerator check
https://bugs.webkit.org/show_bug.cgi?id=230817

Reviewed by Saam Barati.

We use op_jeq_ptr for empty JSPropertyNameEnumerator check instead of stricteq for smaller
bytecode size and efficient branching in LLInt and Baseline. In DFG and FTL, both will get
the same nodes.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitJumpIfEmptyPropertyNameEnumerator):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::ForInNode::emitBytecode):

12:08 AM Changeset in webkit [283100] by Martin Robinson
  • 6 edits
    2 adds in trunk

Mandatory scroll snapping doesn't work correctly in tables with position:sticky
https://bugs.webkit.org/show_bug.cgi?id=227300
<rdar://problem/79971196>

Reviewed by Simon Fraser.

Source/WebCore:

Add a mode for mapLocalToContainer which ignores sticky offsets. This will be
used by more code in the future.

Test: css3/scroll-snap/scroll-snap-drag-scrollbar-thumb-with-sticky.html

  • page/scrolling/ScrollSnapOffsetsInfo.cpp:

(WebCore::updateSnapOffsetsForScrollableArea): Pass the IgnoreStickyOffsets flag.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::mapLocalToContainer const): When the IgnoreStickyOffsets flag is
passed, explicitly remove sticky offsets from the container offset.

  • rendering/RenderObjectEnums.h: Add the IgnoreStickyOffests flag.

LayoutTests:

Add a test which exercises the original bug.

  • css3/scroll-snap/scroll-snap-drag-scrollbar-thumb-with-sticky-expected.txt: Added.
  • css3/scroll-snap/scroll-snap-drag-scrollbar-thumb-with-sticky.html: Added.
  • platform/ios/TestExpectations: Skip this test on iOS, which doesn't support thumb dragging.

Sep 26, 2021:

11:47 PM Changeset in webkit [283099] by Cameron McCormack
  • 9 edits
    114 deletes in trunk/LayoutTests

Remove old test files from canvas WPTs that were moved
https://bugs.webkit.org/show_bug.cgi?id=230811
<rdar://problem/83554404>

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

A bunch of canvas test moved directories in
https://github.com/web-platform-tests/wpt/pull/23996. When we re-
imported canvas WPTs in bug 229750, these old files were left behind.
We can remove them since they all now live under
html/canvas/element/manual/.

  • web-platform-tests/html/canvas/element/building-paths/canvas_complexshapes_arcto_001.htm: Removed.
  • web-platform-tests/html/canvas/element/building-paths/canvas_complexshapes_beziercurveto_001.htm: Removed.
  • web-platform-tests/html/canvas/element/context-attributes/getContextAttributes-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/context-attributes/getContextAttributes.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-orientation-none.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-orientation-none.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-orientation-none.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-orientation-none.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-orientation-none.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-orientation-none.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-orientation-none.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-orientation-none.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/canvas_complexshapes_ispointInpath_001.htm: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_001-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_001.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_002-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_002.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_003-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_003.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_004-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_004.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_005-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_005.html: Removed.
  • web-platform-tests/html/canvas/element/image-smoothing/imagesmoothing-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/image-smoothing/imagesmoothing.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-resize-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-resize.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-video-resize-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-video-resize.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/common.sub.js: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-blob-invalidtype-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-blob-invalidtype.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-bounds-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-bounds.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage-closed-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage-closed.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-in-worker-transfer-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-in-worker-transfer.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-invalid-args-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-invalid-args.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-origin.sub-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-origin.sub.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-serializable-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-serializable.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-sizeOverflow-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-sizeOverflow.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-transfer-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-transfer.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-worker.js: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/transfer-worker.js: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-semitransparent-p3d65.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-semitransparent-rec2020.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-semitransparent-srgb.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb-fullcolor.ogv: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb-transparent.bmp: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb-transparent.ico: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb-transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb-transparent.webp: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.bmp: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.gif: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.ico: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.jpg: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.svg: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.webp: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_AdobeRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_AdobeRGB_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_DisplayP3_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_DisplayP3_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_ProPhoto_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_ProPhoto_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_Rec2020_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_Rec2020_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_AdobeRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_AdobeRGB_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_DisplayP3_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_DisplayP3_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_ProPhoto_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_ProPhoto_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_Rec2020_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_Rec2020_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_sRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_sRGB_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_sRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_sRGB_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_AdobeRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_AdobeRGB_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_DisplayP3_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_DisplayP3_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_ProPhoto_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_ProPhoto_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_Rec2020_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_Rec2020_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_sRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_sRGB_transparent.png: Removed.

LayoutTests:

  • TestExpectations:
  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/image-smoothing/imagesmoothing-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-resize-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-invalid-args-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-serializable-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-transfer-expected.txt: Removed.
  • platform/ios-14/TestExpectations:
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY-expected.txt: Removed.
  • platform/mac/TestExpectations:
10:02 PM Changeset in webkit [283098] by ysuzuki@apple.com
  • 30 edits
    2 adds in trunk

[JSC] Optimize PutByVal with for-in
https://bugs.webkit.org/show_bug.cgi?id=230801

Reviewed by Saam Barati.

JSTests:

  • stress/for-in-sentinel.js: Added.

(shouldBe):
(test):

Source/JavaScriptCore:

We found that some of Speedometer2 subtests are heavily using for-in with PutByVal or the other DFG nodes.
And we also found that we are using polluted non-good type for the property names from for-in: String | Other.
The reason is that we are returning null when op_enumerator_next finishes instead of string. And this design
forces DFG and FTL to return null from EnumeratorNextUpdatePropertyName at the end of iteration. This pollutes
the type of property names as String | Other instead of String, and leading to suboptimal DFG nodes.

In this patch, we add special sentinel string in vm.smallString.sentinelString(). We know that this string cell
pointer will be never returned from EnumeratorNextUpdatePropertyName in the normal for-in iteration. This is easy
since we are always allocating a JSString when creating JSPropertyNameEnumerator. So this string cell (not the content)
is always different from pre-allocated vm.smallString.sentinelString(). So, we use this special string pointer
as a sentinel instead of null so that we can avoid polluting return type of EnumeratorNextUpdatePropertyName.

To check the sentinel in LLInt / Baseline, this patch adds jeq_ptr, which performs cell pointer comparison and do
not check string content equality. We do not need to have an implementation in DFG since we already have CompareEqPtr
for existing jneq_ptr bytecode.

We also clean up DFG operation related to PutByVal.


| subtest | ms | ms | b / a | pValue (significance using False Discovery Rate) |


| Elm-TodoMVC |116.010000 |112.701667 |0.971482 | 0.000000 (significant) |
| VueJS-TodoMVC |22.995000 |23.023333 |1.001232 | 0.907086 |
| EmberJS-TodoMVC |125.498333 |125.525000 |1.000212 | 0.932546 |
| BackboneJS-TodoMVC |45.700000 |45.975000 |1.006018 | 0.084799 |
| Preact-TodoMVC |16.681667 |16.610000 |0.995704 | 0.722758 |
| AngularJS-TodoMVC |123.753333 |123.740000 |0.999892 | 0.971431 |
| Vanilla-ES2015-TodoMVC |61.255000 |61.380000 |1.002041 | 0.300654 |
| Inferno-TodoMVC |58.646667 |58.948333 |1.005144 | 0.267611 |
| Flight-TodoMVC |73.283333 |72.801667 |0.993427 | 0.207389 |
| Angular2-TypeScript-TodoMVC |39.746667 |40.015000 |1.006751 | 0.449821 |
| VanillaJS-TodoMVC |50.096667 |49.823333 |0.994544 | 0.162020 |
| jQuery-TodoMVC |212.870000 |213.196667 |1.001535 | 0.371944 |
| EmberJS-Debug-TodoMVC |331.878333 |332.710000 |1.002506 | 0.094499 |
| React-TodoMVC |83.078333 |82.726667 |0.995767 | 0.076143 |
| React-Redux-TodoMVC |136.018333 |133.935000 |0.984683 | 0.000000 (significant) |
| Vanilla-ES2015-Babel-Webpack-TodoMVC |59.743333 |59.643333 |0.998326 | 0.393671 |


a mean = 271.75873
b mean = 272.45804
pValue = 0.0263030803
(Bigger means are better.)
1.003 times better
Results ARE significant

  • builtins/BuiltinNames.h:
  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeUseDef.cpp:

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

  • bytecode/LinkTimeConstant.h:
  • bytecode/Opcode.h:

(JSC::isBranch):

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

(JSC::GenericLabel<JSGeneratorTraits>::setLocation):
(JSC::BytecodeGenerator::emitJumpIfSentinelString):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::ForInNode::emitBytecode):

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGOperations.cpp:

(JSC::DFG::putByVal):
(JSC::DFG::putByValInternal):
(JSC::DFG::putByValCellInternal):
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

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

(JSC::DFG::SpeculativeJIT::compileEnumeratorNextUpdatePropertyName):

  • ftl/FTLLowerDFGToB3.cpp:

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

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

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

(JSC::JIT::emit_op_jeq_ptr):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_jeq_ptr):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_enumerator_next):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::JSC_DEFINE_COMMON_SLOW_PATH):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/SmallStrings.cpp:

(JSC::SmallStrings::initializeCommonStrings):
(JSC::SmallStrings::visitStrongReferences):

  • runtime/SmallStrings.h:

(JSC::SmallStrings::sentinelString const):

9:40 PM Changeset in webkit [283097] by Jean-Yves Avenard
  • 7 edits in trunk

[MSE] appending to the source buffer will not throw when the source buffer is full.
https://bugs.webkit.org/show_bug.cgi?id=230672
rdar://problem/83496195

Reviewed by Eric Carlson.

Source/WebCore:

Tests: media/media-source/media-source-append-buffer-full-quota-exceeded-error.html

  • platform/graphics/PlatformTimeRanges.cpp:

(WebCore::PlatformTimeRanges::findWithEpsilon): add method.
(WebCore::PlatformTimeRanges::copyWithEpsilon const): add method.

  • platform/graphics/PlatformTimeRanges.h:
  • platform/graphics/SourceBufferPrivate.cpp:

(WebCore::SourceBufferPrivate::evictCodedFrames):

LayoutTests:

  • media/media-source/media-source-append-buffer-full-quota-exceeded-error-expected.txt:
  • media/media-source/media-source-append-buffer-full-quota-exceeded-error.html:
9:37 PM WikiStart edited by Simon Fraser
(diff)
9:25 PM Changeset in webkit [283096] by commit-queue@webkit.org
  • 28 edits
    1 delete in trunk

Unreviewed, reverting r283095.
https://bugs.webkit.org/show_bug.cgi?id=230815

We should land the original patch since this does not work
with bytecode cache

Reverted changeset:

"[JSC] Optimize PutByVal with for-in"
https://bugs.webkit.org/show_bug.cgi?id=230801
https://commits.webkit.org/r283095

9:14 PM Changeset in webkit [283095] by ysuzuki@apple.com
  • 28 edits
    1 add in trunk

[JSC] Optimize PutByVal with for-in
https://bugs.webkit.org/show_bug.cgi?id=230801

Reviewed by Saam Barati.

JSTests:

  • stress/for-in-sentinel.js: Added.

(shouldBe):
(test):

Source/JavaScriptCore:

We found that some of Speedometer2 subtests are heavily using for-in with PutByVal or the other DFG nodes.
And we also found that we are using polluted non-good type for the property names from for-in: String | Other.
The reason is that we are returning null when op_enumerator_next finishes instead of string. And this design
forces DFG and FTL to return null from EnumeratorNextUpdatePropertyName at the end of iteration. This pollutes
the type of property names as String | Other instead of String, and leading to suboptimal DFG nodes.

In this patch, we add special sentinel string in vm.smallString.sentinelString(). We know that this string cell
pointer will be never returned from EnumeratorNextUpdatePropertyName in the normal for-in iteration. This is easy
since we are always allocating a JSString when creating JSPropertyNameEnumerator. So this string cell (not the content)
is always different from pre-allocated vm.smallString.sentinelString(). So, we use this special string pointer
as a sentinel instead of null so that we can avoid polluting return type of EnumeratorNextUpdatePropertyName.

To check the sentinel in LLInt / Baseline, this patch adds jeq_ptr, which performs cell pointer comparison and do
not check string content equality. We do not need to have an implementation in DFG since we already have CompareEqPtr
for existing jneq_ptr bytecode.

We also clean up DFG operation related to PutByVal.


| subtest | ms | ms | b / a | pValue (significance using False Discovery Rate) |


| Elm-TodoMVC |116.010000 |112.701667 |0.971482 | 0.000000 (significant) |
| VueJS-TodoMVC |22.995000 |23.023333 |1.001232 | 0.907086 |
| EmberJS-TodoMVC |125.498333 |125.525000 |1.000212 | 0.932546 |
| BackboneJS-TodoMVC |45.700000 |45.975000 |1.006018 | 0.084799 |
| Preact-TodoMVC |16.681667 |16.610000 |0.995704 | 0.722758 |
| AngularJS-TodoMVC |123.753333 |123.740000 |0.999892 | 0.971431 |
| Vanilla-ES2015-TodoMVC |61.255000 |61.380000 |1.002041 | 0.300654 |
| Inferno-TodoMVC |58.646667 |58.948333 |1.005144 | 0.267611 |
| Flight-TodoMVC |73.283333 |72.801667 |0.993427 | 0.207389 |
| Angular2-TypeScript-TodoMVC |39.746667 |40.015000 |1.006751 | 0.449821 |
| VanillaJS-TodoMVC |50.096667 |49.823333 |0.994544 | 0.162020 |
| jQuery-TodoMVC |212.870000 |213.196667 |1.001535 | 0.371944 |
| EmberJS-Debug-TodoMVC |331.878333 |332.710000 |1.002506 | 0.094499 |
| React-TodoMVC |83.078333 |82.726667 |0.995767 | 0.076143 |
| React-Redux-TodoMVC |136.018333 |133.935000 |0.984683 | 0.000000 (significant) |
| Vanilla-ES2015-Babel-Webpack-TodoMVC |59.743333 |59.643333 |0.998326 | 0.393671 |


a mean = 271.75873
b mean = 272.45804
pValue = 0.0263030803
(Bigger means are better.)
1.003 times better
Results ARE significant

  • builtins/BuiltinNames.h:
  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeUseDef.cpp:

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

  • bytecode/LinkTimeConstant.h:
  • bytecode/Opcode.h:

(JSC::isBranch):

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

(JSC::GenericLabel<JSGeneratorTraits>::setLocation):
(JSC::BytecodeGenerator::emitJumpIfSentinelString):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::ForInNode::emitBytecode):

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGOperations.cpp:

(JSC::DFG::putByVal):
(JSC::DFG::putByValInternal):
(JSC::DFG::putByValCellInternal):
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

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

(JSC::DFG::SpeculativeJIT::compileEnumeratorNextUpdatePropertyName):

  • ftl/FTLLowerDFGToB3.cpp:

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

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

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

(JSC::JIT::emit_op_jeq_ptr):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_jeq_ptr):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_enumerator_next):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::JSC_DEFINE_COMMON_SLOW_PATH):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/SmallStrings.cpp:

(JSC::SmallStrings::initializeCommonStrings):
(JSC::SmallStrings::visitStrongReferences):

  • runtime/SmallStrings.h:

(JSC::SmallStrings::sentinelString const):

8:01 PM Changeset in webkit [283094] by Lauro Moura
  • 36 edits in trunk/LayoutTests

[WPE] Rebaseline a number of text-only failures

Unreviewed test gardening.

Most are 1-pixel differences after some recent LFC-related commits.

  • platform/glib/fast/css/getComputedStyle/computed-style-font-family-expected.txt:
  • platform/glib/fast/encoding/charset-replacement-expected.txt:
  • platform/wpe/TestExpectations:
  • platform/wpe/css2.1/t0805-c5518-brdr-t-01-e-expected.txt:
  • platform/wpe/css2.1/t0805-c5519-brdr-r-00-a-expected.txt:
  • platform/wpe/css2.1/t0805-c5519-brdr-r-01-e-expected.txt:
  • platform/wpe/css2.1/t0805-c5520-brdr-b-01-e-expected.txt:
  • platform/wpe/css2.1/t0805-c5521-brdr-l-00-a-expected.txt:
  • platform/wpe/css2.1/t0805-c5521-brdr-l-01-e-expected.txt:
  • platform/wpe/css2.1/t0905-c414-flt-02-c-expected.txt:
  • platform/wpe/css2.1/t0905-c414-flt-03-c-expected.txt:
  • platform/wpe/css2.1/t0905-c414-flt-04-c-expected.txt:
  • platform/wpe/css2.1/t0905-c414-flt-fit-01-d-g-expected.txt:
  • platform/wpe/css2.1/t0905-c5525-fltblck-00-d-ag-expected.txt:
  • platform/wpe/css2.1/t0905-c5525-fltblck-01-d-expected.txt:
  • platform/wpe/css2.1/t0905-c5525-fltcont-00-d-g-expected.txt:
  • platform/wpe/css2.1/t0905-c5525-flthw-00-c-g-expected.txt:
  • platform/wpe/css2.1/t0905-c5525-fltwidth-00-c-g-expected.txt:
  • platform/wpe/css2.1/t0905-c5525-fltwidth-02-c-g-expected.txt:
  • platform/wpe/css2.1/t0905-c5525-fltwidth-03-c-g-expected.txt:
  • platform/wpe/css2.1/t0905-c5525-fltwrap-00-b-expected.txt:
  • platform/wpe/css2.1/t0905-c5526-flthw-00-c-g-expected.txt:
  • platform/wpe/css2.1/t090501-c414-flt-01-b-expected.txt:
  • platform/wpe/css2.1/t100304-c43-rpl-bbx-01-d-g-expected.txt:
  • platform/wpe/css2.1/t1202-counter-04-b-expected.txt:
  • platform/wpe/css2.1/t1202-counter-09-b-expected.txt:
  • platform/wpe/css2.1/t1202-counters-04-b-expected.txt:
  • platform/wpe/css2.1/t1202-counters-09-b-expected.txt:
  • platform/wpe/fast/attachment/attachment-select-on-click-expected.txt:
  • platform/wpe/fast/attachment/attachment-select-on-click-inside-user-select-all-expected.txt:
  • platform/wpe/fast/borders/rtl-border-05-expected.txt:
  • platform/wpe/fast/css/font-face-implicit-local-font-expected.txt:
  • platform/wpe/fast/css/font-face-locally-installed-expected.txt:
  • platform/wpe/fast/css/font-face-opentype-expected.txt:
  • platform/wpe/fast/css/font-face-unicode-range-expected.txt:
7:46 PM Changeset in webkit [283093] by Cameron McCormack
  • 1 edit
    2 deletes in trunk/LayoutTests/imported/w3c

Remove canvas HitRegions tests
https://bugs.webkit.org/show_bug.cgi?id=230809
<rdar://problem/83553485>

Reviewed by Alan Bujtas.

These were removed upstream in
https://github.com/web-platform-tests/wpt/pull/30850.

  • web-platform-tests/html/canvas/element/hit-regions/addHitRegions-NotSupportedError-01-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/hit-regions/addHitRegions-NotSupportedError-01.html: Removed.
  • web-platform-tests/html/canvas/element/hit-regions/hitregions-members-exist-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/hit-regions/hitregions-members-exist.html: Removed.
  • web-platform-tests/html/canvas/element/hit-regions/w3c-import.log: Removed.
  • web-platform-tests/html/canvas/element/manual/hit-regions/addHitRegions-NotSupportedError-01-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/manual/hit-regions/addHitRegions-NotSupportedError-01.html: Removed.
  • web-platform-tests/html/canvas/element/manual/hit-regions/hitregions-members-exist-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/manual/hit-regions/hitregions-members-exist.html: Removed.
  • web-platform-tests/html/canvas/element/manual/hit-regions/w3c-import.log: Removed.
6:28 PM Changeset in webkit [283092] by Lauro Moura
  • 1 edit
    16 adds in trunk/LayoutTests

[GLIB] Update baselines after 242013@main

Unreviewed test gardening.

These tests were updated to use the application bundle ID, which is
not used by the GLIB ports.

  • platform/glib/http/tests/contentextensions/block-private-click-measurement-expected.txt: Added.
  • platform/glib/http/tests/privateClickMeasurement/attribution-conversion-through-cross-site-image-redirect-expected.txt: Added.
  • platform/glib/http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive-expected.txt: Added.
  • platform/glib/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-ephemeral-expected.txt: Added.
  • platform/glib/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority-expected.txt: Added.
  • platform/glib/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority-expected.txt: Added.
  • platform/glib/http/tests/privateClickMeasurement/conversion-disabled-in-ephemeral-session-expected.txt: Added.
  • platform/glib/http/tests/privateClickMeasurement/private-click-measurement-with-source-nonce-null-content-expected.txt: Added.
  • platform/glib/http/tests/privateClickMeasurement/private-click-measurement-with-source-nonce-wrong-content-type-expected.txt: Added.
  • platform/glib/http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority-expected.txt: Added.
  • platform/glib/http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority-expected.txt: Added.
  • platform/glib/http/tests/privateClickMeasurement/second-conversion-with-higher-priority-expected.txt: Added.
  • platform/glib/http/tests/privateClickMeasurement/second-conversion-with-lower-priority-expected.txt: Added.
  • platform/glib/http/tests/privateClickMeasurement/store-private-click-measurement-expected.txt: Added.
2:38 PM Changeset in webkit [283091] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Catalina Debug wk1 EWS ] media/modern-media-controls/media-controls/media-controls-placard-compressed-metrics.html is a flay crash.
https://bugs.webkit.org/show_bug.cgi?id=230808.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
2:23 PM Changeset in webkit [283090] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ Catalina Debug wk1 EWS ] Media tests flakily crashing.
https://bugs.webkit.org/show_bug.cgi?id=230807.

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
2:20 PM Changeset in webkit [283089] by commit-queue@webkit.org
  • 104 edits
    2 deletes in trunk

Unreviewed, reverting r283083 and r283088.
https://bugs.webkit.org/show_bug.cgi?id=230806

Windows pors are crashing

Reverted changesets:

"Build an unlinked baseline JIT"
https://bugs.webkit.org/show_bug.cgi?id=229223
https://commits.webkit.org/r283083

"Make byte codes with arithmetic profiles switch to using an
index instead of a pointer in metadata"
https://bugs.webkit.org/show_bug.cgi?id=230798
https://commits.webkit.org/r283088

10:23 AM Changeset in webkit [283088] by sbarati@apple.com
  • 15 edits in trunk/Source/JavaScriptCore

Make byte codes with arithmetic profiles switch to using an index instead of a pointer in metadata
https://bugs.webkit.org/show_bug.cgi?id=230798

Reviewed by Yusuke Suzuki.

This patch makes each bytecode that uses a BinaryArithProfile/UnaryArithProfile
have an index into a table instead of storing a pointer to the profile in its metadata.
Then, we can just load the profile using the index in the bytecode, which saves memory.

  • bytecode/BytecodeList.rb:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::binaryArithProfileForPC):
(JSC::CodeBlock::unaryArithProfileForPC):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::allocateSharedProfiles):

  • bytecode/UnlinkedCodeBlock.h:
  • bytecode/UnlinkedCodeBlockGenerator.cpp:

(JSC::UnlinkedCodeBlockGenerator::finalize):

  • bytecode/UnlinkedCodeBlockGenerator.h:

(JSC::UnlinkedCodeBlockGenerator::addBinaryArithProfile):
(JSC::UnlinkedCodeBlockGenerator::addUnaryArithProfile):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitUnaryOp):
(JSC::BytecodeGenerator::emitInc):
(JSC::BytecodeGenerator::emitDec):

  • bytecompiler/BytecodeGenerator.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_op_negate):
(JSC::JIT::emit_op_add):
(JSC::JIT::emit_op_div):
(JSC::JIT::emit_op_mul):
(JSC::JIT::emit_op_sub):

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

(JSC::updateArithProfileForUnaryArithOp):
(JSC::JSC_DEFINE_COMMON_SLOW_PATH):

6:47 AM Changeset in webkit [283087] by Antti Koivisto
  • 3 edits
    2 adds in trunk

Line iterator firstRun/lastRun may return runs from wrong lines
https://bugs.webkit.org/show_bug.cgi?id=230770
<rdar://problem/83509753>

Reviewed by Alan Bujtas.

Source/WebCore:

In some situation line iterator firstRun/lastRun could return runs from different lines.
This could lead to inconsistencies like firstRun being non-null while lastRun is null.

Test: editing/iterator-line-start-end.html

  • layout/integration/LayoutIntegrationLineIteratorModernPath.h:

(WebCore::LayoutIntegration::LineIteratorModernPath::firstRun const):
(WebCore::LayoutIntegration::LineIteratorModernPath::lastRun const):

Take care to only return runs from this line.

LayoutTests:

  • editing/iterator-line-start-end-expected.txt: Added.
  • editing/iterator-line-start-end.html: Added.
Note: See TracTimeline for information about the timeline view.