Timeline



Dec 18, 2021:

10:30 PM Changeset in webkit [287235] by Mikhail R. Gadelha
  • 2 edits in trunk/Source/JavaScriptCore

[JSC][32bit] Fix undefined behavior causing miscompilation with clang 13 on ARM
https://bugs.webkit.org/show_bug.cgi?id=234399

Reviewed by Yusuke Suzuki.

Compiling JSC with clang 13 on ARMv7 on linux was broken because clang
was marking the constant Infinity as poison during constant folding, if
either -O2 or -O3 were used, causing the constant to not being
initialized.

This patch removes the undefined behaviour by preventing the
static_cast to int32_t if the double is either inf or NaN.

  • runtime/MathCommon.h:

(JSC::canBeInt32):
(JSC::canBeStrictInt32):

7:38 PM Changeset in webkit [287234] by commit-queue@webkit.org
  • 8 edits in trunk/Tools

[Monterey] TestWebKitAPI.PrivateClickMeasurement.Daemon* tests timing out: Failed to connect to mach service org.webkit.pcmtestdaemon.service
https://bugs.webkit.org/show_bug.cgi?id=232890

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

Using OSLaunchdJob on macOS works, but it requires a private entitlement which the public SDK can't sign with.
Just continue using launchctl instead. Also, do the NSDictionary -> xpc dictionary conversion at runtime to reduce duplicate code.

  • TestWebKitAPI/Configurations/TestWebKitAPI-macOS-internal.entitlements:
  • TestWebKitAPI/Configurations/TestWebKitAPI-macOS.entitlements:
  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::testDaemonPList):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

(TestWebKitAPI::testWebPushDaemonPList):
(TestWebKitAPI::setUpTestWebPushD):

  • TestWebKitAPI/cocoa/DaemonTestUtilities.h:
  • TestWebKitAPI/cocoa/DaemonTestUtilities.mm:

(TestWebKitAPI::convertArrayToXPC):
(TestWebKitAPI::convertDictionaryToXPC):
(TestWebKitAPI::registerPlistWithLaunchD):

4:21 PM Changeset in webkit [287233] by ddkilzer@apple.com
  • 2 edits in trunk/Source/bmalloc

[libpas] Do not compile libpas for 64-bit watchOS to save ~6 MB per architecture
<https://webkit.org/b/234478>
<rdar://problem/85620647>

Reviewed by Yusuke Suzuki.

  • bmalloc/BPlatform.h:

(BENABLE_LIBPAS):

  • Disable libpas on 64-bit watchOS.
3:57 PM Changeset in webkit [287232] by Darin Adler
  • 30 edits in trunk/Source

Hash tables, read/write, and heap memory are used unnecessarily, which may hurt performance
https://bugs.webkit.org/show_bug.cgi?id=234438

Reviewed by Anders Carlsson.

Source/WebCore:

  • Modules/mediacapabilities/MediaCapabilities.cpp:

(WebCore::bucketMIMETypes): Deleted.
(WebCore::isValidMediaMIMEType): Moved the code from bucketMIMETypes in here.
Use a SortedArraySet for bucketMIMETypes, which should be similar in performance
and uses no heap or read/write memory.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::popupValue const): Use a loop to check the 5 valid
values here instead of making a HashSet. Should be similar in performance and
use no heap or read/write memory. Also removes call to convertToASCIILowercase,
which will also help performance and memory use a tiny bit in some cases.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::inheritsPresentationalRole const): Use
decltype to make this declaration simpler and shorter.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateForEachEventHandlerContentAttribute): Use decltype and references
instead of pointers to make the function a little cleaner.

  • dom/Element.cpp:

(WebCore::canAttachAuthorShadowRoot): Use constexpr so the tag list here does
not use any read/write memory.

  • dom/make_names.pl:

(printFactoryCppFile): Removed the unnecessary constructors for the MapEntry
structs. Use decltype so we can make the tables constexpr so they do not use
any read/write memory.
(printWrapperFactoryCppFile): Ditto.

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::isProhibitedParagraphChild): Added a reserveInitialCapacity, which
could make the hash table here use a little less memory.

  • html/Autofill.cpp:

(WebCore::fieldNameMap): Deleted. Replaced with a SortedArrayMap, which is
entirely made out of constexpr objcts so does not use heap or read/write memory.
(WebCore::toAutofillFieldName): Updated to use SortedArrayMap functions.
(WebCore::AutofillData::createFromHTMLFormControlElement): Ditto.

  • html/HTMLDocument.cpp:

(WebCore::HTMLDocument::isCaseSensitiveAttribute): Added a reserveInitialCapacity,
which could make the hash table here use a little less memory.

  • html/HTMLObjectElement.cpp:

(WebCore::preventsParentObjectFromExposure): Ditto.

  • page/DebugPageOverlays.cpp:

(WebCore::touchEventRegionColors): Deleted.
(WebCore::NonFastScrollableRegionOverlay::drawRect): Use SortedArrayMap and
some lambdas to make this code tighter and easier to read.

  • page/PerformanceUserTiming.cpp:

(WebCore::restrictedMarkNamesToNavigationTimingFunctionMap): Deleted. Use
a SortedArrayMap instead, which should be similar in performance and uses no heap
or read/write memory.
(WebCore::restrictedMarkFunction): Deleted.
(WebCore::isRestrictedMarkNameNonMainThread): Deleted. This is now safe to do on
any thread.
(WebCore::PerformanceUserTiming::isRestrictedMarkName): Use the SortedArrayMap,
which has the benefit of relaxing the thread restrictions; this is now safe to
call on any thread.
(WebCore::PerformanceUserTiming::convertMarkToTimestamp const): Updated to use
the SortedArrayMap. There may be some additional simplification possible now
that the mark functions map can be used in any thread, but I wasn't sure.

  • platform/cocoa/RemoteCommandListenerCocoa.mm:

(WebCore::mediaRemoteCommandForPlatformCommand): Use makeOptionalFromPointer.

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::hasValidAverageCharWidth const): Use a SortedArraySet,
which should be similar in performance and uses no heap or read/write memory

  • platform/graphics/FontPlatformData.cpp:

(WebCore::makeOptionalFromPointer): Deleted. Moved to SortedArrayMap.h.

  • platform/graphics/HEVCUtilities.cpp:

(WebCore::makeOptionalFromPointer): Deleted. Moved to SortedArrayMap.h.

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

(WebCore::AVAssetMIMETypeCache::initializeCache): Updated for function name change.

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

Tweaked use of UNUSED_PARAM a bit across the file, relying on omitted names instead.

  • platform/graphics/cg/UTIRegistry.cpp:

(WebCore::defaultSupportedImageTypes): Use a constexpr array rather than HashSet,
on something just iterating this, not using it as a set.

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::SourceBufferParserWebM::supportedMIMETypes): Renamed from webmMIMETypes,
changed to return a Span so we don't have to allocate a HashSet, since callers
simply iterate this, and don't do set operations.
(WebCore::SourceBufferParserWebM::isSupportedVideoCodec): Replaced the
supportedVideoCodecs with this. We don't need a HashSet to check for two values,
and this should be faster and use less memory.
(WebCore::SourceBufferParserWebM::isSupportedAudioCodec): Ditto.

  • platform/graphics/cocoa/SourceBufferParserWebM.h: Updated for the changes above.
  • rendering/svg/SVGResources.cpp:

(WebCore::tagSet): Added this helper to make the code in the functions below less
repetitive.
(WebCore::clipperFilterMaskerTags): Use a constexpr array instead of many separate
calls to HashSet::add to construct the set.
(WebCore::markerTags): Ditto.
(WebCore::fillAndStrokeTags): Ditto.
(WebCore::chainableResourceTags): Ditto.

Source/WebKit:

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::sortedTables): Simplify unnecessarily complicated
expression to initialize the Span.

  • Shared/Cocoa/DefaultWebBrowserChecks.h: Return a Span instead of an optional Vector.
  • Shared/Cocoa/DefaultWebBrowserChecks.mm:

(WebKit::appBoundDomainsForTesting): Renamed from getAppBoundDomainsTesting to fit WebKit
coding style a bit better, and be a little more grammatical. Removed an un-needed HashMap
that had only a single entry, used a NeverDestroyed std::array rather than a Vector so we
don't use any heap or read/write memory.

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::addTestDomains const): Rewrite to use the function above.
Fewer special cases needed since we are just using an empty Span, which efficiently
does nothing, so no need to have a distinct null value.

Source/WTF:

  • wtf/SortedArrayMap.h:

(WTF::SortedArrayMap<ArrayType>::contains const): Added. More elegant than calling tryGet and
treating the pointer as a boolean.
(WTF::makeOptionalFromPointer): Moved here so it can be reused. Might rename later, since it's
only used in a few places.

2:50 PM Changeset in webkit [287231] by Adrian Perez de Castro
  • 3 edits in releases/WebKitGTK/webkit-2.34/Source/WebCore

Unreviewed non-unified build fixes.

  • loader/DocumentWriter.cpp: Add missing DocumentLoader.h header.
  • page/PerformanceNavigationTiming.cpp: Remove "#pragma once" from non-header file.
1:34 PM Changeset in webkit [287230] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Use smart pointers for WebCoreNSURLSessionDataTask ObjC members
https://bugs.webkit.org/show_bug.cgi?id=234477
<rdar://79224869>

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

Seems like a smart thing to do.

  • platform/network/cocoa/WebCoreNSURLSession.h:
  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSessionDataTask originalRequest]):
(-[WebCoreNSURLSessionDataTask setOriginalRequest:]):
(-[WebCoreNSURLSessionDataTask currentRequest]):
(-[WebCoreNSURLSessionDataTask setCurrentRequest:]):
(-[WebCoreNSURLSessionDataTask error]):
(-[WebCoreNSURLSessionDataTask setError:]):
(-[WebCoreNSURLSessionDataTask taskDescription]):
(-[WebCoreNSURLSessionDataTask setTaskDescription:]):
(-[WebCoreNSURLSessionDataTask dealloc]):

12:30 PM Changeset in webkit [287229] by Chris Dumez
  • 12 edits in trunk/Source/WebKit

Move CacheStorage engines from NetworkProcess to NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=234448

Reviewed by Alex Christensen.

Move CacheStorage engines from NetworkProcess to NetworkSession, as they are per-session.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::destroySession):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData):
(WebKit::NetworkProcess::~NetworkProcess): Deleted.
(WebKit::NetworkProcess::findCacheEngine): Deleted.
(WebKit::NetworkProcess::ensureCacheEngine): Deleted.
(WebKit::NetworkProcess::removeCacheEngine): Deleted.
(WebKit::NetworkProcess::cacheStorageRootPath): Deleted.
(WebKit::NetworkProcess::setCacheStorageParameters): Deleted.

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

(WebKit::NetworkSession::invalidateAndCancel):
(WebKit::NetworkSession::ensureCacheEngine):
(WebKit::NetworkSession::clearCacheEngine):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::cacheEngine):

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::create):
(WebKit::CacheStorage::Engine::fetchEntries):
(WebKit::CacheStorage::Engine::open):
(WebKit::CacheStorage::Engine::remove):
(WebKit::CacheStorage::Engine::retrieveCaches):
(WebKit::CacheStorage::Engine::retrieveRecords):
(WebKit::CacheStorage::Engine::putRecords):
(WebKit::CacheStorage::Engine::deleteMatchingRecords):
(WebKit::CacheStorage::Engine::lock):
(WebKit::CacheStorage::Engine::unlock):
(WebKit::CacheStorage::Engine::clearMemoryRepresentation):
(WebKit::CacheStorage::Engine::representation):
(WebKit::CacheStorage::Engine::clearAllCaches):
(WebKit::CacheStorage::Engine::clearCachesForOrigin):
(WebKit::CacheStorage::Engine::Engine):
(WebKit::CacheStorage::Engine::from): Deleted.
(WebKit::CacheStorage::Engine::destroyEngine): Deleted.

  • NetworkProcess/cache/CacheStorageEngine.h:
  • NetworkProcess/cache/CacheStorageEngineConnection.cpp:

(WebKit::CacheStorageEngineConnection::~CacheStorageEngineConnection):
(WebKit::CacheStorageEngineConnection::open):
(WebKit::CacheStorageEngineConnection::remove):
(WebKit::CacheStorageEngineConnection::caches):
(WebKit::CacheStorageEngineConnection::retrieveRecords):
(WebKit::CacheStorageEngineConnection::deleteMatchingRecords):
(WebKit::CacheStorageEngineConnection::putRecords):
(WebKit::CacheStorageEngineConnection::reference):
(WebKit::CacheStorageEngineConnection::dereference):
(WebKit::CacheStorageEngineConnection::clearMemoryRepresentation):
(WebKit::CacheStorageEngineConnection::engineRepresentation):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::retrieveCacheStorageParameters):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
12:11 PM Changeset in webkit [287228] by Simon Fraser
  • 26 edits in trunk

Read the default value of the ScrollAnimatorEnabled setting from NSUserDefaults
https://bugs.webkit.org/show_bug.cgi?id=234456

Reviewed by Tim Horton.

Source/WebCore:

It's impossible for a test to run with an animated keyboard scroll because platformAllowsScrollAnimation(),
which reads from NSUserDefaults, always trumps the Setting.

Fix by initializing the setting from NSUserDefaults and removing the platformAllowsScrollAnimation()
check. This allows for a WebKitTestRunner test override the setting. Remove the WTR code
that sets @"NSScrollAnimationEnabled" to @NO.

Unfortunately in WebKitLegacy AppKit code consults the @"NSScrollAnimationEnabled" key, so
DumpRenderTree has to continue to initialize this NSUserDefault to @NO and tests that
try to change the Setting will fail.

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::singleAxisScroll):
(WebCore::ScrollAnimator::scrollAnimationEnabled const):

  • platform/ScrollAnimator.h:

(WebCore::ScrollAnimator::platformAllowsScrollAnimation const): Deleted.

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

(WebCore::ScrollAnimatorMac::platformAllowsScrollAnimation const): Deleted.

Source/WebKit:

It's impossible for a test to run with an animated keyboard scroll because platformAllowsScrollAnimation(),
which reads from NSUserDefaults, always trumps the Setting.

Fix by initializing the setting from NSUserDefaults and removing the platformAllowsScrollAnimation()
check. This allows for a WebKitTestRunner test override the setting. Remove the WTR code
that sets @"NSScrollAnimationEnabled" to @NO.

Unfortunately in WebKitLegacy AppKit code consults the @"NSScrollAnimationEnabled" key, so
DumpRenderTree has to continue to initialize this NSUserDefault to @NO and tests that
try to change the Setting will fail.

  • Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm:

(WebKit::defaultScrollAnimatorEnabled):

  • Shared/WebPreferencesDefaultValues.h:

Source/WebKitLegacy/mac:

It's impossible for a test to run with an animated keyboard scroll because platformAllowsScrollAnimation(),
which reads from NSUserDefaults, always trumps the Setting.

Fix by initializing the setting from NSUserDefaults and removing the platformAllowsScrollAnimation()
check. This allows for a WebKitTestRunner test override the setting.

Unfortunately in WebKitLegacy AppKit code consults the @"NSScrollAnimationEnabled" key, so
DumpRenderTree has to continue to initialize this NSUserDefault to @NO and tests that
try to change the Setting will fail.

  • WebView/WebPreferencesDefaultValues.h:
  • WebView/WebPreferencesDefaultValues.mm:

(WebKit::defaultScrollAnimatorEnabled):

Source/WTF:

It's impossible for a test to run with an animated keyboard scroll because platformAllowsScrollAnimation(),
which reads from NSUserDefaults, always trumps the Setting.

Fix by initializing the setting from NSUserDefaults and removing the platformAllowsScrollAnimation()
check. This allows for a WebKitTestRunner test override the setting. Remove the WTR code
that sets @"NSScrollAnimationEnabled" to @NO.

Unfortunately in WebKitLegacy AppKit code consults the @"NSScrollAnimationEnabled" key, so
DumpRenderTree has to continue to initialize this NSUserDefault to @NO and tests that
try to change the Setting will fail.

  • Scripts/Preferences/WebPreferences.yaml:

Tools:

It's impossible for a test to run with an animated keyboard scroll because platformAllowsScrollAnimation(),
which reads from NSUserDefaults, always trumps the Setting.

Fix by initializing the setting from NSUserDefaults and removing the platformAllowsScrollAnimation()
check. This allows for a WebKitTestRunner test override the setting.

Unfortunately in WebKitLegacy AppKit code consults the @"NSScrollAnimationEnabled" key, so
DumpRenderTree has to continue to initialize this NSUserDefault to @NO and tests that
try to change the Setting will fail.

  • WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:

(WTR::InjectedBundle::platformInitialize):

  • WebKitTestRunner/mac/main.mm:

(setDefaultsToConsistentValuesForTesting):

LayoutTests:

Now that ScrollAnimatorEnabled is true by default, turn it off for these tests.

  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal-with-keyboard-scaled.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal-with-keyboard.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-with-keyboard-scaled.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-with-keyboard.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe-horizontal-with-keyboard.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe-vertical-with-keyboard.html:
11:04 AM Changeset in webkit [287227] by Simon Fraser
  • 23 edits in trunk

Rename MockScrollAnimatorEnabled to MockScrollbarsControllerEnabled
https://bugs.webkit.org/show_bug.cgi?id=234452

Reviewed by Anders Carlsson.

The class formerly known as MockScrollAnimatorEnabled is used for logging when scrollbars
get events, so fix the name. It's a subclass of ScrollbarsController.

Source/WebCore:

  • page/FrameView.cpp:

(WebCore::FrameView::mockScrollbarsControllerEnabled const):
(WebCore::FrameView::logMockScrollbarsControllerMessage const):
(WebCore::FrameView::mockScrollAnimatorEnabled const): Deleted.
(WebCore::FrameView::logMockScrollAnimatorMessage const): Deleted.

  • page/FrameView.h:
  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::scrollbarsController const):

  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::mockScrollbarsControllerEnabled const):
(WebCore::ScrollableArea::logMockScrollbarsControllerMessage const):
(WebCore::ScrollableArea::mockScrollAnimatorEnabled const): Deleted.
(WebCore::ScrollableArea::logMockScrollAnimatorMessage const): Deleted.

  • platform/mock/ScrollbarsControllerMock.h:
  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::mockScrollbarsControllerEnabled const):
(WebCore::RenderLayerScrollableArea::logMockScrollbarsControllerMessage const):
(WebCore::RenderLayerScrollableArea::mockScrollAnimatorEnabled const): Deleted.
(WebCore::RenderLayerScrollableArea::logMockScrollAnimatorMessage const): Deleted.

  • rendering/RenderLayerScrollableArea.h:
  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::mockScrollbarsControllerEnabled const):
(WebCore::RenderListBox::logMockScrollbarsControllerMessage const):
(WebCore::RenderListBox::mockScrollAnimatorEnabled const): Deleted.
(WebCore::RenderListBox::logMockScrollAnimatorMessage const): Deleted.

  • rendering/RenderListBox.h:

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:

Tools:

  • DumpRenderTree/TestOptions.cpp:

(WTR::TestOptions::defaults):

  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::defaults):

LayoutTests:

  • fast/scrolling/scroll-animator-basic-events.html:
  • fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html:
  • fast/scrolling/scroll-animator-overlay-scrollbars-hovered.html:
  • fast/scrolling/scroll-animator-select-list-events.html:
10:06 AM Changeset in webkit [287226] by Russell Epstein
  • 1 copy in tags/Safari-613.1.12.1

Tag Safari-613.1.12.1.

10:03 AM Changeset in webkit [287225] by Russell Epstein
  • 9 edits in branches/safari-613.1.12-branch/Source

Versioning.

WebKit-7613.1.12.1

9:46 AM Changeset in webkit [287224] by Chris Dumez
  • 39 edits in trunk/Source

Convert ProtectionSpace enums into enum classes
https://bugs.webkit.org/show_bug.cgi?id=234455

Reviewed by Alex Christensen.

Source/WebCore:

  • platform/network/CredentialStorage.cpp:

(WebCore::CredentialStorage::set):
(WebCore::CredentialStorage::removeCredentialsWithOrigin):
(WebCore::CredentialStorage::originsWithCredentials const):

  • platform/network/ProtectionSpace.h:

(WebCore::ProtectionSpace::ProtectionSpace):

  • platform/network/ProtectionSpaceBase.cpp:

(WebCore::ProtectionSpaceBase::ProtectionSpaceBase):
(WebCore::ProtectionSpaceBase::isProxy const):
(WebCore::ProtectionSpaceBase::receivesCredentialSecurely const):
(WebCore::ProtectionSpaceBase::isPasswordBased const):

  • platform/network/ProtectionSpaceBase.h:

(WebCore::ProtectionSpaceBase::serverType const):
(WebCore::ProtectionSpaceBase::authenticationScheme const):

  • platform/network/cf/AuthenticationCF.cpp:

(WebCore::createCF):
(WebCore::core):

  • platform/network/cf/ProtectionSpaceCFNet.h:

(WebCore::ProtectionSpace::ProtectionSpace):

  • platform/network/cf/ResourceHandleCFNet.cpp:

(WebCore::ResourceHandle::receivedCredential):

  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:

(WebCore::authenticationSchemeFromAuthenticationMethod):

  • platform/network/cocoa/ProtectionSpaceCocoa.h:

(WebCore::ProtectionSpace::ProtectionSpace):

  • platform/network/cocoa/ProtectionSpaceCocoa.mm:

(WebCore::type):
(WebCore::scheme):
(WebCore::ProtectionSpace::nsSpace const):

  • platform/network/curl/AuthenticationChallenge.h:
  • platform/network/curl/AuthenticationChallengeCurl.cpp:

(WebCore::AuthenticationChallenge::protectionSpaceServerTypeFromURI):
(WebCore::AuthenticationChallenge::protectionSpaceForServerTrust):
(WebCore::AuthenticationChallenge::authenticationSchemeFromCurlAuth):

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::setAuthenticationScheme):

  • platform/network/curl/CurlRequest.h:
  • platform/network/curl/ProtectionSpaceCurl.h:

(WebCore::ProtectionSpace::ProtectionSpace):

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::platformLoadResourceSynchronously):

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::receivedCredential):

  • platform/network/soup/AuthenticationChallengeSoup.cpp:

(WebCore::protectionSpaceServerTypeFromURL):
(WebCore::protectionSpaceFromSoupAuthAndURL):
(WebCore::protectionSpaceForClientCertificate):
(WebCore::protectionSpaceForClientCertificatePassword):

  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::schemeFromProtectionSpaceServerType):
(WebCore::authTypeFromProtectionSpaceAuthenticationScheme):

Source/WebKit:

  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::didReceiveChallenge):

  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::didReceiveChallenge):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost):

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::NetworkDataTaskCurl):
(WebKit::NetworkDataTaskCurl::willPerformHTTPRedirection):
(WebKit::NetworkDataTaskCurl::restartWithCredential):

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::completeAuthentication):
(WebKit::NetworkDataTaskSoup::cancelAuthentication):

  • Shared/Authentication/AuthenticationManager.cpp:

(WebKit::canCoalesceChallenge):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<ProtectionSpace>::decode):

  • Shared/curl/WebCoreArgumentCodersCurl.cpp:

(IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData):

  • UIProcess/API/C/WKAPICast.h:

(WebKit::toAPI):

  • UIProcess/API/glib/WebKitAuthenticationRequest.cpp:

(webkit_authentication_request_get_security_origin):

  • UIProcess/Authentication/WebProtectionSpace.cpp:

(WebKit::WebProtectionSpace::serverType const):
(WebKit::WebProtectionSpace::authenticationScheme const):

  • UIProcess/Authentication/WebProtectionSpace.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::processAuthenticationChallenge):
(WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace):

Source/WebKitLegacy/win:

  • WebURLProtectionSpace.cpp:

(WebURLProtectionSpace::authenticationMethod):
(coreScheme):
(WebURLProtectionSpace::initWithHost):
(WebURLProtectionSpace::initWithProxyHost):

9:18 AM Changeset in webkit [287223] by Chris Dumez
  • 8 edits
    1 delete in trunk/Tools

Drop ServiceWorkerTCPServer and use HTTPServer instead
https://bugs.webkit.org/show_bug.cgi?id=234443
<rdar://86646140>

Reviewed by Alex Christensen.

Drop ServiceWorkerTCPServer and use HTTPServer instead. ServiceWorkerTCPServer relies on TCPServer which is
known to cause flakiness and sometimes hang in its destruction.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerTCPServer.h: Removed.

(): Deleted.
(ServiceWorkerTCPServer::ServiceWorkerTCPServer): Deleted.
(ServiceWorkerTCPServer::request): Deleted.
(ServiceWorkerTCPServer::requestWithLocalhost): Deleted.
(ServiceWorkerTCPServer::requestWithFragment): Deleted.
(ServiceWorkerTCPServer::userAgentsChecked const): Deleted.
(ServiceWorkerTCPServer::respondToRequests): Deleted.
(ServiceWorkerTCPServer::requestWithURLString): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm:
  • TestWebKitAPI/cocoa/HTTPServer.h:
  • TestWebKitAPI/cocoa/HTTPServer.mm:

(TestWebKitAPI::HTTPServer::scheme const):
(TestWebKitAPI::HTTPServer::request const):
(TestWebKitAPI::HTTPServer::requestWithLocalhost const):

7:11 AM Changeset in webkit [287222] by Antti Koivisto
  • 10 edits in trunk/Source/WebCore

Remove unused :-internal-direct-focus pseudo-class
https://bugs.webkit.org/show_bug.cgi?id=234431

Reviewed by Alexey Shvayka.

It was replaced by :focus-visible on the user-agent stylesheet.

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::selectorText const):

  • css/CSSSelector.h:
  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::checkOne const):

  • css/SelectorCheckerTestFunctions.h:

(WebCore::matchesLegacyDirectFocusPseudoClass):
(WebCore::matchesFocusVisiblePseudoClass):
(WebCore::matchesDirectFocusPseudoClass): Deleted.

  • css/SelectorPseudoClassAndCompatibilityElementMap.in:
  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumePseudo):

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::addPseudoClassType):

  • dom/Element.cpp:

(WebCore::Element::setFocus):

  • style/RuleSet.cpp:

(WebCore::Style::RuleSet::addRule):

3:19 AM Changeset in webkit [287221] by ysuzuki@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

[JSC] Do not allocate m_bbqCallee and m_omgCallee until it becomes necessary
https://bugs.webkit.org/show_bug.cgi?id=234457

Reviewed by Saam Barati.

WebAssembly memory import will require initializing both Wasm::CalleeGroup.
So, we should shrink memory size of Wasm::CalleeGroup as much as possible
to avoid memory regression. This patch allocates m_bbqCallee and m_omgCallee
only when it becomes available.

  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::work):

  • wasm/WasmCalleeGroup.cpp:

(JSC::Wasm::CalleeGroup::CalleeGroup):

  • wasm/WasmCalleeGroup.h:

(JSC::Wasm::CalleeGroup::compilationFinished): Deleted.
(JSC::Wasm::CalleeGroup::runnable): Deleted.
(JSC::Wasm::CalleeGroup::errorMessage): Deleted.
(JSC::Wasm::CalleeGroup::functionImportCount const): Deleted.
(JSC::Wasm::CalleeGroup::embedderEntrypointCalleeFromFunctionIndexSpace): Deleted.
(JSC::Wasm::CalleeGroup::wasmEntrypointCalleeFromFunctionIndexSpace): Deleted.
(JSC::Wasm::CalleeGroup::wasmBBQCalleeFromFunctionIndexSpace): Deleted.
(JSC::Wasm::CalleeGroup::entrypointLoadLocationFromFunctionIndexSpace): Deleted.
(JSC::Wasm::CalleeGroup::wasmToWasmExitStub): Deleted.
(JSC::Wasm::CalleeGroup::mode const): Deleted.

  • wasm/WasmOMGForOSREntryPlan.cpp:

(JSC::Wasm::OMGForOSREntryPlan::work):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::updateCallSitesToCallUs):

  • wasm/WasmPlan.h:
2:17 AM Changeset in webkit [287220] by ysuzuki@apple.com
  • 21 edits
    5 adds in trunk

[WTF] Introduce TrailingArray
https://bugs.webkit.org/show_bug.cgi?id=234201

Reviewed by Darin Adler.

Source/JavaScriptCore:

Use ThreadSafeRefCountedFixedVector in ObjectPropertyConditionSet and Wasm::LLIntCallees.

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::baselineJITConstantPool):

  • bytecode/ObjectPropertyConditionSet.cpp:

(JSC::ObjectPropertyConditionSet::mergedWith const):
(JSC::ObjectPropertyConditionSet::dumpInContext const):
(JSC::ObjectPropertyConditionSet::isValidAndWatchable const):

  • bytecode/ObjectPropertyConditionSet.h:

(JSC::ObjectPropertyConditionSet::invalid):
(JSC::ObjectPropertyConditionSet::create):
(JSC::ObjectPropertyConditionSet::isValid const):
(JSC::ObjectPropertyConditionSet::size const):
(JSC::ObjectPropertyConditionSet::begin const):
(JSC::ObjectPropertyConditionSet::end const):
(JSC::ObjectPropertyConditionSet::ObjectPropertyConditionSet): Deleted.
(JSC::ObjectPropertyConditionSet::releaseRawPointer): Deleted.
(JSC::ObjectPropertyConditionSet::adoptRawPointer): Deleted.
(JSC::ObjectPropertyConditionSet::fromRawPointer): Deleted.
(JSC::ObjectPropertyConditionSet::Data::Data): Deleted.

  • jit/JIT.cpp:

(JSC::JIT::compileAndLinkWithoutFinalizing):

  • jit/JITInlines.h:

(JSC::JIT::loadConstant):

  • llint/LLIntOffsetsExtractor.cpp:
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • wasm/WasmCallee.h:

(JSC::Wasm::LLIntCallees::create): Deleted.
(JSC::Wasm::LLIntCallees::at const): Deleted.
(JSC::Wasm::LLIntCallees::data const): Deleted.
(JSC::Wasm::LLIntCallees::LLIntCallees): Deleted.

  • wasm/WasmCodeBlock.cpp:

(JSC::Wasm::CodeBlock::create):
(JSC::Wasm::CodeBlock::CodeBlock):

  • wasm/WasmCodeBlock.h:
  • wasm/WasmModule.cpp:

(JSC::Wasm::Module::Module):
(JSC::Wasm::Module::getOrCreateCodeBlock):

  • wasm/WasmModule.h:

Source/WTF:

This patch implements TrailingArray<Derived, T>, which allows us to implement class
with trailing array easily. By using this, we implement EmbeddedFixedVector and RefCountedFixedVector.
Plus, we replace underlying implementation of FixedVector from RefCountedArray to EmbeddedFixedVector
since ref-counting is not necessary. This is great for swapping: while RefCountedArray will decrease ref
and touching memory when destryoing, EmbeddedFixedVector does not, so we can keep memory untouched if
EmbeddedFixedVector's T is POD when destroying.

In a subsequent patch, we will remove RefCountedArray and use RefCountedFixedVector since RefCountedFixedVector
is following normal Ref / RefPtr protocol, so easy to understand the semantics.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/EmbeddedFixedVector.h: Added.
  • wtf/FixedVector.h:

(WTF::FixedVector::FixedVector):
(WTF::FixedVector::operator=):
(WTF::FixedVector::size const):
(WTF::FixedVector::isEmpty const):
(WTF::FixedVector::byteSize const):
(WTF::FixedVector::data):
(WTF::FixedVector::begin):
(WTF::FixedVector::end):
(WTF::FixedVector::rbegin):
(WTF::FixedVector::rend):
(WTF::FixedVector::rbegin const):
(WTF::FixedVector::rend const):
(WTF::FixedVector::at):
(WTF::FixedVector::at const):
(WTF::FixedVector::operator[]):
(WTF::FixedVector::operator[] const):
(WTF::FixedVector::fill):
(WTF::FixedVector::operator!= const):
(WTF::FixedVector::operator== const):
(WTF::FixedVector::swap):
(WTF::FixedVector::getStorage):

  • wtf/RefCountedFixedVector.h: Added.
  • wtf/TrailingArray.h: Added.

(WTF::TrailingArray::TrailingArray):
(WTF::TrailingArray::~TrailingArray):
(WTF::TrailingArray::allocationSize):
(WTF::TrailingArray::size const):
(WTF::TrailingArray::isEmpty const):
(WTF::TrailingArray::byteSize const):
(WTF::TrailingArray::data):
(WTF::TrailingArray::data const):
(WTF::TrailingArray::begin):
(WTF::TrailingArray::end):
(WTF::TrailingArray::begin const):
(WTF::TrailingArray::end const):
(WTF::TrailingArray::cbegin const):
(WTF::TrailingArray::cend const):
(WTF::TrailingArray::rbegin):
(WTF::TrailingArray::rend):
(WTF::TrailingArray::rbegin const):
(WTF::TrailingArray::rend const):
(WTF::TrailingArray::crbegin const):
(WTF::TrailingArray::crend const):
(WTF::TrailingArray::at):
(WTF::TrailingArray::at const):
(WTF::TrailingArray::operator[]):
(WTF::TrailingArray::operator[] const):
(WTF::TrailingArray::first):
(WTF::TrailingArray::first const):
(WTF::TrailingArray::last):
(WTF::TrailingArray::last const):
(WTF::TrailingArray::fill):
(WTF::TrailingArray::offsetOfSize):
(WTF::TrailingArray::offsetOfData):

Tools:

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/EmbeddedFixedVector.cpp: Added.

(TestWebKitAPI::TEST):
(TestWebKitAPI::DestructorObserver::DestructorObserver):
(TestWebKitAPI::DestructorObserver::~DestructorObserver):
(TestWebKitAPI::DestructorObserver::operator=):

  • TestWebKitAPI/Tests/WTF/FixedVector.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WTF/RefCountedFixedVector.cpp: Added.

(TestWebKitAPI::TEST):
(TestWebKitAPI::DestructorObserver::DestructorObserver):
(TestWebKitAPI::DestructorObserver::~DestructorObserver):
(TestWebKitAPI::DestructorObserver::operator=):

Dec 17, 2021:

9:45 PM Changeset in webkit [287219] by Wenson Hsieh
  • 4 edits in trunk/Source/WebCore

Hide viewport-constrained elements that are detected by ModalContainerObserver
https://bugs.webkit.org/show_bug.cgi?id=234216

Reviewed by Tim Horton.

Make a small Style::Adjuster tweak to hide (i.e. set display: none;) on an element that is tagged as the
current "modal container" on ModalContainerObserver. See #234214 for more details.

  • page/ModalContainerObserver.cpp:

(WebCore::ModalContainerObserver::updateModalContainerIfNeeded):

Additionally invalidate style when setting m_container here, so that the style adjuster can kick in and set
display: none; on a modal container after it is detected.

(WebCore::ModalContainerObserver::shouldHide):

  • page/ModalContainerObserver.h:
  • style/StyleAdjuster.cpp:

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

7:35 PM Changeset in webkit [287218] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Use IRC by default on arm64
https://bugs.webkit.org/show_bug.cgi?id=234449

Reviewed by Yusuke Suzuki.

I'm seeing a Wasm perf improvement on some benchmarks of ~12% by switching
from Briggs to IRC. Let's make IRC the default on arm64.

  • b3/air/AirAllocateRegistersByGraphColoring.cpp:
  • b3/air/AirAllocateRegistersByGraphColoring.h:

(JSC::B3::Air::useIRC): Deleted.

7:06 PM Changeset in webkit [287217] by Wenson Hsieh
  • 10 edits
    2 adds in trunk/Source

Add support for detecting modal containers that contain a given search term
https://bugs.webkit.org/show_bug.cgi?id=234214

Reviewed by Tim Horton and Devin Rousso.

Source/WebCore:

Introduce ModalContainerObserver (a helper class that searches for a substring vended by the client layer in
text inside viewport-constrained renderers). If found, we keep track of the viewport-constrained container with
the matching text for use in future patches.

There is no change in behavior yet.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.cpp:

(WebCore::Document::modalContainerObserver):

Returns the document's ModalContainerObserver, creating it only if needed (per the modal container observation
policy vended by the client).

(WebCore::Document::modalContainerObserverIfExists const):

  • dom/Document.h:
  • page/ChromeClient.h:

(WebCore::ChromeClient::searchStringForModalContainerObserver const):

  • page/FrameView.cpp:

(WebCore::FrameView::performPostLayoutTasks):

Add a hook to create and call into ModalContainerObserver to search for a modal container (if necessary).

  • page/ModalContainerObserver.cpp: Added.

(WebCore::ModalContainerObserver::isNeededFor):

Add a helper method to determine whether this "modal container observer" should be created and used for the
current document.

(WebCore::matchesSearchTerm):
(WebCore::ModalContainerObserver::updateModalContainerIfNeeded):

Iterates through all viewport-constrained render objects in the FrameView, in search of one that matches the
search term given by the client. This currently ensures that we only search any viewport-constrained element at
most once by maintaining a weak m_elementsToIgnoreWhenSearching set, but we may need a mechanism in the future
to remove elements from this set upon changing text content.

  • page/ModalContainerObserver.h: Added.

Source/WebKit:

Add a WebKitAdditions hook that implements a new chrome client method. See WebCore/ChangeLog for more details.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::searchStringForModalContainerObserver const):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
6:30 PM Changeset in webkit [287216] by ysuzuki@apple.com
  • 2 edits in trunk/Source/bmalloc

Unreviewed, pas_probabilistic_guard_malloc_allocator.c is broken when LIBPAS is not enabled
https://bugs.webkit.org/show_bug.cgi?id=234415

  • libpas/src/libpas/pas_probabilistic_guard_malloc_allocator.c:
6:09 PM Changeset in webkit [287215] by ysuzuki@apple.com
  • 3 edits in trunk/Source/bmalloc

Unreviewed, CMakeLists is missing pas_probabilistic_guard_malloc_allocator.[ch]
https://bugs.webkit.org/show_bug.cgi?id=234415

  • CMakeLists.txt:
  • libpas/src/libpas/pas_probabilistic_guard_malloc_allocator.c:
5:13 PM Changeset in webkit [287214] by ysuzuki@apple.com
  • 2 edits in trunk/Source/bmalloc

[libpas] Use inline-assembly ARM64 code in GCC too
https://bugs.webkit.org/show_bug.cgi?id=234450

Reviewed by Saam Barati.

Same problem to r287168 can happen in GCC too. Use inline assembly version
of CAS operation on ARM64 in GCC too. We also use ARM_FEATURE_ATOMICS
to determine whether LSE atomics is enabled further (but since this is very
new macro, we continue using the old check too).

  • libpas/src/libpas/pas_utils.h:

(pas_atomic_store_uint8):
(pas_compare_and_swap_uint8_weak):
(pas_compare_and_swap_uint8_strong):
(pas_compare_and_swap_uint16_weak):
(pas_compare_and_swap_uint32_weak):
(pas_compare_and_swap_uint32_strong):
(pas_compare_and_swap_uint64_weak):
(pas_compare_and_swap_uint64_strong):
(pas_compare_and_swap_pair_weak):
(pas_compare_and_swap_pair_strong):
(pas_atomic_store_pair):

4:27 PM Changeset in webkit [287213] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Add comment to r287208.
https://bugs.webkit.org/show_bug.cgi?id=234428

Unreviewed.

No new tests because there is no behavior change.

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::applyCSSVisibilityRules):

3:20 PM Changeset in webkit [287212] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WebKit

Apply patch. rdar://problem/86635432

3:17 PM Changeset in webkit [287211] by Alan Coon
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.4.7

2:48 PM Changeset in webkit [287210] by Adrian Perez de Castro
  • 5 edits in releases/WebKitGTK/webkit-2.34

Merge r282084 - [wpt-improvement] Improve CSP support for window reuse
https://bugs.webkit.org/show_bug.cgi?id=229882
<rdar://78416553>

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Rebaseline a test that now passes.

  • web-platform-tests/content-security-policy/sandbox/window-reuse-sandboxed-expected.txt:

Source/WebCore:

If window.open is used to host content with a CSP sandbox header, we should always
create a new window, rather than reusing the existing one, unless the header
includes 'allow-same-site'.

This improves our WPT score.

Tested by: imported/w3c/web-platform-tests/content-security-policy/sandbox/window-reuse-sandboxed.html

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::responseReceived): Parse the HTTP headers earlier so we can
make decisions based on their state.

  • loader/DocumentWriter.cpp:

(WebCore::DocumentWriter::begin): Don't reuse the current window if 'allow-same-site'
is not allowed.

2:48 PM Changeset in webkit [287209] by Adrian Perez de Castro
  • 8 edits in releases/WebKitGTK/webkit-2.34

Merge r281941 - [COOP] html/cross-origin-opener-policy/coop-navigate-same-origin-csp-sandbox.html WPT test is failing
https://bugs.webkit.org/show_bug.cgi?id=229716

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

  • web-platform-tests/html/cross-origin-opener-policy/coop-navigate-same-origin-csp-sandbox-expected.txt:

Source/WebCore:

The COOP algorithm is relying on the response origin for some of the checks. We were computing the
response origin via SecurityOrigin::create(response.url()), which worked fine in most cases.
However, the response may contain a CSP header, which could set sandbox flags. If sandbox flags
are set, the response origin should be unique, not the origin of the response URL. This patch fixes
that.

No new tests, rebaselined existing WPT test.

  • loader/DocumentLoader.cpp:

(WebCore::computeResponseOriginAndCOOP):
(WebCore::DocumentLoader::doCrossOriginOpenerHandlingOfResponse):

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::contentSecurityPolicy const):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::didBeginDocument):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::copyStateFrom):
(WebCore::ContentSecurityPolicy::didReceiveHeaders):

  • page/csp/ContentSecurityPolicy.h:

(WebCore::ContentSecurityPolicy::sandboxFlags const):

2:41 PM Changeset in webkit [287208] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebCore

Refactor WidthIterator::applyCSSVisibilityRules() to be a little more elegant
https://bugs.webkit.org/show_bug.cgi?id=234428

Reviewed by Alan Bujtas.

This adds a few lambda operations in this function:

  • adjustForSyntheticBold()
  • clobberGlyph()
  • clobberAdvance()
  • deleteGlyph()

And then updates the rest of the function to use those operations. I think this makes
the body of the function a little easier to understand, because the code uses a higher
level of abstraction. It shoudln't be any slower, though, because the lambdas can all
be inlined to the same code that was there before.

No new tests because there is no behavior change.

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::applyCSSVisibilityRules):
(WebCore::WidthIterator::adjustForSyntheticBold): Deleted.

  • platform/graphics/WidthIterator.h:
2:25 PM Changeset in webkit [287207] by sihui_liu@apple.com
  • 7 edits in trunk/Source

Add custom copy() method for Ref<T> to CrossThreadCopier
https://bugs.webkit.org/show_bug.cgi?id=234411

Reviewed by Youenn Fablet.

Source/WebCore:

  • Modules/filesystemaccess/FileSystemStorageConnection.h:
  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp:

(WebCore::WorkerFileSystemStorageConnection::getFileHandle):
(WebCore::WorkerFileSystemStorageConnection::getDirectoryHandle):
(WebCore::WorkerFileSystemStorageConnection::getHandle):
(WebCore::WorkerFileSystemStorageConnection::didGetHandleWithType): Deleted.

  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.h:

Source/WTF:

  • wtf/CrossThreadCopier.cpp:
  • wtf/CrossThreadCopier.h:
2:09 PM Changeset in webkit [287206] by mmaxfield@apple.com
  • 5 edits
    2 adds in trunk/Source/WebCore

Deduplicate code in RenderText::computePreferredLogicalWidths()
https://bugs.webkit.org/show_bug.cgi?id=234424

Reviewed by Alan Bujtas.

We have 3 places with code of this form:

float result;
std::optional<float> wordTrailingSpaceWidth;
if (currentCharacterIsSpace)

wordTrailingSpaceWidth = wordTrailingSpace.width(fallbackFonts);

if (wordTrailingSpaceWidth)

result = measureText(startingCharacterIndex, length + 1) - wordTrailingSpaceWidth.value();

else

result = measureText(startingCharacterIndex, length);

This patch simply deduplicates this logic, and puts it into a single function:
RenderText::measureTextConsideringPossibleTrailingSpace(). Because the different places which call it
use different text measurement functions, this function accepts a "measure text" callback.

No new tests because there is no behavior change.

  • WebCore.xcodeproj/project.pbxproj:
  • rendering/RenderText.cpp:

(WebCore::RenderText::widthFromCacheConsideringPossibleTrailingSpace const):
(WebCore::RenderText::maxWordFragmentWidth):
(WebCore::RenderText::computePreferredLogicalWidths):

  • rendering/RenderText.h:
  • rendering/RenderTextInlines.h: Added. This function needs to be able to see into WordTrailingSpace,

but we shouldn't be adding any more #includes to RenderText.h because doing so will increase the build time.
So, instead, we can move this templated function to a new Inlines header, and have callers include that
header.
(WebCore::RenderText::measureTextConsideringPossibleTrailingSpace):

  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::textWidthConsideringPossibleTrailingSpace):
(WebCore::BreakingContext::computeAdditionalBetweenWordsWidth):
(WebCore::WordTrailingSpace::WordTrailingSpace): Deleted.
(WebCore::WordTrailingSpace::width): Deleted.

  • rendering/line/WordTrailingSpace.h: Added. BreakingContext.h defines WordTrailingSpace, but it needs

to be able to call measureTextConsideringPossibleTrailingSpace(), which needs to be able to see inside
WordTrailingSpace. Avoid the circular dependency by splitting out WordTrailingSpace into its own file.
(WebCore::WordTrailingSpace::WordTrailingSpace):
(WebCore::WordTrailingSpace::width):

1:51 PM Changeset in webkit [287205] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Use the inline box's direction to decide if start/end decorations should be applied on first/last box
https://bugs.webkit.org/show_bug.cgi?id=234423

Reviewed by Antti Koivisto.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):

1:39 PM Changeset in webkit [287204] by Fujii Hironori
  • 3 edits in trunk/Source/ThirdParty/ANGLE

[ANGLE] "WARN: driver_utils.cpp:169 (rx::GetVendorString):! Unimplemented: rx::GetVendorString" on WinCairo debug testing bot
https://bugs.webkit.org/show_bug.cgi?id=234371

Reviewed by Kenneth Russell.

After r286603 updated ANGLE, WinCairo debug testing bot was
observing annoying warning message for all WebGL tessts.

WARN: driver_utils.cpp:169 (rx::GetVendorString): ! Unimplemented: rx::GetVendorString(..\..\Source\ThirdParty\ANGLE\src\libANGLE\renderer\driver_utils.cpp:169)

The vendor ID was 0x1414 (Microsoft).
<https://pcisig.com/membership/member-companies>

  • src/libANGLE/renderer/driver_utils.cpp:

(rx::GetVendorString): Added more vendor strings for vendor IDs.

  • src/libANGLE/renderer/driver_utils.h: Added VENDOR_ID_MICROSOFT.
1:05 PM Changeset in webkit [287203] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Support WasmAddress in B3 CSE
https://bugs.webkit.org/show_bug.cgi?id=234051
<rdar://problem/86552957>

Reviewed by Filip Pizlo and Yusuke Suzuki.

This patch adds support in B3's CSE phase to handle WasmAddressValue computations.
The reason this can't partake in pure CSE is that WasmAddressValue reads pinned.
To support this, we keep track of which blocks write pinned. If we're trying to
replace a value V2 with V1 because it appears there is a redundancy, we check if
any paths from V1 to V2 write pinned. If none do, we proceed with the replacement.

  • b3/B3EliminateCommonSubexpressions.cpp:
12:55 PM Changeset in webkit [287202] by ysuzuki@apple.com
  • 2 edits in trunk/Tools

[JSC] Fix runscript's standalone ability to run
https://bugs.webkit.org/show_bug.cgi?id=234166

Reviewed by Mark Lam.

r286109 broke the ability to run runscript as a standalone script to test JSC stress test package on the device.
This patch reverts the ability back.

  • Scripts/jsc-stress-test-helpers/shell-runner.sh:
12:08 PM Changeset in webkit [287201] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

Rebaseline after r287199.

Unreviewed.

  • platform/ios/fast/borders/rtl-border-05-expected.txt:
11:53 AM Changeset in webkit [287200] by Fujii Hironori
  • 2 edits in trunk/Source/WTF

MSVC reports "wtf/RetainPtr.h(196): error C3861: 'CFAutorelease': identifier not found " with /permissive- on Windows
https://bugs.webkit.org/show_bug.cgi?id=202842

Reviewed by Alex Christensen and Darin Adler.

MSVC /std:c++20 option implicitly enables /permissive- option.
However, RetainPtr.h can't compile because 'CFAutorelease' is not
defined.

CFAutorelease isn't available in AppleWin's CoreFoundation and
WinCairo's OpenCFLite as of now.

  • wtf/RetainPtr.h: Enclosed RetainPtr<T>::autorelease with #if !OS(WINDOWS).
11:44 AM Changeset in webkit [287199] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Adjust the box geometry for atomic/generic inline level boxes in bidi content
https://bugs.webkit.org/show_bug.cgi?id=234419

Reviewed by Antti Koivisto.

Both the display box and the BoxGeometry need to be updated while adjusting the content position with
the inline box offsets.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):

11:29 AM Changeset in webkit [287198] by commit-queue@webkit.org
  • 17 edits
    3 deletes in trunk

Remove API::Object::Type::BundlePageGroup
https://bugs.webkit.org/show_bug.cgi?id=225611

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

Source/WebKit:

Its last use was removed in rdar://77775952 and rdar://78783988

  • Shared/API/APIObject.h:
  • Shared/API/APIPageGroupHandle.cpp: Removed.
  • Shared/API/APIPageGroupHandle.h: Removed.
  • Shared/API/c/cg/WKImageCG.cpp:
  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):

  • Shared/UserData.cpp:

(WebKit::UserData::encode):
(WebKit::UserData::decode):

  • Shared/mac/MediaFormatReader/CoreMediaWrapped.cpp:
  • Sources.txt:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::transformHandlesToObjects):
(WebKit::WebProcessProxy::transformObjectsToHandles):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.mm:

(-[WKWebProcessPlugInPageGroup identifier]): Deleted.
(-[WKWebProcessPlugInPageGroup dealloc]): Deleted.
(-[WKWebProcessPlugInPageGroup _apiObject]): Deleted.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroupInternal.h: Removed.
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(-[WKWebProcessPlugInBrowserContextController pageGroup]): Deleted.

  • WebProcess/WebPage/WebPageGroupProxy.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::transformHandlesToObjects):
(WebKit::WebProcess::transformObjectsToHandles):

Tools:

  • TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp:

(TestWebKitAPI::TEST):

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

[LFC][IFC] Let computeIsFirstIsLastBoxForInlineContent update the IsFirstForLayoutBox on the display boxes
https://bugs.webkit.org/show_bug.cgi?id=234422

Reviewed by Antti Koivisto.

Currently we pre-compute these values and cache them on the display boxes (for later use in adjustVisualGeometryForDisplayBox).

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

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

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.h:
10:55 AM Changeset in webkit [287196] by clopez@igalia.com
  • 4 edits in trunk/LayoutTests

Unskip pointerevents layout tests
https://bugs.webkit.org/show_bug.cgi?id=233498

Unreviewed gardening.

This tests were skipped for all platforms.
Skip only globally the pointerevents/ios ones that seem to fail on
all platforms (even on iOS, at least on the open source builds).
On iOS also the ones imported from WPT fail but those work on
other platforms.

  • TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/win/TestExpectations:
10:11 AM Changeset in webkit [287195] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebCore

Refactor hyphenation logic in RenderText::computePreferredLogicalWidths()
https://bugs.webkit.org/show_bug.cgi?id=234421

Reviewed by Alan Bujtas.

The hyphenation logic in RenderText::computePreferredLogicalWidths() was split across two functions.
If you consider the word "ABC-DEF-GHI" (where the '-' characters are hyphenation opportunities), one
function, maxWordFragmentWidth() was responsible for calculating the width of "ABC-" and "DEF-" but
not "GHI". RenderText::computePreferredLogicalWidths() called that function, and after it returned,
would then calculate the width of "GHI", and compare that to the width returned by
maxWordFragmentWidth(). A much simpler design would be to have one function, maxWordFragmentWidth(),
handle all the hyphenation logic, and do all the calculation necessary to just return a single value
to RenderText::computePreferredLogicalWidths().

No new tests because there is no behavior change.

  • rendering/RenderText.cpp:

(WebCore::RenderText::maxWordFragmentWidth):
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::maxWordFragmentWidth): Deleted.

  • rendering/RenderText.h:
10:02 AM Changeset in webkit [287194] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

null ptr deref in WebCore::findPlaceForCounter
https://bugs.webkit.org/show_bug.cgi?id=234375

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-12-17
Reviewed by Alan Bujtas.

Source/WebCore:

Test: fast/css/counters/findPlaceForCounter-parent-renderer-crash.html

When the current renderer's element is an HTML document and root of the tree, parentOrPseudoHostElement can return a nullptr,
so we need to check for nullptr before trying to access the renderer() of the Element pointer it returns.

  • rendering/RenderCounter.cpp:

(WebCore::findPlaceForCounter):

LayoutTests:

  • fast/css/counters/findPlaceForCounter-parent-renderer-crash-expected.txt: Added.
  • fast/css/counters/findPlaceForCounter-parent-renderer-crash.html: Added.
9:42 AM Changeset in webkit [287193] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Tools/Scripts/run-perf-tests is failing on Speedometer2
https://bugs.webkit.org/show_bug.cgi?id=234426

Patch by Alexey Shvayka <ashvayka@apple.com> on 2021-12-17
Reviewed by Carlos Alberto Lopez Perez.

r282357 added a debug console warning regarding 'dppx' units, which is being emitted
for TodoMVC's stylesheets, thus failing metrics parsing in PerfTest. To fix the execution
of Speedometer2 suite, this particular warning has now been added to the ignore list.

  • Scripts/webkitpy/performance_tests/perftest.py:

(PerfTest):

9:31 AM Changeset in webkit [287192] by fpizlo@apple.com
  • 36 edits
    4 adds in trunk/Source/bmalloc

[libpas] update to b1531141d8d5831b0a37efb70f200f7e2c37ff3d (initial pgm support, refactorings to further distinguish exclusive from shared)
https://bugs.webkit.org/show_bug.cgi?id=234415

Reviewed by Yusuke Suzuki.

This includes two main changes:

  • Initial PGM support thanks to Brandon Stewart.
  • Refactorings to enable more differences in behavior between exclusive pages and shared pages. This is the only useful part of my attempt to add line allocation, which turned out not to be a win.
  • bmalloc.xcodeproj/project.pbxproj:
  • libpas/.gitignore:
  • libpas/libpas.xcodeproj/project.pbxproj:
  • libpas/src/libpas/jit_heap_config.c:

(jit_small_bitfit_create_page_header):
(jit_medium_bitfit_create_page_header):

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

(pas_bitfit_allocator_commit_view):

  • libpas/src/libpas/pas_bitfit_page.c:

(pas_bitfit_page_construct):
(pas_bitfit_page_verify):

  • libpas/src/libpas/pas_bitfit_page.h:

(pas_bitfit_page_offset_to_first_object):
(pas_bitfit_page_offset_to_end_of_last_object):

  • libpas/src/libpas/pas_bitfit_page_config.h:

(pas_bitfit_page_config_object_payload_end_offset_from_boundary):

  • libpas/src/libpas/pas_compact_tagged_void_ptr.h: Added.
  • libpas/src/libpas/pas_enumerate_segregated_heaps.c:

(enumerate_exclusive_view):
(enumerate_shared_view):
(enumerate_partial_view):

  • libpas/src/libpas/pas_heap_config_utils.h:
  • libpas/src/libpas/pas_local_allocator_inlines.h:

(pas_local_allocator_set_up_free_bits):

  • libpas/src/libpas/pas_page_base.c:

(pas_page_base_header_size):

  • libpas/src/libpas/pas_page_base.h:
  • libpas/src/libpas/pas_page_base_config.h:

(pas_page_base_config_is_bitfit):
(pas_page_base_config_object_payload_end_offset_from_boundary): Deleted.

  • libpas/src/libpas/pas_page_base_config_utils.h:
  • libpas/src/libpas/pas_page_base_config_utils_inlines.h:
  • libpas/src/libpas/pas_probabilistic_guard_malloc_allocator.c: Added.

(pas_probabilistic_guard_malloc_allocate):
(pas_probabilistic_guard_malloc_deallocate):
(pas_probabilistic_guard_malloc_trigger):
(pas_probabilistic_guard_malloc_can_use):
(pas_probabilistic_guard_malloc_should_use):
(pas_probabilistic_guard_malloc_get_free_virtual_memory):
(pas_probabilistic_guard_malloc_get_free_wasted_memory):

  • libpas/src/libpas/pas_probabilistic_guard_malloc_allocator.h: Added.
  • libpas/src/libpas/pas_segregated_exclusive_view.c:

(compute_summary_impl):

  • libpas/src/libpas/pas_segregated_heap.c:

(compute_ideal_object_size):
(pas_segregated_heap_ensure_size_directory_for_size):

  • libpas/src/libpas/pas_segregated_page.c:

(pas_segregated_page_construct):
(pas_segregated_page_verify_granules):
(pas_segregated_page_verify_num_non_empty_words): Deleted.

  • libpas/src/libpas/pas_segregated_page.h:

(pas_segregated_page_header_size):
(pas_segregated_page_offset_from_page_boundary_to_first_object_for_hugging_mode):
(pas_segregated_page_offset_from_page_boundary_to_end_of_last_object_for_hugging_mode):
(pas_segregated_page_useful_object_payload_size_for_hugging_mode):
(pas_segregated_page_best_hugging_mode):
(pas_segregated_page_offset_from_page_boundary_to_first_object_exclusive):
(pas_segregated_page_offset_from_page_boundary_to_end_of_last_object_exclusive):
(pas_segregated_page_useful_object_payload_size):
(pas_segregated_page_number_of_objects):
(pas_segregated_page_bytes_dirtied_per_object):

  • libpas/src/libpas/pas_segregated_page_config.c:

(pas_segregated_page_config_validate):

  • libpas/src/libpas/pas_segregated_page_config.h:

(pas_segregated_page_config_payload_offset_for_role):
(pas_segregated_page_config_payload_size_for_role):
(pas_segregated_page_config_payload_end_offset_for_role):
(pas_segregated_page_config_object_payload_end_offset_from_boundary): Deleted.

  • libpas/src/libpas/pas_segregated_page_config_utils.h:
  • libpas/src/libpas/pas_segregated_page_inlines.h:

(pas_segregated_page_initialize_full_use_counts):
(pas_segregated_page_offset_from_page_boundary_to_first_object): Deleted.

  • libpas/src/libpas/pas_segregated_shared_view.c:

(pas_segregated_shared_view_commit_page):
(compute_summary):

  • libpas/src/libpas/pas_segregated_shared_view.h:

(pas_segregated_shared_view_can_bump):
(pas_segregated_shared_view_compute_new_bump):

  • libpas/src/libpas/pas_segregated_size_directory.c:

(pas_segregated_size_directory_enable_exclusive_views):

  • libpas/src/libpas/pas_segregated_view.c:

(for_each_live_object):
(should_be_eligible):

  • libpas/src/libpas/pas_segregated_view_allocator_inlines.h:

(pas_segregated_view_will_start_allocating):

  • libpas/src/libpas/pas_status_reporter.c:

(report_segregated_directory_contents):

  • libpas/src/libpas/pas_utility_heap_config.h:

(pas_utility_heap_create_page_header):

  • libpas/src/test/IsoHeapChaosTests.cpp:

(std::addTheTests):

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

(std::testPGMSingleAlloc):
(std::testPGMMultipleAlloc):
(std::testPGMErrors):
(addPGMTests):

  • libpas/src/test/TestHarness.cpp:

(main):

  • libpas/src/test/ThingyAndUtilityHeapAllocationTests.cpp:

(std::testFreeListRefillSpans):
(std::testSpuriousEligibility):

9:25 AM Changeset in webkit [287191] by Chris Dumez
  • 5 edits in trunk/Source/WebKit

Move storage managers from the NetworkProcess to the NetworkSession class
https://bugs.webkit.org/show_bug.cgi?id=234409

Reviewed by Alex Christensen.

Move storage managers from the NetworkProcess to the NetworkSession class since they are
per session.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::lowMemoryHandler):
(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::destroySession):
(WebKit::NetworkProcess::hasLocalStorage):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData):
(WebKit::NetworkProcess::prepareToSuspend):
(WebKit::NetworkProcess::resume):
(WebKit::NetworkProcess::syncLocalStorage):
(WebKit::NetworkProcess::clearStorage):
(WebKit::NetworkProcess::renameOriginInWebsiteData):
(WebKit::NetworkProcess::connectionToWebProcessClosed):
(WebKit::NetworkProcess::addStorageManagerForSession): Deleted.
(WebKit::NetworkProcess::removeStorageManagerForSession): Deleted.

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

(WebKit::NetworkSession::invalidateAndCancel):
(WebKit::NetworkSession::lowMemoryHandler):
(WebKit::NetworkSession::addStorageManagerSession):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::storageManager):

9:13 AM Changeset in webkit [287190] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Fix deprecation warning in Tools/Scripts/run-jsc-benchmarks
https://bugs.webkit.org/show_bug.cgi?id=234425

Patch by Alexey Shvayka <ashvayka@apple.com> on 2021-12-17
Reviewed by Alex Christensen.

Ruby 2.4 unified Fixnum and Bignum classes into Integer [1], deprecating them as
implementation details. To get rid of the deprecation console message, this patch replaces
Fixnum type checks with Integer, which is unobservable and backwards-compatible.

[1] https://bugs.ruby-lang.org/issues/12005

  • Scripts/run-jsc-benchmarks:
8:03 AM Changeset in webkit [287189] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Line spanning inline items should use InlineItem::opaqueBidiLevel
https://bugs.webkit.org/show_bug.cgi?id=234417

Reviewed by Antti Koivisto.

The visual order of the non-empty inline boxes are driven by their content and not by
their guessed bidi levels.

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::initialize):

8:02 AM Changeset in webkit [287188] by Jonathan Bedard
  • 5 edits in trunk/Tools

[reporelaypy] Accept pull-request hooks
https://bugs.webkit.org/show_bug.cgi?id=234406
<rdar://problem/86598451>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/init.py: Bump version.
  • Tools/Scripts/libraries/reporelaypy/reporelaypy/hooks.py:

(HookProcessor):
(HookProcessor.is_valid): Check 'pull_request' hook format.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/hooks_unittest.py:

(HooksUnittest.test_pull_request):

  • Tools/Scripts/libraries/reporelaypy/setup.py: Bump version.

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

8:01 AM Changeset in webkit [287187] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Inline boxes set direction for both their content and their decoration unlike other inline level elements
https://bugs.webkit.org/show_bug.cgi?id=234418

Reviewed by Antti Koivisto.

<div>

<span dir=rtl style="border-inline-start: 10px solid yellow;">

<span dir=ltr style="border-inline-start: 10px solid green;">

<img style="border-inline-start: 10px solid blue;">

</span>

</span

</div>

produces a "green/blue/yellow" pattern in visual order.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::updateLayoutBoxDimensions):
(WebCore::LayoutIntegration::LineLayout::updateInlineBoxDimensions):

7:51 AM Changeset in webkit [287186] by graouts@webkit.org
  • 8 edits in trunk/Source/WebCore

ActiveDOMObject::suspendIfNeeded() should not be called within constructors
https://bugs.webkit.org/show_bug.cgi?id=233945

Reviewed by Chris Dumez.

Step 4 where we convert the only remaining call to suspendIfNeeded() in a constructor, AudioScheduledSourceNode,
to be in create() methods, in this case AudioScheduledSourceNode subclasses. This was the final step, all 145
calls to ActiveDOMObject::suspendIfNeeded() have been audited to not be made within a constructor.

  • Modules/webaudio/AudioBufferSourceNode.cpp:

(WebCore::AudioBufferSourceNode::create):

  • Modules/webaudio/AudioBufferSourceNode.h:
  • Modules/webaudio/AudioScheduledSourceNode.cpp:

(WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):

  • Modules/webaudio/AudioScheduledSourceNode.h:
  • Modules/webaudio/ConstantSourceNode.cpp:

(WebCore::ConstantSourceNode::create):

  • Modules/webaudio/OscillatorNode.cpp:

(WebCore::OscillatorNode::create):

  • Modules/webaudio/OscillatorNode.h:
7:41 AM Changeset in webkit [287185] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r286850.

Put r282794 back in. It turns out it was an overall
progression after all

Reverted changeset:

"Unreviewed, reverting r282794."
https://bugs.webkit.org/show_bug.cgi?id=230517
https://commits.webkit.org/r286850

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

[LFC][IFC] Simple RTL content may need visual reordering
https://bugs.webkit.org/show_bug.cgi?id=234380

Reviewed by Darin Adler and Antti Koivisto.

Addressing post-commit comment (r287142).

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):

6:22 AM Changeset in webkit [287183] by Adrian Perez de Castro
  • 7 edits in releases/WebKitGTK/webkit-2.34/Source

Merge r283444 - Remove JSC hack after r283410
https://bugs.webkit.org/show_bug.cgi?id=230261

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • runtime/JSObject.cpp:

(JSC::JSObject::getOwnPropertyDescriptor):

  • runtime/PropertySlot.h:

Source/WebCore:

We revert a hack for accessors in JSC since this is not necessary.

  • bindings/scripts/CodeGeneratorJS.pm:

(GetJSCAttributesForAttribute):

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

(WebCore::JSTestObjDOMConstructor::construct):
(WebCore::jsTestObj_searchGetter):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):
(WebCore::setJSTestObj_searchSetter):
(WebCore::JSC_DEFINE_CUSTOM_SETTER):

  • bindings/scripts/test/TestObj.idl:
6:20 AM Changeset in webkit [287182] by Adrian Perez de Castro
  • 17 edits in releases/WebKitGTK/webkit-2.34

Merge r283410 - Disable new incumbent-window until it is fully implemented
https://bugs.webkit.org/show_bug.cgi?id=230261
<rdar://problem/83099726>

Reviewed by Chris Dumez and Geoffrey Garen.

LayoutTests/imported/w3c:

  • web-platform-tests/html/webappapis/scripting/events/compile-event-handler-settings-objects-expected.txt:
  • web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-incumbent-expected.txt:

Source/JavaScriptCore:

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::globalObjectOfClosestCodeBlock):

  • runtime/JSObject.cpp:

(JSC::JSObject::getOwnPropertyDescriptor):

  • runtime/PropertySlot.h:

Source/WebCore:

This patch disables new incumbent-window until it is fully implemented to avoid compatibility issue.

  • bindings/js/JSDOMConvertCallbacks.h:

(WebCore::Converter<IDLCallbackFunction<T>>::convert):
(WebCore::Converter<IDLCallbackInterface<T>>::convert):

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::callerGlobalObject):
(WebCore::legacyActiveGlobalObjectForAccessor):

  • bindings/js/JSDOMGlobalObject.h:
  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::incumbentDOMWindow):
(WebCore::legacyActiveDOMWindowForAccessor):

  • bindings/js/JSDOMWindowBase.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GetJSCAttributesForAttribute):
(GenerateCallWith):

  • page/Location.idl:

LayoutTests:

  • http/tests/security/frameNavigation/context-for-location-href-gopd-expected.txt:
5:55 AM Changeset in webkit [287181] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[RISCV64] Implement linking and patching support in RISCV64Assembler
https://bugs.webkit.org/show_bug.cgi?id=234398

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-12-17
Reviewed by Yusuke Suzuki.

Populate RISCV64Assembler class with the necessary implementations and
facilities to support linking and patching operations. Implementations
of different methods in MacroAssemblerRISCV64 covering calls, jumps
and patches are also added.

Helper structs are added in the RISCV64Assembler class that cover
linking of jumps, calls or branches and patching of pointer values.
Relevant methods are also implemented to utilize these helpers.

RISCV64Assembler also gains helper methods that generate placeholders
for the specific type of linking or patching. The passed-in functor is
then invoked, enabling the user (MacroAssemblerRISCV64 implementation)
to additionally generate the desired instruction sequence that utilizes
the given placeholder.

In MacroAssemblerRISCV64, different noop methods covering jumps, calls,
linking and patching are replaced with the appropriate implementations.

  • assembler/MacroAssemblerRISCV64.h:

(JSC::MacroAssemblerRISCV64::readCallTarget):
(JSC::MacroAssemblerRISCV64::replaceWithJump):
(JSC::MacroAssemblerRISCV64::startOfBranchPtrWithPatchOnRegister):
(JSC::MacroAssemblerRISCV64::revertJumpReplacementToBranchPtrWithPatch):
(JSC::MacroAssemblerRISCV64::linkCall):
(JSC::MacroAssemblerRISCV64::repatchCall):
(JSC::MacroAssemblerRISCV64::jump):
(JSC::MacroAssemblerRISCV64::farJump):
(JSC::MacroAssemblerRISCV64::nearCall):
(JSC::MacroAssemblerRISCV64::nearTailCall):
(JSC::MacroAssemblerRISCV64::threadSafePatchableNearCall):
(JSC::MacroAssemblerRISCV64::ret):
(JSC::MacroAssemblerRISCV64::call):
(JSC::MacroAssemblerRISCV64::callOperation):
(JSC::MacroAssemblerRISCV64::startOfPatchableBranchPtrWithPatchOnAddress): Deleted.
(JSC::MacroAssemblerRISCV64::startOfPatchableBranch32WithPatchOnAddress): Deleted.
(JSC::MacroAssemblerRISCV64::revertJumpReplacementToPatchableBranchPtrWithPatch): Deleted.
(JSC::MacroAssemblerRISCV64::revertJumpReplacementToPatchableBranch32WithPatch): Deleted.

  • assembler/RISCV64Assembler.h:

(JSC::RISCV64Instructions::ImmediateBase::immediateMask):
(JSC::RISCV64Instructions::ImmediateBase::v):
(JSC::RISCV64Instructions::ImmediateDecomposition::ImmediateDecomposition):
(JSC::RISCV64Assembler::getDifferenceBetweenLabels):
(JSC::RISCV64Assembler::getCallReturnOffset):
(JSC::RISCV64Assembler::labelIgnoringWatchpoints):
(JSC::RISCV64Assembler::labelForWatchpoint):
(JSC::RISCV64Assembler::label):
(JSC::RISCV64Assembler::linkJump):
(JSC::RISCV64Assembler::linkCall):
(JSC::RISCV64Assembler::linkPointer):
(JSC::RISCV64Assembler::maxJumpReplacementSize):
(JSC::RISCV64Assembler::patchableJumpSize):
(JSC::RISCV64Assembler::repatchPointer):
(JSC::RISCV64Assembler::relinkJump):
(JSC::RISCV64Assembler::relinkJumpToNop):
(JSC::RISCV64Assembler::relinkCall):
(JSC::RISCV64Assembler::replaceWithJump):
(JSC::RISCV64Assembler::revertJumpReplacementToPatch):
(JSC::RISCV64Assembler::readCallTarget):
(JSC::RISCV64Assembler::cacheFlush):
(JSC::RISCV64Assembler::fillNops):
(JSC::RISCV64Assembler::jumpPlaceholder):
(JSC::RISCV64Assembler::branchPlaceholder):
(JSC::RISCV64Assembler::pointerCallPlaceholder):
(JSC::RISCV64Assembler::nearCallPlaceholder):
(JSC::RISCV64Assembler::LinkJumpOrCallImpl::apply):
(JSC::RISCV64Assembler::LinkJumpImpl::placeholderInsn):
(JSC::RISCV64Assembler::LinkJumpImpl::generatePlaceholder):
(JSC::RISCV64Assembler::LinkCallImpl::placeholderInsn):
(JSC::RISCV64Assembler::LinkCallImpl::generatePlaceholder):
(JSC::RISCV64Assembler::LinkBranchImpl::placeholderInsn):
(JSC::RISCV64Assembler::LinkBranchImpl::generatePlaceholder):
(JSC::RISCV64Assembler::LinkBranchImpl::apply):
(JSC::RISCV64Assembler::PatchPointerImpl::placeholderInsn):
(JSC::RISCV64Assembler::PatchPointerImpl::generatePlaceholder):
(JSC::RISCV64Assembler::PatchPointerImpl::apply):
(JSC::RISCV64Assembler::PatchPointerImpl::read):

5:10 AM WebKitGTK/2.34.x edited by Philippe Normand
(diff)
4:47 AM Changeset in webkit [287180] by commit-queue@webkit.org
  • 11 edits in trunk

[GStreamer][WebRTC] Huge memory leak
https://bugs.webkit.org/show_bug.cgi?id=234134

Patch by Philippe Normand <pnormand@igalia.com> on 2021-12-17
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

The main issue was RealtimeOutgoingVideoSourceLibWebRTC leaking GstSamples. Fixing this lead
me to further clean-ups in the GstSample<->LibWebRTCVideoFrame handling. Native frames
should not consume GstSamples, but reference them, otherwise there are crashes where the
dangling GstSamples would be passed to the libwebrtc video decoder...

Also the video decoders were not reporting their initialization status correctly,
WEBRTC_VIDEO_CODEC_OK is 0 hence false...

  • platform/graphics/gstreamer/MediaSampleGStreamer.cpp:

(WebCore::MediaSampleGStreamer::MediaSampleGStreamer):
(WebCore::MediaSampleGStreamer::initializeFromBuffer):

  • platform/graphics/gstreamer/MediaSampleGStreamer.h:

(WebCore::MediaSampleGStreamer::createWrappedSample):

  • platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp:

(WebCore::GStreamerVideoDecoder::pullSample):

  • platform/mediastream/libwebrtc/gstreamer/GStreamerVideoEncoderFactory.cpp:
  • platform/mediastream/libwebrtc/gstreamer/GStreamerVideoFrameLibWebRTC.cpp:

(WebCore::convertLibWebRTCVideoFrameToGStreamerSample):
(WebCore::convertGStreamerSampleToLibWebRTCVideoFrame):
(WebCore::GStreamerVideoFrameLibWebRTC::create):
(WebCore::GStreamerSampleFromLibWebRTCVideoFrame): Deleted.
(WebCore::LibWebRTCVideoFrameFromGStreamerSample): Deleted.

  • platform/mediastream/libwebrtc/gstreamer/GStreamerVideoFrameLibWebRTC.h:

(WebCore::GStreamerVideoFrameLibWebRTC::GStreamerVideoFrameLibWebRTC):
(WebCore::GStreamerVideoFrameLibWebRTC::getSample const):
(WebCore::GStreamerVideoFrameLibWebRTC::takeSample): Deleted.

  • platform/mediastream/libwebrtc/gstreamer/RealtimeIncomingVideoSourceLibWebRTC.cpp:

(WebCore::RealtimeIncomingVideoSourceLibWebRTC::OnFrame):

  • platform/mediastream/libwebrtc/gstreamer/RealtimeOutgoingVideoSourceLibWebRTC.cpp:

(WebCore::RealtimeOutgoingVideoSourceLibWebRTC::videoSampleAvailable):

LayoutTests:

  • platform/glib/TestExpectations: Update test expectations, #233740 was mostly due to video

decoder initialization wrongly reported as failed.
webrtc/captureCanvas-webrtc-software-h264-baseline.html no longer times out.

4:41 AM Changeset in webkit [287179] by commit-queue@webkit.org
  • 2 edits
    1 copy
    3 moves
    1 add in trunk/PerformanceTests

[css-contain][Performance test] Add test contain-paint-text-nowrap.html
https://bugs.webkit.org/show_bug.cgi?id=234001

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

Add test contain-paint-text-nowrap.html to verify that paint containment
improves the case where many contained children have inline text that is
wider than the container width. The improvement is because paint
containment clips the child content.

This patch also introduces the Containment directory to separate the
containment tests.

  • Containment/contain-paint-nowrap.html:
  • Containment/css-contain-change-size.html: Renamed from PerformanceTests/Layout/css-contain-change-size.html.
  • Containment/css-contain-layout-size-inside-complex-document.html: Renamed from PerformanceTests/Layout/css-contain-layout-size-inside-complex-document.html.
  • Containment/large-grid.html: Renamed from PerformanceTests/Layout/large-grid.html.
  • Paint/lots-of-self-painting-layers.html: use let instead of var
3:59 AM Changeset in webkit [287178] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty/ANGLE

REGRESSION (r287068): [macOS arm64] TestWebKitAPI.GraphicsContextGLCocoaTest.UnrecycledDisplayBuffersNoLeaks is failing
https://bugs.webkit.org/show_bug.cgi?id=234356
<rdar://problem/86533892>

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

Avoid leaking MTLTexture instances for render targets. Leak would happen through
temporary render pass descriptor that would ref the render target texture.
The descriptor was created without autoreleasepool in call stack.
Also fixes the error string leaks.

UnrecycledDisplayBuffersNoLeaks would report leaks of iosurface-backed
GraphicsContextGL default framebuffer bound textures if glClear was called.

  • src/libANGLE/renderer/metal/ContextMtl.mm:

(rx::ContextMtl::getRenderPassCommandEncoder):

3:58 AM Changeset in webkit [287177] by graouts@webkit.org
  • 34 edits in trunk/Source/WebCore

ActiveDOMObject::suspendIfNeeded() should not be called within constructors
https://bugs.webkit.org/show_bug.cgi?id=233945

Reviewed by Darin Adler.

Step 3 where we convert almost all remaining calls to suspendIfNeeded() in constructors to be in create() methods.
This required adding such a method to ServiceWorkerContainer. The final call left is in the AudioScheduledSourceNode
constructor, but an earlier version of this patch failed a lot of webaudio tests on EWS so I suspect my attempted fix
was wrong.

  • Modules/entriesapi/FileSystemDirectoryEntry.cpp:

(WebCore::FileSystemDirectoryEntry::create):

  • Modules/entriesapi/FileSystemDirectoryEntry.h:
  • Modules/entriesapi/FileSystemEntry.cpp:

(WebCore::FileSystemEntry::FileSystemEntry):

  • Modules/entriesapi/FileSystemEntry.h:
  • Modules/entriesapi/FileSystemFileEntry.cpp:

(WebCore::FileSystemFileEntry::create):

  • Modules/entriesapi/FileSystemFileEntry.h:
  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::FetchBodyOwner):

  • Modules/fetch/FetchBodyOwner.h:
  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::create):
(WebCore::FetchRequest::clone):

  • Modules/fetch/FetchRequest.h:
  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::create):
(WebCore::FetchResponse::error):
(WebCore::FetchResponse::redirect):
(WebCore::FetchResponse::fetch):

  • Modules/filesystemaccess/FileSystemDirectoryHandle.cpp:

(WebCore::FileSystemDirectoryHandle::create):

  • Modules/filesystemaccess/FileSystemFileHandle.cpp:

(WebCore::FileSystemFileHandle::create):

  • Modules/filesystemaccess/FileSystemHandle.cpp:

(WebCore::FileSystemHandle::FileSystemHandle):

  • Modules/filesystemaccess/FileSystemHandle.h:
  • Modules/mediasource/SourceBufferList.cpp:

(WebCore::SourceBufferList::create):
(WebCore::SourceBufferList::SourceBufferList):

  • Modules/mediasource/SourceBufferList.h:
  • Modules/mediastream/MediaDevices.cpp:

(WebCore::MediaDevices::MediaDevices):
(WebCore::MediaDevices::create):

  • Modules/mediastream/RTCDTMFSender.cpp:

(WebCore::RTCDTMFSender::create):
(WebCore::RTCDTMFSender::RTCDTMFSender):

  • Modules/mediastream/RTCDTMFSender.h:
  • Modules/mediastream/RTCDtlsTransport.cpp:

(WebCore::RTCDtlsTransport::create):
(WebCore::RTCDtlsTransport::RTCDtlsTransport):

  • Modules/mediastream/RTCDtlsTransport.h:
  • Modules/mediastream/RTCIceTransport.cpp:

(WebCore::RTCIceTransport::create):
(WebCore::RTCIceTransport::RTCIceTransport):

  • Modules/mediastream/RTCIceTransport.h:

(WebCore::RTCIceTransport::create): Deleted.

  • Modules/mediastream/RTCRtpSFrameTransform.cpp:

(WebCore::RTCRtpSFrameTransform::create):
(WebCore::RTCRtpSFrameTransform::RTCRtpSFrameTransform):

  • Modules/mediastream/RTCRtpSFrameTransform.h:

(WebCore::RTCRtpSFrameTransform::create): Deleted.

  • Modules/mediastream/RTCSctpTransport.cpp:

(WebCore::RTCSctpTransport::create):
(WebCore::RTCSctpTransport::RTCSctpTransport):

  • Modules/mediastream/RTCSctpTransport.h:
  • Modules/paymentrequest/PaymentResponse.cpp:

(WebCore::PaymentResponse::finishConstruction):

  • Modules/webdatabase/DatabaseContext.cpp:

(WebCore::DatabaseContext::DatabaseContext):

  • Modules/webdatabase/DatabaseManager.cpp:

(WebCore::DatabaseManager::databaseContext):

  • html/ImageBitmap.cpp:
  • page/NavigatorBase.cpp:

(WebCore::NavigatorBase::serviceWorker):

  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::create):
(WebCore::ServiceWorkerContainer::ServiceWorkerContainer):

  • workers/service/ServiceWorkerContainer.h:
2:11 AM Changeset in webkit [287176] by Adrian Perez de Castro
  • 15 edits
    2 adds in releases/WebKitGTK/webkit-2.34/Source

Merge r286676 - [GStreamer] Fill in client-name property on audio sinks
https://bugs.webkit.org/show_bug.cgi?id=233826

Patch by Philippe Normand <pnormand@igalia.com> on 2021-12-08
Reviewed by Xabier Rodriguez-Calvar.

The audio sink client-name property is now set on sinks that support this property, such as
pulsesink and pipewiresink. This is picked-up by GNOME settings and the corresponding audio
streams now appear as owned by the WebKit application (MiniBrowser, ephy, etc) instead of
"WebKitWebProcess".

When the audio mixer is enabled, no media.role property is set, because the mixer can accept
music and/or video roles simultaneously, so it doesn't make sense in this context.

  • platform/audio/gstreamer/AudioDestinationGStreamer.cpp:

(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer): Drive-by refactoring, using
a lambda instead of a static callback function.
(WebCore::autoAudioSinkChildAddedCallback): Deleted.

  • platform/graphics/gstreamer/GStreamerAudioMixer.cpp:

(WebCore::GStreamerAudioMixer::GStreamerAudioMixer):

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::createAutoAudioSink):
(WebCore::createPlatformAudioSink):

  • platform/graphics/gstreamer/GStreamerCommon.h:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamPropertiesCallback): Deleted.
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties): Deleted.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1:21 AM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
1:01 AM Changeset in webkit [287175] by ysuzuki@apple.com
  • 2 edits in trunk/Source/bmalloc

[libpas] Enable libpas on ARM64 Darwin platforms (ARM64E is already enabled)
https://bugs.webkit.org/show_bug.cgi?id=234416

Reviewed by Filip Pizlo.

r287168 fixed libpas compare_and_swap on ARM64 so that we pass all libpas tests on ARM64 platforms.
Speedometer2 and JetStream2 are neutral, PLUM3 is 10.79% better, and RAMification is 2.83% better.

  • bmalloc/BPlatform.h:

Dec 16, 2021:

11:21 PM Changeset in webkit [287174] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Adjust syscall filter
https://bugs.webkit.org/show_bug.cgi?id=234401

Reviewed by Tim Horton.

Adjust syscall filter in the WebContent process' sandbox on macOS. A syscall that was previously
believed to only be used on Intel, is being used on all architectures.

  • WebProcess/com.apple.WebProcess.sb.in:
10:01 PM Changeset in webkit [287173] by clopez@igalia.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(r287138) [GLIB] Build failure with GCC 8 and 9 in std::array to Span conversion
https://bugs.webkit.org/show_bug.cgi?id=234412

Reviewed by Darin Adler.

GCC < 10 and Clang < 7 have problems doing the conversion of the value if its marked const.

No new tests, is a build fix.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::inheritsPresentationalRole const):

9:54 PM Changeset in webkit [287172] by Alan Coon
  • 1 copy in tags/Safari-612.4.6

Tag Safari-612.4.6.

9:47 PM Changeset in webkit [287171] by Alan Coon
  • 1 edit in branches/safari-612-branch/Source/WebCore/platform/ios/LegacyTileCache.mm

Unreviewed build fix. rdar://86613209

9:36 PM Changeset in webkit [287170] by Alan Coon
  • 1 edit in branches/safari-612-branch/Source/WebCore/platform/ios/LegacyTileCache.mm

Unreviewed build fix. rdar://86613209

./platform/ios/LegacyTileCache.mm:459:24: error: incomplete result type 'WebCore::Color' in function definition
Color LegacyTileCache::colorForGridTileBorder(LegacyTileGrid* grid) const

9:32 PM Changeset in webkit [287169] by Alan Coon
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.4.6

6:44 PM Changeset in webkit [287168] by ysuzuki@apple.com
  • 2 edits in trunk/Source/bmalloc

[libpas] ARM64 CAS emulation loop needs dmb ish
https://bugs.webkit.org/show_bug.cgi?id=234414

Reviewed by Filip Pizlo.

Just using LL/SC does not guarantee that the ordering of accesses around the loop. For example,

access(A)

0:

LL (ldaxr)
...
SC (stlxr)
cond-branch 0
access(B)

In the above code case, the ordering A -> LL -> SC -> B is not guaranteed and it can be
LL -> A -> B -> SC or LL -> B -> A -> SC: memory access may happen in the middle of RMW atomics.
This breaks pas_versioned_field's assumption where they are ordered as A -> LL -> SC -> B.

https://stackoverflow.com/questions/35217406/partial-reordering-of-c11-atomics-on-aarch64
https://stackoverflow.com/questions/21535058/arm64-ldxr-stxr-vs-ldaxr-stlxr
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-February/229588.html

Another example is that the following can happen if we use CAS loop without barrier.

thread A

*a = 1;
spin_lock(&lock);
*b = 1;

thread B

b_value = atomic_get(&b);
a_value = atomic_get(&a);

assert(a_value
!b_value); can fail

https://github.com/zephyrproject-rtos/zephyr/issues/32133
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697

To guarantee A -> (atomic) -> B ordering, we insert barrier (dmb ish) just after the loop.

access(A)

0:

LL (ldxr)
...
SC (stlxr)
cond-branch 0
dmb ish
access(B)

dmb ish ensures B is done after (atomic) region. And this barrier also ensures that A cannot happen after
For this CAS emulation loop, we do not need to have acquire, so we can use ldxr. (atomic) region.
SC ensures A does not happen after SC. But still, A and LL can be reordered.
If A is storing to the same location X, then it will be detected due to ldxr's exclusiveness.

data = LL(X)
store(X, 42) Reordered here
=> SC will fail.

If A is storing to the different location, then we have no way to observe the difference.

data = LL(X)
store(A, 42) Reordered here. But there is no way to know whether this access happens before or after LL.

  • libpas/src/libpas/pas_utils.h:

(pas_atomic_store_uint8):
(pas_compare_and_swap_uint8_weak):
(pas_compare_and_swap_uint8_strong):
(pas_compare_and_swap_uint16_weak):
(pas_compare_and_swap_uint32_weak):
(pas_compare_and_swap_uint32_strong):
(pas_compare_and_swap_uint64_weak):
(pas_compare_and_swap_uint64_strong):
(pas_compare_and_swap_pair_weak):
(pas_compare_and_swap_pair_strong):
(pas_atomic_load_pair_relaxed):
(pas_atomic_store_pair):
(pas_atomic_load_pair): Deleted.

5:52 PM Changeset in webkit [287167] by Tyler Wilcock
  • 8 edits in trunk/LayoutTests

AX: Make aria-multiline.html, clipped-text-under-element.html, mixed-checkbox.html, and selection-states.html pass in isolated tree mode
https://bugs.webkit.org/show_bug.cgi?id=234382

Reviewed by Chris Fleizach.

  • accessibility/mac/aria-multiline-expected.txt:
  • accessibility/mac/aria-multiline.html:
  • accessibility/mac/clipped-text-under-element.html:
  • accessibility/mac/mixed-checkbox-expected.txt:
  • accessibility/mac/mixed-checkbox.html:
  • accessibility/selection-states-expected.txt:
  • accessibility/selection-states.html:

Make these tests pass in isolated tree mode by using
accessibilityController.accessibleElementById to get JS references to
AX objects instead of document.getElementById() +
accessibilityController.focusedElement.

5:22 PM Changeset in webkit [287166] by Russell Epstein
  • 1 copy in tags/Safari-613.1.12

Tag Safari-613.1.12.

5:09 PM Changeset in webkit [287165] by Russell Epstein
  • 112 edits
    2 adds
    5 deletes in branches/safari-613.1.12-branch/Source

Cherry-pick r286994. rdar://problem/86445989

Roll back r286345, r286387, r286471, r286667, r286849
https://bugs.webkit.org/show_bug.cgi?id=234268

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • 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/DeleteByStatus.cpp: (JSC::DeleteByStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/GetByIdMetadata.h: (JSC::GetByIdModeMetadata::GetByIdModeMetadata): (JSC::GetByIdModeMetadata::clearToDefaultModeWithoutCache):
  • bytecode/GetByStatus.cpp: (JSC::GetByStatus::computeFromLLInt): (JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/InByStatus.cpp: (JSC::InByStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/InlineAccess.cpp: (JSC::InlineAccess::rewireStubAsJumpInAccess): (JSC::InlineAccess::resetStubAsJumpInAccess):
  • bytecode/InstanceOfStatus.cpp: (JSC::InstanceOfStatus::computeForStubInfo):
  • bytecode/InternalFunctionAllocationProfile.h: (JSC::InternalFunctionAllocationProfile::offsetOfStructure): (JSC::InternalFunctionAllocationProfile::structure): (JSC::InternalFunctionAllocationProfile::clear): (JSC::InternalFunctionAllocationProfile::visitAggregate): (JSC::InternalFunctionAllocationProfile::createAllocationStructureFromBase): (JSC::InternalFunctionAllocationProfile::offsetOfStructureID): 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/SetPrivateBrandStatus.cpp: (JSC::SetPrivateBrandStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/SpeculatedType.cpp: (JSC::speculationFromCell):
  • bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::initGetByIdSelf): (JSC::StructureStubInfo::initPutByIdReplace): (JSC::StructureStubInfo::initInByIdSelf): (JSC::StructureStubInfo::deref): (JSC::StructureStubInfo::aboutToDie): (JSC::StructureStubInfo::addAccessCase): (JSC::StructureStubInfo::reset): (JSC::StructureStubInfo::visitAggregateImpl): (JSC::StructureStubInfo::visitWeakReferences): (JSC::StructureStubInfo::propagateTransitions): (JSC::StructureStubInfo::summary const): (JSC::StructureStubInfo::containsPC const):
  • bytecode/StructureStubInfo.h: (JSC::StructureStubInfo::offsetOfByIdSelfOffset): (JSC::StructureStubInfo::offsetOfInlineAccessBaseStructure): (JSC::StructureStubInfo::inlineAccessBaseStructure): (JSC::StructureStubInfo::offsetOfInlineAccessBaseStructureID): 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:
  • heap/Heap.cpp: (JSC::Heap::Heap): (JSC::Heap::runEndPhase):
  • heap/Heap.h: (JSC::Heap::structureIDTable):
  • heap/IsoAlignedMemoryAllocator.cpp: (JSC::IsoAlignedMemoryAllocator::IsoAlignedMemoryAllocator): (JSC::IsoAlignedMemoryAllocator::~IsoAlignedMemoryAllocator): (JSC::IsoAlignedMemoryAllocator::tryAllocateAlignedMemory): (JSC::IsoAlignedMemoryAllocator::freeAlignedMemory): (JSC::IsoAlignedMemoryAllocator::tryMallocBlock): Deleted. (JSC::IsoAlignedMemoryAllocator::freeBlock): Deleted. (JSC::IsoAlignedMemoryAllocator::commitBlock): Deleted. (JSC::IsoAlignedMemoryAllocator::decommitBlock): Deleted.
  • heap/IsoAlignedMemoryAllocator.h:
  • heap/IsoMemoryAllocatorBase.cpp: Removed.
  • heap/IsoMemoryAllocatorBase.h: Removed.
  • heap/IsoSubspace.cpp: (JSC::IsoSubspace::IsoSubspace): (JSC::IsoSubspace::tryAllocateFromLowerTier):
  • heap/IsoSubspace.h:
  • heap/PreciseAllocation.cpp: (JSC::PreciseAllocation::createForLowerTier): (JSC::PreciseAllocation::tryCreateForLowerTier): Deleted.
  • heap/PreciseAllocation.h:
  • heap/SlotVisitor.cpp: (JSC::SlotVisitor::appendJSCellOrAuxiliary):
  • heap/SlotVisitor.h:
  • heap/SlotVisitorInlines.h:
  • heap/StructureAlignedMemoryAllocator.cpp: Removed.
  • heap/StructureAlignedMemoryAllocator.h: Removed.
  • jit/AssemblyHelpers.cpp: (JSC::AssemblyHelpers::emitStoreStructureWithTypeInfo): (JSC::AssemblyHelpers::emitLoadStructure): (JSC::AssemblyHelpers::emitLoadPrototype): (JSC::AssemblyHelpers::emitRandomThunk): (JSC::AssemblyHelpers::emitConvertValueToBoolean): (JSC::AssemblyHelpers::branchIfValue): (JSC::AssemblyHelpers::emitNonNullDecodeStructureID): Deleted.
  • 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: Removed.
  • runtime/StructureIDBlob.h: (JSC::StructureIDBlob::StructureIDBlob):
  • runtime/StructureIDTable.cpp: Added. (JSC::StructureIDTable::StructureIDTable): (JSC::StructureIDTable::makeFreeListFromRange): (JSC::StructureIDTable::resize): (JSC::StructureIDTable::flushOldTables): (JSC::StructureIDTable::allocateID): (JSC::StructureIDTable::deallocateID):
  • runtime/StructureIDTable.h: Added. (JSC::nukedStructureIDBit): (JSC::nuke): (JSC::isNuked): (JSC::decontaminate): (JSC::StructureIDTable::base): (JSC::StructureIDTable::size const): (JSC::StructureIDTable::table const): (JSC::StructureIDTable::decode): (JSC::StructureIDTable::encode): (JSC::StructureIDTable::get): (JSC::StructureIDTable::tryGet): (JSC::StructureIDTable::validate): (JSC::StructureIDTable::deallocateID): (JSC::StructureIDTable::allocateID): (JSC::StructureIDTable::flushOldTables):
  • 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): (JSC::VM::tryGetStructure):
  • runtime/WriteBarrier.h: (JSC::WriteBarrierStructureID::WriteBarrierStructureID): Deleted. (JSC::WriteBarrierStructureID::get const): Deleted. (JSC::WriteBarrierStructureID::operator* const): Deleted. (JSC::WriteBarrierStructureID::operator-> const): Deleted. (JSC::WriteBarrierStructureID::clear): Deleted. (JSC::WriteBarrierStructureID::operator bool const): Deleted. (JSC::WriteBarrierStructureID::operator! const): Deleted. (JSC::WriteBarrierStructureID::setWithoutWriteBarrier): Deleted. (JSC::WriteBarrierStructureID::unvalidatedGet const): Deleted. (JSC::WriteBarrierStructureID::value const): Deleted.
  • runtime/WriteBarrierInlines.h: (JSC::WriteBarrierStructureID::set): Deleted. (JSC::WriteBarrierStructureID::setMayBeNull): Deleted. (JSC::WriteBarrierStructureID::setEarlyValue): Deleted.
  • 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:

  • wtf/OSAllocator.h:
  • wtf/posix/OSAllocatorPOSIX.cpp: (WTF::OSAllocator::reserveUncommittedAligned): Deleted.

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

4:19 PM Changeset in webkit [287164] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKitLegacy/mac

Fix iOS debug build
https://bugs.webkit.org/show_bug.cgi?id=234365

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

4:16 PM Changeset in webkit [287163] by commit-queue@webkit.org
  • 25 edits in trunk/Source

Remove more NPAPI plugin code
https://bugs.webkit.org/show_bug.cgi?id=234379

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-16
Reviewed by Anders Carlsson.

Source/WebCore:

  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::appendFormData): Deleted.

  • html/HTMLObjectElement.h:
  • page/Page.cpp:

(WebCore::Page::setSessionID):

  • plugins/PluginViewBase.h:

(WebCore::PluginViewBase::storageBlockingStateChanged):
(WebCore::PluginViewBase::privateBrowsingStateChanged): Deleted.
(WebCore::PluginViewBase::getFormValue): Deleted.
(WebCore::PluginViewBase::shouldNotAddLayer const): Deleted.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateConfiguration):

Source/WebKit:

  • UIProcess/Cocoa/WebViewImpl.h:

(WebKit::WebViewImpl::pluginComplexTextInputIdentifier const): Deleted.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::doneWithKeyEvent):
(WebKit::WebViewImpl::interpretKeyEvent):
(WebKit::WebViewImpl::inputContext):
(WebKit::WebViewImpl::performKeyEquivalent):
(WebKit::WebViewImpl::keyDown):
(WebKit::WebViewImpl::disableComplexTextInputIfNecessary): Deleted.
(WebKit::WebViewImpl::handlePluginComplexTextInputKeyDown): Deleted.
(WebKit::WebViewImpl::tryHandlePluginComplexTextInputKeyDown): Deleted.
(WebKit::WebViewImpl::pluginFocusOrWindowFocusChanged): Deleted.
(WebKit::WebViewImpl::tryPostProcessPluginComplexTextInputKeyDown): Deleted.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::pluginFocusOrWindowFocusChanged): Deleted.

  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged): Deleted.

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::sendComplexTextInputToPlugin): Deleted.
(WebKit::WebPageProxy::pluginFocusOrWindowFocusChanged): Deleted.

  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/Plugin.h:

(WebKit::Plugin::canCreateTransientPaintingSnapshot const): Deleted.

  • WebProcess/Plugins/PluginController.h:
  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::destroyPluginAndReset):
(WebKit::PluginView::shouldCreateTransientPaintingSnapshot const):
(WebKit::PluginView::sendComplexTextInput): Deleted.
(WebKit::PluginView::privateBrowsingStateChanged): Deleted.
(WebKit::PluginView::getFormValue): Deleted.
(WebKit::PluginView::shouldNotAddLayer const): Deleted.
(WebKit::PluginView::pluginFocusOrWindowFocusChanged): Deleted.

  • WebProcess/Plugins/PluginView.h:
  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::accessibilityPosition const):

  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::sendComplexTextInputToPlugin): Deleted.

4:02 PM Changeset in webkit [287162] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK][WPE] Don't ignore stderr when calling flatpak in update-webkitgtk-libs
https://bugs.webkit.org/show_bug.cgi?id=234407

Reviewed by Michael Catanzaro.

Print stderr when calling flatpak, is useful to debug problems when it fails.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):

3:45 PM Changeset in webkit [287161] by Alan Coon
  • 1 copy in tags/Safari-612.4.5

Tag Safari-612.4.5.

3:30 PM Changeset in webkit [287160] by sbarati@apple.com
  • 23 edits in trunk/Source/JavaScriptCore

Use arm64's fmax/fmin instructions in Wasm
https://bugs.webkit.org/show_bug.cgi?id=234367

Reviewed by Keith Miller.

This patch adds support in B3 for FMax and FMin. We use this for Wasm's f32/64
min/max operations. On arm64, we select the arm64 fmin/fmax instructions
for these B3 opcodes. On x86, we lower these to control flow to calculate the
result inside of lower macros.

This speeds up Wasm programs that make heavy usage of min/max.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::floatMax):
(JSC::MacroAssemblerARM64::floatMin):
(JSC::MacroAssemblerARM64::doubleMax):
(JSC::MacroAssemblerARM64::doubleMin):

  • b3/B3Common.h:

(JSC::B3::fMax):
(JSC::B3::fMin):

  • b3/B3ConstDoubleValue.cpp:

(JSC::B3::ConstDoubleValue::fMinConstant const):
(JSC::B3::ConstDoubleValue::fMaxConstant const):

  • b3/B3ConstDoubleValue.h:
  • b3/B3ConstFloatValue.cpp:

(JSC::B3::ConstFloatValue::fMinConstant const):
(JSC::B3::ConstFloatValue::fMaxConstant const):

  • b3/B3ConstFloatValue.h:
  • b3/B3LowerMacros.cpp:
  • b3/B3LowerToAir.cpp:
  • b3/B3Opcode.cpp:

(WTF::printInternal):

  • b3/B3Opcode.h:
  • b3/B3ReduceStrength.cpp:
  • b3/B3Validate.cpp:
  • b3/B3Value.cpp:

(JSC::B3::Value::fMinConstant const):
(JSC::B3::Value::fMaxConstant const):
(JSC::B3::Value::effects const):
(JSC::B3::Value::key const):
(JSC::B3::Value::typeFor):

  • b3/B3Value.h:
  • b3/B3ValueInlines.h:
  • b3/B3ValueKey.cpp:

(JSC::B3::ValueKey::materialize const):

  • b3/air/AirOpcode.opcodes:
  • b3/testb3.h:
  • b3/testb3_1.cpp:

(run):

  • b3/testb3_7.cpp:

(testFMaxMin):
(testFloatMaxMin):
(testDoubleMaxMin):

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::addFloatingPointMinOrMax):
(JSC::Wasm::AirIRGenerator::addOp<OpType::F32Min>):

  • wasm/wasm.json:
2:37 PM Changeset in webkit [287159] by Chris Dumez
  • 29 edits in trunk/Source

Move WebIDBServers from NetworkProcess to NetworkSession class
https://bugs.webkit.org/show_bug.cgi?id=234366

Reviewed by Darin Adler.

Move WebIDBServers from NetworkProcess to NetworkSession class, since they are per session.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFilesForIndexedDB):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::didClose):
(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::destroySession):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData):
(WebKit::NetworkProcess::suspendIDBServers):
(WebKit::NetworkProcess::resume):
(WebKit::CompletionHandler<void):
(WebKit::NetworkProcess::prefetchDNS): Deleted.
(WebKit::NetworkProcess::cacheStorageRootPath): Deleted.
(WebKit::NetworkProcess::setCacheStorageParameters): Deleted.
(WebKit::NetworkProcess::registerURLSchemeAsSecure const): Deleted.
(WebKit::NetworkProcess::registerURLSchemeAsBypassingContentSecurityPolicy const): Deleted.
(WebKit::NetworkProcess::registerURLSchemeAsLocal const): Deleted.
(WebKit::NetworkProcess::registerURLSchemeAsNoAccess const): Deleted.
(WebKit::NetworkProcess::createWebIDBServer): Deleted.
(WebKit::NetworkProcess::webIDBServer): Deleted.
(WebKit::NetworkProcess::addIndexedDatabaseSession): Deleted.
(WebKit::NetworkProcess::setSessionStorageQuotaManagerIDBRootPath): Deleted.
(WebKit::NetworkProcess::syncLocalStorage): Deleted.
(WebKit::NetworkProcess::resetQuota): Deleted.
(WebKit::NetworkProcess::clearStorage): Deleted.
(WebKit::NetworkProcess::renameOriginInWebsiteData): Deleted.
(WebKit::NetworkProcess::getPendingPushMessages): Deleted.
(WebKit::NetworkProcess::processPushMessage): Deleted.
(WebKit::NetworkProcess::deletePushAndNotificationRegistration): Deleted.
(WebKit::NetworkProcess::getOriginsWithPushAndNotificationPermissions): Deleted.
(WebKit::NetworkProcess::requestStorageSpace): Deleted.
(WebKit::NetworkProcess::storageQuotaManager): Deleted.
(WebKit::NetworkProcess::initializeProcess): Deleted.
(WebKit::NetworkProcess::initializeProcessName): Deleted.
(WebKit::NetworkProcess::initializeSandbox): Deleted.
(WebKit::NetworkProcess::flushCookies): Deleted.
(WebKit::NetworkProcess::platformFlushCookies): Deleted.
(WebKit::NetworkProcess::storePrivateClickMeasurement): Deleted.
(WebKit::NetworkProcess::dumpPrivateClickMeasurement): Deleted.
(WebKit::NetworkProcess::clearPrivateClickMeasurement): Deleted.
(WebKit::NetworkProcess::setPrivateClickMeasurementOverrideTimerForTesting): Deleted.
(WebKit::NetworkProcess::simulateResourceLoadStatisticsSessionRestart): Deleted.
(WebKit::NetworkProcess::markAttributedPrivateClickMeasurementsAsExpiredForTesting): Deleted.
(WebKit::NetworkProcess::setPrivateClickMeasurementEphemeralMeasurementForTesting): Deleted.
(WebKit::NetworkProcess::setPrivateClickMeasurementTokenPublicKeyURLForTesting): Deleted.
(WebKit::NetworkProcess::setPrivateClickMeasurementTokenSignatureURLForTesting): Deleted.
(WebKit::NetworkProcess::setPrivateClickMeasurementAttributionReportURLsForTesting): Deleted.
(WebKit::NetworkProcess::markPrivateClickMeasurementsAsExpiredForTesting): Deleted.
(WebKit::NetworkProcess::setPCMFraudPreventionValuesForTesting): Deleted.
(WebKit::NetworkProcess::setPrivateClickMeasurementAppBundleIDForTesting): Deleted.
(WebKit::NetworkProcess::addKeptAliveLoad): Deleted.
(WebKit::NetworkProcess::removeKeptAliveLoad): Deleted.
(WebKit::NetworkProcess::connectionToWebProcessClosed): Deleted.
(WebKit::NetworkProcess::webProcessConnection const): Deleted.
(WebKit::NetworkProcess::setServiceWorkerFetchTimeoutForTesting): Deleted.
(WebKit::NetworkProcess::resetServiceWorkerFetchTimeoutForTesting): Deleted.
(WebKit::NetworkProcess::randomClosedPortDelay): Deleted.
(WebKit::NetworkProcess::hasAppBoundSession const): Deleted.
(WebKit::NetworkProcess::clearAppBoundSession): Deleted.
(WebKit::NetworkProcess::broadcastConsoleMessage): Deleted.
(WebKit::NetworkProcess::updateBundleIdentifier): Deleted.
(WebKit::NetworkProcess::clearBundleIdentifier): Deleted.
(WebKit::NetworkProcess::shouldDisableCORSForRequestTo const): Deleted.
(WebKit::NetworkProcess::setCORSDisablingPatterns): Deleted.
(WebKit::NetworkProcess::appPrivacyReportTestingData): Deleted.
(WebKit::NetworkProcess::clearAppPrivacyReportTestingData): Deleted.
(WebKit::NetworkProcess::rtcDataChannelProxy): Deleted.
(WebKit::NetworkProcess::addWebPageNetworkParameters): Deleted.
(WebKit::NetworkProcess::removeWebPageNetworkParameters): Deleted.
(WebKit::NetworkProcess::countNonDefaultSessionSets): Deleted.

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::shouldSuspendIDBServers const):

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::invalidateAndCancel):
(WebKit::NetworkSession::ensureWebIDBServer):
(WebKit::NetworkSession::closeIDBServer):
(WebKit::NetworkSession::addIndexedDatabaseSession):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::webIDBServer):
(WebKit::NetworkSession::hasIDBDatabasePath const):

2:18 PM Changeset in webkit [287158] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Add an experimental VideoTrackConfiguration class and accessor on VideoTrack
https://bugs.webkit.org/show_bug.cgi?id=230841
<rdar://problem/83837876>

Reviewed by Eric Carlson.

Follow up patch to address post-review comments.

Darin pointed out that CFStringCompare() is likely more expensive than
CFEqual() as the former determines order as well as equality, and a
safeCFEqual() already exists. And while safeCFEqual() has different
behavior than the safeCFStringEquals() lambda when passed two null values,
in every case where safeCFStringEquals() is used, the first parameter has
already been nil-checked. So safeCFStringEquals() is unnecessary and
safeCFEqual() should be used instead.

  • platform/graphics/avfoundation/FormatDescriptionUtilities.cpp:

(WebCore::colorSpaceFromFormatDescription):

2:02 PM Changeset in webkit [287157] by youenn@apple.com
  • 9 edits
    2 adds in trunk/Source/WebCore

Allow AudioSampleDataSource to increase/decrease buffered data progressively
https://bugs.webkit.org/show_bug.cgi?id=233422

Reviewed by Eric Carlson.

AudioSampleDataSource does the link between push audio sources and pull audio sinks.
As such, it needs to do buffering. If buffering is too small, data may be missing and audio glitches will be heard.
If buffering is too large, latency will be added which might be undesirable, especially if audio is being played with video.
We generally want buffered audio to stay within a certain range.

To make this happen, when buffering is too high, we convert the data with a slightly lower sample rate to push less samples, until we are back to normal buffering.
Conversely, when buffering is too low, we convert the data with a slightly higher sample rate to push more samples, until we are back to normal buffering.
We do this with 3 converters that we select based on amount of buffered data.
This behavior is encapsulated in AudioSampleDataConverter.

We simplify AudioSampleDataSource implementation by always recomputing the sample offset when there is not enough data.
In that case, we wait for 50ms of buffered data, which is the average buffer we expect, to restart pulling data.
All values owned by AudioSampleDataSource (m_expectedNextPushedSampleTimeValue, m_converterInputOffset, m_converterInputOffset, m_outputSampleOffset, m_lastBufferedAmount)
are all in the outgoing timeline/sampleRate.

This adaptation is only enabled when AudioSampleDataSource::pullSamples is called.
For pullAvailableSamplesAsChunks and pullAvailableSampleChunk, the puller is supposed to be in sync with the pusher.
For that reason, we make sure to always write the expected number of audio frames when pullSamples is called, even if converter fails.

We fix a potential busy loop in AudioSampleDataSource::pullAvailableSamplesAsChunks in case endFrame is lower than startFrame, which is computed from timeStamp input parameter.

Update MockAudioSharedUnit to be closer to a real source by increasing the queue priority and schedule rendering tasks from the queue instead of relying on
a main thread timer which can have hiccups.

Manually tested.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/cocoa/AudioSampleDataConverter.h: Added.
  • platform/audio/cocoa/AudioSampleDataConverter.mm: Added.
  • platform/audio/cocoa/AudioSampleDataSource.h:
  • platform/audio/cocoa/AudioSampleDataSource.mm:
  • platform/mediastream/mac/MockAudioSharedUnit.h:
  • platform/mediastream/mac/MockAudioSharedUnit.mm:
2:00 PM Changeset in webkit [287156] by sihui_liu@apple.com
  • 21 edits
    1 copy in trunk/Source

REGRESSION (r286601): storage/filesystemaccess/sync-access-handle-read-write-worker.html and file-system-access/sandboxed_FileSystemSyncAccessHandle-truncate.https.tentative.worker.html are consistently failing
https://bugs.webkit.org/show_bug.cgi?id=234271
<rdar://problem/86434111>

Reviewed by Youenn Fablet.

Source/WebCore:

When context stops, FileSystemHandle sets its state to closed. A closed FileSystemHandle will return early on
operations including closing sync access handle (asking backend to close handle and releasing lock). If backend
thinks existing access handle is not closed, it will prevent new access handle from being created, and this
leads to the test failure.

The problem is that backend isn't notified about the close of a handle: we only set the close state in
FileSystemHandle. To fix the issue, let's make sure FileSystemStorageConnection::closeHandle is called when
context stops and when FileSystemHandle is detroyed.

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

(WebCore::FileSystemDirectoryHandle::getFileHandle):
(WebCore::FileSystemDirectoryHandle::getDirectoryHandle):
(WebCore::FileSystemDirectoryHandle::getHandle):

  • Modules/filesystemaccess/FileSystemFileHandle.cpp:

(WebCore::FileSystemFileHandle::createSyncAccessHandle):
(WebCore::FileSystemFileHandle::closeSyncAccessHandle):
(WebCore::FileSystemFileHandle::close): Deleted.

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

(WebCore::FileSystemHandle::~FileSystemHandle):
(WebCore::FileSystemHandle::close):
(WebCore::FileSystemHandle::stop):

  • Modules/filesystemaccess/FileSystemHandle.h:
  • Modules/filesystemaccess/FileSystemHandleCloseScope.h: Added.

(WebCore::FileSystemHandleCloseScope::create):
(WebCore::FileSystemHandleCloseScope::~FileSystemHandleCloseScope):
(WebCore::FileSystemHandleCloseScope::release):
(WebCore::FileSystemHandleCloseScope::FileSystemHandleCloseScope):

  • Modules/filesystemaccess/FileSystemStorageConnection.h:
  • Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp:

(WebCore::FileSystemSyncAccessHandle::closeBackend):

  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp:

(WebCore::WorkerFileSystemStorageConnection::getFileHandle):
(WebCore::WorkerFileSystemStorageConnection::getDirectoryHandle):
(WebCore::WorkerFileSystemStorageConnection::didGetHandle):
(WebCore::WorkerFileSystemStorageConnection::closeSyncAccessHandle):
(WebCore::WorkerFileSystemStorageConnection::getHandle):
(WebCore::WorkerFileSystemStorageConnection::close): Deleted.

  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.h:
  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

  • NetworkProcess/storage/FileSystemStorageHandle.cpp:

(WebKit::FileSystemStorageHandle::close):
(WebKit::FileSystemStorageHandle::closeSyncAccessHandle):

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

(WebKit::FileSystemStorageManager::closeHandle):

  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::NetworkStorageManager::closeSyncAccessHandle):
(WebKit::NetworkStorageManager::closeAccessHandle): Deleted.

  • NetworkProcess/storage/NetworkStorageManager.h:
  • NetworkProcess/storage/NetworkStorageManager.messages.in:
  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp:

(WebKit::WebFileSystemStorageConnection::getFileHandle):
(WebKit::WebFileSystemStorageConnection::getDirectoryHandle):
(WebKit::WebFileSystemStorageConnection::closeSyncAccessHandle):
(WebKit::WebFileSystemStorageConnection::getHandle):
(WebKit::WebFileSystemStorageConnection::close): Deleted.

  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h:
1:20 PM Changeset in webkit [287155] by Alan Coon
  • 13 edits
    2 adds in branches/safari-612-branch/Source/WebCore

Cherry-pick r287079. rdar://problem/85892959

This reverts r287150.

1:05 PM Changeset in webkit [287154] by caitp@igalia.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] only emit pointer validation for ARM64E
https://bugs.webkit.org/show_bug.cgi?id=234402

Reviewed by Yusuke Suzuki and Mark Lam.

JIT thunks no longer emit push <reg>; pop <reg>; on
non-ARM64E arches with the emitPointerValidation macro.

  • jit/ThunkGenerators.cpp:

(JSC::emitPointerValidation):

1:02 PM Changeset in webkit [287153] by Adrian Perez de Castro
  • 9 edits in trunk/Source

Non-unified build fixes, late-ish December 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=234392

Unreviewed non-unified build fixes.

Source/WebCore:

No new tests needed.

  • Modules/notifications/NotificationData.h: Add missing wtf/text/WTFString.h and <optional>

header inclusions.

  • style/HasSelectorFilter.cpp: Add missing StyleRule.h header inclusion.
  • style/HasSelectorFilter.h: Add missing forward declaration for WebCore::Element.
  • workers/WorkerConsoleClient.h: Add missing JSC:: namespace prefix to usage of

JSC::MessageType.

Source/WebKit:

  • NetworkProcess/NetworkDataTask.cpp: Add missing NetworkProcess.h header inclusion.
  • NetworkProcess/NetworkSession.cpp: Add missing WebCore/SWServer.h heeader inclusion.
  • UIProcess/Notifications/WebNotificationManagerProxy.cpp: Add missing

WebCore/NotificationData.h header inclusion.

12:47 PM Changeset in webkit [287152] by Russell Epstein
  • 1 copy in tags/Safari-613.1.11.8

Tag Safari-613.1.11.8.

12:41 PM Changeset in webkit [287151] by Alan Coon
  • 3 edits in branches/safari-612-branch/Source/WebCore

Apply patch. rdar://problem/86505382

12:40 PM Changeset in webkit [287150] by Alan Coon
  • 13 edits
    2 deletes in branches/safari-612-branch/Source/WebCore

Revert r287079. rdar://problem/85892959

This reverts r287117.

12:29 PM Changeset in webkit [287149] by Russell Epstein
  • 2 edits in branches/safari-613.1.12-branch/Source/WebKit

Cherry-pick r287146. rdar://problem/86550488

[watchOS] Adjust sandbox message filter
https://bugs.webkit.org/show_bug.cgi?id=234385
<rdar://86550488>

Reviewed by Brent Fulgham.

Add required items to sandbox message filter in the WebContent process on watchOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:

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

12:21 PM Changeset in webkit [287148] by Russell Epstein
  • 9 edits in branches/safari-613.1.11-branch/Source

Versioning.

WebKit-7613.1.11.8

11:23 AM Changeset in webkit [287147] by Brent Fulgham
  • 3 edits in trunk/Source/WebCore

Rename forEachFrameFromMainFrame to forEachFrame
https://bugs.webkit.org/show_bug.cgi?id=234396
<rdar://problem/86581926>

Reviewed by Geoffrey Garen.

Follow-up to r287110: Switch method naming to match 'forEachDocument'.

  • page/Page.cpp:

(WebCore::Page::~Page):
(WebCore::Page::notifyToInjectUserScripts):
(WebCore::Page::forEachFrame):
(WebCore::Page::forEachFrameFromMainFrame): Deleted.

  • page/Page.h:
10:57 AM Changeset in webkit [287146] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[watchOS] Adjust sandbox message filter
https://bugs.webkit.org/show_bug.cgi?id=234385
<rdar://86550488>

Reviewed by Brent Fulgham.

Add required items to sandbox message filter in the WebContent process on watchOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
10:35 AM Changeset in webkit [287145] by Russell Epstein
  • 22 edits
    7 adds in branches/safari-613.1.12-branch/Source

Cherry-pick r287137. rdar://problem/86476583

Source/JavaScriptCore:
Create symlinks pointing to alternate root framework locations
https://bugs.webkit.org/show_bug.cgi?id=234374

Reviewed by Filip Pizlo.

Added build variables and build step to create symlinks pointing to the alternate
build locations from the current framework install location.

  • Configurations/JavaScriptCore.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/create-symlink-to-altroot.sh: Added.

Source/ThirdParty/ANGLE:
https://bugs.webkit.org/show_bug.cgi?id=234173
Update Install Paths for build system changes

Reviewed by Filip Pizlo.

Added build variables and build step to create symlinks pointing to the alternate
build locations from the current framework install location.

  • ANGLE.xcodeproj/project.pbxproj:
  • Configurations/ANGLE-dynamic.xcconfig:
  • scripts/create-symlink-to-altroot.sh: Added.

Source/ThirdParty/libwebrtc:
https://bugs.webkit.org/show_bug.cgi?id=234173
Update Install Paths for build system changes

Reviewed by Filip Pizlo.

Added build variables and build step to create symlinks pointing to the alternate
build locations from the current framework install location.

  • Configurations/libwebrtc.xcconfig:

Source/WebCore:
https://bugs.webkit.org/show_bug.cgi?id=234173
Update Install Paths for build system changes

Reviewed by Filip Pizlo.

Added build variables and build step to create symlinks pointing to the alternate
build locations from the current framework install location.

Covered by existing tests.

  • Configurations/WebCore.xcconfig:
  • Scripts/create-symlink-to-altroot.sh: Added.
  • WebCore.xcodeproj/project.pbxproj:

Source/WebGPU:
https://bugs.webkit.org/show_bug.cgi?id=234173
Update Install Paths for build system changes

Reviewed by Filip Pizlo.

Added build variables and build step to create symlinks pointing to the alternate
build locations from the current framework install location.

  • Configurations/WebGPU.xcconfig:
  • Scripts: Added.
  • Scripts/create-symlink-to-altroot.sh: Added.
  • WebGPU.xcodeproj/project.pbxproj:

Source/WebInspectorUI:
https://bugs.webkit.org/show_bug.cgi?id=234173
Update Install Paths for build system changes

Reviewed by Filip Pizlo.

Added build variables and build step to create symlinks pointing to the alternate
build locations from the current framework install location.

  • Configurations/WebInspectorUIFramework.xcconfig:
  • Scripts/create-symlink-to-altroot.sh: Added.
  • WebInspectorUI.xcodeproj/project.pbxproj:

Source/WebKit:
https://bugs.webkit.org/show_bug.cgi?id=234173
Update Install Paths for build system changes

Reviewed by Filip Pizlo.

Added build variables and build step to create symlinks pointing to the alternate
build locations from the current framework install location.

  • Configurations/BaseXPCService.xcconfig:
  • Configurations/adattributiond.xcconfig:
  • Configurations/webpushd.xcconfig:
  • Scripts/create-symlink-to-altroot.sh: Added.
  • WebKit.xcodeproj/project.pbxproj:

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

10:14 AM Changeset in webkit [287144] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[GPUP] Create WebGL context with task id token
https://bugs.webkit.org/show_bug.cgi?id=234138

Patch by John Cunningham <johncunningham@apple.com> on 2021-12-16
Reviewed by Kimmo Kinnunen.

No new tests.

Use EGL_ANGLE_metal_create_context_ownership_identity to create
a WebGL context when GPUP and WebGL in GPUP is enabled.

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

(WebCore::GraphicsContextGLCocoa::GraphicsContextGLCocoa):
(WebCore::GraphicsContextGLANGLE::GraphicsContextGLANGLE):

9:51 AM Changeset in webkit [287143] by commit-queue@webkit.org
  • 4 edits in trunk/Source/ThirdParty/ANGLE

Add support to attribute ownership of ANGLE Metal's resources
https://bugs.webkit.org/show_bug.cgi?id=233941

Patch by John Cunningham <johncunningham@apple.com> on 2021-12-16
Reviewed by Kimmo Kinnunen.

Add SPI to mtl_resource_spi.h to attribute memory to another task.

  • Configurations/ANGLE-dynamic.xcconfig:
  • Configurations/ANGLE-static.xcconfig:
  • src/libANGLE/renderer/metal/mtl_resource_spi.h:

(rx::mtl::setOwnerWithIdentity):

9:36 AM Changeset in webkit [287142] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Simple RTL content may need visual reordering
https://bugs.webkit.org/show_bug.cgi?id=234380

Reviewed by Antti Koivisto.

It turns out that certain unicode categories (e.g. punctuation) could require reordering even when
the content is "simple" (8bit).

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):

9:17 AM Changeset in webkit [287141] by achristensen@apple.com
  • 8 edits in trunk

Unreviewed, reverting r287056.
<rdar://86519800>

Caused performance regression...again

Reverted changeset:

"Remove properties set by NSURLProtocol on NSURLRequest before
serializing"
https://bugs.webkit.org/show_bug.cgi?id=232332
https://commits.webkit.org/r287056

9:09 AM Changeset in webkit [287140] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove the declaration for an unimplemented AudioBufferSourceNode::create(BaseAudioContext&, float) method
https://bugs.webkit.org/show_bug.cgi?id=234388

Reviewed by Anders Carlsson.

  • Modules/webaudio/AudioBufferSourceNode.h:
8:59 AM Changeset in webkit [287139] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

Clear AXObjectCache::m_notificationsToPost after moving in notificationPostTimerFired.
https://bugs.webkit.org/show_bug.cgi?id=234355
<rdar://problem/86532703>

Reviewed by Chris Fleizach.

Covered by existing tests.

This memeber variable must be clear after moving its resources to a
local variable, otherwise this may cause undefined behavior.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::notificationPostTimerFired):
(WebCore::AXObjectCache::passwordNotificationPostTimerFired):
Same problem here with m_passwordNotificationsToPost.

8:54 AM Changeset in webkit [287138] by Darin Adler
  • 76 edits in trunk

Many call sites use makeNeverDestroyed, but could instead take advantage of the NeverDestroyed deduction guide
https://bugs.webkit.org/show_bug.cgi?id=234350

Reviewed by Sam Weinig.

Source/WebCore:

  • Modules/encryptedmedia/legacy/LegacyCDM.cpp:

(WebCore::installedCDMFactories): Use NeverDestroyed directly instead of via makeNeverDestroyed.

  • Modules/mediasession/MediaSession.cpp:

(WebCore::platformCommandForMediaSessionAction): Use SortedArrayMap, obviating the need for
any use of NeverDestroyed.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::inheritsPresentationalRole const): Use Span instead of
Vector, allowing us to use constexpr arrays rather than allocating memory for a Vector.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]): Use deduction.

  • dom/make_names.pl:

(printFactoryCppFile): Ditto.
(printWrapperFactoryCppFile): Ditto.

  • editing/EditingStyle.cpp:

(WebCore::htmlElementEquivalents): Return a Span instead of a Vector&,
allowing us to use const arrays rather than allocating memory for a Vector.
(WebCore::htmlAttributeEquivalents): Ditto.

  • editing/FormatBlockCommand.cpp:

(WebCore::isElementForFormatBlock): Use deduction.

  • editing/RemoveFormatCommand.cpp:

(WebCore::isElementForRemoveFormatCommand): Ditto.

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::isProhibitedParagraphChild): Use deduction, also change the tags array
to be a constexpr array so we don't have to use read/write memory for it.

  • editing/cocoa/HTMLConverter.mm:

(WebDefaultFont): Use deduction.
(defaultParagraphStyle): Ditto.

  • html/Autofill.cpp:

(WebCore::fieldNameMap): Ditto.

  • html/HTMLDocument.cpp:

(WebCore::HTMLDocument::isCaseSensitiveAttribute): Use deduction, also change
the names array to be a constexpr array so we don't have to use read/write memory for it.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::eventNameForEventHandlerAttribute): Use std::array deduction
so we don't have to write out the LazyNeverDestroyed type here.

  • html/HTMLObjectElement.cpp:

(WebCore::preventsParentObjectFromExposure): Use deduction.

  • html/InputType.cpp:

(WebCore::InputType::create): Ditto.

  • loader/ContentFilter.cpp:

(WebCore::blockedPageURL): Ditto.

  • page/DebugPageOverlays.cpp:

(WebCore::touchEventRegionColors): Ditto.

  • page/PerformanceUserTiming.cpp:

(WebCore::restrictedMarkNamesToNavigationTimingFunctionMap): Ditto.

  • platform/LegacySchemeRegistry.cpp:

(WebCore::add): Use Span instead of Vector, allowing us to use constexpr arrays
rather thna allocating memory for a Vector.
(WebCore::makeNeverDestroyedSchemeSet): Ditto.
(WebCore::allBuiltinSchemes): Ditto. Also use deduction.
(WebCore::builtinLocalURLSchemes): Ditto.
(WebCore::builtinSecureSchemes): Ditto.
(WebCore::builtinSchemesWithUniqueOrigins): Ditto.
(WebCore::builtinEmptyDocumentSchemes): Ditto.
(WebCore::builtinCanDisplayOnlyIfCanRequestSchemes): Ditto.
(WebCore::builtinCORSEnabledSchemes): Ditto.

  • platform/MIMETypeRegistry.cpp:

(WebCore::MIMETypeRegistry::supportedNonImageMIMETypes): Use deduction.
(WebCore::MIMETypeRegistry::supportedMediaMIMETypes): Ditto.

  • platform/cocoa/AGXCompilerService.cpp:

(WebCore::agxCompilerServices): Use Span instead of a Vector&, allowing us
to use a constexpr array rather than allocating memory for a vector.
(WebCore::agxCompilerClasses): Ditto.

  • platform/cocoa/AGXCompilerService.h: Ditto.
  • platform/cocoa/MIMETypeRegistryCocoa.mm:

(WebCore::extensionsForMIMETypeMap): Use deduction.

  • platform/cocoa/RemoteCommandListenerCocoa.mm:

(WebCore::mediaRemoteCommandForPlatformCommand): Use SortedArrayMap, ovbviating the
need for any use of NeverDestroyed.

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

(WebCore::VideoFullscreenModelVideoElement::observedEventNames): Return a Span
instead of a Vector&, allowing us to use an array rather than allocating
memory for a Vector.

  • platform/encryptedmedia/CDMProxy.cpp:

(WebCore::CDMProxyFactory::registeredFactories): Use deduction.

  • platform/graphics/FontCascade.cpp:

(WebCore::useBackslashAsYenSignForFamily): Use deduction.
(WebCore::FontCascade::hasValidAverageCharWidth const): Ditto.

  • platform/graphics/ImageDecoder.cpp:

(WebCore::installedFactories): Use NeverDestroyed directly, not makeNeverDestroyed.

  • platform/graphics/IntSize.h: Added constexpr so many operations can be done

at compile time as needed; mainly this was so we can make a constexpr array of
these sizes. This same enhancement can be applied to other types, but just did
it here for now. Also fixed return values for min/maxDimension that were accidentally
returning float, hurting performance because of the round trip int to float,
also not cleanly round tripping very large and small values.

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList): Use deduction.

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

(WebCore::AVFWrapper::checkPlayability): Ditto.

  • platform/graphics/cg/ImageSourceCGWin.cpp:

(WebCore::preferredExtensionForImageType): Ditto.

  • platform/graphics/cg/UTIRegistry.cpp:

(WebCore::defaultSupportedImageTypes): Ditto.

  • platform/graphics/cocoa/FontDescriptionCocoa.cpp:

(WebCore::matchSystemFontUse): Ditto.

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::SourceBufferParserWebM::webmMIMETypes): Ditto.
(WebCore::SourceBufferParserWebM::supportedVideoCodecs): Ditto.
(WebCore::SourceBufferParserWebM::supportedAudioCodecs): Ditto.

  • platform/ios/DragImageIOS.mm:

(WebCore::createDragImageForLink): Ditto.

  • platform/mac/WebNSAttributedStringExtras.mm:

(WebCore::attributedStringByStrippingAttachmentCharacters): Ditto.

  • platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:

(WebCore::factories): Ditto.

  • platform/mediastream/RealtimeVideoCaptureSource.cpp:

(WebCore::RealtimeVideoCaptureSource::standardVideoSizes): Return a Span
instead of a Vector& so we can use a constexpr array and don't need to
allocate memory or use read/write storage.

  • platform/mediastream/RealtimeVideoCaptureSource.h: Ditto. Also make

this a static member function.

  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::devices): Use deduction.
(WebCore::deviceMap): Ditto.
(WebCore::MockRealtimeMediaSourceCenter::microphoneDevices): Ditto.
(WebCore::MockRealtimeMediaSourceCenter::speakerDevices): Ditto.
(WebCore::MockRealtimeMediaSourceCenter::videoDevices): Ditto.
(WebCore::MockRealtimeMediaSourceCenter::displayDevices): Ditto.

  • platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:

(WebCore::mimeTypeCache): Ditto.

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::operationQueueForAsyncClients): Ditto.

  • platform/text/mac/TextBoundaries.mm:

(WebCore::tokenizerForString): Ditto.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::cachedSystemFontDescription const): Use
NeverDestroyed directly instead of makeNeverDestroyed.

  • rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::cachedSystemFontDescription const): Ditto.

  • svg/SVGAnimationElement.cpp:

(WebCore::SVGAnimationElement::isSupportedAttribute): Use deduction.

  • svg/SVGElement.cpp:

(WebCore::createAttributeNameToCSSPropertyIDMap): Use a constexpr array
instead of a const one that has to be initialized at runtime.
(WebCore::SVGElement::animatableAttributeForName): Ditto, also use deduction.
(WebCore::SVGElement::cssPropertyIdForSVGAttributeName): Use deduction.

  • svg/animation/SVGSMILElement.cpp:

(WebCore::SVGSMILElement::isSupportedAttribute): Use deduction.

  • xml/XPathFunctions.cpp:

(WebCore::XPath::Function::create): Ditto.

  • xml/XPathParser.cpp:

(WebCore::XPath::parseAxisName): Ditto.

Source/WebKit:

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::expectedTableAndIndexQueries):
Use deduction.

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:

(WebKit::PCM::Database::expectedTableAndIndexQueries): Ditto.

  • Shared/Cocoa/DefaultWebBrowserChecks.mm:

(WebKit::getAppBoundDomainsTesting): Ditto.

  • Shared/Cocoa/SandboxExtensionCocoa.mm:

(WebKit::createHandlesForResources): Make this more generic so it works with
other kinds of collections, not just Vector. Also right-size the Vector this
returns rather than letting it grow organically.
(WebKit::SandboxExtension::createReadOnlyHandlesForFiles): Ditto.
(WebKit::SandboxExtension::createHandleForReadWriteDirectory): Ditto.
(WebKit::SandboxExtension::createHandlesForMachLookup): Ditto. Also update this
function to take a Span or an initializer_list instead of a Vector.
(WebKit::SandboxExtension::createHandlesForIOKitClassExtensions): Ditto.
(WebKit::SandboxExtension::consumePermanently): Ditto.

  • Shared/SandboxExtension.h: Updated for the above. Also corrected some unusual

use of #if to share a single declaration of some functions for both enabled
and disabled SANDBOX_EXTENSIONS.

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::nonBrowserServices): Use deduction.

  • UIProcess/WebPageProxy.cpp: Remove unused MERGE_WHEEL_EVENTS.

(WebKit::attachmentElementServices): Return a Span, allowing us to use a
constexpr obviating the need for memory allocation or read/write memory,
(WebKit::gpuIOKitClasses): Ditto.
(WebKit::gpuMachServices): Ditto.
(WebKit::mediaRelatedMachServices): Ditto.
(WebKit::mediaRelatedIOKitClasses): Ditto.

  • UIProcess/ios/TextCheckerIOS.mm:

(WebKit::mutableState): Use deduction.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView supportedPasteboardTypesForCurrentSelection]): Ditto.

  • UIProcess/mac/TextCheckerMac.mm:

(WebKit::mutableState): Ditto.

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::temporaryPDFDirectoryPath): Ditto.

Source/WebKitLegacy/mac:

  • Misc/WebNSPasteboardExtras.mm:

(writableTypesForImageWithoutArchive): Use deduction.
(writableTypesForImageWithArchive):

  • Misc/WebNSURLExtras.mm:

(-[NSString _webkit_rangeOfURLScheme]): Ditto.

  • WebView/WebDataSource.mm:

(+[WebDataSource _repTypesAllowImageTypeOmission:]): Ditto.

  • WebView/WebFrameView.mm:

(+[WebFrameView _viewTypesAllowImageTypeOmission:]): Ditto.

Source/WTF:

  • wtf/NeverDestroyed.h:

(WTF::makeNeverDestroyed): Deleted.

  • wtf/text/cf/StringImplCF.cpp:

(WTF::StringWrapperCFAllocator::allocator): Use deduction guide.

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(fontAllowList): Use deduction.

  • TestWebKitAPI/Tests/WTF/NeverDestroyed.cpp:

(TestWebKitAPI::TEST): Remove tests of makeNeverDestroyed.
(TestWebKitAPI::list): Use deduction.

8:48 AM Changeset in webkit [287137] by msaboff@apple.com
  • 22 edits
    7 adds in trunk/Source

Source/JavaScriptCore:
Create symlinks pointing to alternate root framework locations
https://bugs.webkit.org/show_bug.cgi?id=234374

Reviewed by Filip Pizlo.

Added build variables and build step to create symlinks pointing to the alternate
build locations from the current framework install location.

  • Configurations/JavaScriptCore.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/create-symlink-to-altroot.sh: Added.

Source/ThirdParty/ANGLE:
https://bugs.webkit.org/show_bug.cgi?id=234173
Update Install Paths for build system changes

Reviewed by Filip Pizlo.

Added build variables and build step to create symlinks pointing to the alternate
build locations from the current framework install location.

  • ANGLE.xcodeproj/project.pbxproj:
  • Configurations/ANGLE-dynamic.xcconfig:
  • scripts/create-symlink-to-altroot.sh: Added.

Source/ThirdParty/libwebrtc:
https://bugs.webkit.org/show_bug.cgi?id=234173
Update Install Paths for build system changes

Reviewed by Filip Pizlo.

Added build variables and build step to create symlinks pointing to the alternate
build locations from the current framework install location.

  • Configurations/libwebrtc.xcconfig:

Source/WebCore:
https://bugs.webkit.org/show_bug.cgi?id=234173
Update Install Paths for build system changes

Reviewed by Filip Pizlo.

Added build variables and build step to create symlinks pointing to the alternate
build locations from the current framework install location.

Covered by existing tests.

  • Configurations/WebCore.xcconfig:
  • Scripts/create-symlink-to-altroot.sh: Added.
  • WebCore.xcodeproj/project.pbxproj:

Source/WebGPU:
https://bugs.webkit.org/show_bug.cgi?id=234173
Update Install Paths for build system changes

Reviewed by Filip Pizlo.

Added build variables and build step to create symlinks pointing to the alternate
build locations from the current framework install location.

  • Configurations/WebGPU.xcconfig:
  • Scripts: Added.
  • Scripts/create-symlink-to-altroot.sh: Added.
  • WebGPU.xcodeproj/project.pbxproj:

Source/WebInspectorUI:
https://bugs.webkit.org/show_bug.cgi?id=234173
Update Install Paths for build system changes

Reviewed by Filip Pizlo.

Added build variables and build step to create symlinks pointing to the alternate
build locations from the current framework install location.

  • Configurations/WebInspectorUIFramework.xcconfig:
  • Scripts/create-symlink-to-altroot.sh: Added.
  • WebInspectorUI.xcodeproj/project.pbxproj:

Source/WebKit:
https://bugs.webkit.org/show_bug.cgi?id=234173
Update Install Paths for build system changes

Reviewed by Filip Pizlo.

Added build variables and build step to create symlinks pointing to the alternate
build locations from the current framework install location.

  • Configurations/BaseXPCService.xcconfig:
  • Configurations/adattributiond.xcconfig:
  • Configurations/webpushd.xcconfig:
  • Scripts/create-symlink-to-altroot.sh: Added.
  • WebKit.xcodeproj/project.pbxproj:
8:10 AM Changeset in webkit [287136] by Devin Rousso
  • 12 edits
    2 adds in trunk

Implement Array.prototype.groupBy and Array.prototype.groupByToMap
https://bugs.webkit.org/show_bug.cgi?id=234327

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/array-groupBy.js: Added.

(shouldBe):
(shouldBeObject):
(shouldBeObject.replacer):
(notReached):
(toObject):
(reverseInsertionOrder):

  • stress/array-groupByToMap.js: Added.

(shouldBe):
(shouldBeObject):
(shouldBeObject.replacer):
(shouldBeMap):
(notReached):
(toObject):
(reverseInsertionOrder):

Source/JavaScriptCore:

Implement new Array Grouping proposal <https://tc39.es/proposal-array-grouping/>, which just
reached Stage 3.

Array.prototype.groupBy/Array.prototype.groupByToMap will return a {}/Map where each
value in the array is put into a "bucket" keyed by the return value of the provoded callback.

`js
const array = [1, 2, 3, 4];

array.groupBy(n => n % 2 ? "odd" : "even") { odd: [1, 3], even: [2, 4] }
array.groupByToMap(n => n % 2 ? "odd" : "even")
new Map("odd", [1, 3?, ["even", [2, 4]])
`

  • builtins/ArrayPrototype.js:

(groupBy): Added.
(groupByToMap): Added.

  • runtime/ArrayPrototype.cpp:

(JSC::ArrayPrototype::finishCreation):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::BytecodeIntrinsicNode::emit_intrinsic_toPropertyKey): Added.
Allow @toPropertyKey to be used in builtins to convert a value to a property key. This is
used to avoid converting the return value of the callback given to groupBy more than once.

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

(JSC::JSGlobalObject::init):
Allow @Map to be used in builtins to create a primordial Map instance. This is used to
avoid side effects when creating and populating the Map returned by groupByToMap.

  • runtime/OptionsList.h:

Add useArrayGroupByMethod option.

Source/WebInspectorUI:

  • UserInterface/Models/NativeFunctionParameters.js:
7:49 AM Changeset in webkit [287135] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION(r286849-r286852): [iOS] http/tests/app-privacy-report/user-attribution-post-request.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=234363

Unreviewed test gardening.

  • platform/ios/TestExpectations: Mark test as failing.
7:16 AM Changeset in webkit [287134] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK] Add gtk-wk2 to EWS bubbles
https://bugs.webkit.org/show_bug.cgi?id=209104

Reviewed by Jonathan Bedard.

A new queue was added in 286405 which runs GTK LayoutTests.
This patch adds the queue to the EWS bubbles.

  • CISupport/ews-app/ews/views/statusbubble.py:

(StatusBubble):

7:15 AM Changeset in webkit [287133] by clopez@igalia.com
  • 4 edits in trunk/Tools

[GTK][WPE] Apply optimizations to speed up the layout-test EWS and add a few more workers to the build ones.
https://bugs.webkit.org/show_bug.cgi?id=234378

Reviewed by Jonathan Bedard.

This applies two optimizations to speed up the testing on the layout-tests EWS added in r286405

  1. Pass --fully-parallel to the retry steps. This makes the tool to utilize all the available workers for running

the tests instead of running them in serial. That makes the time needed to complete the retry steps to be considerable less,
In this example https://ews-build.webkit.org/#/builders/35/builds/1757 it reduces the timing from 43 mins to 12 mins.

  1. When the first run fails without giving a list of failures and we have not reached the maximum retry count

we are going to end retring the whole testing anyway, so there is no point in running the tests without patch
in that case, we can skip doing that to save time. See: https://ews-build.webkit.org/#/builders/35/builds/1763

On top of that this patch adds an extra worker to the EWS build queues of GTK and WPE
because I detected that this queues sometimes are not fast enough.

  • CISupport/ews-build/config.json:
  • CISupport/ews-build/steps.py:

(BugzillaMixin.send_email_for_infrastructure_issue):
(RunWebKitTestsRedTree.evaluateCommand):
(RunWebKitTestsRepeatFailuresRedTree.setLayoutTestCommand):
(RunWebKitTestsRepeatFailuresWithoutPatchRedTree.setLayoutTestCommand):

  • CISupport/ews-build/steps_unittest.py:
7:00 AM Changeset in webkit [287132] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Add support for mixed ltr/rtl content
https://bugs.webkit.org/show_bug.cgi?id=234381

Reviewed by Antti Koivisto.

Inline boxes can also introduce RTL direction to their content which may initiate visual reordering
(and thus requires bidi handling).
In this patch hasSeenBidiContent (redundant at this point) is replaced with needsVisualReordering.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::InlineItemsBuilder):
(WebCore::Layout::InlineItemsBuilder::handleTextContent):
(WebCore::Layout::InlineItemsBuilder::handleInlineBoxStart):
(WebCore::Layout::InlineItemsBuilder::handleInlineBoxEnd):

  • layout/formattingContexts/inline/InlineItemsBuilder.h:

(WebCore::Layout::InlineItemsBuilder::needsVisualReordering const):
(WebCore::Layout::InlineItemsBuilder::hasSeenBidiContent const): Deleted.

6:52 AM Changeset in webkit [287131] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

Mark range boundary point containers
https://bugs.webkit.org/show_bug.cgi?id=233462

Patch by Rob Buis <rbuis@igalia.com> on 2021-12-16
Reviewed by Darin Adler.

Source/WebCore:

Mark range boundary point containers as unreachable for gc.

Test: fast/dom/Range/delete-contents-crash.html

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSRangeCustom.cpp: Added.

(WebCore::JSRange::visitAdditionalChildren):

  • dom/Range.cpp:

(WebCore::Range::visitNodesConcurrently const):

  • dom/Range.h:
  • dom/Range.idl:

LayoutTests:

  • fast/dom/Range/delete-contents-crash-expected.txt: Added.
  • fast/dom/Range/delete-contents-crash.html: Added.
6:40 AM Changeset in webkit [287130] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Do not use inlineItemOffsets for checking if an inline item is a "content" type.
https://bugs.webkit.org/show_bug.cgi?id=234383

Reviewed by Antti Koivisto.

This patch removes some leftover logic from when we used the inlineItemOffsets to check for opaque inline items.
Now in this loop we try to figure out if the inline box has content or not by
looking at the nested inline item types.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

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

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):

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

ActiveDOMObject::suspendIfNeeded() should not be called within constructors
https://bugs.webkit.org/show_bug.cgi?id=233945

Reviewed by Darin Adler.

Step 2 where we convert the IDB code to use suspendIfNeeded() only within create() methods. This required
adding such methods and making the constructor private for IDBIndex and IDBObjectStore.

  • Modules/indexeddb/IDBDatabase.cpp:

(WebCore::IDBDatabase::create):
(WebCore::IDBDatabase::IDBDatabase):

  • Modules/indexeddb/IDBDatabaseNameAndVersionRequest.cpp:

(WebCore::IDBDatabaseNameAndVersionRequest::create):
(WebCore::IDBDatabaseNameAndVersionRequest::IDBDatabaseNameAndVersionRequest):

  • Modules/indexeddb/IDBIndex.cpp:

(WebCore::IDBIndex::create):
(WebCore::IDBIndex::IDBIndex):

  • Modules/indexeddb/IDBIndex.h:
  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::create):
(WebCore::IDBObjectStore::IDBObjectStore):
(WebCore::IDBObjectStore::index):

  • Modules/indexeddb/IDBObjectStore.h:
  • Modules/indexeddb/IDBOpenDBRequest.cpp:

(WebCore::IDBOpenDBRequest::createDeleteRequest):
(WebCore::IDBOpenDBRequest::createOpenRequest):

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::create):
(WebCore::IDBRequest::createObjectStoreGet):
(WebCore::IDBRequest::createIndexGet):
(WebCore::IDBRequest::IDBRequest):

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::create):
(WebCore::IDBTransaction::IDBTransaction):
(WebCore::IDBTransaction::objectStore):
(WebCore::IDBTransaction::createObjectStore):
(WebCore::IDBTransaction::createIndex):

3:03 AM Changeset in webkit [287128] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

Flexbox ignores margins of absolute positioned children when align-items: flex-end or justify-content: flex-end
https://bugs.webkit.org/show_bug.cgi?id=234143

Patch by Vitaly Dyachkov <obyknovenius@me.com> on 2021-12-16
Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-flexbox/abspos/flex-abspos-staticpos-margin-003-expected.html: Added.
  • web-platform-tests/css/css-flexbox/abspos/flex-abspos-staticpos-margin-003.html: Added.
  • web-platform-tests/css/css-flexbox/abspos/position-absolute-015-expected.txt: Replaced FAIL

by PASS expectations.

Source/WebCore:

When flexbox layouts its children every absolutely-positioned child is processed separately from regular flex items as it were the sole flex item.
Absolutely-positioned can be both main- and cross-axis aligned. To correctly align it we first must calculate available space for it.
To do that the code was correctly subtracting the size of the item from the size of the container but was not subtracting the margins.
Fixed by including the margins into available size calculation.

Test: imported/w3c/web-platform-tests/css/css-flexbox/abspos/flex-abspos-staticpos-margin-003.html

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::mainAxisMarginExtentForChild const):
(WebCore::RenderFlexibleBox::staticMainAxisPositionForPositionedChild):

LayoutTests:

2:52 AM Changeset in webkit [287127] by jh718.park@samsung.com
  • 2 edits in trunk/LayoutTests/imported/w3c

Unreviewed. Import updated table-child-percentage-height-with-border-box-expected.html

The wpt expected file was fixed accroding to the spec,
https://drafts.csswg.org/css-tables-3/#table-cell-content-relayout.

The corresponding wpt issue is https://github.com/web-platform-tests/wpt/pull/32089.

  • web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box-expected.html:

Dec 15, 2021:

11:08 PM Changeset in webkit [287126] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

Fix for crash in AXIsolatedObject::textMarkerRangeForNSRange.
https://bugs.webkit.org/show_bug.cgi?id=234377
<rdar://problem/86553198>

Reviewed by Chris Fleizach.

Covered by accessibility/mac/textmarker-range-for-range.html.

AXIsolatedObject::textMarkerRangeForNSRange needs to autorelease the
object retrieved from the main thread. This was causing intermittent
crashes when accessing the return value off of the main thread.

  • accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:

(WebCore::AXIsolatedObject::textMarkerRangeForNSRange const):

8:33 PM Changeset in webkit [287125] by beidson@apple.com
  • 5 edits in trunk/Source/WebKit

Some webpushtool improvements.
https://bugs.webkit.org/show_bug.cgi?id=234372

Reviewed by Alex Christensen.

  • Make the list of current connections be reliably ordered
  • If the invocation is solely about injecting a push message, exit afterwards
  • Some other tiny niceties
  • webpushd/WebPushDaemon.mm:

(WebPushD::Daemon::broadcastAllConnectionIdentities):
(WebPushD::Daemon::injectPushMessageForTesting):

  • webpushd/webpushtool/WebPushToolConnection.h:
  • webpushd/webpushtool/WebPushToolConnection.mm:

(WebPushTool::Connection::create):
(WebPushTool::Connection::Connection):
(WebPushTool::Connection::connectToService):
(WebPushTool::Connection::startAction):
(WebPushTool::Connection::sendPushMessage):

  • webpushd/webpushtool/WebPushToolMain.mm:

(main):

7:46 PM Changeset in webkit [287124] by beidson@apple.com
  • 20 edits
    1 copy
    1 add in trunk/Source

Add a "NotificationData" object to encompass local Notification-related parameters, instead of passing tons of them around everywhere.
https://bugs.webkit.org/show_bug.cgi?id=234370

Reviewed by Tim Horton.

Source/WebCore:

No behavior change.

  • Modules/notifications/Notification.cpp:

(WebCore::Notification::dataWithoutNotificationID const):

  • Modules/notifications/Notification.h:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

  • NetworkProcess/Notifications/NetworkNotificationManager.cpp:

(WebKit::NetworkNotificationManager::showNotification):

  • NetworkProcess/Notifications/NetworkNotificationManager.h:
  • Shared/Notifications/NotificationManagerMessageHandler.h:
  • Shared/Notifications/NotificationManagerMessageHandler.messages.in:
  • UIProcess/Notifications/WebNotification.cpp:

(WebKit::WebNotification::WebNotification):

  • UIProcess/Notifications/WebNotification.h:

(WebKit::WebNotification::create):

  • UIProcess/Notifications/WebNotificationManagerMessageHandler.cpp:

(WebKit::WebNotificationManagerMessageHandler::showNotification):

  • UIProcess/Notifications/WebNotificationManagerMessageHandler.h:
  • UIProcess/Notifications/WebNotificationManagerProxy.cpp:

(WebKit::WebNotificationManagerProxy::show):

  • UIProcess/Notifications/WebNotificationManagerProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::showNotification):

  • UIProcess/WebPageProxy.h:
  • WebProcess/Notifications/WebNotificationManager.cpp:

(WebKit::WebNotificationManager::show):

7:33 PM Changeset in webkit [287123] by wilander@apple.com
  • 2 edits in trunk/Tools

TestWebKitAPI.PrivateClickMeasurement.MigrateWithDestinationToken is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=234335
<rdar://problem/86505218>

Unreviewed test gardening.

  • TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:

(cleanUp):

Made the function sleep-wait until the file is indeed deleted.

6:15 PM Changeset in webkit [287122] by ysuzuki@apple.com
  • 31 edits
    4 moves in trunk/Source/JavaScriptCore

Rename Wasm::CodeBlock to Wasm::CalleeGroup
https://bugs.webkit.org/show_bug.cgi?id=203694

Reviewed by Mark Lam.

This is not a CodeBlock. And the name causes confusion with JSC::CodeBlock, which is not at all related.
This patch renames it to Wasm::CalleeGroup.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::finalizeUnconditionalFinalizers):
(JSC::Heap::deleteAllCodeBlocks):

  • heap/Heap.h:

(JSC::Heap::forEachCodeBlockSpace):

  • runtime/VM.cpp:

(JSC::VM::VM):

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

(JSC::Wasm::BBQPlan::BBQPlan):
(JSC::Wasm::BBQPlan::work):

  • wasm/WasmBBQPlan.h:
  • wasm/WasmCalleeGroup.cpp: Renamed from Source/JavaScriptCore/wasm/WasmCodeBlock.cpp.

(JSC::Wasm::CalleeGroup::create):
(JSC::Wasm::CalleeGroup::createFromExisting):
(JSC::Wasm::CalleeGroup::CalleeGroup):
(JSC::Wasm::CalleeGroup::~CalleeGroup):
(JSC::Wasm::CalleeGroup::waitUntilFinished):
(JSC::Wasm::CalleeGroup::compileAsync):
(JSC::Wasm::CalleeGroup::isSafeToRun):
(JSC::Wasm::CalleeGroup::setCompilationFinished):

  • wasm/WasmCalleeGroup.h: Renamed from Source/JavaScriptCore/wasm/WasmCodeBlock.h.
  • wasm/WasmInstance.cpp:

(JSC::Wasm::Instance::initElementSegment):

  • wasm/WasmInstance.h:

(JSC::Wasm::Instance::calleeGroup const):
(JSC::Wasm::Instance::isImportFunction const):
(JSC::Wasm::Instance::codeBlock const): Deleted.

  • wasm/WasmMachineThreads.h:
  • wasm/WasmModule.cpp:

(JSC::Wasm::Module::getOrCreateCalleeGroup):
(JSC::Wasm::Module::compileSync):
(JSC::Wasm::Module::compileAsync):
(JSC::Wasm::Module::copyInitialCalleeGroupToAllMemoryModes):
(JSC::Wasm::Module::getOrCreateCodeBlock): Deleted.
(JSC::Wasm::Module::copyInitialCodeBlockToAllMemoryModes): Deleted.

  • wasm/WasmModule.h:

(JSC::Wasm::Module::calleeGroupFor):
(JSC::Wasm::Module::codeBlockFor): Deleted.

  • wasm/WasmOMGForOSREntryPlan.cpp:

(JSC::Wasm::OMGForOSREntryPlan::OMGForOSREntryPlan):
(JSC::Wasm::OMGForOSREntryPlan::work):

  • wasm/WasmOMGForOSREntryPlan.h:
  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::OMGPlan):
(JSC::Wasm::OMGPlan::work):

  • wasm/WasmOMGPlan.h:
  • wasm/WasmOperations.cpp:

(JSC::Wasm::triggerOMGReplacementCompile):
(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::updateCallSitesToCallUs):

  • wasm/WasmPlan.h:
  • wasm/WasmSlowPaths.cpp:

(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::doWasmCall):

  • wasm/js/JSWebAssembly.cpp:

(JSC::resolve):
(JSC::instantiate):

  • wasm/js/JSWebAssemblyCalleeGroup.cpp: Renamed from Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlock.cpp.

(JSC::JSWebAssemblyCalleeGroup::create):
(JSC::JSWebAssemblyCalleeGroup::JSWebAssemblyCalleeGroup):
(JSC::JSWebAssemblyCalleeGroup::finishCreation):
(JSC::JSWebAssemblyCalleeGroup::destroy):
(JSC::JSWebAssemblyCalleeGroup::clearJSCallICs):
(JSC::JSWebAssemblyCalleeGroup::visitChildrenImpl):
(JSC::JSWebAssemblyCalleeGroup::finalizeUnconditionally):

  • wasm/js/JSWebAssemblyCalleeGroup.h: Renamed from Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlock.h.
  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::visitChildrenImpl):
(JSC::JSWebAssemblyInstance::finalizeCreation):

  • wasm/js/JSWebAssemblyInstance.h:
  • wasm/js/JSWebAssemblyModule.cpp:

(JSC::JSWebAssemblyModule::calleeGroup):
(JSC::JSWebAssemblyModule::setCalleeGroup):
(JSC::JSWebAssemblyModule::visitChildrenImpl):
(JSC::JSWebAssemblyModule::codeBlock): Deleted.
(JSC::JSWebAssemblyModule::setCodeBlock): Deleted.

  • wasm/js/JSWebAssemblyModule.h:
  • wasm/js/WebAssemblyFunction.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::initializeImportsAndExports):

  • wasm/js/WebAssemblyWrapperFunction.h:
5:52 PM Changeset in webkit [287121] by achristensen@apple.com
  • 26 edits
    2 deletes in trunk

Remove unreachable code in Plugin and PluginController
https://bugs.webkit.org/show_bug.cgi?id=234365

Reviewed by Geoff Garen and Anders Carlsson.

Source/WebCore:

  • bindings/js/ScriptController.h:
  • bindings/js/ScriptControllerMac.mm:
  • history/BackForwardCache.cpp:

(WebCore::canCacheFrame):

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setExperimentalPlugInSandboxProfilesEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::experimentalPlugInSandboxProfilesEnabled const): Deleted.

Source/WebKit:

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetPageCacheSupportsPlugins):
(WKPreferencesGetPageCacheSupportsPlugins):
(WKPreferencesSetAsynchronousPluginInitializationEnabled):
(WKPreferencesGetAsynchronousPluginInitializationEnabled):
(WKPreferencesSetAsynchronousPluginInitializationEnabledForAllPlugins):
(WKPreferencesGetAsynchronousPluginInitializationEnabledForAllPlugins):
(WKPreferencesSetArtificialPluginInitializationDelayEnabled):
(WKPreferencesGetArtificialPluginInitializationDelayEnabled):
(WKPreferencesSetPluginSandboxProfilesEnabledForAllPlugins):
(WKPreferencesGetPluginSandboxProfilesEnabledForAllPlugins):

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _setPageCacheSupportsPlugins:]):
(-[WKPreferences _pageCacheSupportsPlugins]):
(-[WKPreferences _setAsynchronousPluginInitializationEnabled:]):
(-[WKPreferences _asynchronousPluginInitializationEnabled]):
(-[WKPreferences _setArtificialPluginInitializationDelayEnabled:]):
(-[WKPreferences _artificialPluginInitializationDelayEnabled]):
(-[WKPreferences _setExperimentalPlugInSandboxProfilesEnabled:]):
(-[WKPreferences _experimentalPlugInSandboxProfilesEnabled]):

  • WebProcess/Plugins/PDF/PDFPlugin.h:

(isType):

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::PDFPlugin):
(WebKit::PDFPlugin::getSelectionForWordAtPoint const): Deleted.

  • WebProcess/Plugins/Plugin.cpp:

(WebKit::Plugin::Plugin): Deleted.

  • WebProcess/Plugins/Plugin.h:

(WebKit::Plugin::type const): Deleted.
(WebKit::Plugin::isPluginProxy const): Deleted.
(WebKit::Plugin::isNetscapePlugin const): Deleted.
(WebKit::Plugin::isPDFPlugin const): Deleted.

  • WebProcess/Plugins/PluginController.h:

(WebKit::PluginController::asynchronousPluginInitializationEnabled const): Deleted.
(WebKit::PluginController::asynchronousPluginInitializationEnabledForAllPlugins const): Deleted.
(WebKit::PluginController::artificialPluginInitializationDelayEnabled const): Deleted.
(WebKit::PluginController::PluginDestructionProtector::PluginDestructionProtector): Deleted.
(WebKit::PluginController::PluginDestructionProtector::~PluginDestructionProtector): Deleted.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::initializePlugin):
(WebKit::PluginView::pluginFocusOrWindowFocusChanged):
(WebKit::PluginView::didFailToInitializePlugin): Deleted.
(WebKit::PluginView::getSelectionForWordAtPoint const): Deleted.
(WebKit::PluginView::invalidate): Deleted.
(WebKit::PluginView::userAgent): Deleted.
(WebKit::PluginView::cancelStreamLoad): Deleted.
(WebKit::PluginView::continueStreamLoad): Deleted.
(WebKit::PluginView::cancelManualStreamLoad): Deleted.
(WebKit::PluginView::setStatusbarText): Deleted.
(WebKit::PluginView::isAcceleratedCompositingEnabled): Deleted.
(WebKit::PluginView::compositingRenderServerPort): Deleted.
(WebKit::PluginView::getAuthenticationInfo): Deleted.
(WebKit::PluginView::isPrivateBrowsingEnabled): Deleted.
(WebKit::PluginView::asynchronousPluginInitializationEnabled const): Deleted.
(WebKit::PluginView::asynchronousPluginInitializationEnabledForAllPlugins const): Deleted.
(WebKit::PluginView::artificialPluginInitializationDelayEnabled const): Deleted.
(WebKit::PluginView::protectPluginFromDestruction): Deleted.
(WebKit::PluginView::unprotectPluginFromDestruction): Deleted.

  • WebProcess/Plugins/PluginView.h:
  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::asynchronousPluginInitializationEnabled const): Deleted.
(WebKit::WebPage::setAsynchronousPluginInitializationEnabled): Deleted.
(WebKit::WebPage::asynchronousPluginInitializationEnabledForAllPlugins const): Deleted.
(WebKit::WebPage::setAsynchronousPluginInitializationEnabledForAllPlugins): Deleted.
(WebKit::WebPage::artificialPluginInitializationDelayEnabled const): Deleted.
(WebKit::WebPage::setArtificialPluginInitializationDelayEnabled): Deleted.

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:
  • Scripts/Preferences/WebPreferencesInternal.yaml:

LayoutTests:

  • fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html:
  • media/crash-closing-page-with-media-as-plugin-fallback.html:
  • plugins/crash-restoring-plugin-page-from-page-cache.html:
  • plugins/frameset-with-plugin-frame.html:
  • plugins/netscape-plugin-page-cache-works.html:
  • plugins/netscape-plugin-page-cache-works-expected.html: Remove test for no-longer-reachable configuration.
5:18 PM Changeset in webkit [287120] by Chris Dumez
  • 4 edits in trunk/Source

Support passing an old-style enum to add(Hasher&, ...)
https://bugs.webkit.org/show_bug.cgi?id=234368

Reviewed by Darin Adler.

Source/WebCore:

Drop static_casts that should no longer be needed now that we can pass
an enum to add(Hasher&, ...).

  • platform/network/ProtectionSpaceHash.h:

(WebCore::ProtectionSpaceHash::hash):

Source/WTF:

Support passing an old-style enum to add(Hasher&, ...). Previously, it would work for enum classes
but lead to ambiguity errors with some compiler when passing a plain enum.

  • wtf/Hasher.h:

(WTF::Hasher::add):
(WTF::add):

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

[WebIDL] Remove the now-unused "ExecState" value of [CallWith] extended attribute
https://bugs.webkit.org/show_bug.cgi?id=234331

Patch by Alexey Shvayka <ashvayka@apple.com> on 2021-12-15
Reviewed by Darin Adler.

ExecState was removed in favor of JSGlobalObject in https://webkit.org/b/202392.
This change removes leftovers from bindings generator, improving the condition for
exception check in GenerateConstructorDefinition, and even renames WebIDL test cases.

No new tests, no behavior change.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateCallWith):
(GenerateConstructorDefinition):

  • bindings/scripts/IDLAttributes.json:
  • bindings/scripts/test/JS/*: Updated.
  • bindings/scripts/test/TestObj.idl:
4:55 PM Changeset in webkit [287118] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

null ptr deref in WebCore::ApplyStyleCommand::applyRelativeFontStyleChange
https://bugs.webkit.org/show_bug.cgi?id=234312

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-12-15
Reviewed by Chris Dumez.

Source/WebCore:

In some situations calling ApplyStyleCommand::nodeFullySelected forces layout in a
way that disconnects the element. In this situation, we now break out of iteration.

We also add an isOrphan() check in ApplyStyleCommand::applyInlineStyle given
the possibility of this scenario.

Test: fast/editing/apply-relative-font-style-change-crash-004.html

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
(WebCore::ApplyStyleCommand::applyInlineStyle):

LayoutTests:

  • TestExpectations:
  • fast/editing/apply-relative-font-style-change-crash-004-expected.txt: Added.
  • fast/editing/apply-relative-font-style-change-crash-004.html: Added.
4:55 PM Changeset in webkit [287117] by Alan Coon
  • 13 edits
    2 adds in branches/safari-612-branch/Source/WebCore

Cherry-pick r287079. rdar://problem/85892959

Twitter scroll stutter: ensure that CA backing store is always deallocated on the main thread
https://bugs.webkit.org/show_bug.cgi?id=234328
<rdar://85892959>

Reviewed by Tim Horton.

When scrolling pages like Twitter and Facebook we observed CoreAnimation commits on the
scrolling thread taking longer than they should because CABackingStore objects were being
released in those transactions.

Work around this issue by extending the lifetime of CABackingStore objects if we detect that
they might be entrained into a scrolling tree commit, by virtue of having overlapping main
thread and scrolling thread commits.

The logic is contained in PlatformCALayerContentsDelayedReleaser, which puts layer contents
into a retaining vector when they are being cleared on the layer. They are released at the
end of a main thread commit; if we detected overlapping commits, then we release on a
dispatch to extend the lifetime slightly.

The remaining changes are plumbing to get commit willBegin/didEnd messages to PlatformCALayerContentsDelayedReleaser
for main and scrolling threads.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • page/scrolling/ScrollingTree.h:
  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::willStartPlatformRenderingUpdate): (WebCore::ScrollingCoordinatorMac::didCompletePlatformRenderingUpdate):
  • page/scrolling/mac/ScrollingTreeMac.h:
  • page/scrolling/mac/ScrollingTreeMac.mm: (ScrollingTreeMac::applyLayerPositionsInternal): (ScrollingTreeMac::registerForPlatformRenderingUpdateCallback):
  • platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::updateContentsVisibility): (WebCore::GraphicsLayerCA::updateDrawsContent):
  • platform/graphics/ca/PlatformCALayer.cpp: (WebCore::PlatformCALayer::clearContents):
  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: (WebCore::PlatformCALayerCocoa::setBackingStoreAttached): (WebCore::PlatformCALayerCocoa::clearContents):
  • platform/graphics/ca/cocoa/PlatformCALayerContentsDelayedReleaser.h: Added. (WebCore::PlatformCALayerContentsDelayedReleaser::WTF_GUARDED_BY_LOCK):
  • platform/graphics/ca/cocoa/PlatformCALayerContentsDelayedReleaser.mm: Added. (WebCore::PlatformCALayerContentsDelayedReleaser::singleton): (WebCore::PlatformCALayerContentsDelayedReleaser::takeLayerContents): (WebCore::PlatformCALayerContentsDelayedReleaser::mainThreadCommitWillStart): (WebCore::PlatformCALayerContentsDelayedReleaser::mainThreadCommitDidEnd): (WebCore::PlatformCALayerContentsDelayedReleaser::scrollingThreadCommitWillStart): (WebCore::PlatformCALayerContentsDelayedReleaser::scrollingThreadCommitDidEnd): (WebCore::PlatformCALayerContentsDelayedReleaser::updateSawOverlappingCommit): (WebCore::PlatformCALayerContentsDelayedReleaser::clearRetainedContents):

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

4:52 PM Changeset in webkit [287116] by J Pascoe
  • 18 edits
    1 add in trunk

[WebAuthn] Allow same-site, cross-origin iframe get()
https://bugs.webkit.org/show_bug.cgi?id=234309
rdar://problem/86486313

Reviewed by Brent Fulgham.

Source/WebCore:

The Web Authentication level 2 specifies a feature policy to allow get calls in
cross-origin i-frames. This patch implements this feature policy partially. Only
same-site, cross-origin i-frames are supported instead. This is for tracking prevention
purposes. https://w3c.github.io/webauthn/#sctn-iframe-guidance

This patch also starts passing ClientDataJSON hashes to ASC to avoid the situation
where WebKit includes crossOrigin or other fields in ClientDataJSON that ASC is
unaware of when generating ClientDataJSON.

Added layout test cases for same-site, cross-origin get calls.

  • Modules/webauthn/AuthenticatorCoordinator.cpp:

(WebCore::AuthenticatorCoordinator::create const):
(WebCore::doesHaveSameSiteAsAncestors):
(WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):

  • Modules/webauthn/WebAuthenticationUtils.cpp:

(WebCore::buildClientDataJson):

  • Modules/webauthn/WebAuthenticationUtils.h:
  • html/FeaturePolicy.cpp:

(WebCore::policyTypeName):
(WebCore::FeaturePolicy::parse):
(WebCore::FeaturePolicy::allows const):

  • html/FeaturePolicy.h:

Source/WebKit:

The Web Authentication level 2 specifies a feature policy to allow get calls in
cross-origin i-frames. This patch implements this feature policy partially. Only
same-site, cross-origin i-frames are supported instead. This is for tracking prevention
purposes. https://w3c.github.io/webauthn/#sctn-iframe-guidance

This patch also starts passing ClientDataJSON hashes to ASC to avoid the situation
where WebKit includes crossOrigin or other fields in ClientDataJSON that ASC is
unaware of when generating ClientDataJSON.

Added layout test cases for same-site, cross-origin get calls.

  • Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(produceClientDataJson):

  • UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:

(WebKit::configureRegistrationRequestContext):
(WebKit::configurationAssertionRequestContext):
(WebKit::WebAuthenticatorCoordinatorProxy::contextForRequest):

LayoutTests:

Add layout test for WebAuthn get assertions on cross-site, same-sites i-frames with
publickey-credentials-get feature policy.

  • http/wpt/webauthn/public-key-credential-same-origin-with-ancestors.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-same-origin-with-ancestors.https.html:
  • http/wpt/webauthn/resources/util.js:
4:51 PM Changeset in webkit [287115] by Jonathan Bedard
  • 9 edits in trunk/Tools

[reporelaypy] Forward branches to alternate remote
https://bugs.webkit.org/show_bug.cgi?id=234347
<rdar://problem/86526293>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/init.py: Bump version.
  • Tools/Scripts/libraries/reporelaypy/reporelaypy/checkout.py:

(Checkout.Encoder.default): Add remotes.
(Checkout.clone): After cloning a repository, add required remotes.
(Checkout.add_remotes): Track remotes in repository.
(Checkout.init): Allow caller to specify set of remotes to be tracked.
(Checkout.push_update): Push update for specified remote.
(Checkout.update_for): Return 'True' and 'False.'
(Checkout.update_all): If a branch is being updated, we should forward that
update to any tracked remotes.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/hooks.py:

(HookProcessor.process_worker_hook): After updating a branch, forward that
update to any tracked remotes.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/checkout_unittest.py:

(CheckoutUnittest.test_constructor_no_sentinal): Capture debug logging.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/checkoutroute_unittest.py:

(CheckoutRouteUnittest.test_landing): Capture debug logging.
(CheckoutRouteUnittest.test_invoked_redirect): Ditto.
(CheckoutRouteUnittest.test_trac): Ditto.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/hooks_unittest.py:

(HooksUnittest.test_process): Test for any error logging.
(HooksUnittest.test_process_branch): Ditto.

  • Tools/Scripts/libraries/reporelaypy/run: Allow caller to specify remote to be tracked.
  • Tools/Scripts/libraries/reporelaypy/setup.py: Bump version.

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

4:46 PM Changeset in webkit [287114] by Alan Coon
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.4.5

3:28 PM Changeset in webkit [287113] by Russell Epstein
  • 1 copy in tags/Safari-613.1.11.7

Tag Safari-613.1.11.7.

3:24 PM Changeset in webkit [287112] by Russell Epstein
  • 2 edits in branches/safari-613.1.11-branch/Source/WebKit

Cherry-pick r286781. rdar://problem/86221898

Unreviewed fix after r286778 to address WebContent crashes on launch

  • WebProcess/com.apple.WebProcess.sb.in:

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

3:23 PM Changeset in webkit [287111] by Russell Epstein
  • 9 edits in branches/safari-613.1.11-branch/Source

Versioning.

WebKit-7613.1.11.7

3:19 PM Changeset in webkit [287110] by Brent Fulgham
  • 7 edits in trunk/Source/WebCore

Clean-up: Adopt Page::forEachDocument in some missed spots
https://bugs.webkit.org/show_bug.cgi?id=234324
<rdar://problem/85443831>

Reviewed by Darin Adler.

Switch manual loops to our 'forEachDocument' style in a few places that were missed
in earlier refactoring.

No change in behavior.

  • history/BackForwardCache.cpp:

(WebCore::setBackForwardCacheState)

  • page/EventHandler.cpp:

(WebCore::removeDraggedContentDocumentMarkersFromAllFramesInPage):

  • page/Frame.cpp:

(WebCore::Frame::orientationChanged):

  • page/Page.cpp:

(WebCore::Page::~Page):
(WebCore::Page::forEachDocumentFromMainFrame): Added.
(WebCore::Page::forEachDocument): Use new method.
(WebCore::Page::forEachFrameFromMainFrame): Added.
(WebCore::Page::windowScreenDidChange):
(WebCore::Page::userAgentChanged):

  • page/ios/FrameIOS.mm:

(WebCore::Frame::dispatchPageHideEventBeforePause):
(WebCore::Frame::dispatchPageShowEventBeforeResume):

2:34 PM Changeset in webkit [287109] by commit-queue@webkit.org
  • 4 edits in trunk

[Shadow Realms] Wrapped functions must only throw TypeError from calling realm
https://bugs.webkit.org/show_bug.cgi?id=234357

JSTests:

Test the cases when the exception would be thrown by a function
originating from both the shadow realm and the incubating realm.

Patch by Joseph Griego <jgriego@igalia.com> on 2021-12-15
Reviewed by Yusuke Suzuki.

  • stress/shadow-realm-evaluate.js:

(shouldBe):
(let.f.realm.evaluate):
(shouldBe.f):

Source/JavaScriptCore:

Patch by Joseph Griego <jgriego@igalia.com> on 2021-12-15
Reviewed by Yusuke Suzuki.

This wrapping logic already exists for ShadowRealm.prototype.evaluate
but not for calls to wrapped functions. at present, this requires some
awkward manouvering to actually throw a typeerror from the shadow realm,
since the wrapper code always runs in the incubating realm.

Hopefully we can make this less messy soon by replacing this
implementation with one more integrated with the runtime.

This case wasn't covered by existing JSC or test262 tests; added
coverage both upstream in t262 and in this patch.

  • builtins/ShadowRealmPrototype.js:

(wrapped):
(globalPrivate.wrap):

1:54 PM Changeset in webkit [287108] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix Linux and windows build
https://bugs.webkit.org/show_bug.cgi?id=234362

  • Headers.cmake:
1:54 PM Changeset in webkit [287107] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix after r287077.

  • platform/network/ProtectionSpaceHash.h:

(WebCore::ProtectionSpaceHash::hash):

1:34 PM Changeset in webkit [287106] by commit-queue@webkit.org
  • 10 edits
    5 deletes in trunk/Source

Remove ProxyServer
https://bugs.webkit.org/show_bug.cgi?id=234362

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-15
Reviewed by Geoffrey Garen.

Source/WebCore:

It was only used for NPAPI.

  • PlatformAppleWin.cmake:
  • PlatformMac.cmake:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/Curl.cmake:
  • platform/SourcesSoup.txt:
  • platform/network/ProxyServer.cpp: Removed.
  • platform/network/ProxyServer.h: Removed.
  • platform/network/cf/ProxyServerCFNet.cpp: Removed.
  • platform/network/curl/ProxyServerCurl.cpp: Removed.
  • platform/network/soup/ProxyServerSoup.cpp: Removed.

Source/WebKit:

  • WebProcess/Plugins/PluginView.cpp:
1:32 PM Changeset in webkit [287105] by don.olmstead@sony.com
  • 5 edits
    1 copy
    2 moves
    1 add in trunk/Tools

Split ATK specific code in WPEViewBackends
https://bugs.webkit.org/show_bug.cgi?id=234310

Reviewed by Adrian Perez de Castro.

Move ATK specific code in WPEViewBackends into the atk directory. This splits
ViewBackend's implementation into two files with ATK specific code migrated to
atk/ViewBackendAtk.cpp. The code in WebKitAccessibleApplication is all ATK specific so
its completely moved into the atk directory.

  • wpe/backends/CMakeLists.txt:
  • wpe/backends/PlatformWPE.cmake:
  • wpe/backends/ViewBackend.cpp:

(WPEToolingBackends::ViewBackend::initializeAccessibility):
(WPEToolingBackends::ViewBackend::updateAccessibilityState):
(WPEToolingBackends::addKeyEventListener): Deleted.
(WPEToolingBackends::removeKeyEventListener): Deleted.
(WPEToolingBackends::notifyAccessibilityKeyEventListeners): Deleted.
(WPEToolingBackends::ViewBackend::setAccessibleChild): Deleted.

  • wpe/backends/ViewBackend.h:
  • wpe/backends/atk/ViewBackendAtk.cpp: Copied from Tools/wpe/backends/ViewBackend.cpp.

(WPEToolingBackends::addKeyEventListener):
(WPEToolingBackends::removeKeyEventListener):
(WPEToolingBackends::ViewBackend::notifyAccessibilityKeyEventListeners):
(WPEToolingBackends::ViewBackend::initializeAccessibility):
(WPEToolingBackends::ViewBackend::updateAccessibilityState):
(WPEToolingBackends::ViewBackend::setAccessibleChild):

  • wpe/backends/atk/WebKitAccessibleApplication.cpp: Renamed from Tools/wpe/backends/WebKitAccessibleApplication.cpp.
  • wpe/backends/atk/WebKitAccessibleApplication.h: Renamed from Tools/wpe/backends/WebKitAccessibleApplication.h.
1:26 PM Changeset in webkit [287104] by Tyler Wilcock
  • 2 edits in trunk/Source/WebCore

AX: Move comment about accessibilityShouldUseUniqueId in WebAccessibilityObjectWrapperMac.mm to the right place
https://bugs.webkit.org/show_bug.cgi?id=234334

Reviewed by Chris Fleizach.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

Move comment about accessibilityShouldUseUniqueId next to its
defintion rather than its current location next to
accessibilityIsIgnored.

1:24 PM Changeset in webkit [287103] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

RELEASE_ASSERT in WTF::Deque<WebKit::NativeWebKeyboardEvent, 0ul>::first()
https://bugs.webkit.org/show_bug.cgi?id=234301

Reviewed by Geoffrey Garen.

WebPageProxy::interpretKeyEvent() gets called as the result of IPC from the WebProcess
and assumes that WebPageProxy::m_keyEventQueue is non-empty. We have evidence based on
the Chrome crash report that this assertion doesn't always hold. Also, the WebProcess
is not a trusted process so we shouldn't be making such assumptions in the first place.

Add a check in WebPageProxy::interpretKeyEvent() to properly deal with an empty queue.

No new tests, unknown how to reproduce.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::interpretKeyEvent):

1:13 PM Changeset in webkit [287102] by Ryan Haddad
  • 10 edits in trunk/LayoutTests

PCM: Remove old DB update and migration code, and add a unit test for destination token DB columns
https://bugs.webkit.org/show_bug.cgi?id=234281

Unreviewed test gardening.

Rebaseline tests for iOS.

  • platform/ios/http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive-expected.txt:
  • platform/ios/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-ephemeral-expected.txt:
  • platform/ios/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window-expected.txt:
  • platform/ios/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority-expected.txt:
  • platform/ios/http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority-expected.txt:
  • platform/ios/http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority-expected.txt:
  • platform/ios/http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority-expected.txt:
  • platform/ios/http/tests/privateClickMeasurement/second-conversion-with-higher-priority-expected.txt:
  • platform/ios/http/tests/privateClickMeasurement/second-conversion-with-lower-priority-expected.txt:
1:10 PM Changeset in webkit [287101] by commit-queue@webkit.org
  • 3 edits
    10 adds in trunk/LayoutTests

[GLIB] Update test expectations and baselines. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=234353

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-12-15

  • platform/glib/TestExpectations:
  • platform/glib/http/tests/workers/service/service-worker-download-async-delegates.https-expected.txt: Added.
  • platform/glib/http/tests/workers/service/service-worker-download-body.https-expected.txt: Added.
  • platform/glib/http/tests/workers/service/service-worker-download-stream.https-expected.txt: Added.
  • platform/glib/http/tests/workers/service/service-worker-download.https-expected.txt: Added.
  • platform/glib/http/wpt/service-workers/fetch-service-worker-preload-download-through-direct-preload.https-expected.txt: Added.
  • platform/glib/http/wpt/service-workers/fetch-service-worker-preload-download.https-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/service-workers/service-worker/clients-matchall-client-types.https-expected.txt: Added.
  • platform/gtk/TestExpectations:
1:06 PM Changeset in webkit [287100] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Actually use adattributiond.entitlements when code signing adattributiond
https://bugs.webkit.org/show_bug.cgi?id=234329
<rdar://86425785>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-15
Reviewed by Tim Horton.

r283897 got me so close. I generate the entitlements and the sandbox profile. Now I need to actually sign with the entitlements.
I verified by building two roots that before this change, the codesign invocation looked like this:
/usr/bin/codesign --force --sign - --generate-entitlement-der .../Root/System/Library/Frameworks/WebKit.framework/Daemons/adattributiond
and after this change it looks like this:
/usr/bin/codesign --force --sign - --entitlements .../TempContent/Objects/WebKit.build/adattributiond.build/adattributiond.entitlements

--generate-entitlement-der .../Root/System/Library/Frameworks/WebKit.framework/Daemons/adattributiond

  • Configurations/adattributiond.xcconfig:
12:55 PM Changeset in webkit [287099] by Russell Epstein
  • 2 edits in branches/safari-613.1.12-branch/Source/WebKit

Cherry-pick r287098. rdar://problem/86502081

[iOS][WP] Add access to required syscall
https://bugs.webkit.org/show_bug.cgi?id=234336
<rdar://86343811>

Reviewed by Brent Fulgham.

Add access to required system call in the WebProcess sandbox on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:

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

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

[iOS][WP] Add access to required syscall
https://bugs.webkit.org/show_bug.cgi?id=234336
<rdar://86343811>

Reviewed by Brent Fulgham.

Add access to required system call in the WebProcess sandbox on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
12:15 PM Changeset in webkit [287097] by Russell Epstein
  • 2 edits in branches/safari-613.1.12-branch/Source/WebKit

Cherry-pick r287069. rdar://problem/86502081

[iOS][WP] Add access to required syscall
https://bugs.webkit.org/show_bug.cgi?id=234336
<rdar://86502081>

Reviewed by Tim Horton.

Add required syscall to the WebContent process' sandbox on iOS. This syscall was blocked in
https://trac.webkit.org/changeset/286673/webkit.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:

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

12:15 PM Changeset in webkit [287096] by Russell Epstein
  • 3 edits in branches/safari-613.1.12-branch/Source/WebKit

Cherry-pick r286961. rdar://problem/86343642

REGRESSION (r286841): [ iOS ] Many webrtc tests flaky failing on iOS
https://bugs.webkit.org/show_bug.cgi?id=234181
<rdar://problem/86343642>

Reviewed by Eric Carlson.

Use network connection state change callback to know when connection fails or is cancelled.
Introduce ConnectionStateTracker to know when to stop reading new UDP packets.
ConnectionStateTracker will be stopped when state is changed to failed or cancelled as well as when the whole connection is closed.
Renaming m_nwConnections to m_connections as m_nwConnections name was already used.
Reduce error logging to only new error codes or when connectino enters unrecoverable failure (hence changing to failed state).

Covered by existing tests.

  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.h:
  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm:

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

12:14 PM Changeset in webkit [287095] by Alexey Shvayka
  • 5 edits in trunk/Source/WebCore

[WebIDL] Remove the now-unused [DocumentEventHandler] extended attribute
https://bugs.webkit.org/show_bug.cgi?id=234047

Reviewed by Darin Adler.

[DocumentEventHandler] was originally introduced just to accommodate onselectionchange
IDL attribute, which became unnecessary as of r287089. Also, HTML spec has no concept
of reflecting event handlers to Document, only to Window [1].

[1] https://html.spec.whatwg.org/multipage/webappapis.html#window-reflecting-body-element-event-handler-set

No new tests, no behavior change.

  • bindings/js/JSEventListener.cpp:

(WebCore::documentEventHandlerAttribute): Deleted.
(WebCore::setDocumentEventHandlerAttribute): Deleted.

  • bindings/js/JSEventListener.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateAttributeGetterBodyDefinition):
(GenerateAttributeSetterBodyDefinition):

  • bindings/scripts/IDLAttributes.json:
12:09 PM Changeset in webkit [287094] by jer.noble@apple.com
  • 7 edits in trunk/Source

[Mac] Adopt -[NSScreen safeAreaInsets]
https://bugs.webkit.org/show_bug.cgi?id=234291
<rdar://85805895>

Reviewed by Eric Carlson.

Source/WebCore:

Adopt -safeAreaInsets and rename screenRectAvoidingMenuBar() to safeScreenFrame().

  • platform/PlatformScreen.h:
  • platform/mac/PlatformScreenMac.mm:

(WebCore::safeScreenFrame): Renamed from screenRectAvoidingMenuBar.

Source/WebKit:

Drive-by fix: use the safeAreaFrame() when determining where to place the exit
fullscreen placeholder image.

  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController finishedExitFullScreenAnimationAndExitImmediately:]):

Source/WTF:

  • wtf/PlatformHave.h:
11:57 AM Changeset in webkit [287093] by commit-queue@webkit.org
  • 12 edits
    2 deletes in trunk/Source

More cleanup after PluginProcess removal
https://bugs.webkit.org/show_bug.cgi?id=234354

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-15
Reviewed by Tim Horton.

Source/WebCore:

  • platform/network/ProxyServer.h:

Source/WebKit:

Remove some unused code, unify some sources.

  • Configurations/PluginProcessShim.xcconfig: Removed.
  • Configurations/PluginService.xcconfig: Removed.
  • DerivedSources.make:
  • Shared/Cocoa/SharedRingBufferStorage.cpp:

(WebKit::ReadOnlySharedRingBufferStorage::allocate):
(WebKit::SharedRingBufferStorage::setStorage):
(WebKit::SharedRingBufferStorage::allocate):

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultMediaSessionCoordinatorEnabled):

  • Sources.txt:
  • UIProcess/WebProcessPool.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Plugins/PluginController.h:
  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::platformLayer const):
(WebKit::PluginView::contentsScaleFactor):
(WebKit::PluginView::pluginProcessCrashed): Deleted.
(WebKit::PluginView::proxiesForURL): Deleted.
(WebKit::PluginView::cookiesForURL): Deleted.
(WebKit::PluginView::setCookiesForURL): Deleted.

  • WebProcess/Plugins/PluginView.h:
11:46 AM Changeset in webkit [287092] by ysuzuki@apple.com
  • 5 edits in trunk/Source/bmalloc

[libpas] Implement atomics in inline assembly if compiler is using ARM64
https://bugs.webkit.org/show_bug.cgi?id=234333

Reviewed by Filip Pizlo.

libpas relies on how value is loaded since we are using pas_depend.
For example, we expect that compare_and_swap_strong returns a loaded value.
But it is not guaranteed: the compiler can return argument's old_value
if we ensure that the loaded value equals to old_value. In that case,
pas_depend's chain is broken because we start using distinct registers.
This can happen if atomics is implemented as LL/SC loop.

This patch implements atomics in inline assembly if the build is ARM64 (not ARM64E),
so that we ensure that we return loaded value's register instead of old value's one.

This significantly improved crash rate of libpas test suite on ARM64 (on ARM64E, all
tests pass already).

  • libpas/src/libpas/pas_config_prefix.h:
  • libpas/src/libpas/pas_lock.h:

(pas_lock_unlock):

  • libpas/src/libpas/pas_lock_free_read_ptr_ptr_hashtable.h:

(pas_lock_free_read_ptr_ptr_hashtable_find):

  • libpas/src/libpas/pas_utils.h:

(pas_atomic_store_uint8):
(pas_compare_and_swap_uint8_weak):
(pas_compare_and_swap_uint8_strong):
(pas_compare_and_swap_uint16_weak):
(pas_compare_and_swap_uint32_weak):
(pas_compare_and_swap_uint32_strong):
(pas_compare_and_swap_uint64_weak):
(pas_compare_and_swap_uint64_strong):
(pas_atomic_store_bool):
(pas_compare_and_swap_bool_weak):
(pas_compare_and_swap_bool_strong):
(pas_compare_and_swap_uintptr_weak):
(pas_compare_and_swap_uintptr_strong):
(pas_compare_and_swap_ptr_weak):
(pas_compare_and_swap_ptr_strong):
(pas_compare_and_swap_pair_weak):
(pas_compare_and_swap_pair_strong):
(pas_atomic_load_pair):
(pas_atomic_store_pair):
(pas_compare_ptr_opaque):

11:45 AM Changeset in webkit [287091] by Antti Koivisto
  • 7 edits
    1 copy
    1 add in trunk/Source/WebCore

[:has() pseudo-class] Use Bloom filter to quickly reject :has() selectors
https://bugs.webkit.org/show_bug.cgi?id=234341

Reviewed by Dean Jackson.

We can dramatically speed up cases where there are many :has rules, most of which don't match their argument
by building a Bloom filter describing the features of the subtree.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::matchHasPseudoClass const):

Build and cache HasSelectorFilter per element/filter type. It will be constructed only if multiple :has()
selectors are tested for the same element (otherwise the regular match cache is more efficient).
Use it to quickly reject selectors.
Also add a basic inital optimization to bail out if there are no child/sibling elements that could match.

  • css/SelectorFilter.cpp:

(WebCore::SelectorFilter::collectElementIdentifierHashes):
(WebCore::SelectorFilter::collectSimpleSelectorHash):
(WebCore::SelectorFilter::collectSelectorHashes):
(WebCore::SelectorFilter::chooseSelectorHashesForFilter):
(WebCore::collectElementIdentifierHashes): Deleted.
(WebCore::collectSimpleSelectorHash): Deleted.
(WebCore::collectSelectorHashes): Deleted.
(WebCore::chooseSelectorHashesForFilter): Deleted.

  • css/SelectorFilter.h:
  • style/HasSelectorFilter.cpp: Added.

(WebCore::Style::HasSelectorFilter::HasSelectorFilter):
(WebCore::Style::HasSelectorFilter::typeForMatchElement):
(WebCore::Style::HasSelectorFilter::makeKey):

The key consists of the most specific string in the rightmost compound of the selector along with
:hover pseudo class, if any.

(WebCore::Style::HasSelectorFilter::add):

Add an Element to the filter.
The features collected are the same as for the regular selector filter, plus permutations with
:hover pseudo-class if it would match.

  • style/HasSelectorFilter.h: Copied from Source/WebCore/style/SelectorMatchingState.h.

(WebCore::Style::HasSelectorFilter::type const):
(WebCore::Style::HasSelectorFilter::reject const):

Add HasSelectorFilter which uses non-counting BloomFilter internally. The size of the filter is 512 bytes.

  • style/SelectorMatchingState.h:

(WebCore::Style::makeHasPseudoClassSelectorFilterKey):

11:42 AM Changeset in webkit [287090] by sihui_liu@apple.com
  • 3 edits in trunk/Source/WebKit

REGRESSION (r286936): Many webstorage layout tests have become flaky failures
https://bugs.webkit.org/show_bug.cgi?id=234274
<rdar://problem/86434478>

Reviewed by Chris Dumez.

Connection (listener) is not added properly to existing MemoryStorageAreas, so events are not dispatched.
Also according to the old behavior, we don't add connection (listener) to StorageArea when creating it, but when
there is a connection message.

  • NetworkProcess/storage/SessionStorageManager.cpp:

(WebKit::SessionStorageManager::addStorageArea):
(WebKit::SessionStorageManager::connectToSessionStorageArea):
(WebKit::SessionStorageManager::cloneStorageArea):

  • NetworkProcess/storage/SessionStorageManager.h:
11:37 AM Changeset in webkit [287089] by Alexey Shvayka
  • 6 edits in trunk

[WebIDL] onselectionchange IDL attribute should not Document-reflect event listeners
https://bugs.webkit.org/show_bug.cgi?id=234349

Reviewed by Darin Adler.

Source/WebCore:

onselectionchange IDL attribute should not forward event listeners from <body> to Document because:

a) the attribute is being standardized as a global event handler [1];
b) "selectionchange" event should be emitted on Document only for selection changes of ranges [2],

while it should bubble to <body> only when selection changes occur in <input> / <textarea> elements;

c) HTML spec has no concept of reflecting event handlers to Document, only to Window [3].

While this patch aligns WebKit with Blink and Gecko, event listener forwarding is preserved for
"onselectionchange" content attribute in order to ensure web-compatibility in the following case:

  • a userland <body onselectionchange> listener that relies on document.activeElement to handle selection changes, including ones that occur in <input> / <textarea> elements.

This is caught by the fast/events/selectionchange-user-initiated.html test as well.

[1] https://w3c.github.io/selection-api/#extensions-to-globaleventhandlers-interface
[2] https://w3c.github.io/selection-api/#selectionchange-event
[3] https://html.spec.whatwg.org/multipage/webappapis.html#window-reflecting-body-element-event-handler-set

Test: fast/dom/event-handler-attributes.html

  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::parseAttribute):

  • html/HTMLBodyElement.idl:

LayoutTests:

  • fast/dom/event-handler-attributes-expected.txt:
  • fast/dom/event-handler-attributes.html:
10:55 AM Changeset in webkit [287088] by Russell Epstein
  • 1 copy in tags/Safari-613.1.11.6

Tag Safari-613.1.11.6.

10:55 AM Changeset in webkit [287087] by Russell Epstein
  • 1 delete in tags/Safari-613.1.11.6

Delete tag.

10:49 AM Changeset in webkit [287086] by commit-queue@webkit.org
  • 8 edits in trunk

Avoid unnecessary allocation and UTF-8 conversion when calling DFABytecodeInterpreter::interpret
https://bugs.webkit.org/show_bug.cgi?id=234351

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-15
Reviewed by Tim Hatcher.

Source/WebCore:

A valid URL, the only input into DFABytecodeInterpreter::interpret, contains only ASCII characters.
In the overwhelming majority of cases, we have an 8-bit string. There is no need to allocate, copy, and convert it.
In the rare case that we somehow get a UTF-16 encoded ASCII string, just do what we did before and UTF-8 encode it.

Regular expressions allow matching the end of the string, which we currently implement by checking for the
null character, so I had to keep the parts that read the null character at the end of a string by checking
to see if we are at the end of the string when reading a character and returning the null character if we are.

Covered by many API tests.

  • contentextensions/ContentExtension.cpp:

(WebCore::ContentExtensions::ContentExtension::populateTopURLActionCacheIfNeeded const):
(WebCore::ContentExtensions::ContentExtension::populateFrameURLActionCacheIfNeeded const):

  • contentextensions/ContentExtensionsBackend.cpp:

(WebCore::ContentExtensions::ContentExtensionsBackend::actionsFromContentRuleList const):
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad const):

  • contentextensions/ContentExtensionsBackend.h:
  • contentextensions/DFABytecodeInterpreter.cpp:

(WebCore::ContentExtensions::DFABytecodeInterpreter::interpetJumpTable):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):

  • contentextensions/DFABytecodeInterpreter.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:

(TestWebKitAPI::TEST_F):

10:32 AM Changeset in webkit [287085] by Russell Epstein
  • 2 edits in branches/safari-613.1.11-branch/Source/WebKit

Cherry-pick r286778. rdar://problem/86221898

[macOS][WP] Block access to unused system calls
https://bugs.webkit.org/show_bug.cgi?id=234003

Reviewed by Brent Fulgham.

Based on telemetry, block access to unused system calls in the WebContent process on macOS.

  • WebProcess/com.apple.WebProcess.sb.in:

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

10:19 AM Changeset in webkit [287084] by Chris Dumez
  • 10 edits in trunk/Source

Move SWServers from NetworkProcess to NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=234179

Reviewed by Darin Adler.

Source/WebKit:

Move SWServers from NetworkProcess to NetworkSession since they are per session.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
(WebKit::NetworkConnectionToWebProcess::establishSWServerConnection):
(WebKit::NetworkConnectionToWebProcess::establishSWContextConnection):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::lowMemoryHandler):
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::destroySession):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData):
(WebKit::NetworkProcess::prepareToSuspend):
(WebKit::NetworkProcess::resume):
(WebKit::NetworkProcess::processPushMessage):
(WebKit::NetworkProcess::forEachSWServer): Deleted.
(WebKit::NetworkProcess::swServerForSession): Deleted.
(WebKit::NetworkProcess::existingSWOriginStoreForSession const): Deleted.
(WebKit::NetworkProcess::registerSWServerConnection): Deleted.
(WebKit::NetworkProcess::unregisterSWServerConnection): Deleted.
(WebKit::NetworkProcess::addServiceWorkerSession): Deleted.

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::swServerForSessionIfExists): Deleted.

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::lowMemoryHandler):
(WebKit::NetworkSession::swOriginStore const):
(WebKit::NetworkSession::registerSWServerConnection):
(WebKit::NetworkSession::unregisterSWServerConnection):
(WebKit::NetworkSession::ensureSWServer):
(WebKit::NetworkSession::addServiceWorkerSession):
(WebKit::NetworkSession::hasServiceWorkerDatabasePath const):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::swServer):

  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::WebSWServerConnection):
(WebKit::WebSWServerConnection::~WebSWServerConnection):

  • WebProcess/WebPage/WebPage.h:

Source/WTF:

  • wtf/MemoryPressureHandler.h:

Using a bool as underlying type for those enum classes is sufficient.

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

[LFC][IFC] Use the physical margin/border/padding values for inline boxes when generating the display content
https://bugs.webkit.org/show_bug.cgi?id=234346

Reviewed by Antti Koivisto.

Display content is always based on visual order. When we construct the display boxes

  • we visit the line runs in visual order
  • we make space for margin/border/padding by looking at the physical sides of the content

The visually first box may very well be logically the last and this first box's left side (again, visually)
may refer to the logical start/end values depending on the inline axis direction.

E.g in case of right to left inline direction, the border-inline-end value of an inline box should be use as the
"visually first" border on the left side of the inline box content.

It means that

  • physical values are used when creating the display boxes
  • and logical values are used throughout the layout

which in practice means that isLeftToRightDirection check should only happen before and after layout
(physical -> logical and logical -> physical respectively) but never during layout.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::marginLeft):
(WebCore::Layout::marginRight):
(WebCore::Layout::borderLeft):
(WebCore::Layout::borderRight):
(WebCore::Layout::paddingLeft):
(WebCore::Layout::paddingRight):
(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):

10:08 AM Changeset in webkit [287082] by dino@apple.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

[ANGLE] clang with -Wunknown-warning-option will fail on -Wweak-template-vtables
https://bugs.webkit.org/show_bug.cgi?id=233837
<rdar://problem/86335819>

Reviewed by Antoine Quint.

Turn off unknown-warning-option on Apple builds. This shouldn't need to be
upstreamed - the Xcode configurations for ANGLE are specific to WebKit.

  • Configurations/Base.xcconfig:
10:03 AM Changeset in webkit [287081] by yoshiaki.jitsukawa@sony.com
  • 7 edits
    3 adds in trunk

JPEG XL decoder should support understand color profiles
https://bugs.webkit.org/show_bug.cgi?id=233364
<rdar://problem/85767076>

Reviewed by Michael Catanzaro.

Source/WebCore:

Support color conversion by LCMS.

We subscribe the JXL_DEC_COLOR_ENCODING event to know when the color profile
that the image has is available, and try to get an ICC profile. After getting
the profile, we create a color conversion transform with the display's color
profile. When receiving decoded pixels, we convert the pixels with it.

Test: fast/images/jpegxl-with-color-profile.html

  • platform/image-decoders/jpegxl/JPEGXLImageDecoder.cpp:

(WebCore::eventsWanted):
(WebCore::JPEGXLImageDecoder::~JPEGXLImageDecoder):
(WebCore::JPEGXLImageDecoder::clear):
(WebCore::JPEGXLImageDecoder::setFailed):
(WebCore::JPEGXLImageDecoder::ensureDecoderInitialized):
(WebCore::JPEGXLImageDecoder::rewind):
(WebCore::JPEGXLImageDecoder::decode):
(WebCore::JPEGXLImageDecoder::processInput):
(WebCore::JPEGXLImageDecoder::imageOut):
(WebCore::JPEGXLImageDecoder::clearColorTransform):
(WebCore::JPEGXLImageDecoder::prepareColorTransform):
(WebCore::JPEGXLImageDecoder::tryDecodeICCColorProfile):

  • platform/image-decoders/jpegxl/JPEGXLImageDecoder.h:

LayoutTests:

Add test for JPEG XL with color profile. The test image is
converted from the JPEG test's image.

  • TestExpectations:
  • fast/images/jpegxl-with-color-profile-expected.html: Added.
  • fast/images/jpegxl-with-color-profile.html: Added.
  • fast/images/resources/red-at-12-oclock-with-color-profile.jxl: Added.
  • platform/glib/TestExpectations:
  • platform/wincairo/TestExpectations:
9:50 AM Changeset in webkit [287080] by tomoki.imai@sony.com
  • 3 edits in trunk/Source/WTF

[PlayStation] Use FileSystem instead of FileSystemPlayStation except several unsupported APIs
https://bugs.webkit.org/show_bug.cgi?id=234337

Reviewed by Don Olmstead.

PlayStation should use FileSystem as its current SDK supports std::filesystem.
We have to maintain FileSystemPlayStation for now to supply some of FileSystem APIs
because the following functions are not supported yet.

  • std::filesystem::space
  • std::filesystem::rename
  • std::filesystem::canonical
  • std::filesystem::directory_iterator
  • std::filesystem::remove_all

The plan is to remove FileSystemPlayStation entirely after the SDK supports these functions.

This patch also fixes the incompatible issue of FileSystem::listDirectory of FileSystemPlayStation.
FileSystem::listDirectory is expected to return only the names, but it actually returns full paths.

Confirmed that there is no regression in FileSystem related testcases in TestWTF.

  • wtf/FileSystem.cpp: Add PLATFORM(PLAYSTATION) guards not to use unsupported std::filesystem APIs.
  • wtf/playstation/FileSystemPlayStation.cpp: Remove the functions duplicated with FileSystem.

Make FileSystem::listDirectory returns only names.
Add listDirectorySub which can return a full path because deleteNonEmptyDirectory depends on it.

9:46 AM Changeset in webkit [287079] by Simon Fraser
  • 14 edits
    2 adds in trunk/Source/WebCore

Twitter scroll stutter: ensure that CA backing store is always deallocated on the main thread
https://bugs.webkit.org/show_bug.cgi?id=234328
<rdar://85892959>

Reviewed by Tim Horton.

When scrolling pages like Twitter and Facebook we observed CoreAnimation commits on the
scrolling thread taking longer than they should because CABackingStore objects were being
released in those transactions.

Work around this issue by extending the lifetime of CABackingStore objects if we detect that
they might be entrained into a scrolling tree commit, by virtue of having overlapping main
thread and scrolling thread commits.

The logic is contained in PlatformCALayerContentsDelayedReleaser, which puts layer contents
into a retaining vector when they are being cleared on the layer. They are released at the
end of a main thread commit; if we detected overlapping commits, then we release on a
dispatch to extend the lifetime slightly.

The remaining changes are plumbing to get commit willBegin/didEnd messages to PlatformCALayerContentsDelayedReleaser
for main and scrolling threads.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • page/scrolling/ScrollingTree.h:
  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::willStartPlatformRenderingUpdate):
(WebCore::ScrollingCoordinatorMac::didCompletePlatformRenderingUpdate):

  • page/scrolling/mac/ScrollingTreeMac.h:
  • page/scrolling/mac/ScrollingTreeMac.mm:

(ScrollingTreeMac::applyLayerPositionsInternal):
(ScrollingTreeMac::registerForPlatformRenderingUpdateCallback):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::updateContentsVisibility):
(WebCore::GraphicsLayerCA::updateDrawsContent):

  • platform/graphics/ca/PlatformCALayer.cpp:

(WebCore::PlatformCALayer::clearContents):

  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayerCocoa::setBackingStoreAttached):
(WebCore::PlatformCALayerCocoa::clearContents):

  • platform/graphics/ca/cocoa/PlatformCALayerContentsDelayedReleaser.h: Added.

(WebCore::PlatformCALayerContentsDelayedReleaser::WTF_GUARDED_BY_LOCK):

  • platform/graphics/ca/cocoa/PlatformCALayerContentsDelayedReleaser.mm: Added.

(WebCore::PlatformCALayerContentsDelayedReleaser::singleton):
(WebCore::PlatformCALayerContentsDelayedReleaser::takeLayerContents):
(WebCore::PlatformCALayerContentsDelayedReleaser::mainThreadCommitWillStart):
(WebCore::PlatformCALayerContentsDelayedReleaser::mainThreadCommitDidEnd):
(WebCore::PlatformCALayerContentsDelayedReleaser::scrollingThreadCommitWillStart):
(WebCore::PlatformCALayerContentsDelayedReleaser::scrollingThreadCommitDidEnd):
(WebCore::PlatformCALayerContentsDelayedReleaser::updateSawOverlappingCommit):
(WebCore::PlatformCALayerContentsDelayedReleaser::clearRetainedContents):

9:26 AM Changeset in webkit [287078] by youenn@apple.com
  • 4 edits in trunk/LayoutTests

[ Mac wk2 and iOS wk2 ] webrtc/libwebrtc/descriptionGetters.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=214084
<rdar://problem/65225336>

Reviewed by Eric Carlson.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • webrtc/libwebrtc/descriptionGetters.html:

We are no longer getting the descriptions straight from the backend.
Instead, we are storing them at end of createOffer or answer/set descriptions time.
Update test accordingly.

9:10 AM Changeset in webkit [287077] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

http/tests/security/basic-auth-subresource.html and some other http auth tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=234314
<rdar://85150486>

Reviewed by Darin Adler.

http/tests/security/basic-auth-subresource.html and some other http auth tests are flaky.

No new tests, I will be able to unskip those layout tests in internal once this lands.

  • platform/network/ProtectionSpaceBase.cpp:

(WebCore::ProtectionSpaceBase::ProtectionSpaceBase):
(WebCore::ProtectionSpaceBase::host const): Deleted.
(WebCore::ProtectionSpaceBase::port const): Deleted.
(WebCore::ProtectionSpaceBase::serverType const): Deleted.
(WebCore::ProtectionSpaceBase::realm const): Deleted.
(WebCore::ProtectionSpaceBase::authenticationScheme const): Deleted.

  • platform/network/ProtectionSpaceBase.h:

(WebCore::ProtectionSpaceBase::host const):
(WebCore::ProtectionSpaceBase::port const):
(WebCore::ProtectionSpaceBase::serverType const):
(WebCore::ProtectionSpaceBase::realm const):
(WebCore::ProtectionSpaceBase::authenticationScheme const):
Clean up / modernise the ProtectionSpaceBase class.

  • platform/network/ProtectionSpaceHash.h:

(WebCore::ProtectionSpaceHash::hash):

  • Use Hasher in ProtectionSpaceHash::hash() as it is less error-prone. I believe the previous implementation was wrong because it was calling StringHasher::hashMemory(hashCodes, codeCount) instead of StringHasher::hashMemory(hashCodes, codeCount * sizeof(unsigned)). This could have resulted in inefficiencies I believe since we were not hashing the whole array memory.
  • Fix ProtectionSpace<ProtectionSpace> so that emptyValueIsZero is false instead of true. This was a bug since the ProtectionSpaceBase constructor initializes data members to non-zero values.
8:59 AM Changeset in webkit [287076] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix SVG resource invalidation logic causing incorrect layout state.
https://bugs.webkit.org/show_bug.cgi?id=233190
<rdar://82895369>

When SVG resources perform parent layout/resource invalidation, we can incorrectly
cross the SVG boundary when operating on a node which isn't an SVGRoot.
This can cause us to exit layout() with elements that still needsLayout().

Patch by Gavin Phillips <gavin.p@apple.com> on 2021-12-15
Reviewed by Darin Adler.

  • rendering/svg/RenderSVGResource.cpp:

(WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):

8:33 AM Changeset in webkit [287075] by Chris Lord
  • 7 edits
    2 adds in trunk

[GTK] Use libgbm and the ANGLE gbm backend to fix initialisation
https://bugs.webkit.org/show_bug.cgi?id=234293

Reviewed by Don Olmstead.

.:

Add cmake files to find gbm and libdrm.

  • Source/cmake/FindGBM.cmake: Added.
  • Source/cmake/FindLibDRM.cmake: Added.

Source/ThirdParty/ANGLE:

Use GBM backend for GTK platform.

  • CMakeLists.txt:
  • GL.cmake:
  • PlatformGTK.cmake:

Source/WebCore:

Make ANGLE context non-TEXTURE_2D drawingBufferTextureTarget Cocoa-specific.

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::drawingBufferTextureTarget):

8:25 AM Changeset in webkit [287074] by jer.noble@apple.com
  • 4 edits in trunk/LayoutTests

[ iOS EWS ] 2X media/track (layout-tests) are a constant image failure
https://bugs.webkit.org/show_bug.cgi?id=234090
<rdar://problem/86281284>

Reviewed by Eric Carlson.

Fix the expected results.

  • media/track/track-webvtt-no-snap-to-lines-overlap-expected.html:
  • media/track/track-webvtt-snap-to-lines-left-right-expected.html:
  • platform/ios-wk2/TestExpectations:
8:23 AM Changeset in webkit [287073] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit should only reset once
https://bugs.webkit.org/show_bug.cgi?id=234340

Reviewed by Eric Carlson.

As seen in logs, there are cases where the unit is notified reset several times before it gets stopped and restarted.
This triggers resetting on WebProcess side several times which is unneeded.
Instead, we now only call reset once in a start/stop cycle of the audio unit.
Manually tested.

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:

(WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit::notifyReset):
(WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit::start):

6:40 AM Changeset in webkit [287072] by youenn@apple.com
  • 2 edits in trunk/Source/WTF

Make use of PLATFORM(COCOA) in MediaRecorder WebPreference
https://bugs.webkit.org/show_bug.cgi?id=234339

Reviewed by Eric Carlson.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

HAVE(AVASSETWRITERDELEGATE) has been removed from PlatformHave.h given it was true on all supported platforms.
But it was still used to guard MediaRecorder preference, thus MediaRecorder got disabled inadvertently.
Let's guard MediaRecorder with PLATFORM(COCOA).

6:15 AM Changeset in webkit [287071] by Carlos Garcia Campos
  • 8 edits in trunk

[GTK][a11y] Add support for loading events when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234344

Reviewed by Joanmarie Diggs.

Source/WebCore:

Emit document:load-complete, document:reload, document:load-stopped and object:state-changed:busy.

  • accessibility/atspi/AXObjectCacheAtspi.cpp:

(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::loadEvent):

  • accessibility/atspi/AccessibilityAtspi.h:
  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::loadEvent):

  • accessibility/atspi/AccessibilityObjectAtspi.h:

Tools:

Add a test case to check loading events.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(AccessibilityTest::shouldProcessEvent): Helper to make the filters conditions easier to read.
(AccessibilityTest::startEventMonitor): Make it possible to use the monitor without filtering events.
(testDocumentLoadEvents):
(beforeAll):

5:48 AM Changeset in webkit [287070] by Carlos Garcia Campos
  • 10 edits in trunk

[GTK][a11y] Register the wrappers tree when there's an event listener registered
https://bugs.webkit.org/show_bug.cgi?id=234338

Reviewed by Joanmarie Diggs.

Source/WebCore:

Connect to the atspi registry to get the list of registered event listeners. If there's any listener, we register
the tree to ensure we can emit signals, but we only emit the signals for which there's a listener registered,
except for the ones required by the atspi cache.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::AccessibilityAtspi): Connect to the registry.
(WebCore::AccessibilityAtspi::~AccessibilityAtspi): Disconnect registry signals.
(WebCore::AccessibilityAtspi::registerTrees const): Register the trees of all root objects.
(WebCore::AccessibilityAtspi::initializeRegistry): Get the list of listeners registered and connect to
EventListenerRegistered signal.
(WebCore::AccessibilityAtspi::addEventListener): Add an event listener to the list converting the detail to non
camel case to be abel to compare it later on signal emission.
(WebCore::eventIsSubtype): Helper to check if event type is subtype of another.
(WebCore::AccessibilityAtspi::removeEventListener): Remove and events listener from the list.
(WebCore::AccessibilityAtspi::shouldEmitSignal): Return whether the given signal should be emitted, checking the
registered event listeners.
(WebCore::AccessibilityAtspi::parentChanged): Do not emit the signal if the object hasn't been registered yet to
avoid flooding during tree creation. We just register the object the object in that case which will update the
cache because addAccessible is always called.
(WebCore::AccessibilityAtspi::stateChanged): Return early if signal should not be emitted.
(WebCore::AccessibilityAtspi::textChanged): Ditto.
(WebCore::AccessibilityAtspi::textAttributesChanged): Ditto.
(WebCore::AccessibilityAtspi::textCaretMoved): Ditto.
(WebCore::AccessibilityAtspi::textSelectionChanged): Ditto.
(WebCore::AccessibilityAtspi::valueChanged): Ditto.
(WebCore::AccessibilityAtspi::selectionChanged): Ditto.

  • accessibility/atspi/AccessibilityAtspi.h:

(WebCore::AccessibilityAtspi::hasEventListeners const):

  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::childAdded): Return early if object is already detached or ignored.
(WebCore::AccessibilityObjectAtspi::childRemoved): Ditto.
(WebCore::AccessibilityObjectAtspi::stateChanged): Do not return early if the object is not registered because
we might end up emitting the signal.

  • accessibility/atspi/AccessibilityObjectSelectionAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::selectionChanged): Ditto.

  • accessibility/atspi/AccessibilityObjectTextAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::textInserted): Ditto.
(WebCore::AccessibilityObjectAtspi::textDeleted): Ditto.
(WebCore::AccessibilityObjectAtspi::selectionChanged): Ditto.
(WebCore::AccessibilityObjectAtspi::textAttributesChanged): Ditto.

  • accessibility/atspi/AccessibilityObjectValueAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::valueChanged): Ditto.

  • accessibility/atspi/AccessibilityRootAtspi.cpp:

(WebCore::AccessibilityRootAtspi::embedded): Register the tree if there are event listeners registered.

Tools:

Add unit test to check the tree is created when there's a listener connected.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(AccessibilityTest::findTestApplication): Iterate the applications list backwards since the test program is
usually the last one in the list.
(AccessibilityTest::accessibleApplicationIsTestProgram): Helper to check if a given accessible belongs to the
test program.
(AccessibilityTest::startEventMonitor): Support for listening to events associated to the test program, not to a
particular accessible.
(testAccessibleEventListener):
(beforeAll):

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

[iOS][WP] Add access to required syscall
https://bugs.webkit.org/show_bug.cgi?id=234336
<rdar://86502081>

Reviewed by Tim Horton.

Add required syscall to the WebContent process' sandbox on iOS. This syscall was blocked in
https://trac.webkit.org/changeset/286673/webkit.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
1:43 AM Changeset in webkit [287068] by Kyle Piddington
  • 222 edits
    10 adds
    3 deletes in trunk/Source/ThirdParty/ANGLE

[ANGLE] Roll ANGLE to 12-14-2021 (5ee7dfbd5a3)
https://bugs.webkit.org/show_bug.cgi?id=234317

Reviewed by Kenneth Russell.

Roll ANGLE to 12-14-2021 to include new memory-attribution
Metal device, merge up fixes, EAC/ ASTC support on M1

The changelog has been removed to promote readability

1:36 AM Changeset in webkit [287067] by youenn@apple.com
  • 3 edits
    2 adds in trunk

Make sure to start a realtime outgoing source in case it is taken to another sender
https://bugs.webkit.org/show_bug.cgi?id=234296
<rdar://86276497>

Reviewed by Eric Carlson.

Source/WebCore:

We are asynchronously starting libwebrtc sources.
When a sender is created first and is assigned a source later, we take the source and assign it to the sender.
In that case, the source might not be started and we will not send any data.

Test: webrtc/addTransceiver-then-addTrack.html

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:

LayoutTests:

  • webrtc/addTransceiver-then-addTrack-expected.txt: Added.
  • webrtc/addTransceiver-then-addTrack.html: Added.
1:16 AM Changeset in webkit [287066] by graouts@webkit.org
  • 25 edits in trunk/Source/WebCore

ActiveDOMObject::suspendIfNeeded() should not be called within constructors
https://bugs.webkit.org/show_bug.cgi?id=233945

Reviewed by Chris Dumez and Darin Adler.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::ApplePaySession::create):

  • Modules/applepay/ApplePaySetup.cpp:

(WebCore::ApplePaySetup::create):
(WebCore::ApplePaySetup::ApplePaySetup):

  • Modules/applepay/ApplePaySetupWebCore.h:

(WebCore::ApplePaySetup::create): Deleted.

  • Modules/cache/DOMCache.cpp:

(WebCore::DOMCache::create):
(WebCore::DOMCache::DOMCache):

  • Modules/cache/DOMCache.h:
  • Modules/cache/DOMCacheStorage.cpp:

(WebCore::DOMCacheStorage::create):
(WebCore::DOMCacheStorage::DOMCacheStorage):

  • Modules/cache/DOMCacheStorage.h:

(WebCore::DOMCacheStorage::create): Deleted.

  • Modules/entriesapi/FileSystemDirectoryReader.cpp:

(WebCore::FileSystemDirectoryReader::create):
(WebCore::FileSystemDirectoryReader::FileSystemDirectoryReader):

  • Modules/entriesapi/FileSystemDirectoryReader.h:
  • Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp:

(WebCore::FileSystemSyncAccessHandle::create):
(WebCore::FileSystemSyncAccessHandle::FileSystemSyncAccessHandle):

  • Modules/geolocation/Geolocation.cpp:

(WebCore::Geolocation::create):

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::create):
(WebCore::MediaStream::MediaStream):

  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::create):

  • Modules/remoteplayback/RemotePlayback.cpp:

(WebCore::RemotePlayback::create):
(WebCore::RemotePlayback::RemotePlayback):

  • Modules/webaudio/ScriptProcessorNode.cpp:

(WebCore::ScriptProcessorNode::create):
(WebCore::ScriptProcessorNode::ScriptProcessorNode):

  • Modules/webxr/WebXRSession.cpp:

(WebCore::WebXRSession::create):
(WebCore::WebXRSession::WebXRSession):

  • Modules/webxr/WebXRSystem.cpp:

(WebCore::WebXRSystem::create):
(WebCore::WebXRSystem::WebXRSystem):

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::create):
(WebCore::m_version):

  • css/CSSFontSelector.h:
  • dom/MessagePort.cpp:

(WebCore::MessagePort::create):
(WebCore::MessagePort::MessagePort):

  • workers/WorkerAnimationController.cpp:

(WebCore::WorkerAnimationController::create):
(WebCore::WorkerAnimationController::WorkerAnimationController):

  • workers/service/ServiceWorker.cpp:

(WebCore::ServiceWorker::getOrCreate):
(WebCore::ServiceWorker::ServiceWorker):

  • workers/service/ServiceWorkerRegistration.cpp:

(WebCore::ServiceWorkerRegistration::getOrCreate):
(WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):

1:09 AM Changeset in webkit [287065] by Diego Pino Garcia
  • 2 edits in trunk/Source/WebCore

[GTK][WPE] Build fix for Debian Stable after r287015
https://bugs.webkit.org/show_bug.cgi?id=234332

Reviewed by Ryosuke Niwa.

  • Modules/push-api/PushMessageCrypto.cpp:

(WebCore::PushCrypto::decryptAES128GCMPayload):
(WebCore::PushCrypto::decryptAESGCMPayload):

1:03 AM Changeset in webkit [287064] by svillar@igalia.com
  • 4 edits in trunk

[css-flexbox] Absolutely positioned children should be aligned using the margin box
https://bugs.webkit.org/show_bug.cgi?id=234244

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-flexbox/abspos/position-absolute-014-expected.txt: Replaced FAIL

by PASS expectations.

Source/WebCore:

When aligning absolutely positioned children we must use the child's margin box. We were
using the border box instead, and thus ignoring margins when aligning absolutely positioned
flexbox children.

This fixes position-absolute-014.html from the WPT suite.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::availableAlignmentSpaceForChild): Removed the !isOutOfFlowPositioned()
ASSERT. It's true that in the past it was called only from code dealing with flex items but the code
implementing the function does not really have that restriction at all.
(WebCore::RenderFlexibleBox::staticCrossAxisPositionForPositionedChild): Directly call
availableAlignmentSpaceForChild() as it already uses the margin box.

Dec 14, 2021:

10:53 PM Changeset in webkit [287063] by jh718.park@samsung.com
  • 11 edits
    2 adds in trunk

Fix that height is calculated incorrectly when using display:table, box-sizing:border-box and padding.
https://bugs.webkit.org/show_bug.cgi?id=196175

Reviewed by Darin Adler.

Currently, box sizing type check is missing, so the height of display:table element's percent height child
is subtracted by its border and padding even when its 'box-sizing' is not 'content-box'.

This patch adds the missing box sizing type check.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box-expected.html: Added.
  • web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box.html: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computePercentageLogicalHeight const):

LayoutTests:

  • platform/gtk/fast/table/003-expected.txt:
  • platform/gtk/tables/mozilla/bugs/bug30692-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug30692-expected.txt:
  • platform/mac-catalina/tables/mozilla/bugs/bug30692-expected.txt:
  • platform/mac-mojave/tables/mozilla/bugs/bug30692-expected.txt:
  • platform/mac/fast/table/003-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug30692-expected.txt:
9:44 PM Changeset in webkit [287062] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[IFC][Integration] Use logical margin/border/padding values in layout
https://bugs.webkit.org/show_bug.cgi?id=234305

Reviewed by Antti Koivisto.

Can't use RenderBoxModelObject::borderStart/End logical values as they return values based on the _renderer_'s
direction and not the direction the renderer is aligned within.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::updateLayoutBoxDimensions):
(WebCore::LayoutIntegration::LineLayout::updateInlineBoxDimensions):

7:28 PM Changeset in webkit [287061] by Russell Epstein
  • 261 edits in branches/safari-613.1.12-branch

Revert "Distinguish contiguous SharedBuffer from non-contiguous one and guarantee immutability"

This reverts commit r286937.

7:00 PM Changeset in webkit [287060] by don.olmstead@sony.com
  • 11 edits
    1 add in trunk/Tools

[CMake] Modernize WPEToolingBackend
https://bugs.webkit.org/show_bug.cgi?id=234307

Reviewed by Adrian Perez de Castro.

Use WEBKIT_FRAMEWORK to build WPEToolingBackend and follow its conventions. Also support
different platform definitions so other ports using libwpe can also use this library.

Update includes to use <WPEToolingBackend/*.h>.

  • MiniBrowser/wpe/CMakeLists.txt:
  • MiniBrowser/wpe/main.cpp:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/glib/PlatformWPE.cmake:
  • TestWebKitAPI/glib/WebKitGLib/TestMain.h:
  • TestWebKitAPI/wpe/PlatformWebViewWPE.cpp:
  • WebKitTestRunner/PlatformWPE.cmake:
  • WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
  • WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
  • wpe/backends/CMakeLists.txt:
  • wpe/backends/PlatformWPE.cmake: Added.
5:25 PM Changeset in webkit [287059] by Jean-Yves Avenard
  • 14 edits in trunk/Source

Source/WebCore:
SourceBufferParser should be using contiguous SharedBuffer
https://bugs.webkit.org/show_bug.cgi?id=233865
rdar://problem/86085253

Reviewed by Eric Carlson.

The SharedBuffer sent to the SourceBufferParser can only ever contain one
DataSegment and we had assertions to that effect. The SharedBuffer class
type now guarantees how the data is structured and allow for more explicit
code which improves readability.
We also had some workarounds for the fact that SharedBuffer didn't use
thread-safe refcounting and instead we referenced the inner DataSegment.
This can be removed.

Covered by existing tests, no observable differences.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::appendBufferTimerFired):

  • Modules/mediasource/SourceBuffer.h:
  • platform/audio/cocoa/AudioFileReaderCocoa.cpp:
  • platform/graphics/SourceBufferPrivate.cpp:

(WebCore::SourceBufferPrivate::append):

  • platform/graphics/SourceBufferPrivate.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::append):

  • platform/graphics/cocoa/SourceBufferParser.cpp:

(WebCore::SourceBufferParser::Segment::Segment):
(WebCore::SourceBufferParser::Segment::size const):
(WebCore::SourceBufferParser::Segment::read const):
(WebCore::SourceBufferParser::Segment::takeSharedBuffer):
(WebCore::SourceBufferParser::Segment::getSharedBuffer const):

  • platform/graphics/cocoa/SourceBufferParser.h:
  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

Source/WebKit:
SourceBufferParser should be using contiguous shared buffer
https://bugs.webkit.org/show_bug.cgi?id=233865
rdar://problem/86085253

Reviewed by Eric Carlson.

  • WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:

(WebKit::SourceBufferPrivateRemote::append):

  • WebProcess/GPU/media/SourceBufferPrivateRemote.h:
5:23 PM Changeset in webkit [287058] by Ross Kirsling
  • 9 edits in trunk/Source/JavaScriptCore

[JSC] OpInstanceofCustom should be in CommonSlowPaths
https://bugs.webkit.org/show_bug.cgi?id=234316

Reviewed by Alexey Shvayka.

No tier has a fast path for OpInstanceofCustom and this is unlikely to change anytime soon.
As such, we should not be having LLInt and Baseline implement *separate* slow paths for this operation;
this patch straightforwardly makes use of CommonSlowPaths instead.

  • jit/JIT.cpp:

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

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

(JSC::JIT::emit_op_instanceof_custom): Deleted.
(JSC::JIT::emitSlow_op_instanceof_custom): Deleted.

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

(JSC::JSC_DEFINE_COMMON_SLOW_PATH):

  • runtime/CommonSlowPaths.h:
4:46 PM Changeset in webkit [287057] by Ryan Haddad
  • 3 edits in trunk/Tools

Bring up another iOS GPU Processes tester
https://bugs.webkit.org/show_bug.cgi?id=234016

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/config.json: Put the Catalina GPUP bot back and

use a different machine for the new iOS tester.

  • CISupport/build-webkit-org/factories_unittest.py: Update unit tests.

(TestExpectedBuildSteps):

3:48 PM Changeset in webkit [287056] by commit-queue@webkit.org
  • 8 edits in trunk

Remove properties set by NSURLProtocol on NSURLRequest before serializing
https://bugs.webkit.org/show_bug.cgi?id=232332
<rdar://79227845>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-14
Reviewed by Geoff Garen.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

NSURLRequest encodeWithCoder: encodes the protocol properties, which are not used by WebKit.
They exist to be used by NSURLProtocol. Serializing them can serialize a large amount of data,
so to be more efficient and hopefully run out of memory less, remove the properties before serializing.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::ResourceRequest>::encodePlatformData):

Source/WTF:

  • wtf/PlatformHave.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm:

(TestWebKitAPI::TEST):

3:31 PM Changeset in webkit [287055] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION (r286982): ASSERTION FAILED: clipRectsContext.rootLayer == m_clipRectsCache->m_clipRectsRoot[clipRectsType]
https://bugs.webkit.org/show_bug.cgi?id=234315

Unreviewed test gardening.

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

[reporelaypy] Update checkout with hook instead of polling (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=234243
<rdar://problem/86413065>

Unreviewed follow-up fix.

  • Scripts/libraries/reporelaypy/reporelaypy/init.py: Bump version.
  • Scripts/libraries/reporelaypy/reporelaypy/checkout.py:

(Checkout.update_for): main is not a recognized production branch, so handle
default branch first.

  • Scripts/libraries/reporelaypy/setup.py: Bump version.
3:04 PM Changeset in webkit [287053] by Jean-Yves Avenard
  • 5 edits in trunk/Source/WebCore

Make PreviewConverterProvider not modify the SharedBuffer once returned
https://bugs.webkit.org/show_bug.cgi?id=233923
rdar://problem/86149850

Reviewed by Youenn Fablet.

Covered by existing API tests.

  • loader/ios/LegacyPreviewLoader.h:
  • loader/ios/LegacyPreviewLoader.mm:

(WebCore::LegacyPreviewLoader::previewConverterDidStartConverting):
(WebCore::LegacyPreviewLoader::provideMainResourceForPreviewConverter):

  • platform/PreviewConverter.cpp:

(WebCore::PreviewConverter::updateMainResource):

  • platform/PreviewConverterProvider.h:
3:00 PM Changeset in webkit [287052] by Alan Coon
  • 1 copy in tags/Safari-612.4.4

Tag Safari-612.4.4.

2:38 PM Changeset in webkit [287051] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/WebCore

[Playstation] Fix build break after r286908
https://bugs.webkit.org/show_bug.cgi?id=234311

Unreviewed, build fix for PlayStation platform after r286908.
https://trac.webkit.org/changeset/286908/webkit

  • platform/graphics/PlatformVideoColorSpace.h:
2:36 PM Changeset in webkit [287050] by jer.noble@apple.com
  • 3 edits
    2 adds in trunk

Safari intermittently stopping playing Spotify Web Player (currentTime goes backwards)
https://bugs.webkit.org/show_bug.cgi?id=233257
<rdar://problem/85504967>

Reviewed by Eric Carlson.

Source/WebKit:

Test: media/video-currentTime-duration.html

Clamp currentMediaTime() to [0, durationMediaTime()].

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::currentMediaTime const):

LayoutTests:

  • media/video-currentTime-duration-expected.txt: Added.
  • media/video-currentTime-duration.html: Added.
2:20 PM Changeset in webkit [287049] by commit-queue@webkit.org
  • 8 edits in trunk

Revert r284816
https://bugs.webkit.org/show_bug.cgi?id=234308
LayoutTests/imported/w3c:

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-14
Reviewed by Eric Carlson.

  • web-platform-tests/service-workers/service-worker/fetch-audio-tainting.https-expected.txt:

Source/WebCore:

<rdar://86294293>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-14
Reviewed by Eric Carlson.

I made it so that resources without a Content-Length header wait until the whole resource finishes downloading
then we deliver it to CoreMedia to play with a known length. This works great, except it completely breaks
live streaming, which would just wait forever. Back to the status quo. We need to convince CoreMedia to accept
byte ranges with an unknown end to fix videos such as our test video when hosted by trac, which has no Content-Length at
https://trac.webkit.org/export/284633/webkit/trunk/Tools/TestWebKitAPI/Tests/WebKit/test.mp4

  • platform/network/cocoa/RangeResponseGenerator.mm:

(WebCore::synthesizedResponseForRange):
(WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived):

Source/WebKit:

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-14
Reviewed by Eric Carlson.

  • UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:

(WebKit::PlaybackSessionManagerProxy::seekableRangesVectorChanged):

Tools:

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-14
Reviewed by Eric Carlson.

  • TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm:

(TestWebKitAPI::TEST):

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

Adhere to DisplayList iterator's API contract in MemoryDisplayList::~InMemoryDisplayList()
https://bugs.webkit.org/show_bug.cgi?id=234264

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-12-14
Reviewed by Myles C. Maxfield.

The client is not adhearing to the DisplayList Iterator's API contract in MemoryDisplayList::~InMemoryDisplayList():
"Part of the iterator's API contract is that if the item is nullopt, you're not allowed to keep
iterating - doing this will lead to an infinite loop."

Here we now do so by breaking out of iteration if the item is nullopt.

  • platform/graphics/displaylists/InMemoryDisplayList.cpp:

(WebCore::DisplayList::InMemoryDisplayList::~InMemoryDisplayList):

2:10 PM Changeset in webkit [287047] by Alan Bujtas
  • 13 edits in trunk/Source/WebCore

[LFC] Let BoxGeometry have logical values only
https://bugs.webkit.org/show_bug.cgi?id=234304

Reviewed by Antti Koivisto.

This helps when converting logical (layout) values to physical (display) values.

  • display/css/DisplayFillLayerImageGeometry.cpp:

(WebCore::Display::geometryForLayer):

  • layout/formattingContexts/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):

  • layout/formattingContexts/FormattingGeometry.cpp:

(WebCore::Layout::FormattingGeometry::outOfFlowNonReplacedVerticalGeometry const):
(WebCore::Layout::FormattingGeometry::outOfFlowNonReplacedHorizontalGeometry const):
(WebCore::Layout::FormattingGeometry::outOfFlowReplacedVerticalGeometry const):
(WebCore::Layout::FormattingGeometry::outOfFlowReplacedHorizontalGeometry const):
(WebCore::Layout::FormattingGeometry::computedPadding const):

  • layout/formattingContexts/FormattingQuirks.cpp:

(WebCore::Layout::FormattingQuirks::heightValueOfNearestContainingBlockWithFixedHeight const):

  • layout/formattingContexts/block/BlockFormattingGeometry.cpp:

(WebCore::Layout::BlockFormattingGeometry::inFlowNonReplacedContentHeightAndMargin const):
(WebCore::Layout::BlockFormattingGeometry::inFlowNonReplacedContentWidthAndMargin const):

  • layout/formattingContexts/inline/InlineLine.cpp:

(WebCore::Layout::Line::initialize):
(WebCore::Layout::Line::addBorderAndPaddingEndForInlineBoxDecorationClone):

  • layout/formattingContexts/inline/InlineLineBox.cpp:

(WebCore::Layout::LineBox::logicalBorderBoxForInlineBox const):

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

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

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

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

  • layout/formattingContexts/table/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):

  • layout/layouttree/LayoutBoxGeometry.cpp:

(WebCore::Layout::BoxGeometry::paddingBox const):

  • layout/layouttree/LayoutBoxGeometry.h:

(WebCore::Layout::BoxGeometry::verticalBorder const):
(WebCore::Layout::BoxGeometry::horizontalBorder const):
(WebCore::Layout::BoxGeometry::borderAndPaddingStart const):
(WebCore::Layout::BoxGeometry::borderAndPaddingEnd const):
(WebCore::Layout::BoxGeometry::contentBoxTop const):
(WebCore::Layout::BoxGeometry::contentBoxLeft const):
(WebCore::Layout::BoxGeometry::paddingBoxTop const):
(WebCore::Layout::BoxGeometry::paddingBoxLeft const):
(WebCore::Layout::BoxGeometry::paddingBoxHeight const):
(WebCore::Layout::BoxGeometry::paddingBoxWidth const):
(WebCore::Layout::BoxGeometry::borderBoxHeight const):
(WebCore::Layout::BoxGeometry::borderBoxWidth const):
(WebCore::Layout::BoxGeometry::paddingBefore const):
(WebCore::Layout::BoxGeometry::paddingStart const):
(WebCore::Layout::BoxGeometry::paddingAfter const):
(WebCore::Layout::BoxGeometry::paddingEnd const):
(WebCore::Layout::BoxGeometry::verticalPadding const):
(WebCore::Layout::BoxGeometry::horizontalPadding const):
(WebCore::Layout::BoxGeometry::borderBefore const):
(WebCore::Layout::BoxGeometry::borderStart const):
(WebCore::Layout::BoxGeometry::borderAfter const):
(WebCore::Layout::BoxGeometry::borderEnd const):
(WebCore::Layout::BoxGeometry::paddingTop const): Deleted.
(WebCore::Layout::BoxGeometry::paddingLeft const): Deleted.
(WebCore::Layout::BoxGeometry::paddingBottom const): Deleted.
(WebCore::Layout::BoxGeometry::paddingRight const): Deleted.
(WebCore::Layout::BoxGeometry::borderTop const): Deleted.
(WebCore::Layout::BoxGeometry::borderLeft const): Deleted.
(WebCore::Layout::BoxGeometry::borderBottom const): Deleted.
(WebCore::Layout::BoxGeometry::borderRight const): Deleted.

2:04 PM Changeset in webkit [287046] by Patrick Angle
  • 2 edits in trunk/Source/WebCore

Web Inspector: After r286657, anonymous layers are providing an empty string for their grouping text
https://bugs.webkit.org/show_bug.cgi?id=234012

Reviewed by Devin Rousso.

Covered by existing test: LayoutTests/inspector/css/getMatchedStylesForNodeLayerGrouping.html

For anonymous layers, we should not provide the text property to the frontend, as there is technically no
text, not an empty string, provided by the author. This is effectively a minor optimization, as the frontend
does correctly handle an empty string the same way it handles no string.

  • inspector/InspectorStyleSheet.cpp:

(WebCore::buildArrayForGroupings):

1:31 PM Changeset in webkit [287045] by Jonathan Bedard
  • 7 edits
    2 adds in trunk/Tools

[reporelaypy] Update checkout with hook instead of polling
https://bugs.webkit.org/show_bug.cgi?id=234243
<rdar://problem/86413065>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/init.py: Bump version,

export HookProcessor and HookReceiver.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/checkout.py:

(Checkout.update_for): If a branch is new, we need to track it.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/database.py:

(Database.init): Use self.host and self.password.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/hooks.py: Added.

(HookProcessor): Class to process received hooks.
(HookReceiver): Class to receive hooks and queue them for processing.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/hooks_unittest.py: Added.

(HooksUnittest):
(HooksUnittest.setUp):
(HooksUnittest.test_receive):
(HooksUnittest.test_invalid):
(HooksUnittest.test_process):
(HooksUnittest.test_hmac):
(HooksUnittest.test_invalid_hmac):

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/webserver.py: Add hook routes,

if hooks are enabled.

  • Tools/Scripts/libraries/reporelaypy/run: Allow caller to enable hooks.
  • Tools/Scripts/libraries/reporelaypy/setup.py: Bump version.

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

1:16 PM Changeset in webkit [287044] by Russell Epstein
  • 4 edits in branches/safari-613.1.12-branch/Source/ThirdParty/ANGLE

Cherry-pick r286964. rdar://problem/86413146

[MacCatalyst] fix iOSMac after refactor in r286899
https://bugs.webkit.org/show_bug.cgi?id=234250

Reviewed by Dean Jackson.

Also includes a longer term fix for
https://bugs.webkit.org/show_bug.cgi?id=233977

Tested builds on mac, iOS, TV SDKs, plus iOSMac

  • src/common/platform.h:
  • src/libANGLE/renderer/metal/gen_mtl_format_table.py: (gen_image_map_switch_string):
  • src/libANGLE/renderer/metal/mtl_format_table_autogen.mm: (rx::mtl::Format::init):

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

12:57 PM Changeset in webkit [287043] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Take text-align offset into account when computing the RTL display box geometry
https://bugs.webkit.org/show_bug.cgi?id=234287

Reviewed by Antti Koivisto.

Use LineBox::rootInlineBoxAlignmentOffset to offset the visual start position for RTL display boxes.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

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

12:23 PM Changeset in webkit [287042] by Russell Epstein
  • 2 edits in branches/safari-613.1.12-branch/Source/WebCore

Cherry-pick r287011. rdar://problem/86438924

WebContent process crashes at ContentSecurityPolicySourceList::matchesAll
https://bugs.webkit.org/show_bug.cgi?id=234288
rdar://problem/86438924

Reviewed by Simon Fraser.

  • page/csp/ContentSecurityPolicyDirectiveList.cpp: (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForScript const):

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

12:11 PM Changeset in webkit [287041] by Russell Epstein
  • 9 edits in trunk/Source

Versioning.

WebKit-7613.1.13

12:11 PM Changeset in webkit [287040] by achristensen@apple.com
  • 13 edits in trunk

Add _WKContentRuleListAction.redirected and .modifiedHeaders
https://bugs.webkit.org/show_bug.cgi?id=234289

Reviewed by Tim Hatcher.

Source/WebCore:

These inform the UI process about new actions taken by the extension.

  • contentextensions/ContentExtensionsBackend.cpp:

(WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
(WebCore::ContentExtensions::applyResultsToRequest):

  • contentextensions/ContentRuleListResults.h:

(WebCore::ContentRuleListResults::shouldNotifyApplication const):
(WebCore::ContentRuleListResults::Result::encode const):
(WebCore::ContentRuleListResults::Result::decode):
(WebCore::ContentRuleListResults::Result::shouldNotifyApplication const): Deleted.

Source/WebKit:

  • UIProcess/API/APIContentRuleListAction.cpp:

(API::ContentRuleListAction::redirected const):
(API::ContentRuleListAction::modifiedHeaders const):

  • UIProcess/API/APIContentRuleListAction.h:
  • UIProcess/API/Cocoa/_WKContentRuleListAction.h:
  • UIProcess/API/Cocoa/_WKContentRuleListAction.mm:

(-[_WKContentRuleListAction redirected]):
(-[_WKContentRuleListAction modifiedHeaders]):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::contentRuleListNotification):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm:

(checkURLs):
(TEST_F):

  • TestWebKitAPI/cocoa/TestNavigationDelegate.h:
  • TestWebKitAPI/cocoa/TestNavigationDelegate.mm:

(-[TestNavigationDelegate _webView:contentRuleListWithIdentifier:performedAction:forURL:]):

12:06 PM Changeset in webkit [287039] by achristensen@apple.com
  • 15 edits in trunk

Move FTP disabling from NetworkLoad::start to NetworkDataTask::NetworkDataTask
https://bugs.webkit.org/show_bug.cgi?id=234280
Source/WebKit:

<rdar://85015428>

Reviewed by Brady Eidson.

A NetworkLoad synchronously failing has caused several issues.
This issue is when a WKDownload is prevented in this way, we don't have a WKDownload in the UI process yet,
and we haven't assigned it an identifier in the network process yet either, so we dereference null and send
unreceived messages in many places. To fix this issue, I move the FTP check to the NetworkDataTask constructor
like we do with blocked port checks and invalid URL checks. I also found that there is a race condition with
CFNetwork also failing to load an empty FTP URL, so we need to prevent us from asking CFNetwork to start a load
for which we have scheduled a failure.

Covered by an API test which used to hit all the horrible failures and now passes reliably.

  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::wasBlockedByDisabledFTP):

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

(WebKit::NetworkDataTask::NetworkDataTask):
(WebKit::NetworkDataTask::scheduleFailure):

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

(WebKit::NetworkLoad::start):
(WebKit::NetworkLoad::wasBlockedByDisabledFTP):

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

(WebKit::PingLoad::wasBlockedByDisabledFTP):

  • NetworkProcess/PingLoad.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::resume):

  • Shared/WebErrors.cpp:

(WebKit::ftpDisabledError):

  • Shared/WebErrors.h:

Tools:

Reviewed by Brady Eidson.

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
11:59 AM Changeset in webkit [287038] by Tyler Wilcock
  • 6 edits
    2 adds in trunk

Web Inspector: test webpage keeps reloading when Inspector is open
https://bugs.webkit.org/show_bug.cgi?id=234076

Reviewed by Chris Fleizach.

Source/WebCore:

https://trac.webkit.org/changeset/284335/webkit introduced the
potential for infinite recursion in AccessibilityObjectMac::shouldIgnoreGroup:

From accessibilityIsIgnored to computeAccessibilityIsIgnored to
defaultObjectInclusion to accessibilityPlatformIncludesObject to
shouldIgnoreGroup to accessibilityText to titleElementText to
exposesTitleUIElement to accessibilityIsIgnored to ...

shouldIgnoreGroup returns true if the group has one static text
child with the same content as the group's AX text. We fix the
recursion by making this check more conservative.

Rather than checking all of the AX text (which includes title text, alt text, help text,
visible text, placeholder text), only check the group's alt text and help text. This
accomplishes the original problem statement laid out in
https://bugs.webkit.org/show_bug.cgi?id=169924#c0 while avoiding
infinite recursion, as nothing in AccessibilityNodeObject::alternativeText or
AccessibilityNodeObject::helpText calls accessibilityIsIgnored.

Test: accessibility/mac/ignore-redundant-groups-crash.html

  • accessibility/AccessibilityNodeObject.h:

Move alternativeText and helpText method definitions from private to public
so they can be called by the static shouldIgnoreGroup method in AccessibilityObjectMac.

  • accessibility/mac/AccessibilityObjectMac.mm:

(WebCore::shouldIgnoreGroup):
Check only alt text and help text rather than all
AX text when deciding if a group should be ignored.

LayoutTests:

This patch fixes the potential for infinite recursion introduced by
https://trac.webkit.org/changeset/284335/webkit. See corresponding
Source/WebCore/ChangeLog for full details.

  • accessibility/mac/ignore-redundant-accessibility-text-groups-expected.txt:
  • accessibility/mac/ignore-redundant-accessibility-text-groups.html:

Add an aria-describedby testcase.

  • accessibility/mac/ignore-redundant-groups-crash-expected.txt: Added.
  • accessibility/mac/ignore-redundant-groups-crash.html:

Added. Exercises the crash testcase raised in
https://bugs.webkit.org/show_bug.cgi?id=234076 along with other
branches in AccessibilityNodeObject::alternativeText to prevent future
problems.

11:48 AM Changeset in webkit [287037] by Russell Epstein
  • 1 copy in branches/safari-613.1.12-branch

New branch.

11:45 AM Changeset in webkit [287036] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Take inline axis direction into account when computing horizontal alignment offset
https://bugs.webkit.org/show_bug.cgi?id=234286

Reviewed by Antti Koivisto.

This is in preparation for computing the content visual start when text-align is non-initial.

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

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

11:33 AM Changeset in webkit [287035] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Fix the build

  • Configurations/webpushtool.xcconfig:
11:23 AM Changeset in webkit [287034] by Megan Gardner
  • 2 edits in trunk/Source/WebKit

Attachment does not update after markup.
https://bugs.webkit.org/show_bug.cgi?id=234266

Reviewed by Wenson Hsieh.

If we don't call the deligate to inform Mail about the new attachment data,
it will not update and the original image will be sent.

  • UIProcess/mac/WKSharingServicePickerDelegate.mm:

(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):

11:05 AM Changeset in webkit [287033] by Russell Epstein
  • 1 copy in tags/Safari-613.1.11.6

Tag Safari-613.1.11.6.

11:01 AM Changeset in webkit [287032] by Russell Epstein
  • 9 edits in branches/safari-613.1.11-branch/Source

Versioning.

WebKit-7613.1.11.6

10:30 AM Changeset in webkit [287031] by Alan Coon
  • 3 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r286999. rdar://problem/86425321

Momentum Event Dispatcher: Excessive "kick" at the beginning of scrolling (especially on 60fps displays)
https://bugs.webkit.org/show_bug.cgi?id=234279
<rdar://problem/86425321>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::handleWheelEvent): (WebKit::MomentumEventDispatcher::didStartMomentumPhase): Instead of back-dating the animation to try to acquire a momentum-start delta, pass the one we got from the event through, and start the animation curve at momentum-start time. Also, critically, inset ourselves along the curve by the amount of that initial delta (since the time starts now).

Tested at both 60fps and 120fps, this significantly smooths out the
transition from fingers-down phase to the generated momentum phase,
avoiding the overly large initial delta.

  • WebProcess/WebPage/MomentumEventDispatcher.h:

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

10:20 AM Changeset in webkit [287030] by dino@apple.com
  • 16 edits
    1 add in trunk

Allow override of system's preferred color scheme
https://bugs.webkit.org/show_bug.cgi?id=234199
<rdar://problem/86366044>

Reviewed by Tim Horton.

Source/WebCore:

Use a user-specified preference for color-scheme before reading
the system value.

  • css/MediaQueryEvaluator.cpp:

(WebCore::prefersColorSchemeEvaluate): If the document loader was given
a preference, use that when evaluating the media query.

  • loader/DocumentLoader.cpp: New property - colorSchemePreference.

(WebCore::DocumentLoader::colorSchemePreference const):

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::setColorSchemePreference):

  • dom/Document.cpp:

(WebCore::Document::useDarkAppearance const): Check the DocumentLoader here too.

Source/WebKit:

Expose new Private API that allows the user to give an explicit per-page preference
for light or dark color schemes rather than reading the system value.

  • Scripts/webkit/messages.py:

(headers_for_type): Add header for DocumentLoader.

  • Shared/WebsitePoliciesData.cpp: Encode the new value in the policies sent

to the Web Process.
(WebKit::WebsitePoliciesData::encode const):
(WebKit::WebsitePoliciesData::decode):
(WebKit::WebsitePoliciesData::applyToDocumentLoader):

  • Shared/WebsitePoliciesData.h:
  • UIProcess/API/APIWebsitePolicies.cpp: Expose a new policy "colorSchemePreference".

(API::WebsitePolicies::copy const):
(API::WebsitePolicies::data):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/Cocoa/WKWebpagePreferences.mm: Expose a new private API "_colorSchemePreference".

(-[WKWebpagePreferences _colorSchemePreference]):
(-[WKWebpagePreferences _setColorSchemePreference:]):

  • UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:

Tools:

New API test that checks the color-scheme after
explicitly setting it.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/color-scheme.html: Added. Note: Xcode was

being difficult and wouldn't let me put this file in the right order
for the Copy Build Phase :(

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
10:03 AM Changeset in webkit [287029] by commit-queue@webkit.org
  • 1 edit
    2 adds in trunk/LayoutTests

Add test case for execCommand to verify inserting an ordered list and deletion
https://bugs.webkit.org/show_bug.cgi?id=234113
<rdar://85926354>

Patch by Brandon Stewart <Brandon> on 2021-12-14
Reviewed by Chris Dumez.

Add test to verify correct execution of execCommand when inserting an ordered
list and calling delete.

  • editing/execCommand/insert-ordered-list-and-delete-expected.txt: Added.
  • editing/execCommand/insert-ordered-list-and-delete.html: Added.
9:20 AM Changeset in webkit [287028] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Make the LineBox content (text runs and inline level boxes) relative to the root inline box.
https://bugs.webkit.org/show_bug.cgi?id=234285

Reviewed by Antti Koivisto.

Let's decouple the root inline box's logical left and the text-align based horizontal offset and
also make the content inside the root inline box relative to it.
This is in preparation for handling text-align with non-RTL content.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

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

  • layout/formattingContexts/inline/InlineLineBox.cpp:

(WebCore::Layout::LineBox::LineBox):
(WebCore::Layout::LineBox::logicalRectForTextRun const):

  • layout/formattingContexts/inline/InlineLineBox.h:

(WebCore::Layout::LineBox::rootInlineBoxAlignmentOffset const):

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

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

9:05 AM Changeset in webkit [287027] by Russell Epstein
  • 1 copy in tags/Safari-613.1.11.5

Tag Safari-613.1.11.5.

9:05 AM Changeset in webkit [287026] by Russell Epstein
  • 1 delete in tags/Safari-613.1.11.5

Delete tag.

8:43 AM Changeset in webkit [287025] by Angelos Oikonomopoulos
  • 2 edits in trunk/Tools

[JSC] Fix LocalJumpError in run-jsc-stress-tests
https://bugs.webkit.org/show_bug.cgi?id=234295

Reviewed by Michael Catanzaro.

Ruby code cannot return from a Proc; use an if/else instead. This fixes
the LocalJumpError reported in https://bugs.webkit.org/show_bug.cgi?id=233926.

  • Scripts/run-jsc-stress-tests:
8:29 AM Changeset in webkit [287024] by commit-queue@webkit.org
  • 7 edits in trunk

TextDecoder doesn't detect invalid UTF-8 sequences early enough
https://bugs.webkit.org/show_bug.cgi?id=233921

Patch by Andreu Botella <andreu@andreubotella.com> on 2021-12-14
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import WPT tests from
https://github.com/web-platform-tests/wpt/pull/31537.

  • web-platform-tests/encoding/textdecoder-eof.any.js:

(test):

  • web-platform-tests/encoding/textdecoder-streaming.any-expected.txt:
  • web-platform-tests/encoding/textdecoder-streaming.any.js:

(string_appeared_here.forEach.):
(string_appeared_here.forEach.test):
(string_appeared_here.forEach):

  • web-platform-tests/encoding/textdecoder-streaming.any.worker-expected.txt:

Source/WebCore/PAL:

In streaming mode, when TextCodecUTF8 found a lead byte for which a
valid sequence would span longer than the currently available bytes, it
used to defer any processing of that sequence until all such bytes were
available, even if errors could be detected earlier. Additionally, if
the stream was flushed at that point, it would emit a single replacement
character, regardless of whether the remaining bytes formed a valid
sequence, even if they had lead bytes, resulting in skipped characters.
Both issues are solved by always checking the validity of partial
sequences.

The approach used in this patch uses decodeNonASCIISequence to find
the length of the maximal subpart of a partial sequence, and if the
length is equal to the partial sequence size and we're not at EOF, we
don't emit the error. This is enough to handle the missing characters at
EOF, and when combined with changing the condition of the outer do-while
loops in the decode method from flush && m_partialSequenceSize to
only m_partialSequenceSize, it also fixes the streaming issue.

This patch is a port of
https://chromium-review.googlesource.com/c/chromium/src/+/3263938

Tests: imported/w3c/web-platform-tests/encoding/textdecoder-eof.any.html

imported/w3c/web-platform-tests/encoding/textdecoder-stream.any.html

  • pal/text/TextCodecUTF8.cpp:

(PAL::TextCodecUTF8::handlePartialSequence): Changed to always process
partial sequences.
(PAL::TextCodecUTF8::decode): Changed the loop condition of the outer
do-while loops to not depend on flush.

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

Incorrect aspect ratio size
https://bugs.webkit.org/show_bug.cgi?id=234148

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

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-036-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-036.html: Added.

Source/WebCore:

We previously did a LayoutUnit conversion for the aspect ratio parameter, possibly because
blockSizeFromAspectRatio/inlineSizeFromAspectRatio changed the parameter type over time.
Since this conversion loses precision, just pass as double.

Test: imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-036.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::constrainLogicalHeightByMinMax const):
(WebCore::RenderBox::computeLogicalHeight const):
(WebCore::RenderBox::availableLogicalHeightUsing const):
(WebCore::RenderBox::computePositionedLogicalHeightUsing const):
(WebCore::RenderBox::computeLogicalWidthFromAspectRatioInternal const):
(WebCore::RenderBox::computeMinMaxLogicalWidthFromAspectRatio const):

7:49 AM Changeset in webkit [287022] by Razvan Caliman
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Computed Panel: Adjust color of CSS Variables grouping mode control
https://bugs.webkit.org/show_bug.cgi?id=234246
<rdar://problem/86414682>

Reviewed by Devin Rousso.

Change color of CSS variables grouping mode scope bar from the system accent color to transparent
so it doesn't draw disproportionate attention to itself.

  • UserInterface/Views/ComputedStyleDetailsPanel.css:

(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode:not(:hover)):
(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode.default-item-selected:not(:hover)): Deleted.
(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode.default-item-selected:hover): Deleted.

2:48 AM Changeset in webkit [287021] by Jean-Yves Avenard
  • 498 edits in trunk

PerformanceTests:
Distinguish contiguous SharedBuffer from non-contiguous one and guarantee immutability: part 3
https://bugs.webkit.org/show_bug.cgi?id=233677

Reviewed by Youenn Fablet.

  • DecoderTest/DecoderTest/main.mm:

(main):

Source/JavaScriptCore:
Rename SharedBuffer classes.
https://bugs.webkit.org/show_bug.cgi?id=233677
rdar://problem/85963900

Reviewed by Youenn Fablet.

SharedBuffer are renamed FragmentedSharedBuffer and
ContiguousSharedBuffer to SharedBuffer to better reflect their actual
types.

  • runtime/ArrayBuffer.h:

Source/WebCore:
Rename SharedBuffer classes.
https://bugs.webkit.org/show_bug.cgi?id=233677
rdar://problem/85963900

Reviewed by Youenn Fablet.

SharedBuffer are renamed FragmentedSharedBuffer and
ContiguousSharedBuffer to SharedBuffer to better reflect their actual
types.

Rename only, no change in behaviour.

  • Modules/async-clipboard/ClipboardImageReader.cpp:
  • Modules/async-clipboard/ClipboardImageReader.h:
  • Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
  • Modules/async-clipboard/ClipboardItemBindingsDataSource.h:
  • Modules/async-clipboard/ios/ClipboardImageReaderIOS.mm:
  • Modules/async-clipboard/mac/ClipboardImageReaderMac.mm:
  • Modules/cache/CacheStorageConnection.cpp:
  • Modules/cache/DOMCache.cpp:
  • Modules/cache/DOMCache.h:
  • Modules/cache/DOMCacheEngine.cpp:
  • Modules/cache/DOMCacheEngine.h:
  • Modules/encryptedmedia/CDM.cpp:
  • Modules/encryptedmedia/CDM.h:
  • Modules/encryptedmedia/CDMClient.h:
  • Modules/encryptedmedia/InitDataRegistry.cpp:
  • Modules/encryptedmedia/InitDataRegistry.h:
  • Modules/encryptedmedia/MediaKeySession.cpp:
  • Modules/encryptedmedia/MediaKeySession.h:
  • Modules/encryptedmedia/MediaKeyStatusMap.cpp:
  • Modules/encryptedmedia/MediaKeyStatusMap.h:
  • Modules/encryptedmedia/MediaKeys.cpp:
  • Modules/encryptedmedia/MediaKeys.h:
  • Modules/fetch/FetchBody.cpp:
  • Modules/fetch/FetchBody.h:
  • Modules/fetch/FetchBodyConsumer.cpp:
  • Modules/fetch/FetchBodyConsumer.h:
  • Modules/fetch/FetchLoader.cpp:
  • Modules/fetch/FetchLoader.h:
  • Modules/fetch/FetchResponse.cpp:
  • Modules/fetch/FetchResponse.h:
  • Modules/highlight/AppHighlight.h:
  • Modules/highlight/AppHighlightRangeData.cpp:
  • Modules/highlight/AppHighlightRangeData.h:
  • Modules/highlight/AppHighlightStorage.cpp:
  • Modules/highlight/AppHighlightStorage.h:
  • Modules/indexeddb/server/IDBSerialization.cpp:
  • Modules/indexeddb/server/IDBSerialization.h:
  • Modules/mediarecorder/MediaRecorder.cpp:
  • Modules/mediarecorder/MediaRecorder.h:
  • Modules/mediasession/MediaMetadata.cpp:
  • Modules/mediasource/SourceBuffer.cpp:
  • Modules/mediasource/SourceBuffer.h:
  • Modules/mediastream/RTCDataChannelRemoteHandler.h:
  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:
  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
  • Modules/streams/ReadableStreamSink.h:
  • bindings/js/JSDOMGlobalObject.cpp:
  • bindings/js/ScriptBufferSourceProvider.h:
  • bindings/js/SerializedScriptValue.h:
  • css/CSSFontFaceSource.cpp:
  • css/CSSFontFaceSource.h:
  • dom/DataTransfer.cpp:
  • editing/Editor.cpp:
  • editing/Editor.h:
  • editing/SerializedAttachmentData.h:
  • editing/WebContentReader.h:
  • editing/WebCorePasteboardFileReader.cpp:
  • editing/WebCorePasteboardFileReader.h:
  • editing/cocoa/EditorCocoa.mm:
  • editing/cocoa/HTMLConverter.mm:
  • editing/cocoa/WebContentReaderCocoa.mm:
  • editing/gtk/WebContentReaderGtk.cpp:
  • editing/mac/EditorMac.mm:
  • fileapi/Blob.h:
  • fileapi/NetworkSendQueue.cpp:
  • fileapi/NetworkSendQueue.h:
  • html/FTPDirectoryDocument.cpp:
  • html/HTMLAttachmentElement.cpp:
  • html/HTMLAttachmentElement.h:
  • html/HTMLMediaElement.cpp:
  • html/HTMLMediaElement.h:
  • html/ImageDocument.cpp:
  • inspector/InspectorInstrumentation.cpp:
  • inspector/InspectorInstrumentation.h:
  • inspector/InspectorInstrumentationWebKit.cpp:
  • inspector/InspectorInstrumentationWebKit.h:
  • inspector/NetworkResourcesData.cpp:
  • inspector/NetworkResourcesData.h:
  • inspector/agents/InspectorNetworkAgent.cpp:
  • inspector/agents/InspectorNetworkAgent.h:
  • inspector/agents/InspectorPageAgent.cpp:
  • inspector/agents/InspectorPageAgent.h:
  • loader/ContentFilter.cpp:
  • loader/CrossOriginPreflightChecker.cpp:
  • loader/DocumentLoader.cpp:
  • loader/DocumentLoader.h:
  • loader/DocumentThreadableLoader.cpp:
  • loader/EmptyClients.cpp:
  • loader/FrameLoader.cpp:
  • loader/FrameLoader.h:
  • loader/FrameLoaderClient.h:
  • loader/LoaderStrategy.h:
  • loader/NetscapePlugInStreamLoader.cpp:
  • loader/NetscapePlugInStreamLoader.h:
  • loader/ResourceCryptographicDigest.cpp:
  • loader/ResourceCryptographicDigest.h:
  • loader/ResourceLoader.cpp:
  • loader/ResourceLoader.h:
  • loader/SubresourceLoader.cpp:
  • loader/SubresourceLoader.h:
  • loader/SubstituteData.h:
  • loader/SubstituteResource.h:
  • loader/appcache/ApplicationCacheHost.cpp:
  • loader/appcache/ApplicationCacheHost.h:
  • loader/appcache/ApplicationCacheResource.cpp:
  • loader/appcache/ApplicationCacheResource.h:
  • loader/appcache/ApplicationCacheStorage.cpp:
  • loader/appcache/ApplicationCacheStorage.h:
  • loader/archive/ArchiveFactory.cpp:
  • loader/archive/ArchiveFactory.h:
  • loader/archive/ArchiveResource.cpp:
  • loader/archive/ArchiveResource.h:
  • loader/archive/cf/LegacyWebArchive.cpp:
  • loader/archive/cf/LegacyWebArchive.h:
  • loader/archive/mhtml/MHTMLArchive.cpp:
  • loader/archive/mhtml/MHTMLArchive.h:
  • loader/archive/mhtml/MHTMLParser.cpp:
  • loader/archive/mhtml/MHTMLParser.h:
  • loader/cache/CachedApplicationManifest.cpp:
  • loader/cache/CachedApplicationManifest.h:
  • loader/cache/CachedCSSStyleSheet.cpp:
  • loader/cache/CachedCSSStyleSheet.h:
  • loader/cache/CachedFont.cpp:
  • loader/cache/CachedFont.h:
  • loader/cache/CachedImage.cpp:
  • loader/cache/CachedImage.h:
  • loader/cache/CachedRawResource.cpp:
  • loader/cache/CachedRawResource.h:
  • loader/cache/CachedResource.cpp:
  • loader/cache/CachedResource.h:
  • loader/cache/CachedSVGDocument.cpp:
  • loader/cache/CachedSVGDocument.h:
  • loader/cache/CachedSVGFont.cpp:
  • loader/cache/CachedSVGFont.h:
  • loader/cache/CachedScript.cpp:
  • loader/cache/CachedScript.h:
  • loader/cache/CachedTextTrack.cpp:
  • loader/cache/CachedTextTrack.h:
  • loader/cache/CachedXSLStyleSheet.cpp:
  • loader/cache/CachedXSLStyleSheet.h:
  • loader/cocoa/DiskCacheMonitorCocoa.h:
  • loader/cocoa/DiskCacheMonitorCocoa.mm:
  • loader/ios/LegacyPreviewLoader.h:
  • loader/ios/LegacyPreviewLoader.mm:
  • page/EditorClient.h:
  • page/Page.cpp:
  • page/PageSerializer.cpp:
  • page/PageSerializer.h:
  • page/ShareData.h:
  • page/ShareDataReader.cpp:
  • platform/KeyedCoding.h:
  • platform/NowPlayingManager.h:
  • platform/Pasteboard.cpp:
  • platform/Pasteboard.h:
  • platform/PasteboardCustomData.cpp:
  • platform/PasteboardCustomData.h:
  • platform/PasteboardStrategy.h:
  • platform/PasteboardWriterData.h:
  • platform/PlatformContentFilter.h:
  • platform/PlatformPasteboard.h:
  • platform/PreviewConverter.cpp:
  • platform/PreviewConverter.h:
  • platform/PreviewConverterClient.h:
  • platform/PreviewConverterProvider.h:
  • platform/PromisedAttachmentInfo.h:
  • platform/SharedBuffer.cpp:
  • platform/SharedBuffer.h:
  • platform/SharedBufferChunkReader.cpp:
  • platform/SharedBufferChunkReader.h:
  • platform/StaticPasteboard.cpp:
  • platform/StaticPasteboard.h:
  • platform/audio/NowPlayingInfo.h:
  • platform/audio/cocoa/AudioFileReaderCocoa.cpp:
  • platform/cf/KeyedEncoderCF.cpp:
  • platform/cf/KeyedEncoderCF.h:
  • platform/cf/SharedBufferCF.cpp:
  • platform/cocoa/NetworkExtensionContentFilter.h:
  • platform/cocoa/NetworkExtensionContentFilter.mm:
  • platform/cocoa/ParentalControlsContentFilter.h:
  • platform/cocoa/ParentalControlsContentFilter.mm:
  • platform/cocoa/PasteboardCocoa.mm:
  • platform/cocoa/SharedBufferCocoa.mm:
  • platform/encryptedmedia/CDMInstance.h:
  • platform/encryptedmedia/CDMInstanceSession.h:
  • platform/encryptedmedia/CDMPrivate.h:
  • platform/encryptedmedia/CDMProxy.cpp:
  • platform/encryptedmedia/CDMProxy.h:
  • platform/encryptedmedia/CDMUtilities.cpp:
  • platform/encryptedmedia/CDMUtilities.h:
  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:
  • platform/encryptedmedia/clearkey/CDMClearKey.h:
  • platform/generic/KeyedEncoderGeneric.cpp:
  • platform/generic/KeyedEncoderGeneric.h:
  • platform/glib/KeyedEncoderGlib.cpp:
  • platform/glib/KeyedEncoderGlib.h:
  • platform/glib/SharedBufferGlib.cpp:
  • platform/graphics/Font.cpp:
  • platform/graphics/Font.h:
  • platform/graphics/FontPlatformData.h:
  • platform/graphics/Image.cpp:
  • platform/graphics/Image.h:
  • platform/graphics/ImageBackingStore.h:
  • platform/graphics/ImageDecoder.cpp:
  • platform/graphics/ImageDecoder.h:
  • platform/graphics/ImageSource.cpp:
  • platform/graphics/ImageSource.h:
  • platform/graphics/Model.cpp:
  • platform/graphics/Model.h:
  • platform/graphics/PlatformMediaResourceLoader.h:
  • platform/graphics/SourceBufferPrivate.cpp:
  • platform/graphics/SourceBufferPrivate.h:
  • platform/graphics/WOFFFileFormat.cpp:
  • platform/graphics/WOFFFileFormat.h:
  • platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
  • platform/graphics/avfoundation/CDMFairPlayStreaming.h:
  • platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
  • platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
  • platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
  • platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
  • platform/graphics/cairo/FontCustomPlatformData.h:
  • platform/graphics/cg/ImageDecoderCG.cpp:
  • platform/graphics/cg/ImageDecoderCG.h:
  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:
  • platform/graphics/cocoa/SourceBufferParser.cpp:
  • platform/graphics/cocoa/SourceBufferParser.h:
  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:
  • platform/graphics/coretext/FontPlatformDataCoreText.cpp:
  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:
  • platform/graphics/displaylists/DisplayListItemBuffer.h:
  • platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:
  • platform/graphics/gstreamer/GStreamerCommon.cpp:
  • platform/graphics/gstreamer/GStreamerCommon.h:
  • platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:
  • platform/graphics/gstreamer/ImageDecoderGStreamer.h:
  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
  • platform/graphics/gstreamer/eme/CDMProxyClearKey.h:
  • platform/graphics/gstreamer/eme/CDMThunder.cpp:
  • platform/graphics/gstreamer/eme/CDMThunder.h:
  • platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp:
  • platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:
  • platform/graphics/mac/FontCustomPlatformData.cpp:
  • platform/graphics/mac/FontCustomPlatformData.h:
  • platform/graphics/opentype/OpenTypeMathData.cpp:
  • platform/graphics/opentype/OpenTypeMathData.h:
  • platform/graphics/opentype/OpenTypeTypes.h:
  • platform/graphics/opentype/OpenTypeUtilities.cpp:
  • platform/graphics/opentype/OpenTypeUtilities.h:
  • platform/graphics/opentype/OpenTypeVerticalData.cpp:
  • platform/graphics/win/DirectWriteUtilities.h:
  • platform/graphics/win/FontCustomPlatformData.cpp:
  • platform/graphics/win/FontCustomPlatformData.h:
  • platform/graphics/win/FontCustomPlatformDataCairo.cpp:
  • platform/graphics/win/FontPlatformDataCairoWin.cpp:
  • platform/graphics/win/FontPlatformDataWin.cpp:
  • platform/graphics/win/ImageDecoderDirect2D.cpp:
  • platform/graphics/win/ImageDecoderDirect2D.h:
  • platform/graphics/win/ImageWin.cpp:
  • platform/gtk/SelectionData.h:
  • platform/image-decoders/ScalableImageDecoder.cpp:
  • platform/image-decoders/ScalableImageDecoder.h:
  • platform/image-decoders/avif/AVIFImageReader.cpp:
  • platform/image-decoders/avif/AVIFImageReader.h:
  • platform/image-decoders/bmp/BMPImageDecoder.cpp:
  • platform/image-decoders/bmp/BMPImageDecoder.h:
  • platform/image-decoders/bmp/BMPImageReader.h:
  • platform/image-decoders/cairo/ImageBackingStoreCairo.cpp:
  • platform/image-decoders/gif/GIFImageDecoder.cpp:
  • platform/image-decoders/gif/GIFImageDecoder.h:
  • platform/image-decoders/gif/GIFImageReader.h:
  • platform/image-decoders/ico/ICOImageDecoder.cpp:
  • platform/image-decoders/ico/ICOImageDecoder.h:
  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
  • platform/image-decoders/jpeg/JPEGImageDecoder.h:
  • platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp:
  • platform/image-decoders/png/PNGImageDecoder.cpp:
  • platform/image-decoders/webp/WEBPImageDecoder.cpp:
  • platform/image-decoders/webp/WEBPImageDecoder.h:
  • platform/ios/PasteboardIOS.mm:
  • platform/ios/PlatformPasteboardIOS.mm:
  • platform/mac/PasteboardMac.mm:
  • platform/mac/PlatformPasteboardMac.mm:
  • platform/mediarecorder/MediaRecorderPrivate.h:
  • platform/mediarecorder/MediaRecorderPrivateMock.cpp:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
  • platform/network/DataURLDecoder.h:
  • platform/network/FormData.cpp:
  • platform/network/FormData.h:
  • platform/network/ResourceHandle.h:
  • platform/network/ResourceHandleClient.cpp:
  • platform/network/ResourceHandleClient.h:
  • platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
  • platform/network/cocoa/RangeResponseGenerator.mm:
  • platform/network/cocoa/WebCoreNSURLSession.h:
  • platform/network/cocoa/WebCoreNSURLSession.mm:
  • platform/network/curl/CurlDownload.cpp:
  • platform/network/curl/CurlDownload.h:
  • platform/network/curl/CurlMultipartHandle.cpp:
  • platform/network/curl/CurlMultipartHandle.h:
  • platform/network/curl/CurlMultipartHandleClient.h:
  • platform/network/curl/CurlRequest.cpp:
  • platform/network/curl/CurlRequest.h:
  • platform/network/curl/CurlRequestClient.h:
  • platform/network/curl/CurlResourceHandleDelegate.cpp:
  • platform/network/curl/CurlResourceHandleDelegate.h:
  • platform/network/ios/LegacyPreviewLoaderClient.h:
  • platform/posix/SharedBufferPOSIX.cpp:
  • platform/win/PasteboardWin.cpp:
  • platform/win/SharedBufferWin.cpp:
  • testing/MockCDMFactory.cpp:
  • testing/MockCDMFactory.h:
  • testing/MockContentFilter.cpp:
  • testing/MockContentFilter.h:
  • workers/ScriptBuffer.h:
  • workers/WorkerFontLoadRequest.cpp:
  • workers/service/context/ServiceWorkerFetch.cpp:
  • workers/service/context/ServiceWorkerFetch.h:
  • workers/service/server/SWScriptStorage.cpp:
  • xml/XSLTProcessorLibxslt.cpp:
  • xml/parser/XMLDocumentParserLibxml2.cpp:

Source/WebKit:
Rename SharedBuffer classes.
https://bugs.webkit.org/show_bug.cgi?id=233677
rdar://problem/85963900

Reviewed by Youenn Fablet.

SharedBuffer are renamed FragmentedSharedBuffer and
ContiguousSharedBuffer to SharedBuffer to better reflect their actual
types.

  • GPUProcess/media/RemoteCDMInstanceProxy.cpp:
  • GPUProcess/media/RemoteCDMInstanceProxy.h:
  • GPUProcess/media/RemoteCDMInstanceSessionProxy.cpp:
  • GPUProcess/media/RemoteCDMInstanceSessionProxy.h:
  • GPUProcess/media/RemoteCDMProxy.cpp:
  • GPUProcess/media/RemoteCDMProxy.h:
  • GPUProcess/media/RemoteLegacyCDMProxy.h:
  • GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp:
  • GPUProcess/media/RemoteLegacyCDMSessionProxy.h:
  • GPUProcess/media/RemoteMediaResource.cpp:
  • GPUProcess/media/RemoteMediaResource.h:
  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:
  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/NetworkCORSPreflightChecker.cpp:
  • NetworkProcess/NetworkCORSPreflightChecker.h:
  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkLoad.cpp:
  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkLoadClient.h:
  • NetworkProcess/NetworkResourceLoader.cpp:
  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/PingLoad.cpp:
  • NetworkProcess/PingLoad.h:
  • NetworkProcess/PreconnectTask.cpp:
  • NetworkProcess/PreconnectTask.h:
  • NetworkProcess/ServiceWorker/ServiceWorkerNavigationPreloader.cpp:
  • NetworkProcess/ServiceWorker/ServiceWorkerNavigationPreloader.h:
  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:
  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.h:
  • NetworkProcess/cache/CacheStorageEngineCache.cpp:
  • NetworkProcess/cache/NetworkCache.cpp:
  • NetworkProcess/cache/NetworkCache.h:
  • NetworkProcess/cache/NetworkCacheEntry.cpp:
  • NetworkProcess/cache/NetworkCacheEntry.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
  • NetworkProcess/cache/PrefetchCache.cpp:
  • NetworkProcess/cache/PrefetchCache.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:
  • NetworkProcess/curl/NetworkDataTaskCurl.h:
  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:
  • NetworkProcess/webrtc/NetworkRTCProvider.h:
  • Platform/IPC/SharedBufferCopy.cpp:
  • Platform/IPC/SharedBufferCopy.h:
  • Platform/IPC/SharedBufferDataReference.h:
  • Platform/SharedMemory.cpp:
  • Platform/SharedMemory.h:
  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
  • Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp:
  • Shared/ShareableResource.cpp:
  • Shared/ShareableResource.h:
  • Shared/WebCoreArgumentCoders.cpp:
  • Shared/WebCoreArgumentCoders.h:
  • Shared/WebHitTestResultData.cpp:
  • Shared/gtk/ArgumentCodersGtk.cpp:
  • Shared/win/WebCoreArgumentCodersWin.cpp:
  • UIProcess/API/APIAttachment.cpp:
  • UIProcess/API/APIAttachment.h:
  • UIProcess/API/APIContentRuleListStore.cpp:
  • UIProcess/API/APIContentRuleListStore.h:
  • UIProcess/API/APINavigationClient.h:
  • UIProcess/API/Cocoa/APIAttachmentCocoa.mm:
  • UIProcess/API/gtk/DropTargetGtk3.cpp:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:
  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebURLSchemeTask.cpp:
  • UIProcess/WebURLSchemeTask.h:
  • UIProcess/gtk/Clipboard.h:
  • UIProcess/gtk/ClipboardGtk3.cpp:
  • UIProcess/gtk/ClipboardGtk4.cpp:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:
  • UIProcess/ios/WKContentViewInteraction.mm:
  • UIProcess/ios/WebPageProxyIOS.mm:
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:
  • UIProcess/mac/WebPageProxyMac.mm:
  • WebProcess/GPU/media/RemoteCDM.cpp:
  • WebProcess/GPU/media/RemoteCDM.h:
  • WebProcess/GPU/media/RemoteCDMInstance.cpp:
  • WebProcess/GPU/media/RemoteCDMInstance.h:
  • WebProcess/GPU/media/RemoteCDMInstanceSession.cpp:
  • WebProcess/GPU/media/RemoteCDMInstanceSession.h:
  • WebProcess/GPU/media/RemoteImageDecoderAVF.cpp:
  • WebProcess/GPU/media/RemoteImageDecoderAVF.h:
  • WebProcess/GPU/media/RemoteImageDecoderAVFManager.cpp:
  • WebProcess/GPU/media/RemoteImageDecoderAVFManager.h:
  • WebProcess/GPU/media/RemoteLegacyCDMSession.cpp:
  • WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:
  • WebProcess/GPU/media/SourceBufferPrivateRemote.h:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:
  • WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:
  • WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
  • WebProcess/Network/NetworkProcessConnection.cpp:
  • WebProcess/Network/WebResourceLoader.cpp:
  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:
  • WebProcess/Plugins/Plugin.h:
  • WebProcess/Plugins/PluginView.cpp:
  • WebProcess/Plugins/PluginView.h:
  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:
  • WebProcess/WebCoreSupport/WebEditorClient.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:
  • WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.cpp:
  • WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h:
  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
  • WebProcess/WebPage/WebFrame.cpp:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:
  • WebProcess/WebPage/mac/WebPageMac.mm:
  • WebProcess/win/WebProcessWin.cpp:

Source/WebKitLegacy:
Rename SharedBuffer classes.
https://bugs.webkit.org/show_bug.cgi?id=233677
rdar://problem/85963900

Reviewed by Youenn Fablet.

SharedBuffer are renamed FragmentedSharedBuffer and
ContiguousSharedBuffer to SharedBuffer to better reflect their actual
types.

  • WebCoreSupport/PingHandle.h:

Source/WebKitLegacy/mac:
Rename SharedBuffer classes.
https://bugs.webkit.org/show_bug.cgi?id=233677
rdar://problem/85963900

Reviewed by Youenn Fablet.

SharedBuffer are renamed FragmentedSharedBuffer and
ContiguousSharedBuffer to SharedBuffer to better reflect their actual
types.

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm:
  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:
  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:
  • WebView/WebDataSource.mm:
  • WebView/WebHTMLView.mm:
  • WebView/WebResource.mm:

Source/WebKitLegacy/win:
Rename SharedBuffer classes.
https://bugs.webkit.org/show_bug.cgi?id=233677
rdar://problem/85963900

Reviewed by Youenn Fablet.

SharedBuffer are renamed FragmentedSharedBuffer and
ContiguousSharedBuffer to SharedBuffer to better reflect their actual
types.

  • MemoryStream.cpp:
  • MemoryStream.h:
  • WebArchive.cpp:
  • WebCoreSupport/WebEditorClient.cpp:
  • WebCoreSupport/WebEditorClient.h:
  • WebFrame.cpp:
  • WebFrame.h:
  • WebKitDLL.cpp:
  • WebResource.cpp:
  • WebResource.h:

Tools:
Rename SharedBuffer classes.
https://bugs.webkit.org/show_bug.cgi?id=233677
rdar://problem/85963900

Reviewed by Youenn Fablet.

SharedBuffer are renamed FragmentedSharedBuffer and
ContiguousSharedBuffer to SharedBuffer to better reflect their actual
types.

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp:
  • TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:
  • TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
  • TestWebKitAPI/Tests/WebCore/SharedBufferTest.cpp:
  • TestWebKitAPI/Tests/WebCore/SharedBufferTest.h:
  • TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
  • TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:
  • TestWebKitAPI/win/TestWebCoreStubs.cpp:
2:43 AM Changeset in webkit [287020] by Carlos Garcia Campos
  • 9 edits in trunk/Source/WebCore

[GTK][a11y] Register the wrappers tree when org.a11y.atspi.Cache.GetItems() is called
https://bugs.webkit.org/show_bug.cgi?id=234292

Reviewed by Joanmarie Diggs.

This ensures wrappers always have a reference before being added to the cache.

  • accessibility/AXObjectCache.h:
  • accessibility/atspi/AXObjectCacheAtspi.cpp:

(WebCore::AXObjectCache::attachWrapper): Defer the set parent call to next cache update.
(WebCore::AXObjectCache::platformPerformDeferredCacheUpdate): Do the set parent call here.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::registerObject): Do not call addAccessible from here, since it needs the path,
it's now called from the caller of registerObject().
(WebCore::AccessibilityAtspi::parentChanged): Notify about parent property change.
(WebCore::AccessibilityAtspi::childrenChanged): Always emit ChildrenChanged when the tree is registered because
the atspi cache always consumes it.
(WebCore::AccessibilityAtspi::addAccessible): We no longer need to dispath addAccessible in the next run loop iteration.

  • accessibility/atspi/AccessibilityAtspi.h:
  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::registerObject): Helper to register the object when path is not needed. Also
ensure the isolated tree is created before registering the object.
(WebCore::AccessibilityObjectAtspi::path): Call registerObject().
(WebCore::AccessibilityObjectAtspi::hyperlinkReference): Use registerObject() instead of path().
(WebCore::AccessibilityObjectAtspi::setParent): Call AccessibilityAtspi::parentChanged() if the wrapper is still
and attached and not ignored.
(WebCore::AccessibilityObjectAtspi::parentReference const): Use the parent member instead of asking the main
thread again.
(WebCore::AccessibilityObjectAtspi::isDefunct const): Return true if wrapper has been detached.
(WebCore::AccessibilityObjectAtspi::childAdded): We no longer need to dispatch childrenChanged in next run loop iteration.

  • accessibility/atspi/AccessibilityObjectAtspi.h:
  • accessibility/atspi/AccessibilityRootAtspi.cpp:

(WebCore::registerSubtree): Helper to register the wrappers tree recursively.
(WebCore::AccessibilityRootAtspi::registerTree): Register the wrappers tree.

  • accessibility/atspi/AccessibilityRootAtspi.h:
2:29 AM Changeset in webkit [287019] by Darin Adler
  • 12 edits in trunk/Source

Automatically generate event handler content attribute maps so they are easier to maintain
https://bugs.webkit.org/show_bug.cgi?id=234254

Reviewed by Alexey Shvayka.

Source/WebCore:

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader): Declare forEachEventHandlerContentAttribute
and forEachWindowEventHandlerContentAttribute as needed.
(GenerateImplementation): Call GenerateForEachEventHandlerContentAttribute
as needed.
(GenerateForEachEventHandlerContentAttribute): Define
forEachEventHandlerContentAttribute or forEachWindowEventHandlerContentAttribute.

  • bindings/scripts/IDLAttributes.json: Added

GenerateForEachEventHandlerContentAttribute and
GenerateForEachWindowEventHandlerContentAttribute. Even though each
is used in only one class, it's still better to not hard-code the class names.

  • html/HTMLAttributeNames.in: Added oncuechange, onrejectionhandled, and

onunhandledrejection even though we are not yet implementing any of them in
this behavior-preserving patch. They need to be present so the automatically
generated code compiles. But added explicit exceptions as mentioned below to
make sure no changes are implemented in this patch, and will take those exceptions
out later in a patch intended to produce a progression, likely with new test cases.
Re-sorted alphabetically, rather an arbitrary semi-sorted order.

  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::createWindowEventHandlerNameMap): Deleted.
(WebCore::HTMLBodyElement::eventNameForWindowEventHandlerAttribute): Use
JSHTMLBodyElement::forEachWindowEventHandlerContentAttribute to create the map.
Use a lambda instead of a separate function and take advantage of the
deduction guide for NeverDestroyed. Added exceptions for onrejectionhandled
and onunhandledrejection, which are both in the IDL file but were not handled
here, along with a FIXME suggesting we remove the exceptions.

  • html/HTMLElement.h: Removed createWindowEventHandlerNameMap.
  • html/HTMLBodyElement.idl: Added GenerateForEachWindowEventHandlerContentAttribute.
  • html/HTMLElement.cpp:

(WebCore::HTMLElement::createEventHandlerNameMap): Deleted.
(WebCore::HTMLElement::populateEventHandlerNameMap): Deleted.
(WebCore::HTMLElement::eventNameForEventHandlerAttribute): Use
JSHTMLElement::forEachEventHandlerContentAttribute to create the map.
Use a lambda instead of a separate function and take advantage of the
deduction guide for NeverDestroyed. Added exception for oncuechange,
which is in the IDL file but was not handled here, and for 19 other attributes,
which are not in the IDL file but were handled here, along with two FIXMEs
suggesting we remove the exceptions.

  • html/HTMLElement.h: Removed populateEventHandlerNameMap and

createEventHandlerNameMap.

  • html/HTMLElement.idl: Added GenerateForEachEventHandlerContentAttribute.

Source/WTF:

  • wtf/NeverDestroyed.h: Add a deduction guide for NeverDestroyed.

In the future we can use this instead of makeNeverDestroyed or writing
out the entire template class type including template arguments.

2:13 AM Changeset in webkit [287018] by Antti Koivisto
  • 9 edits in trunk

[CSS Cascade Layers] revert-layer should revert style attribute to regular author style
https://bugs.webkit.org/show_bug.cgi?id=234082

Reviewed by Simon Fraser.

Source/WebCore:

If 'revert-layer' keyword is used in style attribute it should revert to regular author style
on the default cascade level.

  • style/PropertyCascade.cpp:

(WebCore::Style::PropertyCascade::PropertyCascade):

Make the maximum level (used for revert cascades) an std::optional.

(WebCore::Style::PropertyCascade::setPropertyInternal):
(WebCore::Style::PropertyCascade::addMatch):

Factor the revert test into a lambda.
We can never revert to an attribute style so always skip them.

  • style/PropertyCascade.h:

(WebCore::Style::PropertyCascade::PropertyCascade):
(WebCore::Style::PropertyCascade::maximumCascadeLevel const): Deleted.
(WebCore::Style::PropertyCascade::maximumCascadeLayerPriority const): Deleted.

  • style/RuleSet.h:
  • style/StyleBuilder.cpp:

(WebCore::Style::Builder::applyCustomProperty):
(WebCore::Style::Builder::applyCascadeProperty):
(WebCore::Style::Builder::applyRollbackCascadeProperty):

Keep a pointer to the current property being applied in state instead of individual priority values.

(WebCore::Style::Builder::applyProperty):
(WebCore::Style::Builder::ensureRollbackCascadeForRevert):
(WebCore::Style::Builder::ensureRollbackCascadeForRevertLayer):

If the current property is from attribute style it reverts to the same layer.

  • style/StyleBuilder.h:
  • style/StyleBuilderState.h:

(WebCore::Style::BuilderState::styleScopeOrdinal const):

LayoutTests:

1:35 AM Changeset in webkit [287017] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Null pointer crash in FetchResponse::clone
https://bugs.webkit.org/show_bug.cgi?id=234236
<rdar://86327601>

Reviewed by Alex Christensen.

From the log, we are most probably getting a null globalObject from a ScriptExecutionContext in FetchResponse::clone.
This may happen in case the document is navigated away but we still execute some code for it.
Add a null check to ensure we do not crash.

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::clone):

1:03 AM Changeset in webkit [287016] by ysuzuki@apple.com
  • 2 edits in trunk/Source/bmalloc

Unreviewed, fix Xcode build of libpas
https://bugs.webkit.org/show_bug.cgi?id=233821

r286934 broke build.sh for Xcode. This patch fixes it.

  • libpas/build.sh:
12:18 AM Changeset in webkit [287015] by Ben Nham
  • 8 edits
    6 adds in trunk/Source/WebCore

Add web push message decryption routines
https://bugs.webkit.org/show_bug.cgi?id=233903

Reviewed by Brady Eidson.

Source/WebCore:

This adds routines to decrypt push payloads encoded with the aes128gcm and aesgcm schemes.
The crypto primitives that we depend are implemented in PushCrypto, while the logic to use
those primitives to decrypt message payloads is in PushMessageCrypto.

Test: TestWebKitAPI.PushMessageCrypto

  • Headers.cmake:
  • Modules/push-api/PushCrypto.cpp: Added.

(WebCore::PushCrypto::P256DHKeyPair::generate):
(WebCore::PushCrypto::validateP256DHPublicKey):
(WebCore::PushCrypto::computeP256DHSharedSecret):
(WebCore::PushCrypto::hmacSHA256):
(WebCore::PushCrypto::decryptAES128GCM):

  • Modules/push-api/PushCrypto.h: Added.
  • Modules/push-api/PushManager.cpp:

(WebCore::PushManager::subscribe):

  • Modules/push-api/PushMessageCrypto.cpp: Added.

(WebCore::PushCrypto::ClientKeys::generate):
(WebCore::PushCrypto::areClientKeyLengthsValid):
(WebCore::PushCrypto::computeAES128GCMPaddingLength):
(WebCore::PushCrypto::decryptAES128GCMPayload):
(WebCore::PushCrypto::computeAESGCMPaddingLength):
(WebCore::PushCrypto::decryptAESGCMPayload):

  • Modules/push-api/PushMessageCrypto.h: Added.
  • Modules/push-api/cocoa/PushCryptoCocoa.cpp: Added.

(WebCore::PushCrypto::P256DHKeyPair::generate):
(WebCore::PushCrypto::validateP256DHPublicKey):
(WebCore::PushCrypto::computeP256DHSharedSecret):
(WebCore::PushCrypto::hmacSHA256):
(WebCore::PushCrypto::decryptAES128GCM):

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:

Source/WebCore/PAL:

  • pal/spi/cocoa/CommonCryptoSPI.h: Add AES-GCM decryption SPI.
12:12 AM Changeset in webkit [287014] by Carlos Garcia Campos
  • 15 edits in trunk/Source

[GTK][a11y] Handle the Embedded method sent by AtkSocket from AccessibilityRootAtspi
https://bugs.webkit.org/show_bug.cgi?id=234233

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::registerRoot):

  • accessibility/atspi/AccessibilityRootAtspi.cpp:

(WebCore::AccessibilityRootAtspi::registerObject):
(WebCore::AccessibilityRootAtspi::embedded):
(WebCore::AccessibilityRootAtspi::setParentPath): Deleted.

  • accessibility/atspi/AccessibilityRootAtspi.h:
  • accessibility/atspi/xml/Socket.xml:

Source/WebKit:

I added some hacks to send the socket path to the web process using WebKit IPC because Embedded message is not
in the DBus interface. We can simply add the message to the interface definition and handle it instead to
simplify everything.

  • UIProcess/ProvisionalPageProxy.cpp:

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

  • UIProcess/ProvisionalPageProxy.h:

(WebKit::ProvisionalPageProxy::accessibilityPlugID):
(WebKit::ProvisionalPageProxy::CompletionHandler<void): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::swapToProvisionalPage):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/gtk/WebPageProxyGtk.cpp:

(WebKit::WebPageProxy::bindAccessibilityTree):

  • UIProcess/wpe/WebPageProxyWPE.cpp:

(WebKit::WebPageProxy::bindAccessibilityTree):

  • WebProcess/WebPage/gtk/WebPageGtk.cpp:

(WebKit::WebPage::platformInitialize):

Note: See TracTimeline for information about the timeline view.