Timeline



Feb 3, 2022:

11:16 PM Changeset in webkit [289106] by Chris Lord
  • 15 edits
    5 adds in trunk/Source/WebCore

[GTK][WPE] Use dmabuf when possible to transfer ANGLE rendering to the compositor
https://bugs.webkit.org/show_bug.cgi?id=235946

Reviewed by Žan Doberšek.

Use dmabuf when available to transfer ANGLE WebGL rendering contents
to the compositor.

No new tests, no change in behaviour.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • platform/TextureMapper.cmake:
  • platform/graphics/OpenGLShims.cpp:

(WebCore::initializeOpenGLShims):

  • platform/graphics/OpenGLShims.h:
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::prepareTextureImpl):

  • platform/graphics/angle/GraphicsContextGLANGLE.h:
  • platform/graphics/egl/GLContextEGL.cpp:

(WebCore::GLContextEGL::GLContextEGL):
(WebCore::GLContextEGL::createImage const):
(WebCore::GLContextEGL::destroyImage const):

  • platform/graphics/egl/GLContextEGL.h:
  • platform/graphics/gbm/GBMDevice.cpp: Added.

(WebCore::threadSpecificDevice):
(WebCore::GBMDevice::get):
(WebCore::GBMDevice::GBMDevice):
(WebCore::GBMDevice::~GBMDevice):

  • platform/graphics/gbm/GBMDevice.h: Added.

(WebCore::GBMDevice::device const):

  • platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.cpp:

(Nicosia::GCGLANGLEPipeSource::swapBuffersIfNeeded):

  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::EGLImageBacking):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::~EGLImageBacking):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::format const):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::stride const):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::releaseResources):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::reset):
(WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLANGLE::reshapeDisplayBufferBacking):

  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:

(WebCore::TextureMapperPlatformLayerBuffer::textureVariant const):
(WebCore::TextureMapperPlatformLayerBuffer::size const):
(WebCore::TextureMapperPlatformLayerBuffer::textureVariant): Deleted.

  • platform/graphics/texmap/TextureMapperPlatformLayerDmabuf.cpp: Added.

(WebCore::createFourCC):
(WebCore::fourCCToGLFormat):
(WebCore::formatHasAlpha):
(WebCore::TextureMapperPlatformLayerDmabuf::TextureMapperPlatformLayerDmabuf):
(WebCore::m_fd):
(WebCore::TextureMapperPlatformLayerDmabuf::~TextureMapperPlatformLayerDmabuf):
(WebCore::TextureMapperPlatformLayerDmabuf::validateTexture):
(WebCore::TextureMapperPlatformLayerDmabuf::paintToTextureMapper):
(WebCore::TextureMapperPlatformLayerDmabuf::clone):

  • platform/graphics/texmap/TextureMapperPlatformLayerDmabuf.h: Added.
10:58 PM Changeset in webkit [289105] by jonlee@apple.com
  • 16 edits in trunk/LayoutTests/imported/w3c

Pull selective WPT tests in preparation of https://bugs.webkit.org/show_bug.cgi?id=235685

These remove the empty <meta name="flags">.

  • web-platform-tests/css/css-flexbox/align-content-001.htm:
  • web-platform-tests/css/css-flexbox/align-content-002.htm:
  • web-platform-tests/css/css-flexbox/align-content-003.htm:
  • web-platform-tests/css/css-flexbox/align-content-004.htm:
  • web-platform-tests/css/css-flexbox/align-content-005.htm:
  • web-platform-tests/css/css-flexbox/align-items-001.htm:
  • web-platform-tests/css/css-flexbox/align-items-002.htm:
  • web-platform-tests/css/css-flexbox/align-items-003.htm:
  • web-platform-tests/css/css-text/white-space/white-space-intrinsic-size-017.html:
  • web-platform-tests/css/css-text/white-space/white-space-intrinsic-size-018.html:
  • web-platform-tests/css/css-values/angle-units-002.html:
  • web-platform-tests/css/css-values/angle-units-003.html:
  • web-platform-tests/css/css-values/angle-units-004.html:
  • web-platform-tests/css/css-values/angle-units-005.html:

Convert tabs to spaces.

  • web-platform-tests/css/css-variables/vars-background-shorthand-001.html:
10:37 PM Changeset in webkit [289104] by rniwa@webkit.org
  • 14 edits in trunk/Source

Delete SelectionAcrossShadowBoundariesEnabled
https://bugs.webkit.org/show_bug.cgi?id=235993

Reviewed by Darin Adler.

Source/WebCore:

Delete this runtime flag which has always been enabled for a while.

  • editing/Editor.cpp:

(WebCore::Editor::selectedText const):
(WebCore::Editor::selectedTextForDataTransfer const):

  • editing/VisibleSelection.cpp:

(WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):

  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::selectionInHTMLFormat):

  • editing/gtk/EditorGtk.cpp:

(WebCore::Editor::writeSelectionToPasteboard):

  • editing/libwpe/EditorLibWPE.cpp:

(WebCore::Editor::writeSelectionToPasteboard):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::writeImageToPasteboard):

  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::createFromSelection):

Source/WebKitLegacy/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(-[WebPreferences keygenElementEnabled]):
(-[WebPreferences selectionAcrossShadowBoundariesEnabled]):
(-[WebPreferences setSelectionAcrossShadowBoundariesEnabled:]):
(-[WebPreferences isXSSAuditorEnabled]):

  • WebView/WebPreferencesPrivate.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml:
10:35 PM Changeset in webkit [289103] by Megan Gardner
  • 4 edits in trunk/Source/WebKit

Plumb pointer type though native to web events.
https://bugs.webkit.org/show_bug.cgi?id=236118

Reviewed by Tim Horton.

  • Shared/NativeWebMouseEvent.h:
  • Shared/ios/NativeWebMouseEventIOS.mm:

(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):

  • UIProcess/ios/WKMouseGestureRecognizer.mm:

(-[WKMouseGestureRecognizer createMouseEventWithType:wasCancelled:]):

7:13 PM Changeset in webkit [289102] by Megan Gardner
  • 2 edits in trunk/Source/WebCore

Add pen type for HitTestRequest.
https://bugs.webkit.org/show_bug.cgi?id=236112

Reviewed by Tim Horton.

  • rendering/HitTestRequest.h:

(WebCore::HitTestRequest::mouseEvent const):
(WebCore::HitTestRequest::penEvent const):

6:53 PM Changeset in webkit [289101] by mmaxfield@apple.com
  • 5 edits
    7 adds in trunk

Two bopomofo tone marks are not moved to the correct place in vertical text with a particular bopomofo font
https://bugs.webkit.org/show_bug.cgi?id=235257
<rdar://problem/87625596>

Reviewed by Darin Adler.

.:

Thank you so much to Bobby Tung and But Ko for reporting this bug and providing a test font for it!!!

  • metadata/contributors.json:

Source/WebCore:

Turns out one of our character data tables was missing some characters.

I really dislike these kinds of fixes, because it's just perpetuating the fact that WebKit has big tables of characters
in its source code. A long-term fix would be a systemic replacement of this entire table with either Unicode property
lookup, or more ideally, removing the need for it in the first place. Unfortunately, at this point in the release cycle,
this fix probably needs to be smaller and more targetted.

Tests: fast/text/bopomofo-tone-marks-2.html

fast/text/bopomofo-tone-marks.html

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::isCJKIdeographOrSymbol):

LayoutTests:

This can't be a WPT test because we only have permission to add the test font to the WebKit repository.

Thank you so much to Bobby Tung and But Ko for reporting this bug and providing a test font for it!!!

  • fast/text/bopomofo-tone-marks-2-expected-mismatch.html: Added.
  • fast/text/bopomofo-tone-marks-2.html: Added.
  • fast/text/bopomofo-tone-marks-expected-mismatch.html: Added.
  • fast/text/bopomofo-tone-marks.html: Added.
  • fast/text/resources/BopomofoGposSubset-Regular/BopomofoGposSubset-Regular.ttf: Added.
  • fast/text/resources/BopomofoGposSubset-Regular/LICENSE: Added.
6:45 PM Changeset in webkit [289100] by Wenson Hsieh
  • 12 edits in trunk/Source

Teach VideoFullscreenInterface to keep track of its corresponding MediaPlayer's MediaPlayerIdentifier
https://bugs.webkit.org/show_bug.cgi?id=236090

Reviewed by Eric Carlson.

Source/WebCore:

Add plumbing for an optional MediaPlayerIdentifier through the video fullscreen model. This identifier is
invalidated upon loadstart, and updated once we observe loadedmetadata, which ensures that if the media
engine (and media player) changes out from underneath the video fullscreen model, we still keep the new player
ID up to date.

See WebKit/ChangeLog for more details.

  • platform/cocoa/VideoFullscreenModel.h:

(WebCore::VideoFullscreenModelClient::setPlayerIdentifier):

  • platform/cocoa/VideoFullscreenModelVideoElement.h:
  • platform/cocoa/VideoFullscreenModelVideoElement.mm:

(WebCore::VideoFullscreenModelVideoElement::updateForEventName):
(WebCore::VideoFullscreenModelVideoElement::observedEventNames):

Additionally listen for loadstartEvent and loadedmetadataEvent (see above).

(WebCore::VideoFullscreenModelVideoElement::setPlayerIdentifier):

  • platform/ios/VideoFullscreenInterfaceAVKit.h:
  • platform/mac/VideoFullscreenInterfaceMac.h:

(WebCore::VideoFullscreenInterfaceMac::playerIdentifier const):

Source/WebKit:

Add an IPC message between VideoFullscreenManager and VideoFullscreenManagerProxy to update the media player ID
corresponding to a given PlaybackSessionContextIdentifier. This is sent if the underlying media player changes
(and subsequently fires loadstart and loadedmetadata events), and also sent upon entering fullscreen video.

In a future patch, this mechanism will be used to teach VideoFullscreenManagerProxy to grab an image bitmap from
the GPU process for a given PlaybackSessionContextIdentifier.

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:

(WebKit::VideoFullscreenManagerProxy::setPlayerIdentifier):

  • WebProcess/cocoa/VideoFullscreenManager.h:
  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::VideoFullscreenInterfaceContext::setPlayerIdentifier):
(WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):
(WebKit::VideoFullscreenManager::setPlayerIdentifier):

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

Unreviewed, reverting r289096.
https://bugs.webkit.org/show_bug.cgi?id=236114

will break build

Reverted changeset:

"[WebAuthn] Remove misspelled constant
"LocalAuthenticatiorAccessGroup""
https://bugs.webkit.org/show_bug.cgi?id=235894
https://commits.webkit.org/r289096

6:24 PM Changeset in webkit [289098] by Alan Bujtas
  • 6 edits
    2 adds in trunk

[RenderTreeBuilder] Clean up column spanners when style change affects containing block
https://bugs.webkit.org/show_bug.cgi?id=236042
<rdar://83975391>

Reviewed by Antti Koivisto.

Source/WebCore:

In addition to removing the leftover spanners after style change, this patch also expands on the type of style changes that may affect the subtree state inside a multicolumn flow.

Test: fast/multicol/leftover-spanner-on-style-change-crash.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::styleDidChange):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::setStyle):
(WebCore::RenderElement::adjustFragmentedFlowStateOnContainingBlockChangeIfNeeded):

  • rendering/RenderElement.h:
  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::normalizeTreeAfterStyleChange):

LayoutTests:

  • fast/multicol/leftover-spanner-on-style-change-crash-expected.txt: Added.
  • fast/multicol/leftover-spanner-on-style-change-crash.html: Added.
6:22 PM Changeset in webkit [289097] by Tyler Wilcock
  • 3 edits in trunk/Source/WebCore

AXIsolatedTree::updateChildren removes subtrees that should instead be moved
https://bugs.webkit.org/show_bug.cgi?id=236057

Reviewed by Andres Gonzalez.

In AXIsolatedTree::updateChildren, we can sometimes remove subtrees from the nodemap that are
queued to be added somewhere else in the tree. Specifically, this can happen when:

  1. Object 123 is considered to be a new child based on the live AX tree, and we collect node changes for it.
  2. Object 123 is currently a member of a subtree of some other object in oldChildrenIDs.
  3. Because of 2, Object 123 is removed from the node map in removeSubtreeFromNodeMap
  4. We try to queue the addition of this node somewhere in tree in queueChange, but ASSERT because Object 123 is not in the nodemap anymore.

This causes us to hit ASSERT(m_nodeMap.contains(objectID) in AXIsolatedTree::queueChange(const NodeChange&).

This patch fixes this problem by keeping track of the IDs we are queuing for addition
to the tree and making sure we don't remove those IDs.

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::queueChange):
(WebCore::AXIsolatedTree::collectNodeChangesForSubtree):
(WebCore::AXIsolatedTree::nodeAncestryChanges):
Keep track of IDs we are queueing changes for.
(WebCore::AXIsolatedTree::updateChildren):
Keep track of IDs we are queueing changes for and don't remove them,
even if they are part of oldChildrenIDs.
(WebCore::AXIsolatedTree::removeSubtreeFromNodeMap):

  • accessibility/isolatedtree/AXIsolatedTree.h:

(WebCore::AXIsolatedTree::removeSubtreeFromNodeMap):
Accept another paramter listing IDs to keep.
(WebCore::AXIsolatedTree::collectNodeChangesForSubtree):
Keep track of IDs we are queueing changes for.

6:09 PM Changeset in webkit [289096] by J Pascoe
  • 2 edits in trunk/Source/WebCore

[WebAuthn] Remove misspelled constant "LocalAuthenticatiorAccessGroup"
https://bugs.webkit.org/show_bug.cgi?id=235894
rdar://88104045

Reviewed by Darin Adler.

This change removes a constant with a misspelled variable name after all
downstream usage is removed.

  • Modules/webauthn/WebAuthenticationConstants.h:
5:41 PM Changeset in webkit [289095] by Russell Epstein
  • 1 copy in tags/Safari-613.1.14.5.8

Tag Safari-613.1.14.5.8.

5:40 PM Changeset in webkit [289094] by Russell Epstein
  • 20 edits in branches/safari-613.1.14.5-branch/Source

Cherry-pick r289091. rdar://problem/88387438

WebKit projects have incorrect install name for the frameworks for Catalyst builds with the system content path
https://bugs.webkit.org/show_bug.cgi?id=236105

Reviewed by Saam Barati.

Source/JavaScriptCore:

Updated DYLIB_INSTALL_NAME_BASE for Catalyst builds to use JAVASCRIPTCORE_FRAMEWORKS_DIR, which doesn't have the
system content path prefix.

  • Configurations/JavaScriptCore.xcconfig:

Source/ThirdParty/ANGLE:

Updated DYLIB_INSTALL_NAME_BASE for Catalyst builds to not use the system content path prefix.

  • Configurations/ANGLE-dynamic.xcconfig:

Source/ThirdParty/libwebrtc:

Updated DYLIB_INSTALL_NAME_BASE for Catalyst builds to not use the system content path prefix.

  • Configurations/libwebrtc.xcconfig:

Source/WebCore:

Added WK_USE_ALTERNATE_FRAMEWORKS_DIR based computation to the WEBCORE_FRAMEWORKS_DIR production.
This allowed the simplification of NORMAL_PRODUCTION_FRAMEWORKS_DIR.
Changed DYLIB_INSTALL_NAME_BASE_PLATFORM for Catalyst builds to use WEBCORE_FRAMEWORKS_DIR.

  • Configurations/WebCore.xcconfig:

Source/WebKit:

Refactored build variable computation so that WEBKIT_FRAMEWORKS_DIR doesn't have the system content path
prepended. This refactoring includes:

  • Created INSTALL_PATH_PREFIX to have the system content path when in use.
  • Changed WEBKIT_FRAMEWORKS_DIR computation to eliminate the inclusion the SYSTEM_CONTENT_PATH.
  • Added INSTALL_PATH_PREFIX to the various INSTALL_PATH computations.
  • Changed the various DYLIB_INSTALL_NAME_BASE computations for Catalyst builds to use WEBKIT_FRAMEWORKS_DIR.
  • Configurations/Base.xcconfig:
  • Configurations/BaseTarget.xcconfig:
  • Configurations/BaseXPCService.xcconfig:
  • Configurations/Shim.xcconfig:
  • Configurations/WebKit.xcconfig:
  • Configurations/WebKitSwift.xcconfig:
  • Configurations/adattributiond.xcconfig:
  • Configurations/webpushd.xcconfig:

Source/WebKitLegacy/mac:

Refactored build variable computation so that WEBKIT_LEGACY_FRAMEWORKS_DIR doesn't have the system content path
prepended. This refactoring includes:

  • Created INSTALL_PATH_PREFIX to have the system content path when in use.
  • Changed WEBKIT_LEGACY_FRAMEWORKS_DIR computation to eliminate the inclusion the SYSTEM_CONTENT_PATH.
  • Reworked INSTALL_PATH to use INSTALL_PATH_PREFIX in the main productions instead of each of variants.
  • Changed DYLIB_INSTALL_NAME_BASE computation for Catalyst builds to use WEBKIT_LEGACY_FRAMEWORKS_DIR.
  • Configurations/Base.xcconfig:
  • Configurations/WebKitLegacy.xcconfig:

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

5:32 PM Changeset in webkit [289093] by Elliott Williams
  • 7 edits in trunk/Tools

[XCBuild] Add headers-only dependencies to projects in Tools/
https://bugs.webkit.org/show_bug.cgi?id=235751

Reviewed by Alexey Proskuryakov.

Many projects in Tools/ depend on WebKit.framework or other products which are upstream in
the build graph. In Make-based sequential builds, WebKit and friends would always build
before Tools; in workspaces, the targets may build in any order.

Add "product dependencies" build phases to targets which do not express
their dependencies through linker options, in the same manner as
https://commits.webkit.org/246026@main.

The legacy build system doesn't understand the "Product Dependencies" phase and thinks we're
trying to copy our own build products, so add an EXCLUDED_SOURCE_FILE_NAMES setting as a
workaround.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Add product dependencies.
  • DumpRenderTree/mac/Configurations/Base.xcconfig: Add WK_WHICH_BUILD_SYSTEM.
  • DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig: Legacy support.
  • TestWebKitAPI/Configurations/Base.xcconfig: Legacy support.
  • TestWebKitAPI/Configurations/TestWTFLibrary.xcconfig: Add WK_WHICH_BUILD_SYSTEM.
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add product dependencies.
5:27 PM Changeset in webkit [289092] by Russell Epstein
  • 9 edits in branches/safari-613.1.14.5-branch/Source

Versioning.

WebKit-7613.1.14.5.8

5:16 PM Changeset in webkit [289091] by msaboff@apple.com
  • 20 edits in trunk/Source

WebKit projects have incorrect install name for the frameworks for Catalyst builds with the system content path
https://bugs.webkit.org/show_bug.cgi?id=236105

Reviewed by Saam Barati.

Source/JavaScriptCore:

Updated DYLIB_INSTALL_NAME_BASE for Catalyst builds to use JAVASCRIPTCORE_FRAMEWORKS_DIR, which doesn't have the
system content path prefix.

  • Configurations/JavaScriptCore.xcconfig:

Source/ThirdParty/ANGLE:

Updated DYLIB_INSTALL_NAME_BASE for Catalyst builds to not use the system content path prefix.

  • Configurations/ANGLE-dynamic.xcconfig:

Source/ThirdParty/libwebrtc:

Updated DYLIB_INSTALL_NAME_BASE for Catalyst builds to not use the system content path prefix.

  • Configurations/libwebrtc.xcconfig:

Source/WebCore:

Added WK_USE_ALTERNATE_FRAMEWORKS_DIR based computation to the WEBCORE_FRAMEWORKS_DIR production.
This allowed the simplification of NORMAL_PRODUCTION_FRAMEWORKS_DIR.
Changed DYLIB_INSTALL_NAME_BASE_PLATFORM for Catalyst builds to use WEBCORE_FRAMEWORKS_DIR.

  • Configurations/WebCore.xcconfig:

Source/WebKit:

Refactored build variable computation so that WEBKIT_FRAMEWORKS_DIR doesn't have the system content path
prepended. This refactoring includes:

  • Created INSTALL_PATH_PREFIX to have the system content path when in use.
  • Changed WEBKIT_FRAMEWORKS_DIR computation to eliminate the inclusion the SYSTEM_CONTENT_PATH.
  • Added INSTALL_PATH_PREFIX to the various INSTALL_PATH computations.
  • Changed the various DYLIB_INSTALL_NAME_BASE computations for Catalyst builds to use WEBKIT_FRAMEWORKS_DIR.
  • Configurations/Base.xcconfig:
  • Configurations/BaseTarget.xcconfig:
  • Configurations/BaseXPCService.xcconfig:
  • Configurations/Shim.xcconfig:
  • Configurations/WebKit.xcconfig:
  • Configurations/WebKitSwift.xcconfig:
  • Configurations/adattributiond.xcconfig:
  • Configurations/webpushd.xcconfig:

Source/WebKitLegacy/mac:

Refactored build variable computation so that WEBKIT_LEGACY_FRAMEWORKS_DIR doesn't have the system content path
prepended. This refactoring includes:

  • Created INSTALL_PATH_PREFIX to have the system content path when in use.
  • Changed WEBKIT_LEGACY_FRAMEWORKS_DIR computation to eliminate the inclusion the SYSTEM_CONTENT_PATH.
  • Reworked INSTALL_PATH to use INSTALL_PATH_PREFIX in the main productions instead of each of variants.
  • Changed DYLIB_INSTALL_NAME_BASE computation for Catalyst builds to use WEBKIT_LEGACY_FRAMEWORKS_DIR.
  • Configurations/Base.xcconfig:
  • Configurations/WebKitLegacy.xcconfig:
5:06 PM Changeset in webkit [289090] by Wenson Hsieh
  • 9 edits
    1 move in trunk/Source/WebKit

Add plumbing to inform WebPageProxy when videos play, pause, seek, and enter or exit fullscreen
https://bugs.webkit.org/show_bug.cgi?id=236083

Reviewed by Eric Carlson.

Add several methods on WebPageProxy which are called from both VideoFullscreenManagerProxy as well as
PlaybackSessionManagerProxy; in future patches, these will be used to detect when a fullscreen video has been
paused for at least 250 ms, and call out to the page client to perform "video frame extraction".

No change in behavior (yet).

  • Shared/Cocoa/PlaybackSessionContextIdentifier.h: Renamed from Source/WebKit/WebProcess/cocoa/PlaybackSessionContextIdentifier.h.

Move this from Source/WebKit/WebProcess/cocoa to Shared/Cocoa. This enum type is passed around in media code in
both the UI and web processes, so it should be in the Shared folder instead of the WebProcess folder.

  • UIProcess/Cocoa/PlaybackSessionManagerProxy.h:
  • UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:

(WebKit::PlaybackSessionManagerProxy::currentTimeChanged):
(WebKit::PlaybackSessionManagerProxy::rateChanged):
(WebKit::PlaybackSessionManagerProxy::isPaused const):

Add a helper method to return whether or not the session for a given PlaybackSessionContextIdentifier is paused
(that is, neither playing nor stalled).

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.h:

Drive-by fix: remove an unused member variable.

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:

(WebKit::VideoFullscreenManagerProxy::didExitFullscreen):
(WebKit::VideoFullscreenManagerProxy::didEnterFullscreen):

Add another version of these methods that includes the session context ID as an argument.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::didChangePlaybackRate):
(WebKit::WebPageProxy::didChangeCurrentTime):
(WebKit::WebPageProxy::updateFullscreenVideoExtraction):
(WebKit::WebPageProxy::fullscreenVideoExtractionTimerFired):

  • UIProcess/WebPageProxy.cpp:

(WebKit::m_fullscreenVideoExtractionTimer):
(WebKit::WebPageProxy::didEnterFullscreen):
(WebKit::WebPageProxy::didExitFullscreen):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::m_notificationManagerMessageHandler): Deleted.

  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
4:35 PM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
4:22 PM Changeset in webkit [289089] by Jonathan Bedard
  • 3 edits in trunk/Tools

[EWS] Rename RunJSCTestsWithoutPatch
https://bugs.webkit.org/show_bug.cgi?id=236106
<rdar://problem/88457767>

Reviewed by Alexey Proskuryakov.

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

(RunJavaScriptCoreTests.evaluateCommand):
(RunJSCTestsWithoutChange): Renamed from RunJSCTestsWithoutPatch.
(RunJSCTestsWithoutPatch): Renamed to RunJSCTestsWithoutChange.

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

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

3:47 PM Changeset in webkit [289088] by Adrian Perez de Castro
  • 26 edits in releases/WebKitGTK/webkit-2.34

Merge r286094 - Report the initiating url instead of the redirected one
https://bugs.webkit.org/show_bug.cgi?id=233037

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-11-20
Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/content-security-policy/securitypolicyviolation/img-src-redirect.sub-expected.txt:

Source/WebCore:

As per the spec, blockedURI should use the requested URL of original request instead of redirected location.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::isAllowedByContentSecurityPolicy):

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::willSendRequestInternal):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const):
(WebCore::CachedResourceLoader::canRequestAfterRedirection const):
(WebCore::CachedResourceLoader::updateRequestAfterRedirection):

  • loader/cache/CachedResourceLoader.h:
  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allowChildContextFromSource const):
(WebCore::ContentSecurityPolicy::allowScriptFromSource const):
(WebCore::ContentSecurityPolicy::allowImageFromSource const):
(WebCore::ContentSecurityPolicy::allowStyleFromSource const):
(WebCore::ContentSecurityPolicy::allowFontFromSource const):
(WebCore::ContentSecurityPolicy::allowManifestFromSource const):
(WebCore::ContentSecurityPolicy::allowMediaFromSource const):

  • page/csp/ContentSecurityPolicy.h:

Source/WebKit:

Pass pre-redirect URL to allowChildContextFromSource() and allowScriptFromSource().

  • NetworkProcess/NetworkLoadChecker.cpp:

(WebKit::NetworkLoadChecker::isAllowedByContentSecurityPolicy):

LayoutTests:

  • TestExpectations: Unskip imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/img-src-redirect.sub.html
  • http/tests/security/contentSecurityPolicy/1.1/child-src/worker-redirect-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/audio-redirect-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/font-redirect-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/image-redirect-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/script-redirect-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/stylesheet-redirect-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/svg-font-redirect-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/svg-image-redirect-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/track-redirect-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/video-redirect-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/worker-blob-inherits-csp-importScripts-redirect-cross-origin-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/worker-csp-importScripts-redirect-cross-origin-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/xsl-redirect-blocked-expected.txt:
3:46 PM Changeset in webkit [289087] by Adrian Perez de Castro
  • 8 edits
    2 adds in releases/WebKitGTK/webkit-2.34

Merge r285320 - Form action with a redirect should report correct blocked URI
https://bugs.webkit.org/show_bug.cgi?id=232660
<rdar://problem/84969024>

Patch by Kate Cheney <Kate Cheney> on 2021-11-04
Reviewed by Brent Fulgham.

Source/WebCore:

We currently report the blocked URI as the target of a redirect, per
the spec it should actually be the initiating url.

Test: http/tests/security/contentSecurityPolicy/form-action-redirect-with-correct-blocked-uri.html

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::willSendRequest):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::checkIfFormActionAllowedByCSP const):

  • loader/FrameLoader.h:
  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allowResourceFromSource const):
(WebCore::ContentSecurityPolicy::allowFormAction const):

  • page/csp/ContentSecurityPolicy.h:

LayoutTests:

  • http/tests/security/contentSecurityPolicy/form-action-redirect-with-correct-blocked-uri-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/form-action-redirect-with-correct-blocked-uri.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/form-action-src-redirect-blocked-expected.txt:

Update console logging to report the correct URL.

3:45 PM Changeset in webkit [289086] by jonlee@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening.

  • gpu-process/TestExpectations: Tests are no longer crashing.
3:27 PM Changeset in webkit [289085] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] MultiDeleteByOffset should not define value
https://bugs.webkit.org/show_bug.cgi?id=236103

Reviewed by Saam Barati.

MultiDeleteByOffset should not define any values in clobberizing.

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

3:21 PM Changeset in webkit [289084] by Elliott Williams
  • 2 edits in trunk

Add Elliott Williams to contributors.json

3:14 PM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
3:14 PM Changeset in webkit [289083] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.34/Source/WebKit

Merge r288809 - REGRESSION(r288644): [GTK4] Criticals when using pinch zoom
https://bugs.webkit.org/show_bug.cgi?id=235883

Reviewed by Carlos Garcia Campos.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseZoomBegin):
Only cancel the click gesture on GTK3. We don't use g_object_set_data() on GTK4.

3:13 PM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
3:13 PM Changeset in webkit [289082] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.34/Source/WebKit

Merge r288644 - [GTK3] Pinch zooming from a link activates it
https://bugs.webkit.org/show_bug.cgi?id=235639

Reviewed by Carlos Garcia Campos.

Turns out gestures behave differently between GTK3 and 4. On GTK4 it works
fine, but on GTK3 starting a pinch zoom triggers the multipress gesture
when one finger is down, and completes it when the second finger is down.

This results in a bogus click, with no way to prevent it as it happens
before any of the zoom callbacks are called. Since we can't know if there
will be a zoom afterwards or not, we can't do anything about it.

However, what we can do is reorder these gestures. In GTK3 the order the
gestures are processed in depends on which order they were created in.

At that point, there's a problem with the fact the gestures are grouped.
Grouping means that these 2 gestures are triggered at the same time. While
somehow the press gesture is still triggered without grouping with the
original order, they become properly decoupled in reverse order and
ungrouped.

At that point, we can safely cancel the press gesture when the zoom gesture
starts, and fix the issue.

This seems to still work fine for GTK4.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseZoomBegin):
(webkitWebViewBaseConstructed):

3:09 PM Changeset in webkit [289081] by sihui_liu@apple.com
  • 5 edits in trunk/Source

Delay writing origin file in NetworkStorageManager
https://bugs.webkit.org/show_bug.cgi?id=235897
rdar://87163253

Reviewed by Geoffrey Garen.

Revert r288924 that delays writing origin file to when OriginStorageManager is destroyed, and take a different
approach that schedules a async task to write origin file. PLT results show that the new approach can also make
up for PLT regresion caused by r286936, where network process started to write origin file before replying sync
storage message from web process.

  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::NetworkStorageManager::localOriginStorageManager):

  • NetworkProcess/storage/OriginStorageManager.cpp:

(WebKit::OriginStorageManager::OriginStorageManager):
(WebKit::OriginStorageManager::~OriginStorageManager): Deleted.

  • NetworkProcess/storage/OriginStorageManager.h:
3:09 PM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
2:27 PM Changeset in webkit [289080] by Adrian Perez de Castro
  • 9 edits in releases/WebKitGTK/webkit-2.34

Merge r288609 - [GTK] REGRESSION: Touch scrolling is broken
https://bugs.webkit.org/show_bug.cgi?id=235436

Reviewed by Chris Lord.

Source/WebKit:

Remove webkitWebViewBaseSetWheelHasPreciseDeltas(), instead add a parameter
to webkitWebViewBaseSynthesizeWheelEvent() that specifies whether the event
should have precise deltas or not.

Correct the touch swipe velocity, since it won't get multiplied by
pixelsPerLineStep().

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::navigationGestureDidBegin):

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseZoomBegin):
(webkitWebViewBaseTouchDragBegin):
(webkitWebViewBaseTouchDragUpdate):
(webkitWebViewBaseTouchSwipe):
(webkitWebViewBaseSynthesizeWheelEvent):
(webkitWebViewBaseSetWheelHasPreciseDeltas): Deleted.

  • UIProcess/API/gtk/WebKitWebViewBaseInternal.h:
  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:

(WebKit::WebAutomationSession::platformSimulateWheelInteraction):

Tools:

Stop using webkitWebViewBaseSetWheelHasPreciseDeltas(), instead pass the correct parameter into
webkitWebViewBaseSynthesizeWheelEvent().

  • WebKitTestRunner/EventSenderProxy.h:
  • WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:

(WTR::EventSenderProxy::~EventSenderProxy):
(WTR::EventSenderProxy::mouseScrollBy):
(WTR::EventSenderProxy::continuousMouseScrollBy):
(WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases):
(WTR::EventSenderProxy::setWheelHasPreciseDeltas):

2:27 PM Changeset in webkit [289079] by Adrian Perez de Castro
  • 12 edits in releases/WebKitGTK/webkit-2.34

Merge r282952 - [GTK] Allow sending precise mouse wheel events in LayoutTests
https://bugs.webkit.org/show_bug.cgi?id=230541

Reviewed by Tim Horton.

Source/WebKit:

Add code to be able to send precise synthetic mouse-wheel events in GTK.

  • Shared/NativeWebWheelEvent.h:
  • Shared/gtk/NativeWebWheelEventGtk.cpp:

(WebKit::NativeWebWheelEvent::NativeWebWheelEvent):

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseSynthesizeWheelEvent):
(webkitWebViewBaseSetWheelHasPreciseDeltas):

  • UIProcess/API/gtk/WebKitWebViewBaseInternal.h:

Tools:

Add API to be able to send precise mouse-wheel events in EventSender.

  • WebKitTestRunner/EventSenderProxy.h:
  • WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
  • WebKitTestRunner/InjectedBundle/EventSendingController.cpp:

(WTR::EventSendingController::setWheelHasPreciseDeltas):

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

(WTR::TestController::didReceiveMessageFromInjectedBundle):

  • WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:

(WTR::toWebKitGLibAPI):
(WTR::EventSenderProxy::~EventSenderProxy):
(WTR::EventSenderProxy::setWheelHasPreciseDeltas):

2:12 PM Changeset in webkit [289078] by Ben Nham
  • 2 edits in trunk/Source/WebCore

LocalStorage values should be 8-bit strings in memory if possible
https://bugs.webkit.org/show_bug.cgi?id=235484

Reviewed by Chris Dumez.

LocalStorage values are stored into a SQLite column as 16-bit strings and are deserialized
back into memory as 16-bit strings. To save memory, this makes it so that we deserialize the
string into an 8-bit string in memory if possible.

Estimated win of ~3MB on Membuster5.

  • platform/sql/SQLiteStatement.cpp:

(WebCore::SQLiteStatement::columnBlobAsString):

1:47 PM Changeset in webkit [289077] by Jonathan Bedard
  • 15 edits
    1 add in trunk

[git-webkit] Configure default branch management
https://bugs.webkit.org/show_bug.cgi?id=235378
<rdar://problem/87989533>

Reviewed by Dewei Zhu.

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

(hybridmethod.get): Forward certain attributes, namely those used by Memoize.

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

(Git):
(Git.config): Add project config to fall back on.
(Git.url): Move memoize to config.
(Git.checkout): Clear Git.config, since that owns memoization.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:

(PullRequest.parser): Add --overwrite and --append flags.
(PullRequest.create_commit): Either amend an existing commit or create a new one,
depending on the repository settings and arguments passed.
(PullRequest.main): Only keep track of branch history if the user explicitly requests
it or we're using an overwrite workflow with a user owned fork. If repository settings
indicate such branches should never be created, return an error if the user attempts to do so.

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

(Setup.git): Add project config to repository config, prompt the user about their prefered
history retention strategy if the project is using an overwrite workflow.
(Setup.parser): Use the project's default merge behavior.

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

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

1:42 PM Changeset in webkit [289076] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, remove UnlinkedMetadataTable::offsetInMetadataTable since it is no longer used
https://bugs.webkit.org/show_bug.cgi?id=236063

Follow-up after Saam's comment.

  • bytecode/UnlinkedMetadataTable.h:

(JSC::UnlinkedMetadataTable::offsetInMetadataTable): Deleted.

1:34 PM Changeset in webkit [289075] by Ziran Sun
  • 24 edits
    2 copies in trunk

[Forms] Value doesn't change for stepUp()/stepDown() with out of range values
https://bugs.webkit.org/show_bug.cgi?id=235509

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt:
  • web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt:
  • web-platform-tests/html/semantics/forms/the-input-element/range-expected.txt:

Source/WebCore:

For input type number, WebKit throws "invalid state" Error when the value is greater than
max when calling stepUp() or less than min when calling stepDown(). According to section 10
in https://html.spec.whatwg.org/multipage/input.html#dom-input-stepup,
we should do "return", which indicates that value doesn't change.

  • html/InputType.cpp:

(WebCore::InputType::applyStep):

LayoutTests:

Update expectation files.

  • fast/forms/date/date-stepup-stepdown-expected.txt:
  • fast/forms/date/date-stepup-stepdown.html:
  • fast/forms/datetimelocal/datetimelocal-stepup-stepdown-expected.txt:
  • fast/forms/datetimelocal/datetimelocal-stepup-stepdown.html:
  • fast/forms/month/month-stepup-stepdown-expected.txt:
  • fast/forms/month/month-stepup-stepdown.html:
  • fast/forms/number/number-stepup-stepdown-expected.txt:
  • fast/forms/number/number-stepup-stepdown.html:
  • fast/forms/range/range-stepup-stepdown-expected.txt:
  • fast/forms/range/range-stepup-stepdown.html:
  • fast/forms/time/time-stepup-stepdown-expected.txt:
  • fast/forms/time/time-stepup-stepdown.html:
  • fast/forms/week/week-stepup-stepdown-expected.txt:
  • fast/forms/week/week-stepup-stepdown.html:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt.
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt.
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt:
1:32 PM Changeset in webkit [289074] by Nikos Mouchtaris
  • 15 edits
    8 adds in trunk

Implement CSS overscroll-behavior for synchronous scroll
https://bugs.webkit.org/show_bug.cgi?id=222968

Reviewed by Simon Fraser.

Source/WebCore:

Tests: fast/scrolling/sync-scroll-overscroll-behavior-element.html

fast/scrolling/sync-scroll-overscroll-behavior-iframe.html
fast/scrolling/sync-scroll-overscroll-behavior-unscrollable-element.html
fast/scrolling/sync-scroll-overscroll-behavior-unscrollable-iframe.html

Split up patch by Cathie Chen and Frederic Wang. Add function for blocking scroll chaining
and filtering scroll delta depending on the values of overscroll behavior for a scrollable
area. This patch is for synchronous scrolling only.

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleWheelEventInternal):
(WebCore::scrollViaNonPlatformEvent):
(WebCore::EventHandler::handleWheelEventInAppropriateEnclosingBox):
(WebCore::EventHandler::scrollableAreaCanHandleEvent):

  • page/EventHandler.h:
  • page/mac/EventHandlerMac.mm:

(WebCore::findEnclosingScrollableContainer):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::eventForPropagation const):

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::deltaForPropagation const):
(WebCore::ScrollableArea::shouldBlockScrollPropagation const):

  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::horizontalOverscrollBehaviorPreventsPropagation const):
(WebCore::ScrollableArea::verticalOverscrollBehaviorPreventsPropagation const):

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

(WebCore::ScrollAnimatorMac::allowsVerticalStretching const):
(WebCore::ScrollAnimatorMac::allowsHorizontalStretching const):

  • platform/mac/ScrollingEffectsController.mm:

(WebCore::ScrollingEffectsController::wheelDeltaBiasingTowardsVertical):

LayoutTests:

  • fast/scrolling/sync-scroll-overscroll-behavior-element-expected.txt: Added.
  • fast/scrolling/sync-scroll-overscroll-behavior-element.html: Added.
  • fast/scrolling/sync-scroll-overscroll-behavior-iframe-expected.txt: Added.
  • fast/scrolling/sync-scroll-overscroll-behavior-iframe.html: Added.
  • fast/scrolling/sync-scroll-overscroll-behavior-unscrollable-element-expected.txt: Added.
  • fast/scrolling/sync-scroll-overscroll-behavior-unscrollable-element.html: Added.
  • fast/scrolling/sync-scroll-overscroll-behavior-unscrollable-iframe-expected.txt: Added.
  • fast/scrolling/sync-scroll-overscroll-behavior-unscrollable-iframe.html: Added.
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
1:30 PM Changeset in webkit [289073] by Robert Jenner
  • 6 edits
    8 deletes in trunk

Unreviewed, reverting r288902.

Broke compile-webkit for iOS-15-Simulator

Reverted changeset:

"Import APSConnection-related SPI"
https://bugs.webkit.org/show_bug.cgi?id=235856
https://commits.webkit.org/r288902

1:23 PM Changeset in webkit [289072] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][WP] Add access to required syscalls
https://bugs.webkit.org/show_bug.cgi?id=236087
<rdar://problem/88439656>

Reviewed by Brent Fulgham.

Add access to required syscalls which are rarely used. This is based on recent telemetry.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
1:06 PM Changeset in webkit [289071] by commit-queue@webkit.org
  • 5 edits
    5 adds in trunk

ANGLE Metal and ANGLE OpenGL cannot be initialised one after the other
https://bugs.webkit.org/show_bug.cgi?id=236030

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-03
Reviewed by Dean Jackson.

Source/WebCore:

Test: webgl/pending/conformance2/misc/webgl2-after-webgl1-bug.html

Remove the power-preference specific native displays.
Add a native display for opengl, and use the default
one for Metal.

After the recent ANGLE roll, ANGLE uses (native display, power preference)
as the key to look up EGLDisplays.

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::releaseThreadResources):

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

(WebCore::initializeEGLDisplay):

LayoutTests:

  • webgl/pending/conformance2/misc/webgl2-after-webgl1-bug-expected.txt: Added.
  • webgl/pending/conformance2/misc/webgl2-after-webgl1-bug.html: Added.
  • webgl/resources/pending_webgl_test_files/conformance2/misc/webgl2-after-webgl1-bug.html: Added.
1:05 PM Changeset in webkit [289070] by Adrian Perez de Castro
  • 9 edits in releases/WebKitGTK/webkit-2.34/Source/JavaScriptCore

Merge r287421 - Make DeferredWorkTimer::addPendingWork() return a Ticket.
https://bugs.webkit.org/show_bug.cgi?id=234628
rdar://84260429

Reviewed by Yusuke Suzuki.

  1. Make Ticket a unique token instead of the JSObject* target object. The Ticket is now a pointer to the TicketData in the pending work list.
  1. Instead of taking a Ticket argument, DeferredWorkTimer::addPendingWork() now takes a JSObject* target argument explicitly, and returns the Ticket for the added TicketData instead.

All the relevant DeferredWorkTimer APIS already take a Ticket as an argument.
This ensures that addPendingWork() is called before we start doing work with
these APIs (especially scheduleWorkSoon()).

  1. Previously, addPendingWork() will only save one instance of TicketData for a given JSObject* key. With this patch, we'll register a new TicketData instance for every call to addPendingWork(), and return a unique Ticket for it.

This is needed because it may be possible for 2 different clients to call
addPendingWork() and scheduleWorkSoon() with the same target JSObject* but with
different sets of dependencies.

Secondly, even is the both sets of dependencies are identical, a client may
call addPendingWork() and scheduleWorkSoon() with the same JSObject* target
more than once because it intended to schedule more than 1 task to run.

Note that DeferredWorkTimer::doWork() consumes the corresponding TicketData
(i.e. removes it from the m_pendingTickets list) for each task as it is run.
To ensure that the dependencies for each task is protected, we'll either need
to ref count the TicketData for the same target object (and hold off on removing
it from the list), or we'll need to register a different TicketData instance
for each task. Ref counting can solve the second issue above, but does not
solve the first. So, this patch goes with the more generic solution to allow
each task to have its own TicketData instance (and, its own unique Ticket).

  1. Previously, if the client cancels pending work, we would remove the TicketData immediately from the m_pendingTickets list. This opens up an opportunity for the same TicketData memory to be re-allocated by another client. This, in turn, would make the Ticket token not unique and potentially allow a cancelled ticket to be reused before DeferredWorkTimer::doWork() is called.

This patch changes DeferredWorkTimer::cancelPendingWork() to only clear the
contents of the TicketData instead. TicketData::scriptExecutionOwner being
null is used as an indication that the ticket has been cancelled. Since the
TicketData itself is not "freed" yet, all TicketData will remain unique until
DeferredWorkTimer::doWork().

Consequently, DeferredWorkTimer::doWork() will now check for cancelled tickets
and remove them from the m_pendingTickets list.

  1. JSFinalizationRegistry was previously calling DeferredWorkTimer::hasPendingWork() to check if it has already scheduled a task, so as not to reschedule again until after the previously scheduled task has been run. This does not play nice with the new Ticket API, because this hasPendingWork() check needs to be done before calling addPendingWork(), and hence, the Ticket is not available yet.

Fortunately, JSFinalizationRegistry should know if it has already scheduled
a task itself. This patch adds a m_hasAlreadyScheduledWork flag to
JSFinalizationRegistry that can be used for this check instead.

  • jsc.cpp:

(JSC_DEFINE_HOST_FUNCTION):

  • runtime/DeferredWorkTimer.cpp:

(JSC::DeferredWorkTimer::TicketData::TicketData):
(JSC::DeferredWorkTimer::TicketData::vm):
(JSC::DeferredWorkTimer::TicketData::cancel):
(JSC::DeferredWorkTimer::doWork):
(JSC::DeferredWorkTimer::addPendingWork):
(JSC::DeferredWorkTimer::hasPendingWork):
(JSC::DeferredWorkTimer::hasDependancyInPendingWork):
(JSC::DeferredWorkTimer::cancelPendingWork):

  • runtime/DeferredWorkTimer.h:

(JSC::DeferredWorkTimer::TicketData::target):

  • runtime/JSFinalizationRegistry.cpp:

(JSC::JSFinalizationRegistry::finalizeUnconditionally):

  • runtime/JSFinalizationRegistry.h:
  • wasm/WasmStreamingCompiler.cpp:

(JSC::Wasm::StreamingCompiler::StreamingCompiler):
(JSC::Wasm::StreamingCompiler::~StreamingCompiler):
(JSC::Wasm::StreamingCompiler::didComplete):
(JSC::Wasm::StreamingCompiler::fail):
(JSC::Wasm::StreamingCompiler::cancel):

  • wasm/WasmStreamingCompiler.h:
  • wasm/js/JSWebAssembly.cpp:

(JSC::JSWebAssembly::webAssemblyModuleValidateAsync):
(JSC::instantiate):
(JSC::compileAndInstantiate):
(JSC::JSWebAssembly::webAssemblyModuleInstantinateAsync):

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

[iOS][WP] Enable sandbox state rules for Mach messages
https://bugs.webkit.org/show_bug.cgi?id=236027
<rdar://problem/88387937>

Reviewed by Brent Fulgham.

After <rdar://85931614> has been fixed, we can enable sandbox state rules for Mach messages.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
12:29 PM Changeset in webkit [289068] by Patrick Griffis
  • 2 edits in trunk/LayoutTests

[Win] Update expectations for failing CSP test
https://bugs.webkit.org/show_bug.cgi?id=236093

Unreviewed expectations update.

  • platform/win/TestExpectations:
12:15 PM Changeset in webkit [289067] by Fujii Hironori
  • 2 edits in trunk/Tools

REGRESSION(r288878) webkitpy.layout_tests.controllers.layout_test_finder_legacy_unittest.LayoutTestFinderTests tests are failing with Windows Python
https://bugs.webkit.org/show_bug.cgi?id=236043

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/port/base.py:

(Port.relative_test_filename): Normalize filename with
TEST_PATH_SEPARATOR before comparing with layout_tests_dir().

11:59 AM Changeset in webkit [289066] by Mikhail R. Gadelha
  • 2 edits in trunk/Source/bmalloc

Fix BSD compilation after r289056
https://bugs.webkit.org/show_bug.cgi?id=236086

Unreviewed, fixes missing header in BSD systems.

The include is moved up so it is included in both UNIX and BSD systems,
as adding the include in both #if triggers a code style warning (header
included twice), even though the includes are guarded.

  • bmalloc/AvailableMemory.cpp:
11:50 AM Changeset in webkit [289065] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

Rename NetworkConnectionToWebProcess::serverToContextConnectionNoLongerNeeded()
https://bugs.webkit.org/show_bug.cgi?id=236088

Reviewed by Darin Adler.

Rename NetworkConnectionToWebProcess::serverToContextConnectionNoLongerNeeded() to make it clear it is for the
service worker connection, to avoid confusing with the shared workers.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::serviceWorkerServerToContextConnectionNoLongerNeeded):
(WebKit::NetworkConnectionToWebProcess::serverToContextConnectionNoLongerNeeded): Deleted.

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

(WebKit::WebSWServerToContextConnection::connectionIsNoLongerNeeded):

11:46 AM Changeset in webkit [289064] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: [Flexbox] Add setting to guard Flexbox Inspector feature
https://bugs.webkit.org/show_bug.cgi?id=236091
<rdar://problem/88443529>

Reviewed by Patrick Angle.

  • UserInterface/Base/Setting.js:
  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createEngineeringSettingsView):

11:44 AM Changeset in webkit [289063] by Chris Dumez
  • 10 edits
    2 moves in trunk/Source/WebKit

Rename ServiceWorkerInitializationData / ServiceWorkerInformation so they can be reused by shared workers
https://bugs.webkit.org/show_bug.cgi?id=236089

Reviewed by Alex Christensen.

  • Shared/RemoteWorkerInitializationData.cpp: Renamed from Source/WebKit/Shared/ServiceWorkerInitializationData.cpp.

(WebKit::RemoteWorkerInitializationData::encode const):
(WebKit::RemoteWorkerInitializationData::decode):

  • Shared/RemoteWorkerInitializationData.h: Renamed from Source/WebKit/Shared/ServiceWorkerInitializationData.h.
  • Sources.txt:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::enableServiceWorkers):

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::hasServiceWorkerPageProxy):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):

  • WebProcess/Storage/WebSWContextManagerConnection.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::establishServiceWorkerContextConnectionToNetworkProcess):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
11:18 AM Changeset in webkit [289062] by commit-queue@webkit.org
  • 7 edits in trunk/Source

Crash at com.apple.WebKit: WebKit::RemoteLayerBackingStore::display
https://bugs.webkit.org/show_bug.cgi?id=236003
Source/WebCore:

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-03
Reviewed by Simon Fraser.

  • platform/graphics/GraphicsLayerContentsDisplayDelegate.h:

Add a comment not to call PlatformCALayer::setBackingStoreAttached()

  • platform/graphics/cocoa/WebProcessGraphicsContextGLCocoa.mm:

Clear the PlatformCALayer contents in more explicit way.

Source/WebKit:

<rdar://87617695>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-03
Reviewed by Simon Fraser.

Using UI-side compositing, following chain would be the cause a crash:
PlatformCALayerRemote::recursiveBuildTransaction
RemoteLayerBackingStore::display
PlatformCALayer::platformCALayerLayerDisplay
WebProcessGraphicsContextGLCocoa.mm DisplayBufferDisplayDelegate::display
PlatformCALayer::setContents(nullptr)

The nullptr contents happens when the WebGL context does not have
display buffer yet or when the display buffer creation would fail.

Setting empty layer contents would destroy the RemoteLayerBackingStore,
even though the callstack is in process of displaying the layer to the
backing store.

When setting PlatformCALayer contents "empty", clear the backing store instead
of removing the backing store.

Tested by LayoutTests/webgl (under ASAN, ios simulator)

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::setContents):

11:01 AM Changeset in webkit [289061] by Chris Dumez
  • 7 edits in trunk/Source

Move and rename ServiceWorkerThreadProxy::setupPageForServiceWorker()
https://bugs.webkit.org/show_bug.cgi?id=236085

Reviewed by Darin Adler.

Move and rename ServiceWorkerThreadProxy::setupPageForServiceWorker() so that it can be reused for shared workers.

Source/WebCore:

  • page/Page.cpp:

(WebCore::Page::setupForRemoteWorker):

  • page/Page.h:
  • workers/service/context/ServiceWorkerThreadProxy.cpp:

(WebCore::ServiceWorkerThreadProxy::setupPageForServiceWorker): Deleted.

  • workers/service/context/ServiceWorkerThreadProxy.h:

Source/WebKit:

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::installServiceWorker):

10:46 AM Changeset in webkit [289060] by ntim@apple.com
  • 3 edits
    2 adds in trunk

null ptr deref in RenderTreeBuilder::Block::attachIgnoringContinuation
https://bugs.webkit.org/show_bug.cgi?id=234170

Patch by Frédéric Wang <fwang@igalia.com> on 2022-02-03
Reviewed by Antti Koivisto.

Source/WebCore:

When an element with "display: contents" is put into the top layer, its computed style for
the display property becomes "block" [1]. However, RenderTreeUpdater::updateElementRenderer
does not manage well this transition. In particular, a null ptr deref happens for some
special configuration involving a <dialog style="display: contents">. To work around that
issue, always force tearing down renderers when updating an element in the top layer.

[1] https://fullscreen.spec.whatwg.org/#new-stacking-layer

Test: fast/layers/top-layer-display-contents-crash.html

  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateElementRenderer): Always force tearing down renderers
for top layer element.

LayoutTests:

Add regression test.

  • fast/css/top-layer-display-contents-crash-expected.txt: Added.
  • fast/css/top-layer-display-contents-crash.html: Added.
10:01 AM Changeset in webkit [289059] by J Pascoe
  • 4 edits in trunk

[WebAuthn] Allow use of hardware-fixed credentials while using alternate store
https://bugs.webkit.org/show_bug.cgi?id=235923
rdar://88102108

Reviewed by Brent Fulgham.

Source/WebKit:

This patch allows use of credentials created before a user started using
the alternate credential store by searching regardless of status when
querying credentials.

Added API test + tested manually.

  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:

(WebKit::LocalAuthenticatorInternal::getExistingCredentials):
(WebKit::LocalAuthenticator::continueGetAssertionAfterUserVerification):

Tools:

Add new test for querying credentials created both before and after enabling
alternative credential store.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::WebCore::addKeyToKeychain):
(TestWebKitAPI::WebCore::cleanUpKeychain):
(TestWebKitAPI::TEST):

9:58 AM Changeset in webkit [289058] by Chris Dumez
  • 12 edits
    2 adds in trunk

Implement AbortSignal.timeout()
https://bugs.webkit.org/show_bug.cgi?id=236039

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import AbortSignal.timeout() tests from upstream WPT.

  • web-platform-tests/dom/abort/AbortSignal.any-expected.txt:
  • web-platform-tests/dom/abort/AbortSignal.any.js:

(async_test.t.signal.onabort.t.step_func_done):
(async_test.t.string_appeared_here.signal.onabort.t.step_func):

  • web-platform-tests/dom/abort/AbortSignal.any.worker-expected.txt:
  • web-platform-tests/dom/abort/abort-signal-timeout-expected.txt: Added.
  • web-platform-tests/dom/abort/abort-signal-timeout.html: Added.
  • web-platform-tests/dom/abort/w3c-import.log:

Source/WebCore:

Implement the new AbortSignal.timeout() as per:

Test: imported/w3c/web-platform-tests/dom/abort/abort-signal-timeout.html

  • bindings/js/JSAbortSignalCustom.cpp:

(WebCore::JSAbortSignalOwner::isReachableFromOpaqueRoots):

  • dom/AbortSignal.cpp:

(WebCore::AbortSignal::timeout):
(WebCore::AbortSignal::eventListenersDidChange):

  • dom/AbortSignal.h:
  • dom/AbortSignal.idl:
  • page/DOMTimer.cpp:

(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::fired):

  • page/DOMTimer.h:
8:38 AM Changeset in webkit [289057] by mark.lam@apple.com
  • 5 edits in trunk/Source/WebCore

Flaky scope.assertNoException() assertion in ~JSExecState when running workers WPT tests
https://bugs.webkit.org/show_bug.cgi?id=235978

Reviewed by Yusuke Suzuki.

Because Web workers can be terminated at any point, it is possible for JSExecState::loadModule()
to get a termination exception, which would incorrectly cause it to assert and crash in debug.
This patch updates the code so that termination exceptions are properly dealt with instead of
crashing.

No new tests, covered by imported/w3c/web-platform-tests/workers that flakily crash in
debug.

  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::reportException):

  • bindings/js/JSExecState.h:

(WebCore::JSExecState::call):
(WebCore::JSExecState::evaluate):
(WebCore::JSExecState::profiledCall):
(WebCore::JSExecState::profiledEvaluate):
(WebCore::JSExecState::linkAndEvaluateModule):
(WebCore::JSExecState::~JSExecState):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::evaluateInWorld):

  • workers/WorkerOrWorkletScriptController.cpp:

(WebCore::WorkerOrWorkletScriptController::loadModuleSynchronously):

7:29 AM Changeset in webkit [289056] by Mikhail R. Gadelha
  • 2 edits in trunk/Source/bmalloc

Fix undefined behavior when querying linux memory size
https://bugs.webkit.org/show_bug.cgi?id=228280

Reviewed by Mark Lam.

When running JSC compiled with the undefined behavior sanitizer enabled in a 32 bits machine:

../../Source/bmalloc/bmalloc/AvailableMemory.cpp:115:60: runtime error:
signed integer overflow: 32839056 * 4096 cannot be represented in type 'long int'

This patch slighly rewrites how the available memory is calculated to
use sysinfo (like it's done for FREEBSD).

  • bmalloc/AvailableMemory.cpp:

(bmalloc::LinuxMemory::singleton):
(bmalloc::computeAvailableMemory):
(bmalloc::memoryStatus):

7:23 AM Changeset in webkit [289055] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][WP] Add file-ioctl telemetry
https://bugs.webkit.org/show_bug.cgi?id=236031
<rdar://88334007>

Reviewed by Darin Adler.

Add file-ioctl telemetry in the WebContent process on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
7:21 AM Changeset in webkit [289054] by Chris Dumez
  • 16 edits
    8 copies
    21 adds in trunk

Start connecting SharedWorker to the WebKit2 layer
https://bugs.webkit.org/show_bug.cgi?id=236052

Reviewed by Darin Adler.

Source/WebCore:

Start connecting SharedWorker to the WebKit2 layer with a provider / connection, similarly to what is done
for service workers.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • workers/shared/SharedWorker.cpp:

(WebCore::mainThreadConnection):
(WebCore::SharedWorker::create):

  • workers/shared/SharedWorkerManager.h:
  • workers/shared/SharedWorkerObjectConnection.cpp: Copied from Source/WebCore/workers/shared/SharedWorkerManager.h.
  • workers/shared/SharedWorkerObjectConnection.h: Copied from Source/WebCore/workers/shared/SharedWorkerManager.h.
  • workers/shared/SharedWorkerProvider.cpp: Copied from Source/WebCore/workers/shared/SharedWorkerManager.h.

(WebCore::SharedWorkerProvider::singleton):
(WebCore::SharedWorkerProvider::setSharedProvider):

  • workers/shared/SharedWorkerProvider.h: Copied from Source/WebCore/workers/shared/SharedWorkerManager.h.

(WebCore::SharedWorkerProvider::~SharedWorkerProvider):

  • workers/shared/SharedWorkerScriptLoader.h:

Source/WebKit:

Start connecting SharedWorker to the WebKit2 layer with a provider / connection, similarly to what is done
for service workers.

  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::sharedWorkerConnection):

  • WebProcess/Network/NetworkProcessConnection.h:
  • WebProcess/Storage/WebSharedWorkerObjectConnection.cpp: Copied from Source/WebCore/workers/shared/SharedWorkerManager.h.

(WebKit::WebSharedWorkerObjectConnection::messageSenderConnection const):
(WebKit::WebSharedWorkerObjectConnection::requestSharedWorker):

  • WebProcess/Storage/WebSharedWorkerObjectConnection.h: Copied from Source/WebCore/workers/shared/SharedWorkerManager.h.
  • WebProcess/Storage/WebSharedWorkerProvider.cpp: Copied from Source/WebCore/workers/shared/SharedWorkerManager.h.

(WebKit::WebSharedWorkerProvider::singleton):
(WebKit::WebSharedWorkerProvider::sharedWorkerConnection):

  • WebProcess/Storage/WebSharedWorkerProvider.h: Copied from Source/WebCore/workers/shared/SharedWorkerManager.h.
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

LayoutTests:

Skip pure SharedWorkers tests on WK1 since we will only implement this for WebKit2 in the short term.
Land WK1-specific baselines for tests that use SharedWorkers but also cover other things.

  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk1/imported/w3c/web-platform-tests/content-security-policy/script-src/worker-importscripts.sub-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/content-security-policy/script-src/worker-set-timeout.sub-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/browsers/offline/appcache/workers/appcache-worker.https-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/webappapis/the-windoworworkerglobalscope-mixin/Worker_Self_Origin-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/workers-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/workers/abrupt-completion-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/001-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/workers/semantics/run-a-worker/003-expected.txt: Added.
  • platform/win/TestExpectations:
7:19 AM Changeset in webkit [289053] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][GPUP] Add access to sysctl property
https://bugs.webkit.org/show_bug.cgi?id=235973
<rdar://problem/88345212>

Reviewed by Darin Adler.

Add access to required sysctl property "hw.ncpu" in the GPU process on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
7:14 AM Changeset in webkit [289052] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[GPUP] Add read access to sysctl properties
https://bugs.webkit.org/show_bug.cgi?id=236018
<rdar://problem/88382949>

Reviewed by Darin Adler.

Add read access to sysctl properties based on telemetry.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
6:51 AM Changeset in webkit [289051] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] imported/w3c/web-platform-tests/css/css-writing-modes/text-align-vlr* tests are failing
https://bugs.webkit.org/show_bug.cgi?id=236059

Reviewed by Antti Koivisto.

Content (alignment) offset should be flipped for vertical writing mode.

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

(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::flipLogicalRectToVisualForWritingMode):
(WebCore::Layout::InlineDisplayContentBuilder::movePointHorizontallyForWritingMode const):

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h:
6:31 AM Changeset in webkit [289050] by youenn@apple.com
  • 7 edits
    1 delete in trunk/Source/WebKit

MediaRecorderPrivate should not need to create IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=235953

Reviewed by Eric Carlson.

Make use of SharedVideoFrameReader and SharedVideoFrameWriter between SampleBufferDisplayLayer and RemoteSampleBufferDisplayLayer.
Covered by existing MediaRecorder tests.

  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:

(WebKit::RemoteMediaRecorder::videoSampleAvailable):
(WebKit::RemoteMediaRecorder::setSharedVideoFrameSemaphore):
(WebKit::RemoteMediaRecorder::setSharedVideoFrameMemory):

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

(WebKit::MediaRecorderPrivate::videoSampleAvailable):
(WebKit::MediaRecorderPrivate::copySharedVideoFrame):

  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.mm: Removed.
6:07 AM Changeset in webkit [289049] by youenn@apple.com
  • 3 edits
    2 adds in trunk

RealtimeIncomingVideoSourceCocoa should not need to create IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=235952

Reviewed by Eric Carlson.

Source/WebCore:

Test: webrtc/vp8-then-h264.html

  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:

Instead of using an IOSurface-based buffer pool, we use a regular memory buffer pool.
A follow-up should probably remove the need to convert YUV420 webrtc video frames to NV12 CVPixelBuffers in RealtimeIncomingVideoSourceCocoa,
so as to leave that to when copying the webrtc video frames into shared memory buffers used for IPC.

LayoutTests:

  • webrtc/vp8-then-h264-expected.txt: Added.
  • webrtc/vp8-then-h264.html: Added.
6:02 AM Changeset in webkit [289048] by graouts@webkit.org
  • 6 edits in trunk

Incorrect KeyframesEffect generated for background
https://bugs.webkit.org/show_bug.cgi?id=229398
<rdar://problem/82516118>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Mark WPT progressions.

  • web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/constructor-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/setKeyframes-expected.txt:

Source/WebCore:

Our keyframe merging code when dealing with input from the Web Animations JS API was incorrect.

First, we would iterate over proprties on a keyframe based on the MutableStyleProperties object we
use instead of the HashMap<CSSPropertyID, String> map we use to keep track of the properties set
on the keyframe and its original string value (which we use to return the exact same string when
getKeyframes() is called).

This was incorrect because calling MutableStyleProperties::setProperty() expands shorthands into
longhands, so our property count wouldn't accurate.

Second, honestly I have no idea what I was thinking when I wrote this code as it only ever worked
with a single property on the kefyrame to merge. We now correctly merge all properties from the
keyframe-to-merge into the previous keyframe by using MutableStyleProperties::mergeAndOverrideOnConflict()
and then iterate over all known properties in the HashMap<CSSPropertyID, String> to merge the
properties and strings input.

  • animation/KeyframeEffect.cpp:

(WebCore::processPropertyIndexedKeyframes):

5:45 AM Changeset in webkit [289047] by Carlos Garcia Campos
  • 1 edit
    1 add in trunk/WebDriverTests

Unreviewed. Add another missing file after r288871.

  • imported/w3c/tools/webdriver/webdriver/bidi/error.py: Added.
5:43 AM Changeset in webkit [289046] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK][a11y] Test /webkit/WebKitAccessibility/accessible/children-changed times out
https://bugs.webkit.org/show_bug.cgi?id=236070

Reviewed by Adrian Perez de Castro.

This happens because when the new node is added the a11y object children are not updated and the wrapper for the
new child is not created.

  • accessibility/atspi/AXObjectCacheAtspi.cpp:

(WebCore::AXObjectCache::postPlatformNotification): Call updateChildrenIfNecessary on AXChildrenChanged.

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

[GTK][WPE][a11y] Handle parameter of org.a11y.atspi.Text.RemoveSelection
https://bugs.webkit.org/show_bug.cgi?id=236079

Reviewed by Adrian Perez de Castro.

  • accessibility/atspi/AccessibilityObjectTextAtspi.cpp:
5:23 AM Changeset in webkit [289044] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

Crash in AXIsolatedObject::associatedAXObject.
https://bugs.webkit.org/show_bug.cgi?id=236053
<rdar://problem/88413232>

Reviewed by Darin Adler.

The crash occurs because we are using an axObject pointer after we call
updateBackingStore() which may destroy the object pointed to by axObject.
This was added as a fix for
https://bugs.webkit.org/show_bug.cgi?id=220446
So I will submit a follow up patch with the correct fix for that bug as well.

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::associatedAXObject const):

5:21 AM Changeset in webkit [289043] by Chris Lord
  • 3 edits in trunk/Source/WebCore

Add specialize type traits to GLContext
https://bugs.webkit.org/show_bug.cgi?id=236076

Reviewed by Alejandro G. Castro.

Make GLContext downcastable.

No new tests, no change in behaviour.

  • platform/graphics/GLContext.h:
  • platform/graphics/egl/GLContextEGL.h:
5:11 AM Changeset in webkit [289042] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

WebDriver: selenium tests are executed more than once
https://bugs.webkit.org/show_bug.cgi?id=236075

Reviewed by Darin Adler.

I think this happens since we updated the pytest version. Pytest is now collecting test files that don't
contain any test like init.py files. When that's given to the runner all the tests under the directory are
executed.

  • Scripts/webkitpy/webdriver_tests/pytest_runner.py:

(CollectRecorder.pytest_collectreport): Do not include files with no tests.

5:06 AM Changeset in webkit [289041] by commit-queue@webkit.org
  • 15 edits in trunk/Source/WebCore

[atspi] missing-braces clang warnings
https://bugs.webkit.org/show_bug.cgi?id=236074

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

Wrap structure padding in braces.

  • accessibility/atspi/AccessibilityAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectActionAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectComponentAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectHyperlinkAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectHypertextAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectImageAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectSelectionAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectTableAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectTableCellAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectTextAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectValueAtspi.cpp:
  • accessibility/atspi/AccessibilityRootAtspi.cpp:
3:39 AM Changeset in webkit [289040] by Carlos Garcia Campos
  • 1 edit
    4 adds in trunk/WebDriverTests

Unreviewed. Add missing files after r283798.

  • imported/selenium/py/selenium/webdriver/common/bidi/init.py: Added.
  • imported/selenium/py/selenium/webdriver/common/bidi/cdp.py: Added.
  • imported/selenium/py/selenium/webdriver/remote/script_key.py: Added.
3:30 AM Changeset in webkit [289039] by Carlos Garcia Campos
  • 1 edit
    2 adds in trunk/WebDriverTests

Unreviewed. Add missing file after r288871.

  • imported/w3c/webdriver/tests/bidi/session_subscribe/subscribe.py: Added.
2:13 AM Changeset in webkit [289038] by youenn@apple.com
  • 6 edits in trunk/Source/WebKit

SampleBufferDiplayLayer should not need to create IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=235954

Reviewed by Eric Carlson.

Make use of SharedVideoFrameReader and SharedVideoFrameWriter between SampleBufferDisplayLayer and RemoteSampleBufferDisplayLayer.
Manually tested.

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in:
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:
2:07 AM Changeset in webkit [289037] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Use MetadataTable instead of UnlinkedMetadataTable
https://bugs.webkit.org/show_bug.cgi?id=236063
rdar://88269480

Reviewed by Robin Morisset.

Use MetadataTable from profiled CodeBlock instead of UnlinkedMetadataTable in concurrent JIT compiler.

  • bytecode/MetadataTable.h:

(JSC::MetadataTable::offsetInMetadataTable):

  • bytecode/UnlinkedMetadataTable.h:

(JSC::UnlinkedMetadataTable::offsetInMetadataTable):

  • jit/JITInlines.h:

(JSC::JIT::emitValueProfilingSite):
(JSC::JIT::loadPtrFromMetadata):
(JSC::JIT::load32FromMetadata):
(JSC::JIT::load8FromMetadata):
(JSC::JIT::store8ToMetadata):
(JSC::JIT::store32ToMetadata):
(JSC::JIT::materializePointerIntoMetadata):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emit_op_get_from_scope):

1:18 AM Changeset in webkit [289036] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.35.2

WebKitGTK 2.35.2

1:16 AM Changeset in webkit [289035] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.35.2 release

.:

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

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.35.2.
12:52 AM Changeset in webkit [289034] by mmaxfield@apple.com
  • 3 edits in trunk/Tools

Allow using STIX Two in layout tests
https://bugs.webkit.org/show_bug.cgi?id=236048

Reviewed by Darin Adler.

Add the fonts to the allow-list.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(allowedFontFamilySet):

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::allowedFontFamilySet):

12:41 AM Changeset in webkit [289033] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

Unreviewed. Fix GTK make distcheck

Move mac specific file from Sources.txt to SourcesCocoa.txt

  • Sources.txt:
  • SourcesCocoa.txt:
12:35 AM Changeset in webkit [289032] by Martin Robinson
  • 29 edits
    1 delete in trunk

Transform interpolation should blend between shared transform function primitives
https://bugs.webkit.org/show_bug.cgi?id=235311
<rdar://problem/88012700>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Mark some tests as newly passing.

  • web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/matrix-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-interpolation-001-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-interpolation-002-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-interpolation-inline-value-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-interpolation-verify-reftests-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-translate-composition-expected.txt:

Source/WebCore:

No new tests. This is covered by existing WPT tests.

Allow direct interpolation between mismatching transform functions that share a primitive.
This fixes many tests expecting a certain computed transformation matrix in WPT, but also
allows using hardware animations more often for the CoreAnimation backend.

Rotation, scale, and translate are the only functions that have shared primitives, so they
are the only ones in this change to allow for this new behavior.

When determining if a list of keyframes has shared compatible lists of transforms, return
the vector of primitives that can represent them. In addition code for calculating big
rotations has been removed, because it was unused.

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::gSharedPrimitivesForTransformKeyframe): Added.
(WebCore::GraphicsLayer::getSharedPrimitivesForTransformKeyframes): Added.

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::appendToUncommittedAnimations): Modified to take a vector of shared
primitive types instead of a pointer to an array of operations.
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::addAnimation): Use new method.

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::addAnimation): Ditto.

  • platform/graphics/transforms/Matrix3DTransformOperation.cpp:

(WebCore::Matrix3DTransformOperation::blend): Use the new sharedPrimitiveType method
to determine if the two operations can blend.

  • platform/graphics/transforms/MatrixTransformOperation.cpp:

(WebCore::MatrixTransformOperation::blend): Ditto.

  • platform/graphics/transforms/PerspectiveTransformOperation.cpp:

(WebCore::PerspectiveTransformOperation::blend): Ditto.

  • platform/graphics/transforms/RotateTransformOperation.cpp:

(WebCore::RotateTransformOperation::blend): Ditto.

  • platform/graphics/transforms/RotateTransformOperation.h:
  • platform/graphics/transforms/ScaleTransformOperation.cpp:

(WebCore::ScaleTransformOperation::blend): Ditto.

  • platform/graphics/transforms/ScaleTransformOperation.h:
  • platform/graphics/transforms/SkewTransformOperation.cpp:

(WebCore::SkewTransformOperation::blend): Ditto.

  • platform/graphics/transforms/TransformOperation.cpp:

(WebCore::TransformOperation::sharedPrimitiveType const):

  • platform/graphics/transforms/TransformOperation.h:

(WebCore::TransformOperation::primitiveType const): Added this virtual function which
return the type for the base class. Rotation, scale, and translate specialize this to
return a compatible primitive type.

  • platform/graphics/transforms/TransformOperations.cpp:

(WebCore::TransformOperations::operationsMatch const): Modified to check whether operations
share primitives.

  • platform/graphics/transforms/TranslateTransformOperation.cpp:

(WebCore::TranslateTransformOperation::blend): Use the new sharedPrimitiveType method.

  • platform/graphics/transforms/TranslateTransformOperation.h:

LayoutTests:

Remove a duplicated baseline.

  • platform/glib/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-inline-value-expected.txt: Removed.
12:15 AM Changeset in webkit [289031] by ntim@apple.com
  • 6 edits
    2 adds in trunk/Source/WebCore

Create PDFDocument stub
https://bugs.webkit.org/show_bug.cgi?id=235970

Reviewed by Brent Fulgham.

Create an empty stub with an iframe where the viewer will be loaded.

Changing about:blank?file= to https://mozilla.github.io/pdf.js/web/viewer.html?file= is one way
to test the stub.

That stub is guarded behind the PDF.js viewer internal setting which is only enabled in captive portal mode.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/DOMImplementation.cpp:

(WebCore::DOMImplementation::createDocument):

  • dom/Document.h:

(WebCore::Document::isPDFDocument const):

  • html/PDFDocument.cpp: Added.

(WebCore::PDFDocument::PDFDocument):
(WebCore::m_viewerRendered):
(WebCore::PDFDocumentParser::document const):
(WebCore::PDFDocumentParser::appendBytes):
(WebCore::PDFDocumentParser::finish):
(WebCore::PDFDocument::createParser):
(WebCore::PDFDocument::createDocumentStructure):
(WebCore::PDFDocument::updateDuringParsing):
(WebCore::PDFDocument::finishedParsing):

  • html/PDFDocument.h: Added.

(isType):

Feb 2, 2022:

11:33 PM Changeset in webkit [289030] by Carlos Garcia Campos
  • 2 edits in trunk

Unreviewed. [GTK] Apply the same cmake changes of r289029 to GTK port

  • Source/cmake/OptionsGTK.cmake:
11:05 PM Changeset in webkit [289029] by Pablo Saavedra
  • 31 edits in trunk

[WPE] Fix for non-unified builds with ACCESSIBILITY=OFF
https://bugs.webkit.org/show_bug.cgi?id=236024

Reviewed by Darin Adler.

.:

  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

  • accessibility/atspi/AXObjectCacheAtspi.cpp:
  • accessibility/atspi/AccessibilityAtspi.cpp:
  • accessibility/atspi/AccessibilityAtspi.h:
  • accessibility/atspi/AccessibilityAtspiEnums.h:
  • accessibility/atspi/AccessibilityObjectActionAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectAtspi.h:
  • accessibility/atspi/AccessibilityObjectComponentAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectHyperlinkAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectHypertextAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectImageAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectSelectionAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectTableAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectTableCellAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectTextAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectValueAtspi.cpp:
  • accessibility/atspi/AccessibilityRootAtspi.cpp:
  • accessibility/atspi/AccessibilityRootAtspi.h:
  • editing/atspi/FrameSelectionAtspi.cpp:
  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::setSelectedState):

  • page/Page.h:

Tools:

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp:
  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityNotificationHandler.cpp:
  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityNotificationHandler.h:
  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
10:36 PM Changeset in webkit [289028] by Carlos Garcia Campos
  • 31 edits
    1 delete in trunk

[GTK][a11y] Set platform name to atspi in WTR
https://bugs.webkit.org/show_bug.cgi?id=232227

Reviewed by Adrian Perez de Castro.

Tools:

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp:

(WTR::AccessibilityController::platformName): Use atspi instead of atk.

LayoutTests:

Update tests to use atspi instead of atk.

  • accessibility/add-children-pseudo-element.html:
  • accessibility/aria-hidden-false-works-in-subtrees.html:
  • accessibility/aria-label-on-label-element.html:
  • accessibility/aria-option-role.html:
  • accessibility/auto-fill-crash.html:
  • accessibility/combo-box-collapsed-selection-changed.html:
  • accessibility/content-editable-as-textarea.html:
  • accessibility/focusable-inside-hidden.html:
  • accessibility/form-control-value-settable.html:
  • accessibility/gtk/caret-offsets-and-extraneous-white-spaces.html:
  • accessibility/gtk/caret-offsets.html:
  • accessibility/gtk/resources/atk-helpers.js: Removed.
  • accessibility/gtk/text-in-span-block-in-a-block.html:
  • accessibility/ignore-spacer-elements.html:
  • accessibility/insert-children-assert.html:
  • accessibility/list-detection.html:
  • accessibility/menu-list-sends-change-notification.html:
  • accessibility/radio-button-title-label.html:
  • accessibility/render-counter-text.html:
  • accessibility/roles-computedRoleString.html:
  • accessibility/roles-exposed.html:
  • accessibility/secure-textfield-title-ui.html:
  • accessibility/select-element-at-index.html:
  • accessibility/svg-bounds.html:
  • accessibility/table-column-headers-with-captions.html:
  • accessibility/table-fallback-roles-expose-element-attributes.html:
  • accessibility/table-with-footer-section-above-body.html:
  • platform/glib/accessibility/platform-name-expected.txt:
  • resources/accessibility-helper.js:

(platformValueForW3CName):
(platformValueForW3CDescription):
(platformRoleForComboBox):
(platformRoleForStaticText):
(spinnerForTextInput):

10:06 PM Changeset in webkit [289027] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty

[XCBuild] Users of libgtest.a depend on headers from gtest.framework
https://bugs.webkit.org/show_bug.cgi?id=236045

Patch by Elliott Williams <Elliott Williams> on 2022-02-02
Reviewed by Alexey Proskuryakov.

In Make-based sequential builds, gtest's dynamic target builds, even though we don't use
it. Downstream projects were relying on that target to build and produce a gtest.framework
with headers in it.

Instead, configure gtest's static target to copy the project's include directory into
build products. Headers are copied to $BUILT_PRODUCTS_DIR/usr/lib/include/gtest.

  • gtest/xcode/gtest.xcodeproj/project.pbxproj: Added folder reference to include.
9:32 PM Changeset in webkit [289026] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Remove debug log accidentally added with r289018
https://bugs.webkit.org/show_bug.cgi?id=236000

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):

9:07 PM Changeset in webkit [289025] by Fujii Hironori
  • 3 edits in trunk/Tools

[MiniBrowser][Win][WK2] Show MessageBox for alert, confirm and prompt
https://bugs.webkit.org/show_bug.cgi?id=236047

Reviewed by Don Olmstead.

  • MiniBrowser/win/WebKitBrowserWindow.cpp:

(createWKString):
(WebKitBrowserWindow::WebKitBrowserWindow):
(WebKitBrowserWindow::runJavaScriptAlert):
(WebKitBrowserWindow::runJavaScriptConfirm):
(WebKitBrowserWindow::runJavaScriptPrompt):

  • MiniBrowser/win/WebKitBrowserWindow.h:
8:16 PM Changeset in webkit [289024] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

SecureARM64EHashPins should check g_jscConfig.useFastJITPermissions
https://bugs.webkit.org/show_bug.cgi?id=236055
<rdar://88222677>

Reviewed by Mark Lam.

  • assembler/SecureARM64EHashPins.cpp:

(JSC::SecureARM64EHashPins::initializeAtStartup):
(JSC::SecureARM64EHashPins::allocatePinForCurrentThread):
(JSC::SecureARM64EHashPins::deallocatePinForCurrentThread):

  • assembler/SecureARM64EHashPinsInlines.h:

(JSC::SecureARM64EHashPins::pinForCurrentThread):

6:19 PM Changeset in webkit [289023] by Chris Dumez
  • 11 edits
    1 copy in trunk/Source/WebCore

Move connect event dispatch logic to SharedWorkerGlobalScope
https://bugs.webkit.org/show_bug.cgi?id=236038

Reviewed by Darin Adler.

Move connect event dispatch logic to SharedWorkerGlobalScope and add logging.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/Logging.h:
  • workers/shared/SharedWorkerGlobalScope.cpp:

(WebCore::SharedWorkerGlobalScope::SharedWorkerGlobalScope):
(WebCore::SharedWorkerGlobalScope::thread):
(WebCore::SharedWorkerGlobalScope::close):
(WebCore::SharedWorkerGlobalScope::postConnectEvent):

  • workers/shared/SharedWorkerGlobalScope.h:
  • workers/shared/SharedWorkerIdentifier.h: Copied from Source/WebCore/workers/shared/context/SharedWorkerThread.h.
  • workers/shared/SharedWorkerManager.cpp:

(WebCore::SharedWorkerManager::scriptLoadedSuccessfully):

  • workers/shared/context/SharedWorkerThread.cpp:

(WebCore::SharedWorkerThread::SharedWorkerThread):
(WebCore::SharedWorkerThread::createWorkerGlobalScope):

  • workers/shared/context/SharedWorkerThread.h:

(WebCore::SharedWorkerThread::identifier const):

  • workers/shared/context/SharedWorkerThreadProxy.cpp:

(WebCore::SharedWorkerThreadProxy::startWorkerGlobalScope):
(WebCore::SharedWorkerThreadProxy::identifier const):

  • workers/shared/context/SharedWorkerThreadProxy.h:
6:17 PM Changeset in webkit [289022] by Patrick Griffis
  • 17 edits in trunk

CSP: Implement wasm-unsafe-eval
https://bugs.webkit.org/show_bug.cgi?id=235408

Reviewed by Kate Cheney.

LayoutTests/imported/w3c:

Update expectations with new passes.

  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-wasm-unsafe-eval-allows-wasm.any-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-wasm-unsafe-eval-allows-wasm.any.serviceworker-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-wasm-unsafe-eval-allows-wasm.any.worker-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-wasm-unsafe-eval-allows-wasm.any-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-wasm-unsafe-eval-allows-wasm.any.serviceworker-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-wasm-unsafe-eval-allows-wasm.any.worker-expected.txt:

Source/WebCore:

This is similar to 'unsafe-eval' except limited in scope to WebAssembly.

  • page/csp/ContentSecurityPolicyDirectiveList.cpp:

(WebCore::checkWasmEval):
(WebCore::ContentSecurityPolicyDirectiveList::create):

  • page/csp/ContentSecurityPolicySourceList.cpp:

(WebCore::ContentSecurityPolicySourceList::parseSource):

  • page/csp/ContentSecurityPolicySourceList.h:

(WebCore::ContentSecurityPolicySourceList::allowWasmEval const):

  • page/csp/ContentSecurityPolicySourceListDirective.h:

(WebCore::ContentSecurityPolicySourceListDirective::allowWasmEval const):

LayoutTests:

Update expectations with new CSP message.

  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-about-blank-iframe-expected.txt:
  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-external-script-expected.txt:
  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-subframe-expected.txt:
6:00 PM Changeset in webkit [289021] by Patrick Griffis
  • 5 edits
    1 move
    1 add
    1 delete in trunk

CSP: Fix matching wildcard hosts
https://bugs.webkit.org/show_bug.cgi?id=235992

Reviewed by Kate Cheney.

LayoutTests/imported/w3c:

Update expectations.

  • web-platform-tests/content-security-policy/img-src/img-src-full-host-wildcard-blocked.sub-expected.txt:

Source/WebCore:

As per the spec wildcard hosts must include the leading '.' for matches:
https://www.w3.org/TR/CSP3/#match-hosts.

Test: http/tests/security/contentSecurityPolicy/image-full-host-wildcard-blocked.html

  • page/csp/ContentSecurityPolicySource.cpp:

(WebCore::ContentSecurityPolicySource::hostMatches const):

LayoutTests:

Rewrite test to expect CSP3 compliant behavior.

  • http/tests/security/contentSecurityPolicy/image-full-host-wildcard-allowed-expected.txt: Removed.
  • http/tests/security/contentSecurityPolicy/image-full-host-wildcard-blocked-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/image-full-host-wildcard-blocked.html: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/image-full-host-wildcard-allowed.html.
5:03 PM Changeset in webkit [289020] by commit-queue@webkit.org
  • 7 edits
    1 add in trunk

Speed-up JSON.stringify() by avoiding "toJSON" property lookups
https://bugs.webkit.org/show_bug.cgi?id=235996

Patch by Alexey Shvayka <ashvayka@apple.com> on 2022-02-02
Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/json-stringify-many-objects-to-json.js:

Make this test a little more realistic by moving "toJSON" onto prototype.

  • microbenchmarks/vanilla-todomvc-json-stringify.js: Added.

Source/JavaScriptCore:

Speedometer2/Vanilla* subtests are highly reliant on JSON.stringify() for "storage":
it accounts for 10-15% of running time. EmberJS* subtests rely on JSON.stringify() as
well, although they are significantly slower overall, and also encounter only a few
different structures.

This patch caches "toJSON" properties on Structure's rare data; it's the same technique
we are using in toPrimitive() to avoid "toString" / "valueOf" lookups. The microbenchmark,
which was carefully extracted from Speedometer2/Vanilla* subtests, progressed by 3.7%.

While we could come up with a solution that doesn't involve creating StructureRareData
for all structures we stringify, like keeping a list of StructureIDs w/o "toJSON" method,
which will be correct as long as m_hasFastObjectProperties || m_isJSArray is true for all
seen objects, that would probably miss some edge case, won't persist between JSON.stringify()
calls, and won't speed-up structures with "toJSON" methods like Dates.

  • runtime/CachedSpecialPropertyAdaptiveStructureWatchpoint.cpp:

(JSC::CachedSpecialPropertyAdaptiveStructureWatchpoint::fireInternal):

  • runtime/JSONObject.cpp:

(JSC::Stringifier::toJSON):

  • runtime/StructureRareData.cpp:

(JSC::StructureRareData::cacheSpecialPropertySlow):
(JSC::CachedSpecialPropertyAdaptiveInferredPropertyValueWatchpoint::handleFire):

  • runtime/StructureRareData.h:
4:59 PM Changeset in webkit [289019] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288667. rdar://problem/87830583

REGRESSION(r287684) speedtest.net uses many GB of memory
https://bugs.webkit.org/show_bug.cgi?id=235615
rdar://87830583

Reviewed by Youenn Fablet.

The regression was introduced with r286937 and is a good example of
errors introduced when attempting to optimise things too early.
CachedRawResource::updateBuffer does a search in the accumulating
resource's SharedBuffer, search that was taking O(log(n)+1) prior r286937
where n is the number of DataView segments in the SharedBuffer.
This was simplified as a O(1) operation by using the combined contiguous
SharedBuffer instead.
However, that caused every single intermediary accumulated buffers to be
kept referenced by the XMLHttpRequest SharedBufferBuilder leading to
massive memory use.
In other words:
For each update, we did the following steps:

  • Set m_data to a new big continuous chunk of data that stores all received data
  • Create a view of the new data as a SharedBuffer. This SharedBuffer references the big continuous chunk above
  • XHR stores a ref to the view, hence keep the big chunk alive.

Each XHR chunk, although small in data that can be accessed, is actually keeping in memory all temporary created m_data chunks.
Following this change, XHR will now only keeps a reference to the new DataSegment added since the last run rather than the entire previous content.

Fly-by: add some comments describing the running of the method.

  • loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::updateBuffer):

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

4:58 PM Changeset in webkit [289018] by commit-queue@webkit.org
  • 40 edits
    1 add in trunk/Source

Use private relay for all subresources if the main document main resource was loaded using private relay
https://bugs.webkit.org/show_bug.cgi?id=236000
Source/WebCore:

<rdar://87358372>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-02
Reviewed by Brady Eidson.

This can be manually tested using instructions in the radar.

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::setMainResourceWasPrivateRelayed):
(WebCore::DocumentLoader::mainResourceWasPrivateRelayed const):

Source/WebCore/PAL:

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-02
Reviewed by Brady Eidson.

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-02
Reviewed by Brady Eidson.

  • NetworkProcess/Downloads/PendingDownload.cpp:

(WebKit::PendingDownload::didReceiveResponse):

  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::didReceiveResponse):

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

(WebKit::NetworkDataTask::didReceiveResponse):

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

(WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::didReceiveResponse):
(WebKit::NetworkLoad::notifyDidReceiveResponse):

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkLoadClient.h:
  • NetworkProcess/NetworkLoadParameters.h:
  • NetworkProcess/NetworkResourceLoadParameters.cpp:

(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::transferToNewWebProcess):
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::sendDidReceiveResponsePotentiallyInNewBrowsingContextGroup):
(WebKit::NetworkResourceLoader::didFinishWithRedirectResponse):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):

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

(WebKit::PingLoad::didReceiveResponse):

  • NetworkProcess/PingLoad.h:
  • NetworkProcess/PreconnectTask.cpp:

(WebKit::PreconnectTask::didReceiveResponse):

  • NetworkProcess/PreconnectTask.h:
  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:

(WebKit::ServiceWorkerFetchTask::processResponse):

  • NetworkProcess/ServiceWorker/ServiceWorkerNavigationPreloader.cpp:

(WebKit::ServiceWorkerNavigationPreloader::loadWithCacheEntry):
(WebKit::ServiceWorkerNavigationPreloader::willSendRedirectedRequest):
(WebKit::ServiceWorkerNavigationPreloader::didReceiveResponse):

  • NetworkProcess/ServiceWorker/ServiceWorkerNavigationPreloader.h:
  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:

(WebKit::ServiceWorkerSoftUpdateLoader::didReceiveResponse):

  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::didReceiveResponse):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::didReceiveResponse):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):

  • Shared/PrivateRelayed.h: Added.
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::addParametersShared):

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::mainFrameMainResource const):
(WebKit::WebResourceLoader::willSendRequest):
(WebKit::WebResourceLoader::didReceiveResponse):

  • WebProcess/Network/WebResourceLoader.h:
  • WebProcess/Network/WebResourceLoader.messages.in:
4:56 PM Changeset in webkit [289017] by commit-queue@webkit.org
  • 8 edits in trunk/Source

[Xcode] Fix redundant execution of "Check VTables..." script
https://bugs.webkit.org/show_bug.cgi?id=236032

Patch by Elliott Williams <Elliott Williams> on 2022-02-02
Reviewed by Jonathan Bedard.

Source/JavaScriptCore:

Tools/Scripts/check-for-weak-vtables-and-externals already touches a timestamp file after
every execution. Add it as an output file to all "Check For Weak VTables and Externals"
script phases.

These script phases already list their respective executables as inputs. This change shaves
a few seconds off the null build time.

  • JavaScriptCore.xcodeproj/project.pbxproj: Add timestamp file to script phase.

Source/ThirdParty/libwebrtc:

  • libwebrtc.xcodeproj/project.pbxproj: Add timestamp file to script phase.

Source/WebKit:

  • WebKit.xcodeproj/project.pbxproj: Add timestamp file to script phase.

Source/WebKitLegacy:

  • WebKitLegacy.xcodeproj/project.pbxproj: Add timestamp file to script phase.
4:48 PM Changeset in webkit [289016] by Lauro Moura
  • 2 edits in trunk/Source/WebCore

[GLIB] Unreviewed debug buildfix after r288872
https://bugs.webkit.org/show_bug.cgi?id=236036

The actual issue was the roleNames array provided to SortedArrayMap
constructor wasn't fully ordered, making isSortedConstExpr to fail,
generating the call to WTFReport..., which is non-constexpr and thus
the compile failure.

This commit revert the previous fix from r288990 and fix the ordering of
roleNames.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::localizedRoleName):

4:34 PM Changeset in webkit [289015] by Jonathan Bedard
  • 3 edits in trunk/Tools

[EWS] Rename CompileWebKitWithoutPatch to CompileWebKitWithoutChange
https://bugs.webkit.org/show_bug.cgi?id=235949
<rdar://problem/88325688>

Reviewed by Aakash Jain.

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

(CompileWebKit.evaluateCommand): Rename CompileWebKitWithoutPatch
to CompileWebKitWithoutChange.
(CompileWebKitWithoutChange): Ditto.
(AnalyzeCompileWebKitResults.analyzeResults): Ditto.
(ReRunWebKitTests.evaluateCommand): Rename CompileWebKitWithoutPatch
to CompileWebKitWithoutChange, only retry if build is for a patch.
(RunWebKitTestsRedTree.evaluateCommand): Ditto.
(RunWebKitTestsRepeatFailuresRedTree.evaluateCommand): Ditto.
(ReRunAPITests.evaluateCommand): Ditto.
(CompileWebKitWithoutPatch): Renamed to CompileWebKitWithoutChange.

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

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

4:32 PM Changeset in webkit [289014] by graouts@webkit.org
  • 6 edits in trunk/Source/WebCore

Keyframe resolution methods should use reference instead of pointer parameters
https://bugs.webkit.org/show_bug.cgi?id=236020

Reviewed by Dean Jackson.

The Style::Resolver::styleForKeyframe() method would take in a const RenderStyle*
and a const StyleRuleKeyframe* but these parameters were used without null checks.
This patch changes this method signature to take in references instead, which involves
also changing the signature for Style::Resolver::keyframeStylesForAnimation().

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::getKeyframes):
(WebCore::KeyframeEffect::updateBlendingKeyframes):
(WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
(WebCore::KeyframeEffect::applyPendingAcceleratedActions):

  • rendering/style/KeyframeList.cpp:

(WebCore::KeyframeList::fillImplicitKeyframes):

  • rendering/style/KeyframeList.h:
  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::styleForKeyframe):
(WebCore::Style::Resolver::keyframeStylesForAnimation):

  • style/StyleResolver.h:
4:30 PM Changeset in webkit [289013] by Jon Davis
  • 2 edits in trunk/Websites/webkit.org

Improve color contrast of dark mode syntax highlighting
https://bugs.webkit.org/show_bug.cgi?id=236041

Reviewed by Simon Fraser.

  • wp-content/themes/webkit/style.css:

(@media(prefers-color-scheme:dark) :root):

4:09 PM Changeset in webkit [289012] by sihui_liu@apple.com
  • 5 edits in trunk/Source/WebKit

Remove OriginStorageManager if it's not in use
https://bugs.webkit.org/show_bug.cgi?id=236029

Reviewed by Darin Adler.

We should remove OriginStorageManager if it does not contains in-memory data and its origin data is not being
used by any web process.

  • NetworkProcess/storage/FileSystemStorageManager.cpp:

(WebKit::FileSystemStorageManager::isActive const):

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

(WebKit::NetworkStorageManager::stopReceivingMessageFromConnection):

  • NetworkProcess/storage/OriginStorageManager.cpp:

(WebKit::OriginStorageManager::StorageBucket::connectionClosed):
(WebKit::OriginStorageManager::StorageBucket::isActive const):

4:07 PM Changeset in webkit [289011] by Russell Epstein
  • 1 copy in tags/Safari-613.1.16.0.4

Tag Safari-613.1.16.0.4.

4:07 PM Changeset in webkit [289010] by Russell Epstein
  • 1 copy in tags/Safari-613.1.16.1.3

Tag Safari-613.1.16.1.3.

4:05 PM Changeset in webkit [289009] by Russell Epstein
  • 1 delete in tags/Safari-613.1.16.0.4

Delete tag.

4:05 PM Changeset in webkit [289008] by Russell Epstein
  • 1 delete in tags/Safari-613.1.16.1.3

Delete tag.

3:57 PM Changeset in webkit [289007] by mmaxfield@apple.com
  • 5 edits
    2 adds in trunk

Percentage word spacing doesn't incorporate synthetic bold expansion
https://bugs.webkit.org/show_bug.cgi?id=236007

Reviewed by Alan Bujtas.

Source/WebCore:

The solution is to copy the approach in https://trac.webkit.org/changeset/288944/webkit
to make sure the space glyph works correctly with synthetic bold and fallback fonts.

This also renames FontCascade::spaceWidth() to FontCascade::widthOfSpaceString(),
so it's more clear what it's actually doing.

Test: fast/text/synthetic-bold-percentage-word-spacing.html

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::metricsOfPrimaryFont const):
(WebCore::FontCascade::spaceWidth const): Deleted.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setWordSpacing):

LayoutTests:

  • fast/text/synthetic-bold-percentage-word-spacing-expected.html: Added.
  • fast/text/synthetic-bold-percentage-word-spacing.html: Added.
3:55 PM Changeset in webkit [289006] by Russell Epstein
  • 2 edits in branches/safari-613.1.16.1-branch/Source/WebCore

Cherry-pick r288667. rdar://problem/87830583

REGRESSION(r287684) speedtest.net uses many GB of memory
https://bugs.webkit.org/show_bug.cgi?id=235615
rdar://87830583

Reviewed by Youenn Fablet.

The regression was introduced with r286937 and is a good example of
errors introduced when attempting to optimise things too early.
CachedRawResource::updateBuffer does a search in the accumulating
resource's SharedBuffer, search that was taking O(log(n)+1) prior r286937
where n is the number of DataView segments in the SharedBuffer.
This was simplified as a O(1) operation by using the combined contiguous
SharedBuffer instead.
However, that caused every single intermediary accumulated buffers to be
kept referenced by the XMLHttpRequest SharedBufferBuilder leading to
massive memory use.
In other words:
For each update, we did the following steps:

  • Set m_data to a new big continuous chunk of data that stores all received data
  • Create a view of the new data as a SharedBuffer. This SharedBuffer references the big continuous chunk above
  • XHR stores a ref to the view, hence keep the big chunk alive.

Each XHR chunk, although small in data that can be accessed, is actually keeping in memory all temporary created m_data chunks.
Following this change, XHR will now only keeps a reference to the new DataSegment added since the last run rather than the entire previous content.

Fly-by: add some comments describing the running of the method.

  • loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::updateBuffer):

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

3:50 PM Changeset in webkit [289005] by Russell Epstein
  • 1 copy in tags/Safari-612.4.9.0.4

Tag Safari-612.4.9.0.4.

3:49 PM Changeset in webkit [289004] by Russell Epstein
  • 1 copy in tags/Safari-612.4.9.1.8

Tag Safari-612.4.9.1.8.

3:43 PM Changeset in webkit [289003] by Russell Epstein
  • 1 copy in tags/Safari-613.1.16.1.3

Tag Safari-613.1.16.1.3.

3:42 PM Changeset in webkit [289002] by Russell Epstein
  • 1 copy in tags/Safari-613.1.16.0.4

Tag Safari-613.1.16.0.4.

3:27 PM Changeset in webkit [289001] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Crash on several pages after r287986
https://bugs.webkit.org/show_bug.cgi?id=236033

Reviewed by Tim Horton.

I noticed that Safari crashes when opening https://linux.die.net/man/3/localtime.
This is happening after r287986: we are calling [self release], but the [JSValue dealloc]
cannot work if _context is nil. We should add a guard.

  • API/JSValue.mm:

(-[JSValue dealloc]):

  • API/tests/testapi.mm:

(testObjectiveCAPIMain):

3:25 PM Changeset in webkit [289000] by Chris Dumez
  • 7 edits
    1 move in trunk/Source/WebCore

Move TransferredMessagePort to its own header
https://bugs.webkit.org/show_bug.cgi?id=236028

Reviewed by Geoffrey Garen.

Move TransferredMessagePort to its own header so that Shared Worker doesn't need to include the whole MessageWithMessagePorts.h header.
It also facilitates passing a TransferredMessagePort in IPC, which will be needed.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/MessagePort.cpp:

(WebCore::MessagePort::postMessage):
(WebCore::MessagePort::disentanglePorts):
(WebCore::MessagePort::entanglePorts):

  • dom/MessagePort.h:
  • dom/messageports/MessageWithMessagePorts.h:
  • dom/messageports/TransferredMessagePort.h: Copied from Source/WebCore/dom/messageports/MessageWithMessagePorts.h.
3:04 PM Changeset in webkit [288999] by timothy@apple.com
  • 24 edits in trunk

Web Inspector: didShowExtensionTab needs to pass the frameID of the tab
https://bugs.webkit.org/show_bug.cgi?id=236023
rdar://problem/88383984

Reviewed by BJ Burg.

Source/WebCore:

  • inspector/InspectorFrontendClient.h:

(WebCore::InspectorFrontendClient::didShowExtensionTab):

  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::didShowExtensionTab):

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

Source/WebInspectorUI:

  • UserInterface/Views/WebInspectorExtensionTabContentView.js:

(WI.WebInspectorExtensionTabContentView.prototype._maybeDispatchDidShowExtensionTab):
(WI.WebInspectorExtensionTabContentView):

Source/WebKit:

  • UIProcess/API/APIInspectorExtensionClient.h:

(API::InspectorExtensionClient::didShowExtensionTab):

  • UIProcess/API/Cocoa/_WKInspectorExtensionDelegate.h:
  • UIProcess/Inspector/Cocoa/InspectorExtensionDelegate.h:
  • UIProcess/Inspector/Cocoa/InspectorExtensionDelegate.mm:

(WebKit::InspectorExtensionDelegate::InspectorExtensionDelegate):
(WebKit::InspectorExtensionDelegate::InspectorExtensionClient::didShowExtensionTab):

  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp:

(WebKit::WebInspectorUIExtensionControllerProxy::didShowExtensionTab):

  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h:
  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.messages.in:
  • WebProcess/Inspector/RemoteWebInspectorUI.cpp:

(WebKit::RemoteWebInspectorUI::didShowExtensionTab):

  • WebProcess/Inspector/RemoteWebInspectorUI.h:
  • WebProcess/Inspector/WebInspectorUI.cpp:

(WebKit::WebInspectorUI::didShowExtensionTab):

  • WebProcess/Inspector/WebInspectorUI.h:
  • WebProcess/Inspector/WebInspectorUIExtensionController.cpp:

(WebKit::WebInspectorUIExtensionController::didShowExtensionTab):

  • WebProcess/Inspector/WebInspectorUIExtensionController.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm:

(-[InspectorExtensionDelegateForTestingInspectorExtension inspectorExtension:didShowTabWithIdentifier:withFrameHandle:]):
(-[InspectorExtensionDelegateForTestingInspectorExtension inspectorExtension:didShowTabWithIdentifier:]): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm:

(-[InspectorExtensionDelegateForTesting inspectorExtension:didShowTabWithIdentifier:withFrameHandle:]):
(-[InspectorExtensionDelegateForTesting inspectorExtension:didShowTabWithIdentifier:]): Deleted.

2:37 PM Changeset in webkit [288998] by Russell Epstein
  • 2 edits in branches/safari-613.1.16.0-branch/Source/WebCore

Cherry-pick r288667. rdar://problem/87830583

REGRESSION(r287684) speedtest.net uses many GB of memory
https://bugs.webkit.org/show_bug.cgi?id=235615
rdar://87830583

Reviewed by Youenn Fablet.

The regression was introduced with r286937 and is a good example of
errors introduced when attempting to optimise things too early.
CachedRawResource::updateBuffer does a search in the accumulating
resource's SharedBuffer, search that was taking O(log(n)+1) prior r286937
where n is the number of DataView segments in the SharedBuffer.
This was simplified as a O(1) operation by using the combined contiguous
SharedBuffer instead.
However, that caused every single intermediary accumulated buffers to be
kept referenced by the XMLHttpRequest SharedBufferBuilder leading to
massive memory use.
In other words:
For each update, we did the following steps:

  • Set m_data to a new big continuous chunk of data that stores all received data
  • Create a view of the new data as a SharedBuffer. This SharedBuffer references the big continuous chunk above
  • XHR stores a ref to the view, hence keep the big chunk alive.

Each XHR chunk, although small in data that can be accessed, is actually keeping in memory all temporary created m_data chunks.
Following this change, XHR will now only keeps a reference to the new DataSegment added since the last run rather than the entire previous content.

Fly-by: add some comments describing the running of the method.

  • loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::updateBuffer):

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

2:30 PM Changeset in webkit [288997] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebInspectorUI

WebInspector: Add additional image MIME types to frontend
https://bugs.webkit.org/show_bug.cgi?id=235977

Reviewed by Patrick Angle.

Add MIME types around JPEG 2000, JPEG XL and AVIF. Sort the listings based on the file
extension to make it easier to spot missing image formats.

  • UserInterface/Base/MIMETypeUtilities.js:

(WI.mimeTypeForFileExtension):
(WI.fileExtensionForMIMEType):

2:13 PM Changeset in webkit [288996] by Patrick Angle
  • 6 edits
    1 add in trunk

No breakpoints hit on github.com, and some are invalid
https://bugs.webkit.org/show_bug.cgi?id=235607

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Added test case in: inspector/debugger/breakpoints/resolved-dump-all-pause-locations.html

Previously not all line terminations resulted in setting the m_lineStart to the current m_code, which meant
that the location for pause-able locations and stack traces were inaccurate when they were on a line that
terminated multi-line comments, strings, or template strings. We now always update m_lineStart when shifting for
a line terminator, instead of only when the terminator appears outside a string or comment.

  • debugger/Breakpoint.cpp:

(JSC::Breakpoint::resolve):

  • The existing assertions were somewhat in conflict with each other. If we permit the line number to increase,

there is no guarantee that the column number will remain the same or increase, which can now more easily occur
with multi-line strings. Instead, we should make sure that the overall offset has increase.

  • parser/Lexer.cpp:

(JSC::Lexer<T>::shiftLineTerminator):
(JSC::Lexer<T>::lexWithoutClearingLineTerminator):
(JSC::Lexer<T>::scanTemplateString):

  • Make sure the token start offset and start line offset are correctly set for strings.

LayoutTests:

Add test cases for resolving breakpoints on lines that begin with the end of multi-line strings, comments, and
template strings.

  • inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt:
  • inspector/debugger/breakpoints/resolved-dump-all-pause-locations.html:
  • inspector/debugger/breakpoints/resources/dump-multiline.js: Added.
1:53 PM Changeset in webkit [288995] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] YarrJIT m_checkedOffset should be pre-computed and stored to Yarr op
https://bugs.webkit.org/show_bug.cgi?id=235932

Reviewed by Keith Miller.

Instead of adhocly calculating m_checkedOffset while generating the machine code,
let's just pre-compute it and store it to Yarr JIT IR so that we can simplify
m_checkedOffset handling. This paves the way to also pre-compute safe-length
so that we can skip some of length check in parenthesized-assertions.

  • yarr/YarrJIT.cpp:
1:41 PM Changeset in webkit [288994] by Adrian Perez de Castro
  • 2 edits in trunk

[CMake] Stop defaulting to ld.gold
https://bugs.webkit.org/show_bug.cgi?id=235476

Reviewed by Michael Catanzaro.

Remove the USE_LD_GOLD option, and let the build use by default the system linker.

The output from running the linker with -Wl,--version is matched to determine which linker
is currently in use, and set variables LD_SUPPORTS_<feature> accordingly. This is needed
because not all of them support certain features and after a few attempts at doing feature
checks it was becoming clear that on one hand the checks were getting gnarly, and on the
other hand vetting certain linkers provides a stronger guarantee of sucessful builds.

Similarly, extend the check used to determine whether the static library archiver supports
thin archivers to cover the one included with LLVM (llvm-ar), and enable usage of think
archivers if they can be both created by the archiver and consumed by the linker. Previously
the build system was enabling thin archives without knowing whether the linker would succeed
using them.

  • Source/cmake/OptionsCommon.cmake:
1:38 PM Changeset in webkit [288993] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

[JSC] Remove compiler warning in TrailingArray.h
https://bugs.webkit.org/show_bug.cgi?id=236014

Patch by Xan Lopez <Xan Lopez> on 2022-02-02
Reviewed by Yusuke Suzuki.

  • wtf/TrailingArray.h:

(WTF::TrailingArray::TrailingArray): cast the std::distance result
to size_t, we want to compare the absolute value of the distance
with the 'unsigned int' size.

1:10 PM Changeset in webkit [288992] by Patrick Griffis
  • 20 edits in trunk

CSP: Fix returned WebAssembly error type when blocked
https://bugs.webkit.org/show_bug.cgi?id=235319

Reviewed by Kate Cheney.

LayoutTests/imported/w3c:

Update expectations with more passes.

  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-blocks-wasm.any-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-blocks-wasm.any.serviceworker-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-blocks-wasm.any.worker-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-wasm-unsafe-eval-allows-wasm.any-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-wasm-unsafe-eval-allows-wasm.any.serviceworker-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-wasm-unsafe-eval-allows-wasm.any.worker-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-blocks-wasm.any-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-blocks-wasm.any.serviceworker-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-blocks-wasm.any.worker-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-wasm-unsafe-eval-allows-wasm.any-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-wasm-unsafe-eval-allows-wasm.any.serviceworker-expected.txt:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-wasm-unsafe-eval-allows-wasm.any.worker-expected.txt:

Source/JavaScriptCore:

As per the spec it should return WebAssembly.CompileError.

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::tryCreate):

LayoutTests:

Update expectations.

  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-about-blank-iframe-expected.txt:
  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-external-script-expected.txt:
  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-subframe-expected.txt:
1:08 PM Changeset in webkit [288991] by Said Abou-Hallawa
  • 16 edits in trunk

[GPU Process] Remove DisplayList::Replayer::Delegate and DisplayList::RecorderImpl::Delegate
https://bugs.webkit.org/show_bug.cgi?id=235939

Reviewed by Wenson Hsieh.

Source/WebCore:

These classes are abstract classes and they are not overridden by any
client right now. These unused classes should be removed after the display
list stream connection refactoring.

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::displayListForTextRun const):

  • platform/graphics/ImageBuffer.h:

(WebCore::ImageBuffer::changeDestinationImageBuffer): Deleted.
(WebCore::ImageBuffer::prepareToAppendDisplayListItems): Deleted.

  • platform/graphics/displaylists/DisplayListDrawingContext.cpp:

(WebCore::DisplayList::DrawingContext::DrawingContext):

  • platform/graphics/displaylists/DisplayListDrawingContext.h:

(WebCore::DisplayList::DrawingContext::DrawingContext):

  • platform/graphics/displaylists/DisplayListImageBuffer.h:

(WebCore::DisplayList::ImageBuffer::ImageBuffer):

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

(WebCore::DisplayList::RecorderImpl::RecorderImpl):
(WebCore::DisplayList::RecorderImpl::recordResourceUse):
(WebCore::DisplayList::RecorderImpl::canAppendItemOfType const): Deleted.
(WebCore::DisplayList::RecorderImpl::canDrawImageBuffer const): Deleted.
(WebCore::DisplayList::RecorderImpl::renderingMode const): Deleted.

  • platform/graphics/displaylists/DisplayListRecorderImpl.h:

(WebCore::DisplayList::RecorderImpl::append):
(WebCore::DisplayList::RecorderImpl::Delegate::~Delegate): Deleted.
(WebCore::DisplayList::RecorderImpl::Delegate::canAppendItemOfType): Deleted.
(WebCore::DisplayList::RecorderImpl::Delegate::recordNativeImageUse): Deleted.
(WebCore::DisplayList::RecorderImpl::Delegate::isCachedImageBuffer const): Deleted.
(WebCore::DisplayList::RecorderImpl::Delegate::recordFontUse): Deleted.
(WebCore::DisplayList::RecorderImpl::Delegate::recordImageBufferUse): Deleted.
(WebCore::DisplayList::RecorderImpl::Delegate::renderingMode const): Deleted.

  • platform/graphics/displaylists/DisplayListReplayer.cpp:

(WebCore::DisplayList::Replayer::Replayer):
(WebCore::DisplayList::applyImageBufferItem):
(WebCore::DisplayList::applyNativeImageItem):
(WebCore::DisplayList::applySetStateItem):
(WebCore::DisplayList::applyFontItem):
(WebCore::DisplayList::Replayer::applyItem):

  • platform/graphics/displaylists/DisplayListReplayer.h:

(WebCore::DisplayList::Replayer::Delegate::~Delegate): Deleted.
(WebCore::DisplayList::Replayer::Delegate::apply): Deleted.
(WebCore::DisplayList::Replayer::Delegate::didCreateMaskImageBuffer): Deleted.
(WebCore::DisplayList::Replayer::Delegate::didResetMaskImageBuffer): Deleted.
(WebCore::DisplayList::Replayer::Delegate::recordResourceUse): Deleted.

Source/WebKit:

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:

(WebKit::RemoteDisplayListRecorderProxy::recordResourceUse):
(WebKit::RemoteDisplayListRecorderProxy::canDrawImageBuffer const): Deleted.

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:

(TestWebKitAPI::TEST):

12:54 PM Changeset in webkit [288990] by Lauro Moura
  • 2 edits in trunk/Source/WebCore

[GLIB] Unreviewed debug buildfix after r288872
https://bugs.webkit.org/show_bug.cgi?id=236036

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::localizedRoleName):

12:51 PM Changeset in webkit [288989] by commit-queue@webkit.org
  • 12 edits in trunk

Unmute link errors for ES module scripts
https://bugs.webkit.org/show_bug.cgi?id=235925

Patch by Asumu Takikawa <asumu@igalia.com> on 2022-02-02
Reviewed by Yusuke Suzuki.

LayoutTests/imported/w3c:

Adjust test expectations for error handling changes.

  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/choice-of-error-2-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-type-3-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-1-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-2-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-3-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7-expected.txt:

Source/WebCore:

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):

12:49 PM Changeset in webkit [288988] by Ryan Haddad
  • 2 edits in trunk/Tools

Bring up additional test queues on Big Sur
https://bugs.webkit.org/show_bug.cgi?id=235446

Unreviewed infrastructure fix.

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

(WebKitBuildbot): Move the performance queue to the Big Sur section of the dashboard.

12:41 PM Changeset in webkit [288987] by Russell Epstein
  • 6 edits in branches/safari-613-branch

Cherry-pick r288955. rdar://problem/88359001

Unreviewed, reverting r286988.
https://bugs.webkit.org/show_bug.cgi?id=236006

Broke form submission for multiple <input type='image'>

Reverted changeset:

"A FormData constructed in the form's submit event listener
shouldn't include the submitter"
https://bugs.webkit.org/show_bug.cgi?id=234069
https://commits.webkit.org/r286988

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

12:41 PM Changeset in webkit [288986] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288423. rdar://problem/87701738

m_lastStyleChangeEventStyle null ptr deref for accelerated CSS Animation with no duration and an implicit keyframe
https://bugs.webkit.org/show_bug.cgi?id=235394
<rdar://problem/87701738>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: webanimations/accelerated-animation-without-duration-crash.html

In r287827, the fix for bug 235014, we stopped filling implicit keyframes for CSS Animations at creation
time such that the output of getKeyframes() would correctly account for the missing keyframes. This meant
that we have to fill in those implicit keyframes when running an accelerated animation before we pass it
on to GraphicsLayer.

We would always use the value stored by lastStyleChangeEventStyle() with an assert that this value was
never null. However, in the case of an animation that is not relevant, such as a CSS Animation with no
duration, we've never had a chance to set that style since Style::TreeResolver::createAnimatedElementUpdate()
would not see any "relevant" (a term defined by the Web Animations specification to specify an animation
that has an effect on its target) animations.

We now use the renderer's style as a fallback, which is guaranteed to be defined at this stage.

  • animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::applyPendingAcceleratedActions):

LayoutTests:

New test, created by Gabriel Nava Marino, that creates an accelerated animation with no
duration and with implicit keyframes that would crash prior to this patch.

  • webanimations/accelerated-animation-without-duration-crash-expected.txt: Added.
  • webanimations/accelerated-animation-without-duration-crash.html: Added.

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

12:40 PM Changeset in webkit [288985] by Pablo Saavedra
  • 4 edits in trunk/Source/WebCore

Fixes for non-unified builds after r288868
https://bugs.webkit.org/show_bug.cgi?id=235984

Reviewed by Chris Dumez.

  • layout/integration/InlineIteratorInlineBox.cpp:
  • rendering/RenderBlockFlow.cpp:
  • rendering/RenderInline.cpp:
12:40 PM Changeset in webkit [288984] by Russell Epstein
  • 12 edits in branches/safari-613-branch/Source/WebKit

Apply patch. rdar://problem/86150540

12:33 PM Changeset in webkit [288983] by Russell Epstein
  • 6 edits in branches/safari-613.1.16.1-branch

Cherry-pick r288955. rdar://problem/88359001

Unreviewed, reverting r286988.
https://bugs.webkit.org/show_bug.cgi?id=236006

Broke form submission for multiple <input type='image'>

Reverted changeset:

"A FormData constructed in the form's submit event listener
shouldn't include the submitter"
https://bugs.webkit.org/show_bug.cgi?id=234069
https://commits.webkit.org/r286988

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

12:33 PM Changeset in webkit [288982] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613.1.16.1-branch

Cherry-pick r288423. rdar://problem/87701738

m_lastStyleChangeEventStyle null ptr deref for accelerated CSS Animation with no duration and an implicit keyframe
https://bugs.webkit.org/show_bug.cgi?id=235394
<rdar://problem/87701738>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: webanimations/accelerated-animation-without-duration-crash.html

In r287827, the fix for bug 235014, we stopped filling implicit keyframes for CSS Animations at creation
time such that the output of getKeyframes() would correctly account for the missing keyframes. This meant
that we have to fill in those implicit keyframes when running an accelerated animation before we pass it
on to GraphicsLayer.

We would always use the value stored by lastStyleChangeEventStyle() with an assert that this value was
never null. However, in the case of an animation that is not relevant, such as a CSS Animation with no
duration, we've never had a chance to set that style since Style::TreeResolver::createAnimatedElementUpdate()
would not see any "relevant" (a term defined by the Web Animations specification to specify an animation
that has an effect on its target) animations.

We now use the renderer's style as a fallback, which is guaranteed to be defined at this stage.

  • animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::applyPendingAcceleratedActions):

LayoutTests:

New test, created by Gabriel Nava Marino, that creates an accelerated animation with no
duration and with implicit keyframes that would crash prior to this patch.

  • webanimations/accelerated-animation-without-duration-crash-expected.txt: Added.
  • webanimations/accelerated-animation-without-duration-crash.html: Added.

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

12:33 PM Changeset in webkit [288981] by Russell Epstein
  • 12 edits in branches/safari-613.1.16.1-branch/Source/WebKit

Apply patch. rdar://problem/86150540

12:28 PM Changeset in webkit [288980] by Russell Epstein
  • 6 edits in branches/safari-613.1.16.0-branch

Cherry-pick r288955. rdar://problem/88359001

Unreviewed, reverting r286988.
https://bugs.webkit.org/show_bug.cgi?id=236006

Broke form submission for multiple <input type='image'>

Reverted changeset:

"A FormData constructed in the form's submit event listener
shouldn't include the submitter"
https://bugs.webkit.org/show_bug.cgi?id=234069
https://commits.webkit.org/r286988

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

12:28 PM Changeset in webkit [288979] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613.1.16.0-branch

Cherry-pick r288423. rdar://problem/87701738

m_lastStyleChangeEventStyle null ptr deref for accelerated CSS Animation with no duration and an implicit keyframe
https://bugs.webkit.org/show_bug.cgi?id=235394
<rdar://problem/87701738>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: webanimations/accelerated-animation-without-duration-crash.html

In r287827, the fix for bug 235014, we stopped filling implicit keyframes for CSS Animations at creation
time such that the output of getKeyframes() would correctly account for the missing keyframes. This meant
that we have to fill in those implicit keyframes when running an accelerated animation before we pass it
on to GraphicsLayer.

We would always use the value stored by lastStyleChangeEventStyle() with an assert that this value was
never null. However, in the case of an animation that is not relevant, such as a CSS Animation with no
duration, we've never had a chance to set that style since Style::TreeResolver::createAnimatedElementUpdate()
would not see any "relevant" (a term defined by the Web Animations specification to specify an animation
that has an effect on its target) animations.

We now use the renderer's style as a fallback, which is guaranteed to be defined at this stage.

  • animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::applyPendingAcceleratedActions):

LayoutTests:

New test, created by Gabriel Nava Marino, that creates an accelerated animation with no
duration and with implicit keyframes that would crash prior to this patch.

  • webanimations/accelerated-animation-without-duration-crash-expected.txt: Added.
  • webanimations/accelerated-animation-without-duration-crash.html: Added.

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

12:27 PM Changeset in webkit [288978] by Russell Epstein
  • 9 edits in branches/safari-613.1.16.1-branch/Source

Versioning.

WebKit-7613.1.16.1.3

12:06 PM Changeset in webkit [288977] by Said Abou-Hallawa
  • 4 edits
    2 adds in trunk

REGRESSION(r288865): SourceImage should never sink its ImageBuffer to a NativeImage
https://bugs.webkit.org/show_bug.cgi?id=236005

Reviewed by Simon Fraser.

Source/WebCore:

The r288865 changes SourceImage::nativeImage() such that if the image
variant has an ImageBuffer, it will sink this ImageBuffer into a NativeImage
and return this NativeImage to the caller. This was incorrect change
because this would invalidate the ImageBufferBackend of the SourceImage.

The fix is to copy the ImageBuffer to a NativeImage (DontCopyBackingStore)
and store it into another image variant. This will keep the ImageBuffer
valid and will prevent subsequent conversion if this function is called
multiple times.

Similar changes should be applied to SourceImage::imageBuffer().

Test: svg/custom/pattern-multiple-referencing.html

  • platform/graphics/SourceImage.cpp:

(WebCore::nativeImageOf):
(WebCore::SourceImage::nativeImageIfExists const):
(WebCore::SourceImage::nativeImage const):
(WebCore::imageBufferOf):
(WebCore::SourceImage::imageBufferIfExists const):
(WebCore::SourceImage::imageBuffer const):

  • platform/graphics/SourceImage.h:

LayoutTests:

  • svg/custom/pattern-multiple-referencing-expected.txt: Added.
  • svg/custom/pattern-multiple-referencing.html: Added.
11:58 AM Changeset in webkit [288976] by Russell Epstein
  • 9 edits in branches/safari-613.1.16.0-branch/Source

Versioning.

WebKit-7613.1.16.0.4

11:56 AM Changeset in webkit [288975] by Chris Dumez
  • 8 edits
    4 moves
    1 add in trunk/Source/WebCore

Move SharedWorkerThread & SharedWorkerProxy to workers/shared/context/
https://bugs.webkit.org/show_bug.cgi?id=236017

Reviewed by Youenn Fablet.

Move SharedWorkerThread & SharedWorkerProxy to workers/shared/context/, for consistency with service workers.
Also rename SharedWorkerProxy to SharedWorkerThreadProxy.

  • CMakeLists.txt:
  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • workers/shared/SharedWorker.cpp:

(WebCore::SharedWorker::SharedWorker):

  • workers/shared/SharedWorker.h:
  • workers/shared/SharedWorkerManager.cpp:
  • workers/shared/context/SharedWorkerThread.cpp: Renamed from Source/WebCore/workers/shared/SharedWorkerThread.cpp.
  • workers/shared/context/SharedWorkerThread.h: Renamed from Source/WebCore/workers/shared/SharedWorkerThread.h.
  • workers/shared/context/SharedWorkerThreadProxy.cpp: Renamed from Source/WebCore/workers/shared/SharedWorkerProxy.cpp.
  • workers/shared/context/SharedWorkerThreadProxy.h: Renamed from Source/WebCore/workers/shared/SharedWorkerProxy.h.
11:51 AM Changeset in webkit [288974] by Chris Dumez
  • 7 edits in trunk/Source/WebCore

Support sending WorkerOptions over IPC
https://bugs.webkit.org/show_bug.cgi?id=236026

Reviewed by Sam Weinig.

Support sending WorkerOptions over IPC, as this is will needed by Shared Workers.

  • workers/WorkerGlobalScopeProxy.h:
  • workers/WorkerOptions.h:

(WebCore::WorkerOptions::encode const):
(WebCore::WorkerOptions::decode):

  • workers/WorkerType.h:
  • workers/service/ServiceWorkerContainer.h:
  • workers/service/ServiceWorkerRegistrationOptions.h:
  • workers/service/server/SWServerWorker.h:
11:30 AM Changeset in webkit [288973] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Enable overflow:clip feature
https://bugs.webkit.org/show_bug.cgi?id=236008

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

Enable overflow:clip feature.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
11:13 AM Changeset in webkit [288972] by Chris Dumez
  • 9 edits
    3 adds in trunk/Source

Move and rename ServiceWorkerFrameLoaderClient & ServiceWorkerLibWebRTCProvider
https://bugs.webkit.org/show_bug.cgi?id=236016

Reviewed by Youenn Fablet.

Move and rename ServiceWorkerFrameLoaderClient & ServiceWorkerLibWebRTCProvider so that they can be reused by Shared Workers.

Source/WebCore:

  • loader/FrameLoaderClient.h:

Source/WebKit:

  • Platform/Logging.h:
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):

  • WebProcess/Storage/RemoteWorkerFrameLoaderClient.cpp: Added.

(WebKit::RemoteWorkerFrameLoaderClient::RemoteWorkerFrameLoaderClient):
(WebKit::RemoteWorkerFrameLoaderClient::createDocumentLoader):

  • WebProcess/Storage/RemoteWorkerFrameLoaderClient.h: Added.

(isType):

  • WebProcess/Storage/RemoteWorkerLibWebRTCProvider.h: Added.
  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::installServiceWorker):
(WebKit::WebSWContextManagerConnection::continueDidReceiveFetchResponse):
(): Deleted.
(WebKit::ServiceWorkerFrameLoaderClient::ServiceWorkerFrameLoaderClient): Deleted.
(WebKit::ServiceWorkerFrameLoaderClient::createDocumentLoader): Deleted.

  • WebProcess/Storage/WebSWContextManagerConnection.h:

(isType): Deleted.

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

[GStreamer] Generate webrtc encoder src pad template based on supported platform encoders
https://bugs.webkit.org/show_bug.cgi?id=235964

Patch by Philippe Normand <pnormand@igalia.com> on 2022-02-02
Reviewed by Xabier Rodriguez-Calvar.

Without this patch there was no guarantee the encoder would setup correctly in case the
encoder matching the requested caps is not available at runtime.

  • platform/mediastream/gstreamer/GStreamerVideoEncoder.cpp:

(Encoders::registerEncoder):
(createSrcPadTemplateCaps):
(webkit_webrtc_video_encoder_class_init):

10:50 AM Changeset in webkit [288970] by mark.lam@apple.com
  • 6 edits in trunk/Source

Update computation of FAST_TLS base.
https://bugs.webkit.org/show_bug.cgi?id=235934

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::loadFromTLS32):
(JSC::MacroAssemblerARM64::loadFromTLS64):
(JSC::MacroAssemblerARM64::storeToTLS32):
(JSC::MacroAssemblerARM64::storeToTLS64):

  • assembler/SecureARM64EHashPinsInlines.h:

(JSC::SecureARM64EHashPins::keyForCurrentThread):

  • offlineasm/arm64.rb:

Source/WTF:

  • wtf/PlatformHave.h:
10:46 AM Changeset in webkit [288969] by Jonathan Bedard
  • 2 edits in trunk/Tools

[git-webkit] Improve user prompts (Part 5)
https://bugs.webkit.org/show_bug.cgi?id=235655
<rdar://problem/88082697>

Reviewed by Aakash Jain and Dewei Zhu.

  • Tools/Scripts/git-webkit: Log to 'info' not 'warning.'

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

10:46 AM Changeset in webkit [288968] by Jonathan Bedard
  • 7 edits in trunk/Tools

[git-webkit] Improve user prompts (Part 4)
https://bugs.webkit.org/show_bug.cgi?id=235655
<rdar://problem/88082697>

Reviewed by Aakash Jain and Dewei Zhu.

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

(Branch.main): Make it clear why we're prompting the user for a branch name.

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

(TestBranch.test_prompt_git):

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

10:46 AM Changeset in webkit [288967] by Jonathan Bedard
  • 5 edits in trunk/Tools

[git-webkit] Improve user prompts (Part 3)
https://bugs.webkit.org/show_bug.cgi?id=235655
<rdar://problem/88082697>

Reviewed by Aakash Jain and Dewei Zhu.

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

(Setup.git): Make it clear to users that configurations are being set only
on the local repository.

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:

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

10:46 AM Changeset in webkit [288966] by Jonathan Bedard
  • 5 edits in trunk/Tools

[git-webkit] Improve user prompts (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=235655
<rdar://problem/88082697>

Reviewed by Aakash Jain and Dewei Zhu.

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

(Terminal.input): Gracefully handle keyboard interrupt

  • Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/terminal_unittest.py:

(TerminalTests.test_interrupt):

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

10:45 AM Changeset in webkit [288965] by Jonathan Bedard
  • 5 edits in trunk/Tools

[git-webkit] Improve user prompts (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=235655
<rdar://problem/88082697>

Reviewed by Aakash Jain and Dewei Zhu.

  • Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py: Use token form url.
  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py: Use token form url.

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

10:44 AM Changeset in webkit [288964] by graouts@webkit.org
  • 3 edits in trunk/Source/WebCore

CSSPropertyAnimation::animatableShorthandsAffectingProperty() is unused
https://bugs.webkit.org/show_bug.cgi?id=236022

Reviewed by Dean Jackson.

This method is a remnant from the legacy animation engine and should be removed.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty): Deleted.

  • animation/CSSPropertyAnimation.h:
  • animation/CSSPropertyAnimation.cpp:

(WebCore::gatherEnclosingShorthandProperties): Deleted.
(WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty): Deleted.

  • animation/CSSPropertyAnimation.h:
10:42 AM Changeset in webkit [288963] by Andres Gonzalez
  • 5 edits in trunk/Source/WebCore

Make modifications to the isolated Tree atomic.
https://bugs.webkit.org/show_bug.cgi?id=235683
<rdar://problem/88108412>

Reviewed by Chris Fleizach.

Covered by existing tests.

The isolated tree is currently updated in a non-atomic fashion, i.e.,
nodes are added or removed while clients are accessing the tree in an
inconsistent state. The idea of this patch is to make all necessary
changes in the tree in one atomic operation while the client thread,
or AX secondary thread, is blocked. To accomplish this and still be
responsive to client's requests on the AX thread, it is necessary that
all the processing in preparation for the update of the isolated tree
happens on the main thread without blocking the AX thread, and then do
the update of the tree in one atomic operation.

  • accessibility/AXLogger.cpp:

(WebCore::operator<<):
Rearranged the properties of the AXCoreObject to log most relevant on top.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):
Removed AXTRACE from this method since it is called so often that it is
just noise in the log.

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::generateSubtree):
It now collects all the changes to be perform and queues them in one
operation under lock.
(WebCore::AXIsolatedTree::nodeChangeForObject):
(WebCore::AXIsolatedTree::queueChange):
Queues one single change, must be called under lock.
(WebCore::AXIsolatedTree::queueChangesAndRemovals):
Queues all necessary changes to the isolated tree, additions and removals.
(WebCore::AXIsolatedTree::collectNodeChangesForSubtree):
Collects on the main thread all the additions/changes to be done to the
isolated tree.
(WebCore::AXIsolatedTree::updateNode):
(WebCore::AXIsolatedTree::nodeAncestryChanges):
Connects a new isolated node to the existing hierarchy.
(WebCore::AXIsolatedTree::updateChildren):
(WebCore::AXIsolatedTree::removeSubtreeFromNodeMap):
(WebCore::AXIsolatedTree::updateChildrenIDs): Deleted.
(WebCore::AXIsolatedTree::createSubtree): Deleted.
Replaced with collectNodeChanges and queueChangesAndRemovals.
(WebCore::AXIsolatedTree::updateSubtree): Deleted, not used.
(WebCore::AXIsolatedTree::removeSubtree): Deleted, not used.

  • accessibility/isolatedtree/AXIsolatedTree.h:

(WebCore::AXIsolatedTree::queueChangesAndRemovals):

10:32 AM Changeset in webkit [288962] by Sam Sneddon
  • 2 edits in trunk/Tools

REGRESSION (r288869): webkitpy.w3c.test_converter_unittest.W3CTestConverterTest.test_convert_prefixed_properties is failing
https://bugs.webkit.org/show_bug.cgi?id=235961
<rdar://problem/88332029>

Reviewed by Ryan Haddad.

  • Scripts/webkitpy/w3c/test_converter_unittest.py:

(test_convert_prefixed_properties): Correct magic constant for number of tests.
(generate_test_content): Simplify, add clear assertion to catch in future.

10:14 AM Changeset in webkit [288961] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the macOS build after r288956
https://bugs.webkit.org/show_bug.cgi?id=235991

  • UIProcess/Cocoa/WebViewImpl.h:
10:10 AM Changeset in webkit [288960] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

null ptr deref in Editor::pasteWithPasteboard
https://bugs.webkit.org/show_bug.cgi?id=235966

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-02
Reviewed by Wenson Hsieh.

Add an additional check as pasteAsFragment's dispatchEvent can end up removing the client.

No new tests due to requiring Node web server (and cannot reproduce in LayoutTests/http/tests).

  • editing/mac/EditorMac.mm:

(WebCore::Editor::pasteWithPasteboard):

10:05 AM Changeset in webkit [288959] by Patrick Griffis
  • 5 edits
    55 adds in trunk/LayoutTests

WPT: Import WebAssembly CSP tests
https://bugs.webkit.org/show_bug.cgi?id=235319

Reviewed by Kate Cheney.

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-blocks-wasm.any-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-blocks-wasm.any.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-blocks-wasm.any.js: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-blocks-wasm.any.js.headers: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-blocks-wasm.any.serviceworker-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-blocks-wasm.any.serviceworker.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-blocks-wasm.any.worker-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-blocks-wasm.any.worker.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-unsafe-eval-allows-wasm.any-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-unsafe-eval-allows-wasm.any.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-unsafe-eval-allows-wasm.any.js: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-unsafe-eval-allows-wasm.any.js.headers: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-unsafe-eval-allows-wasm.any.serviceworker-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-unsafe-eval-allows-wasm.any.serviceworker.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-unsafe-eval-allows-wasm.any.worker-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-unsafe-eval-allows-wasm.any.worker.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-wasm-unsafe-eval-allows-wasm.any-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-wasm-unsafe-eval-allows-wasm.any.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-wasm-unsafe-eval-allows-wasm.any.js: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-wasm-unsafe-eval-allows-wasm.any.js.headers: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-wasm-unsafe-eval-allows-wasm.any.serviceworker-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-wasm-unsafe-eval-allows-wasm.any.serviceworker.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-wasm-unsafe-eval-allows-wasm.any.worker-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/default-src-wasm-unsafe-eval-allows-wasm.any.worker.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-blocks-wasm.any-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-blocks-wasm.any.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-blocks-wasm.any.js: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-blocks-wasm.any.js.headers: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-blocks-wasm.any.serviceworker-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-blocks-wasm.any.serviceworker.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-blocks-wasm.any.worker-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-blocks-wasm.any.worker.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-spv-asynch.any.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-spv-asynch.any.js: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-spv-asynch.any.js.headers: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-spv-asynch.any.serviceworker.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-spv-asynch.any.worker.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-unsafe-eval-allows-wasm.any-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-unsafe-eval-allows-wasm.any.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-unsafe-eval-allows-wasm.any.js: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-unsafe-eval-allows-wasm.any.js.headers: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-unsafe-eval-allows-wasm.any.serviceworker-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-unsafe-eval-allows-wasm.any.serviceworker.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-unsafe-eval-allows-wasm.any.worker-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-unsafe-eval-allows-wasm.any.worker.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-wasm-unsafe-eval-allows-wasm.any-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-wasm-unsafe-eval-allows-wasm.any.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-wasm-unsafe-eval-allows-wasm.any.js: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-wasm-unsafe-eval-allows-wasm.any.js.headers: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-wasm-unsafe-eval-allows-wasm.any.serviceworker-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-wasm-unsafe-eval-allows-wasm.any.serviceworker.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-wasm-unsafe-eval-allows-wasm.any.worker-expected.txt: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-wasm-unsafe-eval-allows-wasm.any.worker.html: Added.
  • web-platform-tests/content-security-policy/wasm-unsafe-eval/w3c-import.log: Added.

LayoutTests:

Skip CSP tests that time out.

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

[EWS] unit tests have become slower
https://bugs.webkit.org/show_bug.cgi?id=235364
<rdar://problem/88073408>

Reviewed by Aakash Jain.

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

time.sleep when testing PushCommitToWebKitRepo.

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

9:54 AM Changeset in webkit [288957] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][WP] Add access in sandbox to Mach message
https://bugs.webkit.org/show_bug.cgi?id=236021
<rdar://88300200>

Reviewed by Brent Fulgham.

Add access in sandbox to required Mach message in the WebContent process on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
9:52 AM Changeset in webkit [288956] by Wenson Hsieh
  • 6 edits in trunk/Source/WebKit

Adjust some Live Text code to only use VKC-prefixed VisionKit classes if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
https://bugs.webkit.org/show_bug.cgi?id=235991

Reviewed by Megan Gardner.

Rather than creating VKCImageAnalysis/VKCImageAnalyzer/VKCImageAnalyzerRequest and statically casting to
VKImageAnalysis/VKImageAnalyzer/VKImageAnalyzerRequest respectively, add a typedef that abstracts away the
differing VK/VKC prefixes behind CocoaImage(Analysis|Analyzer|AnalyzerRequest), and use this typedef everywhere
we currently use the VK-prefixed types.

Since the VK-prefixed classes are being entirely removed and replaced with VKC-prefixed classes at some point,
this allows us to be consistent (at least, within a given OS version) about the VisionKit object types we're
creating and passing around in Live Text code.

No change in behavior.

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

(WebKit::createImageAnalyzer):
(WebKit::createImageAnalyzerRequest):
(WebKit::makeTextRecognitionResult):
(WebKit::hasVisionKitCorePrefixedClasses): Deleted.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::ensureImageAnalyzer):
(WebKit::createImageAnalyzerRequest):
(WebKit::WebViewImpl::requestTextRecognition):
(WebKit::WebViewImpl::computeHasImageAnalysisResults):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView imageAnalyzer]):
(-[WKContentView createImageAnalyzerRequest:image:imageURL:]):
(-[WKContentView createImageAnalyzerRequest:image:]):
(-[WKContentView _updateContextMenuForMachineReadableCodeForImageAnalysis:]):
(-[WKContentView requestTextRecognition:imageData:identifier:completionHandler:]):
(-[WKContentView imageAnalysisGestureDidBegin:]):
(-[WKContentView _completeImageAnalysisRequestForContextMenu:requestIdentifier:hasTextResults:]):
(-[WKContentView imageAnalysisGestureDidTimeOut:]):

9:19 AM Changeset in webkit [288955] by commit-queue@webkit.org
  • 6 edits in trunk

Unreviewed, reverting r286988.
https://bugs.webkit.org/show_bug.cgi?id=236006

Broke form submission for multiple <input type='image'>

Reverted changeset:

"A FormData constructed in the form's submit event listener
shouldn't include the submitter"
https://bugs.webkit.org/show_bug.cgi?id=234069
https://commits.webkit.org/r286988

8:57 AM Changeset in webkit [288954] by youenn@apple.com
  • 9 edits in trunk/Source

RealtimeVideoSource::adaptVideoSample should not create IOSurfaces when running in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=236011
<rdar://88367968>

Reviewed by Eric Carlson.

Source/WebCore:

Add a way to not use IOSurfaces when using ImageTransferSessionVT.
Use this in RealtimeVideoSource to toggle IOSurface use on and off when downsampling samples.

Covered by existing tests.

  • platform/graphics/cv/CVUtilities.h:
  • platform/graphics/cv/CVUtilities.mm:
  • platform/graphics/cv/ImageTransferSessionVT.h:
  • platform/graphics/cv/ImageTransferSessionVT.mm:
  • platform/mediastream/RealtimeVideoSource.cpp:
  • platform/mediastream/RealtimeVideoSource.h:

Source/WebKit:

Disable IOSurface use for WebProcess RealtimeVideoSources.

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:
8:43 AM Changeset in webkit [288953] by Tyler Wilcock
  • 2 edits in trunk/Source/WebCore

AX: Display startObject and anchorObject objectID when logging AccessibilitySearchCriteria from AXLogger
https://bugs.webkit.org/show_bug.cgi?id=235997

Reviewed by Chris Fleizach.

With this patch, logging AccessibilitySearchCriteria will look like:

(SearchCriteria 0x2a7d13a80

(anchorObject 0x315ba9980, ID 492)
(startObject 0x0, ID 0)
...truncated...

This will help us correlate the IDs of anchorObject and startObject with other
log statements.

  • accessibility/AXLogger.cpp:

(WebCore::operator<<):

7:37 AM Changeset in webkit [288952] by aakash_jain@apple.com
  • 1 edit in trunk/Tools/CISupport/ews-build/loadConfig.py

[ews] Read buildbot try credentials from passwords.json instead of env variables
https://bugs.webkit.org/show_bug.cgi?id=236015

Reviewed by Jonathan Bedard.

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

(loadBuilderConfig):

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

5:20 AM Changeset in webkit [288951] by youenn@apple.com
  • 21 edits
    4 adds in trunk/Source

LibWebRTCCodecs should not need to create IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=235951
<rdar://problem/88326654>

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Introduce helper routines to copy a webrtc VideoFrame into a memory buffer and get a CVPixelBuffer from a webrtc VideoFrame.

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.h:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm:

Source/WebCore:

Introduce SharedVideoFrameInfo as a helper class to serialize a CVPixelBuffer into memory and create a CVPixelBuffer from reading memory.

Covered by existing webrtc tests.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/cocoa/SharedVideoFrameInfo.h: Added.
  • platform/cocoa/SharedVideoFrameInfo.mm: Added.
  • platform/cocoa/CoreVideoSoftLink.cpp:
  • platform/cocoa/CoreVideoSoftLink.h:
  • platform/graphics/RemoteVideoSample.cpp:
  • platform/graphics/RemoteVideoSample.h:

Source/WebKit:

Introduce SharedVideoFrameWriter and SharedVideoFrameReader to support shared memory sending of CVPixelBuffers that are non IOSurface backed.
To do so, we make use of SharedVideoFrameInfo from WebCore.
What we do is:

  • When getting a frame, allocate a shared memory that is big enough to copy its data and info in it. Create a semaphore to sync reader and writer.
  • If we allocate shared memory/semphore, send them over IPC to the SharedVideoFrameReader.
  • Wait for semaphore to tell us reader is fine for writing.
  • Write SharedVideoFrameInfo into the shared memory, then copy the raw bytes into the shared memory.
  • Send through IPC the video frame, no MacSendRight means to read the shared memory.

On reader side, for every frame that does not have an IOSurface, we read the shared memory, create an IOSurface from it and notify WebProcess that it can write the next frame.

In memory buffers are used for black frames at least.
webrtc/video-mute.html covers the patch.

  • GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
  • WebProcess/GPU/webrtc/SharedVideoFrame.cpp: Added.
  • WebProcess/GPU/webrtc/SharedVideoFrame.h: Added.
2:30 AM Changeset in webkit [288950] by youenn@apple.com
  • 60 edits in trunk

Clarify that some UUID routines are dedicated to UUID v4
https://bugs.webkit.org/show_bug.cgi?id=235430

Reviewed by Darin Adler.

Source/WebCore:

No change of behavior, this is renaming only.

  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:

(WebCore::CDMSessionClearKey::CDMSessionClearKey):

  • Modules/entriesapi/DOMFileSystem.cpp:

(WebCore::DOMFileSystem::DOMFileSystem):

  • Modules/highlight/AppHighlightStorage.cpp:

(WebCore::createAppHighlightRangeData):

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::generateUUID):

  • Modules/mediastream/MediaDevices.cpp:

(WebCore::MediaDevices::MediaDevices):

  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::create):

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::generateDatabaseFileName):

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::registerRoot):
(WebCore::AccessibilityAtspi::registerObject):
(WebCore::AccessibilityAtspi::registerHyperlink):

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::copyPropertiesFromSource):
(WebCore::KeyframeEffect::updateBlendingKeyframes):
(WebCore::KeyframeEffect::computeCSSTransitionBlendingKeyframes):

  • dom/Document.cpp:

(WebCore::Document::originIdentifierForPasteboard const):
(WebCore::Document::didInsertAttachmentElement):

  • fileapi/BlobURL.cpp:

(WebCore::BlobURL::createBlobURL):

  • html/HTMLAttachmentElement.cpp:

(WebCore::HTMLAttachmentElement::ensureUniqueIdentifier):

  • loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory):

  • page/Crypto.cpp:

(WebCore::Crypto::randomUUID const):

  • platform/ScriptExecutionContextIdentifier.h:

(WebCore::ProcessQualified<UUID>::generate):

  • platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:

(WebCore::CDMSessionAVFoundationCF::CDMSessionAVFoundationCF):

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

(WebCore::CDMSessionAVFoundationObjC::CDMSessionAVFoundationObjC):

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

(WebCore::CDMSessionAVStreamSession::update):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::updateAnimations):

  • platform/mediastream/MediaStreamPrivate.h:
  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::create):

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::RealtimeMediaSource):

  • platform/mediastream/gstreamer/GStreamerDisplayCaptureDeviceManager.cpp:

(WebCore::GStreamerDisplayCaptureDeviceManager::computeCaptureDevices):

  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:

(webkitMediaStreamSrcPostStreamCollection):

  • platform/mediastream/ios/ReplayKitCaptureSource.mm:

(WebCore::screenDeviceUUID):

  • testing/Internals.cpp:

(WebCore::Internals::isDocumentAlive const):

  • testing/MockCDMFactory.cpp:

(WebCore::MockCDMInstanceSession::requestLicense):

Source/WebDriver:

  • glib/SessionHostGlib.cpp:

(WebDriver::SessionHost::startAutomationSession):

  • socket/SessionHostSocket.cpp:

(WebDriver::SessionHost::startAutomationSession):

Source/WebKit:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::ensureSession):

  • NetworkProcess/cache/CacheStorageEngineCache.cpp:

(WebKit::CacheStorage::Cache::toRecordInformation):

  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::open):

  • NetworkProcess/webrtc/NetworkMDNSRegister.cpp:

(WebKit::NetworkMDNSRegister::registerMDNSName):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _insertAttachmentWithFileWrapper:contentType:completion:]):

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::handleForWebPageProxy):
(WebKit::WebAutomationSession::handleForWebFrameID):

  • UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
  • UIProcess/Cocoa/WKShareSheet.mm:

(+[WKShareSheet createRandomSharingDirectoryForFile:]):

  • UIProcess/GeolocationPermissionRequestManagerProxy.cpp:

(WebKit::GeolocationPermissionRequestManagerProxy::didReceiveGeolocationPermissionDecision):

  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorManager.cpp:

(WebKit::VirtualAuthenticatorManager::createAuthenticator):

  • UIProcess/gtk/WaylandCompositor.cpp:

(WebKit::WaylandCompositor::WaylandCompositor):

  • UIProcess/ios/WKModelView.mm:

(-[WKModelView createFileForModel:]):

  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::createUUID):

  • WebProcess/Model/mac/ARKitInlinePreviewModelPlayerMac.mm:

(WebKit::ARKitInlinePreviewModelPlayerMac::createFile):

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::openWithPreview):
(WebKit::PDFPlugin::openWithNativeApplication):

Source/WebKitLegacy:

  • WebCoreSupport/NetworkStorageSessionMap.cpp:

(NetworkStorageSessionMap::ensureSession):

Source/WTF:

Rename UUID::create to UUID::createVersion4.
Add a UUID::parseVersion4 that validates the parsed UUID is a v4.
Rename createCanonicalUUIDString to createVersion4UUIDString for consistency.

Update UUID constructor to generate a UUID v4 as per spec.
Update UUID::toString to generate a string representation of any UUID, and not specifically to v4.

  • wtf/Identified.h:

(WTF::UUIDIdentified::UUIDIdentified):

  • wtf/URL.cpp:

(WTF::URL::fakeURLWithRelativePart):

  • wtf/UUID.cpp:

(WTF::UUID::UUID):
(WTF::UUID::toString const):
(WTF::UUID::parse):
(WTF::UUID::parseVersion4):
(WTF::createVersion4UUIDString):
(WTF::isVersion4UUID):
(WTF::createCanonicalUUIDString): Deleted.

  • wtf/UUID.h:

(WTF::UUID::createVersion4):
(WTF::UUID::create): Deleted.

  • wtf/glib/FileSystemGlib.cpp:

(WTF::FileSystemImpl::openTemporaryFile):

Tools:

  • TestWebKitAPI/Tests/WTF/UUID.cpp:

(parseAndStringifyUUID):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:

(waitUntilNetworkProcessIsResponsive):

  • TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::saltForOrigin):

2:15 AM Changeset in webkit [288949] by youenn@apple.com
  • 5 edits
    2 adds in trunk

ServiceWorkerNavigationPreloader should only be used once
https://bugs.webkit.org/show_bug.cgi?id=235882
<rdar://88226432>

Reviewed by Chris Dumez.

Source/WebKit:

In case service worker preload is being used and related service worker context crashes (or service worker context sends bad messages),
We can end up in a bad state where we will ask the preload twice for the same response (once for good, and the next one as we go to didNotHandle case).
To prevent this, we add checks in loadResponseFromPreloader and loadBodyFromPreloader.
As part of this investigation, I found out that ServiceWorkerNavigationPreloader is not correctly handling the case of preload responses coming from cache.
In particular, no body will be given since we return early in waitForBody in case the preload network load is null.
Prevent this by making sure waitForBody calls the response completion handler if available, even if the preload network load is null.
And update the response body callback before executing the response completion handler to make sure data received synchronously from the preload is given to the service worker fetch task.

Test: http/wpt/service-workers/fetch-service-worker-preload-cache.https.html

  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
  • NetworkProcess/ServiceWorker/ServiceWorkerNavigationPreloader.cpp:

LayoutTests:

  • http/wpt/service-workers/fetch-service-worker-preload-cache.https-expected.txt: Added.
  • http/wpt/service-workers/fetch-service-worker-preload-cache.https.html: Added.
  • http/wpt/service-workers/resources/fetch-service-worker-preload-script.py:
2:07 AM Changeset in webkit [288948] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

[GStreamer] Add support for custom message handling in simpleBusMessageCallback
https://bugs.webkit.org/show_bug.cgi?id=235822

Patch by Philippe Normand <pnormand@igalia.com> on 2022-02-02
Reviewed by Xabier Rodriguez-Calvar.

Refactor most custom GStreamer message handlers to rely on the common "simple" handler,
which can now be augmented with an optional closure to do further message processing.

  • platform/audio/gstreamer/AudioDestinationGStreamer.cpp:

(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
(WebCore::AudioDestinationGStreamer::~AudioDestinationGStreamer):
(WebCore::AudioDestinationGStreamer::handleMessage):
(WebCore::messageCallback): Deleted.

  • platform/audio/gstreamer/AudioDestinationGStreamer.h:
  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::disconnectSimpleBusMessageCallback):
(WebCore::CustomMessageHandlerHolder::CustomMessageHandlerHolder):
(WebCore::connectSimpleBusMessageCallback):
(WebCore::simpleBusMessageCallback): Deleted.

  • platform/graphics/gstreamer/GStreamerCommon.h:

(WebCore::connectSimpleBusMessageCallback):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

1:12 AM Changeset in webkit [288947] by Martin Robinson
  • 6 edits
    2 adds in trunk

scroll-margin-top doesn't work on inline elements
https://bugs.webkit.org/show_bug.cgi?id=235933
<rdar://87983307>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-scroll-snap/scroll-target-margin-006-expected.txt: Added.
  • web-platform-tests/css/css-scroll-snap/scroll-target-margin-006.html: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-target-margin-005.html

Move the implementation of absoluteAnchorRectWithScrollMargin which actually processes
the CSS scroll-margin property to RenderElement. This allows it to be used for inline
as well as block elements. The specification says it should apply to both. The box
sizes passed in here do not matter too much, because the Length should never be a
percentage.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::absoluteAnchorRectWithScrollMargin const): Deleted.

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

(WebCore::RenderElement::absoluteAnchorRectWithScrollMargin const):

  • rendering/RenderElement.h:
12:40 AM Changeset in webkit [288946] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.34

Merge r286308 - Scripting attributes are sometimes not properly stripped from elements when JS is disabled
https://bugs.webkit.org/show_bug.cgi?id=233642
<rdar://63180952>

Reviewed by Geoffrey Garen.

Source/WebCore:

HTMLConstructionSite::mergeAttributesFromTokenIntoElement() was not properly stripping scripting
Element attributes when scripting is disabled, unlike other code paths in HTMLConstructionSite().

Covered by new API tests.

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm:

(TEST):

12:22 AM Changeset in webkit [288945] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] wasm atomic opcodes should be rejected if alignment is not equal to natural width
https://bugs.webkit.org/show_bug.cgi?id=235990

Reviewed by Saam Barati.

JSTests:

  • wasm/stress/invalid-atomic-alignment.js: Added.

(async buildAndThrow):

Source/JavaScriptCore:

While normal load and store can accept larger alignment than an access width,
wasm module validator rejects if atomic ops' alignment is not equal to an access width.
This patch applies this restriction.
No runtime semantics change since atomic ops are always checked against an access width alignment.

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::atomicLoad):
(JSC::Wasm::FunctionParser<Context>::atomicStore):
(JSC::Wasm::FunctionParser<Context>::atomicBinaryRMW):
(JSC::Wasm::FunctionParser<Context>::atomicCompareExchange):
(JSC::Wasm::FunctionParser<Context>::atomicWait):
(JSC::Wasm::FunctionParser<Context>::atomicNotify):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):

Feb 1, 2022:

9:50 PM Changeset in webkit [288944] by Alan Bujtas
  • 5 edits
    2 adds in trunk

[LFC][IFC] Using Fontcascade::spaceWidth to subtract the trailing space width may result in incorrect layout
https://bugs.webkit.org/show_bug.cgi?id=235937
<rdar://88059633>

Reviewed by Antti Koivisto and Simon Fraser.

Source/WebCore:

Since Fontcascade::spaceWidth always consult the primary font, it may return unexpected width value when (in rare cases)
the primary font does not have a space glyph. Legacy line layout works as expected as it always runs a full width
computation on the space character (instead of directly calling FontCascade::spaceWidth).

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::computeInlineTextItemWidths):

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

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

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

LayoutTests:

  • platform/mac-bigsur/fonts/monospace-expected.txt: Added.
9:38 PM Changeset in webkit [288943] by Jenner@apple.com
  • 2 edits in trunk/Tools

Update watchOS simulators to run on the newer 44mm display
https://bugs.webkit.org/show_bug.cgi?id=235986

Reviewed by Ryan Haddad.

  • Scripts/webkitpy/port/watch_simulator.py:

(WatchSimulatorPort):

9:12 PM Changeset in webkit [288942] by mmaxfield@apple.com
  • 60 edits in trunk/Source

Rename FontCascade::fontMetrics() and RenderStyle::fontMetrics() to fontMetricsOfPrimaryFont()
https://bugs.webkit.org/show_bug.cgi?id=235938

Unreviewed.

Source/WebCore:

Addressing post-review comments.

No new tests because there is no behavior change.

  • accessibility/atk/WebKitAccessibleInterfaceText.cpp:

(baselinePositionForRenderObject):

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::equalForLengthResolution):

  • display/css/DisplayBoxPainter.cpp:

(WebCore::Display::BoxPainter::paintBoxContent):

  • display/css/DisplayStyle.h:

(WebCore::Display::Style::metricsOfPrimaryFont const):
(WebCore::Display::Style::fontMetricsOfPrimaryFont const): Deleted.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::createInnerTextStyle):

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::FontProxy::metricsOfPrimaryFont const):
(WebCore::CanvasRenderingContext2DBase::drawTextUnchecked):
(WebCore::CanvasRenderingContext2DBase::measureTextInternal):
(WebCore::CanvasRenderingContext2DBase::textOffset):
(WebCore::CanvasRenderingContext2DBase::FontProxy::fontMetricsOfPrimaryFont const): Deleted.

  • html/canvas/CanvasRenderingContext2DBase.h:
  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::drawRulers):
(WebCore::InspectorOverlay::drawElementTitle):
(WebCore::expectedSizeForLayoutLabel):
(WebCore::drawLayoutLabel):

  • layout/formattingContexts/inline/InlineFormattingQuirks.cpp:

(WebCore::Layout::InlineFormattingQuirks::initialLineHeight const):

  • layout/formattingContexts/inline/InlineLevelBox.h:

(WebCore::Layout::m_style):
(WebCore::Layout::InlineLevelBox::preferredLineHeight const):
(WebCore::Layout::InlineLevelBox::primarymetricsOfPrimaryFont const):
(WebCore::Layout::InlineLevelBox::primaryfontMetricsOfPrimaryFont const): Deleted.

  • layout/formattingContexts/inline/InlineLineBox.cpp:

(WebCore::Layout::LineBox::logicalRectForTextRun const):

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::LineBoxBuilder::setVerticalGeometryForLineBreakBox const):
(WebCore::Layout::LineBoxBuilder::setInitialVerticalGeometryForInlineBox const):

  • layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp:

(WebCore::Layout::LineBoxVerticalAligner::computeLineBoxLogicalHeight const):
(WebCore::Layout::LineBoxVerticalAligner::computeRootInlineBoxVerticalPosition const):
(WebCore::Layout::LineBoxVerticalAligner::alignInlineLevelBoxes const):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::floatWidthForSimpleText const):
(WebCore::FontCascade::floatWidthForComplexText const):

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::metricsOfPrimaryFont const):
(WebCore::FontCascade::fontMetricsOfPrimaryFont const): Deleted.

  • platform/win/DragImageWin.cpp:

(WebCore::createDragImageForLink):

  • platform/win/PopupMenuWin.cpp:

(WebCore::PopupMenuWin::calculatePositionAndSize):
(WebCore::PopupMenuWin::paint):

  • rendering/CaretRectComputation.cpp:

(WebCore::computeCaretRectForEmptyElement):
(WebCore::computeCaretRectForBox):

  • rendering/LegacyEllipsisBox.cpp:

(WebCore::LegacyEllipsisBox::paint):
(WebCore::LegacyEllipsisBox::paintMarkupBox):
(WebCore::LegacyEllipsisBox::nodeAtPoint):

  • rendering/LegacyInlineBox.cpp:

(WebCore::LegacyInlineBox::logicalHeight const):

  • rendering/LegacyInlineFlowBox.cpp:

(WebCore::LegacyInlineFlowBox::addToLine):
(WebCore::placeChildInlineBoxesInBlockDirection):
(WebCore::LegacyInlineFlowBox::placeBoxesInBlockDirection):

  • rendering/LegacyLineLayout.cpp:

(WebCore::setLogicalWidthForTextRun):

  • rendering/LegacyRootInlineBox.cpp:

(WebCore::LegacyRootInlineBox::lineSnapAdjustment const):
(WebCore::LegacyRootInlineBox::ascentAndDescentForBox const):
(WebCore::LegacyRootInlineBox::verticalPositionForBox):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::baselinePosition const):
(WebCore::RenderBlock::inlineBlockBaseline const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::adjustInitialLetterPosition):
(WebCore::RenderBlockFlow::firstLineBaseline const):
(WebCore::RenderBlockFlow::inlineBlockBaseline const):

  • rendering/RenderEmbeddedObject.cpp:

(WebCore::RenderEmbeddedObject::paintReplaced):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::setImageSizeForAltText):
(WebCore::RenderImage::paintReplaced):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::mayAffectLayout const):
(WebCore::RenderInline::baselinePosition const):

  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::baselinePosition const):

  • rendering/RenderListBox.cpp:

(WebCore::itemOffsetForAlignment):
(WebCore::RenderListBox::itemHeight const):

  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::layout):
(WebCore::RenderListMarker::updateContent):
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::updateMargins):
(WebCore::RenderListMarker::relativeMarkerRect):

  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::layoutBlock):

  • rendering/RenderThemeWin.cpp:

(WebCore::RenderThemeWin::adjustMenuListButtonStyle const):

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::paintForeground):
(WebCore::TextBoxPainter::paintCompositionUnderline):
(WebCore::TextBoxPainter::calculateDocumentMarkerBounds):
(WebCore::TextBoxPainter::textOriginFromPaintRect const):

  • rendering/TextDecorationPainter.cpp:

(WebCore::TextDecorationPainter::paintBackgroundDecorations):
(WebCore::TextDecorationPainter::paintForegroundDecorations):
(WebCore::TextDecorationPainter::paintLineThrough):

  • rendering/TextPainter.cpp:

(WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):

  • rendering/line/LineInlineHeaders.h:

(WebCore::requiresLineBoxForContent):

  • rendering/mathml/RenderMathMLBlock.cpp:

(WebCore::axisHeight):
(WebCore::toUserUnits):

  • rendering/mathml/RenderMathMLRoot.cpp:

(WebCore::RenderMathMLRoot::verticalParameters):

  • rendering/mathml/RenderMathMLScripts.cpp:

(WebCore::RenderMathMLScripts::verticalParameters const):

  • rendering/mathml/RenderMathMLUnderOver.cpp:

(WebCore::RenderMathMLUnderOver::verticalParameters const):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::metricsOfPrimaryFont const):
(WebCore::RenderStyle::computeLineHeight const):
(WebCore::RenderStyle::fontMetricsOfPrimaryFont const): Deleted.

  • rendering/style/RenderStyle.h:
  • rendering/svg/RenderSVGInlineText.cpp:

(WebCore::RenderSVGInlineText::positionForPoint):

  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::selectionRectForTextFragment const):
(WebCore::SVGInlineTextBox::paintDecorationWithStyle):
(WebCore::SVGInlineTextBox::paintTextWithShadows):
(WebCore::SVGInlineTextBox::calculateBoundaries const):
(WebCore::SVGInlineTextBox::nodeAtPoint):

  • rendering/svg/SVGTextLayoutEngineBaseline.cpp:

(WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift const):
(WebCore::SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift const):
(WebCore::SVGTextLayoutEngineBaseline::calculateGlyphAdvanceAndOrientation const):

  • rendering/svg/SVGTextMetrics.cpp:

(WebCore::SVGTextMetrics::SVGTextMetrics):

  • rendering/svg/SVGTextQuery.cpp:

(WebCore::calculateGlyphBoundaries):

  • rendering/updating/RenderTreeBuilderFirstLetter.cpp:

(WebCore::styleForFirstLetter):

  • style/InlineTextBoxStyle.cpp:

(WebCore::visualOverflowForDecorations):

  • style/StyleResolveForFontRaw.cpp:

(WebCore::Style::resolveForFontRaw):

  • svg/SVGLengthContext.cpp:

(WebCore::SVGLengthContext::convertValueFromUserUnitsToEXS const):
(WebCore::SVGLengthContext::convertValueFromEXSToUserUnits const):

Source/WebKit:

Addressing post-review comments.

  • WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:

(WebKit::WebPopupMenu::setUpPlatformData):

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::dictionaryPopupInfoForRange):

Source/WebKitLegacy/mac:

  • WebView/WebImmediateActionController.mm:

(+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):

Source/WebKitLegacy/win:

  • FullscreenVideoController.cpp:

(FullscreenVideoController::draw):

9:08 PM Changeset in webkit [288941] by Lauro Moura
  • 5 edits in trunk/Source/WebCore

Unreviewed, non-unified buildfix after latest accessibility commits
https://bugs.webkit.org/show_bug.cgi?id=235999

  • accessibility/atspi/AccessibilityAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectSelectionAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectTableAtspi.cpp:
9:00 PM Changeset in webkit [288940] by Simon Fraser
  • 3 edits in trunk/Source/WebKit

Share more WebPage code related to marking layers volatile
https://bugs.webkit.org/show_bug.cgi?id=235985

Reviewed by Chris Dumez.

Factor code common between WebPage::layerVolatilityTimerFired() and WebPage::markLayersVolatile()
into a helper function, using an enum for the "stop reason" to allow for descriptive logging.

No behavior change.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::markLayersVolatileImmediatelyIfPossible):
(WebKit::WebPage::layerVolatilityTimerFired):
(WebKit::WebPage::markLayersVolatile):
(WebKit::WebPage::markLayersVolatileOrRetry):

  • WebProcess/WebPage/WebPage.h:
8:04 PM Changeset in webkit [288939] by commit-queue@webkit.org
  • 5 edits
    1 delete in trunk

Unreviewed, reverting r288914.
https://bugs.webkit.org/show_bug.cgi?id=235998

Broke some layout tests

Reverted changeset:

"[LFC][IFC] Using Fontcascade::spaceWidth to subtract the
trailing space width may result in incorrect layout"
https://bugs.webkit.org/show_bug.cgi?id=235937
https://commits.webkit.org/r288914

6:49 PM Changeset in webkit [288938] by Chris Dumez
  • 19 edits
    1 move in trunk/Source

Rename ServiceWorkerFetchResult to WorkerFetchResult and make it more generic
https://bugs.webkit.org/show_bug.cgi?id=235983

Reviewed by Geoffrey Garen.

Rename ServiceWorkerFetchResult to WorkerFetchResult and make it more generic so that it can be reused by Shared Workers.

Source/WebCore:

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • workers/service/SWClientConnection.cpp:

(WebCore::SWClientConnection::startScriptFetchForServer):

  • workers/service/SWClientConnection.h:
  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
(WebCore::ServiceWorkerContainer::notifyFailedFetchingScript):

  • workers/service/ServiceWorkerFetchResult.h: Removed.

(WebCore::ServiceWorkerFetchResult::isolatedCopy const): Deleted.
(WebCore::serviceWorkerFetchError): Deleted.
(WebCore::ServiceWorkerFetchResult::encode const): Deleted.
(WebCore::ServiceWorkerFetchResult::decode): Deleted.

  • workers/service/WorkerSWClientConnection.cpp:

(WebCore::WorkerSWClientConnection::finishFetchingScriptInServer):

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

(WebCore::SWServer::Connection::finishFetchingScriptInServer):
(WebCore::SWServer::startScriptFetch):
(WebCore::SWServer::scriptFetchFinished):

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

(WebCore::SWServerJobQueue::scriptFetchFinished):

  • workers/service/server/SWServerJobQueue.h:
  • workers/service/server/SWServerRegistration.h:
  • workers/WorkerFetchResult.h: Added.

Source/WebKit:

  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:

(WebKit::ServiceWorkerSoftUpdateLoader::~ServiceWorkerSoftUpdateLoader):
(WebKit::ServiceWorkerSoftUpdateLoader::fail):
(WebKit::ServiceWorkerSoftUpdateLoader::didFinishLoading):

  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.h:
  • NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::finishFetchingScriptInServer):

  • WebProcess/Storage/WebSWClientConnection.h:
6:47 PM Changeset in webkit [288937] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

Check AccessibilityRenderObject::m_renderer for null before using it.
https://bugs.webkit.org/show_bug.cgi?id=235950
<rdar://problem/88326438>

Reviewed by Chris Fleizach.

AccessibilityRenderObject::m_renderer is a WeakPtr that can become null
due to a variety of changes in the render tree. This patch fixes a
number of cases where AccessibilityRenderObject::m_renderer was being
used without checking for null which leads to crashes such as:
https://bugs.webkit.org/show_bug.cgi?id=235945
https://bugs.webkit.org/show_bug.cgi?id=235827

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::parentObjectIfExists const):
(WebCore::AccessibilityRenderObject::selection const):
(WebCore::AccessibilityRenderObject::setSelectedTextRange):
(WebCore::AccessibilityRenderObject::documentLinks):
(WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange const):

6:45 PM Changeset in webkit [288936] by Chris Dumez
  • 6 edits in trunk/Source/WebCore

Replace WebCore::topOriginURL() to SecurityOrigin::toURL()
https://bugs.webkit.org/show_bug.cgi?id=235987

Reviewed by Geoffrey Garen.

Replace WebCore::topOriginURL() to SecurityOrigin::toURL() so that it can be reused by Shared Workers.

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::toURL const):

  • page/SecurityOrigin.h:
  • page/SecurityOriginData.cpp:

(WebCore::SecurityOriginData::toURL const):

  • page/SecurityOriginData.h:
  • workers/service/context/ServiceWorkerThreadProxy.cpp:

(WebCore::ServiceWorkerThreadProxy::setupPageForServiceWorker):
(WebCore::topOriginURL): Deleted.

6:08 PM Changeset in webkit [288935] by Chris Dumez
  • 12 edits in trunk/Source/WebKit

Rename some service worker functions that have names that are too generic
https://bugs.webkit.org/show_bug.cgi?id=235988

Reviewed by Darin Adler.

Rename some service worker functions that have names that are too generic and will cause
confusion with shared workers.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::serverToContextConnectionNoLongerNeeded):

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::ensureSWServer):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::establishServiceWorkerContextConnectionToNetworkProcess):
(WebKit::NetworkProcessProxy::serviceWorkerContextConnectionNoLongerNeeded):
(WebKit::NetworkProcessProxy::establishWorkerContextConnectionToNetworkProcess): Deleted.
(WebKit::NetworkProcessProxy::workerContextConnectionNoLongerNeeded): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::establishServiceWorkerContextConnectionToNetworkProcess):
(WebKit::WebProcessPool::establishWorkerContextConnectionToNetworkProcess): Deleted.

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::establishServiceWorkerContext):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::establishServiceWorkerContextConnectionToNetworkProcess):
(WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess): Deleted.

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
6:02 PM Changeset in webkit [288934] by Wenson Hsieh
  • 7 edits in trunk/Source

The default values for a couple of Live Text-related features should respect system feature flags
https://bugs.webkit.org/show_bug.cgi?id=235980
rdar://88349726

Reviewed by Tim Horton.

Source/WebKit:

Split the extant TextRecognitionEnhancements feature flag into two flags: one to control enablement of the
"image analysis queue", and another to control Live Text behaviors (still referred to as "text recognition
enhancements"). Add WebKitAdditions integration points to allow the default values for these two flags to read
from system feature flags.

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

(WebKit::textRecognitionEnhancementsSystemFeatureEnabled):
(WebKit::imageAnalysisQueueSystemFeatureEnabled):
(WebKit::isLiveTextAvailableAndEnabled):
(WebKit::isLiveTextEnabled): Deleted.
(WebKit::requestImageAnalysisWithIdentifier): Deleted.

  • Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm:

(WebKit::defaultTextRecognitionEnhancementsEnabled):
(WebKit::defaultImageAnalysisQueueEnabled):

  • Shared/WebPreferencesDefaultValues.h:

Source/WTF:

Add a new feature flag, and add default values for both features. See WebKit/ChangeLog for more details.

  • Scripts/Preferences/WebPreferencesInternal.yaml:
5:41 PM Changeset in webkit [288933] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

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

Reviewed by Wenson Hsieh.

Crash data suggest that m_scrollingCoordinator can be null in ThreadedScrollingTree::hasNodeWithAnimatedScrollChanged(),
which is true if the scrolling tree keeps ThreadedScrollingTree alive longer than the scrolling coordinator.

As in the other functions in this file, early return if m_scrollingCoordinator is null.

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::hasNodeWithAnimatedScrollChanged):

5:41 PM Changeset in webkit [288932] by Kocsen Chung
  • 1 copy in tags/Safari-613.1.16.0.3

Tag Safari-613.1.16.0.3.

5:32 PM Changeset in webkit [288931] by Pablo Saavedra
  • 6 edits in trunk/Source/WebCore

Fix build error with VIDEO=ON
https://bugs.webkit.org/show_bug.cgi?id=235982

Reviewed by Eric Carlson.

  • Modules/WebGPU/GPUExternalTextureDescriptor.idl:
  • Modules/webcodecs/VideoColorPrimaries.idl:
  • Modules/webcodecs/VideoMatrixCoefficients.idl:
  • Modules/webcodecs/VideoTransferCharacteristics.idl:
  • platform/MediaSample.h:
5:18 PM Changeset in webkit [288930] by ntim@apple.com
  • 4 edits in trunk/Source

Add setting to toggle PDF.js viewer
https://bugs.webkit.org/show_bug.cgi?id=235972

Reviewed by Tim Horton.

This setting is enabled only in CaptivePortalMode.

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml:
4:47 PM Changeset in webkit [288929] by Ben Nham
  • 13 edits in trunk

Forward messages from NetworkProcess to webpushd
https://bugs.webkit.org/show_bug.cgi?id=235855

Reviewed by Brent Fulgham.

Source/WebCore:

Make ExceptionData use modern encoding since the daemon IPC encoder doesn't support legacy
encoding.

  • dom/ExceptionData.h:

(WebCore::ExceptionData::decode):

Source/WebKit:

This forwards PushManager and PushSubscription-related IPC from NetworkProcess to webpushd.
The implementations in webpushd are stubs in this patch, and as a result there are no new
tests. The implementations and tests will be filled out in a future patch.

  • NetworkProcess/Notifications/NetworkNotificationManager.cpp:

(WebKit::NetworkNotificationManager::subscribeToPushService):
(WebKit::NetworkNotificationManager::unsubscribeFromPushService):
(WebKit::NetworkNotificationManager::getPushSubscription):
(WebKit::NetworkNotificationManager::getPushPermissionState):

  • NetworkProcess/Notifications/NetworkNotificationManager.h:
  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::subscribeToPushService):
(WebKit::WebSWServerConnection::unsubscribeFromPushService):
(WebKit::WebSWServerConnection::getPushSubscription):
(WebKit::WebSWServerConnection::getPushPermissionState):

  • Shared/WebPushDaemonConstants.h:

(WebKit::WebPushD::messageTypeSendsReply):

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

(WebPushD::MessageInfo::subscribeToPushService::encodeReply):
(WebPushD::MessageInfo::unsubscribeFromPushService::encodeReply):
(WebPushD::MessageInfo::getPushSubscription::encodeReply):
(WebPushD::MessageInfo::getPushPermissionState::encodeReply):
(WebPushD::Daemon::decodeAndHandleMessage):
(WebPushD::Daemon::subscribeToPushService):
(WebPushD::Daemon::unsubscribeFromPushService):
(WebPushD::Daemon::getPushSubscription):
(WebPushD::Daemon::getPushPermissionState):

LayoutTests:

Update existing tests to test for AbortError, since that's the exception type specified in
the spec.

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

(promise_test.async test):

4:46 PM Changeset in webkit [288928] by Russell Epstein
  • 12 edits in branches/safari-613.1.16.0-branch/Source/WebKit

Apply patch. rdar://problem/86150540

4:44 PM Changeset in webkit [288927] by Russell Epstein
  • 9 edits in branches/safari-613.1.16.0-branch/Source

Versioning.

WebKit-7613.1.16.0.3

4:28 PM Changeset in webkit [288926] by Russell Epstein
  • 1 copy in tags/Safari-614.1.1.4

Tag Safari-614.1.1.4.

4:23 PM Changeset in webkit [288925] by Wenson Hsieh
  • 10 edits in trunk

Mitigate hangs underneath -requestAutocorrectionContextWithCompletionHandler: when focusing text fields
https://bugs.webkit.org/show_bug.cgi?id=235963
rdar://70152487

Reviewed by Tim Horton.

Source/WebKit:

After focusing an input field, UIKit attempts to invoke -requestAutocorrectionContextWithCompletionHandler: on
WKContentView up to 5 times, back to back. In WebKit, we handle this like sync IPC by waiting up to 1 second for
a response (this is done because UIKit would otherwise lock the main thread altogether after calling this
method, which results in a permanent deadlock in the UI process).

In the case where the web process is also sending a sync message to the UI process at the same time (for
instance, when spinning up the GPU or web authn process), this results in back-to-back 1 second deadlocks, for a
total UI process hang time of up to 5 seconds (as observed on an iPad with hardware keyboard attached).

This patch attempts to reduce hangs in -[WKContentView requestAutocorrectionContextWithCompletionHandler:] by
introducing a mechanism that throttles redundant -requestAutocorrectionContextWithCompletionHandler: requests
during the same runloop by immediately returning the last received autocorrection context instead of repeatedly
waiting on synchronous IPC message responses. Combined with another mechanism that preemptively sends an
autocorrection context when an input view is shown, this means that we will (mostly) no longer hang when
focusing an input field, or hang for at most 1 second (instead of 5) in the case where we happen to deadlock.

See comments below for more details.

Test: AutocorrectionTests.AutocorrectionContextBeforeAndAfterEditing

  • UIProcess/ios/WKContentViewInteraction.h:

Add a new flag, _autocorrectionContextNeedsUpdate, that tracks whether or not it's safe to reply to
-requestAutocorrectionContextWithCompletionHandler: using the last-received WebAutocorrectionContext data that
was cached in the UI process.

This flag is unset after receiving a WebAutocorrectionContext, and set when any asynchronous text input methods
on WKContentView have been invoked, which may cause the autocorrection context to change. This is important in
order to preserve the existing behavior that a call to -requestAutocorrectionContextWithCompletionHandler:
immediately after calling a method like -insertText: or -selectAll: will not immediately return with a stale
autocorrection context.

The flag is also unset after the current runloop finishes, ensuring that this hack is limited to back-to-back
autocorrection contexts where editing actions are not dispatched in between each request. In the future, we may
be able to make this caching policy more aggressive, by removing this invalidation, which would allow us to keep
using the same autocorrection context data until we either learn about a programmatic selection change in the UI
process, or the WebKit client (in the UI process) has triggered editing or selection.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView setUpInteraction]):
(-[WKContentView cleanUpInteraction]):
(-[WKContentView replaceText:withText:]):
(-[WKContentView selectWordBackward]):
(-[WKContentView pasteForWebView:]):
(-[WKContentView _pasteAsQuotationForWebView:]):
(-[WKContentView selectForWebView:]):
(-[WKContentView selectAllForWebView:]):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
(-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:withFlags:]):
(-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
(-[WKContentView selectPositionAtPoint:completionHandler:]):
(-[WKContentView _selectPositionAtPoint:stayingWithinFocusedElement:completionHandler:]):
(-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]):
(-[WKContentView moveSelectionAtBoundary:inDirection:completionHandler:]):
(-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]):
(-[WKContentView beginSelectionInDirection:completionHandler:]):
(-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
(-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]):
(-[WKContentView replaceDictatedText:withText:]):
(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
(-[WKContentView _handleAutocorrectionContext:]):
(-[WKContentView beginSelectionChange]):
(-[WKContentView insertTextSuggestion:]):
(-[WKContentView _setMarkedText:highlights:selectedRange:]):
(-[WKContentView insertText:]):
(-[WKContentView insertText:alternatives:style:]):
(-[WKContentView _focusTextInputContext:placeCaretAt:completionHandler:]):
(-[WKContentView _willBeginTextInteractionInTextInputContext:]):
(-[WKContentView executeEditCommandWithCallback:]):
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):
(-[WKContentView _elementDidBlur]):
(-[WKContentView _selectionChanged]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::requestAutocorrectionContext):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::requestDOMPasteAccess):

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

(WebKit::WebPage::setIsShowingInputViewForFocusedElement):
(WebKit::WebPage::preemptivelySendAutocorrectionContext):

Pull out logic that preemptively computes and sends WebAutocorrectionContexts to the UI process (in anticipation
of synchronous IPC) into an appropriately-named helper method; additionally, call this new helper method when
the keyboard has been shown, following element focus in the UI process.

(WebKit::WebPage::handleAutocorrectionContextRequest):
(WebKit::WebPage::prepareToRunModalJavaScriptDialog):
(WebKit::WebPage::requestAutocorrectionContext): Deleted.

Drive-by: rename this to handleAutocorrectionContextRequest for clarity, since the purpose of this method is
to service a request for autocorrection context that was sent by the UI process.

Tools:

Add a new API test to exercise a scenario that currently isn't covered by existing tests: if the text input
client (i.e. UIKit) calls -requestAutocorrectionContextWithCompletionHandler:, then invokes an asynchronous
API that performs an editing action or changes the selection, and then requests another autocorrection context,
the second autocorrection context should reflect the changes that occurred as a result of the async editing
action.

  • TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm:
4:10 PM Changeset in webkit [288924] by sihui_liu@apple.com
  • 4 edits in trunk/Source/WebKit

Write origin file when OriginStorageManager is destroyed
https://bugs.webkit.org/show_bug.cgi?id=235897
rdar://87163253

Reviewed by Darin Adler.

The first WebStorage message sent from web process to network process is sync, and writing origin file when
creating OriginStorageManager will delay the reply. Since we can get the origin information from in-memory map
when OriginStorageManager is present, we may delay the write to until when OriginStorageManager is destroyed.
This fixes the PLT regression from r286936.

  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::NetworkStorageManager::localOriginStorageManager):

  • NetworkProcess/storage/OriginStorageManager.cpp:

(WebKit::OriginStorageManager::OriginStorageManager):
(WebKit::OriginStorageManager::~OriginStorageManager):

  • NetworkProcess/storage/OriginStorageManager.h:
4:09 PM Changeset in webkit [288923] by Russell Epstein
  • 1 copy in tags/Safari-613.1.16.1.2

Tag Safari-613.1.16.1.2.

4:08 PM Changeset in webkit [288922] by pvollan@apple.com
  • 7 edits in trunk/Source

[WP] Remove PostScript conversion code
https://bugs.webkit.org/show_bug.cgi?id=235892
<rdar://88172449>

Reviewed by Tim Horton.

The WebContent process no longer has access to the PostScript conversion service, so there is no need to keep this code.

Source/WebCore:

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::convertedDataIfNeeded const):

  • platform/graphics/cg/PDFDocumentImage.cpp:

(WebCore::PDFDocumentImage::convertPostScriptDataToPDF): Deleted.

  • platform/graphics/cg/PDFDocumentImage.h:

Source/WebKit:

  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::pluginInfo):
(WebKit::PDFPlugin::streamDidReceiveResponse):
(WebKit::PDFPlugin::manualStreamDidReceiveResponse):

4:07 PM Changeset in webkit [288921] by Russell Epstein
  • 1 copy in tags/Safari-613.1.16.0.2

Tag Safari-613.1.16.0.2.

4:01 PM Changeset in webkit [288920] by Russell Epstein
  • 1 copy in tags/Safari-613.1.14.5.7

Tag Safari-613.1.14.5.7.

3:59 PM Changeset in webkit [288919] by Russell Epstein
  • 2 edits in branches/safari-613.1.14.5-branch/Source/WebKit

Cherry-pick r288917. rdar://problem/88334496

Catalyst builds of WebKit with system content path put XPCServices and Daemons in the normal location
https://bugs.webkit.org/show_bug.cgi?id=235976

Reviewed by Mark Lam.

The production of WEBKIT_FRAMEWORKS_DIR_USE_SYSTEM_CONTENT_PATH_YES used the system framework path
instead of using the computed value of NORMAL_WEBKIT_FRAMEWORKS_DIR which includes the Catalyst prefix.

  • Configurations/BaseTarget.xcconfig:

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

3:58 PM Changeset in webkit [288918] by Russell Epstein
  • 9 edits in branches/safari-613.1.14.5-branch/Source

Versioning.

WebKit-7613.1.14.5.7

3:53 PM Changeset in webkit [288917] by msaboff@apple.com
  • 2 edits in trunk/Source/WebKit

Catalyst builds of WebKit with system content path put XPCServices and Daemons in the normal location
https://bugs.webkit.org/show_bug.cgi?id=235976

Reviewed by Mark Lam.

The production of WEBKIT_FRAMEWORKS_DIR_USE_SYSTEM_CONTENT_PATH_YES used the system framework path
instead of using the computed value of NORMAL_WEBKIT_FRAMEWORKS_DIR which includes the Catalyst prefix.

  • Configurations/BaseTarget.xcconfig:
3:24 PM Changeset in webkit [288916] by Adrian Perez de Castro
  • 2 edits
    1 add in trunk/Tools/buildstream

[Flatpak SDK] Using thin archives with ld.bfd results in linker errors
https://bugs.webkit.org/show_bug.cgi?id=235975

Reviewed by Michael Catanzaro.

Import the two upstream that fix handling of thin archives to apply atop binutils 2.37.
The patches were found from https://sourceware.org/bugzilla/show_bug.cgi?id=28138 and
cherry-picked from the upstream binutils repository.

  • elements/freedesktop-sdk.bst: List patch in the sources section.
  • patches/0001-binutils-import-upstream-patches-for-thin-archive-su.patch: Added.
3:21 PM Changeset in webkit [288915] by Russell Epstein
  • 9 edits in branches/safari-614.1.1-branch/Source

Versioning.

WebKit-7614.1.1.4

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

[LFC][IFC] Using Fontcascade::spaceWidth to subtract the trailing space width may result in incorrect layout
https://bugs.webkit.org/show_bug.cgi?id=235937
<rdar://88059633>

Reviewed by Antti Koivisto.

Source/WebCore:

Since Fontcascade::spaceWidth always consult the primary font, it may return unexpected width value when (in rare cases)
the primary font does not have a space glyph. Legacy line layout works as expected as it always runs a full width
computation on the space character (instead of directly calling FontCascade::spaceWidth).

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::computeInlineTextItemWidths):

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

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

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

LayoutTests:

  • platform/mac-bigsur/fonts/monospace-expected.txt: Added.
2:47 PM Changeset in webkit [288913] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

MSVC reports "SVGPropertyAnimator.h(94): error C2839: invalid return type 'T *' for overloaded 'operator ->'" with /std:c++20
https://bugs.webkit.org/show_bug.cgi?id=234546
<rdar://problem/86757805>

Reviewed by Darin Adler.

r287300 was a wrong fix that used a raw pointer to work around an
MSVC's RefPtr compilation error. We should use smart pointers for
local variables.

This seems a MSVC bug that the class template argument deduction
doesn't work in this case. Explicitly specifying a class template
argument is a workaround.

  • svg/properties/SVGPropertyAnimator.h:

(WebCore::SVGPropertyAnimator::computeInheritedCSSPropertyValue const):
Changed the type of the local variable 'parent' from a raw pointer
to RefPtr<Element>.

2:13 PM Changeset in webkit [288912] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

Use more AtomString and un-inline code for ScriptElementCachedScriptFetcher and its subclasses
https://bugs.webkit.org/show_bug.cgi?id=235919
<rdar://problem/88338714>

Address Darin's review comment. nonce in LoadableClassicScript's constructor should also have been
converted to AtomString in r288900.

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::LoadableClassicScript):

  • dom/LoadableClassicScript.h:
1:51 PM Changeset in webkit [288911] by Jonathan Bedard
  • 3 edits in trunk/Tools

[EWS] Fix infinate retry on PR with red ToT
https://bugs.webkit.org/show_bug.cgi?id=235971
<rdar://problem/88344438>

Reviewed by Aakash Jain.

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

(AnalyzeCompileWebKitResults.analyzeResults): Update message for PRs,
do not retry if base commit has failed to build.
(AnalyzeCompileWebKitResults.send_email_for_new_build_failure): Only send
emails for patch failures.

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

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

1:30 PM Changeset in webkit [288910] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288897. rdar://problem/87651247

[Cocoa] "index 0 out of bounds" exception in AVTrackPrivateAVFObjCImpl::videoTrackConfiguration()
https://bugs.webkit.org/show_bug.cgi?id=235918
<rdar://87651247>

Reviewed by Eric Carlson.

Crash data shows a rare exception thrown from inside a static method formatDescriptionFor()
in AVTrackPrivateAVFObjCImpl. The method first queries whether the .formatDescriptions
NSArray property is queryable, then for its count, then retrieves the first object in the
array. It's possible that the array is mutated on a background thread between the count
check and when the first object is retrieved.

To eliminate the possibility that the property is mutated between queries, pull the value
into a RetainPtr and run the query on that retained object. Use -[NSArray firstObject]
rather than -objectAtIndex:0, as the former will return nil if the -count is 0, while the
latter will throw an exception. To guard against the possibility that the
CMFormatDescriptionRef will go out of scope after the return, return the format description
itself wrapped in a RetainPtr as well.

  • platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm: (WebCore::formatDescriptionFor): (WebCore::AVTrackPrivateAVFObjCImpl::codec const): (WebCore::AVTrackPrivateAVFObjCImpl::colorSpace const): (WebCore::AVTrackPrivateAVFObjCImpl::sampleRate const): (WebCore::AVTrackPrivateAVFObjCImpl::numberOfChannels const):

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

1:30 PM Changeset in webkit [288909] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288844. rdar://problem/88241768

[macOS][WP] Add required syscall
https://bugs.webkit.org/show_bug.cgi?id=235901
<rdar://88241768>

Reviewed by Brent Fulgham.

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

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

1:09 PM Changeset in webkit [288908] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS][WP] Add required syscall
https://bugs.webkit.org/show_bug.cgi?id=235828
<rdar://88177392>

Reviewed by Brent Fulgham.

Follow-up fix after r288750. Only allow syscall on older OS versions.

  • WebProcess/com.apple.WebProcess.sb.in:
1:06 PM Changeset in webkit [288907] by graouts@webkit.org
  • 3 edits in trunk/Source/WebCore

Refactor KeyframesRuleMap to use AtomString for the key
https://bugs.webkit.org/show_bug.cgi?id=235962

Reviewed by Antti Koivisto.

It was noted during review of https://bugs.webkit.org/show_bug.cgi?id=229437 that we
ought to use an AtomString instead of an AtomStringImpl* as a key for m_keyframesRuleMap.

  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::addKeyframeStyle):
(WebCore::Style::Resolver::isAnimationNameValid):
(WebCore::Style::Resolver::keyframeRulesForName const):

  • style/StyleResolver.h:
12:34 PM Changeset in webkit [288906] by Antti Koivisto
  • 9 edits in trunk

[CSS Container Queries] Ensure query containers have valid layout before resolving the subtree
https://bugs.webkit.org/show_bug.cgi?id=235896

Reviewed by Alan Bujtas.

LayoutTests/imported/w3c:

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

Source/WebCore:

To resolve container queries we need to have up-to-date layout for the query containers before
style resolution advances to their descendants.

With this patch we bounce between style resolution and layout until all query containers are resolved.

  • dom/Document.cpp:

(WebCore::Document::resolveStyle):

Loop style resolution/render tree update/layout until we have resolved everything.

  • dom/Document.h:

(WebCore::Document::isResolvingContainerQueries const):

  • page/FrameViewLayoutContext.cpp:

(WebCore::FrameViewLayoutContext::layout):
(WebCore::FrameViewLayoutContext::runOrScheduleAsynchronousTasks):

Don't run post-layout tasks when resolving query containers.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveComposedTree):
(WebCore::Style::TreeResolver::updateQueryContainer):

Track what has been resolved.

(WebCore::Style::TreeResolver::resolve):

  • style/StyleTreeResolver.h:

(WebCore::Style::TreeResolver::hasUnresolvedQueryContainers const):

  • style/StyleUpdate.h:

(WebCore::Style::Update::isEmpty const):

12:32 PM Changeset in webkit [288905] by Pablo Saavedra
  • 6 edits in trunk/Source

[GTK][WPE] Fixes for non-unified builds after r288807 and r288820
https://bugs.webkit.org/show_bug.cgi?id=235956

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • runtime/FunctionHasExecutedCache.h:

Source/WebCore:

  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::rejectWithFetchError):

Source/WTF:

  • wtf/GenericHashKey.h:
11:59 AM WebKitFlatpakSDK/SpeedUpBuild edited by Philippe Normand
(diff)
11:59 AM Changeset in webkit [288904] by Russell Epstein
  • 2 edits in branches/safari-613.1.16.0-branch/Source/WebCore

Cherry-pick r288897. rdar://problem/87651247

[Cocoa] "index 0 out of bounds" exception in AVTrackPrivateAVFObjCImpl::videoTrackConfiguration()
https://bugs.webkit.org/show_bug.cgi?id=235918
<rdar://87651247>

Reviewed by Eric Carlson.

Crash data shows a rare exception thrown from inside a static method formatDescriptionFor()
in AVTrackPrivateAVFObjCImpl. The method first queries whether the .formatDescriptions
NSArray property is queryable, then for its count, then retrieves the first object in the
array. It's possible that the array is mutated on a background thread between the count
check and when the first object is retrieved.

To eliminate the possibility that the property is mutated between queries, pull the value
into a RetainPtr and run the query on that retained object. Use -[NSArray firstObject]
rather than -objectAtIndex:0, as the former will return nil if the -count is 0, while the
latter will throw an exception. To guard against the possibility that the
CMFormatDescriptionRef will go out of scope after the return, return the format description
itself wrapped in a RetainPtr as well.

  • platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm: (WebCore::formatDescriptionFor): (WebCore::AVTrackPrivateAVFObjCImpl::codec const): (WebCore::AVTrackPrivateAVFObjCImpl::colorSpace const): (WebCore::AVTrackPrivateAVFObjCImpl::sampleRate const): (WebCore::AVTrackPrivateAVFObjCImpl::numberOfChannels const):

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

11:56 AM Changeset in webkit [288903] by Russell Epstein
  • 2 edits in branches/safari-613.1.16.1-branch/Source/WebCore

Cherry-pick r288897. rdar://problem/87651247

[Cocoa] "index 0 out of bounds" exception in AVTrackPrivateAVFObjCImpl::videoTrackConfiguration()
https://bugs.webkit.org/show_bug.cgi?id=235918
<rdar://87651247>

Reviewed by Eric Carlson.

Crash data shows a rare exception thrown from inside a static method formatDescriptionFor()
in AVTrackPrivateAVFObjCImpl. The method first queries whether the .formatDescriptions
NSArray property is queryable, then for its count, then retrieves the first object in the
array. It's possible that the array is mutated on a background thread between the count
check and when the first object is retrieved.

To eliminate the possibility that the property is mutated between queries, pull the value
into a RetainPtr and run the query on that retained object. Use -[NSArray firstObject]
rather than -objectAtIndex:0, as the former will return nil if the -count is 0, while the
latter will throw an exception. To guard against the possibility that the
CMFormatDescriptionRef will go out of scope after the return, return the format description
itself wrapped in a RetainPtr as well.

  • platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm: (WebCore::formatDescriptionFor): (WebCore::AVTrackPrivateAVFObjCImpl::codec const): (WebCore::AVTrackPrivateAVFObjCImpl::colorSpace const): (WebCore::AVTrackPrivateAVFObjCImpl::sampleRate const): (WebCore::AVTrackPrivateAVFObjCImpl::numberOfChannels const):

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

11:16 AM Changeset in webkit [288902] by Ben Nham
  • 6 edits
    9 adds in trunk

Import APSConnection-related SPI
https://bugs.webkit.org/show_bug.cgi?id=235856

Reviewed Youenn Fablet.

Source/WebKit:

This imports the SPI declarations necessary to build against ApplePushService in WebKit. It
also includes a PushServiceConnection interface that can sit in front of APSConnection, and
a fake interface that will be fleshed out for testing purposes.

  • Configurations/WebKit.xcconfig:
  • Platform/spi/Cocoa/ApplePushServiceSPI.h: Added.
  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/ApplePushServiceConnection.h: Added.
  • webpushd/ApplePushServiceConnection.mm: Added.

(-[_WKAPSConnectionDelegate initWithConnection:]):
(-[_WKAPSConnectionDelegate connection:didReceivePublicToken:]):
(-[_WKAPSConnectionDelegate connection:didReceiveIncomingMessage:]):
(WebPushD::ApplePushServiceConnection::ApplePushServiceConnection):
(WebPushD::makeTokenInfo):
(WebPushD::ApplePushServiceConnection::subscribe):
(WebPushD::ApplePushServiceConnection::unsubscribe):
(WebPushD::ApplePushServiceConnection::enabledTopics):
(WebPushD::ApplePushServiceConnection::ignoredTopics):
(WebPushD::ApplePushServiceConnection::opportunisticTopics):
(WebPushD::ApplePushServiceConnection::nonWakingTopics):
(WebPushD::ApplePushServiceConnection::setEnabledTopics):
(WebPushD::ApplePushServiceConnection::setIgnoredTopics):
(WebPushD::ApplePushServiceConnection::setOpportunisticTopics):
(WebPushD::ApplePushServiceConnection::setNonWakingTopics):
(WebPushD::ApplePushServiceConnection::setTopicLists):

  • webpushd/MockPushServiceConnection.h: Added.
  • webpushd/MockPushServiceConnection.mm: Added.

(WebPushD::MockPushServiceConnection::MockPushServiceConnection):
(WebPushD::MockPushServiceConnection::subscribe):
(WebPushD::MockPushServiceConnection::unsubscribe):
(WebPushD::MockPushServiceConnection::enabledTopics):
(WebPushD::MockPushServiceConnection::ignoredTopics):
(WebPushD::MockPushServiceConnection::opportunisticTopics):
(WebPushD::MockPushServiceConnection::nonWakingTopics):
(WebPushD::MockPushServiceConnection::setEnabledTopics):
(WebPushD::MockPushServiceConnection::setIgnoredTopics):
(WebPushD::MockPushServiceConnection::setOpportunisticTopics):
(WebPushD::MockPushServiceConnection::setNonWakingTopics):
(WebPushD::MockPushServiceConnection::setTopicLists):

  • webpushd/PushServiceConnection.h: Added.
  • webpushd/PushServiceConnection.mm: Added.

(WebPushD::PushServiceConnection::startListeningForPushMessages):
(WebPushD::PushServiceConnection::didReceivePushMessage):

Source/WTF:

Add a HAVE macro to guard some of the newer SPI in APSConnection.

  • wtf/PlatformHave.h:

WebKitLibraries:

Add an ApplePushService stub so we can build against it with public SDKs.

  • WebKitPrivateFrameworkStubs/iOS/15/ApplePushService.framework/ApplePushService.tbd: Added.
11:14 AM Changeset in webkit [288901] by commit-queue@webkit.org
  • 10 edits in trunk

Unreviewed, reverting r288538.
https://bugs.webkit.org/show_bug.cgi?id=235968

Array#groupBy name has web-compat issue
<https://github.com/tc39/proposal-array-grouping/issues/37>

Reverted changeset:

"[JSC] Enable Array#groupBy and Array#groupByToMap"
https://bugs.webkit.org/show_bug.cgi?id=235549
https://commits.webkit.org/r288538

11:12 AM Changeset in webkit [288900] by rniwa@webkit.org
  • 10 edits in trunk/Source/WebCore

Use more AtomString and un-inline code for ScriptElementCachedScriptFetcher and its subclasses
https://bugs.webkit.org/show_bug.cgi?id=235919

Reviewed by Darin Adler.

Use more AtomString and moved code from header files to cpp files where appropriate.

  • dom/InlineClassicScript.cpp:

(WebCore::InlineClassicScript::InlineClassicScript):

  • dom/InlineClassicScript.h:
  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::create):
(WebCore::LoadableClassicScript::LoadableClassicScript):

  • dom/LoadableClassicScript.h:
  • dom/LoadableModuleScript.cpp:

(WebCore::LoadableModuleScript::create):
(WebCore::LoadableModuleScript::LoadableModuleScript):

  • dom/LoadableModuleScript.h:
  • dom/LoadableScript.h:

(WebCore::LoadableScript::LoadableScript):

  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::ScriptElement): Call document() and scriptableDocumentParser() once.
(WebCore::ScriptElement::requestClassicScript):
(WebCore::ScriptElement::requestModuleScript):

  • dom/ScriptElementCachedScriptFetcher.h:

(WebCore::ScriptElementCachedScriptFetcher::ScriptElementCachedScriptFetcher):

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

Unreviewed, reverting r288746.
https://bugs.webkit.org/show_bug.cgi?id=235967

Caused a 5% Speedometer-2 - jQuery-TodoMVC regression.

Reverted changeset:

"Enable inert attribute feature flag"
https://bugs.webkit.org/show_bug.cgi?id=235668
https://commits.webkit.org/r288746

11:09 AM Changeset in webkit [288898] by youenn@apple.com
  • 4 edits in trunk/Source/WebKit

Protect NetworkConnectionToWebProcess::createFetchTask from a null service worker connection
https://bugs.webkit.org/show_bug.cgi?id=235878
<rdar://87785042>

Reviewed by Chris Dumez.

After https://bugs.webkit.org/show_bug.cgi?id=234179, there is no guarantee that we have a SWServer/SWServerConnection per session ID.
This is only guaranteed if there is a corresponding network session.
We add null pointer checks to NetworkConnectionToWebProcess::swConnection() which now returns a pointer.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::createFetchTask):
(WebKit::NetworkConnectionToWebProcess::swConnection):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:

(WebKit::ServiceWorkerFetchTask::softUpdateIfNeeded):

11:03 AM Changeset in webkit [288897] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

[Cocoa] "index 0 out of bounds" exception in AVTrackPrivateAVFObjCImpl::videoTrackConfiguration()
https://bugs.webkit.org/show_bug.cgi?id=235918
<rdar://87651247>

Reviewed by Eric Carlson.

Crash data shows a rare exception thrown from inside a static method formatDescriptionFor()
in AVTrackPrivateAVFObjCImpl. The method first queries whether the .formatDescriptions
NSArray property is queryable, then for its count, then retrieves the first object in the
array. It's possible that the array is mutated on a background thread between the count
check and when the first object is retrieved.

To eliminate the possibility that the property is mutated between queries, pull the value
into a RetainPtr and run the query on that retained object. Use -[NSArray firstObject]
rather than -objectAtIndex:0, as the former will return nil if the -count is 0, while the
latter will throw an exception. To guard against the possibility that the
CMFormatDescriptionRef will go out of scope after the return, return the format description
itself wrapped in a RetainPtr as well.

  • platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:

(WebCore::formatDescriptionFor):
(WebCore::AVTrackPrivateAVFObjCImpl::codec const):
(WebCore::AVTrackPrivateAVFObjCImpl::colorSpace const):
(WebCore::AVTrackPrivateAVFObjCImpl::sampleRate const):
(WebCore::AVTrackPrivateAVFObjCImpl::numberOfChannels const):

10:37 AM Changeset in webkit [288896] by commit-queue@webkit.org
  • 11 edits
    1 delete in trunk

[WebXR] Handle changes in XRSession's visibility state
https://bugs.webkit.org/show_bug.cgi?id=235898

Patch by Ada Chan <ada.chan@apple.com> on 2022-02-01
Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Update expectation with passing results.

  • web-platform-tests/webxr/xrSession_visibilityState.https-expected.txt:

Source/WebCore:

Add a new method in WebXRSession for handling visibility state updates.
When the session regains visibility and there are pending frame update
requests, trigger a frame request. Also dispatch a visibilitychange
event when the visibility state changes.

  • Modules/webxr/WebXRSession.cpp:

(WebCore::WebXRSession::updateSessionVisibilityState):
(WebCore::WebXRSession::onFrame):
Bail early if the visibility state is hidden.

  • Modules/webxr/WebXRSession.h:
  • Modules/webxr/XRVisibilityState.h:
  • platform/xr/PlatformXR.h:
  • testing/WebFakeXRDevice.cpp:

(WebCore::SimulatedXRDevice::setVisibilityState):
(WebCore::WebFakeXRDevice::simulateVisibilityChange):

  • testing/WebFakeXRDevice.h:

LayoutTests:

Unskip xrSession_visibilityState.https.html

  • platform/mac/imported/w3c/web-platform-tests/webxr/xrSession_visibilityState.https-expected.txt: Removed.
10:36 AM Changeset in webkit [288895] by Russell Epstein
  • 2 edits in branches/safari-613.1.16.1-branch/Source/WebKit

Cherry-pick r288844. rdar://problem/88241768

[macOS][WP] Add required syscall
https://bugs.webkit.org/show_bug.cgi?id=235901
<rdar://88241768>

Reviewed by Brent Fulgham.

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

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

10:34 AM Changeset in webkit [288894] by eric.carlson@apple.com
  • 39 edits in trunk

[macOS] Expose screen and window capture state to WKWebView
https://bugs.webkit.org/show_bug.cgi?id=235838
<rdar://problem/88207924>

Reviewed by Youenn Fablet.

Source/WebCore:

Updated GetDisplayMediaWindowAndScreen API test.

  • Modules/mediastream/MediaDevices.cpp:

(WebCore::toMediaDeviceInfoKind): Add SystemAudio.

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::sourceCaptureState): Differentiate state of window and screen capture tracks.
(WebCore::MediaStreamTrack::updateToPageMutedState): New.
(WebCore::trackTypeForMediaProducerCaptureKind):
(WebCore::trackMatchesKind): Deleted.

  • Modules/mediastream/MediaStreamTrack.h:
  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::mediaStreamDidFail): Include new source types.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::addTrack): Ditto.
(WebCore::LibWebRTCMediaEndpoint::createSourceAndRTCTrack):

  • page/MediaProducer.h:
  • platform/mediarecorder/MediaRecorderPrivate.cpp:

(WebCore::MediaRecorderPrivate::selectTracks): Include new track types.

  • platform/mediastream/CaptureDevice.h:
  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::create): Ditto.

  • platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp:

(WebCore::DisplayCaptureManagerCocoa::captureDeviceWithPersistentID): Ditto.

  • platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:
  • testing/Internals.cpp:

(WebCore::Internals::pageMediaState): Update with new and changed type names.
(WebCore::Internals::stopObservingRealtimeMediaSource): Include new track types.
(WebCore::Internals::observeMediaStreamTrack): Ditto.

Source/WebKit:

  • GPUProcess/GPUConnectionToWebProcess.cpp:
  • UIProcess/API/C/WKPage.cpp:

(WKPageGetMediaState): Rename *DisplayCaptureDevice to *ScreenCaptureDevice. Add enums
for window capture.

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/API/Cocoa/WKWebView.h: Drive by: fix typo in header doc.
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView setMicrophoneCaptureState:completionHandler:]): MediaProducerMediaCaptureKind::Audio
was renamed to MediaProducerMediaCaptureKind::Microphone.
(-[WKWebView setCameraCaptureState:completionHandler:]): MediaProducerMediaCaptureKind::Video
was renamed to MediaProducerMediaCaptureKind::Camera.
(-[WKWebView _stopMediaCapture]): stopMediaCapture takes an optionSet.
(-[WKWebView _displayCaptureSurfaces]): Expose the type(s) of displays surfaces
being captured.
(-[WKWebView _displayCaptureState]): Expose the display capture state.
(-[WKWebView _systemAudioCaptureState]): Expose the system audio capture state.
(-[WKWebView _setDisplayCaptureState:completionHandler:]): Change the display
capture state.
(-[WKWebView _setSystemAudioCaptureState:completionHandler:]): Change the system
audio capture state.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewMediaCaptureStateDidChange): MediaProducer::AudioCaptureMask ->
MediaProducer::MicrophoneCaptureMask.
(webkitWebViewConfigureMediaCapture): Update for MediaProducerMediaCaptureKind changes.
(webkit_web_view_set_microphone_capture_state): Ditto.
(webkit_web_view_set_camera_capture_state): MediaProducerMediaCaptureKind::Video ->
MediaProducerMediaCaptureKind::Camera
(webkit_web_view_set_display_capture_state): Ditto.
(webkit_web_view_get_display_capture_state): MediaState::HasActiveDisplayCaptureDevice ->
MediaState::HasActiveScreenCaptureDevice. MediaState::HasMutedDisplayCaptureDevice ->
MediaState::HasMutedScreenCaptureDevice

  • UIProcess/Cocoa/PageClientImplCocoa.h:
  • UIProcess/Cocoa/PageClientImplCocoa.mm:

(WebKit::PageClientImplCocoa::displayCaptureWillChange): KVO support.
(WebKit::PageClientImplCocoa::displayCaptureSurfacesWillChange): Ditto.
(WebKit::PageClientImplCocoa::systemAudioCaptureWillChange): Ditto.
(WebKit::PageClientImplCocoa::displayCaptureChanged): Ditto.
(WebKit::PageClientImplCocoa::displayCaptureSurfacesChanged): Ditto.
(WebKit::PageClientImplCocoa::systemAudioCaptureChanged): Ditto.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::SourceProxy::SourceProxy): Support new types.
(WebKit::UserMediaCaptureManagerProxy::SourceProxy::~SourceProxy): Ditto.
(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints): Ditto.

  • UIProcess/PageClient.h:

(WebKit::PageClient::displayCaptureWillChange):
(WebKit::PageClient::displayCaptureSurfacesWillChange):
(WebKit::PageClient::systemAudioCaptureWillChange):
(WebKit::PageClient::displayCaptureChanged):
(WebKit::PageClient::displayCaptureSurfacesChanged):
(WebKit::PageClient::systemAudioCaptureChanged):

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::~UserMediaPermissionRequestManagerProxy):
MediaProducerMediaCaptureKind::AudioVideo -> MediaProducerMediaCaptureKind::EveryKind.
(WebKit::UserMediaPermissionRequestManagerProxy::stopCapture): Ditto.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::updateReportedMediaCaptureState): Deal with new types.

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebProcess.cpp:

(WebKit::checkDocumentsCaptureStateConsistency):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWebKitAPI.xcscheme:
  • TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMediaWindowAndScreen.mm:

(-[DisplayCaptureObserver observeValueForKeyPath:ofObject:change:context:]):
(-[DisplayCaptureObserver waitForDisplayCaptureState:]):
(-[DisplayCaptureObserver waitForDisplayCaptureSurfaces:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/glib/TestExpectations.json: Skip /webkit/WebKitWebView/display-usermedia-permission-request

until someone has a chance to figure out why it times out.

LayoutTests:

  • fast/mediastream/get-display-media-muted.html: Update for new and renamed states.
  • fast/mediastream/media-stream-page-muted-expected.txt: Ditto.
  • fast/mediastream/media-stream-page-muted.html: Ditto.
10:29 AM Changeset in webkit [288893] by Russell Epstein
  • 9 edits in branches/safari-613.1.16.1-branch/Source

Versioning.

WebKit-7613.1.16.1.2

10:28 AM Changeset in webkit [288892] by Russell Epstein
  • 9 edits in branches/safari-613.1.16.0-branch/Source

Versioning.

WebKit-7613.1.16.0.2

10:18 AM Changeset in webkit [288891] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

null ptr deref in LayoutIntegrationLineLayout LineLayout::adjustForPagination and LineLayout::visualOverflowBoundingBoxRectFor
https://bugs.webkit.org/show_bug.cgi?id=235907

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-01
Reviewed by Antti Koivisto.

Source/WebCore:

m_inlineContent could become nullptr (such as after calling LineLayout::clearInlineContent())
so we add these nullptr checks to protect against an nullptr deref, in a similar way to
how it's done in the other methods.

Test: fast/layoutformattingcontext/visual-overflow-bounding-box-rect-crash.html

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::adjustForPagination):
(WebCore::LayoutIntegration::LineLayout::visualOverflowBoundingBoxRectFor const):

LayoutTests:

  • fast/layoutformattingcontext/visual-overflow-bounding-box-rect-crash-expected.txt: Added.
  • fast/layoutformattingcontext/visual-overflow-bounding-box-rect-crash.html: Added.
9:52 AM Changeset in webkit [288890] by Russell Epstein
  • 7 edits in branches/safari-614.1.2-branch/Source

Cherry-pick r288870. rdar://problem/88318960

Revert OSAllocator behavior to pre-Structure-Allocator change one
https://bugs.webkit.org/show_bug.cgi?id=235940

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • jit/ExecutableAllocator.cpp: (JSC::initializeJITPageReservation):

Source/WTF:

Before r288815, OSAllocator::reserveAndCommit can fail only for executable memory.

if (result == MAP_FAILED) {

if (executable)

result = 0;

else

CRASH();

}

However, after r288815, this behavior was changed.

Before r288815,

  1. ExecutableAllocator uses PageReservation::reserveWithGuardPages / PageReservation::reserve / PageReservation::reserveAndCommitWithGuardPages to reserve memory.
  2. In ARM64 macOS, we use PageReservation::reserveWithGuardPages.
  3. PageReservation::reserveWithGuardPages uses OSAllocator::reserveUncommitted.
  4. OSAllocator::reserveUncommitted used OSAllocator::reserveAndCommit internally before r288815.
  5. OSAllocator::reserveAndCommit can fail for executable memory.

But after r288815,

  1. PageReservation::reserveWithGuardPages uses OSAllocator::reserveUncommitted
  2. OSAllocator::reserveUncommitted now uses OSAllocator::tryReserveUncommitted and crash if it fails.

Thus, r288815 changed the behavior of OSAllocator::reserveUncommitted for executable memory. This is causing a crash when we failed to
allocate JIT memory. And probably, it is happening in SIP-enabled root-installing environment.

In this patch,

  1. Accepting failure only for executable memory is ugly hack. We should add PageReservation::tryReserveWithGuardPages.
  2. In PageReservation::tryReserveWithGuardPages we should use OSAllocator::tryReserveUncommitted.

So, this patch reverts the behavior back to pre-r288815 state.
We also fix a bug in tryReserveUncommitted where it handles MAP_FAILED incorrectly. We should not return MAP_FAILED from OSAllocator, instead,
we should return nullptr.

  • wtf/OSAllocator.h:
  • wtf/PageReservation.h: (WTF::PageReservation::tryReserve): (WTF::PageReservation::tryReserveWithGuardPages): (WTF::PageReservation::tryReserveAndCommitWithGuardPages):
  • wtf/posix/OSAllocatorPOSIX.cpp: (WTF::OSAllocator::tryReserveAndCommit): (WTF::OSAllocator::tryReserveUncommitted): (WTF::OSAllocator::reserveAndCommit): (WTF::tryReserveAndCommit): Deleted. (WTF::tryReserveUncommitted): Deleted.
  • wtf/win/OSAllocatorWin.cpp: (WTF::OSAllocator::tryReserveUncommitted): (WTF::OSAllocator::reserveUncommitted): (WTF::OSAllocator::tryReserveAndCommit): (WTF::OSAllocator::reserveAndCommit):

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

9:52 AM Changeset in webkit [288889] by Russell Epstein
  • 2 edits in branches/safari-614.1.2-branch/Source/WebKit

Cherry-pick r288860. rdar://problem/88081007

[iOS] Clean up some issues in the 'com.apple.WebKit.adattributiond.sb' sandbox
https://bugs.webkit.org/show_bug.cgi?id=235929
<rdar://88081007>

Patch by Brent Fulgham <Brent Fulgham> on 2022-01-31
Reviewed by Alex Christensen.

Revise a few syntax issues in the sandbox.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb:

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

9:45 AM Changeset in webkit [288888] by Russell Epstein
  • 1 copy in tags/Safari-614.1.1.3

Tag Safari-614.1.1.3.

9:44 AM Changeset in webkit [288887] by Russell Epstein
  • 2 edits in branches/safari-614.1.1-branch/Source/WebKit

Cherry-pick r288860. rdar://problem/88081007

[iOS] Clean up some issues in the 'com.apple.WebKit.adattributiond.sb' sandbox
https://bugs.webkit.org/show_bug.cgi?id=235929
<rdar://88081007>

Patch by Brent Fulgham <Brent Fulgham> on 2022-01-31
Reviewed by Alex Christensen.

Revise a few syntax issues in the sandbox.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb:

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

9:41 AM Changeset in webkit [288886] by Russell Epstein
  • 9 edits in branches/safari-614.1.1-branch/Source

Versioning.

WebKit-7614.1.1.3

9:33 AM Changeset in webkit [288885] by mark.lam@apple.com
  • 10 edits in trunk/Source

Enhance sanitizeStackForVM() to assist with crash analysis.
https://bugs.webkit.org/show_bug.cgi?id=235752
rdar://81014601

Reviewed by Michael Saboff.

Source/JavaScriptCore:

  1. Remove the AssemblyHelpers version of sanitizeStack. Instead, make the 3 JIT operation functions call sanitizeStackForVM() instead. This ensures that sanitizeStack crashes are not obscured as generic JIT crashes.
  1. Add sanity check RELEASE_ASSERTs to VM::setLastStackTop() with a capture of the relevant variables for crash analysis.
  1. Fix logSanitizeStack() so that it no longer relies on vm.topCallFrame. vm.topCallFrame may not be properly initialized at all the places that sanitizeStackForVM() is called.
  1. Add a JSLock check to sanitizeStackForVM(), and return early if not owned by the current thread. If the JSLock is not owned by the current thread, we can't rely on vm.lastStackTop() being a sane value. Hence, it's not possible to do stack sanitization correctly.

Add sanity check RELEASE_ASSERTs to sanitizeStackForVM() with a capture of
the relevant variables for crash analysis.

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::sanitizeStackInline): Deleted.

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

(JSC::JSC_DEFINE_JIT_OPERATION):

  • jit/ThunkGenerators.cpp:

(JSC::slowPathFor):

  • runtime/JSLock.cpp:

(JSC::JSLock::didAcquireLock):
(JSC::JSLock::grabAllLocks):

  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::setLastStackTop):
(JSC::logSanitizeStack):
(JSC::sanitizeStackForVM):

  • runtime/VM.h:

Source/WTF:

  • wtf/Threading.h:

(WTF::Thread::savedStackPointerAtVMEntry const):
(WTF::Thread::savedLastStackTop const):
(WTF::Thread::savedStackPointerAtVMEntry): Deleted.
(WTF::Thread::savedLastStackTop): Deleted.

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

[GStreamer] Update flags in internal GStreamer source and sink elements
https://bugs.webkit.org/show_bug.cgi?id=235871

Patch by Philippe Normand <pnormand@igalia.com> on 2022-02-01
Reviewed by Xabier Rodriguez-Calvar.

For custom source and sinks subclassing GstBin it's good practice to suppress SOURCE and
SINK flags and to keep the subclass flags as matching the element type.

  • platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:

(webKitWebAudioSrcConstructed):

  • platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:

(webKitGLVideoSinkConstructed):

  • platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp:

(webKitAudioSinkConstructed):
(webkit_audio_sink_class_init):

  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:

(webkitMediaStreamSrcConstructed):

9:17 AM Changeset in webkit [288883] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

[GStreamer] Support for vpx in webrtc encoder
https://bugs.webkit.org/show_bug.cgi?id=235870

Patch by Philippe Normand <pnormand@igalia.com> on 2022-02-01
Reviewed by Xabier Rodriguez-Calvar.

Add support for encoding to VP8 and VP9. The encoder is now available outside of the WebRTC
backend, so that it can potentially be auto-plugged (which will be useful for the
MediaRecorder support). In order to allow this metadata and pad templates were also added to
the element.

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::registerWebKitGStreamerElements):

  • platform/mediastream/gstreamer/GStreamerVideoEncoder.cpp:

(webkit_webrtc_video_encoder_class_init):

8:53 AM Changeset in webkit [288882] by graouts@webkit.org
  • 4 edits
    2 adds in trunk

Redefining @keyframes does not work
https://bugs.webkit.org/show_bug.cgi?id=229437
<rdar://problem/82563372>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add a new test that reproduces the test content submitted with the bug report where
a <style> element containing a @keyframes rule with a given name is replaced with
another <style> element containing another @keyframes rule with the same name
but different keyframes. The test checks that the animation correctly uses the new
keyframes when querying the computed style.

We also get a fair few new PASS results on a ::marker animation test since that test
sets the textContent for a shared <style> element with generated @keyframes rules.

  • web-platform-tests/css/css-animations/animation-style-element-replaced-with-keyframes-rule-of-same-name-expected.txt: Added.
  • web-platform-tests/css/css-animations/animation-style-element-replaced-with-keyframes-rule-of-same-name.html: Added.
  • web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt:

Source/WebCore:

Notify the document upon insertion of a new @keyframes rule such that any running CSS Animation
using that rule name may update its computed keyframes.

Test: imported/w3c/web-platform-tests/css/css-animations/animation-style-element-replaced-with-keyframes-rule-of-same-name.html

  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::addKeyframeStyle):

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

Animation from scale(0) has missing backing store
https://bugs.webkit.org/show_bug.cgi?id=227733
<rdar://problem/80246192>

Reviewed by Simon Fraser.

Source/WebCore:

Use the style recorded before we applied animations to this element the last
time we resolved style for keyframes that don't set a value for the "transform"
property.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::computeExtentOfTransformAnimation const):

LayoutTests:

Add a new test which animates two squares, one on top of each other. The bottom square uses an animation
that has an explicit "from" value of scale(0) and an explicit "to" value of scale(1) and is black. The top
square uses an animation that has an explicit "from" value of scale(0) but no explicit "to" value, thus
animating to scale(1) as well, and is white, matching the background color.

The bug we are fixing is that the square with an implicit "to" value would not yield a visible animation
since we wouldn't account for the scale(1) target value and assuming we're never animating to a non-0
value.

This test assumes that both animations run at the same time and thus the white square will always cover
the black square (which is smaller to ensure no issues at the edges) and yield a completely white page.

  • webanimations/accelerated-transform-animation-from-scale-zero-and-implicit-to-kefyrame-expected.html: Added.
  • webanimations/accelerated-transform-animation-from-scale-zero-and-implicit-to-kefyrame.html: Added.
8:49 AM Changeset in webkit [288880] by Simon Fraser
  • 2 edits in trunk/Source/WebKit

Minor cleanup in RemoteLayerBackingStoreCollection
https://bugs.webkit.org/show_bug.cgi?id=235936

Reviewed by Tim Horton.

Do time math once. Insert a blank line for clarity.

  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:

(WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatile):
(WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable):

8:41 AM Changeset in webkit [288879] by Oriol Brufau
  • 5 edits
    2 adds in trunk

[css-cascade] Fix removal of not yet loaded CSS @import
https://bugs.webkit.org/show_bug.cgi?id=235930

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add new test.

  • web-platform-tests/css/css-cascade/import-removal-expected.html: Added.
  • web-platform-tests/css/css-cascade/import-removal.html: Added.

Source/WebCore:

When removing a not yet loaded CSS @import, the hasPendingSheet() flag
was not cleared. This resulted in a completely blank page.
This patch makes sure to cancel the load before deleting the rule.

Test: imported/w3c/web-platform-tests/css/css-cascade/import-removal.html

  • css/StyleRuleImport.cpp:

(WebCore::StyleRuleImport::cancelLoad):

  • css/StyleRuleImport.h:
  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::wrapperDeleteRule):

8:35 AM Changeset in webkit [288878] by Sam Sneddon
  • 6 edits in trunk/Tools

Migrate LayoutTestFinder tests from FileSystemMock to pyfakefs
https://bugs.webkit.org/show_bug.cgi?id=235370
<rdar://problem/87785236>

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/init.py:

Register pyfakefs (last Python 2 supporting version).

  • Scripts/webkitpy/common/host_mock.py:

(MockHost.init):
Pass kwargs through to MockSystemHost.

  • Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py:

(LayoutTestFinderTests):
(LayoutTestFinderTests.setUp):
Setup the MockHost with pyfakefs.
(LayoutTestFinderTests.test_find_glob_b):
Uncomment now we don't need to mitigate FileSystemMock bugs.
(LayoutTestFinderTests.test_find_glob_c):
Uncomment now we don't need to mitigate FileSystemMock bugs.
(LayoutTestFinderTests.test_is_w3c_resource_file):
Ensure the directory exists before writing.

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RebaselineTest.test_reset_results):
Call fs.clear_written_files before test.
(RebaselineTest.test_missing_results):
Call fs.clear_written_files before test.
(RebaselineTest.test_new_baseline):
Call fs.clear_written_files before test.

  • Scripts/webkitpy/port/test.py:

(add_unit_tests_to_mock_filesystem):
Fix this with the real FileSystem class, conditionally deleting files. Remove mock-only
fs.clear_written_files call.

8:26 AM WebKitGTK/Debugging edited by Chris Lord
(diff)
8:11 AM Changeset in webkit [288877] by Simon Fraser
  • 3 edits in trunk/Source/WebKit

RemoteRenderingBackendProxy should not be a IPC::MessageSender
https://bugs.webkit.org/show_bug.cgi?id=235935

Reviewed by Wenson Hsieh.

Calling send() in RemoteRenderingBackendProxy fails to send a message to the GPU process,
because it has no connection(), only a StreamClientConnection or the GPUProcessConnection.

So make it not inherit from IPC::MessageSender. Code using send() now explicitly uses
ensureGPUProcessConnection().connection().

(WebKit::RemoteLayerBackingStore::setBufferVolatility):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::~RemoteRenderingBackendProxy):
(WebKit::RemoteRenderingBackendProxy::gpuProcessConnection):
(WebKit::RemoteRenderingBackendProxy::waitForDidCreateImageBufferBackend):
(WebKit::RemoteRenderingBackendProxy::waitForDidFlush):
(WebKit::RemoteRenderingBackendProxy::streamConnection):
(WebKit::RemoteRenderingBackendProxy::messageSenderConnection const): Deleted.
(WebKit::RemoteRenderingBackendProxy::messageSenderDestinationID const): Deleted.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
7:51 AM Changeset in webkit [288876] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

[BigSur+ wk2 Debug] webrtc/video-mute-vp8.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=230359
<rdar://problem/83203317>

Unreviewed.

Test is no longer flaky on bots.

  • platform/mac-wk2/TestExpectations:
7:32 AM Changeset in webkit [288875] by Jonathan Bedard
  • 2 edits in trunk/Tools

[EWS] Trigger embedded builders on pull-requests
https://bugs.webkit.org/show_bug.cgi?id=235913
<rdar://problem/88290964>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/config.json: Pull-requests should trigger embedded builders.

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

7:12 AM Changeset in webkit [288874] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

AX: nullptr crash under AccessibilityRenderObject::computeAccessibilityIsIgnored
https://bugs.webkit.org/show_bug.cgi?id=235945
rdar://88217815

Reviewed by Andres Gonzalez.

This is similar to https://bugs.webkit.org/show_bug.cgi?id=161276.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):

m_renderer is a WeakPtr and can become null during parentObjectUnignored call, same as
the case below.

5:15 AM Changeset in webkit [288873] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Unreviewed. [GTK][WPE] Fix compile warning

  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::atspiRole): Add AccessibilityRole::Model to switch.

4:29 AM Changeset in webkit [288872] by Carlos Garcia Campos
  • 21 edits
    3 adds
    6 deletes in trunk

[GTK][WPE] Switch to use ATSPI instead of ATK
https://bugs.webkit.org/show_bug.cgi?id=235942

Reviewed by Adrian Perez de Castro.

.:

Use ATSPI by default.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

LayoutTests:

Update test expectations.

  • accessibility/aria-table-attributes.html:
  • accessibility/combo-box-collapsed-selection-changed.html:
  • accessibility/gtk/caret-browsing-select-focus-expected.txt:
  • accessibility/gtk/caret-browsing-select-focus.html:
  • accessibility/gtk/caret-browsing-text-focus-expected.txt: Removed.
  • accessibility/gtk/caret-browsing-text-focus.html: Removed.
  • accessibility/gtk/combobox-descendants-orientation-crash-expected.txt: Removed.
  • accessibility/gtk/combobox-descendants-orientation-crash.html: Removed.
  • accessibility/gtk/object-attributes-expected.txt:
  • accessibility/gtk/spans-paragraphs-and-divs-tree-expected.txt:
  • accessibility/menu-list-sends-change-notification.html:
  • platform/glib/TestExpectations:
  • platform/glib/accessibility/aria-combobox-expected.txt: Added.
  • platform/glib/accessibility/aria-combobox-hierarchy-expected.txt:
  • platform/glib/accessibility/aria-table-attributes-expected.txt: Removed.
  • platform/glib/accessibility/combo-box-collapsed-selection-changed-expected.txt: Added.
  • platform/glib/accessibility/content-editable-as-textarea-expected.txt:
  • platform/glib/accessibility/lists-expected.txt:
  • platform/glib/accessibility/menu-list-sends-change-notification-expected.txt: Removed.
  • platform/glib/accessibility/multiselect-list-reports-active-option-expected.txt: Added.
  • platform/glib/accessibility/svg-remote-element-expected.txt:
  • platform/glib/accessibility/table-attributes-expected.txt:
  • platform/glib/accessibility/table-one-cell-expected.txt:
  • platform/glib/accessibility/table-sections-expected.txt:
  • platform/glib/accessibility/transformed-element-expected.txt:
  • platform/gtk/TestExpectations:
2:32 AM Changeset in webkit [288871] by Carlos Garcia Campos
  • 14 edits
    2 adds in trunk/WebDriverTests

Unreviewed. Update W3C WebDriver imported tests.

  • imported/w3c/importer.json:
  • imported/w3c/tools/webdriver/webdriver/bidi/client.py:
  • imported/w3c/tools/webdriver/webdriver/client.py:
  • imported/w3c/tools/wptrunner/wptrunner/browsers/firefox_android.py:
  • imported/w3c/webdriver/tests/conftest.py:
  • imported/w3c/webdriver/tests/find_element_from_shadow_root/find.py:
  • imported/w3c/webdriver/tests/find_element_from_shadow_root/user_prompts.py:
  • imported/w3c/webdriver/tests/find_elements_from_shadow_root/find.py:
  • imported/w3c/webdriver/tests/find_elements_from_shadow_root/user_prompts.py:
  • imported/w3c/webdriver/tests/print/printcmd.py:
  • imported/w3c/webdriver/tests/support/asserts.py:
  • imported/w3c/webdriver/tests/support/fixtures.py:
  • imported/w3c/webdriver/tests/support/fixtures_bidi.py: Added.
  • imported/w3c/webdriver/tests/support/fixtures_http.py: Added.
2:26 AM Changeset in webkit [288870] by ysuzuki@apple.com
  • 7 edits in trunk/Source

Revert OSAllocator behavior to pre-Structure-Allocator change one
https://bugs.webkit.org/show_bug.cgi?id=235940

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • jit/ExecutableAllocator.cpp:

(JSC::initializeJITPageReservation):

Source/WTF:

Before r288815, OSAllocator::reserveAndCommit can fail only for executable memory.

if (result == MAP_FAILED) {

if (executable)

result = 0;

else

CRASH();

}

However, after r288815, this behavior was changed.

Before r288815,

  1. ExecutableAllocator uses PageReservation::reserveWithGuardPages / PageReservation::reserve / PageReservation::reserveAndCommitWithGuardPages to reserve memory.
  2. In ARM64 macOS, we use PageReservation::reserveWithGuardPages.
  3. PageReservation::reserveWithGuardPages uses OSAllocator::reserveUncommitted.
  4. OSAllocator::reserveUncommitted used OSAllocator::reserveAndCommit internally before r288815.
  5. OSAllocator::reserveAndCommit can fail for executable memory.

But after r288815,

  1. PageReservation::reserveWithGuardPages uses OSAllocator::reserveUncommitted
  2. OSAllocator::reserveUncommitted now uses OSAllocator::tryReserveUncommitted and crash if it fails.

Thus, r288815 changed the behavior of OSAllocator::reserveUncommitted for executable memory. This is causing a crash when we failed to
allocate JIT memory. And probably, it is happening in SIP-enabled root-installing environment.

In this patch,

  1. Accepting failure only for executable memory is ugly hack. We should add PageReservation::tryReserveWithGuardPages.
  2. In PageReservation::tryReserveWithGuardPages we should use OSAllocator::tryReserveUncommitted.

So, this patch reverts the behavior back to pre-r288815 state.
We also fix a bug in tryReserveUncommitted where it handles MAP_FAILED incorrectly. We should not return MAP_FAILED from OSAllocator, instead,
we should return nullptr.

  • wtf/OSAllocator.h:
  • wtf/PageReservation.h:

(WTF::PageReservation::tryReserve):
(WTF::PageReservation::tryReserveWithGuardPages):
(WTF::PageReservation::tryReserveAndCommitWithGuardPages):

  • wtf/posix/OSAllocatorPOSIX.cpp:

(WTF::OSAllocator::tryReserveAndCommit):
(WTF::OSAllocator::tryReserveUncommitted):
(WTF::OSAllocator::reserveAndCommit):
(WTF::tryReserveAndCommit): Deleted.
(WTF::tryReserveUncommitted): Deleted.

  • wtf/win/OSAllocatorWin.cpp:

(WTF::OSAllocator::tryReserveUncommitted):
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::tryReserveAndCommit):
(WTF::OSAllocator::reserveAndCommit):

1:33 AM Changeset in webkit [288869] by ntim@apple.com
  • 18 edits
    2 deletes in trunk

Entirely remove support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=234672

Reviewed by Simon Fraser.

.:

  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/WebKitFeatures.cmake:

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Source/WebCore:

  • css/CSSProperties.json:
  • css/CSSValueKeywords.in:

Source/WTF:

  • wtf/PlatformEnableCocoa.h:

Tools:

  • Scripts/webkitperl/FeatureList.pm:

LayoutTests:

  • fast/text/trailing-word-detection-expected.txt: Removed.
  • fast/text/trailing-word-detection.html: Removed.
  • platform/glib/TestExpectations:
  • platform/win/TestExpectations:
  • platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Jan 31, 2022:

11:44 PM Changeset in webkit [288868] by mmaxfield@apple.com
  • 59 edits in trunk/Source

Rename FontCascade::fontMetrics() and RenderStyle::fontMetrics() to fontMetricsOfPrimaryFont()
https://bugs.webkit.org/show_bug.cgi?id=235938

Reviewed by Alan Bujtas.

Source/WebCore:

It's probably good to remind people that when they call this function,
they might not be getting what they might think they're getting.

No new tests because there is no behavior change.

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::equalForLengthResolution):

  • display/css/DisplayBoxPainter.cpp:

(WebCore::Display::BoxPainter::paintBoxContent):

  • display/css/DisplayStyle.h:

(WebCore::Display::Style::fontMetricsOfPrimaryFont const):
(WebCore::Display::Style::fontMetrics const): Deleted.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::createInnerTextStyle):

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::FontProxy::fontMetricsOfPrimaryFont const):
(WebCore::CanvasRenderingContext2DBase::drawTextUnchecked):
(WebCore::CanvasRenderingContext2DBase::measureTextInternal):
(WebCore::CanvasRenderingContext2DBase::textOffset):
(WebCore::CanvasRenderingContext2DBase::FontProxy::fontMetrics const): Deleted.

  • html/canvas/CanvasRenderingContext2DBase.h:
  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::drawRulers):
(WebCore::InspectorOverlay::drawElementTitle):
(WebCore::expectedSizeForLayoutLabel):
(WebCore::drawLayoutLabel):

  • layout/formattingContexts/inline/InlineFormattingQuirks.cpp:

(WebCore::Layout::InlineFormattingQuirks::initialLineHeight const):

  • layout/formattingContexts/inline/InlineLevelBox.h:

(WebCore::Layout::m_style):
(WebCore::Layout::InlineLevelBox::preferredLineHeight const):
(WebCore::Layout::InlineLevelBox::primaryfontMetricsOfPrimaryFont const):
(WebCore::Layout::InlineLevelBox::primaryFontMetrics const): Deleted.

  • layout/formattingContexts/inline/InlineLineBox.cpp:

(WebCore::Layout::LineBox::logicalRectForTextRun const):

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::LineBoxBuilder::setVerticalGeometryForLineBreakBox const):
(WebCore::Layout::LineBoxBuilder::setInitialVerticalGeometryForInlineBox const):

  • layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp:

(WebCore::Layout::LineBoxVerticalAligner::computeLineBoxLogicalHeight const):
(WebCore::Layout::LineBoxVerticalAligner::computeRootInlineBoxVerticalPosition const):
(WebCore::Layout::LineBoxVerticalAligner::alignInlineLevelBoxes const):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::floatWidthForSimpleText const):
(WebCore::FontCascade::floatWidthForComplexText const):

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::fontMetricsOfPrimaryFont const):
(WebCore::FontCascade::fontMetrics const): Deleted.

  • rendering/CaretRectComputation.cpp:

(WebCore::computeCaretRectForEmptyElement):
(WebCore::computeCaretRectForBox):

  • rendering/LegacyEllipsisBox.cpp:

(WebCore::LegacyEllipsisBox::paint):
(WebCore::LegacyEllipsisBox::paintMarkupBox):
(WebCore::LegacyEllipsisBox::nodeAtPoint):

  • rendering/LegacyInlineBox.cpp:

(WebCore::LegacyInlineBox::logicalHeight const):

  • rendering/LegacyInlineFlowBox.cpp:

(WebCore::LegacyInlineFlowBox::addToLine):
(WebCore::placeChildInlineBoxesInBlockDirection):
(WebCore::LegacyInlineFlowBox::placeBoxesInBlockDirection):

  • rendering/LegacyLineLayout.cpp:

(WebCore::setLogicalWidthForTextRun):

  • rendering/LegacyRootInlineBox.cpp:

(WebCore::LegacyRootInlineBox::lineSnapAdjustment const):
(WebCore::LegacyRootInlineBox::ascentAndDescentForBox const):
(WebCore::LegacyRootInlineBox::verticalPositionForBox):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::baselinePosition const):
(WebCore::RenderBlock::inlineBlockBaseline const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::adjustInitialLetterPosition):
(WebCore::RenderBlockFlow::firstLineBaseline const):
(WebCore::RenderBlockFlow::inlineBlockBaseline const):

  • rendering/RenderEmbeddedObject.cpp:

(WebCore::RenderEmbeddedObject::paintReplaced):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::setImageSizeForAltText):
(WebCore::RenderImage::paintReplaced):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::mayAffectLayout const):
(WebCore::RenderInline::baselinePosition const):

  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::baselinePosition const):

  • rendering/RenderListBox.cpp:

(WebCore::itemOffsetForAlignment):
(WebCore::RenderListBox::itemHeight const):

  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::layout):
(WebCore::RenderListMarker::updateContent):
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::updateMargins):
(WebCore::RenderListMarker::relativeMarkerRect):

  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::layoutBlock):

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::paintForeground):
(WebCore::TextBoxPainter::paintCompositionUnderline):
(WebCore::TextBoxPainter::calculateDocumentMarkerBounds):
(WebCore::TextBoxPainter::textOriginFromPaintRect const):

  • rendering/TextDecorationPainter.cpp:

(WebCore::TextDecorationPainter::paintBackgroundDecorations):
(WebCore::TextDecorationPainter::paintForegroundDecorations):
(WebCore::TextDecorationPainter::paintLineThrough):

  • rendering/TextPainter.cpp:

(WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):

  • rendering/line/LineInlineHeaders.h:

(WebCore::requiresLineBoxForContent):

  • rendering/mathml/RenderMathMLBlock.cpp:

(WebCore::axisHeight):
(WebCore::toUserUnits):

  • rendering/mathml/RenderMathMLRoot.cpp:

(WebCore::RenderMathMLRoot::verticalParameters):

  • rendering/mathml/RenderMathMLScripts.cpp:

(WebCore::RenderMathMLScripts::verticalParameters const):

  • rendering/mathml/RenderMathMLUnderOver.cpp:

(WebCore::RenderMathMLUnderOver::verticalParameters const):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::fontMetricsOfPrimaryFont const):
(WebCore::RenderStyle::computeLineHeight const):
(WebCore::RenderStyle::fontMetrics const): Deleted.

  • rendering/style/RenderStyle.h:
  • rendering/svg/RenderSVGInlineText.cpp:

(WebCore::RenderSVGInlineText::positionForPoint):

  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::selectionRectForTextFragment const):
(WebCore::SVGInlineTextBox::paintDecorationWithStyle):
(WebCore::SVGInlineTextBox::paintTextWithShadows):
(WebCore::SVGInlineTextBox::calculateBoundaries const):
(WebCore::SVGInlineTextBox::nodeAtPoint):

  • rendering/svg/SVGTextLayoutEngineBaseline.cpp:

(WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift const):
(WebCore::SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift const):
(WebCore::SVGTextLayoutEngineBaseline::calculateGlyphAdvanceAndOrientation const):

  • rendering/svg/SVGTextMetrics.cpp:

(WebCore::SVGTextMetrics::SVGTextMetrics):

  • rendering/svg/SVGTextQuery.cpp:

(WebCore::calculateGlyphBoundaries):

  • rendering/updating/RenderTreeBuilderFirstLetter.cpp:

(WebCore::styleForFirstLetter):

  • style/InlineTextBoxStyle.cpp:

(WebCore::visualOverflowForDecorations):

  • style/StyleResolveForFontRaw.cpp:

(WebCore::Style::resolveForFontRaw):

  • svg/SVGLengthContext.cpp:

(WebCore::SVGLengthContext::convertValueFromUserUnitsToEXS const):
(WebCore::SVGLengthContext::convertValueFromEXSToUserUnits const):

Source/WebKit:

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::dictionaryPopupInfoForRange):

Source/WebKitLegacy/mac:

  • WebView/WebImmediateActionController.mm:

(+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):

9:47 PM Changeset in webkit [288867] by Brent Fulgham
  • 5 edits in trunk/Source/WebCore

Fix handling of access key events
https://bugs.webkit.org/show_bug.cgi?id=234147
<rdar://problem/86320218>

Reviewed by David Kilzer.

Improve focus handling for HTMLElement-based elements to ensure accessKey events
are properly dispatched.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::press): Ensure correct object is used after 'accessKeyAction'
is invoked.

  • dom/EventDispatcher.cpp:

(WebCore::callDefaultEventHandlersInBubblingOrder) Protect element during default
event bubbling.

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::reportValidity): Ensure correct element is
used after focus event.

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleAccessKey): Ensure correct object is used after
'accessKeyAction' is invoked.

8:32 PM Changeset in webkit [288866] by ddkilzer@apple.com
  • 2 edits in trunk/Source/bmalloc

[libpas] get_num_free_bytes_for_each_heap_callback() is called with arg pointing to uninitialized stack memory
<https://webkit.org/b/235931>
<rdar://problem/88303899>

Reviewed by Yusuke Suzuki.

  • libpas/src/libpas/pas_all_heaps.c:

(pas_all_heaps_get_num_free_bytes):

  • Initialize result stack variable to zero.
6:57 PM Changeset in webkit [288865] by Said Abou-Hallawa
  • 26 edits in trunk

[GPU Process] Pattern should hold SourceImage which can be converted to a NativeImage only when needed
https://bugs.webkit.org/show_bug.cgi?id=232411
<rdar://problem/84998738>

Reviewed by Darin Adler.

Source/WebCore:

Make Pattern hold a SourceImage and add getters to retrieve a NativeImage
and an ImageBuffer. In these getters the SourceImage will either return
the current image source or get one from the other if needed.

  • html/canvas/CanvasPattern.cpp:

(WebCore::CanvasPattern::create):
(WebCore::CanvasPattern::CanvasPattern):

  • html/canvas/CanvasPattern.h:
  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::createPattern):

  • inspector/InspectorCanvas.cpp:

(WebCore::InspectorCanvas::buildArrayForCanvasPattern):

  • platform/graphics/NativeImage.h:

Make NativeImage a thread-safe RefCounted and make its destruction happen
on the main thread. This is similar to what we do for ImageBuffer. And
the reason for this is the message handler in the GPUProcess may create
NativeImages on the main thread as the SourceImages for the Patterns of
the SetState item. These NativeImages will be deleted in the replaying
thread after applying the SetState item.

  • platform/graphics/Pattern.cpp:

(WebCore::Pattern::create):
(WebCore::Pattern::Pattern):

  • platform/graphics/Pattern.h:

(WebCore::Pattern::encode const):
(WebCore::Pattern::decode):
Add encoding and decoding mehods for Pattern which will be called from
SetState::encode() and SetState::decode().

  • platform/graphics/SourceImage.cpp:

(WebCore::SourceImage::nativeImage const):
(WebCore::SourceImage::imageBuffer const):
(WebCore::SourceImage::size const):
(WebCore::SourceImage::nativeImage): Deleted.
(WebCore::SourceImage::imageBuffer): Deleted.

  • platform/graphics/SourceImage.h:

Make SourceImage keep the image source it was created with. Get a temporary
image source if it is different from what is stored in m_imageVariant.

  • platform/graphics/cairo/PatternCairo.cpp:

(WebCore::Pattern::createPlatformPattern const):

  • platform/graphics/cg/PatternCG.cpp:

(WebCore::Pattern::createPlatformPattern const):

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::SetState::SetState):
(WebCore::DisplayList::SetState::apply):

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::SetState::stateChange):
(WebCore::DisplayList::SetState::encode const):
(WebCore::DisplayList::SetState::decode):
(WebCore::DisplayList::SetState::strokePatternParameters const): Deleted.
(WebCore::DisplayList::SetState::fillPatternParameters const): Deleted.
(WebCore::DisplayList::SetState::strokePatternImageIdentifier const): Deleted.
(WebCore::DisplayList::SetState::fillPatternImageIdentifier const): Deleted.
Simplify SetState by deleting the PatternData members. Replace these members
by the strokePattern and fillPattern since these patterns can be encoded
and decoded.

  • platform/graphics/displaylists/DisplayListReplayer.cpp:

(WebCore::DisplayList::applySetStateItem):

  • platform/graphics/displaylists/DisplayListResourceHeap.h:

Add the helper LocalResourceHeap::getSourceImage() to be used by
applySetStateItem().

  • platform/graphics/filters/software/FETileSoftwareApplier.cpp:

(WebCore::FETileSoftwareApplier::apply const):

  • rendering/RenderLayerBacking.cpp:

(WebCore::patternForDescription):

  • rendering/svg/RenderSVGResourcePattern.cpp:

(WebCore::RenderSVGResourcePattern::buildPattern):

Source/WebKit:

Add the helpers QualifiedResourceHeap::getSourceImage() and
RemoteResourceCache::cachedSourceImage() which will be used by
RemoteDisplayListRecorder::setState() to replace the
RenderingResourceIdentifier of the pattern's tileImage by an actual
SourceImage.

  • GPUProcess/graphics/QualifiedResourceHeap.h:

(WebKit::QualifiedResourceHeap::getSourceImage const):

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::setState):
(WebKit::RemoteDisplayListRecorder::drawFilteredImageBuffer):
(WebKit::RemoteDisplayListRecorder::setStateWithQualifiedIdentifiers): Deleted.

  • GPUProcess/graphics/RemoteResourceCache.cpp:

(WebKit::RemoteResourceCache::cachedSourceImage const):

  • GPUProcess/graphics/RemoteResourceCache.h:

LayoutTests:

Unskip layout tests for gpu process because they are fixed by this change.

  • gpu-process/TestExpectations:
6:43 PM Changeset in webkit [288864] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[iOS] Don't register undo actions in undoManager overridden by WKWebView client
https://bugs.webkit.org/show_bug.cgi?id=235928
<rdar://problem/87192657>

Patch by Matt Gilligan <matthew_gilligan@apple.com> on 2022-01-31
Reviewed by Tim Horton.

  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::registerEditCommand):
Use -[WKContentView undoManagerForWebView] rather than -undoManager to prevent registering
actions in an undo manager overridden by a WKWebView subclass. This ensures that all
actions are registered in the same manager. If the client has disabled groupsByEvent on the
overridden undoManager, this prevents an exception from being thrown due to registering
actions outside of an undo group.

5:57 PM Changeset in webkit [288863] by Russell Epstein
  • 1 copy in tags/Safari-614.1.1.2

Tag Safari-614.1.1.2.

5:56 PM Changeset in webkit [288862] by Russell Epstein
  • 9 edits in branches/safari-614.1.1-branch/Source

Versioning.

WebKit-7614.1.1.2

5:30 PM Changeset in webkit [288861] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REGRESSION(288052?): editing/execCommand/paste-as-quotation-disconnected-paragraph-ancestor-crash.html makes subsequent test fail, as DumpRenderTree compares to wrong expected result
https://bugs.webkit.org/show_bug.cgi?id=235733

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations: Disabling test to verify cause of test failures.
5:19 PM Changeset in webkit [288860] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Clean up some issues in the 'com.apple.WebKit.adattributiond.sb' sandbox
https://bugs.webkit.org/show_bug.cgi?id=235929
<rdar://88081007>

Patch by Brent Fulgham <Brent Fulgham> on 2022-01-31
Reviewed by Alex Christensen.

Revise a few syntax issues in the sandbox.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb:
5:10 PM Changeset in webkit [288859] by Andres Gonzalez
  • 3 edits in trunk/Source/WebCore

Add to AXLogger the ability to log only from the specified thread.
https://bugs.webkit.org/show_bug.cgi?id=235843
<rdar://problem/88211205>

Reviewed by Chris Fleizach.

No change in functionality, debugging code.

Determine whether to log messages for the invoking thread based on the
value of a static hardcoded variable. It makes figuring out the flow of
method calls and messages when you can log only from the main thread,
off the main thread, or the combination.

  • accessibility/AXLogger.cpp:

(WebCore::shouldLog):
(WebCore::AXLogger::AXLogger):
(WebCore::AXLogger::~AXLogger):
(WebCore::AXLogger::log):
(WebCore::AXLogger::add):
(WebCore::operator<<):

  • accessibility/AXLogger.h:
4:31 PM Changeset in webkit [288858] by Russell Epstein
  • 1 copy in tags/Safari-613.1.16.1.1

Tag Safari-613.1.16.1.1.

4:31 PM Changeset in webkit [288857] by Russell Epstein
  • 1 copy in tags/Safari-613.1.16.0.1

Tag Safari-613.1.16.0.1.

4:30 PM Changeset in webkit [288856] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[RISCV64] Add remaining MacroAssemblerRISCV64 branching operations
https://bugs.webkit.org/show_bug.cgi?id=235886

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-01-31
Reviewed by Yusuke Suzuki.

Provide MacroAssemblerRISCV64 implementations for the remaining
branching operations. When branching on non-overlow conditions, the
implementations remain pretty trivial. For the overflow condition,
a helper method is provided to cover different-sized operations as well
as operation-specific instruction sequences.

  • assembler/MacroAssemblerRISCV64.h:

(JSC::MacroAssemblerRISCV64::branchAdd32):
(JSC::MacroAssemblerRISCV64::branchAdd64):
(JSC::MacroAssemblerRISCV64::branchSub32):
(JSC::MacroAssemblerRISCV64::branchSub64):
(JSC::MacroAssemblerRISCV64::branchMul32):
(JSC::MacroAssemblerRISCV64::branchMul64):
(JSC::MacroAssemblerRISCV64::branchNeg32):
(JSC::MacroAssemblerRISCV64::branchNeg64):
(JSC::MacroAssemblerRISCV64::branchForArithmeticOverflow):

4:02 PM Changeset in webkit [288855] by Russell Epstein
  • 2 edits in branches/safari-614.1.2-branch/Source/JavaScriptCore

Cherry-pick r288854. rdar://problem/88299213

Try-reserving Structure heap after reserving all the other heaps including JIT heap
https://bugs.webkit.org/show_bug.cgi?id=235922

Reviewed by Saam Barati.

Structure heap should be reserved after reserving all the other heaps including JIT heap.

  • runtime/InitializeThreading.cpp: (JSC::initialize):

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

3:50 PM Changeset in webkit [288854] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Try-reserving Structure heap after reserving all the other heaps including JIT heap
https://bugs.webkit.org/show_bug.cgi?id=235922

Reviewed by Saam Barati.

Structure heap should be reserved after reserving all the other heaps including JIT heap.

  • runtime/InitializeThreading.cpp:

(JSC::initialize):

3:29 PM Changeset in webkit [288853] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r288829. rdar://problem/87402815

LineLayout::collectOverflow() should null check m_inlineContent
https://bugs.webkit.org/show_bug.cgi?id=235902
rdar://87402815

Reviewed by Alan Bujtas.

Speculative fix but it can be null.

  • layout/integration/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::collectOverflow):

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

3:29 PM Changeset in webkit [288852] by Russell Epstein
  • 8 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r288652. rdar://problem/87169406

[WebAuthn] We should pass extensions to ASC if possible
https://bugs.webkit.org/show_bug.cgi?id=235533
rdar://87169406

Reviewed by Brent Fulgham.

This patch starts passing WebAuthn extensions to ASC if possible,
in order to support the googleLegacyAppidSupport extension, which
is required to register security keys on google.com. It also starts
passing the attestationPreference option, which was not being passed before.

Tested manually. Previous version of patch contained
TestWebKitAPI.WebAuthenticationPanel.PublicKeyCredentialRequestOptionsASC
and TestWebKitAPI.WebAuthenticationPanel.PublicKeyCredentialCreationOptionsASC,
but were removed due to difficulty softlinking from tests.

  • Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
  • UIProcess/API/Cocoa/_WKAuthenticationExtensionsClientInputs.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm: (authenticationExtensionsClientInputs):
  • UIProcess/WebAuthentication/Cocoa/AuthenticationServicesCoreSoftLink.h:
  • UIProcess/WebAuthentication/Cocoa/AuthenticationServicesCoreSoftLink.mm:
  • UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm: (WebKit::toNSString): (WebKit::toASCExtensions): (WebKit::configureRegistrationRequestContext): (WebKit::configurationAssertionRequestContext):
  • UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h:
  • WebKit.xcodeproj/project.pbxproj:

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

3:29 PM Changeset in webkit [288851] by Russell Epstein
  • 5 edits
    2 adds in branches/safari-613-branch

Cherry-pick r288095. rdar://problem/88286876

[LFC][IFC] ASSERT in InlineContentBreaker::tryBreakingPreviousNonOverflowingRuns (!partialRun->length) when webinspector is open
https://bugs.webkit.org/show_bug.cgi?id=235286

Reviewed by Antti Koivisto.

Source/WebCore:

When the overflowing run is non-breakable (in this case an "inline box end" with padding), we try to find a breakable
previous run in the candidate list. If we find such text run, we try to break it by looking at the applicable CSS properties
(e.g. word-break, overflow-wrap). Now text runs with 1 (and 0) length and no adjacent text runs need special handling
as they can't be broken "within word" or at boundary (they treated as "unbreakable").

Test: fast/text/overflow-wrap-assert-with-zero-width-overflowing-content.html

  • layout/formattingContexts/inline/InlineContentBreaker.cpp: (WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const): (WebCore::Layout::InlineContentBreaker::tryBreakingPreviousNonOverflowingRuns const): The trailing run starts at the beginning of the run and ends right before at the last character.

LayoutTests:

  • fast/text/overflow-wrap-assert-with-zero-width-overflowing-content-expected.txt: Added.
  • fast/text/overflow-wrap-assert-with-zero-width-overflowing-content.html: Added.
  • platform/ios/fast/text/basic/015-expected.txt: Progressions.
  • platform/mac/fast/text/basic/015-expected.txt:

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

3:17 PM Changeset in webkit [288850] by Robert Jenner
  • 2 edits in branches/safari-613-branch/LayoutTests

Unreviewed test gardening, fix a bad merge (r288843)

  • platform/mac-wk2/TestExpectations:
3:11 PM Changeset in webkit [288849] by Megan Gardner
  • 4 edits in trunk

Collapsed ranges return zero rects in DocumentContext
https://bugs.webkit.org/show_bug.cgi?id=235844

Reviewed by Tim Horton.

Source/WebKit:

Test: DocumentEditingContext.RectsRequestInContentEditableWithDivBreaks

When getting the DocumentContext for a line, followed by a blank line, the blank link will
be represented by a collapsed range. This is a result of the emitCharacter call from representNodeOffsetZero.
This possibly a bug, but rather than try and fix this issue within TextIterator itself, we are
mitigating this issue by instead of using the collapsed range and the resulting non-existent character rect,
using the caret bounding rect. This gives us a more accurate bounding rect for situations like
this that result in collapsed ranges. And this would cover all other situations that might result in
a collapsed range from TextIterator.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::requestDocumentEditingContext):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:

(TEST):

3:04 PM Changeset in webkit [288848] by Patrick Angle
  • 2 edits in trunk/Source/WebKit

Web Inspector: [Cocoa] Crash in WebKit::WebInspectorUIProxy::attachmentViewDidChange
https://bugs.webkit.org/show_bug.cgi?id=235842

Reviewed by Timothy Hatcher.

Speculatively fix an occasional crash in WebKit::WebInspectorUIProxy::attachmentViewDidChange by ensuring that
the WebInspectorUIProxy still exists before calling attachmentViewDidChange.

Currently we are sometimes crashing while attempting to m_objCAdapter.get(), which is the first use of a
member variable in WebInspectorUIProxy::attachmentViewDidChange. This retain pointer should never be able to
not exists, since it storing nil is a valid state. This points to the WebInspectorUIProxy itself no longer
existing. The fix is to check that we actually have a WebInspectorUIProxy before calling
attachmentViewDidChange. This is also just good practice since WebPageProxy::inspector() is also able to
return nullptr under certain circumstances, and all other calls to it are guarded to check if the
WebInspectorUIProxy is still around first.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::setInspectorAttachmentView):

2:52 PM Changeset in webkit [288847] by Said Abou-Hallawa
  • 12 edits in trunk/Source/WebKit

[GPU Process] Remove the resource use counters from the remote resource cache
https://bugs.webkit.org/show_bug.cgi?id=235636

Reviewed by Simon Fraser.

The display list items and the resource management messages are both
communicated from the WebProcess and the GPUProcess through the stream
connection. The resources will be sent to the GPUProcess, consumed by
the display items and then released in the right order. So there is no
need anymore for the resource use counters.

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::setStateWithQualifiedIdentifiers):
(WebKit::RemoteDisplayListRecorder::clipToImageBufferWithQualifiedIdentifier):
(WebKit::RemoteDisplayListRecorder::drawGlyphsWithQualifiedIdentifier):
(WebKit::RemoteDisplayListRecorder::drawImageBufferWithQualifiedIdentifier):
(WebKit::RemoteDisplayListRecorder::drawNativeImageWithQualifiedIdentifier):
(WebKit::RemoteDisplayListRecorder::drawPatternWithQualifiedIdentifier):

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::releaseRemoteResource):
(WebKit::RemoteRenderingBackend::releaseRemoteResourceWithQualifiedIdentifier):

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

(WebKit::RemoteResourceCache::cacheImageBuffer):
(WebKit::RemoteResourceCache::cacheNativeImage):
(WebKit::RemoteResourceCache::cacheFont):
(WebKit::RemoteResourceCache::releaseRemoteResource):
(WebKit::RemoteResourceCache::ensureResourceUseCounter): Deleted.
(WebKit::RemoteResourceCache::maybeRemoveResource): Deleted.
(WebKit::RemoteResourceCache::recordResourceUse): Deleted.
(WebKit::RemoteResourceCache::updateHasActiveDrawables): Deleted.

  • GPUProcess/graphics/RemoteResourceCache.h:

(WebKit::RemoteResourceCache::hasActiveDrawables const):
(): Deleted.

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:

(WebKit::RemoteDisplayListRecorderProxy::recordResourceUse):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::releaseRemoteResource):
(WebKit::RemoteRenderingBackendProxy::recordNativeImageUse): Deleted.
(WebKit::RemoteRenderingBackendProxy::recordFontUse): Deleted.
(WebKit::RemoteRenderingBackendProxy::recordImageBufferUse): Deleted.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
  • WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:

(WebKit::RemoteResourceCacheProxy::cacheImageBuffer):
(WebKit::RemoteResourceCacheProxy::cachedImageBuffer const):
(WebKit::RemoteResourceCacheProxy::releaseImageBuffer):
(WebKit::RemoteResourceCacheProxy::recordImageBufferUse):
(WebKit::RemoteResourceCacheProxy::recordNativeImageUse):
(WebKit::RemoteResourceCacheProxy::recordFontUse):
(WebKit::RemoteResourceCacheProxy::releaseNativeImage):
(WebKit::RemoteResourceCacheProxy::clearNativeImageMap):
(WebKit::RemoteResourceCacheProxy::releaseAllRemoteFonts):
(WebKit::RemoteResourceCacheProxy::finalizeRenderingUpdateForFonts):
(WebKit::RemoteResourceCacheProxy::remoteResourceCacheWasDestroyed):

  • WebProcess/GPU/graphics/RemoteResourceCacheProxy.h:
2:36 PM Changeset in webkit [288846] by Robert Jenner
  • 2 edits in trunk/LayoutTests

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

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Temporarily disabling this test.
2:24 PM Changeset in webkit [288845] by Robert Jenner
  • 1 edit in trunk/LayoutTests/platform/mac-wk2/TestExpectations

Revert "WindowServer returned not alive with context:,unresponsive work processor(s)"

This reverts commit ce81b19378b9a6f103bd3b4a8d126f9a10e49db1.

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

[macOS][WP] Add required syscall
https://bugs.webkit.org/show_bug.cgi?id=235901
<rdar://88241768>

Reviewed by Brent Fulgham.

  • WebProcess/com.apple.WebProcess.sb.in:
2:06 PM Changeset in webkit [288843] by Robert Jenner
  • 2 edits in branches/safari-613-branch/LayoutTests

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

Unreviewed test gardening.

Patch by Robert Jenner <Robert Jenner> on 2022-01-25

  • platform/mac-wk2/TestExpectations: Temporarily disabling test.
2:02 PM Changeset in webkit [288842] by Russell Epstein
  • 2 edits in branches/safari-613.1.16.0-branch/Source/WebCore

Cherry-pick r288829. rdar://problem/87402815

LineLayout::collectOverflow() should null check m_inlineContent
https://bugs.webkit.org/show_bug.cgi?id=235902
rdar://87402815

Reviewed by Alan Bujtas.

Speculative fix but it can be null.

  • layout/integration/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::collectOverflow):

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

2:01 PM Changeset in webkit [288841] by Russell Epstein
  • 2 edits in branches/safari-613.1.16.1-branch/Source/WebCore

Cherry-pick r288829. rdar://problem/87402815

LineLayout::collectOverflow() should null check m_inlineContent
https://bugs.webkit.org/show_bug.cgi?id=235902
rdar://87402815

Reviewed by Alan Bujtas.

Speculative fix but it can be null.

  • layout/integration/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::collectOverflow):

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

1:37 PM Changeset in webkit [288840] by rniwa@webkit.org
  • 8 edits
    2 deletes in trunk

Delete runtime flag for subresource integrity
https://bugs.webkit.org/show_bug.cgi?id=235876

Reviewed by Darin Adler.

Source/WebCore:

  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::requestClassicScript):
(WebCore::ScriptElement::requestModuleScript):

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process):

  • html/HTMLLinkElement.idl:
  • html/HTMLScriptElement.idl:

Source/WTF:

Deleted the runtime flag.

  • Scripts/Preferences/WebPreferences.yaml:

LayoutTests:

Deleted the test which was testing the behavior of WebKit when subresource integrity is disabled.

  • http/tests/subresource-integrity/sri-disabled-with-setting-expected.txt: Removed.
  • http/tests/subresource-integrity/sri-disabled-with-setting.html: Removed.
1:17 PM Changeset in webkit [288839] by Russell Epstein
  • 9 edits in trunk/Source

Versioning.

WebKit-7614.1.3

1:15 PM Changeset in webkit [288838] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[RISCV64] Fix offlineasm lowering of arithmetic branch instructions with address destinations
https://bugs.webkit.org/show_bug.cgi?id=235887

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-01-31
Reviewed by Yusuke Suzuki.

Fix lowering of baddi* and bsubi* instructions in the riscv64 offlineasm
backend. Node.riscCloneWithOperandsLowered() doesn't do the job properly
when the result of the arithmetic operation has to be stored back into
memory. In that case, right now these instructions are lowered into a
sequence that loads from memory, performs the arithmetic operation,
sets up the branch and only then stores the result back into memory,
which means the result never gets written back if the branch is taken.
Most prominently this breaks the execution counter through which JIT
entry is decided.

The riscv64LowerMisplacedAddresses() pass is specialized to cover
baddi* and bsubi* instructions whose destination operand is an address.
A manual sequence is constructed, loading, adding/subtracting, storing
and only then branching on the given condition.

  • offlineasm/riscv64.rb:
1:01 PM Changeset in webkit [288837] by Russell Epstein
  • 1 copy in branches/safari-614.1.2-branch

New branch.

12:51 PM Changeset in webkit [288836] by Jonathan Bedard
  • 3 edits in trunk/Tools

[EWS] Revert pull request when retrying
https://bugs.webkit.org/show_bug.cgi?id=235825
<rdar://problem/88187688>

Reviewed by Aakash Jain.

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

(UnApplyPatch.doStepIf): Only run if 'patch_id' is defined.
(UnApplyPatch.hideStepIf): Hide step if we aren't doing it.
(RevertPullRequestChanges): Clean checkout and checkout base hash if
'github.base.sha' is define.
(CompileWebKit.evaluateCommand): Add RevertPullRequestChanges step.
(RunJavaScriptCoreTests.evaluateCommand): Ditto.
(ReRunWebKitTests.evaluateCommand): Ditto.
(RunWebKitTestsRedTree.evaluateCommand): Ditto.
(RunWebKitTestsRepeatFailuresRedTree.evaluateCommand): Ditto.
(ReRunAPITests.evaluateCommand): Ditto.

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

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

12:43 PM Changeset in webkit [288835] by mmaxfield@apple.com
  • 2 edits in trunk/Tools

[Mac] Fix TestWebKitAPI build
https://bugs.webkit.org/show_bug.cgi?id=235906

Reviewed by Tim Horton.

/usr/include/cups/cups.h has this:
# define UniversalPrint 1

And Source/ThirdParty/gtest/include/gtest/gtest-printers.h has this:
void UniversalPrint(const T& value, ::std::ostream* os);

  • TestWebKitAPI/config.h:
12:40 PM Changeset in webkit [288834] by Russell Epstein
  • 5 edits
    2 adds in branches/safari-613.1.16.1-branch

Cherry-pick r288095. rdar://problem/88286876

[LFC][IFC] ASSERT in InlineContentBreaker::tryBreakingPreviousNonOverflowingRuns (!partialRun->length) when webinspector is open
https://bugs.webkit.org/show_bug.cgi?id=235286

Reviewed by Antti Koivisto.

Source/WebCore:

When the overflowing run is non-breakable (in this case an "inline box end" with padding), we try to find a breakable
previous run in the candidate list. If we find such text run, we try to break it by looking at the applicable CSS properties
(e.g. word-break, overflow-wrap). Now text runs with 1 (and 0) length and no adjacent text runs need special handling
as they can't be broken "within word" or at boundary (they treated as "unbreakable").

Test: fast/text/overflow-wrap-assert-with-zero-width-overflowing-content.html

  • layout/formattingContexts/inline/InlineContentBreaker.cpp: (WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const): (WebCore::Layout::InlineContentBreaker::tryBreakingPreviousNonOverflowingRuns const): The trailing run starts at the beginning of the run and ends right before at the last character.

LayoutTests:

  • fast/text/overflow-wrap-assert-with-zero-width-overflowing-content-expected.txt: Added.
  • fast/text/overflow-wrap-assert-with-zero-width-overflowing-content.html: Added.
  • platform/ios/fast/text/basic/015-expected.txt: Progressions.
  • platform/mac/fast/text/basic/015-expected.txt:

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

12:39 PM Changeset in webkit [288833] by Russell Epstein
  • 8 edits in branches/safari-613.1.16.1-branch/Source/WebKit

Cherry-pick r288652. rdar://problem/87169406

[WebAuthn] We should pass extensions to ASC if possible
https://bugs.webkit.org/show_bug.cgi?id=235533
rdar://87169406

Reviewed by Brent Fulgham.

This patch starts passing WebAuthn extensions to ASC if possible,
in order to support the googleLegacyAppidSupport extension, which
is required to register security keys on google.com. It also starts
passing the attestationPreference option, which was not being passed before.

Tested manually. Previous version of patch contained
TestWebKitAPI.WebAuthenticationPanel.PublicKeyCredentialRequestOptionsASC
and TestWebKitAPI.WebAuthenticationPanel.PublicKeyCredentialCreationOptionsASC,
but were removed due to difficulty softlinking from tests.

  • Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
  • UIProcess/API/Cocoa/_WKAuthenticationExtensionsClientInputs.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm: (authenticationExtensionsClientInputs):
  • UIProcess/WebAuthentication/Cocoa/AuthenticationServicesCoreSoftLink.h:
  • UIProcess/WebAuthentication/Cocoa/AuthenticationServicesCoreSoftLink.mm:
  • UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm: (WebKit::toNSString): (WebKit::toASCExtensions): (WebKit::configureRegistrationRequestContext): (WebKit::configurationAssertionRequestContext):
  • UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h:
  • WebKit.xcodeproj/project.pbxproj:

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

12:39 PM Changeset in webkit [288832] by Russell Epstein
  • 5 edits
    2 adds in branches/safari-613.1.16.0-branch

Cherry-pick r288095. rdar://problem/88286876

[LFC][IFC] ASSERT in InlineContentBreaker::tryBreakingPreviousNonOverflowingRuns (!partialRun->length) when webinspector is open
https://bugs.webkit.org/show_bug.cgi?id=235286

Reviewed by Antti Koivisto.

Source/WebCore:

When the overflowing run is non-breakable (in this case an "inline box end" with padding), we try to find a breakable
previous run in the candidate list. If we find such text run, we try to break it by looking at the applicable CSS properties
(e.g. word-break, overflow-wrap). Now text runs with 1 (and 0) length and no adjacent text runs need special handling
as they can't be broken "within word" or at boundary (they treated as "unbreakable").

Test: fast/text/overflow-wrap-assert-with-zero-width-overflowing-content.html

  • layout/formattingContexts/inline/InlineContentBreaker.cpp: (WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const): (WebCore::Layout::InlineContentBreaker::tryBreakingPreviousNonOverflowingRuns const): The trailing run starts at the beginning of the run and ends right before at the last character.

LayoutTests:

  • fast/text/overflow-wrap-assert-with-zero-width-overflowing-content-expected.txt: Added.
  • fast/text/overflow-wrap-assert-with-zero-width-overflowing-content.html: Added.
  • platform/ios/fast/text/basic/015-expected.txt: Progressions.
  • platform/mac/fast/text/basic/015-expected.txt:

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

12:32 PM Changeset in webkit [288831] by Aditya Keerthi
  • 4 edits in trunk/Source

[iOS] SharePlay is shown prominently for system-provided Share Sheets
https://bugs.webkit.org/show_bug.cgi?id=235895
rdar://88268450

Reviewed by Wenson Hsieh.

Source/WebKit:

Content shared using the Web Share API should not display a SharePlay action.

  • UIProcess/Cocoa/WKShareSheet.mm:

(-[WKShareSheet presentWithShareDataArray:inRect:]):

Use -[UIActivityViewController setExcludedActivityTypes:] to ensure
a SharePlay action is not displayed.

Source/WTF:

  • wtf/PlatformHave.h:
12:31 PM Changeset in webkit [288830] by Russell Epstein
  • 9 edits in branches/safari-613.1.16.1-branch/Source

Versioning.

WebKit-7613.1.16.1.1

12:29 PM Changeset in webkit [288829] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

LineLayout::collectOverflow() should null check m_inlineContent
https://bugs.webkit.org/show_bug.cgi?id=235902
rdar://87402815

Reviewed by Alan Bujtas.

Speculative fix but it can be null.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::collectOverflow):

12:29 PM Changeset in webkit [288828] by Russell Epstein
  • 9 edits in branches/safari-613.1.16.0-branch/Source

Versioning.

WebKit-7613.1.16.0.1

12:08 PM Changeset in webkit [288827] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Source/WebCore:
Changed playbackRate and defaultPlaybackRate from unrestricted double
to double.
https://bugs.webkit.org/show_bug.cgi?id=235174
rdar://problem/87815745

Patch by Takeshi Sone <takeshi.sone@gmail.com> on 2022-01-31
Reviewed by Eric Carlson.

Test: media/video-playbackrate-undefined.html

  • html/HTMLMediaElement.idl:

LayoutTests:
Added a test to verify that setting undefined to video.playbackRate
raises an exception.
https://bugs.webkit.org/show_bug.cgi?id=235174
rdar://problem/87815745

Patch by Takeshi Sone <takeshi.sone@gmail.com> on 2022-01-31
Reviewed by Eric Carlson.

  • media/video-playbackrate-undefined-expected.txt: Added.
  • media/video-playbackrate-undefined.html: Added.
11:51 AM Changeset in webkit [288826] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[iOS][WP] Restrict image decoders
https://bugs.webkit.org/show_bug.cgi?id=234175
<rdar://problem/86650455>

Unreviewed, addressing additional review comments.

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
11:36 AM Changeset in webkit [288825] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[WP] Remove PostScript conversion code
https://bugs.webkit.org/show_bug.cgi?id=235892
<rdar://88172449>

Reviewed by Brent Fulgham.

The WebContent process no longer has access to the PostScript conversion service, so there is no need to keep this code.

  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::streamDidFinishLoading):
(WebKit::PDFPlugin::manualStreamDidFinishLoading):
(WebKit::PDFPlugin::convertPostScriptDataIfNeeded): Deleted.

11:29 AM Changeset in webkit [288824] by Russell Epstein
  • 1 copy in branches/safari-613.1.16.3-branch

New branch.

11:29 AM Changeset in webkit [288823] by Russell Epstein
  • 1 copy in branches/safari-613.1.16.2-branch

New branch.

11:29 AM Changeset in webkit [288822] by Russell Epstein
  • 1 copy in branches/safari-613.1.16.1-branch

New branch.

11:29 AM Changeset in webkit [288821] by Russell Epstein
  • 1 copy in branches/safari-613.1.16.0-branch

New branch.

11:04 AM Changeset in webkit [288820] by commit-queue@webkit.org
  • 37 edits
    1 delete in trunk

Fix handling of module script errors in WebCore
https://bugs.webkit.org/show_bug.cgi?id=218284

Patch by Asumu Takikawa <asumu@igalia.com> on 2022-01-31
Reviewed by Yusuke Suzuki.

LayoutTests/imported/w3c:

Set test expectations to PASS for fixed behavior in module tests.
For import assertion tests, set different error behavior from
load errors getting dispatched.

  • web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/charset-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/content-type-checking-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/cors-crossorigin-requests-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/import-css-module-basic-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/integrity-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/load-error-events-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/empty-assertion-clause-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/invalid-type-assertion-error-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/import-assertions/unsupported-assertion-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/charset-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/cors-crossorigin-requests-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/integrity-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/load-error-events-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/module-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/valid-content-type-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/compilation-error-1-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/compilation-error-2-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/specifier-error-expected.txt:

Source/WebCore:

According to the HTML spec, script fetch errors get dispatched to the
script (with no error value), but load errors should get reported to
the global object and dispatched with an error value included.
This patch implements that behavior for module scripts.

In addition, reported errors from module scripts are never expected to
be muted. To implement this, we add a fromModule flag to suppress the
error muting in canIncludeErrorDetails.

  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::reportException):

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

(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::setupModuleScriptHandlers):
(WebCore::ScriptController::callInWorld):
(WebCore::ScriptController::reportExceptionFromScriptError):

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

(WebCore::rejectWithFetchError):
(WebCore::ScriptModuleLoader::fetch):
(WebCore::rejectPromise):
(WebCore::ScriptModuleLoader::notifyFinished):

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::error const):
(WebCore::LoadableClassicScript::notifyFinished):

  • dom/LoadableScript.h:
  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::executeScriptAndDispatchEvent):

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::canIncludeErrorDetails):
(WebCore::ScriptExecutionContext::reportException):
(WebCore::ScriptExecutionContext::dispatchErrorEvent):

  • dom/ScriptExecutionContext.h:
  • workers/WorkerOrWorkletScriptController.cpp:

(WebCore::WorkerOrWorkletScriptController::loadModuleSynchronously):
(WebCore::WorkerOrWorkletScriptController::loadAndEvaluateModule):

LayoutTests:

Adjust tests expectations to match fixed script loading behvior.
Also add DumpJSConsoleLogInStdErr for flaky test (see bug 182177).
Changed a JS DOM test to match spec behavior.

  • TestExpectations:
  • js/dom/modules/module-incorrect-relative-specifier-expected.txt:
  • js/dom/modules/module-incorrect-relative-specifier.html:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-expected.txt: Removed.
10:11 AM Changeset in webkit [288819] by Russell Epstein
  • 1 copy in tags/Safari-614.1.1.1

Tag Safari-614.1.1.1.

10:05 AM Changeset in webkit [288818] by Russell Epstein
  • 9 edits in branches/safari-614.1.1-branch/Source

Versioning.

WebKit-7614.1.1.1

9:31 AM Changeset in webkit [288817] by pvollan@apple.com
  • 10 edits in trunk/Source

[iOS][WP] Restrict image decoders
https://bugs.webkit.org/show_bug.cgi?id=234175

Reviewed by Brent Fulgham.

Source/WebCore:

Enable restriced decoding for images.

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::createImageSourceOptions):

Source/WebCore/PAL:

Include WebKitAdditions soft link files.

  • pal/cf/VideoToolboxSoftLink.cpp:
  • pal/cf/VideoToolboxSoftLink.h:

Source/WebKit:

Restrict image decoders in order to enable further sandbox strengthening.

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

8:55 AM Changeset in webkit [288816] by J Pascoe
  • 11 edits in trunk

[WebAuthn] Provide SPI to export/import local credentials
https://bugs.webkit.org/show_bug.cgi?id=234112
rdar://84822000

Reviewed by Brent Fulgham.

Source/WebCore:

This change adds SPI to _WKWebAuthenticationPanel to provide the ability
to import / export local credentials. Constants are used during serialization
as keys.

  • Modules/webauthn/WebAuthenticationConstants.h: constants for credential serialization

Source/WebKit:

Covered by new API tests.

This patch adds new SPI to _WKWebAuthenticationPanel.h to import and export local
webauthn credentials. CBOR is used for serialization. WKErrors are used to differentiate
between malformed vs duplicate keys during import.

  • UIProcess/API/Cocoa/WKError.h:
  • UIProcess/API/Cocoa/WKError.mm:

(localizedDescriptionForErrorCode):

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

(+[_WKWebAuthenticationPanel importLocalAuthenticatorCredential:error:]):
(+[_WKWebAuthenticationPanel exportLocalAuthenticatorCredentialWithID:error:]):

Tools:

Add tests for SPI to import / export local webauthn credentials.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST): New tests for import/export

8:05 AM Changeset in webkit [288815] by keith_miller@apple.com
  • 108 edits
    3 copies
    2 adds
    2 deletes in trunk/Source

Reland StructureID overhaul
https://bugs.webkit.org/show_bug.cgi?id=235720

Reviewed by Yusuke Suzuki.

Changes since revert:

Source/JavaScriptCore:

Have StructureAlignedMemoryAllocator keep halving the size of VA
pool it will allocate from until it successfully reserves the
address space.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/AccessCase.cpp:

(JSC::AccessCase::AccessCase):
(JSC::AccessCase::forEachDependentCell const):
(JSC::AccessCase::dump const):
(JSC::AccessCase::propagateTransitions const):
(JSC::AccessCase::generateWithGuard):
(JSC::AccessCase::canBeShared):

  • bytecode/AccessCase.h:

(JSC::AccessCase::structure const):
(JSC::AccessCase::newStructure const):
(JSC::AccessCase::hash const):
(JSC::AccessCase::AccessCase):

  • bytecode/ArrayProfile.cpp:

(JSC::ArrayProfile::computeUpdatedPrediction):

  • bytecode/ArrayProfile.h:
  • bytecode/CheckPrivateBrandStatus.cpp:

(JSC::CheckPrivateBrandStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::determineLiveness):
(JSC::CodeBlock::finalizeLLIntInlineCaches):
(JSC::CodeBlock::stronglyVisitWeakReferences):

  • bytecode/GetByIdMetadata.h:

(JSC::GetByIdModeMetadata::GetByIdModeMetadata):
(JSC::GetByIdModeMetadata::clearToDefaultModeWithoutCache):

  • bytecode/GetByStatus.cpp:

(JSC::GetByStatus::computeFromLLInt):

  • bytecode/InlineAccess.cpp:

(JSC::InlineAccess::rewireStubAsJumpInAccess):
(JSC::InlineAccess::resetStubAsJumpInAccess):

  • bytecode/InternalFunctionAllocationProfile.h:

(JSC::InternalFunctionAllocationProfile::offsetOfStructureID):
(JSC::InternalFunctionAllocationProfile::structure):
(JSC::InternalFunctionAllocationProfile::clear):
(JSC::InternalFunctionAllocationProfile::visitAggregate):
(JSC::InternalFunctionAllocationProfile::createAllocationStructureFromBase):
(JSC::InternalFunctionAllocationProfile::offsetOfStructure): Deleted.

  • bytecode/PolyProtoAccessChain.cpp:

(JSC::PolyProtoAccessChain::needImpurePropertyWatchpoint const):

  • bytecode/PolyProtoAccessChain.h:
  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::visitWeak const):

  • bytecode/PutByIdFlags.h:
  • bytecode/PutByStatus.cpp:

(JSC::PutByStatus::computeFromLLInt):
(JSC::PutByStatus::computeForStubInfo):

  • bytecode/SpeculatedType.cpp:

(JSC::speculationFromCell):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::initGetByIdSelf):
(JSC::StructureStubInfo::initPutByIdReplace):
(JSC::StructureStubInfo::initInByIdSelf):
(JSC::StructureStubInfo::addAccessCase):
(JSC::StructureStubInfo::reset):

  • bytecode/StructureStubInfo.h:

(JSC::StructureStubInfo::inlineAccessBaseStructure):
(JSC::StructureStubInfo::offsetOfInlineAccessBaseStructureID):
(JSC::StructureStubInfo::offsetOfInlineAccessBaseStructure): Deleted.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::branchWeakStructure):

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::finalize):

  • dfg/DFGSpeculativeJIT.cpp:
  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNullOrUndefined):
(JSC::DFG::SpeculativeJIT::compileToBooleanObjectOrOther):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::emitUntypedBranch):
(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp:

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

  • heap/AbstractSlotVisitor.h:
  • heap/AbstractSlotVisitorInlines.h:

(JSC::AbstractSlotVisitor::append):
(JSC::AbstractSlotVisitor::appendHidden):

  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::runEndPhase):

  • heap/Heap.h:

(JSC::Heap::structureIDTable): Deleted.

  • heap/IsoAlignedMemoryAllocator.cpp:

(JSC::IsoAlignedMemoryAllocator::IsoAlignedMemoryAllocator):
(JSC::IsoAlignedMemoryAllocator::~IsoAlignedMemoryAllocator):
(JSC::IsoAlignedMemoryAllocator::tryMallocBlock):
(JSC::IsoAlignedMemoryAllocator::freeBlock):
(JSC::IsoAlignedMemoryAllocator::commitBlock):
(JSC::IsoAlignedMemoryAllocator::decommitBlock):
(JSC::IsoAlignedMemoryAllocator::tryAllocateAlignedMemory): Deleted.
(JSC::IsoAlignedMemoryAllocator::freeAlignedMemory): Deleted.

  • heap/IsoAlignedMemoryAllocator.h:
  • heap/IsoMemoryAllocatorBase.cpp: Copied from Source/JavaScriptCore/heap/IsoAlignedMemoryAllocator.cpp.

(JSC::IsoMemoryAllocatorBase::IsoMemoryAllocatorBase):
(JSC::IsoMemoryAllocatorBase::~IsoMemoryAllocatorBase):
(JSC::IsoMemoryAllocatorBase::releaseMemoryFromSubclassDestructor):
(JSC::IsoMemoryAllocatorBase::tryAllocateAlignedMemory):
(JSC::IsoMemoryAllocatorBase::freeAlignedMemory):

  • heap/IsoMemoryAllocatorBase.h: Copied from Source/JavaScriptCore/heap/IsoAlignedMemoryAllocator.h.
  • heap/IsoSubspace.cpp:

(JSC::IsoSubspace::IsoSubspace):
(JSC::IsoSubspace::tryAllocateFromLowerTier):

  • heap/IsoSubspace.h:
  • heap/PreciseAllocation.cpp:

(JSC::PreciseAllocation::tryCreateForLowerTier):
(JSC::PreciseAllocation::createForLowerTier): Deleted.

  • heap/PreciseAllocation.h:
  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::appendJSCellOrAuxiliary):

  • heap/SlotVisitor.h:
  • heap/SlotVisitorInlines.h:

(JSC::SlotVisitor::append):
(JSC::SlotVisitor::appendHidden):

  • heap/StructureAlignedMemoryAllocator.cpp: Added.

(JSC::StructureAlignedMemoryAllocator::StructureAlignedMemoryAllocator):
(JSC::StructureAlignedMemoryAllocator::~StructureAlignedMemoryAllocator):
(JSC::StructureAlignedMemoryAllocator::dump const):
(JSC::StructureAlignedMemoryAllocator::tryAllocateMemory):
(JSC::StructureAlignedMemoryAllocator::freeMemory):
(JSC::StructureAlignedMemoryAllocator::tryReallocateMemory):
(JSC::StructureMemoryManager::StructureMemoryManager):
(JSC::StructureMemoryManager::tryMallocStructureBlock):
(JSC::StructureMemoryManager::freeStructureBlock):
(JSC::StructureAlignedMemoryAllocator::initializeStructureAddressSpace):
(JSC::StructureAlignedMemoryAllocator::tryMallocBlock):
(JSC::StructureAlignedMemoryAllocator::freeBlock):
(JSC::StructureAlignedMemoryAllocator::commitBlock):
(JSC::StructureAlignedMemoryAllocator::decommitBlock):

  • heap/StructureAlignedMemoryAllocator.h: Copied from Source/JavaScriptCore/heap/IsoAlignedMemoryAllocator.h.
  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::emitStoreStructureWithTypeInfo):
(JSC::AssemblyHelpers::emitNonNullDecodeStructureID):
(JSC::AssemblyHelpers::emitLoadStructure):
(JSC::AssemblyHelpers::emitLoadPrototype):
(JSC::AssemblyHelpers::emitRandomThunk):
(JSC::AssemblyHelpers::emitConvertValueToBoolean):
(JSC::AssemblyHelpers::branchIfValue):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::branchStructure):
(JSC::AssemblyHelpers::nukeStructureAndStoreButterfly):

  • jit/GCAwareJITStubRoutine.cpp:

(JSC::PolymorphicAccessJITStubRoutine::computeHash):

  • jit/JITInlineCacheGenerator.cpp:

(JSC::generateGetByIdInlineAccess):
(JSC::JITPutByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITInByIdGenerator::generateBaselineDataICFastPath):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_typeof_is_undefined):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_get_prototype_of):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_property_enumerator):

  • jit/JITStubRoutine.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::performLLIntGetByID):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ArrayPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/BigIntPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/BooleanPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/CommonSlowPaths.cpp:

(JSC::JSC_DEFINE_COMMON_SLOW_PATH):

  • runtime/DatePrototype.cpp:

(JSC::formateDateInstance):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::sanitizedMessageString):
(JSC::ErrorInstance::sanitizedNameString):
(JSC::ErrorInstance::sanitizedToString):

  • runtime/ErrorPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::visitChildrenImpl):

  • runtime/FunctionExecutable.h:
  • runtime/FunctionPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/FunctionRareData.cpp:

(JSC::FunctionRareData::visitChildrenImpl):

  • runtime/FunctionRareData.h:
  • runtime/HasOwnPropertyCache.h:
  • runtime/InitializeThreading.cpp:

(JSC::initialize):

  • runtime/JSCConfig.h:
  • runtime/JSCJSValue.cpp:

(JSC::JSValue::dumpInContextAssumingStructure const):
(JSC::JSValue::dumpForBacktrace const):

  • runtime/JSCell.cpp:

(JSC::JSCell::toObjectSlow const):

  • runtime/JSCell.h:

(JSC::JSCell::clearStructure):

  • runtime/JSCellInlines.h:

(JSC::JSCell::structure const):
(JSC::JSCell::setStructure):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::visitChildrenImpl):

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

(JSC::JSObject::visitButterflyImpl):
(JSC::JSObject::createInitialUndecided):
(JSC::JSObject::createInitialInt32):
(JSC::JSObject::createInitialDouble):
(JSC::JSObject::createInitialContiguous):
(JSC::JSObject::createArrayStorage):
(JSC::JSObject::convertUndecidedToArrayStorage):
(JSC::JSObject::convertInt32ToArrayStorage):
(JSC::JSObject::convertDoubleToArrayStorage):
(JSC::JSObject::convertContiguousToArrayStorage):
(JSC::JSObject::putDirectCustomGetterSetterWithoutTransition):
(JSC::JSObject::putDirectNonIndexAccessorWithoutTransition):

  • runtime/JSObject.h:

(JSC::JSObject::nukeStructureAndSetButterfly):
(JSC::JSObject::getPropertySlot):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::getPropertySlot):
(JSC::JSObject::getNonIndexPropertySlot):
(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectInternal):

  • runtime/JSPropertyNameEnumerator.cpp:

(JSC::JSPropertyNameEnumerator::JSPropertyNameEnumerator):
(JSC::JSPropertyNameEnumerator::visitChildrenImpl):

  • runtime/JSPropertyNameEnumerator.h:
  • runtime/NumberPrototype.cpp:

(JSC::toThisNumber):

  • runtime/ObjectPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::objectPrototypeToString):

  • runtime/RegExpPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/StringPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/Structure.cpp:

(JSC::Structure::Structure):
(JSC::Structure::~Structure):
(JSC::Structure::flattenDictionaryStructure):
(JSC::Structure::dump const):
(JSC::Structure::canCachePropertyNameEnumerator const):

  • runtime/Structure.h:

(JSC::Structure::id const):

  • runtime/StructureChain.cpp:

(JSC::StructureChain::create):
(JSC::StructureChain::visitChildrenImpl):

  • runtime/StructureID.h: Added.

(JSC::StructureID::nuke const):
(JSC::StructureID::isNuked const):
(JSC::StructureID::decontaminate const):
(JSC::StructureID::operator bool const):
(JSC::StructureID::operator== const):
(JSC::StructureID::operator!= const):
(JSC::StructureID::bits const):
(JSC::StructureID::StructureID):
(JSC::StructureID::isHashTableDeletedValue const):
(JSC::StructureID::decode const):
(JSC::StructureID::encode):
(JSC::StructureIDHash::hash):
(JSC::StructureIDHash::equal):

  • runtime/StructureIDBlob.h:
  • runtime/StructureIDTable.cpp: Removed.
  • runtime/StructureIDTable.h: Removed.
  • runtime/StructureRareData.cpp:

(JSC::StructureRareData::StructureRareData):

  • runtime/StructureRareData.h:
  • runtime/StructureRareDataInlines.h:

(JSC::StructureRareData::tryCachePropertyNameEnumeratorViaWatchpoint):

  • runtime/SymbolPrototype.cpp:

(JSC::JSC_DEFINE_CUSTOM_GETTER):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/TypeProfilerLog.cpp:

(JSC::TypeProfilerLog::processLogEntries):
(JSC::TypeProfilerLog::visit):

  • runtime/VM.h:

(JSC::VM::getStructure): Deleted.
(JSC::VM::tryGetStructure): Deleted.

  • runtime/WriteBarrier.h:

(JSC::WriteBarrierStructureID::WriteBarrierStructureID):
(JSC::WriteBarrierStructureID::get const):
(JSC::WriteBarrierStructureID::operator* const):
(JSC::WriteBarrierStructureID::operator-> const):
(JSC::WriteBarrierStructureID::clear):
(JSC::WriteBarrierStructureID::operator bool const):
(JSC::WriteBarrierStructureID::operator! const):
(JSC::WriteBarrierStructureID::setWithoutWriteBarrier):
(JSC::WriteBarrierStructureID::unvalidatedGet const):
(JSC::WriteBarrierStructureID::value const):

  • runtime/WriteBarrierInlines.h:

(JSC::WriteBarrierStructureID::set):
(JSC::WriteBarrierStructureID::setMayBeNull):
(JSC::WriteBarrierStructureID::setEarlyValue):

  • tools/HeapVerifier.cpp:

(JSC::HeapVerifier::validateJSCell):

  • tools/Integrity.cpp:
  • tools/Integrity.h:
  • tools/IntegrityInlines.h:

(JSC::Integrity::auditStructureID):

  • tools/JSDollarVM.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSDollarVM::finishCreation):
(JSC::JSDollarVM::visitChildrenImpl):

  • tools/JSDollarVM.h:
  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

  • wasm/js/WebAssemblyGlobalPrototype.cpp:

(JSC::getGlobal):

Source/WTF:

Add a try version of reserveUncommitted and reserveAndCommit
so tryReserveUncommitted can call them if needed.

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

(WTF::tryReserveAndCommit):
(WTF::tryReserveUncommitted):
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::tryReserveUncommittedAligned):
(WTF::OSAllocator::reserveAndCommit):

  • wtf/win/OSAllocatorWin.cpp:

(WTF::OSAllocator::tryReserveUncommittedAligned):

7:14 AM Changeset in webkit [288814] by don.olmstead@sony.com
  • 7 edits
    1 copy
    2 moves
    1 add in trunk/Tools

Support additional WPEToolingBackend types
https://bugs.webkit.org/show_bug.cgi?id=235745

Reviewed by Adrian Perez de Castro.

Split up code specific to the fdo backend to allow for additional WPE backend types to be
used. Add some platform defines based on the underlying backend.

This is a precursor to landing a PlayStation variant.

  • wpe/backends/CMakeLists.txt:
  • wpe/backends/HeadlessViewBackend.cpp:

(WPEToolingBackends::HeadlessInstance::singleton): Deleted.
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend): Deleted.
(WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend): Deleted.
(WPEToolingBackends::HeadlessViewBackend::backend const): Deleted.
(WPEToolingBackends::HeadlessViewBackend::snapshot): Deleted.
(WPEToolingBackends::HeadlessViewBackend::updateSnapshot): Deleted.
(WPEToolingBackends::HeadlessViewBackend::vsync): Deleted.

  • wpe/backends/HeadlessViewBackend.h:
  • wpe/backends/PlatformWPE.cmake:
  • wpe/backends/ViewBackend.cpp:

(WPEToolingBackends::ViewBackend::ViewBackend):

  • wpe/backends/ViewBackend.h:
  • wpe/backends/fdo/HeadlessViewBackendFdo.cpp: Copied from Tools/wpe/backends/HeadlessViewBackend.cpp.

(WPEToolingBackends::HeadlessInstance::singleton):
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::backend const):
(WPEToolingBackends::HeadlessViewBackend::snapshot):
(WPEToolingBackends::HeadlessViewBackend::updateSnapshot):
(WPEToolingBackends::HeadlessViewBackend::vsync):

  • wpe/backends/fdo/WindowViewBackend.cpp: Renamed from Tools/wpe/backends/WindowViewBackend.cpp.
  • wpe/backends/fdo/WindowViewBackend.h: Renamed from Tools/wpe/backends/WindowViewBackend.h.
6:56 AM Changeset in webkit [288813] by Antti Koivisto
  • 12 edits in trunk

[CSS Container Queries] Check for query containers when matching rules
https://bugs.webkit.org/show_bug.cgi?id=235881

Reviewed by Antoine Quint.

LayoutTests/imported/w3c:

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

Source/WebCore:

Skip rules inside container queries when there are no container ancestors.

  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::collectMatchingRulesForList):
(WebCore::Style::ElementRuleCollector::containerQueryMatches):

Add the matching function.

This patch doesn't yet do any actual container query matching, it just checks
if we are inside a query container.

  • style/ElementRuleCollector.h:
  • style/RuleSet.h:

(WebCore::Style::RuleSet::containerQueryFor const):

  • style/SelectorMatchingState.h:

Add the container stack.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::popParent):
(WebCore::Style::TreeResolver::resolveComposedTree):
(WebCore::Style::TreeResolver::updateQueryContainer):

Maintain the container stack.

  • style/StyleTreeResolver.h:

LayoutTests:

6:16 AM Changeset in webkit [288812] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

[GTK][a11y] WTR: use AXMenuItemSelected for menu item selection change with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=235890

Reviewed by Adrian Perez de Castro.

ATSPI uses selection-changed signal for both combo box menus and list boxes, but layout tests expect then to be
different events AXMenuItemSelected and AXSelectedChildrenChanged.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::selectionChanged): Call notifyMenuSelectionChanged() for menus.
(WebCore::AccessibilityAtspi::notifyMenuSelectionChanged const): Emit AXMenuItemSelected.

  • accessibility/atspi/AccessibilityAtspi.h:
5:29 AM Changeset in webkit [288811] by aakash_jain@apple.com
  • 2 edits in trunk/Tools/CISupport/ews-build

[ews] Cleanup code by removing patchFailedToBuild and patchFailedTests properties
https://bugs.webkit.org/show_bug.cgi?id=235860

Reviewed by Ryan Haddad.

Cleanup code by removing patchFailedToBuild and patchFailedTests properties. Those were added in very early days of ews bringup, when corresponding steps (e.g.: UnApplyPatchIfRequired) were listed statically in factories.py. Later on we started invoking steps dynamically using addStepsAfterCurrentStep and UnApplyPatchIfRequired is no longer called in factories.py. We can just remove all these patchFailedToBuild and patchFailedTests properties logic.

Also rename UnApplyPatchIfRequired to UnApplyPatch since this step is run only when it is required

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

(UnApplyPatchIfRequired):
(CompileWebKit.evaluateCommand):
(RunJavaScriptCoreTests.evaluateCommand):
(ReRunWebKitTests.evaluateCommand):
(RunWebKitTestsRedTree.evaluateCommand):
(RunWebKitTestsRepeatFailuresRedTree.evaluateCommand):
(ReRunAPITests.evaluateCommand):
(UnApplyPatchIfRequired.doStepIf): Deleted.
(UnApplyPatchIfRequired.hideStepIf): Deleted.
(CompileWebKitWithoutPatch.doStepIf): Deleted.
(CompileWebKitWithoutPatch.hideStepIf): Deleted.

  • Tools/CISupport/ews-build/steps_unittest.py: Updated unit-tests.

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

4:46 AM Changeset in webkit [288810] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[Flatpak SDK] No longer updating due to expired GPG key
https://bugs.webkit.org/show_bug.cgi?id=235869

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

Manually synchronize the SDK GPG key in case our local copy is detected as expired.

This patch includes a drive-by fix regarding toolchains updates. Those were always
regenerated when updating the SDK, because the zip path was assumed to be a host path,
whereas it is actually a path in the sandbox.

  • flatpak/flatpakutils.py:

(run_sanitized):
(FlatpakObject.flatpak):
(FlatpakObject.flatpak_update):
(FlatpakPackage.install):
(WebkitFlatpak._reset_repository):
(WebkitFlatpak.host_path_to_sandbox_path):
(WebkitFlatpak.sandbox_path_to_host_path):
(WebkitFlatpak.main):
(WebkitFlatpak.check_toolchains_generated):
(FlatpakPackage.update): Deleted.

4:16 AM WebKitGTK/2.34.x edited by Alexander Mikhaylenko
(diff)
4:13 AM Changeset in webkit [288809] by Alexander Mikhaylenko
  • 2 edits in trunk/Source/WebKit

REGRESSION(r288644): [GTK4] Criticals when using pinch zoom
https://bugs.webkit.org/show_bug.cgi?id=235883

Reviewed by Carlos Garcia Campos.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseZoomBegin):
Only cancel the click gesture on GTK3. We don't use g_object_set_data() on GTK4.

2:56 AM Changeset in webkit [288808] by Carlos Garcia Campos
  • 7 edits in trunk

[GTK][a11y] Add support for password fields to ATSPI
https://bugs.webkit.org/show_bug.cgi?id=235778

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::postTextStateChangeNotification): Do not return early for password entries.

  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::effectiveRole const): Return PasswordText role for password fields.
(WebCore::AccessibilityObjectAtspi::effectiveRoleName const): Ditto.
(WebCore::AccessibilityObjectAtspi::effectiveLocalizedRoleName const): Ditto.
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const): Ignore text control inner text elements.

  • accessibility/atspi/AccessibilityObjectTextAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::textInserted): Expose the rendered text in case of password field.

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setInnerTextValue): Ditto.

Tools:

Add test cases for password inputs.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(testTextIterator):
(testTextSelections):
(testTextStateChanged):

12:48 AM Changeset in webkit [288807] by ysuzuki@apple.com
  • 16 edits
    1 add in trunk/Source

[WTF] Add GenericHashKey
https://bugs.webkit.org/show_bug.cgi?id=235872

Reviewed by Darin Adler.

Source/JavaScriptCore:

Use GenericHashKey and WTF::HashSet / WTF::HashMap.

  • dfg/DFGCommonData.h:
  • dfg/DFGGraph.h:
  • dfg/DFGIntegerCheckCombiningPhase.cpp:

(JSC::DFG::IntegerCheckCombiningPhase::RangeKey::Hash::hash):
(JSC::DFG::IntegerCheckCombiningPhase::RangeKey::Hash::equal):
(JSC::DFG::IntegerCheckCombiningPhase::handleBlock):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::addressOfDoubleConstant):

  • ftl/FTLLowerDFGToB3.cpp:

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

  • runtime/DeferredWorkTimer.cpp:
  • runtime/FunctionHasExecutedCache.cpp:

(JSC::FunctionHasExecutedCache::hasExecutedAtOffset):
(JSC::FunctionHasExecutedCache::insertUnexecutedRange):
(JSC::FunctionHasExecutedCache::removeUnexecutedRange):
(JSC::FunctionHasExecutedCache::getFunctionRanges):

  • runtime/FunctionHasExecutedCache.h:

(JSC::FunctionHasExecutedCache::FunctionRange::Hash::hash):
(JSC::FunctionHasExecutedCache::FunctionRange::Hash::equal):

  • runtime/TypeLocationCache.cpp:

(JSC::TypeLocationCache::getTypeLocation):

  • runtime/TypeLocationCache.h:

(JSC::TypeLocationCache::LocationKey::Hash::hash):
(JSC::TypeLocationCache::LocationKey::Hash::equal):

Source/WebCore:

No behavior change. We should use StdMap.
This should be StdMap since it requires ordered iterations by the key, so it should not be a HashMap.

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

Source/WTF:

This patch adds GenericHashKey<T>, which can represent any HashTable's key
even if Key does not have Empty / Deleted values. Previously we were using
StdUnorderedSet / StdUnorderedMap instead. But, (1) they are doing similar
thing to GenericHashKey to keep empty or deleted values, and (2) by using
GenericHashKey we can consistently use WTF::HashMap etc. for all possible
cases.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/GenericHashKey.h: Added.

Jan 30, 2022:

9:47 PM Changeset in webkit [288806] by commit-queue@webkit.org
  • 194 edits
    1 delete in trunk/LayoutTests

Update LayoutTests/resources/testharness.js to 2021-6-24 version
https://bugs.webkit.org/show_bug.cgi?id=235398
<rdar://problem/88126222>

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

LayoutTests/imported/w3c:

Update tests to accommodate the API change:

  • assert_throws_js check that the exception is of a particular JS exception type
  • assert_throws_dom check that the exception is of a particular DOMException type from a particular global object.
  • assert_throws_exactly check that the exception is a specific object.
  • IndexedDB-private-browsing/close-in-upgradeneeded.html:
  • IndexedDB-private-browsing/idbcursor-advance-invalid.html:
  • IndexedDB-private-browsing/idbcursor_advance_index2.html:
  • IndexedDB-private-browsing/idbcursor_advance_index3.html:
  • IndexedDB-private-browsing/idbcursor_advance_index6.html:
  • IndexedDB-private-browsing/idbcursor_advance_index7.html:
  • IndexedDB-private-browsing/idbcursor_advance_index8.html:
  • IndexedDB-private-browsing/idbcursor_advance_index9.html:
  • IndexedDB-private-browsing/idbcursor_advance_objectstore2.html:
  • IndexedDB-private-browsing/idbcursor_advance_objectstore3.html:
  • IndexedDB-private-browsing/idbcursor_advance_objectstore4.html:
  • IndexedDB-private-browsing/idbcursor_advance_objectstore5.html:
  • IndexedDB-private-browsing/idbcursor_continue_index2.html:
  • IndexedDB-private-browsing/idbcursor_continue_index3.html:
  • IndexedDB-private-browsing/idbcursor_continue_index4.html:
  • IndexedDB-private-browsing/idbcursor_continue_index7.html:
  • IndexedDB-private-browsing/idbcursor_continue_index8.html:
  • IndexedDB-private-browsing/idbcursor_continue_invalid.html:
  • IndexedDB-private-browsing/idbcursor_continue_objectstore2.html:
  • IndexedDB-private-browsing/idbcursor_continue_objectstore3.html:
  • IndexedDB-private-browsing/idbcursor_continue_objectstore4.html:
  • IndexedDB-private-browsing/idbcursor_continue_objectstore5.html:
  • IndexedDB-private-browsing/idbcursor_continue_objectstore6.html:
  • IndexedDB-private-browsing/idbcursor_delete_index2.html:
  • IndexedDB-private-browsing/idbcursor_delete_index3.html:
  • IndexedDB-private-browsing/idbcursor_delete_index4.html:
  • IndexedDB-private-browsing/idbcursor_delete_index5.html:
  • IndexedDB-private-browsing/idbcursor_delete_objectstore2.html:
  • IndexedDB-private-browsing/idbcursor_delete_objectstore3.html:
  • IndexedDB-private-browsing/idbcursor_delete_objectstore4.html:
  • IndexedDB-private-browsing/idbcursor_delete_objectstore5.html:
  • IndexedDB-private-browsing/idbcursor_update_index2.html:
  • IndexedDB-private-browsing/idbcursor_update_index3.html:
  • IndexedDB-private-browsing/idbcursor_update_index4.html:
  • IndexedDB-private-browsing/idbcursor_update_index5.html:
  • IndexedDB-private-browsing/idbcursor_update_index6.html:
  • IndexedDB-private-browsing/idbcursor_update_index7.html:
  • IndexedDB-private-browsing/idbcursor_update_objectstore2.html:
  • IndexedDB-private-browsing/idbcursor_update_objectstore3.html:
  • IndexedDB-private-browsing/idbcursor_update_objectstore5.html:
  • IndexedDB-private-browsing/idbcursor_update_objectstore6.html:
  • IndexedDB-private-browsing/idbcursor_update_objectstore7.html:
  • IndexedDB-private-browsing/idbcursor_update_objectstore8.html:
  • IndexedDB-private-browsing/idbdatabase_createObjectStore11.html:
  • IndexedDB-private-browsing/idbdatabase_createObjectStore3.html:
  • IndexedDB-private-browsing/idbdatabase_createObjectStore4.html:
  • IndexedDB-private-browsing/idbdatabase_createObjectStore6.html:
  • IndexedDB-private-browsing/idbdatabase_createObjectStore9-invalidparameters.html:
  • IndexedDB-private-browsing/idbdatabase_deleteObjectStore2.html:
  • IndexedDB-private-browsing/idbdatabase_deleteObjectStore3.html:
  • IndexedDB-private-browsing/idbdatabase_deleteObjectStore4-not_reused.html:
  • IndexedDB-private-browsing/idbdatabase_transaction.html:
  • IndexedDB-private-browsing/idbdatabase_transaction3.html:
  • IndexedDB-private-browsing/idbdatabase_transaction4.html:
  • IndexedDB-private-browsing/idbdatabase_transaction5.html:
  • IndexedDB-private-browsing/idbfactory_cmp2.html:
  • IndexedDB-private-browsing/idbfactory_open9.html:
  • IndexedDB-private-browsing/idbindex-multientry-arraykeypath.html:
  • IndexedDB-private-browsing/idbindex_count4.html:
  • IndexedDB-private-browsing/idbindex_get5.html:
  • IndexedDB-private-browsing/idbindex_get6.html:
  • IndexedDB-private-browsing/idbindex_get7.html:
  • IndexedDB-private-browsing/idbindex_getKey5.html:
  • IndexedDB-private-browsing/idbindex_getKey6.html:
  • IndexedDB-private-browsing/idbindex_getKey7.html:
  • IndexedDB-private-browsing/idbindex_openCursor.html:
  • IndexedDB-private-browsing/idbindex_openCursor2.html:
  • IndexedDB-private-browsing/idbindex_openKeyCursor.html:
  • IndexedDB-private-browsing/idbindex_openKeyCursor2.html:
  • IndexedDB-private-browsing/idbindex_openKeyCursor3.html:
  • IndexedDB-private-browsing/idbkeyrange_incorrect.html:
  • IndexedDB-private-browsing/idbobjectstore_add10.html:
  • IndexedDB-private-browsing/idbobjectstore_add11.html:
  • IndexedDB-private-browsing/idbobjectstore_add12.html:
  • IndexedDB-private-browsing/idbobjectstore_add13.html:
  • IndexedDB-private-browsing/idbobjectstore_add15.html:
  • IndexedDB-private-browsing/idbobjectstore_add16.html:
  • IndexedDB-private-browsing/idbobjectstore_add9.html:
  • IndexedDB-private-browsing/idbobjectstore_clear3.html:
  • IndexedDB-private-browsing/idbobjectstore_clear4.html:
  • IndexedDB-private-browsing/idbobjectstore_count4.html:
  • IndexedDB-private-browsing/idbobjectstore_createIndex10.html:
  • IndexedDB-private-browsing/idbobjectstore_createIndex11.html:
  • IndexedDB-private-browsing/idbobjectstore_createIndex12.html:
  • IndexedDB-private-browsing/idbobjectstore_createIndex13.html:
  • IndexedDB-private-browsing/idbobjectstore_delete6.html:
  • IndexedDB-private-browsing/idbobjectstore_delete7.html:
  • IndexedDB-private-browsing/idbobjectstore_deleteIndex.html:
  • IndexedDB-private-browsing/idbobjectstore_deleted.html:
  • IndexedDB-private-browsing/idbobjectstore_get6.html:
  • IndexedDB-private-browsing/idbobjectstore_get7.html:
  • IndexedDB-private-browsing/idbobjectstore_openCursor_invalid.html:
  • IndexedDB-private-browsing/idbobjectstore_put10.html:
  • IndexedDB-private-browsing/idbobjectstore_put11.html:
  • IndexedDB-private-browsing/idbobjectstore_put12.html:
  • IndexedDB-private-browsing/idbobjectstore_put13.html:
  • IndexedDB-private-browsing/idbobjectstore_put15.html:
  • IndexedDB-private-browsing/idbobjectstore_put16.html:
  • IndexedDB-private-browsing/idbobjectstore_put9.html:
  • IndexedDB-private-browsing/key_invalid.html:
  • IndexedDB-private-browsing/keypath_invalid.html:
  • IndexedDB-private-browsing/transaction-create_in_versionchange.html:

LayoutTests:

Copy testharness.js from imported/w3c/web-platform-tests

Copy idlharness.js from imported/w3c/web-platform-tests because it uses
the new testharness.js APIs.

Copy webidl2.js from imported/w3c/web-platform-tests to resources/WebIDLParser.js
because idlharness uses new webidl2.js logic.

Delete testharness.css, it is now bundled in testharness.js.

Update tests to accommodate the API change:

  • assert_throws_js check that the exception is of a particular JS exception type
  • assert_throws_dom check that the exception is of a particular DOMException type from a particular global object.
  • assert_throws_exactly check that the exception is a specific object.

Previously assert_throws was used and it hid unexpected exception errors.

Same for promise_rejects_*

async_test(f) now warns if f is not a normal function.

Singl page tests need a setup function.

  • animations/animation-direction-normal.html:
  • animations/animation-direction-reverse.html:
  • animations/change-keyframes-name.html:
  • animations/play-state-paused.html:

async_test(async function {...}) is incorrect (async test expects normal
function that has asynchronous logic, not a function returning a promise.
Use correct form:
promise_test(async function { ... });

  • css-custom-properties-api/registerProperty.html:

Update exception expectation functions.

  • editing/pasteboard/datatransfer-idl-expected.txt:
  • editing/pasteboard/datatransfer-idl.html:

Update the datatransfer related idls from source, otherwise
tests fail (harness now tests for constructor).
Update the results.

  • editing/text-iterator/count-matches-in-frames.html:
  • editing/text-iterator/hidden-textarea-selection-quirk.html:
  • fast/canvas/webgl/webgl2/bindings.html:
  • fast/custom-elements/defined-pseudo-class.html:
  • fast/custom-elements/throw-on-dynamic-markup-insertion-counter-construct.html:
  • fast/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions.html:
  • fast/dom/document-all.html:
  • fast/dom/elementFromPoint-parameters.html:
  • fast/dom/replaceable-setter-throws-if-defineownproperty-fails.html:
  • fast/dom/window-opener-setter-throws-if-defineownproperty-fails-1.html:
  • fast/dom/window-opener-setter-throws-if-defineownproperty-fails-2.html:
  • fast/events/clipboard-event-constructor.html:
  • fast/files/workers/resources/worker-file-reader-sync-bad-parameter.js:
  • fast/files/xhr-blob-request.html:
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-exceptions.html:
  • fast/mediasession/metadata/artworkdownload.html:
  • fast/mediastream/screencapture-user-gesture.html:
  • fetch/fetch-url-serialization.html:
  • http/tests/fetch/fetching-same-resource-with-different-options.html:
  • http/tests/fetch/redirectmode-and-preload.html:
  • http/tests/navigation/pushstate-at-unique-origin-denied.py:
  • http/tests/notifications/notification.html:
  • http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html:
  • http/tests/paymentrequest/payment-is-showing.https.html:
  • http/tests/paymentrequest/payment-request-abort-method.https.html:
  • http/tests/paymentrequest/payment-request-canmakepayment-method.https.html:
  • http/tests/paymentrequest/payment-request-merchant-validation.https.html:
  • http/tests/paymentrequest/payment-request-show-method.https.html:
  • http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
  • http/tests/paymentrequest/payment-response-retry-method.https.html:
  • http/tests/paymentrequest/rejects_if_not_active.https.html:
  • http/tests/paymentrequest/updateWith-method-pmi-handling.https.html:
  • http/tests/security/bypassing-cors-checks-for-extension-urls.html:
  • http/tests/security/clean-origin-css-exposed-resource-timing.html:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-overrides-xfo.html:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-default-src.html:
  • http/tests/security/contentSecurityPolicy/1.1/stylehash-default-src.html:
  • http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html:
  • http/tests/security/cross-origin-clean-css-resource-timing.html:
  • http/tests/security/cross-origin-css-resource-timing.html:
  • http/tests/subresource-integrity/sri-fetch.js:
  • http/tests/workers/service/service-worker-crossorigin-fetch.html:
  • http/tests/xmlhttprequest/set-bad-headervalue.html:
  • intersection-observer/intersection-observer-interface.html:
  • js/dom/dom-getters-type-check.html:
  • js/dom/legacy-platform-object-defineOwnProperty.html:
  • js/dom/post-message-symbol.html:
  • js/dom/queue-microtask-window.html:
  • media/track/opera/interfaces/TextTrackCue/vertical.html:
  • media/track/opera/resources/idlharness.js:
  • media/track/texttrackcue/texttrackcue-constructor.html:
  • media/track/w3c/interfaces/TextTrackCue/align.html:
  • pointerevents/ios/pointer-events-implicit-capture-release-exception.html:
  • pointerevents/ios/pointer-events-set-pointer-capture-exceptions.html:
  • pointerevents/pointer-id-crash.html:
  • resources/WebIDLParser.js:
  • resources/idlharness.js:

Update from wpt.

  • resources/testharness.css: Removed.
  • resources/testharness.js:

Update from wpt.

  • storage/websql/openDatabase-deprecation.html:
  • streams/readable-byte-stream-controller.js:
  • streams/readable-stream-byob-reader.js:
  • streams/readable-stream-byob-request.js:
  • streams/readable-stream-getReader.html:
  • streams/reference-implementation/bad-strategies.html:
  • streams/reference-implementation/bad-underlying-sinks.html:
  • streams/reference-implementation/transform-stream-expected.txt:
  • streams/reference-implementation/transform-stream.html:
  • webanimations/accelerated-animation-single-keyframe.html:
  • webanimations/frame-rate/animation-frame-rate.html:
  • webanimations/scheduling-of-animation-with-steps-timing-function-on-effect.html:
  • webanimations/scheduling-of-animation-with-steps-timing-function-on-keyframe.html:
  • webanimations/scheduling-of-css-animation-with-explicit-steps-timing-function-on-some-keyframes.html:
  • webanimations/scheduling-of-css-animation-with-implicit-steps-timing-function.html:
  • webaudio/webaudio-gc.html:
  • webrtc/calling-peerconnection-once-closed.html:
  • webrtc/certificates-indexeddb.html:
  • webrtc/datachannel/creation.html:
  • webrtc/datachannel/datachannel-event.html:
  • webrtc/datachannel/getStats-no-prflx-remote-candidate.html:
  • webrtc/disable-encryption.html:
  • webrtc/legacy-api-expected.txt:
  • webrtc/pc-detached-document.html:
  • webrtc/stun-server-filtering.html:
8:19 PM Changeset in webkit [288805] by Diego Pino Garcia
  • 2 edits in trunk/Source/WTF

[WinCairo] 'fileSystemRepresentation' identifier not found in URL.cpp
https://bugs.webkit.org/show_bug.cgi?id=235875

Unreviewed build fix.

Add missing header include.

  • wtf/URL.cpp:

(WTF::URL::fileSystemPath const):

7:58 PM Changeset in webkit [288804] by rniwa@webkit.org
  • 123 edits
    20 deletes in trunk

Source/WebCore:
Delete code for keygen element
https://bugs.webkit.org/show_bug.cgi?id=235867

Reviewed by Antti Koivisto and Darin Adler.

Deleted most of code for keygen since it has been always disabled for a while but preserve
the HTML tree builder behavior for compatibility purposes as required by the HTML5 specification.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h: Also remove the entry for HTMLSlotElement which is no longer

used since the runtime flag for enabling shadow DOM had been removed.

  • css/html.css:
  • css/legacyFormControlsIOS.css:
  • css/themeWin.css:
  • editing/MarkupAccumulator.cpp:

(WebCore::elementCannotHaveEndTag):

  • html/HTMLKeygenElement.cpp: Removed.
  • html/HTMLKeygenElement.h: Removed.
  • html/HTMLKeygenElement.idl: Removed.
  • html/HTMLTagNames.in:
  • html/shadow/ShadowPseudoIds.cpp:

(WebCore::ShadowPseudoIds::webkitKeygenSelect): Deleted.

  • html/shadow/ShadowPseudoIds.h:
  • mathml/MathMLPresentationElement.cpp:

(WebCore::MathMLPresentationElement::isPhrasingContent):

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setKeygenElementEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::keygenElementEnabled const): Deleted.

Source/WebKit:
Delete code for keygen element
https://bugs.webkit.org/show_bug.cgi?id=235867

Reviewed by Antti Koivisto and Darin Adler.

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetRequestVideoFrameCallbackEnabled):
(WKPreferencesGetRequestVideoFrameCallbackEnabled):
(WKPreferencesSetKeygenElementEnabled):
(WKPreferencesGetKeygenElementEnabled):
(WKPreferencesGetXSSAuditorEnabled):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • UIProcess/Automation/atoms/ElementAttribute.js:

(isBooleanAttribute):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPrivate.cpp:

Source/WebKitLegacy/mac:
Delete runtime preference for enabling keygen element
https://bugs.webkit.org/show_bug.cgi?id=235867

Reviewed by Antti Koivisto.

  • WebView/WebPreferences.mm:

(-[WebPreferences keygenElementEnabled]):
(-[WebPreferences setKeygenElementEnabled:]):

  • WebView/WebPreferencesPrivate.h:

Source/WebKitLegacy/win:
Delete runtime preference for enabling keygen element
https://bugs.webkit.org/show_bug.cgi?id=235867

Reviewed by Antti Koivisto.

  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::keygenElementEnabled):
(WebPreferences::setKeygenElementEnabled):

  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Source/WTF:
Delete code for keygen element
https://bugs.webkit.org/show_bug.cgi?id=235867

Reviewed by Antti Koivisto.

  • Scripts/Preferences/WebPreferencesInternal.yaml:

LayoutTests:
Delete code for keygen element
https://bugs.webkit.org/show_bug.cgi?id=235867

Reviewed by Antti Koivisto.

Deleted the relevant keygen tests and rebaselined other tests.

Most of the tests that happens to test keygen elements along side other form control elements
have been updated to expect keygen to behave like HTMLUnknownElement as expected.

  • accessibility/content-changed-notification-causes-crash.html:
  • accessibility/contenteditable-table-check-causes-crash.html:
  • accessibility/duplicate-axrenderobject-crash-expected.txt:
  • accessibility/duplicate-axrenderobject-crash.html:
  • fast/block/float/float-not-removed-from-first-letter-expected.txt:
  • fast/block/float/float-not-removed-from-first-letter.html:
  • fast/block/float/split-inline-sibling-of-float-crash.html:
  • fast/css/pseudo-required-optional-unapplied.html:
  • fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html:
  • fast/dom/HTMLKeygenElement/keygen-expected.txt: Removed.
  • fast/dom/HTMLKeygenElement/keygen-keytype-expected.txt: Removed.
  • fast/dom/HTMLKeygenElement/keygen-keytype.html: Removed.
  • fast/dom/HTMLKeygenElement/keygen.html: Removed.
  • fast/dom/adopt-node-crash-2-expected.txt:
  • fast/dom/adopt-node-crash-2.html:
  • fast/dom/attribute-set-before-element-in-tree.html:
  • fast/dom/domstring-attribute-reflection-expected.txt:
  • fast/dom/domstring-attribute-reflection.html:
  • fast/dom/set-custom-validity-with-too-few-arguments-expected.txt:
  • fast/dom/set-custom-validity-with-too-few-arguments.html:
  • fast/dom/tabindex-defaults-expected.txt:
  • fast/dom/tabindex-defaults.html:
  • fast/dom/wrapper-classes-expected.txt:
  • fast/dom/wrapper-classes.html:
  • fast/dynamic/insertAdjacentHTML-allowed-parents.html:
  • fast/flexbox/crash-button-keygen.html:
  • fast/forms/ValidityState-001-expected.txt:
  • fast/forms/ValidityState-001.html:
  • fast/forms/autofocus-keygen-expected.txt: Removed.
  • fast/forms/autofocus-keygen.html: Removed.
  • fast/forms/checkValidity-001-expected.txt:
  • fast/forms/checkValidity-001.html:
  • fast/forms/fieldset/fieldset-elements-expected.txt:
  • fast/forms/fieldset/fieldset-elements-htmlcollection-expected.txt:
  • fast/forms/fieldset/fieldset-elements-htmlcollection.html:
  • fast/forms/fieldset/fieldset-elements.html:
  • fast/forms/form-associated-element-crash3.html:
  • fast/forms/form-attribute-expected.txt:
  • fast/forms/form-attribute.html:
  • fast/forms/form-collection-elements-expected.txt:
  • fast/forms/form-collection-elements-order-expected.txt:
  • fast/forms/form-collection-elements-order.html:
  • fast/forms/form-collection-elements.html:
  • fast/forms/form-collection-radio-node-list-expected.txt:
  • fast/forms/form-collection-radio-node-list.html:
  • fast/forms/label/labelable-elements-expected.txt:
  • fast/forms/label/labelable-elements.html:
  • fast/forms/label/labels-add-htmlFor-label-expected.txt:
  • fast/forms/label/labels-add-htmlFor-label.html:
  • fast/forms/label/labels-add-parent-label-expected.txt:
  • fast/forms/label/labels-add-parent-label.html:
  • fast/forms/label/labels-change-htmlFor-attribute-expected.txt:
  • fast/forms/label/labels-change-htmlFor-attribute.html:
  • fast/forms/label/labels-multiple-sibling-labels-expected.txt:
  • fast/forms/label/labels-multiple-sibling-labels.html:
  • fast/forms/label/labels-parent-and-sibling-labels-expected.txt:
  • fast/forms/label/labels-parent-and-sibling-labels.html:
  • fast/forms/label/labels-remove-htmlFor-attribute-expected.txt:
  • fast/forms/label/labels-remove-htmlFor-attribute.html:
  • fast/forms/label/labels-remove-htmlFor-label-expected.txt:
  • fast/forms/label/labels-remove-htmlFor-label.html:
  • fast/forms/label/labels-remove-parent-label-expected.txt:
  • fast/forms/label/labels-remove-parent-label.html:
  • fast/forms/large-parts.html:
  • fast/forms/resources/common.js:

(createFormControlDataSet): Removed keygen form the list of form control elements.

  • fast/forms/scrollheight-with-mutation-crash.html:
  • fast/forms/setCustomValidity-arguments-expected.txt:
  • fast/forms/setCustomValidity-arguments.html:
  • fast/forms/setCustomValidity-existence-expected.txt:
  • fast/forms/setCustomValidity-existence.html:
  • fast/forms/setCustomValidity-null-parameter-expected.txt:
  • fast/forms/setCustomValidity-null-parameter.html:
  • fast/forms/state-restore-skip-stateless.html:
  • fast/forms/update-form-owner-in-moved-subtree-assertion-failure.html:
  • fast/forms/validationMessage-expected.txt:
  • fast/forms/validationMessage.html:
  • fast/forms/willvalidate-expected.txt:
  • fast/forms/willvalidate.html:
  • fast/html/clone-keygen-expected.txt: Removed.
  • fast/html/clone-keygen.html: Removed.
  • fast/html/keygen.html: Removed.
  • fast/html/marquee-reparent-check.html:
  • fast/invalid/residual-style-expected.html:
  • fast/invalid/residual-style.html:
  • fast/multicol/span/positioned-child-not-removed-crash-expected.txt:
  • fast/multicol/span/positioned-child-not-removed-crash.html:
  • fast/ruby/float-object-doesnt-crash.html:
  • fast/shadow-dom/keygen-shadow-manipulation-expected.txt:
  • fast/shadow-dom/keygen-shadow-manipulation.html:
  • fast/table/crash-splitColumn-2.html:
  • fast/table/multiple-captions-crash3-expected.html:
  • fast/table/multiple-captions-crash3.html:
  • http/tests/misc/resources/check-keygen-post.py: Removed.
  • http/tests/misc/submit-post-keygen-expected.txt: Removed.
  • http/tests/misc/submit-post-keygen.html: Removed.
  • imported/blink/fast/dom/shadow/shadowdom-for-keygen-only-shadow-expected.html: Removed.
  • imported/blink/fast/dom/shadow/shadowdom-for-keygen-only-shadow.html: Removed.
  • imported/blink/fast/text/international-iteration-simple-text.html:
  • platform/glib/fast/html/keygen-expected.txt: Removed.
  • platform/gtk/fast/forms/label/labelable-elements-expected.txt:
  • platform/gtk/fast/html/keygen-expected.png: Removed.
  • platform/ios-wk2/TestExpectations:
  • platform/ios-wk2/fast/forms/label/labelable-elements-expected.txt:
  • platform/ios/fast/html/keygen-expected.txt: Removed.
  • platform/mac-wk2/fast/forms/label/labelable-elements-expected.txt:
  • platform/mac/fast/html/keygen-expected.png: Removed.
  • platform/mac/fast/html/keygen-expected.txt: Removed.
  • platform/win/TestExpectations:
  • platform/wincairo/fast/html/keygen-expected.txt: Removed.
  • svg/dom/css-animate-input-foucs-crash-expected.txt:
  • svg/dom/css-animate-input-foucs-crash.html:
3:24 PM Changeset in webkit [288803] by rniwa@webkit.org
  • 34 edits in trunk

Delete runtime preference for enabling input events
https://bugs.webkit.org/show_bug.cgi?id=235864

Reviewed by Wenson Hsieh.

Source/WebCore:

  • dom/InputEvent.idl:
  • editing/Editor.cpp:

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:

LayoutTests:

Updated the tests.

  • fast/events/before-input-delete-empty-list-target-ranges.html:
  • fast/events/before-input-delete-text-target-ranges.html:
  • fast/events/before-input-events-different-start-end-elements.html:
  • fast/events/before-input-events-prevent-block-text-direction.html:
  • fast/events/before-input-events-prevent-default-in-textfield.html:
  • fast/events/before-input-events-prevent-default.html:
  • fast/events/before-input-events-prevent-drag-and-drop.html:
  • fast/events/before-input-events-prevent-insert-composition.html:
  • fast/events/before-input-events-prevent-recomposition.html:
  • fast/events/before-input-prevent-biu.html:
  • fast/events/before-input-prevent-cut.html:
  • fast/events/before-input-prevent-paste.html:
  • fast/events/before-input-prevent-typing.html:
  • fast/events/before-input-prevent-undo.html:
  • fast/events/before-input-replace-text-target-ranges.html:
  • fast/events/input-event-insert-link.html:
  • fast/events/input-events-drag-and-drop.html:
  • fast/events/input-events-fired-when-typing.html:
  • fast/events/input-events-forecolor-data.html:
  • fast/events/input-events-ime-composition.html:
  • fast/events/input-events-ime-recomposition.html:
  • fast/events/input-events-insert-by-drop.html:
  • fast/events/input-events-paste-data.html:
  • fast/events/input-events-paste-rich-datatransfer.html:
  • fast/events/input-events-selection-forecolor-data.html:
  • fast/events/input-events-spell-checking-datatransfer.html:
  • fast/events/input-events-typing-data.html:
  • fast/events/ios/input-events-fired-when-typing-in-contenteditable.html:
8:57 AM Changeset in webkit [288802] by commit-queue@webkit.org
  • 4 edits
    1 move
    1 add in trunk/LayoutTests

[GLIB] Update Test expectations and baselines. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=235826

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2022-01-30

  • platform/glib/tables/mozilla/bugs/adforce_imgis_com-expected.txt: Renamed from LayoutTests/platform/wpe/tables/mozilla/bugs/adforce_imgis_com-expected.txt.
  • platform/gtk/accessibility/math-multiscript-attributes-expected.txt:
  • platform/gtk/css2.1/t1508-c527-font-08-b-expected.txt: Added.
  • platform/gtk/css2.1/t1508-c527-font-10-c-expected.txt:
  • platform/wpe/accessibility/math-multiscript-attributes-expected.txt:
8:11 AM Changeset in webkit [288801] by Alan Bujtas
  • 8 edits
    2 adds in trunk

(REGRESSION)[IFC][RTL] wpt/css/css-text/white-space/trailing-space-and-text-alignment-rtl-003.html
https://bugs.webkit.org/show_bug.cgi?id=235823
<rdar://problem/88186663>

Reviewed by Antti Koivisto.

Source/WebCore:

Reset the trailing whitespace bidi level before handing them over to visual reordering.
see https://unicode.org/reports/tr9/#L1
"L1. On each line, reset the embedding level of the following characters to the paragraph embedding level:

...
Any sequence of whitespace characters ... at the end of the line."

It ensures that

<div style="width: 2ch; direction: rtl">AB C</div>

and

<div style="direction: rtl">AB </div>

both have the trailing whitespace positioned _visually_ as trailing (and not leading) content.

After the bidi paragraph processing "AB C" gets a uniform bidi level of 2, while "AB " is split into "AB" and " "
with bidi levels of 2 and 1 respectively.
In the latter case, the difference in bidi levels makes the runs flip visually at reordering.
It makes the trailing whitespace "pushed" to the left side of the "AB" making it _visually_ trailing (the content renders as " AB").
However in case of "AB C" with the line breaking position after " ", we would end up with a single run of "AB " with the bidi level of 2.
This run would render as "AB " turning the trailing whitespace into a _visually_ leading whitespace.

In this patch we ensure that the trailing (non-collapsible) whitespace runs

  1. are detached from their adjoining non-whitespace text runs and
  2. they get their bidi levels reset

Test: fast/text/rtl-pre-wrap-hanging-offset.html

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

(WebCore::Layout::InlineDisplayLineBuilder::build const):

LayoutTests:

  • fast/text/rtl-pre-wrap-hanging-offset-expected.html: Added.
  • fast/text/rtl-pre-wrap-hanging-offset.html: Added.
7:58 AM Changeset in webkit [288800] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][IFC] Do not break content at an inline box boundary
https://bugs.webkit.org/show_bug.cgi?id=235868

Reviewed by Antti Koivisto.

Source/WebCore:

Handle nested inline boxes, when the breaking position is between at an inline box boundary.
e.g.

<div style="width: 1px"><span><span><span>this_content_overflow</span></span></span></div>

while the breaking position is between the 3rd <span> and the letter 't', we should not let the first
line have all the <span><span><span> content only, but instead find a more reasonable breaking position by
looking at the previous runs.
This patch expands "findTrailingRunIndex" to find multiple, subsequent (nested) inline boxes.

Test: fast/inline/nested-inline-box-with-word-break.html

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::findTrailingRunIndex):

LayoutTests:

  • fast/inline/nested-inline-box-with-word-break-expected.html: Added.
  • fast/inline/nested-inline-box-with-word-break.html: Added.
5:19 AM Changeset in webkit [288799] by commit-queue@webkit.org
  • 5 edits in trunk

[GStreamer] GstStructure to JSON serialization
https://bugs.webkit.org/show_bug.cgi?id=235760

Patch by Philippe Normand <pnormand@igalia.com> on 2022-01-30
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

For GstWebRTC stats logging purposes JSON is a good payload format. As the stats are
initially notified via GstStructures we need a way to export those to JSON, using a new API
in GStreamerCommon.

Covered by API tests.

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::structureValueToJSON):
(WebCore::parseStructureValue):
(WebCore::structureToJSON):
(WebCore::structureToJSONString):

  • platform/graphics/gstreamer/GStreamerCommon.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/gstreamer/GStreamerTest.cpp:

(TestWebKitAPI::TEST_F):

Note: See TracTimeline for information about the timeline view.