Timeline



Mar 24, 2022:

10:02 PM Changeset in webkit [291849] by don.olmstead@sony.com
  • 11 edits in trunk/Source

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

Unreviewed non-unified build fixes.

Source/JavaScriptCore:

  • bytecode/ExitKind.cpp:
  • bytecode/ExitKind.h:
  • heap/RootMarkReason.cpp:
  • heap/RootMarkReason.h:
  • runtime/CallData.h:

Source/WebCore:

  • html/HTMLInputElement.cpp:

Source/WebKit:

  • GPUProcess/GPUProcess.cpp:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:
9:21 PM Changeset in webkit [291848] by Chris Dumez
  • 7 edits in trunk/Source

String::split() should take in a StringView instead of a String
https://bugs.webkit.org/show_bug.cgi?id=238355

Reviewed by Geoffrey Garen.

Source/WebCore:

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::classList const):
Call the more efficient split(UChar) overload instead.

Source/WebKit:

  • UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp:

Optimize by calling StringView::split() instead of String::split().

Source/WTF:

String::split() should take in a StringView instead of a String, to avoid unnecessary construction
of Strings in some instances.

  • wtf/text/WTFString.cpp:

(WTF::String::splitInternal const):
(WTF::String::split const):
(WTF::String::splitAllowingEmptyEntries const):

  • wtf/text/WTFString.h:
9:14 PM Changeset in webkit [291847] by ysuzuki@apple.com
  • 1 edit
    1 add in trunk/JSTests

Add additional reported regression tests to ensure multiline token's column offset is reset
https://bugs.webkit.org/show_bug.cgi?id=221548

Reviewed by Alexey Shvayka.

The bug is fixed and tested in https://github.com/WebKit/WebKit/commit/6d1e5d9498f24805988ad81ca3228588dd000a51.
But let's add reported regression tests to ensure that they will not reproduce.

  • stress/multiline-token-error-column.js: Added.

(shouldBe):
(throw.new.Error):

9:08 PM Changeset in webkit [291846] by mmaxfield@apple.com
  • 15 edits
    2 adds in trunk

[Cocoa] REGRESSION(r281291): When accessibility bold is enabled, font-family:system-ui is supposed to be bold
https://bugs.webkit.org/show_bug.cgi?id=237817
<rdar://problem/88249241>

Reviewed by Alan Bujtas.

Source/WebCore:

Accessibility bold is supposed to cause the system font to be rendered as bold, even if the
value of the font-weight property is normal.

The way this is originally supposed to work is that, when accessibility bold is enabled and
software asks for the system font, the font reports to not be bold, but the metrics/contours
end up visually bold to the user. Font variations, however, are a lower-level interface to
the font, and don't abide by the facade. So, before r281291, we weren't applying font variations
to the system font, so the facade was maintained, but r281291 started applying variations to the
system font, thereby breaking this accessibility bold setting.

The solution is to re-implement accessibility bold when we apply font variations. At the point
where we apply the weight variation, we should determine if accessibility bold is in effect, and
if it is, artificially increase the weight of the created font according to the platform's
inflation amount. There are a few SPI functions which aid in this endeavor.

Test: fast/text/accessibility-bold.html

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::fontIsSystemFont):
(WebCore::normalizeGXWeight):
(WebCore::normalizeCTWeight):
(WebCore::denormalizeGXWeight):
(WebCore::denormalizeCTWeight):
(WebCore::overrideEnhanceTextLegibility):
(WebCore::setOverrideEnhanceTextLegibility):
(WebCore::shouldEnhanceTextLegibility):
(WebCore::preparePlatformFont):
(WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
(WebCore::FontCache::platformInit):
(WebCore::variationCapabilitiesForFontDescriptor):
(WebCore::normalizeWeight): Deleted.
(WebCore::denormalizeWeight): Deleted.

  • platform/graphics/cocoa/FontCacheCoreText.h:
  • testing/Internals.cpp:

(WebCore::Internals::setOverrideEnhanceTextLegibility):

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

Source/WebCore/PAL:

  • pal/spi/cf/CoreTextSPI.h:
  • pal/spi/cocoa/AccessibilitySupportSPI.h:

LayoutTests:

This test has <!-- webkit-test-runner [ runSingly=true ] --> so the testing
infrastructure for accessibility bold can be web-process-global.

  • fast/text/accessibility-bold-expected-mismatch.html: Added.
  • fast/text/accessibility-bold.html: Added.
  • platform/mac/TestExpectations: Because this test relies on a webkit-test-runner

header, skip it on WK1.

  • platform/ios/TestExpectations: Ditto.
  • platform/mac-wk2/TestExpectations: Mark as PASS.
  • platform/ios-wk2/TestExpectations: Ditto.
7:51 PM Changeset in webkit [291845] by Alan Coon
  • 9 edits in branches/safari-613.1.17.1-branch/Source

Versioning.

WebKit-7613.1.17.1.13

7:40 PM Changeset in webkit [291844] by Alan Coon
  • 1 copy in tags/Safari-613.1.17.1.12

Tag Safari-613.1.17.1.12.

7:07 PM Changeset in webkit [291843] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Require click-to-play for media in Captive Portals
https://bugs.webkit.org/show_bug.cgi?id=238353
<rdar://90575996>

Reviewed by Chris Dumez.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::adjustSettingsForCaptivePortal): Disable auto-play for media for
Captive Portals.

7:05 PM Changeset in webkit [291842] by Chris Dumez
  • 31 edits in trunk

FileSystem::pathByAppendingComponent() should take in StringViews instead of Strings
https://bugs.webkit.org/show_bug.cgi?id=238344

Reviewed by Geoff Garen.

Source/JavaScriptCore:

  • jsc.cpp:

Source/WebCore:

  • Modules/indexeddb/IDBDatabaseIdentifier.cpp:

(WebCore::IDBDatabaseIdentifier::databaseDirectoryRelativeToRoot const):
(WebCore::IDBDatabaseIdentifier::databaseDirectoryRelativeToRoot):

  • Modules/indexeddb/IDBDatabaseIdentifier.h:
  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::getAllDatabaseNamesAndVersions):
(WebCore::IDBServer::IDBServer::diskUsage):
(WebCore::IDBServer::IDBServer::upgradedDatabaseDirectory):

  • Modules/webdatabase/OriginLock.cpp:

(WebCore::lockFileNameForPath):

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

(WebCore::CDMInstanceFairPlayStreamingAVFObjC::setStorageDirectory):

  • platform/network/curl/CurlCacheManager.cpp:

(WebCore::CurlCacheManager::loadIndex):

Source/WebKit:

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:

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

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::storagePath):
(WebKit::CacheStorage::Engine::initialize):

  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::cachesListFilename):
(WebKit::CacheStorage::cachesOriginFilename):
(WebKit::CacheStorage::Caches::cachesSizeFilename):

  • NetworkProcess/cache/NetworkCacheBlobStorage.cpp:

(WebKit::NetworkCache::BlobStorage::blobPathForHash const):

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::makeCachePath):

  • NetworkProcess/storage/IDBStorageManager.cpp:

(WebKit::IDBStorageManager::idbStorageOriginDirectory):

  • UIProcess/Inspector/win/InspectorResourceURLSchemeHandler.cpp:

(WebKit::InspectorResourceURLSchemeHandler::platformStartTask):

Source/WebKitLegacy/mac:

  • Storage/WebDatabaseProvider.mm:

(WebDatabaseProvider::indexedDatabaseDirectoryPath):

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WTF:

FileSystem::pathByAppendingComponent() should take in StringViews instead of Strings, to avoid
unnecessary String constructor in many instances.

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::pathByAppendingComponent):

  • wtf/FileSystem.h:
  • wtf/posix/FileSystemPOSIX.cpp:

(WTF::FileSystemImpl::pathByAppendingComponent):

Tools:

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp:

(TestWebKitAPI::TEST_F):

6:03 PM Changeset in webkit [291841] by Nikos Mouchtaris
  • 5 edits in trunk

calc(): Handle finite value with infinite step in round()
https://bugs.webkit.org/show_bug.cgi?id=238231

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-values/round-function-expected.txt:

Source/WebCore:

Add handling for finite value with infinite step in round().

  • css/calc/CSSCalcOperationNode.cpp:

(WebCore::CSSCalcOperationNode::evaluateOperator):

  • css/calc/CSSCalcPrimitiveValueNode.cpp:

(WebCore::CSSCalcPrimitiveValueNode::invert):

5:50 PM Changeset in webkit [291840] by Alan Coon
  • 1 edit in branches/safari-613-branch/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm

Apply patch. rdar://problem/90792723

5:41 PM Changeset in webkit [291839] by Russell Epstein
  • 1 copy in tags/Safari-614.1.7

Tag Safari-614.1.7.

5:15 PM Changeset in webkit [291838] by Russell Epstein
  • 1 copy in tags/Safari-614.1.5.17

Tag Safari-614.1.5.17.

5:13 PM Changeset in webkit [291837] by Chris Dumez
  • 29 edits in trunk

String's startsWith() / endsWith() / replace() should take in a StringView instead of a String
https://bugs.webkit.org/show_bug.cgi?id=238333

Reviewed by Geoff Garen.

Source/JavaScriptCore:

  • runtime/FileBasedFuzzerAgent.cpp:

(JSC::FileBasedFuzzerAgent::getPredictionInternal):

  • runtime/IntlRelativeTimeFormat.cpp:

(JSC::singularUnit):

  • runtime/TemporalObject.cpp:

(JSC::singularUnit):

Source/WebCore:

  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::shouldIgnoreIceCandidate):

  • css/CSSImageValue.cpp:

(WebCore::ResolvedURL::isLocalURL const):

  • page/PageConsoleClient.cpp:

(WebCore::PageConsoleClient::screenshot):

  • page/csp/ContentSecurityPolicySource.cpp:

(WebCore::ContentSecurityPolicySource::pathMatches const):

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::getUnmangledInfoLog):

  • platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:

(WebCore::CDMFactoryFairPlayStreaming::supportsKeySystem):

  • platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:

(WebCore::ImageDecoderGStreamer::supportsContainerType):
(WebCore::ImageDecoderGStreamer::canDecodeType):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::supportsType):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:

(WebCore::GraphicsContextGLOpenGL::checkVaryingsPacking const):

  • platform/network/ParsedRequestRange.cpp:

(WebCore::ParsedRequestRange::parse):

  • platform/network/curl/CookieJarDB.cpp:

(WebCore::checkSecureCookie):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::handleAcceptedCandidateWithSoftSpaces):

Source/WTF:

String's startsWith() / endsWith() / replace() should take in a StringView instead of a String,
to avoid unnecessary String creation in many instances.

  • wtf/text/AtomString.h:
  • wtf/text/StringCommon.h:

(WTF::startsWith): Deleted.
(WTF::startsWithIgnoringASCIICase): Deleted.
(WTF::endsWith): Deleted.
(WTF::endsWithIgnoringASCIICase): Deleted.

  • wtf/text/StringImpl.cpp:

(WTF::equalInner):
(WTF::StringImpl::startsWith const):
(WTF::StringImpl::startsWithIgnoringASCIICase const):
(WTF::StringImpl::hasInfixStartingAt const):
(WTF::StringImpl::endsWith):
(WTF::StringImpl::endsWithIgnoringASCIICase const):
(WTF::StringImpl::hasInfixEndingAt const):
(WTF::StringImpl::replace):

  • wtf/text/StringImpl.h:

(WTF::StringImpl::startsWith const): Deleted.
(WTF::StringImpl::endsWith const): Deleted.

  • wtf/text/StringView.h:

(WTF::startsWith):
(WTF::startsWithIgnoringASCIICase):
(WTF::endsWith):
(WTF::endsWithIgnoringASCIICase):
(WTF::String::replace):
(WTF::String::startsWith const):
(WTF::String::startsWithIgnoringASCIICase const):
(WTF::String::endsWith const):
(WTF::String::endsWithIgnoringASCIICase const):
(WTF::String::hasInfixStartingAt const):
(WTF::String::hasInfixEndingAt const):
(WTF::AtomString::startsWith const):
(WTF::AtomString::startsWithIgnoringASCIICase const):
(WTF::AtomString::endsWith const):
(WTF::AtomString::endsWithIgnoringASCIICase const):

  • wtf/text/WTFString.h:
5:13 PM Changeset in webkit [291836] by Russell Epstein
  • 2 edits in branches/safari-614.1.5-branch/Source/WebKit

Cherry-pick r291828. rdar://problem/90794287

After r291814, we need to create the INSTALL_PATH for the iOS sandbox files
https://bugs.webkit.org/show_bug.cgi?id=238351

Reviewed by Saam Barati.

We need to create the $(INSTALL_PATH) for the preprocessed iOS sandbox files.
Before r291814, the built-in Xcode copy step used ditto when copying the .sb
files thus creating $(INSTALL_PATH) and its intermediate directories.
That change set made it so that all WebKit iOS sandbox profile files are preprocessed
thus eliminating the Xcode copy step.

  • WebKit.xcodeproj/project.pbxproj:

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

5:08 PM Changeset in webkit [291835] by don.olmstead@sony.com
  • 6 edits in trunk/Source

[GLib] Add user directories to WTF::FileSystem
https://bugs.webkit.org/show_bug.cgi?id=238348

Reviewed by Adrian Perez de Castro.

Source/WebKit:

Use the new FileSystem APIs instead of calling glib directly.

  • UIProcess/Inspector/gtk/WebInspectorUIProxyGtk.cpp:

(WebKit::inspectorWebsiteDataStore):

  • UIProcess/glib/WebsiteDataStoreGLib.cpp:

(WebKit::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
(WebKit::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):

Source/WTF:

Add FileSystem::userCacheDirectory and FileSystem::userDataDirectory which call into
g_get_user_cache_dir and g_get_user_data_dir respectively.

  • wtf/FileSystem.h:
  • wtf/glib/FileSystemGlib.cpp:

(WTF::FileSystemImpl::userCacheDirectory):
(WTF::FileSystemImpl::userDataDirectory):

5:01 PM Changeset in webkit [291834] by Russell Epstein
  • 1 copy in tags/Safari-614.1.5.5.2

Tag Safari-614.1.5.5.2.

4:59 PM Changeset in webkit [291833] by Russell Epstein
  • 2 edits in branches/safari-614.1.5.5-branch/Source/WebKit

Cherry-pick r291828. rdar://problem/90794287

After r291814, we need to create the INSTALL_PATH for the iOS sandbox files
https://bugs.webkit.org/show_bug.cgi?id=238351

Reviewed by Saam Barati.

We need to create the $(INSTALL_PATH) for the preprocessed iOS sandbox files.
Before r291814, the built-in Xcode copy step used ditto when copying the .sb
files thus creating $(INSTALL_PATH) and its intermediate directories.
That change set made it so that all WebKit iOS sandbox profile files are preprocessed
thus eliminating the Xcode copy step.

  • WebKit.xcodeproj/project.pbxproj:

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

4:57 PM Changeset in webkit [291832] by Devin Rousso
  • 6 edits in trunk/Source

[iOS] make WKMouseGestureRecognizer officially conform to _UIHoverEventRespondable
https://bugs.webkit.org/show_bug.cgi?id=238242
<rdar://problem/88828903>

Reviewed by Tim Horton.

Source/WebKit:

  • UIProcess/ios/WKMouseGestureRecognizer.h:
  • UIProcess/ios/WKMouseGestureRecognizer.mm:
  • Platform/spi/ios/UIKitSPI.h:

Source/WTF:

  • wtf/PlatformHave.h:
4:56 PM Changeset in webkit [291831] by Russell Epstein
  • 9 edits in branches/safari-614.1.5.5-branch/Source

Versioning.

WebKit-7614.1.5.5.2

4:53 PM Changeset in webkit [291830] by Nikos Mouchtaris
  • 8 edits in trunk

Fix serialization of nan, infinity, -infinity for calc()
https://bugs.webkit.org/show_bug.cgi?id=238288

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-values/calc-catch-divide-by-0-expected.txt:
  • web-platform-tests/css/css-values/calc-infinity-nan-serialize-angle-expected.txt:
  • web-platform-tests/css/css-values/calc-infinity-nan-serialize-length-expected.txt:
  • web-platform-tests/css/css-values/calc-infinity-nan-serialize-time-expected.txt:

Source/WebCore:

Update serializing of nan, infinity, -infinity to be in line with step 2 of:
https://drafts.csswg.org/css-values/#calc-serialize.

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::formatNumberValue const):
(WebCore::CSSPrimitiveValue::formatIntegerValue const):

4:48 PM Changeset in webkit [291829] by Russell Epstein
  • 10 edits
    4 moves in branches/safari-614.1.5-branch/Source/WebKit

Cherry-pick r291814. rdar://problem/90343926

Update Sandbox profiles for system content path
https://bugs.webkit.org/show_bug.cgi?id=238255

Reviewed by Per Arne Vollan.

Updated WebKit sandbox profiles to include system content path rule files when building with the system content path.
Changed the iOS profiles to be preprocessed to make these changes.

  • DerivedSources-input.xcfilelist
  • DerivedSources-output.xcfilelist
  • DerivedSources.make:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb: Removed.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb.in: Copied from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Removed.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb.in: Copied from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb: Removed.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb.in: Copied from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb: Removed.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb.in: Copied from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb.
  • Shared/Sandbox/preferences.sb:
  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/com.apple.WebProcess.sb.in:

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

4:38 PM Changeset in webkit [291828] by msaboff@apple.com
  • 2 edits in trunk/Source/WebKit

After r291814, we need to create the INSTALL_PATH for the iOS sandbox files
https://bugs.webkit.org/show_bug.cgi?id=238351

Reviewed by Saam Barati.

We need to create the $(INSTALL_PATH) for the preprocessed iOS sandbox files.
Before r291814, the built-in Xcode copy step used ditto when copying the .sb
files thus creating $(INSTALL_PATH) and its intermediate directories.
That change set made it so that all WebKit iOS sandbox profile files are preprocessed
thus eliminating the Xcode copy step.

  • WebKit.xcodeproj/project.pbxproj:
4:38 PM Changeset in webkit [291827] by Russell Epstein
  • 1 copy in tags/Safari-614.1.5.5.1

Tag Safari-614.1.5.5.1.

4:37 PM Changeset in webkit [291826] by Russell Epstein
  • 10 edits
    4 moves in branches/safari-614.1.5.5-branch/Source/WebKit

Cherry-pick r291814. rdar://problem/90343926

Update Sandbox profiles for system content path
https://bugs.webkit.org/show_bug.cgi?id=238255

Reviewed by Per Arne Vollan.

Updated WebKit sandbox profiles to include system content path rule files when building with the system content path.
Changed the iOS profiles to be preprocessed to make these changes.

  • DerivedSources-input.xcfilelist
  • DerivedSources-output.xcfilelist
  • DerivedSources.make:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb: Removed.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb.in: Copied from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Removed.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb.in: Copied from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb: Removed.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb.in: Copied from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb: Removed.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb.in: Copied from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb.
  • Shared/Sandbox/preferences.sb:
  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/com.apple.WebProcess.sb.in:

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

4:37 PM Changeset in webkit [291825] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Set bug_title property appropriately
https://bugs.webkit.org/show_bug.cgi?id=238342

Reviewed by Ryan Haddad.

  • CISupport/ews-build/steps.py:

(BugzillaMixin._is_bug_closed):

4:29 PM Changeset in webkit [291824] by Patrick Angle
  • 4 edits in trunk/Source/WebCore

Web Inspector: Blank inspector in a page with container queries
https://bugs.webkit.org/show_bug.cgi?id=238338

Reviewed by Devin Rousso.

Because there is no CSSOM implementation for container queries, we are unable to inspect them currently.
However, we should be resilient to the absence of that implementation and expect that not all rules have a
matching CSSOM implementation, instead of just crashing when it happens. This patch only resolves crashes as the
result of the presence of container queries, and followup work will be done to actually plumb the correct
information to Web Inspector to show these rules.

  • inspector/InspectorStyleSheet.cpp:

(WebCore::InspectorStyleSheet::collectFlatRules):

  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::collectStyleSheets):

  • style/InspectorCSSOMWrappers.cpp:

(WebCore::Style::InspectorCSSOMWrappers::collect):

4:23 PM Changeset in webkit [291823] by Patrick Angle
  • 2 edits in trunk/Source/WebKit

REGRESSION(STP142): "A JavaScript exception occured: Can't find variable: utils" from SafariDriver
https://bugs.webkit.org/show_bug.cgi?id=238335

Reviewed by Devin Rousso.

Following r289467, we can't just copy the WebDriver atom scripts to the build products, since they now need to
have utils.js in any script that uses the utils namespace. The WebKit.framework copy of these scripts are
later used while building safaridriver, so they need to include the scripts as well.

  • WebKit.xcodeproj/project.pbxproj:
4:22 PM Changeset in webkit [291822] by Russell Epstein
  • 9 edits in branches/safari-614.1.5.5-branch/Source

Versioning.

WebKit-7614.1.5.5.1

4:14 PM Changeset in webkit [291821] by pvollan@apple.com
  • 6 edits in trunk/Source/WebKit

REGRESSION(r286590): Links with URL schemes are not clickable in Mail
https://bugs.webkit.org/show_bug.cgi?id=238262
<rdar://89145552>

Reviewed by Geoffrey Garen.

This feature requires access to the Launch Services daemon in Mail and other apps on iOS.
This patch is a partial revert of r286590.

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

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::nonBrowserServices):
(WebKit::WebProcessPool::platformInitializeWebProcess):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

4:09 PM Changeset in webkit [291820] by Russell Epstein
  • 1 copy in branches/safari-614.1.5.5-branch

New branch.

3:57 PM Changeset in webkit [291819] by Russell Epstein
  • 9 edits in branches/safari-614.1.5-branch/Source

Versioning.

WebKit-7614.1.5.17

3:43 PM Changeset in webkit [291818] by Brent Fulgham
  • 4 edits in trunk

Disable RTCRtpScriptTransform in CaptivePortal mode
https://bugs.webkit.org/show_bug.cgi?id=238340
<rdar://87821636>

Reviewed by Chris Dumez.

Source/WebKit:

When displaying content in a captive portal, we should make sure we disable
WebRTCEncodedTransform.

Tests: TestWebKitAPI

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::adjustSettingsForCaptivePortal): Disable WebRTCEncodedTransform.

Tools:

Add a test that RTCRtpScriptTransform is properly disabled in
CaptivePortal mode.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3:27 PM Changeset in webkit [291817] by graouts@webkit.org
  • 15 edits
    3 adds in trunk

DOM GPUP: paintSystemPreviewBadge (AR QuickLook element badge)
https://bugs.webkit.org/show_bug.cgi?id=238295
rdar://83580608

Reviewed by Dean Jackson.

Source/WebCore:

Add a new SystemImage subclass to deal with the ARKit badge, moving the custom drawing code under
RenderThemeIOS::paintSystemPreviewBadge() to ARKitBadgeSystemImage::draw().

To facilitate this, we must also have ARKitBadgeSystemImage wrap the input Image provided to
RenderThemeIOS::paintSystemPreviewBadge() so that the CoreImage filters are applied correctly.

Finally, we remove some use of using namespace WebCore in WebSpeechRecognizerTask and
WebSpeechRecognizerTaskMock since it caused some unified build failures.

  • Headers.cmake:
  • Modules/speech/cocoa/WebSpeechRecognizerTask.mm:

(-[WebSpeechRecognizerTaskImpl initWithIdentifier:locale:doMultipleRecognitions:reportInterimResults:maxAlternatives:delegateCallback:]):
(-[WebSpeechRecognizerTaskImpl callbackWithTranscriptions:isFinal:]):
(-[WebSpeechRecognizerTaskImpl sendSpeechStartIfNeeded]):
(-[WebSpeechRecognizerTaskImpl sendSpeechEndIfNeeded]):
(-[WebSpeechRecognizerTaskImpl sendEndIfNeeded]):
(-[WebSpeechRecognizerTaskImpl speechRecognizer:availabilityDidChange:]):
(-[WebSpeechRecognizerTaskImpl speechRecognitionTask:didFinishSuccessfully:]):
(-[WebSpeechRecognizerTask initWithIdentifier:locale:doMultipleRecognitions:reportInterimResults:maxAlternatives:delegateCallback:]):

  • Modules/speech/cocoa/WebSpeechRecognizerTaskMock.mm:

(-[WebSpeechRecognizerTaskMock initWithIdentifier:locale:doMultipleRecognitions:reportInterimResults:maxAlternatives:delegateCallback:]):
(-[WebSpeechRecognizerTaskMock audioSamplesAvailable:]):
(-[WebSpeechRecognizerTaskMock abort]):

  • Modules/system-preview/ARKitBadgeSystemImage.h: Added.

(WebCore::ARKitBadgeSystemImage::encode const):
(WebCore::ARKitBadgeSystemImage::decode):
(isType):

  • Modules/system-preview/ARKitBadgeSystemImage.mm: Added.

(WebCore::arKitBundle):
(WebCore::loadARKitPDFPage):
(WebCore::systemPreviewLogo):
(WebCore::ARKitBadgeSystemImage::draw const):

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/SystemImage.h:
  • platform/graphics/displaylists/DisplayListRecorder.cpp:

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

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::paintSystemPreviewBadge):
(WebCore::arKitBundle): Deleted.
(WebCore::loadARKitPDFPage): Deleted.
(WebCore::systemPreviewLogo): Deleted.

Source/WebKit:

Make sure we restore the Image on the ARKitBadgeSystemImage before we attempt to draw it.

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::drawSystemImage):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<Ref<SystemImage>>::encode):
(IPC::ArgumentCoder<Ref<SystemImage>>::decode):

LayoutTests:

The system-preview/badge.html test now passes reliably with DOM GPUP enabled,
which incidentally fixes bug 236922.

  • platform/ios-wk2/TestExpectations:
3:22 PM Changeset in webkit [291816] by Kate Cheney
  • 3 edits
    2 adds in trunk

REGRESSION (Safari 15.4): Nonce from link isn't used when loading style sheet
https://bugs.webkit.org/show_bug.cgi?id=238014
<rdar://problem/90599352>

Reviewed by Brent Fulgham.

Source/WebCore:

In https://bugs.webkit.org/show_bug.cgi?id=179728 we implemented
nonce hiding from the DOM. It seems we missed once location
where we need to reference the element.nonce() instead of the
nonce attribute.

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process):

LayoutTests:

  • http/tests/security/contentSecurityPolicy/stylesheet-allowed-with-nonce-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/stylesheet-allowed-with-nonce.py: Added.
2:55 PM WebKitGTK/2.36.x edited by Adrian Perez de Castro
(diff)
2:41 PM Changeset in webkit [291815] by ysuzuki@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] JSRemoteFunction thunk should materialize code-pointer
https://bugs.webkit.org/show_bug.cgi?id=238313

Reviewed by Mark Lam.

When invoking a JSRemoteFunction, we must first wrap the arguments passed to it.
The wrapping operation may trigger a GC, and GC can jettison JIT code. As a result,
even though we know that the target JSFunction has JIT code that we want to execute,
the JIT code may be jettisoned (while wrapping the arguments for it) before we get
to the call. This resulted in occasional crashes on the JSTests/stress/shadow-realm-evaluate.js test.

This patch fixes this by doing a null check on the JIT code just before calling it,
and if null (i.e. the JIT code has been jettisoned), re-materializing the JIT code
first before making the call.

  • jit/JITOperations.cpp:

(JSC::JSC_DEFINE_JIT_OPERATION):

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

(JSC::remoteFunctionCallGenerator):

2:39 PM Changeset in webkit [291814] by msaboff@apple.com
  • 10 edits
    4 moves in trunk/Source/WebKit

Update Sandbox profiles for system content path
https://bugs.webkit.org/show_bug.cgi?id=238255

Reviewed by Per Arne Vollan.

Updated WebKit sandbox profiles to include system content path rule files when building with the system content path.
Changed the iOS profiles to be preprocessed to make these changes.

  • DerivedSources-input.xcfilelist
  • DerivedSources-output.xcfilelist
  • DerivedSources.make:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb: Removed.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb.in: Copied from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Removed.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb.in: Copied from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb: Removed.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb.in: Copied from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb: Removed.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb.in: Copied from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb.
  • Shared/Sandbox/preferences.sb:
  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/com.apple.WebProcess.sb.in:
1:59 PM WebKitGTK/2.36.x edited by Adrian Perez de Castro
(diff)
1:50 PM Changeset in webkit [291813] by Jean-Yves Avenard
  • 5 edits
    4 adds in trunk

Safari can't play video completely at bilibili.com
https://bugs.webkit.org/show_bug.cgi?id=236440
rdar://88761053

Reviewed by Jer Noble.

Source/WebCore:

Video frames were incorrectly evicted during a call to appendBuffer
as the Source Buffer incorrectly assumed a discontinuity was present.

When appending data to a source buffer, the MSE specs describe a method
to detect discontinuities in the Coded Frame Processing algorithm
(https://www.w3.org/TR/media-source/#sourcebuffer-coded-frame-processing)
step 6:
"

  • If last decode timestamp for track buffer is set and decode timestamp is less than last decode timestamp:

OR

  • If last decode timestamp for track buffer is set and the difference between decode timestamp and last decode timestamp is greater than 2 times last frame duration.

"
The issue being what defines the last frame duration.
Is it the frame last seen in the coded frame processing loop or the frame
whose presentation timestamp is just before the one we are currently
processing.

H264 and HEVC have a concept of b-frames: that is a frame that depends
on a future frame to be decoded.
Those frames are found in the container and can be identified by their
presentation timestamp higher than the frame following in decode order.
Those present a challenge as the frame prior the current one in
presentation order, may actually only be found several frames back in
decode order.
Bug 181891 attempted to fix a similar issue, and used the longest
"decode duration" as a workaround to detect discontinuity in the content.
It mentioned adopting the same technique as in Mozilla's MSE
implementation, but Mozilla also skip discontinuity detection within a
media segment (https://www.w3.org/TR/media-source/#media-segment which for
fMP4 is a single moof box) an approach that can't be achieved with
CoreMedia's AVStreamDataParser.
As mentioned in bug 181891, CoreMedia ignore the decode timestamps' delta
and juggles with the sample's duration so that there's no discontinuity
in the demuxed samples' presentation time, causing false positive in the
gap detection algorithm.

Bilibili uses HEVC content, and uses an encoding that generate lots
of b-frames, with a very wide sliding window (seen up to 12 frames).
By using the longest frame duration found in either presentation or
decode duration as threshold to identify a discontinuity, we can
properly parse the content and not incorrectly evict appended frames.
(As a side note, the use of HEVC with B-Frames is peculiar as not all
hardware support it.)
It is difficult to identify here if the issue is within the bilibili's
content or CoreMedia's output, though the responsibility more than
likely lies with bilibili.

Test: media/media-source/media-mp4-hevc-bframes.html

  • platform/graphics/SourceBufferPrivate.cpp:

(WebCore::SourceBufferPrivate::TrackBuffer::TrackBuffer):
(WebCore::SourceBufferPrivate::resetTrackBuffers):
(WebCore::SourceBufferPrivate::didReceiveSample):

  • platform/graphics/SourceBufferPrivate.h:

LayoutTests:

  • media/media-source/content/test-bframes-hevc-manifest.json: Added.
  • media/media-source/content/test-bframes-hevc.mp4: Added.
  • media/media-source/media-mp4-hevc-bframes-expected.txt: Added.
  • media/media-source/media-mp4-hevc-bframes.html: Added.
12:53 PM Changeset in webkit [291812] by Fujii Hironori
  • 2 edits in trunk/Source/WebKit

[WinCairo] WCTileGrid should create tiles only for the inside of layer area
https://bugs.webkit.org/show_bug.cgi?id=238317

Reviewed by Don Olmstead.

The coverage rect returned by computeVisibleAndCoverageRect may be
bigger than the layer rect. Tiles should be paved only for the
intersection of the coverage rect and the layer rect.

  • WebProcess/WebPage/wc/WCTileGrid.cpp:

(WebKit::WCTileGrid::tileRectFromPixelRect): Take the intersection
with the layer rect. Return an empty rect if the intersection is
empty.

12:39 PM Changeset in webkit [291811] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Remove slow codepath matching arithmetics in FontCascade::widthForSimpleText
https://bugs.webkit.org/show_bug.cgi?id=238306

Reviewed by Antti Koivisto.

By now if we measure some text using the fast codepath, we usually stay on this codepath for the rest
of the layout (i.e. preferred width computation uses the same fast codepath, and we also don't dynamically switch between modern and legacy).

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::widthForSimpleText const):

12:36 PM Changeset in webkit [291810] by pvollan@apple.com
  • 6 edits in trunk/Source/WebKit

[iOS] Disable unneeded code when content filtering is running in the Network process
https://bugs.webkit.org/show_bug.cgi?id=238332

Reviewed by Geoffrey Garen.

  • Shared/Cocoa/LoadParametersCocoa.mm:

(WebKit::LoadParameters::platformEncode const):
(WebKit::LoadParameters::platformDecode):

  • Shared/LoadParameters.h:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::addPlatformLoadParameters):

  • UIProcess/WebProcessProxy.h:
  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::platformDidReceiveLoadParameters):

11:52 AM Changeset in webkit [291809] by Elliott Williams
  • 6 edits
    1 add
    2 deletes in trunk/Source/WebKit

[XCBuild] WebKit: Use native headers + build rules for migrated headers
https://bugs.webkit.org/show_bug.cgi?id=238213
<rdar://problem/90172142>

Reviewed by Alexey Proskuryakov.

Replace the Make-based header migration script phase with a native project-based
representation in WebKit.xcodeproj.

The project now contains a 'Migrated Headers' group which lists the headers from
WebKitLegacy and WebCore that are copied to WebKit.framework during the build process. This
group must be kept in sync with the actual headers in WebKitLegacy, but since new headers
shouldn't really be added to WebKitLegacy this will be low-friction.

The preexisting postprocess-header-rule build rule is refactored to handle the
transformations needed for Migrated headers, which previous came from WebKitLegacy's
postprocess-header-rule script or from one of the MigrateHeaders*.make files.

  • Configurations/WebKit.xcconfig: Use EXCLUDED_SOURCE_FILE_NAMES to customize migrated

headers on mac vs. non-mac platforms.

  • Scripts/postprocess-header-rule: Refactored to incorporate WebKitLegacy's postprocessing

steps, and to do less disk I/O, now that it's always invoked as a build rule and can do less
in-place editing. Local testing shows a ~15% speedup.

  • Shared/API/Cocoa/WebKitLegacy.h: Added. Xcode's header maps forbid a header's name from

changing during the copy process, so we have to duplicate WebKitLegacy's umbrella header
instead of renaming it WebKit.h -> WebKitLegacy.h during the build.

  • WebKit.xcodeproj/project.pbxproj: Added 'Migrated Headers' group and build rule.

Configured headers to always copy using XCBuild. Removed legacy-only header script phases.

  • WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm: This file used unqualified

<HEADER.h> imports, which are not supported by Xcode's headermaps. Replaced with "HEADER.h".

  • mac/MigrateHeadersFromWebKitLegacy.make: Removed, logic now lives in

mingrate-headers-rule.sh.

  • mac/postprocess-framework-headers.sh: Removed.
  • mac/replace-webkit-additions-includes.py: Refactored to use stdin and stdout rather than

editing in-place. Corresponds to refactors in postprocess-header-rule.

11:50 AM Changeset in webkit [291808] by gnavamarino@apple.com
  • 3 edits in trunk/Source/WebCore

FormDataConsumer callback happens more than once with an exception
https://bugs.webkit.org/show_bug.cgi?id=238091

In case of an error, it is not expected for the FormDataConsumer callback to happen
more than once with an exception. To avoid this, we introduce FormDataConsumer::didFail
which cancels/clears everything after reporting an error.

Reviewed by Youenn Fablet.

  • Modules/fetch/FormDataConsumer.cpp:

(WebCore::FormDataConsumer::read):
(WebCore::FormDataConsumer::consumeFile):
(WebCore::FormDataConsumer::consumeBlob):
(WebCore::FormDataConsumer::didFail):
(WebCore::FormDataConsumer::cancel):

  • Modules/fetch/FormDataConsumer.h:

(WebCore::FormDataConsumer::isCancelled):

11:16 AM Changeset in webkit [291807] by Matteo Flores
  • 36 edits
    4 deletes in trunk

Unreviewed, reverting r291789.

This revision caused 65+ new API failures on iOS debug

Reverted changeset:

"Release assert in Document::updateLayout() via
HTMLTextAreaElement::childrenChanged"
https://bugs.webkit.org/show_bug.cgi?id=224471
https://commits.webkit.org/r291789

11:15 AM Changeset in webkit [291806] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[macOS] Remove reports for some sandbox violations on process launch
https://bugs.webkit.org/show_bug.cgi?id=238324

Reviewed by Geoffrey Garen.

Remove reports for some sandbox violations on process launch on macOS. These violations are not critical,
and are slowing down process launch. This patch also adds access to a mach syscall observed being in use.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
11:08 AM Changeset in webkit [291805] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebGPU

[WebGPU] Fix the watchOS build
https://bugs.webkit.org/show_bug.cgi?id=238337

Unreviewed.

  • WebGPU/Texture.mm:

(WebGPU::Device::createTexture):

10:57 AM Changeset in webkit [291804] by Jonathan Bedard
  • 9 edits
    2 adds in trunk/Tools

[git-webkit] Install git-lfs
https://bugs.webkit.org/show_bug.cgi?id=238270
<rdar://problem/90708032>

Reviewed by Aakash Jain and Wenson Hsieh.

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

(Response.init): Accept binary content or text.
(Response.text): Decode binary content.

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

(Git): Add git lfs mocks.

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

(GitHub.init): Mock project release binaries.
(GitHub.request): Ditto.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/init.py: Add InstallGitLFS.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/install_git_lfs.py: Added.

(InstallGitLFS):
(InstallGitLFS.url): Return URL specific to the current platform.
(InstallGitLFS.install): Install git lfs globally on this machine.
(InstallGitLFS.parser): Install git lfs even if it is already installed.
(InstallGitLFS.main): Check git lfs version, install it if needed, and then run git lfs install.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/install_git_lfs_unittest.py: Added.

(TestInstallGitLFS):
(TestInstallGitLFS.setUp):
(TestInstallGitLFS.test_svn):
(TestInstallGitLFS.test_remote_git):
(TestInstallGitLFS.test_url):
(TestInstallGitLFS.test_install):
(TestInstallGitLFS.test_configure):
(TestInstallGitLFS.test_no_op):

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

10:30 AM Changeset in webkit [291803] by Alan Coon
  • 1 edit in branches/safari-613-branch/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h

Unreviewed build fix. rdar://problem/89972004

10:20 AM Changeset in webkit [291802] by Ben Nham
  • 5 edits in trunk

PushAPI.firePushEventWithNoPagesTimeout fails in debug builds
https://bugs.webkit.org/show_bug.cgi?id=238309

Reviewed by Youenn Fablet.

Source/WebCore:

Export RegistrationDatabase::schemaVersion for tests to use.

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::databaseFilename):
(WebCore::cleanOldDatabases):

  • workers/service/server/RegistrationDatabase.h:

Tools:

This test was dying on an assertion in debug builds because we were calling
terminateNetworkProcessWhileRegistrationIsStored with a brand new WKWebsiteDataStore, which
wasn't associated with an active NetworkProcess connection since it was a brand new object.
Fix this by using the existing data store object instead.

Additionally, terminateNetworkProcessWhileRegistrationIsStored was waiting on the wrong
filename, so I changed the test to reference the correct filename.

  • TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
10:18 AM Changeset in webkit [291801] by jonlee@apple.com
  • 4 edits in trunk/LayoutTests

Unreviewed gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk2/TestExpectations:
9:55 AM Changeset in webkit [291800] by Chris Dumez
  • 36 edits in trunk

String's find() / reverseFind() / replace() should take in a StringView instead of a String
https://bugs.webkit.org/show_bug.cgi?id=238287

Reviewed by Darin Adler.

Source/WebCore:

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::decodeDatabaseName):

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::setValueCommon):

  • page/UserContentURLPattern.cpp:

(WebCore::UserContentURLPattern::parse):

  • platform/mediastream/CaptureDevice.h:

(WebCore::CaptureDevice::label const):

Source/WebKit:

  • WebProcess/WebCoreSupport/WebContextMenuClient.cpp:

(WebKit::WebContextMenuClient::searchWithGoogle):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebContextMenuClient.cpp:

(WebContextMenuClient::searchWithGoogle):

Source/WTF:

String's find() / reverseFind() / replace() should take in a StringView instead of a String
to avoid unnecessary String construction in many cases. We should probably do the same for
more String functions where we don't really need a String parameter, but those will be
addressed separately.

  • wtf/text/AtomString.h:
  • wtf/text/StringCommon.h:

(WTF::findCommon): Deleted.

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::find):
(WTF::StringImpl::findIgnoringASCIICase const):
(WTF::StringImpl::reverseFind):
(WTF::StringImpl::replace):

  • wtf/text/StringImpl.h:
  • wtf/text/StringView.h:

(WTF::findCommon):
(WTF::findIgnoringASCIICase):
(WTF::String::find const):
(WTF::String::findIgnoringASCIICase const):
(WTF::String::reverseFind const):
(WTF::String::contains const):
(WTF::String::containsIgnoringASCIICase const):
(WTF::String::replace):
(WTF::AtomString::find const):
(WTF::AtomString::findIgnoringASCIICase const):
(WTF::AtomString::contains const):
(WTF::AtomString::containsIgnoringASCIICase const):

  • wtf/text/WTFString.h:
8:55 AM Changeset in webkit [291799] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Do not construct a TextRun for measuring a single whitespace when simplified content measuring can be used
https://bugs.webkit.org/show_bug.cgi?id=238228

Reviewed by Antti Koivisto.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::computeInlineTextItemWidths): Just simply call TextUtil::width

  • layout/formattingContexts/inline/text/TextUtil.cpp:

(WebCore::Layout::spaceWidth):
(WebCore::Layout::TextUtil::width):
(WebCore::Layout::TextUtil::spaceWidth): Deleted.

  • layout/formattingContexts/inline/text/TextUtil.h:
8:53 AM Changeset in webkit [291798] by Tyler Wilcock
  • 7 edits in trunk/Source/WebCore

AX: Remove firstChild, lastChild, previousSibling, nextSibling, nextSiblingUnignored, and previousSiblingUnignored from the AXCoreObject interface
https://bugs.webkit.org/show_bug.cgi?id=238267

Reviewed by Andres Gonzalez.

All of these except nextSibling and previousSibling are ASSERT_NOT_REACHED no-ops
in AXIsolatedObject. We do compute next and previous sibling for isolated objects,
but they're only used in one place (appendChildrenToArray). Usage of these functions
in appendChildrenToArray doesn't make sense for isolated objects, as it would require
the isolated object to be ignored for them to be called, and we should never have created an
isolated object from an ignored live object.

Dovetailing from that, this patch also removes AXPropertyName::IsAccessibilityIgnored,
since this should always be false for isolated objects. ASSERTs have been added in a
few places to assure this is the case.

  • accessibility/AccessibilityObject.cpp:

(WebCore::Accessibility::appendChildrenToArray):

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::firstChild const):
(WebCore::AccessibilityObject::lastChild const):
(WebCore::AccessibilityObject::previousSibling const):
(WebCore::AccessibilityObject::nextSibling const):

  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::firstChild const): Deleted.
(WebCore::AXIsolatedObject::lastChild const): Deleted.
(WebCore::AXIsolatedObject::nextSiblingUnignored const): Deleted.
(WebCore::AXIsolatedObject::previousSiblingUnignored const): Deleted.

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/isolatedtree/AXIsolatedTree.h:

Remove AXPropertyName::NextSibling, AXPropertyName::PreviousSibling,
AXPropertyName::IsAccessibilityIgnored.

8:50 AM Changeset in webkit [291797] by cathiechen
  • 16 edits
    2 copies
    40 adds in trunk/LayoutTests

Update css/css-sizing/contain-intrinsic-size tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=238312

Reviewed by Rob Buis.

LayoutTests/imported/w3c:

Update the contain-intrinsic-size tests to wpt commit: 7c61a4594a95682531367b6956d1c37f8b8fd486

  • resources/import-expectations.json:
  • resources/resource-files.json:
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/animation/contain-intrinsic-size-interpolation-expected.txt:
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/animation/contain-intrinsic-size-interpolation.html:
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/auto-001-expected.txt: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/auto-001.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/auto-002-expected.txt: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/auto-002.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/auto-003-expected.txt: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/auto-003.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/auto-004-expected.txt: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/auto-004.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/auto-005-expected.txt: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/auto-005.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-001-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-002-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-003-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-004-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-005-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-006-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-007-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-008-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-009-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-010-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-011-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-012-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-013-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-014-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-015-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-016-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-017-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-018-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-019-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-020-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-021-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-022-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-023-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-024-ref.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-025-expected.html:
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-025-ref.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-025-expected.html.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-026-expected.html:
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-026-ref.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-026-expected.html.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-027-expected.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-027.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-logical-001-expected.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-logical-001.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-logical-002-expected.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-logical-002.html: Added.
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/parsing/contain-intrinsic-size-computed-expected.txt:
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/parsing/contain-intrinsic-size-computed.html:
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/parsing/contain-intrinsic-size-invalid-expected.txt:
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/parsing/contain-intrinsic-size-invalid.html:
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/parsing/contain-intrinsic-size-valid-expected.txt:
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/parsing/contain-intrinsic-size-valid.html:
  • web-platform-tests/css/css-sizing/contain-intrinsic-size/w3c-import.log:

LayoutTests:

8:29 AM Changeset in webkit [291796] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

MatchedDeclarationCache key is already hashed
https://bugs.webkit.org/show_bug.cgi?id=238321

Reviewed by Alan Bujtas.

  • style/MatchedDeclarationsCache.h:
8:03 AM Changeset in webkit [291795] by Chris Dumez
  • 2 edits in trunk/Tools

Unreviewed, update outdated comment after r291787.

  • TestWebKitAPI/Tests/WTF/StringImpl.cpp:

(TestWebKitAPI::TEST):

7:15 AM Changeset in webkit [291794] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[IFC][Integration] RenderText::computeCanUseSimplifiedTextMeasuring should take first-line style into account
https://bugs.webkit.org/show_bug.cgi?id=238243

Reviewed by Antti Koivisto.

This is in preparation for using the fast text measuring codepath for legacy line layout content.

  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::BoxTree::buildTree):

  • rendering/RenderText.cpp:

(WebCore::RenderText::computeCanUseSimplifiedTextMeasuring const):

6:47 AM Changeset in webkit [291793] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

Devirtualize RenderText::width
https://bugs.webkit.org/show_bug.cgi?id=238285

Reviewed by Antti Koivisto.

RenderCombineText handling is moved to RenderText (we already handle combine text in RenderText::widthFromCache).

  • rendering/RenderCombineText.cpp:

(WebCore::RenderCombineText::combineTextIfNeeded): These are all non-text-combine callsites.
(WebCore::RenderCombineText::width const): Deleted.

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

(WebCore::combineTextWidth): RenderCombineText::combinedTextWidth returns the same value as RenderCombineText::width.
(WebCore::RenderText::widthFromCache const):
(WebCore::RenderText::width const):

  • rendering/RenderText.h:
6:04 AM Changeset in webkit [291792] by Adrian Perez de Castro
  • 4 edits in trunk/Source/WebKit

[GTK] REGRESSION(r291613): Build broken with USE_GTK4 + ENABLE_ACCESSIBILITY
https://bugs.webkit.org/show_bug.cgi?id=238320

Reviewed by Carlos Garcia Campos.

Guard remaning uses of ATK when building with GTK4, where ATK is not used at all.

  • UIProcess/API/glib/WebKitWebViewAccessible.cpp:
  • UIProcess/API/glib/WebKitWebViewAccessible.h:
  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseDispose):

5:44 AM Changeset in webkit [291791] by commit-queue@webkit.org
  • 4 edits in trunk

REGRESSION (r287807): WEBGL_multi_draw validation rejecting valid arguments
https://bugs.webkit.org/show_bug.cgi?id=238239

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-24
Reviewed by Darin Adler.

Source/WebCore:

Fix off-by-one error causing full buffer multidraws to be
marked as invalid.

Enable the newer WebGL conformance tests that test this.

  • html/canvas/WebGLMultiDraw.cpp:

(WebCore::WebGLMultiDraw::validateOffset):

LayoutTests:

Enable the newer WebGL conformance tests that test this, marked
Slow as they take a while to run.

5:18 AM Changeset in webkit [291790] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

Allow styles with appearance in matched declaration cache
https://bugs.webkit.org/show_bug.cgi?id=238247

Reviewed by Antoine Quint.

Improve cache efficiency by allowing styles with appearance (typically form controls) to be cached.

In Speedometer this improves the cache hit rate ~75% -> 94%.

  • style/MatchedDeclarationsCache.cpp:

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

Remove appearance check.

(WebCore::Style::MatchedDeclarationsCache::add):

Also cache the UA style for styles with appearance.

(WebCore::Style::MatchedDeclarationsCache::remove):

  • style/MatchedDeclarationsCache.h:
  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::applyMatchedProperties):

Also simplify the case where inherited properties affect resolution of other properties by
kicking out the existing entry. This also makes the second attempt cacheable.

  • style/StyleResolver.h:
1:33 AM Changeset in webkit [291789] by svillar@igalia.com
  • 36 edits
    1 copy
    4 adds in trunk

Release assert in Document::updateLayout() via HTMLTextAreaElement::childrenChanged
https://bugs.webkit.org/show_bug.cgi?id=224471

Reviewed by Ryosuke Niwa.

Source/WebCore:

Executing some editing commands in a text area might force the recomputation of things
like caret or the visible selection position and extent. Under some circumstances (like
when the text area has no content and children) we might end up trying to update layout
when it is not safe as a side effect of updating the caret.

In order to fix that, we can switch to a model in which we update the selection asynchronously
in the case of having a non-user triggered change. That way we don't do it inside
a restricted layout scope.

The App Highlight restoration code had to be tuned as well (when restoring and scrolling to reveal
a Quick Note on iOS MacOS). It uses TemporarySelectionChange to select and scroll to reveal the highlight
range; the code assumed that this scrolling happens synchronously, since it reverts the selection to
the original range at the end of AppHighlightStorage::attemptToRestoreHighlightAndScroll when the
TemporarySelectionChange falls out of scope. That is however no longer the case. Actually no scrolling
happened after this patch because we end up only scheduling the appearance update timer before setting
the selection back to the original state with SelectionRevealMode::DoNotReveal. Since this only happens
when the user interacts in the Notes app, it seems sensible to consider it as a user triggered event.

  • Modules/highlight/AppHighlightStorage.cpp:

(WebCore::AppHighlightStorage::attemptToRestoreHighlightAndScroll): Consider the selection change
as user triggered so scrolling actually happens.

  • editing/Editor.cpp:

(WebCore::TemporarySelectionChange::setSelection): Check the UserTriggered flags for default options.

  • editing/Editor.h: Added a new UserTriggered flag.
  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::setSelection): Call scheduleAppearanceUpdateAfterStyleChange() for
IsUserTriggered changes.
(WebCore::FrameSelection::updateSelectionAppearanceNow): Renamed from updateSelectionByUpdatingLayoutOrStyle.
It does not need the Document& attribute because it was always called with m_document.
(WebCore::FrameSelection::absoluteCaretBounds): Replaced updateSelectionByUpdatingLayoutOrStyle with
updateSelectionAppearanceNow().
(WebCore::FrameSelection::setCaretVisibility): Ditto.
(WebCore::FrameSelection::selectionBounds const): Ditto.
(WebCore::FrameSelection::revealSelection): Call updateSelectionAppearanceNow().

(WebCore::FrameSelection::updateAppearanceIfRevealingSelectionIsNeeded): New method.

(WebCore::updateSelectionByUpdatingLayoutOrStyle): Deleted.

  • editing/FrameSelection.h:
  • page/EventHandler.cpp:

(WebCore::setSelectionIfNeeded): Set the UserTriggered flag for calling setSelection().

  • page/Page.cpp:

(WebCore::Page::doAfterUpdateRendering): Call updateAppearanceAfterLayout().

LayoutTests:

Moved some tests out of the text-based-repaint.js model because selection is now updated
and revealed asynchronously in the case of non-user triggered changes. The problem is that
by the time the repaint rects are queried the update has not happened yet. That's why
the tests were modified so that we wait until the repaint happens.

Same situation for other tests that do not involve repaint rects but trigger accesibility
tree updates. We must ensure that we let the notification be thrown before checking whether or
not has been emited. As it's done asynchronously we must let the main thread run before checking.

Last but not least, some of the tests are using setTimeout() instead of requestAnimationFrame()
because the results with the latter were not as reliable under stress/debug conditions.

  • accessibility/mac/selection-boundary-userinfo.html:
  • accessibility/mac/selection-change-userinfo.html:
  • accessibility/mac/selection-value-changes-for-aria-textbox.html:
  • editing/selection-with-absolute-positioned-empty-content.html:
  • fast/forms/textarea-scrolled-endline-caret.html:
  • fast/repaint/selection-gap-absolute-child-expected.txt:
  • fast/repaint/selection-gap-absolute-child.html:
  • fast/repaint/selection-gap-flipped-absolute-child-expected.txt:
  • fast/repaint/selection-gap-flipped-absolute-child.html:
  • fast/repaint/selection-gap-transformed-absolute-child-expected.txt:
  • fast/repaint/selection-gap-transformed-absolute-child.html:
  • fast/repaint/selection-gap-transformed-fixed-child-expected.txt:
  • fast/repaint/selection-gap-transformed-fixed-child.html:
  • fast/repaint/selection-paint-invalidation-expected.txt:
  • fast/repaint/selection-ruby-rl-expected.txt:
  • fast/repaint/selection-ruby-rl.html:
  • fast/repaint/text-selection-overflow-hidden-expected.txt:
  • fast/repaint/text-selection-overflow-hidden.html:
  • platform/gtk/TestExpectations:
  • platform/gtk/fast/repaint/selection-ruby-rl-expected.txt: Copied from LayoutTests/fast/repaint/selection-ruby-rl-expected.txt.
  • platform/gtk/fast/repaint/text-selection-overflow-hidden-expected.txt:
  • platform/mac-catalina-wk1/fast/repaint/focus-setting-selection-syncronizing-not-clearing-expected.txt: Added.
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk1/fast/repaint/4776765-expected.txt: Added.
  • platform/mac-wk1/accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-target-margin-005-expected.txt:
  • platform/mac/TestExpectations:
  • platform/win/fast/repaint/4776765-expected.txt: Added.
  • platform/win/fast/repaint/selection-gap-fixed-child-expected.txt:
  • platform/win/fast/repaint/selection-ruby-rl-expected.txt:
  • platform/win/fast/repaint/text-selection-overflow-hidden-expected.txt:

Mar 23, 2022:

11:32 PM Changeset in webkit [291788] by commit-queue@webkit.org
  • 48 edits in trunk/Source/WebCore

setNeedsLayout() should not be called when changing the SVG properties
https://bugs.webkit.org/show_bug.cgi?id=230296

Patch by Rob Buis <rbuis@igalia.com> on 2022-03-23
Reviewed by Said Abou-Hallawa.

Make SVG not call setNeedsLayout() from outside RenderTreeUpdater::updateRenderTree() when an attribute changes.
This ensures there will not be a dirty rendering tree immediately after updating it.

The patch also tries to avoid invalidate wording since this is quite generic.

Based on the initial patch by Said Abou-Hallawa.

  • dom/ElementData.h:

(WebCore::ElementData::svgResourcesInAncestorChainAreDirty const):
(WebCore::ElementData::setSVGResourcesInAncestorChainAreDirty const):

  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateRenderTree):

  • svg/SVGAnimateMotionElement.cpp:

(WebCore::SVGAnimateMotionElement::applyResultsToTarget):

  • svg/SVGClipPathElement.cpp:

(WebCore::SVGClipPathElement::svgAttributeChanged):
(WebCore::SVGClipPathElement::childrenChanged):

  • svg/SVGComponentTransferFunctionElement.cpp:

(WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::setSVGResourcesInAncestorChainAreDirty):
(WebCore::SVGElement::invalidateSVGResourcesInAncestorChainIfNeeded):

  • svg/SVGElement.h:
  • svg/SVGElementInlines.h:

(WebCore::SVGElement::setPresentationalHintStyleIsDirty):

  • svg/SVGFEBlendElement.cpp:

(WebCore::SVGFEBlendElement::svgAttributeChanged):

  • svg/SVGFEColorMatrixElement.cpp:

(WebCore::SVGFEColorMatrixElement::svgAttributeChanged):

  • svg/SVGFECompositeElement.cpp:

(WebCore::SVGFECompositeElement::svgAttributeChanged):

  • svg/SVGFEConvolveMatrixElement.cpp:

(WebCore::SVGFEConvolveMatrixElement::setOrder):
(WebCore::SVGFEConvolveMatrixElement::setKernelUnitLength):
(WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged):

  • svg/SVGFEDiffuseLightingElement.cpp:

(WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged):

  • svg/SVGFEDisplacementMapElement.cpp:

(WebCore::SVGFEDisplacementMapElement::svgAttributeChanged):

  • svg/SVGFEDropShadowElement.cpp:

(WebCore::SVGFEDropShadowElement::setStdDeviation):
(WebCore::SVGFEDropShadowElement::svgAttributeChanged):

  • svg/SVGFEGaussianBlurElement.cpp:

(WebCore::SVGFEGaussianBlurElement::setStdDeviation):
(WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):

  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::buildPendingResource):
(WebCore::SVGFEImageElement::svgAttributeChanged):

  • svg/SVGFELightElement.cpp:

(WebCore::SVGFELightElement::childrenChanged):

  • svg/SVGFEMergeNodeElement.cpp:

(WebCore::SVGFEMergeNodeElement::svgAttributeChanged):

  • svg/SVGFEMorphologyElement.cpp:

(WebCore::SVGFEMorphologyElement::setRadius):
(WebCore::SVGFEMorphologyElement::svgAttributeChanged):

  • svg/SVGFEOffsetElement.cpp:

(WebCore::SVGFEOffsetElement::svgAttributeChanged):

  • svg/SVGFESpecularLightingElement.cpp:

(WebCore::SVGFESpecularLightingElement::svgAttributeChanged):

  • svg/SVGFETileElement.cpp:

(WebCore::SVGFETileElement::svgAttributeChanged):

  • svg/SVGFilterElement.cpp:

(WebCore::SVGFilterElement::svgAttributeChanged):
(WebCore::SVGFilterElement::childrenChanged):

  • svg/SVGFilterPrimitiveStandardAttributes.cpp:

(WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
(WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
(WebCore::SVGFilterPrimitiveStandardAttributes::invalidateFilterPrimitiveParent):
(WebCore::invalidateFilterPrimitiveParent): Deleted.

  • svg/SVGFilterPrimitiveStandardAttributes.h:

(WebCore::SVGFilterPrimitiveStandardAttributes::invalidate): Deleted.

  • svg/SVGForeignObjectElement.cpp:

(WebCore::SVGForeignObjectElement::svgAttributeChanged):

  • svg/SVGGeometryElement.cpp:

(WebCore::SVGGeometryElement::svgAttributeChanged):

  • svg/SVGGradientElement.cpp:

(WebCore::SVGGradientElement::svgAttributeChanged):
(WebCore::SVGGradientElement::childrenChanged):

  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::svgAttributeChanged):

  • svg/SVGImageElement.cpp:

(WebCore::SVGImageElement::svgAttributeChanged):

  • svg/SVGLineElement.cpp:

(WebCore::SVGLineElement::svgAttributeChanged):

  • svg/SVGLinearGradientElement.cpp:

(WebCore::SVGLinearGradientElement::svgAttributeChanged):

  • svg/SVGMarkerElement.cpp:

(WebCore::SVGMarkerElement::svgAttributeChanged):
(WebCore::SVGMarkerElement::childrenChanged):

  • svg/SVGMaskElement.cpp:

(WebCore::SVGMaskElement::svgAttributeChanged):
(WebCore::SVGMaskElement::childrenChanged):

  • svg/SVGPathElement.cpp:

(WebCore::SVGPathElement::svgAttributeChanged):

  • svg/SVGPatternElement.cpp:

(WebCore::SVGPatternElement::svgAttributeChanged):
(WebCore::SVGPatternElement::childrenChanged):

  • svg/SVGPolyElement.cpp:

(WebCore::SVGPolyElement::svgAttributeChanged):

  • svg/SVGRadialGradientElement.cpp:

(WebCore::SVGRadialGradientElement::svgAttributeChanged):

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::updateCurrentTranslate):
(WebCore::SVGSVGElement::svgAttributeChanged):

  • svg/SVGStopElement.cpp:

(WebCore::SVGStopElement::svgAttributeChanged):

  • svg/SVGTRefElement.cpp:

(WebCore::SVGTRefElement::svgAttributeChanged):

  • svg/SVGTextContentElement.cpp:

(WebCore::SVGTextContentElement::svgAttributeChanged):

  • svg/SVGTextPathElement.cpp:

(WebCore::SVGTextPathElement::svgAttributeChanged):

  • svg/SVGTextPositioningElement.cpp:

(WebCore::SVGTextPositioningElement::svgAttributeChanged):

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::svgAttributeChanged):

  • svg/SVGViewElement.cpp:

(WebCore::SVGViewElement::svgAttributeChanged):

11:27 PM Changeset in webkit [291787] by Chris Dumez
  • 10 edits in trunk

Inline String(ASCIILiteral) constructor so the compiler can optimize out strlen()
https://bugs.webkit.org/show_bug.cgi?id=238162

Reviewed by Geoffrey Garen.

I have verified using a profiler that strlen() is no longer called under String::String(WTF::ASCIILiteral)
or StringImpl::createFromLiteral(WTF::ASCIILiteral) when running Speedometer.

  • wtf/text/StringImpl.cpp:
  • wtf/text/StringImpl.h:

(WTF::StringImpl::createFromLiteral):

  • wtf/text/WTFString.cpp:
  • wtf/text/WTFString.h:

(WTF::String::String):

11:25 PM Changeset in webkit [291786] by sihui_liu@apple.com
  • 7 edits in trunk/Source

Add logging for LocalStorage and IndexedDB data migration
https://bugs.webkit.org/show_bug.cgi?id=238169

Reviewed by Chris Dumez.

Source/WebCore:

  • platform/sql/SQLiteFileSystem.cpp:

(WebCore::SQLiteFileSystem::moveDatabaseFile):

  • platform/sql/SQLiteFileSystem.h:

Source/WebKit:

  • NetworkProcess/storage/IDBStorageManager.cpp:

(WebKit::migrateOriginDataImpl):
(WebKit::IDBStorageManager::migrateOriginData):

  • NetworkProcess/storage/IDBStorageManager.h:
  • NetworkProcess/storage/OriginStorageManager.cpp:

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

10:33 PM Changeset in webkit [291785] by commit-queue@webkit.org
  • 4 edits in trunk

[JSC] Fix remoteFunctionCallGenerator on MIPS
https://bugs.webkit.org/show_bug.cgi?id=238274

Patch by Geza Lore <Geza Lore> on 2022-03-23
Reviewed by Yusuke Suzuki.

JSTests:

  • stress/shadow-realm-evaluate.js:

Source/JavaScriptCore:

Eliminate register conflict (nonArgGPR0 == regT4, which is used in
valueRegs)

  • jit/ThunkGenerators.cpp:

(JSC::remoteFunctionCallGenerator):

9:35 PM Changeset in webkit [291784] by Simon Fraser
  • 16 edits in trunk

Have MiniBrowser shows the GPU Process pid in its title bar
https://bugs.webkit.org/show_bug.cgi?id=238286

Reviewed by Tim Horton.

Source/WebKit:

Expose _gpuProcessIdentifier on WKWebView as SPI. In order to support KVO for this, we need
to pass gpuProcessDidFinishLaunching() all the way from
GPUProcessProxy::didFinishLaunching() to PageClientImplCocoa. This KVO isn't accurate (the
"willChange" fires after the new pid is available) but for SPI it's good enough.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _gpuProcessIdentifier]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Cocoa/PageClientImplCocoa.h:
  • UIProcess/Cocoa/PageClientImplCocoa.mm:

(WebKit::PageClientImplCocoa::gpuProcessDidFinishLaunching):
(WebKit::PageClientImplCocoa::gpuProcessDidExit):

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::didFinishLaunching):

  • UIProcess/PageClient.h:

(WebKit::PageClient::gpuProcessDidFinishLaunching):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::gpuProcessIdentifier const):
(WebKit::WebPageProxy::gpuProcessDidFinishLaunching):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::gpuProcessDidFinishLaunching):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::gpuProcessDidFinishLaunching):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::gpuProcessDidExit):

Tools:

KVO-observe the WKWebView's _gpuProcessIdentifier property and include it in the
window title.

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController awakeFromNib]):
(-[WK2BrowserWindowController dealloc]):
(-[WK2BrowserWindowController updateTitle:]):
(-[WK2BrowserWindowController observeValueForKeyPath:ofObject:change:context:]):

9:17 PM Changeset in webkit [291783] by Cameron McCormack
  • 2 edits in trunk/LayoutTests/imported/w3c

Bump up fuzzy tolerance on css-backgrounds/background-gradient-subpixel-fills-area.html
https://bugs.webkit.org/show_bug.cgi?id=238307

Unreviewed test gardening.

  • web-platform-tests/css/css-backgrounds/background-gradient-subpixel-fills-area.html:
8:45 PM Changeset in webkit [291782] by commit-queue@webkit.org
  • 6 edits in trunk

Add off-by-default experimental feature for app store attribution
https://bugs.webkit.org/show_bug.cgi?id=238294

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-23
Reviewed by John Wilander.

Source/WebCore:

In r291735 I landed a way to give SKAdNetwork a way to private report app purchase attribution
which isn't implemented yet. Turn it off in WebKit until the time is right.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::parsePrivateClickMeasurementForSKAdNetwork const):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::TEST):

7:48 PM Changeset in webkit [291781] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebGPU

[WebGPU] Fix the non-macOS build
https://bugs.webkit.org/show_bug.cgi?id=238304

Unreviewed.

Some texture formats are only available on macOS.

  • WebGPU/Texture.mm:

(WebGPU::pixelFormat):

7:28 PM Changeset in webkit [291780] by Simon Fraser
  • 4 edits in trunk/Source/WebKit

REGRESSION (248692@main?): [iOS] ASSERTION FAILED: m_layer->owner()->platformCALayerDelegatesDisplay(m_layer) in WebKit::RemoteLayerBackingStore::paintContents()
https://bugs.webkit.org/show_bug.cgi?id=238277
<rdar://problem/90715046>

Reviewed by Tim Horton.

Empty backing store (height or width of zero) never need display; ImageBuffer allocation
with empty sizes always returns null anyway.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::needsDisplay const):

  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:

(WebKit::RemoteLayerBackingStoreCollection::backingStoreNeedsDisplay):

  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.mm:

(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::backingStoreNeedsDisplay):

6:40 PM Changeset in webkit [291779] by Chris Dumez
  • 453 edits in trunk/Source

Prepare JSC for making the String(const char*) constructor explicit
https://bugs.webkit.org/show_bug.cgi?id=238264

Reviewed by Geoff Garen.

Source/JavaScriptCore:

Prepare JSC for making the String(const char*) constructor explicit. Making this constructor
explicit helps catch many instances where we're constructing a String from a literal but we
are missing the ""_s suffix.

  • API/JSAPIGlobalObject.cpp:
  • API/JSAPIGlobalObject.mm:

(JSC::computeValidImportSpecifier):
(JSC::JSAPIGlobalObject::moduleLoaderFetch):

  • API/JSAPIValueWrapper.cpp:
  • API/JSAPIWrapperObject.mm:
  • API/JSCallbackConstructor.cpp:
  • API/JSCallbackFunction.cpp:
  • API/JSCallbackObject.cpp:
  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::getOwnPropertySlot):

  • API/JSScript.mm:

(-[JSScript readCache]):

  • API/JSTypedArray.cpp:

(JSObjectMakeTypedArrayWithArrayBuffer):
(JSObjectMakeTypedArrayWithArrayBufferAndOffset):

  • API/JSValue.mm:

(createStructHandlerMap):
(handerForStructTag):

  • API/JSWrapperMap.mm:

(allocateConstructorForCustomClass):

  • API/ObjCCallbackFunction.mm:

(JSC::ObjCCallbackFunctionImpl::name):

  • API/glib/JSAPIWrapperGlobalObject.cpp:
  • API/glib/JSAPIWrapperObjectGLib.cpp:
  • API/glib/JSCCallbackFunction.cpp:
  • API/tests/JSONParseTest.cpp:

(testJSONParse):

  • bindings/ScriptFunctionCall.cpp:

(Deprecated::ScriptCallArgumentHandler::appendArgument):

  • bytecode/CodeBlock.cpp:
  • bytecode/EvalCodeBlock.cpp:
  • bytecode/ExecutableToCodeBlockEdge.cpp:
  • bytecode/ExitKind.cpp:

(JSC::exitKindToString):

  • bytecode/ExitKind.h:
  • bytecode/FunctionCodeBlock.cpp:
  • bytecode/ModuleProgramCodeBlock.cpp:
  • bytecode/ProgramCodeBlock.cpp:
  • bytecode/UnlinkedCodeBlock.cpp:
  • bytecode/UnlinkedEvalCodeBlock.cpp:
  • bytecode/UnlinkedFunctionCodeBlock.cpp:
  • bytecode/UnlinkedFunctionExecutable.cpp:
  • bytecode/UnlinkedModuleProgramCodeBlock.cpp:
  • bytecode/UnlinkedProgramCodeBlock.cpp:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitHasPrivateBrand):
(JSC::BytecodeGenerator::emitCheckPrivateBrand):
(JSC::BytecodeGenerator::emitReturn):

  • bytecompiler/NodesCodegen.cpp:

(JSC::PropertyListNode::emitSaveComputedFieldName):
(JSC::BaseDotNode::emitGetPropertyValue):
(JSC::BaseDotNode::emitPutProperty):
(JSC::PostfixNode::emitDot):
(JSC::DeleteBracketNode::emitBytecode):
(JSC::DeleteDotNode::emitBytecode):
(JSC::PrefixNode::emitDot):
(JSC::InstanceOfNode::emitBytecode):

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::functionName const):

  • debugger/DebuggerScope.cpp:
  • heap/HeapSnapshotBuilder.cpp:

(JSC::HeapSnapshotBuilder::json):

  • heap/RootMarkReason.cpp:

(JSC::rootMarkReasonDescription):

  • heap/RootMarkReason.h:
  • inspector/JSGlobalObjectInspectorController.cpp:

(Inspector::JSGlobalObjectInspectorController::appendAPIBacktrace):

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::getInternalProperties):

  • inspector/JSInjectedScriptHostPrototype.cpp:
  • inspector/JSJavaScriptCallFrame.cpp:
  • inspector/JSJavaScriptCallFramePrototype.cpp:
  • inspector/agents/InspectorAuditAgent.cpp:

(Inspector::InspectorAuditAgent::run):

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::getScriptSource):

  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorHeapAgent.cpp:

(Inspector::InspectorHeapAgent::getRemoteObject):

  • jit/ExecutableAllocator.cpp:

(JSC::dumpJITMemory):

  • jit/JITCode.cpp:

(JSC::JITCode::typeName):

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

(JSC::getWrappedValue):

  • jsc.cpp:

(toCString):
(JSC_DEFINE_HOST_FUNCTION):
(runWithOptions):
(CommandLine::parseArguments):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::handleVarargsCheckpoint):

  • parser/Lexer.cpp:

(JSC::Lexer<T>::scanRegExp):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parsePrimaryExpression):

  • runtime/AbstractModuleRecord.cpp:
  • runtime/AggregateErrorConstructor.cpp:
  • runtime/ArrayConstructor.cpp:
  • runtime/ArrayIteratorPrototype.cpp:
  • runtime/ArrayPrototype.cpp:
  • runtime/AsyncFromSyncIteratorPrototype.cpp:
  • runtime/AsyncFunctionConstructor.cpp:
  • runtime/AsyncFunctionPrototype.cpp:
  • runtime/AsyncGeneratorFunctionConstructor.cpp:
  • runtime/AsyncGeneratorFunctionPrototype.cpp:
  • runtime/AsyncGeneratorPrototype.cpp:
  • runtime/AsyncIteratorPrototype.cpp:
  • runtime/AtomicsObject.cpp:
  • runtime/BigIntConstructor.cpp:
  • runtime/BigIntObject.cpp:
  • runtime/BigIntPrototype.cpp:
  • runtime/BooleanConstructor.cpp:
  • runtime/BooleanObject.cpp:
  • runtime/BooleanPrototype.cpp:
  • runtime/BytecodeCacheError.cpp:

(JSC::BytecodeCacheError::StandardError::message const):

  • runtime/CallData.cpp:

(JSC::call):

  • runtime/CallData.h:
  • runtime/ClassInfo.h:
  • runtime/ClonedArguments.cpp:
  • runtime/CodeCache.cpp:

(JSC::CodeCache::getUnlinkedGlobalFunctionExecutable):

  • runtime/Completion.cpp:

(JSC::checkModuleSyntax):
(JSC::createSymbolForEntryPointModule):

  • runtime/ConsoleObject.cpp:
  • runtime/ConstructData.cpp:

(JSC::construct):

  • runtime/ConstructData.h:
  • runtime/CustomGetterSetter.cpp:
  • runtime/DOMAttributeGetterSetter.cpp:
  • runtime/DateConstructor.cpp:
  • runtime/DateInstance.cpp:
  • runtime/DatePrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/DirectArguments.cpp:
  • runtime/Error.h:

(JSC::throwVMError):

  • runtime/ErrorConstructor.cpp:
  • runtime/ErrorInstance.cpp:
  • runtime/ErrorPrototype.cpp:
  • runtime/EvalExecutable.cpp:
  • runtime/Exception.cpp:
  • runtime/ExceptionHelpers.cpp:

(JSC::notAFunctionSourceAppender):
(JSC::invalidParameterInSourceAppender):
(JSC::invalidParameterInstanceofSourceAppender):
(JSC::invalidPrototypeSourceAppender):
(JSC::createTDZError):
(JSC::createInvalidPrivateNameError):
(JSC::createRedefinedPrivateNameError):
(JSC::createPrivateMethodAccessError):
(JSC::createReinstallPrivateMethodError):

  • runtime/ExecutableBase.cpp:
  • runtime/FinalizationRegistryConstructor.cpp:
  • runtime/FinalizationRegistryPrototype.cpp:
  • runtime/FunctionConstructor.cpp:
  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::toStringSlow):

  • runtime/FunctionPrototype.cpp:
  • runtime/FunctionRareData.cpp:
  • runtime/GeneratorFunctionConstructor.cpp:
  • runtime/GeneratorFunctionPrototype.cpp:
  • runtime/GeneratorPrototype.cpp:
  • runtime/GetterSetter.cpp:
  • runtime/GlobalExecutable.cpp:
  • runtime/HashMapImpl.cpp:
  • runtime/InternalFunction.cpp:
  • runtime/IntlCollator.cpp:

(JSC::IntlCollator::initializeCollator):

  • runtime/IntlCollatorConstructor.cpp:
  • runtime/IntlCollatorPrototype.cpp:
  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::initializeDateTimeFormat):

  • runtime/IntlDateTimeFormatConstructor.cpp:
  • runtime/IntlDateTimeFormatPrototype.cpp:
  • runtime/IntlDisplayNames.cpp:
  • runtime/IntlDisplayNamesConstructor.cpp:
  • runtime/IntlDisplayNamesPrototype.cpp:
  • runtime/IntlListFormat.cpp:
  • runtime/IntlListFormatConstructor.cpp:
  • runtime/IntlListFormatPrototype.cpp:
  • runtime/IntlLocale.cpp:

(JSC::IntlLocale::initializeLocale):

  • runtime/IntlLocaleConstructor.cpp:
  • runtime/IntlLocalePrototype.cpp:
  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::initializeNumberFormat):

  • runtime/IntlNumberFormatConstructor.cpp:
  • runtime/IntlNumberFormatPrototype.cpp:
  • runtime/IntlObject.cpp:

(JSC::intlStringOption):

  • runtime/IntlObject.h:
  • runtime/IntlPluralRules.cpp:
  • runtime/IntlPluralRulesConstructor.cpp:
  • runtime/IntlPluralRulesPrototype.cpp:
  • runtime/IntlRelativeTimeFormat.cpp:

(JSC::IntlRelativeTimeFormat::initializeRelativeTimeFormat):

  • runtime/IntlRelativeTimeFormatConstructor.cpp:
  • runtime/IntlRelativeTimeFormatPrototype.cpp:
  • runtime/IntlSegmentIterator.cpp:
  • runtime/IntlSegmentIteratorPrototype.cpp:
  • runtime/IntlSegmenter.cpp:
  • runtime/IntlSegmenterConstructor.cpp:
  • runtime/IntlSegmenterPrototype.cpp:
  • runtime/IntlSegments.cpp:
  • runtime/IntlSegmentsPrototype.cpp:
  • runtime/IteratorPrototype.cpp:
  • runtime/JSArray.cpp:

(JSC::JSArray::tryCreateUninitializedRestricted):

  • runtime/JSArrayBuffer.cpp:
  • runtime/JSArrayBufferConstructor.cpp:
  • runtime/JSArrayBufferPrototype.cpp:
  • runtime/JSArrayBufferView.cpp:
  • runtime/JSArrayIterator.cpp:
  • runtime/JSAsyncFunction.cpp:
  • runtime/JSAsyncGenerator.cpp:
  • runtime/JSAsyncGeneratorFunction.cpp:
  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::parseInt):

  • runtime/JSBoundFunction.cpp:
  • runtime/JSCallee.cpp:
  • runtime/JSCell.cpp:

(JSC::JSCell::dumpToStream):
(JSC::JSCell::className const):

  • runtime/JSCell.h:
  • runtime/JSCustomGetterFunction.cpp:
  • runtime/JSCustomSetterFunction.cpp:
  • runtime/JSDataView.cpp:
  • runtime/JSDataViewPrototype.cpp:

(JSC::JSC_DEFINE_CUSTOM_GETTER):

  • runtime/JSFinalizationRegistry.cpp:

(JSC::JSFinalizationRegistry::runFinalizationCleanup):

  • runtime/JSFunction.cpp:
  • runtime/JSGenerator.cpp:
  • runtime/JSGeneratorFunction.cpp:
  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::create):
(JSC::JSGenericTypedArrayView<Adaptor>::validateRange):

  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:

(JSC::speciesConstruct):
(JSC::genericTypedArrayViewProtoFuncSet):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):

  • runtime/JSGlobalLexicalEnvironment.cpp:
  • runtime/JSGlobalObject.cpp:
  • runtime/JSImmutableButterfly.cpp:
  • runtime/JSInternalPromise.cpp:
  • runtime/JSInternalPromiseConstructor.cpp:
  • runtime/JSInternalPromisePrototype.cpp:
  • runtime/JSLexicalEnvironment.cpp:
  • runtime/JSMap.cpp:
  • runtime/JSMapIterator.cpp:
  • runtime/JSModuleEnvironment.cpp:
  • runtime/JSModuleLoader.cpp:
  • runtime/JSModuleNamespaceObject.cpp:
  • runtime/JSModuleRecord.cpp:
  • runtime/JSNativeStdFunction.cpp:
  • runtime/JSONObject.cpp:
  • runtime/JSObject.cpp:

(JSC::JSObject::markAuxiliaryAndVisitOutOfLineProperties):

  • runtime/JSPromise.cpp:
  • runtime/JSPromiseConstructor.cpp:
  • runtime/JSPromisePrototype.cpp:
  • runtime/JSPropertyNameEnumerator.cpp:
  • runtime/JSProxy.cpp:
  • runtime/JSRemoteFunction.cpp:

(JSC::wrapArgument):
(JSC::wrapReturnValue):
(JSC::JSRemoteFunction::finishCreation):

  • runtime/JSScope.cpp:
  • runtime/JSScriptFetchParameters.cpp:
  • runtime/JSScriptFetcher.cpp:
  • runtime/JSSegmentedVariableObject.cpp:
  • runtime/JSSet.cpp:
  • runtime/JSSetIterator.cpp:
  • runtime/JSSourceCode.cpp:
  • runtime/JSString.cpp:

(JSC::JSString::dumpToStream):

  • runtime/JSStringIterator.cpp:
  • runtime/JSSymbolTableObject.cpp:
  • runtime/JSTemplateObjectDescriptor.cpp:
  • runtime/JSTypedArrayConstructors.cpp:
  • runtime/JSTypedArrayPrototypes.cpp:
  • runtime/JSTypedArrayViewConstructor.cpp:
  • runtime/JSTypedArrayViewPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/JSTypedArrays.cpp:
  • runtime/JSWeakMap.cpp:
  • runtime/JSWeakObjectRef.cpp:
  • runtime/JSWeakSet.cpp:
  • runtime/JSWithScope.cpp:
  • runtime/LiteralParser.cpp:

(JSC::LiteralParser<CharType>::parsePrimitiveValue):

  • runtime/MapConstructor.cpp:
  • runtime/MapIteratorPrototype.cpp:
  • runtime/MapPrototype.cpp:
  • runtime/MathObject.cpp:
  • runtime/ModuleProgramExecutable.cpp:
  • runtime/NativeErrorConstructor.cpp:
  • runtime/NativeExecutable.cpp:
  • runtime/NullGetterFunction.cpp:
  • runtime/NullSetterFunction.cpp:
  • runtime/NumberConstructor.cpp:
  • runtime/NumberObject.cpp:
  • runtime/NumberPrototype.cpp:

(JSC::toStringWithRadix):
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::numberToStringInternal):
(JSC::int52ToString):

  • runtime/ObjectConstructor.cpp:
  • runtime/ObjectPrototype.cpp:
  • runtime/Operations.h:

(JSC::arithmeticBinaryOp):
(JSC::shift):
(JSC::bitwiseBinaryOp):

  • runtime/ProgramExecutable.cpp:
  • runtime/PropertyTable.cpp:
  • runtime/ProxyConstructor.cpp:

(JSC::ProxyConstructor::finishCreation):

  • runtime/ProxyObject.cpp:
  • runtime/ProxyRevoke.cpp:
  • runtime/ReflectObject.cpp:
  • runtime/RegExp.cpp:
  • runtime/RegExpCache.cpp:

(JSC::RegExpCache::ensureEmptyRegExpSlow):

  • runtime/RegExpConstructor.cpp:
  • runtime/RegExpObject.cpp:
  • runtime/RegExpPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/RegExpStringIteratorPrototype.cpp:
  • runtime/ScopedArguments.cpp:
  • runtime/ScopedArgumentsTable.cpp:
  • runtime/ScriptExecutable.cpp:
  • runtime/SetConstructor.cpp:
  • runtime/SetIteratorPrototype.cpp:
  • runtime/SetPrototype.cpp:
  • runtime/ShadowRealmConstructor.cpp:
  • runtime/ShadowRealmObject.cpp:
  • runtime/ShadowRealmPrototype.cpp:
  • runtime/SparseArrayValueMap.cpp:
  • runtime/StrictEvalActivation.cpp:
  • runtime/StringConstructor.cpp:
  • runtime/StringIteratorPrototype.cpp:
  • runtime/StringObject.cpp:
  • runtime/StringPrototype.cpp:

(JSC::toLocaleCase):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/Structure.cpp:
  • runtime/StructureChain.cpp:
  • runtime/StructureRareData.cpp:
  • runtime/Symbol.cpp:
  • runtime/SymbolConstructor.cpp:
  • runtime/SymbolObject.cpp:
  • runtime/SymbolPrototype.cpp:
  • runtime/SymbolTable.cpp:
  • runtime/TemporalCalendar.cpp:
  • runtime/TemporalCalendarConstructor.cpp:
  • runtime/TemporalCalendarPrototype.cpp:
  • runtime/TemporalDuration.cpp:

(JSC::TemporalDuration::total const):

  • runtime/TemporalDurationConstructor.cpp:
  • runtime/TemporalDurationPrototype.cpp:
  • runtime/TemporalInstant.cpp:
  • runtime/TemporalInstantConstructor.cpp:
  • runtime/TemporalInstantPrototype.cpp:
  • runtime/TemporalNow.cpp:
  • runtime/TemporalObject.cpp:

(JSC::temporalLargestUnit):
(JSC::temporalSmallestUnit):

  • runtime/TemporalPlainDate.cpp:
  • runtime/TemporalPlainDateConstructor.cpp:
  • runtime/TemporalPlainDatePrototype.cpp:
  • runtime/TemporalPlainTime.cpp:
  • runtime/TemporalPlainTimeConstructor.cpp:
  • runtime/TemporalPlainTimePrototype.cpp:
  • runtime/TemporalTimeZone.cpp:
  • runtime/TemporalTimeZoneConstructor.cpp:
  • runtime/TemporalTimeZonePrototype.cpp:
  • runtime/TypeProfiler.cpp:

(JSC::TypeProfiler::logTypesForTypeLocation):

  • runtime/TypeSet.cpp:

(JSC::StructureShape::propertyHash):

  • runtime/WeakMapConstructor.cpp:
  • runtime/WeakMapPrototype.cpp:

(JSC::WeakMapPrototype::finishCreation):

  • runtime/WeakObjectRefConstructor.cpp:
  • runtime/WeakObjectRefPrototype.cpp:
  • runtime/WeakSetConstructor.cpp:
  • runtime/WeakSetPrototype.cpp:

(JSC::WeakSetPrototype::finishCreation):

  • testRegExp.cpp:
  • tools/FunctionAllowlist.cpp:

(JSC::FunctionAllowlist::FunctionAllowlist):

  • tools/FunctionOverrides.cpp:

(JSC::initializeOverrideInfo):

  • tools/JSDollarVM.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSC_DEFINE_HOST_FUNCTION_WITH_ATTRIBUTES):

  • tools/SigillCrashAnalyzer.cpp:

(JSC::SigillCrashAnalyzer::analyze):

  • tools/VMInspector.cpp:

(JSC::VMInspector::dumpRegisters):
(JSC::VMInspector::dumpCellMemoryToStream):

  • wasm/WasmExceptionType.h:

(JSC::Wasm::errorMessageForExceptionType):

  • wasm/WasmFormat.h:

(JSC::Wasm::typeToString):

  • wasm/WasmGlobal.cpp:

(JSC::Wasm::Global::set):

  • wasm/WasmLLIntPlan.cpp:

(JSC::Wasm::LLIntPlan::didCompleteCompilation):

  • wasm/WasmOperations.cpp:

(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):

  • wasm/js/JSToWasmICCallee.cpp:
  • wasm/js/JSWebAssembly.cpp:
  • wasm/js/JSWebAssemblyException.cpp:
  • wasm/js/JSWebAssemblyGlobal.cpp:

(JSC::JSWebAssemblyGlobal::type):

  • wasm/js/JSWebAssemblyHelpers.h:

(JSC::fromJSValue):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::createPrivateModuleKey):
(JSC::JSWebAssemblyInstance::tryCreate):

  • wasm/js/JSWebAssemblyMemory.cpp:
  • wasm/js/JSWebAssemblyModule.cpp:
  • wasm/js/JSWebAssemblyTable.cpp:

(JSC::JSWebAssemblyTable::type):

  • wasm/js/JSWebAssemblyTag.cpp:
  • wasm/js/WebAssemblyCompileErrorConstructor.cpp:
  • wasm/js/WebAssemblyCompileErrorPrototype.cpp:
  • wasm/js/WebAssemblyExceptionConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyExceptionPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyFunction.cpp:
  • wasm/js/WebAssemblyFunctionBase.cpp:
  • wasm/js/WebAssemblyGlobalConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyGlobalPrototype.cpp:
  • wasm/js/WebAssemblyInstanceConstructor.cpp:
  • wasm/js/WebAssemblyInstancePrototype.cpp:
  • wasm/js/WebAssemblyLinkErrorConstructor.cpp:
  • wasm/js/WebAssemblyLinkErrorPrototype.cpp:
  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyMemoryPrototype.cpp:
  • wasm/js/WebAssemblyModuleConstructor.cpp:
  • wasm/js/WebAssemblyModulePrototype.cpp:
  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::initializeExports):

  • wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:
  • wasm/js/WebAssemblyRuntimeErrorPrototype.cpp:
  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyTablePrototype.cpp:
  • wasm/js/WebAssemblyTagConstructor.cpp:
  • wasm/js/WebAssemblyTagPrototype.cpp:
  • wasm/js/WebAssemblyWrapperFunction.cpp:

(JSC::WebAssemblyWrapperFunction::create):

  • yarr/RegularExpression.cpp:

(JSC::Yarr::RegularExpression::Private::compile):

  • yarr/YarrErrorCode.cpp:

(JSC::Yarr::errorMessage):

  • yarr/YarrErrorCode.h:

Source/WebCore:

  • bindings/js/JSDOMGlobalObject.cpp:
  • bindings/js/JSDOMWindowBase.cpp:
  • bindings/js/JSDOMWindowProperties.cpp:
  • bindings/js/JSFileSystemDirectoryHandleIterator.cpp:
  • bindings/js/JSIDBSerializationGlobalObject.cpp:
  • bindings/js/JSRemoteDOMWindowBase.cpp:
  • bindings/js/JSShadowRealmGlobalScopeBase.cpp:
  • bindings/js/JSWindowProxy.cpp:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:
  • bindings/js/JSWorkletGlobalScopeBase.cpp:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • bridge/objc/ObjCRuntimeObject.mm:
  • bridge/objc/objc_instance.mm:

(JSC::Bindings::ObjcInstance::getMethod):

  • bridge/objc/objc_runtime.mm:
  • bridge/runtime_array.cpp:
  • bridge/runtime_method.cpp:
  • bridge/runtime_object.cpp:

Source/WTF:

  • wtf/ResourceUsage.h:
  • wtf/cocoa/ResourceUsageCocoa.cpp:

(WTF::displayNameForVMTag):

  • wtf/text/WTFString.cpp:

(WTF::String::numberToStringFixedPrecision):
(WTF::String::number):
(WTF::String::numberToStringFixedWidth):

  • wtf/text/WTFString.h:
6:25 PM Changeset in webkit [291778] by sihui_liu@apple.com
  • 10 edits in trunk/Source/WebKit

[ BigSur+ Debug wk2 EWS ] imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/quirks.window.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=237165
<rdar://problem/89443602>

Reviewed by Chris Dumez.

The test is hitting an assertion in StorageAreaBase::addListener. The assertion is used to verify that one
connection will not be added to a StorageArea twice, i.e. one web process will not have two StorageAreaMaps
pointing to the same StorageArea in network process. With our current implementation, there is an edge case that
we load a.com, navigate to b.com and go back to a.com. In this case, we would create a StorageAreaMap for a.com,
destroy it on navigation, and create another StorageAreaMap for a.com on going back. Because we don't remove
listener during destruction of StorageAreaMap (we do it when web process receives reply from network process),
the assertion is hit for two StorageAreaMaps from one connection pointing to the same StorageArea. We can fix
it by sending a cancelConnectToStorage message to remove listener during destruction.

The edge case is a bit hard to reproduce with auto test since we need to ensure web process sends the second
ConnectionToStorageArea message before receiving the reply of the first ConnectionToStorageArea message, so I
manually tested it by adding delay in NetworkStorageManager::connectToStorageArea.

  • NetworkProcess/storage/LocalStorageManager.cpp:

(WebKit::LocalStorageManager::cancelConnectToLocalStorageArea):
(WebKit::LocalStorageManager::cancelConnectToTransientLocalStorageArea):

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

(WebKit::NetworkStorageManager::cancelConnectToStorageArea):

  • NetworkProcess/storage/NetworkStorageManager.h:
  • NetworkProcess/storage/NetworkStorageManager.messages.in:
  • NetworkProcess/storage/SessionStorageManager.cpp:

(WebKit::SessionStorageManager::cancelConnectToSessionStorageArea):

  • NetworkProcess/storage/SessionStorageManager.h:
  • WebProcess/WebStorage/StorageAreaMap.cpp:

(WebKit::StorageAreaMap::computeStorageType const):
(WebKit::StorageAreaMap::clientOrigin const):
(WebKit::StorageAreaMap::sendConnectMessage):
(WebKit::StorageAreaMap::didConnect):
(WebKit::StorageAreaMap::disconnect):

  • WebProcess/WebStorage/StorageAreaMap.h:
6:03 PM Changeset in webkit [291777] by mmaxfield@apple.com
  • 6 edits in trunk

[WebGPU] Implement Device::createTexture() according to the spec
https://bugs.webkit.org/show_bug.cgi?id=238251

Reviewed by Darin Adler.

Source/WebGPU:

Simply type in the spec into the computer, in C++ form.
All functionality has links to the spec to describe its origins.

Test: api/validation/createTexture.spec.ts

  • WebGPU/Device.h:
  • WebGPU/Texture.h:

(WebGPU::Texture::create):
(WebGPU::Texture::descriptor const):

  • WebGPU/Texture.mm:

(WebGPU::featureRequirementForFormat):
(WebGPU::isCompressedFormat):
(WebGPU::isDepthOrStencilFormat):
(WebGPU::texelBlockWidth):
(WebGPU::texelBlockHeight):
(WebGPU::isRenderableFormat):
(WebGPU::supportsMultisampling):
(WebGPU::maximumMiplevelCount):
(WebGPU::hasStorageBindingCapability):
(WebGPU::Device::validateCreateTexture):
(WebGPU::usage):
(WebGPU::pixelFormat):
(WebGPU::storageMode):
(WebGPU::Device::createTexture):
(WebGPU::Texture::Texture):

Tools:

Document the behavior of fastLog2().

  • TestWebKitAPI/Tests/WTF/MathExtras.cpp:

(TestWebKitAPI::TEST):

5:32 PM Changeset in webkit [291776] by Russell Epstein
  • 9 edits in branches/safari-613.1.17.1-branch/Source

Versioning.

WebKit-7613.1.17.1.12

5:22 PM Changeset in webkit [291775] by eric.carlson@apple.com
  • 6 edits in trunk/Source

[Cocoa] Adopt new AVCapture SPI
https://bugs.webkit.org/show_bug.cgi?id=238289
rdar://90576101

Reviewed by Jer Noble.

Source/WebCore/PAL:

  • pal/spi/cocoa/AVFoundationSPI.h:

Source/WebKit:

Call AVCapture SPI once the GPU process sandbox has been expanded to allow capture.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::updateSandboxAccess):

  • GPUProcess/GPUProcess.h:
  • GPUProcess/cocoa/GPUProcessCocoa.mm:

(WebKit::GPUProcess::dispatchSimulatedNotificationsForPreferenceChange):
(WebKit::GPUProcess::sandboxWasUpatedForCapture):

5:11 PM Changeset in webkit [291774] by Alan Coon
  • 2 edits in branches/safari-613-branch/Tools

Cherry-pick r291773. rdar://problem/90716064

[Cocoa] Make IPCTestingAPI.CGColorInNSSecureCoding more robust
https://bugs.webkit.org/show_bug.cgi?id=238300
<rdar://problem/90124325>

Unreviewed test gardening.

Round-tripping a CGColor through CFData on iOS can turn extended sRGB color spaces
into regular sRGB color spaces, if the color is common to both.

  • TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:

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

5:03 PM Changeset in webkit [291773] by mmaxfield@apple.com
  • 2 edits in trunk/Tools

[Cocoa] Make IPCTestingAPI.CGColorInNSSecureCoding more robust
https://bugs.webkit.org/show_bug.cgi?id=238300
<rdar://problem/90124325>

Unreviewed test gardening.

Round-tripping a CGColor through CFData on iOS can turn extended sRGB color spaces
into regular sRGB color spaces, if the color is common to both.

  • TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
4:07 PM Changeset in webkit [291772] by Jonathan Bedard
  • 16 edits in trunk/Tools

[commits.webkit.org] Sync tags
https://bugs.webkit.org/show_bug.cgi?id=238144
<rdar://problem/90594915>

Reviewed by Dewei Zhu.

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

(Checkout): Make 'origin' a global variable.
(Checkout.init): Ditto.
(Checkout.is_updated): Ditto.
(Checkout.push_update): Support pushing a tag.
(Checkout.fetch): Fetch a specific remote.
(Checkout.update_for): Make 'origin' a global variable.
(Checkout.update_all): Add tag syncing.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/hooks.py:

(HookProcessor):
(HookProcessor.process_worker_hook): Update tags as well as branches.

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

(Git.tags): List tags for remote.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:

(Svn.tags): Remove @property tag.

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

(Git.init): List tags for remote.

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

(BitBucket.tags): Remove @property tag.

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

(GitHub.tags): Ditto.

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

(Svn.tags): Ditto.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py:

(ScmBase.tags): Ditto.
(ScmBase.find): tags is a function instead of a property.

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

(TestGit.test_tags):

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

(TestLocalSvn.test_tags):
(TestRemoteSvn.test_tags):

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

3:50 PM Changeset in webkit [291771] by Said Abou-Hallawa
  • 4 edits in trunk/Source/WebCore

[GPU Process] Ensure DisplayList::Recorder and its base class are initialized with the same GraphicsContextState
https://bugs.webkit.org/show_bug.cgi?id=238278
rdar://84602660

Reviewed by Simon Fraser.

DisplayList::RecorderImpl passes the initial GraphicsContextState to its
base class DisplayList::Recorder which pushes it on its stack. But
DisplayList::Recorder does not pass this initial GraphicsContextState to
its base class which is GraphicsContext. So DisplayList::Recorder ends up
having the initial state but the GraphicsContext ends up having the default
state.

DisplayList::Recorder::drawGlyphs() calls DrawGlyphsRecorder::drawGlyphs()
which stores the original fillBrush, strokeBrush and dropShadow. It uses
these original values to restore the owner GraphicsContext when it finishes.
The problem is DrawGlyphsRecorder::drawGlyphs() stores the values in the
state of the GraphicsContext which are the default. So in some cases we
may restore the default state to the drawing GraphicsContext.

  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::GraphicsContext):

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

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

3:07 PM Changeset in webkit [291770] by Wenson Hsieh
  • 6 edits in trunk

[iOS] Mail compose web view no longer scrolls to reveal selection upon showing the keyboard
https://bugs.webkit.org/show_bug.cgi?id=238271
rdar://89821087

Reviewed by Tim Horton.

Source/WebKit:

When a certain UIKit feature is enabled on certain builds of iOS, Mail compose no longer scrolls to reveal the
selection range or caret. This is because we have logic to defer scrolling/zooming to reveal the selection after
focusing the body element, for reasons outlined in trac.webkit.org/r288178. However, when the feature flag is
enabled, UIKeyboardWillShowNotification is no longer fired synchronously underneath the call to
-reloadInputViews, which means that isKeyboardAnimatingIn() will (most of the time) return false upon
calling -_zoomToRevealFocusedElement when receiving the next post-layout editor state update.

To mitigate this, add a new boolean flag, _waitingForKeyboardToStartAnimatingInAfterElementFocus, that's set
right before we reload input views when focusing an element that requires the keyboard (either software or
hardware), and unset when we observe the "WillShow" notification. In addition to checking
_page->isKeyboardAnimatingIn() when determining whether to defer zooming, we check this new flag as well.

Covered by an existing layout test (which currently fails when the aforementioned UIKit feature is enabled):
editing/selection/ios/scroll-to-reveal-selection-with-keyboard-avoidance-disabled.html

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _keyboardWillShow:]):

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

(-[WKContentView cleanUpInteraction]):
(-[WKContentView _keyboardWillShow]):
(-[WKContentView _zoomToRevealFocusedElement]):
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):
(-[WKContentView _elementDidBlur]):

LayoutTests:

While I'm here, adjust the test to ensure that the keyboard is hidden afterwards. When running this test back to
back with the relevant UIKit feature flag enabled, it sometimes fails without this adjustment, due to keyboard
disappearance notifications triggered from prior test invocations being fired in subsequent test invocations.

  • editing/selection/ios/scroll-to-reveal-selection-with-keyboard-avoidance-disabled.html:
2:57 PM Changeset in webkit [291769] by Andres Gonzalez
  • 4 edits in trunk/Source/WebCore

ITM: Lazy caching of HelpText property that results in a call to textUnderElement().
https://bugs.webkit.org/show_bug.cgi?id=237923
<rdar://problem/90332779>

Reviewed by Chris Fleizach.

Caching HelpText in the initialization of an IsolatedObject properties
for all objects often results in a call to AXRenderObject::textUnderElement,
which can be expensive and makes the creation and update of the isolated
tree costly. With this patch we cache HelpText on first request.

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::getOrRetrievePropertyValue):

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:

(WebCore::AXIsolatedObject::initializePlatformProperties):
(WebCore::AXIsolatedObject::helpTextAttributeValue const):

2:55 PM Changeset in webkit [291768] by Andres Gonzalez
  • 6 edits in trunk/LayoutTests

ITM: Fix for accessibility/table-attributes.html in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=238258
<rdar://problem/90707533>

Reviewed by Chris Fleizach.

  • Modified this test to build the output in memory and log it at the end

in one call. This makes the test to run faster and not timeout in
isolated tree mode. In addition, we now retrieve the table element by
ID instead of setting focus to the body and getting the first child of
the focused element, which is not ITM friendly.

  • Added the axDebug helper function which unlike debug causes minimum

side effects by modifying the innerText of the console element instead
of adding span children to it. Adding children to the console element
causes event notifications that affect the behavior of the test in both
ITM on and off.

  • accessibility/table-attributes-expected.txt:
  • accessibility/table-attributes.html:
  • platform/glib/accessibility/table-attributes-expected.txt:
  • resources/accessibility-helper.js:

(axDebug): Added.

  • resources/js-test.js:

(getOrCreate): Exposes this function.

2:27 PM Changeset in webkit [291767] by jonlee@apple.com
  • 19 edits in trunk/LayoutTests

Unreviewed fuzzy gardening.

LayoutTests/imported/mozilla:

  • svg/filters/feImage-1.svg:
  • svg/text/simple-fill-gradient.svg:

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-backgrounds/background-gradient-subpixel-fills-area.html:
  • web-platform-tests/css/css-backgrounds/background-repeat-space-6.html:
  • web-platform-tests/css/css-backgrounds/background-rounded-image-clip.html:
  • web-platform-tests/css/css-backgrounds/border-bottom-right-radius-005.xht:
  • web-platform-tests/css/css-backgrounds/border-top-left-radius-005.xht:
  • web-platform-tests/css/css-backgrounds/border-top-right-radius-005.xht:
  • web-platform-tests/css/css-backgrounds/css-box-shadow-001.html:
  • web-platform-tests/css/css-transforms/2d-rotate-001.html:
  • web-platform-tests/css/css-transforms/css-skew-002.html:

LayoutTests:

  • fast/multicol/columns-on-body.html:
  • http/tests/images/draw-pattern-slow-load-large-image.html:
  • imported/blink/fast/gradients/gradient-transparency.html:
  • imported/blink/fast/text/international/rtl-space-in-ltr-element.html:
  • svg/custom/hidpi-masking-clipping.svg:
2:21 PM Changeset in webkit [291766] by zhifei_fang@apple.com
  • 2 edits
    4 adds in trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy

[results.webkit.org] Add file bugzilla button
https://bugs.webkit.org/show_bug.cgi?id=237802

Reviewed by Jonathan Bedard.

  • Tools/Scripts/libraries/resultsdbpy/resultsdbpy/bug_trackers/init.py: Added.
  • Tools/Scripts/libraries/resultsdbpy/resultsdbpy/bug_trackers/bug_description.py: Added.

(translate_selected_dots_to_bug_title_and_description):

  • Tools/Scripts/libraries/resultsdbpy/resultsdbpy/bug_trackers/bugzilla.py: Added.

(Bugzilla):
(Bugzilla.init):
(Bugzilla.create_bug):

  • Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/api_routes.py:

(APIRoutes.init):

  • Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/timeline.js:

(TimelineFromEndpoint.prototype._renderSelectedDotsButtonGroup):
(TimelineFromEndpoint):

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

1:26 PM Changeset in webkit [291765] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ iOS EWS ] editing/deleting/insert-in-orphaned-selection-crash.html is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=238282

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
1:23 PM Changeset in webkit [291764] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[ EWS iOS ] editing/spelling/spellcheck-async-remove-frame.html is a crash
https://bugs.webkit.org/show_bug.cgi?id=238284

Unreviewed test gardening.

  • platform/ios/TestExpectations:
1:20 PM Changeset in webkit [291763] by mmaxfield@apple.com
  • 3 edits in trunk/LayoutTests

Make fast/text/emoji-num-glyphs.html more robust
https://bugs.webkit.org/show_bug.cgi?id=238283
<rdar://problem/88842010>

Unreviewed test gardening.

Remove the U+26F9 PERSON WITH BALL without the U+FE0F emoji variation selector.

  • fast/text/emoji-num-glyphs-expected.txt:
  • fast/text/emoji-num-glyphs.html:
1:01 PM Changeset in webkit [291762] by jer.noble@apple.com
  • 6 edits in trunk

[Cocoa] MSE-backed videos fail to play in Captive Portal mode
https://bugs.webkit.org/show_bug.cgi?id=237787
<rdar://89318047>

Reviewed by Eric Carlson.

Source/WebCore:

Updated test: media/media-source/media-source-allowed-codecs.html

When generating the "codecs" string for a given MSE track, we were previously casting
the FourCC code (a uint32) to a string, and passing that across the GPU process boundary,
and reconstituting the string on the WebContent process side. This caused the codec entry
to be "reversed", (e.g., 'aac ' turned into ' caa'), and fail codec validation.

Instead, use the FourCharCode class to properly create a string from the codec ID.

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

LayoutTests:

  • media/media-source/media-source-allowed-codecs-expected.txt:
  • media/media-source/media-source-allowed-codecs.html:
12:24 PM Changeset in webkit [291761] by J Pascoe
  • 2 edits in trunk/Source/WebKit

[WebAuthn] Specify correct ASCPublicKeyCredentialKind in configureAssertionOptions
https://bugs.webkit.org/show_bug.cgi?id=238272
rdar://problem/90710080

Reviewed by Brent Fulgham.

There was a typo when refactoring code into this method. The kind passed to the function
should be used, instead of always ASCPublicKeyCredentialKindPlatform.

  • UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:

(WebKit::configureAssertionOptions):

12:22 PM Changeset in webkit [291760] by Russell Epstein
  • 6 edits in branches/safari-614.1.7-branch/Source/WebKit

Cherry-pick r291691. rdar://problem/90654598

Prefer WK_EXTERN to WK_EXPORT in Cocoa API headers
https://bugs.webkit.org/show_bug.cgi?id=238129

Reviewed by Wenson Hsieh.

  • UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h:
  • UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h:
  • UIProcess/API/Cocoa/_WKElementAction.h:
  • UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h: WK_EXPORT comes from WKDeclarationSpecifiers.h, which is a legacy C SPI header. WK_EXTERN comes from WKFoundation.h, part of the modern public API. We should prefer the modern version in Cocoa-only headers (even in private headers).

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

12:21 PM Changeset in webkit [291759] by jer.noble@apple.com
  • 16 edits
    2 adds in trunk

[iOS] WebKit app is sometimes not "Now Playing" during initial playback
https://bugs.webkit.org/show_bug.cgi?id=236993
<rdar://88827167>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/audio-session-category-at-most-recent-playback.html

Recently, we have added the concept of "preparingToPlay" to PlatformMediaSession to allow
the correct category to be set if updateSessionState() is called after playback is allowed
by the MediaSessionManager, but before playback is actually started by the media element.
However, this depends on updateSessionState() being called synchronously during playback.
We disabled this synchronous update in r269077 due to the large runtime cost when a large
number of media elements are created (but not used) at once.

Relax this asynchronous update in the case where the state is moving to "Playing", which
ensures that the correct AudioSessionCategory is set before playback starts, rather than
immediately afterward.

To support testing that the category was correctly set before playback started, add an
ivar to HTMLMediaElement that is set to the current AudioSessionCategory immediately before
the media element instructs the MediaPlayer to start playback. Expose this ivar to Internals.

Drive-by fixes: AudioSession::CategoryType cannot be forward declared, as it is a public
member of a class. Allow the enum to be forward declared by moving the declaration outside
the class, but allow current uses of the enum to continue by typedefing it inside the class
to the original enum name. Add an IDL enumeration matching the AudioSession one in Interals.idl
and convert the existing audioSessionCategory() call to use the new enumeration.

(Unforunately in the case where USE_AUDIO_SESSION is not set, the enumeration must be re-
declared. This can be removed and the entire implementation wrapped in a USE() check, once
the bindings generator is extended to allow "Conditional="-style attributes for USE checks.)

The added test is flakey due to a previous change which would keep the MediaSession category
in "MediaPlayback" for up to 2s after playback ends. To counteract this flakiness, reset the
state of the PlatformMediaSessionManager between tests.

  • html/HTMLMediaElement.cpp:

(WebCore::m_categoryAtMostRecentPlayback):
(WebCore::HTMLMediaElement::playPlayer):
(WebCore::m_logIdentifier): Deleted.

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::categoryAtMostRecentPlayback const):

  • platform/audio/AudioSession.h:
  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::sessionStateChanged):

  • platform/audio/PlatformMediaSessionManager.h:

(WebCore::PlatformMediaSessionManager::resetSessionState):

  • platform/audio/cocoa/MediaSessionManagerCocoa.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:

(WebCore::MediaSessionManagerCocoa::resetSessionState):

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):

  • testing/Internals.cpp:

(WebCore::Internals::audioSessionCategory const):
(WebCore::Internals::categoryAtMostRecentPlayback const):

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

LayoutTests:

Fix the audio-session-category test. Creating the oscilator actually does change the
AudioSession category to "Ambient", but (previously) only in the next run loop, so a
synchronous test that the AudioSession category is "None" succeeds. Now that starting
playback (as happens when creating an audio node) changes the AudioSession synchronously,
the test begins failing.

  • media/audio-session-category-at-most-recent-playback-expected.txt: Added.
  • media/audio-session-category-at-most-recent-playback.html: Added.
  • media/audio-session-category-expected.txt:
  • media/audio-session-category.html:
11:58 AM Changeset in webkit [291758] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebGPU

[WebGPU] Clean up implementation of Device::createSampler()
https://bugs.webkit.org/show_bug.cgi?id=238250

Reviewed by Darin Adler.

Refactor repeated code into reusable functions.

  • WebGPU/Sampler.mm:

(WebGPU::addressMode):
(WebGPU::minMagFilter):
(WebGPU::mipFilter):
(WebGPU::compareFunction):
(WebGPU::Device::createSampler):

11:53 AM Changeset in webkit [291757] by commit-queue@webkit.org
  • 303 edits
    8 adds
    4 deletes in trunk/Source/ThirdParty/ANGLE

Roll ANGLE to 2022-03-22 (e7f29440f02514126f30350dcd7132b68f7954d7)
https://bugs.webkit.org/show_bug.cgi?id=238171

Large autogenerated ChangeLog elided.

Tested locally with Minibrowser on M1, with test cases from the
following recent bugs:

https://bugs.webkit.org/show_bug.cgi?id=237006
https://bugs.webkit.org/show_bug.cgi?id=237906
https://bugs.webkit.org/show_bug.cgi?id=238022

and confirmed all render correctly.

Patch by Kenneth Russell <kbr@chromium.org> on 2022-03-23
Reviewed by Kimmo Kinnunen.

11:47 AM Changeset in webkit [291756] by ysuzuki@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

[JSC][MSVC] custom getter creation needs to include classInfo since MSVC ICF is not "safe" variant
https://bugs.webkit.org/show_bug.cgi?id=238030

Reviewed by Alexey Shvayka.

MSVC performs very aggressive ICF (identical code folding) and it even merges the identical two functions
into one even though a pointer to this function is used. This means MSVC's ICF is not "safe"[1], and custom
function weakmap is broken on MSVC since it is assuming function pointers are different for different functions.
Unfortunately, it seems that there is no attribute / annotation to prevent this behavior, so we need to workaround it.
Since JSCustomGetterFunction does separate thing based on attached DOMAttribute, we need to include const ClassInfo*
into a key of JSCustomGetterFunction weakmap to ensure that two identical functions with different const ClassInfo*
do not get the same JSCustomGetterFunction.

[1]: https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/36912.pdf

  • runtime/JSCustomGetterFunction.h:
  • runtime/JSCustomSetterFunction.h:
  • runtime/JSGlobalObject.h:
  • runtime/JSGlobalObjectInlines.h:

(JSC::JSGlobalObject::WeakCustomGetterOrSetterHash<T>::hash):

  • runtime/JSObject.cpp:

(JSC::WeakCustomGetterOrSetterHashTranslator::hash):
(JSC::WeakCustomGetterOrSetterHashTranslator::equal):
(JSC::createCustomGetterFunction):
(JSC::createCustomSetterFunction):

11:37 AM Changeset in webkit [291755] by Chris Dumez
  • 2 edits in trunk/Source/JavaScriptCore

Avoid unnecessary String constructor under FunctionExecutable::toStringSlow()
https://bugs.webkit.org/show_bug.cgi?id=238263

Reviewed by Darin Adler.

  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::toStringSlow):

11:31 AM Changeset in webkit [291754] by Brandon
  • 2 edits in trunk/Source/WebCore

WBR element should set Clear property to None
https://bugs.webkit.org/show_bug.cgi?id=238275

Reviewed by Alan Bujtas.

WBR elements need to have their Clear property automatically set to None.
BR elements do not need this change.

  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::BoxTree::buildTree):

11:17 AM Changeset in webkit [291753] by Matteo Flores
  • 2 edits in trunk/LayoutTests

Unreviewed, reverting r291721.

Bug has been fixed

Reverted changeset:

"[ EWS iOS ] fast/text/emoji-num-glyphs.html is a flaky text
failure"
https://bugs.webkit.org/show_bug.cgi?id=238233
https://commits.webkit.org/r291721

10:58 AM Changeset in webkit [291752] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix DataIC's slowPathJump handling
https://bugs.webkit.org/show_bug.cgi?id=231224

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileInById):

10:56 AM Changeset in webkit [291751] by jonlee@apple.com
  • 5 edits in trunk

Turn DOM in GPU Process on by default on iOS layout tests
https://bugs.webkit.org/show_bug.cgi?id=236547
rdar://88863036

Reviewed by Geoffrey Garen.

Tools:

  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::defaults):

LayoutTests:

  • gpu-process/TestExpectations: Transfer expectations.
  • platform/ios-wk2/TestExpectations:
10:39 AM Changeset in webkit [291750] by Russell Epstein
  • 2 edits in branches/safari-614.1.7-branch/Source/WebCore

Cherry-pick r291566. rdar://problem/90346629

Accessing WebGL content crashes in macOS Recovery OS
https://bugs.webkit.org/show_bug.cgi?id=238139

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

Add a quick fix trying to circumvent a Recovery OS crash.
Parts of this will be reverted once the true source is found.

  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm: (WebCore::platformSupportsMetal):

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

10:12 AM Changeset in webkit [291749] by commit-queue@webkit.org
  • 10 edits in trunk

After losing context due to too many contexts, getError() does not return CONTEXT_LOST_WEBGL
https://bugs.webkit.org/show_bug.cgi?id=236965

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

Source/WebCore:

After generating context lost, getError() is specified to return:

  • CONTEXT_LOST_WEBGL for first call
  • NO_ERROR for all the next calls.

WEBGL_lose_context is specified to add INVALID_OPERATION errors
even after context lost.

Change the code so that CONTEXT_LOST_WEBGL and WEBGL_lose_context induced
INVALID_OPERATION errors go to error vector in context lost -specific state.

Previously, these errors went into the m_context error vector. This is problematic
especially in the case where context loss happens where the m_context gets destroyed --
the error vector would be gone. This kind of loss happens for example when contexts
get lost due to the process having too many active contexts (least active context is "recycled").

Previously, any synthetized error was potentially obtainable after context lost. This is problematic
as it is not as specified. As mentioned above, only errors allowed after context lost is

  • CONTEXT_LOST_WEBGL first after context lost
  • WEBGL_lose_context.loseContext() and WEBGL_lose_context.restoreContext() induced INVALID_OPERATIONs

Changes the behavior to not report INVALID_OPERATION error in the theoretical case where we fail to
instantiate a new context. This is not allowed by the spec. Instead, just print an error to the console.

No new tests, updates the expectations of old ones with less failures.

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::initializeNewContext):
(WebCore::WebGLRenderingContextBase::getError):
(WebCore::WebGLRenderingContextBase::isContextLost const):
(WebCore::WebGLRenderingContextBase::isContextLostOrPending):
(WebCore::WebGLRenderingContextBase::forceLostContext):
(WebCore::WebGLRenderingContextBase::loseContextImpl):
(WebCore::WebGLRenderingContextBase::forceRestoreContext):
(WebCore::WebGLRenderingContextBase::isContextUnrecoverablyLost const):
(WebCore::WebGLRenderingContextBase::scheduleTaskToDispatchContextLostEvent):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):
(WebCore::WebGLRenderingContextBase::synthesizeGLError):
(WebCore::WebGLRenderingContextBase::synthesizeLostContextGLError):

  • html/canvas/WebGLRenderingContextBase.h:

(WebCore::WebGLRenderingContextBase::ContextLostState::ContextLostState):

Source/WebKit:

Remove recording of synthetic webgl context lost error from the proxy.
This is now recorded in the WebGLRenderingContextBase.

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::synthesizeGLError):
(WebKit::RemoteGraphicsContextGLProxy::getError):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:

LayoutTests:

  • fast/canvas/webgl/lose-context-on-status-failure-expected.txt:
  • webgl/lose-context-after-context-lost-expected.txt:
  • webgl/max-active-contexts-webglcontextlost-prevent-default-expected.txt:
10:05 AM Changeset in webkit [291748] by commit-queue@webkit.org
  • 8 edits in trunk

Context2D drawImage(img, x, y, w, h) should not throw IndexSizeError when width == 0 or height == 0
https://bugs.webkit.org/show_bug.cgi?id=238195

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

Source/WebCore:

When drawing HTMLImageElement with width == 0 or height==0, do nothing as per spec.

When drawing HTMLCanvasElement with source rectangle width == 0 or height == 0,
do nothing as per spec.

Previously these would throw IndexSizeError. The CanvasDrawImage methods do not throw these.

Spec:
HTML Living Standard — Last Updated 17 March 2022
https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-drawimage

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::drawImage):

LayoutTests:

  • fast/canvas/canvas-overloads-drawImage-expected.txt:
  • fast/canvas/canvas-overloads-drawImage.html:
  • fast/canvas/drawImage-with-invalid-args-expected.txt:
  • fast/canvas/drawImage-with-invalid-args.html:
10:00 AM Changeset in webkit [291747] by Tyler Wilcock
  • 8 edits
    3 adds in trunk

AccessibilityRenderObject::nextSibling should allow parent differences in the presence of display: contents
https://bugs.webkit.org/show_bug.cgi?id=238184

Reviewed by Andres Gonzalez.

Source/WebCore:

AccessibilityRenderObject::nextSibling currently has this logic to
return nullptr if the computed sibling has a parent different from this:

auto* nextObject = objectCache->getOrCreate(nextSibling);
if (nextObject && nextObject->parentObject() != this->parentObject())

return nullptr;

This is problematic in the presence of display: contents since we expect
parent object differences due to the way this property affects the render tree.

Concretely, this breaks the firstChild(), nextSibling() iteration we do throughout
WebKit (e.g. in AccessibilityRenderObject::addChildren), as when we get to an element
with display: contents we get a parent mismatch and iteration stops unnecessarily.

This patch fixes the issue by allowing a parent mismatch when either
object has display: contents, as we account for this difference in the
appropriate places (e.g. AccessibilityObject::insertChild).

Test: accessibility/display-contents-search-traversal.html

  • accessibility/AXLogger.cpp:

(WebCore::operator<<):
Log when an object has display: contents. This property affects the
render tree and AX tree, so it's useful to log.

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::hasDisplayContents const): Added.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::nextSibling const):

LayoutTests:

  • accessibility/display-contents-search-traversal-expected.txt: Added.
  • accessibility/display-contents-search-traversal.html: Added.
  • platform/glib/TestExpectations: Skip new test.
  • platform/ios/TestExpectations: Enable new test.
  • platform/ios/accessibility/display-contents-search-traversal-expected.txt: Added.
  • platform/win/TestExpectations: Skip new test.
9:40 AM Changeset in webkit [291746] by Patrick Angle
  • 7 edits
    2 adds in trunk

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

Reviewed by Yusuke Suzuki.

JSTests:

Add test for multi-line parsing errors.

  • stress/regress-88440831.js: Added.

Source/JavaScriptCore:

New test: JSTests/stress/regress-88440831.js
Added test case in: inspector/debugger/breakpoints/resolved-dump-all-pause-locations.html

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

  • debugger/Breakpoint.cpp:

(JSC::Breakpoint::resolve):

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

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

  • parser/Lexer.cpp:

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

LayoutTests:

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

  • inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt:
  • inspector/debugger/breakpoints/resolved-dump-all-pause-locations.html:
  • inspector/debugger/breakpoints/resources/dump-multiline.js: Added.

(test):

7:12 AM Changeset in webkit [291745] by commit-queue@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Add DoNotHaveTagRegisters mode to unboxDouble
https://bugs.webkit.org/show_bug.cgi?id=238018

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

Wasm cannot use unboxDouble as-is because
GPRInfo::numberTagRegister is not available. Add a
DoNotHaveTagRegister mode so we can get rid of some duplicated
code.

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::add64):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::unboxDoubleWithoutAssertions):
(JSC::AssemblyHelpers::unboxDouble):

  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

6:54 AM Changeset in webkit [291744] by youenn@apple.com
  • 11 edits
    1 add in trunk/Source/WebCore

VideoFrame does not need to inherit from MediaSample
https://bugs.webkit.org/show_bug.cgi?id=238071

Reviewed by Eric Carlson.

Update MediaSample, MediaSampleAVFObjC and VideoFrame according the separation.
This is a refactoring, covered by existing tests.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/MediaSample.h:
  • platform/VideoFrame.cpp:
  • platform/VideoFrame.h:
  • platform/VideoFrame.mm: Added.
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
  • platform/graphics/gstreamer/VideoFrameGStreamer.cpp:
  • platform/graphics/gstreamer/VideoFrameGStreamer.h:
6:10 AM Changeset in webkit [291743] by vjaquez@igalia.com
  • 3 edits in trunk/Source/WebCore

REGRESSION(r291611): Fix GTK/WPE build
https://bugs.webkit.org/show_bug.cgi?id=238248

Unreviewed build fix.

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

(WebCore::RealtimeIncomingVideoSourceLibWebRTC::OnFrame):

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

(WebCore::RealtimeOutgoingVideoSourceLibWebRTC::videoFrameAvailable):

4:52 AM Changeset in webkit [291742] by Ziran Sun
  • 18 edits
    1 copy in trunk

[InputElement] Add HTMLInputElement::showPicker() method
https://bugs.webkit.org/show_bug.cgi?id=237192

LayoutTests/imported/w3c:

Reviewed by Darin Adler.

Update test expectations as more tests are now passing.

  • web-platform-tests/html/dom/idlharness.https-expected.txt:
  • web-platform-tests/html/semantics/forms/the-input-element/show-picker-cross-origin-iframe-expected.txt:
  • web-platform-tests/html/semantics/forms/the-input-element/show-picker-expected.txt:

Source/WebCore:

Reviewed by Darin Adler.

At https://github.com/whatwg/html/issues/6909, it proposes to add a
new HTMLInputElement::showPicker() method to show a brower picker for
temporal, color and file input elements.

Chromium has introduced this feature at
https://bugs.chromium.org/p/chromium/issues/detail?id=939561.

This CL imports the changes from Chromium CLs at
https://chromium-review.googlesource.com/c/chromium/src/+/3056920
and
https://chromium-review.googlesource.com/c/chromium/src/+/3310677

The support for temporal input element is not included in this CL. We might
need a bit more investigation on it and hopefully will addess at a later stage.

  • html/ColorInputType.cpp:

(WebCore::ColorInputType::handleDOMActivateEvent):
(WebCore::ColorInputType::showPicker):
(WebCore::ColorInputType::allowsShowPickerAcrossFrames):

  • html/ColorInputType.h:
  • html/FileInputType.cpp:

(WebCore::FileInputType::handleDOMActivateEvent):
(WebCore::FileInputType::showPicker):
(WebCore::FileInputType::allowsShowPickerAcrossFrames):

  • html/FileInputType.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::showPicker):

  • html/HTMLInputElement.h:
  • html/HTMLInputElement.idl:
  • html/InputType.cpp:

(WebCore::InputType::allowsShowPickerAcrossFrames):
(WebCore::InputType::showPicker):

  • html/InputType.h:

LayoutTests:

Reviewed by Darin Adler .

  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/show-picker-cross-origin-iframe-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/show-picker-cross-origin-iframe-expected.txt.
2:04 AM Changeset in webkit [291741] by youenn@apple.com
  • 6 edits
    5 adds in trunk

Computation of Document siteForCookies is buggy in case document is created by window.open
https://bugs.webkit.org/show_bug.cgi?id=238202
<rdar://88979099>

Reviewed by John Wilander.

Source/WebCore:

For top level navigations, we need to use the security origin to compute siteForCookies as the document
may have the opener security origin.
Add a Document routine to handle this case.

Tests: http/tests/cookies/same-site/popup-from-iframe-same-site-with-post-form.html

http/tests/cookies/same-site/popup-same-site-with-post-form.html

  • dom/Document.cpp:
  • dom/Document.h:
  • loader/FrameLoader.cpp:

LayoutTests:

  • http/tests/cookies/resources/testharness-helpers.js:
  • http/tests/cookies/same-site/popup-from-iframe-same-site-with-post-form-expected.txt: Added.
  • http/tests/cookies/same-site/popup-from-iframe-same-site-with-post-form.html: Added.
  • http/tests/cookies/same-site/popup-same-site-with-post-form-expected.txt: Added.
  • http/tests/cookies/same-site/popup-same-site-with-post-form.html: Added.
  • http/tests/cookies/same-site/resources/popup-iframe.html: Added.
1:40 AM Changeset in webkit [291740] by Razvan Caliman
  • 5 edits in trunk

Web Inspector: Styles panel: Unwanted extra dash when autocompleting CSS variable names
https://bugs.webkit.org/show_bug.cgi?id=237676

Reviewed by Patrick Angle.

Source/WebInspectorUI:

The CSS-mode tokenizer provided by CodeMirror and used in Web Inspector matches strictly conforming
CSS variable names, i.e. prefixed with two dahses, --.

An identifier like -name gets split into two tokens - and name.
The token at the cursor position becomes just name.
This token's value is used as a query string for autocompletion.

When a completion suggestion is picked, the query string gets replaced with the suggestion text in
WI.SpreadsheetTextField._updatePendingValueWithCompletionText().
But because it was split from the query, the dash ends up prepended to the replaced string.

This patch adds a special case in WI.CSSKeywordCompletions.forPartialPropertyValue()
to account for this aspect of the tokenizer.

  • UserInterface/Models/CSSKeywordCompletions.js:

LayoutTests:

Add tests for special cases of matching incomplete CSS variable names in autocompletion.

  • inspector/unit-tests/css-keyword-completions-expected.txt:
  • inspector/unit-tests/css-keyword-completions.html:
1:09 AM Changeset in webkit [291739] by Fujii Hironori
  • 2 edits in trunk/Source/WebKit

[WinCairo] Unreviewed build fix after r291733

  • WebProcess/GPU/graphics/PrepareBackingStoreBuffersData.h:
1:02 AM Changeset in webkit [291738] by Nikos Mouchtaris
  • 1 edit
    8 adds in trunk/LayoutTests/imported/w3c

Import calc() infinite/nan tests
https://bugs.webkit.org/show_bug.cgi?id=238237

Unreviewed, test import.

  • web-platform-tests/css/css-values/calc-catch-divide-by-0-expected.txt: Added.
  • web-platform-tests/css/css-values/calc-catch-divide-by-0.html: Added.
  • web-platform-tests/css/css-values/calc-infinity-nan-serialize-angle-expected.txt: Added.
  • web-platform-tests/css/css-values/calc-infinity-nan-serialize-angle.html: Added.
  • web-platform-tests/css/css-values/calc-infinity-nan-serialize-length-expected.txt: Added.
  • web-platform-tests/css/css-values/calc-infinity-nan-serialize-length.html: Added.
  • web-platform-tests/css/css-values/calc-infinity-nan-serialize-time-expected.txt: Added.
  • web-platform-tests/css/css-values/calc-infinity-nan-serialize-time.html: Added.

Mar 22, 2022:

11:47 PM Changeset in webkit [291737] by Ben Nham
  • 19 edits
    1 copy
    3 adds in trunk

Only show notification permission prompt on transient activation
https://bugs.webkit.org/show_bug.cgi?id=238188

Reviewed by Youenn Fablet.

Source/WebCore:

In r291427, we changed Notification.requestPermission and PushManager.subscribe to only show
a permission prompt when processing a user gesture. This ended up being too restrictive and
causes compatibility problems with some large sites.

Instead, match Chrome and Firefox by allowing these prompts after a transient activiation,
i.e. a user gesture within the past second.

Per Maciej's suggestion, we also consume the activation to help combat prompt spam.

Covered by new and existing layout tests.

  • Modules/notifications/Notification.cpp:

(WebCore::Notification::requestPermission):

  • Modules/push-api/PushManager.cpp:

(WebCore::PushManager::subscribe):

Tools:

Add an internal API denyWebNotificationPermissionOnPrompt to WebKitTestRunner that allows a
notification permission prompt to first be displayed and then rejected. This differs from
the existing denyNotificationPermission call, which denied notification permissions before
prompting.

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

(WTR::TestRunner::denyWebNotificationPermission):
(WTR::TestRunner::denyWebNotificationPermissionOnPrompt):

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

(WTR::originUserVisibleName):
(WTR::TestController::denyNotificationPermissionOnPrompt):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::decidePolicyForNotificationPermissionRequest):

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

Add test cases to make sure that showing a permission prompt consumes a user gesture.

  • http/tests/notifications/notification-request-permission-no-callback.html:
  • http/tests/notifications/notification-request-permission.html:
  • http/tests/notifications/request-consumes-activation-expected.txt: Added.
  • http/tests/notifications/request-consumes-activation.html: Added.
  • http/tests/push-api/resources/subscribe-tests.js:

(async testDocumentSubscribeWithUserGesture):
(async testDocumentSubscribeWithoutUserGesture):
(async testDocumentSubscribeImpl):

  • http/tests/push-api/subscribe-deny-permissions-expected.txt:
  • http/tests/push-api/subscribe-deny-permissions-on-prompt-expected.txt:
  • http/tests/push-api/subscribe-deny-permissions-on-prompt.html: Added.
  • http/tests/push-api/subscribe-deny-permissions.html:
  • platform/gtk/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
11:45 PM Changeset in webkit [291736] by ysuzuki@apple.com
  • 17 edits in trunk

[JSC] Test DFG / FTL DataIC
https://bugs.webkit.org/show_bug.cgi?id=231224

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/deltablue-varargs.js:
  • microbenchmarks/richards-try-catch.js:

Source/JavaScriptCore:

This patch revives DataIC in DFG and FTL, and re-enable testing to make it usable
for unlinked DFG. Currently, only x64 / ARM64 are supported.

  • bytecode/InlineAccess.cpp:

(JSC::InlineAccess::isCacheableArrayLength):
(JSC::InlineAccess::isCacheableStringLength):
(JSC::InlineAccess::rewireStubAsJumpInAccess):
(JSC::InlineAccess::resetStubAsJumpInAccess):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetById):
(JSC::DFG::SpeculativeJIT::compileGetByIdFlush):
(JSC::DFG::SpeculativeJIT::compileInById):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLLowerDFGToB3.cpp:

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

  • jit/JITCode.h:

(JSC::JITCode::useDataIC):

  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITByIdGenerator::generateFastCommon):
(JSC::generateGetByIdInlineAccess):
(JSC::JITGetByIdGenerator::generateFastPath):
(JSC::JITGetByIdWithThisGenerator::generateFastPath):
(JSC::generatePutByIdInlineAccess):
(JSC::JITPutByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITPutByIdGenerator::generateFastPath):
(JSC::JITDelByValGenerator::generateFastPath):
(JSC::JITDelByIdGenerator::generateFastPath):
(JSC::JITInByValGenerator::generateFastPath):
(JSC::generateInByIdInlineAccess):
(JSC::JITInByIdGenerator::generateFastPath):
(JSC::JITInByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITInstanceOfGenerator::generateFastPath):
(JSC::JITGetByValGenerator::generateFastPath):
(JSC::JITPutByValGenerator::generateFastPath):
(JSC::JITPrivateBrandAccessGenerator::generateFastPath):

  • jit/JITInlineCacheGenerator.h:

(JSC::JITInlineCacheGenerator::reportSlowPathCall):
(JSC::JITInlineCacheGenerator::slowPathBegin const):
(JSC::JITByIdGenerator::slowPathJump const):
(JSC::JITInByValGenerator::slowPathJump const):

  • runtime/Options.cpp:

(JSC::Options::recomputeDependentOptions):

  • runtime/OptionsList.h:

Tools:

  • Scripts/run-jsc-stress-tests:
10:26 PM Changeset in webkit [291735] by achristensen@apple.com
  • 19 edits
    1 add in trunk

Implement PCM to SKAdNetwork bridge
https://bugs.webkit.org/show_bug.cgi?id=237969
<rdar://82988054>

Reviewed by John Wilander.

Source/WebCore:

When clicking on an app store link that has been decorated with the necessary PCM attributes,
we give information about the click to SKAdNetwork to send an anonymous attribution report later
if the user buys the app because of the click. That part has not been implemented yet, so to test
we simply report the information that we are giving to SKAdNetwork in an API test which uses an HTTPS
proxy so we don't actually connect to apps.apple.com when running the test.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::attributionDestinationURLForPCM const):
(WebCore::HTMLAnchorElement::mainDocumentRegistrableDomainForPCM const):
(WebCore::HTMLAnchorElement::attributionSourceNonceForPCM const):
(WebCore::HTMLAnchorElement::parsePrivateClickMeasurementForSKAdNetwork const):
(WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):
(WebCore::HTMLAnchorElement::handleClick):

  • html/HTMLAnchorElement.h:
  • loader/PrivateClickMeasurement.cpp:

(WebCore::PrivateClickMeasurement::appStoreURLAdamID):

  • loader/PrivateClickMeasurement.h:

(WebCore::PrivateClickMeasurement::adamID const):
(WebCore::PrivateClickMeasurement::setAdamID):
(WebCore::PrivateClickMeasurement::encode const):
(WebCore::PrivateClickMeasurement::decode):

Source/WebKit:

The WebKit parts of this just introduce a new information flow to SKAdNetwork to send the app purchase attribution
kind of like WebKit sends a PCM attribution report 24-48 hours after a non-app-purchase click with attribution.

  • Configurations/WebKit.xcconfig:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::storePrivateClickMeasurement):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::donateToSKAdNetwork):

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

(WebKit::NetworkSessionCocoa::donateToSKAdNetwork):

  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Scripts/process-entitlements.sh:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didCommitLoadForFrame):

  • WebKit.xcodeproj/project.pbxproj:

Source/WTF:

  • wtf/PlatformHave.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::TEST):

9:25 PM Changeset in webkit [291734] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

Add a few more WEBCORE_EXPORT macros
https://bugs.webkit.org/show_bug.cgi?id=238214

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-22
Reviewed by Eric Carlson.

These are needed to successfully link when building with -fsanitize=fuzzer,address

  • dom/Document.h:
  • html/HTMLCollection.h:
  • html/HTMLOptionsCollection.h:
  • platform/Pasteboard.h:
  • platform/mediastream/mac/CoreAudioCaptureSource.h:
7:06 PM Changeset in webkit [291733] by Simon Fraser
  • 14 edits
    1 add in trunk/Source/WebKit

Swap all RemoteLayerBackingStore buffers in a single IPC
https://bugs.webkit.org/show_bug.cgi?id=238210

Reviewed by Tim Horton.

PrepareBuffersForDisplay is a sync IPC (since we need the result before painting), and sync
IPC per-layer has performance impact. So group all the swapping into a single IPC with the
GPU Process.

The PrepareBuffersForDisplay message now takes a vector of
PrepareBackingStoreBuffersInputData, and returns a vector of
PrepareBackingStoreBuffersOutputData. Swapped buffers are applied to the
RemoteLayerBackingStore as before, with a minor change in the place that setNeedsDisplay()
is called in the case where we need a full display.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::prepareBuffersForDisplay):
(WebKit::RemoteRenderingBackend::prepareLayerBuffersForDisplay):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteRenderingBackend.messages.in:
  • Scripts/webkit/messages.py:

(headers_for_type):

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::applySwappedBuffers):
(WebKit::RemoteLayerBackingStore::performDelegatedLayerDisplay):
(WebKit::RemoteLayerBackingStore::prepareToDisplay):
(WebKit::RemoteLayerBackingStore::ensureFrontBuffer):
(WebKit::RemoteLayerBackingStore::prepareBuffers):
(WebKit::operator<<): Deleted.

  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:

(WebKit::RemoteLayerBackingStoreCollection::prepareBackingStoreBuffers): Deleted.

  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.h:
  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.mm:

(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::prepareBackingStoresForDisplay):
(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::prepareBackingStoreBuffers): Deleted.

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/graphics/PrepareBackingStoreBuffersData.h: Added.

(WebKit::PrepareBackingStoreBuffersInputData::encode const):
(WebKit::PrepareBackingStoreBuffersInputData::decode):
(WebKit::PrepareBackingStoreBuffersOutputData::encode const):
(WebKit::PrepareBackingStoreBuffersOutputData::decode):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::prepareBuffersForDisplay):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
6:39 PM Changeset in webkit [291732] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (248499@main): [iOS] ASSERTION FAILED: Completion handler should always be called under WebKit::NetworkProcess::prepareToSuspend()
https://bugs.webkit.org/show_bug.cgi?id=238234
<rdar://problem/90665237>

Reviewed by Chris Dumez.

Invoke completion handler on early return.

  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::NetworkStorageManager::suspend):

6:27 PM Changeset in webkit [291731] by Chris Dumez
  • 5 edits in trunk/Source

Use ASCIILiteral in a few more places where it is useful
https://bugs.webkit.org/show_bug.cgi?id=238235

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::toStringSlow):

Source/WebCore:

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::setValueCommon):

  • platform/animation/TimingFunction.cpp:

(WebCore::TimingFunction::cssText const):

5:58 PM Changeset in webkit [291730] by Chris Dumez
  • 6 edits in trunk/Source

Add URL::stringWithoutFragmentIdentifier() overload which returns a String instead of a StringView
https://bugs.webkit.org/show_bug.cgi?id=238221

Reviewed by Geoffrey Garen.

Source/WebCore:

  • page/History.cpp:

(WebCore::History::stateObjectAdded):

  • platform/network/BlobRegistryImpl.cpp:

(WebCore::BlobRegistryImpl::getBlobDataFromURL const):
(WebCore::BlobRegistryImpl::registerBlobURLHandle):
(WebCore::BlobRegistryImpl::unregisterBlobURLHandle):
(WebCore::blobURLWithoutFragment): Deleted.

Source/WTF:

  • wtf/URL.cpp:

(WTF::URL::viewWithoutQueryOrFragmentIdentifier const):
(WTF::URL::viewWithoutFragmentIdentifier const):
(WTF::URL::stringWithoutFragmentIdentifier const):
(WTF::equalIgnoringFragmentIdentifier):
(WTF::URL::stringWithoutQueryOrFragmentIdentifier const): Deleted.

  • wtf/URL.h:
5:19 PM Changeset in webkit [291729] by Patrick Angle
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Elements tab: selection variable not displayed after losing focus
https://bugs.webkit.org/show_bug.cgi?id=238226

Reviewed by Devin Rousso.

When rebuilding the underlying DOMTreeElements, we should make sure the inspected node is marked as such,
otherwise we won't update this until a different element becomes the inspected node.

  • UserInterface/Views/DOMTreeOutline.js:

(WI.DOMTreeOutline.prototype.update):

5:11 PM Changeset in webkit [291728] by Megan Gardner
  • 2 edits in trunk/Source/WebKit

Expand autocorrect context for more accurate results.
https://bugs.webkit.org/show_bug.cgi?id=237990
rdar://87353381

Expand autocorrect context to at least 10 words instead of 3, and with a min/max length of 40/100 instead of 12/30
and start context at the beginning of sentences to help with having more accurate autocorrect suggestions.

Reviewed by Tim Horton.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::autocorrectionContext):

5:00 PM Changeset in webkit [291727] by jonlee@apple.com
  • 2 edits in trunk/LayoutTests

Expose the AX tree of PDFs loaded via iframes on the Mac
https://bugs.webkit.org/show_bug.cgi?id=238168

Patch by Tyler Wilcock <Tyler Wilcock> on 2022-03-22
Reviewed by Chris Fleizach.

  • accessibility/mac/iframe-pdf-expected.txt: Added.
  • accessibility/mac/iframe-pdf.html: Added.
  • platform/mac-wk1/TestExpectations:

Skip new test as it always times out in WK1 (similar to
accessibility/mac/basic-embed-pdf-accessibility.html)

4:53 PM Changeset in webkit [291726] by sihui_liu@apple.com
  • 6 edits in trunk

Check if origin can access storage in Storage API
https://bugs.webkit.org/show_bug.cgi?id=238158

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/file-system-access/opaque-origin.https.window-expected.txt:
  • web-platform-tests/storage/opaque-origin.https.window-expected.txt:

Source/WebCore:

According to spec https://storage.spec.whatwg.org/#obtain-a-storage-key, origin should not access Storage API if
it's opaque. Also, origin should not access storage if it's blocked by storage policy, so we use
SecurityOrigin::canAccessStorage to perform the origin check, like what we do for the other storage APIs.

Updated expectation for imported tests.

  • Modules/storage/StorageManager.cpp:

(WebCore::connectionInfo):

  • page/SecurityOrigin.h:

(WebCore::SecurityOrigin::canAccessStorageManager const):

4:46 PM Changeset in webkit [291725] by Alan Bujtas
  • 3 edits
    1 move in trunk/Source/WebCore

[IFC][Integration] Rename InlineIteratorLine.cpp to InlineIteratorLineBox.cpp
https://bugs.webkit.org/show_bug.cgi?id=238219

Unreviewed.

r291548 should have included this rename.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/integration/InlineIteratorLineBox.cpp: Renamed from Source/WebCore/layout/integration/InlineIteratorLine.cpp.

(WebCore::InlineIterator::LineBoxIterator::LineBoxIterator):
(WebCore::InlineIterator::LineBoxIterator::atEnd const):
(WebCore::InlineIterator::LineBoxIterator::traverseNext):
(WebCore::InlineIterator::LineBoxIterator::traversePrevious):
(WebCore::InlineIterator::LineBoxIterator::operator== const):
(WebCore::InlineIterator::firstLineBoxFor):
(WebCore::InlineIterator::lastLineBoxFor):
(WebCore::InlineIterator::LineBox::next const):
(WebCore::InlineIterator::LineBox::previous const):
(WebCore::InlineIterator::LineBox::firstLeafBox const):
(WebCore::InlineIterator::LineBox::lastLeafBox const):
(WebCore::InlineIterator::closestBoxForHorizontalPosition):

4:37 PM Changeset in webkit [291724] by Tyler Wilcock
  • 4 edits
    2 adds in trunk

Expose the AX tree of PDFs loaded via iframes on the Mac
https://bugs.webkit.org/show_bug.cgi?id=238168

Reviewed by Chris Fleizach.

Source/WebKit:

Given this markup:

<iframe src="/path/to/paystub.pdf">

An accessibility tree is built for paystub.pdf, but we don't expose it
to AX clients, making the PDF entirely inaccessible.

This happens because we were setting the AX parent to be the webpage
for full-frame PDF plugins (which an iframe with this markup is).
This behavior is correct only for main-frame (i.e. not iframe)
full-frame plugins, so this patch adds an extra condition to that logic.

Test: accessibility/mac/iframe-pdf.html

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::PDFPlugin):

LayoutTests:

  • accessibility/mac/iframe-pdf-expected.txt: Added.
  • accessibility/mac/iframe-pdf.html: Added.
  • platform/mac-wk1/TestExpectations:

Skip new test as it always times out in WK1 (similar to
accessibility/mac/basic-embed-pdf-accessibility.html)

4:25 PM Changeset in webkit [291723] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[macOS WK2] LayoutTest webaudio/silent-audio-interrupted-in-background.html is a flaky timeout on older OSes (El Capitan / Sierra) (172201)
https://bugs.webkit.org/show_bug.cgi?id=172201

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:24 PM Changeset in webkit [291722] by Russell Epstein
  • 1 copy in tags/Safari-614.1.6.2

Tag Safari-614.1.6.2.

4:22 PM Changeset in webkit [291721] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[ EWS iOS ] fast/text/emoji-num-glyphs.html is a flaky text failure
https://bugs.webkit.org/show_bug.cgi?id=238233

Unreviewed test gardening.

  • platform/ios/TestExpectations:
4:19 PM Changeset in webkit [291720] by Russell Epstein
  • 6 edits in branches/safari-614.1.6-branch/Source/WebKit

Cherry-pick r291691. rdar://problem/90654598

Prefer WK_EXTERN to WK_EXPORT in Cocoa API headers
https://bugs.webkit.org/show_bug.cgi?id=238129

Reviewed by Wenson Hsieh.

  • UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h:
  • UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h:
  • UIProcess/API/Cocoa/_WKElementAction.h:
  • UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h: WK_EXPORT comes from WKDeclarationSpecifiers.h, which is a legacy C SPI header. WK_EXTERN comes from WKFoundation.h, part of the modern public API. We should prefer the modern version in Cocoa-only headers (even in private headers).

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

4:13 PM Changeset in webkit [291719] by Kocsen Chung
  • 1 copy in tags/Safari-611.3.10.1.16

Tag Safari-611.3.10.1.16.

4:09 PM Changeset in webkit [291718] by Kocsen Chung
  • 1 copy in tags/Safari-609.4.1.1.1

Tag Safari-609.4.1.1.1.

4:01 PM Changeset in webkit [291717] by Russell Epstein
  • 9 edits in branches/safari-614.1.6-branch/Source

Versioning.

WebKit-7614.1.6.2

4:00 PM Changeset in webkit [291716] by Jonathan Bedard
  • 5 edits in trunk/Tools

[git-webkit] Do not re-prompt configuration options during setup
https://bugs.webkit.org/show_bug.cgi?id=237571
<rdar://problem/89940351>

Reviewed by Dewei Zhu.

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

(Setup.git): Skip already configured options by default.
(Setup.parser): Add option to re-prompt for previously configured options.

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

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

3:34 PM Changeset in webkit [291715] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[ EWS iOS ] imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-050.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=238229

Unreviewed test gardening.

  • platform/ios/TestExpectations:
3:34 PM Changeset in webkit [291714] by Russell Epstein
  • 2 edits in branches/safari-614.1.7-branch/Source/ThirdParty/libwebrtc

Cherry-pick r291713. rdar://problem/90604028

REGRESSION(r291455): libwebrtc has the wrong install name when using override frameworks directory
https://bugs.webkit.org/show_bug.cgi?id=238212
rdar://90604028

Reviewed by Alexey Proskuryakov.

r291455 introduced a default definition of DYLIB_INSTALL_NAME_BASE for non-macOS platforms that
stays defined as /S/L/PF/WebCore.framework/Frameworks. This explicit definition (rather than
falling back to the build system default of $INSTALL_PATH) is fine for those platforms but
clashes with the macOS definition of this variable when building with an override frameworks path:

DYLIB_INSTALL_NAME_BASE_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(DYLIB_INSTALL_NAME_BASE);

Because of the new default definition of DYLIB_INSTALL_NAME_BASE, the semantics of this line
were changed from "use the install path as the install name when there's an override frameworks
directory" to "use /S/L/PF/WebCore.frameworks/Frameworks as the install name when there's an
override frameworks directory", which completely bypasses the point of the *override* directory.

Resolve this by redefining DYLIB_INSTALL_NAME_BASE_USE_OVERRIDE_FRAMEWORKS_DIR_YES to explicitly
use the INSTALL_PATH as the base of the install name, which was the original intent before
r291455 changed the behavior of falling back to DYLIB_INSTALL_NAME_BASE.

  • Configurations/libwebrtc.xcconfig:

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

3:28 PM Changeset in webkit [291713] by david_quesada@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

REGRESSION(r291455): libwebrtc has the wrong install name when using override frameworks directory
https://bugs.webkit.org/show_bug.cgi?id=238212
rdar://90604028

Reviewed by Alexey Proskuryakov.

r291455 introduced a default definition of DYLIB_INSTALL_NAME_BASE for non-macOS platforms that
stays defined as /S/L/PF/WebCore.framework/Frameworks. This explicit definition (rather than
falling back to the build system default of $INSTALL_PATH) is fine for those platforms but
clashes with the macOS definition of this variable when building with an override frameworks path:

DYLIB_INSTALL_NAME_BASE_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(DYLIB_INSTALL_NAME_BASE);

Because of the new default definition of DYLIB_INSTALL_NAME_BASE, the semantics of this line
were changed from "use the install path as the install name when there's an override frameworks
directory" to "use /S/L/PF/WebCore.frameworks/Frameworks as the install name when there's an
override frameworks directory", which completely bypasses the point of the *override* directory.

Resolve this by redefining DYLIB_INSTALL_NAME_BASE_USE_OVERRIDE_FRAMEWORKS_DIR_YES to explicitly
use the INSTALL_PATH as the base of the install name, which was the original intent before
r291455 changed the behavior of falling back to DYLIB_INSTALL_NAME_BASE.

  • Configurations/libwebrtc.xcconfig:
3:22 PM Changeset in webkit [291712] by Patrick Angle
  • 5 edits in trunk

Source/WebInspectorUI:
Web Inspector: console.log format strings containing invalid specifiers results in [Object object] replacing the specifier instead of ignoring the invalid specifier
https://bugs.webkit.org/show_bug.cgi?id=235061

Reviewed by Devin Rousso.

Logged console messages previously allows an specifier, even invalid ones, to be replaced with values. We should
instead ignore the invalid specifier to match Firefox's behavior. (Chrome's behavior currently is to remove the
invalid specifier from the result without replacing it with the first next available substitution value.)

Other call sites using String.format are handling localized strings or other backend-provided strings that
should always be well-formatted, so falling back to handling a format specifier as a string is not a particularly
useful behavior.

  • UserInterface/Base/Utilities.js:

(value):

LayoutTests:
Web Inspector: console.log print strings contains '%_' result is Object
https://bugs.webkit.org/show_bug.cgi?id=235061

Reviewed by Devin Rousso.

  • inspector/unit-tests/string-utilities-expected.txt:
  • inspector/unit-tests/string-utilities.html:
3:18 PM Changeset in webkit [291711] by achristensen@apple.com
  • 24 edits in branches/safari-613-branch/Source

Fix build on safari-613-branch

Source/WebCore:

  • rendering/LegacyInlineFlowBox.cpp:

(WebCore::LegacyInlineFlowBox::addToLine):

  • rendering/LegacyLineLayout.cpp:

(WebCore::repaintSelfPaintInlineBoxes):

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:
  • pal/spi/cocoa/AVFoundationSPI.h:

Source/WebKit:

Most of this is just merging most of https://github.com/WebKit/WebKit/commit/ecdbbe0b667c3231bbbf93ab3a5d4df29a6df985
for rdar://problem/89972004

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::createSocketChannel):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::transferToNewWebProcess):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::createWebSocketTask):

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

(WebKit::NetworkSocketChannel::create):
(WebKit::NetworkSocketChannel::NetworkSocketChannel):

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

(WebKit::NetworkSessionCocoa::createWebSocketTask):

  • NetworkProcess/soup/NetworkSessionSoup.cpp:

(WebKit::NetworkSessionSoup::createWebSocketTask):

  • NetworkProcess/soup/NetworkSessionSoup.h:
  • Shared/Cocoa/AuxiliaryProcessCocoa.mm:

(WebKit::handleAXPreferenceChange):

  • WebProcess/Network/WebSocketChannel.cpp:

(WebKit::WebSocketChannel::connect):

Source/WebKitLegacy/mac:

  • Plugins/WebBasePluginPackage.mm:

(-[WebBasePluginPackage isNativeLibraryData:]):

3:18 PM Changeset in webkit [291710] by Matteo Flores
  • 2 edits in trunk/LayoutTests

REGRESSION(r291523-r291501): [ iOS ] fast/dom/intersection-observer-document-leak.html is a flaky text failure
https://bugs.webkit.org/show_bug.cgi?id=238227

Unreviewed test gardening.

  • platform/ios/TestExpectations:
3:04 PM Changeset in webkit [291709] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[iOS] editing/spelling/editing-word-with-marker-1.html causes the subsequent test to time out
https://bugs.webkit.org/show_bug.cgi?id=237812

Unreviewed test gardening.

  • platform/ios/TestExpectations:
2:52 PM Changeset in webkit [291708] by Russell Epstein
  • 1 copy in tags/Safari-614.1.5.16

Tag Safari-614.1.5.16.

2:51 PM Changeset in webkit [291707] by Russell Epstein
  • 6 edits in branches/safari-614.1.5-branch/Source

Revert r291458. rdar://problem/90655518

2:50 PM Changeset in webkit [291706] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[ iOS ] fast/text/text-shadow-ink-overflow-missing.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=238211

Unreviewed test gardening.

  • platform/ios/TestExpectations:
2:47 PM Changeset in webkit [291705] by Matteo Flores
  • 2 edits in trunk/LayoutTests

Unreviewed, reverting r291679.

Expectation should be ImageOnlyFailure

Reverted changeset:

"[ iOS EWS ] fast/text/text-shadow-ink-overflow-missing.html
is a flaky image failure"
https://bugs.webkit.org/show_bug.cgi?id=238211
https://commits.webkit.org/r291679

2:27 PM Changeset in webkit [291704] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ Debug wk2 ] ASSERTION FAILED: willBeComposited == needsToBeComposited(layer, queryData) (223750)
https://bugs.webkit.org/show_bug.cgi?id=223750

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations: Removing no longer needed test expectation.
2:16 PM Changeset in webkit [291703] by Robert Jenner
  • 2 edits
    5 adds in trunk/LayoutTests

[ BigSur+ ] imported/w3c/web-platform-t ests/media-source/mediasour ce-addsourcebuffer.html (layout-test) is consistently failing (221230)
https://bugs.webkit.org/show_bug.cgi?id=221230

Unreviewed test gardening. Rebaseline for test.

  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt: Added.
  • platform/mac-wk2/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt: Added.
  • platform/mac/TestExpectations: Removing old expectations.
2:15 PM Changeset in webkit [291702] by Cameron McCormack
  • 3 edits in trunk/LayoutTests

Disable remaining HEIC tests
https://bugs.webkit.org/show_bug.cgi?id=238191
<rdar://88980849>

Reviewed by Simon Fraser.

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
2:11 PM Changeset in webkit [291701] by mmaxfield@apple.com
  • 7 edits in trunk/Source/WebGPU

[WebGPU] Allocating a buffer of size 0 crashes
https://bugs.webkit.org/show_bug.cgi?id=238165

Reviewed by Kimmo Kinnunen.

Metal requires buffer sizes to be > 0, but WebGPU allows for = 0.
This patch simply clamps all buffer sizes to 1. In the future, if this
causes performance problems, we could consider some more invasive change
where the MTLBuffer member of a WebGPU::Buffer is nil. But, for now,
just clamping the size to 1 is enough to get the test to stop crashing.

Test: api/validation/buffer/mapping.spec.ts. (We can't actually enable the test
until WebCore links with WebGPU.)

  • WebGPU/BindGroup.mm:

(WebGPU::Device::createBindGroup):

  • WebGPU/Buffer.mm:

(WebGPU::Device::safeCreateBuffer const):
(WebGPU::Device::createBuffer):

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

(wgpuGetProcAddress):

  • WebGPU/ShaderModule.mm:

(WebGPU::ShaderModule::createLibrary):

2:09 PM Changeset in webkit [291700] by Russell Epstein
  • 9 edits in branches/safari-614.1.5-branch/Source

Versioning.

WebKit-7614.1.5.16

2:09 PM Changeset in webkit [291699] by Fujii Hironori
  • 6 edits in trunk/Source

[WinCairo] RemoteGraphicsContextGL.h(78): error C2027: use of undefined type 'WebCore::GraphicsContextGL'
https://bugs.webkit.org/show_bug.cgi?id=238223

Unreviewed build fix.
r291610 renamed GraphicsContextGLTextureMapper to GraphicsContextGLTextureMapperANGLE.

Source/WebCore:

  • platform/graphics/texmap/TextureMapperGCGLPlatformLayer.cpp:

(WebCore::TextureMapperGCGLPlatformLayer::TextureMapperGCGLPlatformLayer):

  • platform/graphics/texmap/TextureMapperGCGLPlatformLayer.h:

Source/WebKit:

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGLWin.cpp:

(WebKit::RemoteGraphicsContextGLWin::platformWorkQueueInitialize):

1:45 PM Changeset in webkit [291698] by Matteo Flores
  • 2 edits in trunk/LayoutTests

REGRESSION(r289402-r289376): [ Debug iOS ] webgl/1.0.3/conformance/uniforms/uniform-samplers-test.html is a constant timeout
https://bugs.webkit.org/show_bug.cgi?id=237694

Unreviewed test gardening.

  • platform/ios/TestExpectations:
1:38 PM Changeset in webkit [291697] by Robert Jenner
  • 1 edit
    4 adds in trunk/LayoutTests

imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html fails (221819)
https://bugs.webkit.org/show_bug.cgi?id=221819

Unreviewed test gardening. Re-baseline for wk1.

  • platform/mac-wk1/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest-expected.txt: Added.
1:37 PM Changeset in webkit [291696] by Said Abou-Hallawa
  • 19 edits in trunk/Source

[GPU Process] Make GraphicsContextState a class
https://bugs.webkit.org/show_bug.cgi?id=238192

Reviewed by Simon Fraser.

Source/WebCore:

This will make the members be private so we have to provide getters for
all of them. This change will prevent changing the members without going
through the setters.

  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::GraphicsContext):

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::fillBrush const):
(WebCore::GraphicsContext::fillColor const):
(WebCore::GraphicsContext::fillGradient const):
(WebCore::GraphicsContext::fillGradientSpaceTransform const):
(WebCore::GraphicsContext::fillPattern const):
(WebCore::GraphicsContext::fillRule const):
(WebCore::GraphicsContext::strokeBrush const):
(WebCore::GraphicsContext::strokeColor const):
(WebCore::GraphicsContext::strokeGradient const):
(WebCore::GraphicsContext::strokeGradientSpaceTransform const):
(WebCore::GraphicsContext::strokePattern const):
(WebCore::GraphicsContext::strokeThickness const):
(WebCore::GraphicsContext::strokeStyle const):
(WebCore::GraphicsContext::dropShadow const):
(WebCore::GraphicsContext::compositeMode const):
(WebCore::GraphicsContext::alpha const):
(WebCore::GraphicsContext::textDrawingMode const):
(WebCore::GraphicsContext::imageInterpolationQuality const):
(WebCore::GraphicsContext::shouldAntialias const):
(WebCore::GraphicsContext::shouldSmoothFonts const):
(WebCore::GraphicsContext::shouldSubpixelQuantizeFonts const):
(WebCore::GraphicsContext::shadowsIgnoreTransforms const):
(WebCore::GraphicsContext::drawLuminanceMask const):
(WebCore::GraphicsContext::useDarkAppearance const):

  • platform/graphics/GraphicsContextState.cpp:

(WebCore::GraphicsContextState::GraphicsContextState):
(WebCore::GraphicsContextState::containsOnlyInlineChanges const):
(WebCore::GraphicsContextState::mergeChanges):
(WebCore::GraphicsContextState::didBeginTransparencyLayer):
(WebCore::GraphicsContextState::didEndTransparencyLayer):
(WebCore::GraphicsContextState::dump const):

  • platform/graphics/GraphicsContextState.h:

(WebCore::GraphicsContextState::GraphicsContextState):
(WebCore::GraphicsContextState::changes const):
(WebCore::GraphicsContextState::didApplyChanges):
(WebCore::GraphicsContextState::fillBrush const):
(WebCore::GraphicsContextState::setFillBrush):
(WebCore::GraphicsContextState::setFillColor):
(WebCore::GraphicsContextState::setFillGradient):
(WebCore::GraphicsContextState::setFillPattern):
(WebCore::GraphicsContextState::fillRule const):
(WebCore::GraphicsContextState::setFillRule):
(WebCore::GraphicsContextState::strokeBrush const):
(WebCore::GraphicsContextState::setStrokeBrush):
(WebCore::GraphicsContextState::setStrokeColor):
(WebCore::GraphicsContextState::setStrokeGradient):
(WebCore::GraphicsContextState::setStrokePattern):
(WebCore::GraphicsContextState::strokeThickness const):
(WebCore::GraphicsContextState::setStrokeThickness):
(WebCore::GraphicsContextState::strokeStyle const):
(WebCore::GraphicsContextState::setStrokeStyle):
(WebCore::GraphicsContextState::compositeMode const):
(WebCore::GraphicsContextState::setCompositeMode):
(WebCore::GraphicsContextState::dropShadow const):
(WebCore::GraphicsContextState::setDropShadow):
(WebCore::GraphicsContextState::alpha const):
(WebCore::GraphicsContextState::setAlpha):
(WebCore::GraphicsContextState::imageInterpolationQuality const):
(WebCore::GraphicsContextState::setImageInterpolationQuality):
(WebCore::GraphicsContextState::textDrawingMode const):
(WebCore::GraphicsContextState::setTextDrawingMode):
(WebCore::GraphicsContextState::shouldAntialias const):
(WebCore::GraphicsContextState::setShouldAntialias):
(WebCore::GraphicsContextState::shouldSmoothFonts const):
(WebCore::GraphicsContextState::setShouldSmoothFonts):
(WebCore::GraphicsContextState::shouldSubpixelQuantizeFonts const):
(WebCore::GraphicsContextState::setShouldSubpixelQuantizeFonts):
(WebCore::GraphicsContextState::shadowsIgnoreTransforms const):
(WebCore::GraphicsContextState::setShadowsIgnoreTransforms):
(WebCore::GraphicsContextState::drawLuminanceMask const):
(WebCore::GraphicsContextState::setDrawLuminanceMask):
(WebCore::GraphicsContextState::useDarkAppearance const):
(WebCore::GraphicsContextState::setUseDarkAppearance):
(WebCore::GraphicsContextState::setProperty):
(WebCore::GraphicsContextState::encode const):
(WebCore::GraphicsContextState::decode):

  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::FillSource::FillSource):
(WebCore::Cairo::StrokeSource::StrokeSource):
(WebCore::Cairo::ShadowState::ShadowState):

  • platform/graphics/cairo/FontCairo.cpp:

(WebCore::FontCascade::drawGlyphs):

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContextCairo::drawNativeImage):
(WebCore::GraphicsContextCairo::didUpdateState):
(WebCore::GraphicsContextCairo::drawGlyphs):

  • platform/graphics/cairo/ImageBufferCairoBackend.cpp:

(WebCore::ImageBufferCairoBackend::draw):

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::coreInterpolationQuality):
(WebCore::GraphicsContextCG::GraphicsContextCG):
(WebCore::GraphicsContextCG::didUpdateState):
(WebCore::GraphicsContextCG::strokeRect):
(WebCore::GraphicsContextCG::canUseShadowBlur const):

  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:

(WebCore::DrawGlyphsRecorder::populateInternalState):
(WebCore::DrawGlyphsRecorder::populateInternalContext):

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::shouldDumpForFlags):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

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

  • platform/graphics/displaylists/DisplayListReplayer.cpp:

(WebCore::DisplayList::applySetStateItem):

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:

(Nicosia::CairoOperationRecorder::didUpdateState):
(Nicosia::CairoOperationRecorder::fillRect):
(Nicosia::CairoOperationRecorder::fillRoundedRect):
(Nicosia::CairoOperationRecorder::drawGlyphs):
(Nicosia::CairoOperationRecorder::drawNativeImage):
(Nicosia::CairoOperationRecorder::drawRect):
(Nicosia::CairoOperationRecorder::drawLine):
(Nicosia::CairoOperationRecorder::drawLinesForText):
(Nicosia::CairoOperationRecorder::drawEllipse):

Source/WebKit:

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::setState):

  • Shared/cairo/ShareableBitmapCairo.cpp:

(WebKit::ShareableBitmap::paint):

  • WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:

(WebKit::convertCairoSurfaceToShareableBitmap):

1:33 PM Changeset in webkit [291695] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[ iOS GPUP arm64 ] 5 webaudio/* are constant text failures since being unskipped.
https://bugs.webkit.org/show_bug.cgi?id=238220

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
1:24 PM Changeset in webkit [291694] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebCore

REGRESSION(r288307): instanceof value wrong in MutationObserver callback for Safari extensions
https://bugs.webkit.org/show_bug.cgi?id=237912
<rdar://90333276>

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

ScriptExecutionContext::globalObject() returns stray global object if called on an object
that was created inside a Safari extension. I am unsure whether this is a bug, and if so,
how to promptly fix it, so this patch changes the way callback functions / interfaces
resolve lexical global object, which is used to create DOM wrappers.

Now they rely only on their JSCallbackData, which was proven to return correct
global object for Safari extensions.

For [IsWeakCallback] interfaces, liveness of the callback object is guaranteed
by the canInvokeCallback() check above.

No new tests: Safari extensions are covered in internal repo.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateCallbackImplementationContent):

  • bindings/scripts/test/JS/*: Updated.
1:17 PM Changeset in webkit [291693] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS Debug ] inspector/console/queryInstances.html is a flaky failure (215814)
https://bugs.webkit.org/show_bug.cgi?id=215814

Unreviewed test gardening.

  • platform/mac/TestExpectations: Removing no longer needed test expectation.
1:11 PM Changeset in webkit [291692] by Robert Jenner
  • 2 edits in trunk/LayoutTests

inspector/canvas/setRecordingAutoCaptureFrameCount.html is flaky failing (228011)
https://bugs.webkit.org/show_bug.cgi?id=228011

Unreviewed test gardening.

  • platform/mac/TestExpectations: Removing no longer needed test expectation.
1:03 PM Changeset in webkit [291691] by timothy_horton@apple.com
  • 6 edits in trunk/Source/WebKit

Prefer WK_EXTERN to WK_EXPORT in Cocoa API headers
https://bugs.webkit.org/show_bug.cgi?id=238129

Reviewed by Wenson Hsieh.

  • UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h:
  • UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h:
  • UIProcess/API/Cocoa/_WKElementAction.h:
  • UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:

WK_EXPORT comes from WKDeclarationSpecifiers.h, which is a legacy C SPI header.
WK_EXTERN comes from WKFoundation.h, part of the modern public API.
We should prefer the modern version in Cocoa-only headers (even in private headers).

12:54 PM Changeset in webkit [291690] by commit-queue@webkit.org
  • 9 edits
    2 deletes in trunk

Unreviewed, reverting r291546.
https://bugs.webkit.org/show_bug.cgi?id=238218

7% regression in Speedometer2/jQuery-TodoMVC

Reverted changeset:

"Fix CSS cascade regarding logical properties"
https://bugs.webkit.org/show_bug.cgi?id=236199
https://commits.webkit.org/r291546

12:51 PM Changeset in webkit [291689] by Chris Dumez
  • 6 edits
    2 adds in trunk

REGRESSION (iOS 15.1 / r280824) QuickLook - model not loading when passing extra parameters
https://bugs.webkit.org/show_bug.cgi?id=236069
<rdar://problem/88461772>

Reviewed by Darin Adler.

Source/WebCore:

To extend the lifetime of Blob objects while loading/downloading is pending, we rely to
BlobURLHandle objects, which tell the NetworkProcess that we still need this blob data,
even if the corresponding Blob object gets GC'd by JS. The issue here is that the load
was not using the vanilla blob URL but was intead appending a fragment to the URL. As
a result, BlobRegistryImpl::registerBlobURLHandle() would fail to look up the
corresponding blob data and would fail to extend its lifetime.

To address the issue, BlobRegistryImpl::registerBlobURLHandle() / unregisterBlobURLHandle()
now strip fragments from the blob URL, similarly to what was already done inside
BlobRegistryImpl::getBlobDataFromURL().

Test: fast/files/blob-with-fragment-as-frame-url.html

  • platform/network/BlobRegistryImpl.cpp:

(WebCore::blobURLWithoutFragment):
(WebCore::BlobRegistryImpl::registerBlobURLHandle):
(WebCore::BlobRegistryImpl::unregisterBlobURLHandle):

Source/WebKit:

Fix theoretical blob data leak. A WebContent process could create several BlobURLHandles for
the same blob URL. This would result in several calls to NetworkConnectionToWebProcess::registerBlobURLHandle()
for the same URL and several calls to to BlobRegistryImpl::registerBlobURLHandle() for the
same URL as well. BlobRegistryImpl is using a HashCountedSet for m_blobReferences in order
to deal with this fact. However, NetworkConnectionToWebProcess was using a simple HashSet
for m_blobURLHandles. As a result, if the WebContent process would exit and didClose()
would get called, the NetworkConnectionToWebProcess may call BlobRegistryImpl::unregisterBlobURLHandle()
only once even though the WebContent process had several handles for this URL, which would
not fully remove the URL from BlobRegistryImpl's HashCountedSet. To address the issue,
NetworkConnectionToWebProcess::m_blobURLHandles is now a HashCountedSet too and we call
BlobRegistryImpl::unregisterBlobURLHandle() as many times as needed in didClose().

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::didClose):

  • NetworkProcess/NetworkConnectionToWebProcess.h:

LayoutTests:

Add layout test coverage.

  • fast/files/blob-with-fragment-as-frame-url-expected.txt: Added.
  • fast/files/blob-with-fragment-as-frame-url.html: Added.
12:45 PM Changeset in webkit [291688] by mmaxfield@apple.com
  • 5 edits in trunk/Source/WebGPU

[WebGPU] Implement Queue::writeBuffer()
https://bugs.webkit.org/show_bug.cgi?id=238194

Reviewed by Kimmo Kinnunen.

The semantics of writeBuffer() are that the data should be written, but specifically
at the current point in the queue. So, we can't just naively memcpy(), for 2 reasons:

  1. If the buffer is in-use, memcpy() will clobber its current contents, leading to

corruption. Instead, it's supposed to populate the buffer at the current point
in the queue, as-if it was a queue item.

  1. If the buffer is a private buffer, we can't memcpy() to it anyway

So, the implementation of this function first tries to see if we can memcpy(): if the
buffer is shared or managed, and if the queue is idle. If it can, then it does so, but
if it can't, it creates a temporary buffer and enqueues a queue command to copy the
contents of the temporary buffer into the destination buffer.

That copy command is part of a lazily created command buffer.

Test: api/validation/queue/writeBuffer.spec.ts

  • WebGPU/Buffer.h:

(WebGPU::Buffer::state const):

  • WebGPU/Device.h:

(WebGPU::Device::device const):

  • WebGPU/Queue.h:

(WebGPU::Queue::isIdle const):

  • WebGPU/Queue.mm:

(WebGPU::Queue::~Queue):
(WebGPU::Queue::ensureBlitCommandEncoder):
(WebGPU::Queue::finalizeBlitCommandEncoder):
(WebGPU::Queue::onSubmittedWorkDone):
(WebGPU::Queue::commitMTLCommandBuffer):
(WebGPU::Queue::submit):
(WebGPU::validateWriteBufferInitial):
(WebGPU::Queue::validateWriteBuffer const):
(WebGPU::Queue::writeBuffer):

12:04 PM Changeset in webkit [291687] by mmaxfield@apple.com
  • 48 edits in trunk/Source/WebGPU

[WebGPU] Remove the double pointer indirection in front of all objects
https://bugs.webkit.org/show_bug.cgi?id=238001

Reviewed by Kimmo Kinnunen.

Instead of doing

class Buffer {

...

};
struct WGPUBufferImpl {

Ref<Buffer> buffer;

}

we can instead do

struct WGPUBufferImpl {
};
struct Buffer : public WGPUBufferImpl {

...

};

so we don't have to do pointer chasing to interact with objects.

  • WebGPU/APIConversions.h:

(WebGPU::fromAPI):
(WebGPU::releaseToAPI):

  • WebGPU/Adapter.h:
  • WebGPU/Adapter.mm:

(wgpuAdapterRelease):
(wgpuAdapterRequestDevice):
(wgpuAdapterRequestDeviceWithBlock):

  • WebGPU/BindGroup.h:
  • WebGPU/BindGroup.mm:

(wgpuBindGroupRelease):

  • WebGPU/BindGroupLayout.h:
  • WebGPU/BindGroupLayout.mm:

(wgpuBindGroupLayoutRelease):

  • WebGPU/Buffer.h:
  • WebGPU/Buffer.mm:

(wgpuBufferRelease):

  • WebGPU/CommandBuffer.h:
  • WebGPU/CommandBuffer.mm:

(wgpuCommandBufferRelease):

  • WebGPU/CommandEncoder.h:
  • WebGPU/CommandEncoder.mm:

(wgpuCommandEncoderRelease):
(wgpuCommandEncoderBeginComputePass):
(wgpuCommandEncoderBeginRenderPass):
(wgpuCommandEncoderFinish):

  • WebGPU/ComputePassEncoder.h:
  • WebGPU/ComputePassEncoder.mm:

(wgpuComputePassEncoderRelease):

  • WebGPU/ComputePipeline.h:
  • WebGPU/ComputePipeline.mm:

(WebGPU::ComputePipeline::getBindGroupLayout):
(wgpuComputePipelineRelease):
(wgpuComputePipelineGetBindGroupLayout):

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

(wgpuDeviceRelease):
(wgpuDeviceCreateBindGroup):
(wgpuDeviceCreateBindGroupLayout):
(wgpuDeviceCreateBuffer):
(wgpuDeviceCreateCommandEncoder):
(wgpuDeviceCreateComputePipeline):
(wgpuDeviceCreateComputePipelineAsync):
(wgpuDeviceCreateComputePipelineAsyncWithBlock):
(wgpuDeviceCreatePipelineLayout):
(wgpuDeviceCreateQuerySet):
(wgpuDeviceCreateRenderBundleEncoder):
(wgpuDeviceCreateRenderPipeline):
(wgpuDeviceCreateRenderPipelineAsync):
(wgpuDeviceCreateRenderPipelineAsyncWithBlock):
(wgpuDeviceCreateSampler):
(wgpuDeviceCreateShaderModule):
(wgpuDeviceCreateSwapChain):
(wgpuDeviceCreateTexture):
(wgpuDeviceGetQueue):

  • WebGPU/Instance.h:
  • WebGPU/Instance.mm:

(wgpuInstanceRelease):
(wgpuCreateInstance):
(wgpuInstanceCreateSurface):
(wgpuInstanceRequestAdapter):
(wgpuInstanceRequestAdapterWithBlock):

  • WebGPU/PipelineLayout.h:
  • WebGPU/PipelineLayout.mm:

(wgpuPipelineLayoutRelease):

  • WebGPU/QuerySet.h:
  • WebGPU/QuerySet.mm:

(wgpuQuerySetRelease):

  • WebGPU/Queue.h:
  • WebGPU/Queue.mm:

(wgpuQueueRelease):

  • WebGPU/RenderBundle.h:
  • WebGPU/RenderBundle.mm:

(wgpuRenderBundleRelease):

  • WebGPU/RenderBundleEncoder.h:
  • WebGPU/RenderBundleEncoder.mm:

(wgpuRenderBundleEncoderRelease):
(wgpuRenderBundleEncoderFinish):

  • WebGPU/RenderPassEncoder.h:
  • WebGPU/RenderPassEncoder.mm:

(wgpuRenderPassEncoderRelease):

  • WebGPU/RenderPipeline.h:
  • WebGPU/RenderPipeline.mm:

(WebGPU::RenderPipeline::getBindGroupLayout):
(wgpuRenderPipelineRelease):
(wgpuRenderPipelineGetBindGroupLayout):

  • WebGPU/Sampler.h:
  • WebGPU/Sampler.mm:

(wgpuSamplerRelease):

  • WebGPU/ShaderModule.h:
  • WebGPU/ShaderModule.mm:

(WebGPU::earlyCompileShaderModule):
(wgpuShaderModuleRelease):

  • WebGPU/Surface.h:
  • WebGPU/Surface.mm:

(wgpuSurfaceRelease):

  • WebGPU/SwapChain.h:
  • WebGPU/SwapChain.mm:

(WebGPU::SwapChain::getCurrentTextureView):
(wgpuSwapChainRelease):
(wgpuSwapChainGetCurrentTextureView):

  • WebGPU/Texture.h:
  • WebGPU/Texture.mm:

(wgpuTextureRelease):
(wgpuTextureCreateView):

  • WebGPU/TextureView.h:
  • WebGPU/TextureView.mm:

(wgpuTextureViewRelease):

11:58 AM Changeset in webkit [291686] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebGPU

[WebGPU] Implement GPUBufferDescriptor.mappedAtCreation
https://bugs.webkit.org/show_bug.cgi?id=238190

Reviewed by Kimmo Kinnunen.

On Macs, we can use MTLStorageModeManaged to implement mappedAtCreation.
On non-Macs, all resources are shared, so they're already mapped.
This patch turned out to be surprisingly easy to write, because Metal has
already implemented all the heavy lifting.

Test: api/validation/buffer/mapping.spec.ts

  • WebGPU/Buffer.mm:

(WebGPU::storageMode):
(WebGPU::Device::createBuffer):
(WebGPU::Buffer::getMappedRange):
(WebGPU::Buffer::unmap):

11:54 AM Changeset in webkit [291685] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebGPU

[WebGPU] Lifetime of CommandEncoder's internal MTLBlitCommandEncoder is not managed correctly
https://bugs.webkit.org/show_bug.cgi?id=238167

Reviewed by Kimmo Kinnunen.

We lazily create a MTLBlitCommandEncoder inside CommandEncoder to service a few various calls
which require one. Metal has some state tracking inside it, such that when objects are destroyed,
they have to be in the right state. This patch aligns WebGPU's state tracking and Metal's state
tracking.

Test: api/validation/encoding/programmable/pipeline_bind_group_compat.spec.ts

  • WebGPU/CommandEncoder.mm:

(WebGPU::CommandEncoder::~CommandEncoder):
(WebGPU::CommandEncoder::finalizeBlitCommandEncoder):

11:49 AM Changeset in webkit [291684] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

LibWebRTCCodecsProxy.mm and SharedVideoFrame.cpp do not need to be built as part of WebContent executable
https://bugs.webkit.org/show_bug.cgi?id=238002

Reviewed by Eric Carlson.

  • WebKit.xcodeproj/project.pbxproj:
11:37 AM Changeset in webkit [291683] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-614.1.7-branch

Cherry-pick r291629. rdar://problem/89495774

YouTube.com - Clicking anywhere on the progress bar pauses the video
https://bugs.webkit.org/show_bug.cgi?id=237750
<rdar://problem/90364846>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-unexpected-pause.html

When calling play() or pause() on a MediaPlayerPrivateMediaSourceAVFObjC, the object will
respond by calling m_player->playbackStateChanged(), which will in turn call
HTMLMediaElement::mediaPlayerPlaybackStateChanged() with the new state. However, HTMLMediaElement
expects this to be called only for unanticipated state changes, not expected state changes. And
when that method is called and the reported state does not match the element's own expected state,
the element calls its own play() or pause() function to update its own state to match the player's.
And because MediaPlayerPrivateMediaSourceAVFObjC calls this method on the next run loop, there is
an opportunity for those states to get out of sync, which happens when YouTube responds to a tap
in its timeline.

Remove the unnecessary "call on next run loop" behavior of …
play() and ::pause(). Also, remove the unnecessary notification that the play state has changed. In the future, this can be accomplished by adding a callback parameter to MediaPlayer::play() rather than relying on a state change notification.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playAtHostTime): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseAtHostTime):

LayoutTests:

  • media/media-source/media-source-unexpected-pause-expected.txt: Added.
  • media/media-source/media-source-unexpected-pause.html: Added.

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

11:37 AM Changeset in webkit [291682] by Russell Epstein
  • 6 edits in branches/safari-614.1.7-branch

Cherry-pick r291606. rdar://problem/89616625

Website policies are not respected when doing COOP based process swap
https://bugs.webkit.org/show_bug.cgi?id=238036
<rdar://89616625>

Reviewed by Chris Dumez.

Source/WebKit:

In case of normal process swap, we make use of website policies so everything is fine.
For COOP based process swap, this happens later on, at a point where we lost website policies.
To overcome this, we store the website policies used by a navigation inside the API::Navigation object.
It is used by continueNavigationInNewProcess to correctly initialize the new WebPage website policies.
We then set the website policies in the navigation object just before continuing the load in the same process,
as process swap may happen later when inspecting the response.
Minor refactoring in continueNavigationInNewProcess to get the policies directly from the given Navigation object.
Minor refactoring in receivedNavigationPolicyDecision to make the code doing process swap clearer.

Covered by API test.

  • UIProcess/API/APINavigation.h: (API::Navigation::setWebsitePoliciesForProcessSwap): (API::Navigation::takeWebsitePoliciesForProcessSwap):
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::receivedNavigationPolicyDecision): (WebKit::WebPageProxy::receivedPolicyDecision): (WebKit::WebPageProxy::continueNavigationInNewProcess): (WebKit::WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation):
  • UIProcess/WebPageProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

11:27 AM Changeset in webkit [291681] by Alan Coon
  • 3 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r291598. rdar://problem/89972004

Adjust when _setPrivacyProxyFailClosedForUnreachableNonMainHosts is called
https://bugs.webkit.org/show_bug.cgi?id=237735

Reviewed by Geoff Garen.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]): (WebKit::NetworkSessionCocoa::createWebSocketTask):

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

11:27 AM Changeset in webkit [291680] by Alan Coon
  • 19 edits in branches/safari-613-branch/Source

Cherry-pick r289134. rdar://problem/89972004

Remember whether cached main resources used private relay when considering whether to call _setPrivacyProxyFailClosed
https://bugs.webkit.org/show_bug.cgi?id=236125

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-04
Reviewed by Geoffrey Garen.

Source/WebCore:

Use an unused bit on disk to remember whether the response was originally received over private relay.
Also, instead of remembering on the main frame's DocumentLoader, remember on the WebProcess.
This makes it so if you enter the same URL twice, which loads from the MemoryCache from different WebCore::Pages, it still remembers.
If you load a different domain, it will load in a different WebProcess anyways, at which point you will not be using the same MemoryCache.

  • loader/DocumentLoader.h: (WebCore::DocumentLoader::setMainResourceWasPrivateRelayed): Deleted. (WebCore::DocumentLoader::mainResourceWasPrivateRelayed const): Deleted.

Source/WebKit:

  • NetworkProcess/NetworkLoadParameters.h:
  • NetworkProcess/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::encode const): (WebKit::NetworkResourceLoadParameters::decode):
  • NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::retrieveCacheEntry): (WebKit::NetworkResourceLoader::didReceiveResponse): (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry): (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::Cache::makeEntry): (WebKit::NetworkCache::Cache::store): (WebKit::NetworkCache::Cache::update):
  • NetworkProcess/cache/NetworkCache.h:
  • NetworkProcess/cache/NetworkCacheEntry.cpp: (WebKit::NetworkCache::Entry::Entry): (WebKit::NetworkCache::Entry::encodeAsStorageRecord const): (WebKit::NetworkCache::Entry::decodeStorageRecord):
  • NetworkProcess/cache/NetworkCacheEntry.h: (WebKit::NetworkCache::Entry::privateRelayed const):
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: (WebKit::NetworkCache::SpeculativeLoad::didReceiveResponse): (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
  • NetworkProcess/cache/PrefetchCache.cpp: (WebKit::PrefetchCache::Entry::Entry): (WebKit::PrefetchCache::store):
  • NetworkProcess/cache/PrefetchCache.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
  • WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::addParametersShared):
  • WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::didReceiveResponse):
  • WebProcess/WebProcess.h: (WebKit::WebProcess::setHadMainFrameMainResourcePrivateRelayed): (WebKit::WebProcess::hadMainFrameMainResourcePrivateRelayed const):

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

11:27 AM Changeset in webkit [291679] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[ iOS EWS ] fast/text/text-shadow-ink-overflow-missing.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=238211

Unreviewed test gardening.

  • platform/ios/TestExpectations:
11:27 AM Changeset in webkit [291678] by Alan Coon
  • 40 edits
    1 add in branches/safari-613-branch/Source

Cherry-pick r289018. rdar://problem/89972004

This reverts r289843.

11:17 AM Changeset in webkit [291677] by pvollan@apple.com
  • 2 edits in trunk

REGRESSION(r291587): Unintentionally removed contributors change
https://bugs.webkit.org/show_bug.cgi?id=238204

Unreviewed, partial revert of r291587.

  • metadata/contributors.json:
10:57 AM Changeset in webkit [291676] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r291573. rdar://problem/89964344

[watchOS] Add required syscall
https://bugs.webkit.org/show_bug.cgi?id=238117
<rdar://89964344>

Reviewed by Brent Fulgham.

Add rarely used syscall on watchOS.

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

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

10:57 AM Changeset in webkit [291675] by Alan Coon
  • 3 edits in branches/safari-613-branch

Cherry-pick r291527. rdar://problem/88857731

Dialog element only animates once
https://bugs.webkit.org/show_bug.cgi?id=236274
rdar://88857731

Reviewed by Dean Jackson, Tim Nguyen and Antti Koivisto.

LayoutTests/imported/w3c:

Import relevant WPT tests that had already been upstreamed in a previous, reverted
version of this patch.

  • web-platform-tests/css/css-animations/dialog-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-animation.html: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation.html: Added.
  • web-platform-tests/css/css-animations/support/testcommon.js: (addElement): (addDiv):

Source/WebCore:

Two issues related to CSS Animation surfaced in this bug which animates both <dialog>
and its ::backdrop as the dialog is open and eventually re-opened.

The first issue was that we didn't clear all CSS Animations state when a <dialog> was
closed and its style was set to display: none. We now call setAnimationsCreatedByMarkup
to correctly clear such state both when we identify a Styleable is newly getting
display: none. We do the same when cancelDeclarativeAnimations() is called, but also
call setCSSAnimationList() on the associated effect stack since that wasn't done either.
Now both functions do similar cleanup.

This allows us to remove removeCSSAnimationCreatedByMarkup() which did a fair bit of work
to clear CSS Animation state per-animation when we only ever used that function for
_all_ animations.

The second issue was that we never called cancelDeclarativeAnimations() for ::backdrop.
We now do that inside of Element::removeFromTopLayer() at a point where the code in
Styleable::fromRenderer() will still work as the element will still be contained in
Document::topLayerElements().

Finally, we need to be sure that calling Element::setAnimationsCreatedByMarkup() with an
empty list doesn't end up creating an ElementAnimationRareData object if there was no
pre-existing object and the list of animations are empty.

Tests: imported/w3c/web-platform-tests/css/css-animations/dialog-animation.html

imported/w3c/web-platform-tests/css/css-animations/dialog-backdrop-animation.html

  • dom/Element.cpp: (WebCore::Element::removeFromTopLayer): (WebCore::Element::setAnimationsCreatedByMarkup):
  • style/Styleable.cpp: (WebCore::Styleable::cancelDeclarativeAnimations const): (WebCore::Styleable::updateCSSAnimations const): (WebCore::removeCSSAnimationCreatedByMarkup): Deleted.

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

10:57 AM Changeset in webkit [291674] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r291522. rdar://problem/90124325

Fix the build (hopefully)

  • Shared/Cocoa/ArgumentCodersCocoa.mm:

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

10:57 AM Changeset in webkit [291673] by Alan Coon
  • 7 edits in branches/safari-613-branch

Cherry-pick r291518. rdar://problem/90124325

[Cocoa] Teach WebKit how to serialize CGColors
https://bugs.webkit.org/show_bug.cgi?id=238069
<rdar://problem/90124325>

Reviewed by Dean Jackson and Tim Horton.

Source/WebKit:

We have 2 ways of serializing Cocoa objects: NS type handling in ArgumentCodersCocoa.mm,
and CF type handling in ArgumentCodersCF.mm. CGColors are CF types, so this patch adds
direct support in ArgumentCodersCF to serialize them, by round-tripping them through
WebCore::Colors. However, NS containers (like font descriptor attribute dictionaries)
can contain CGColors, so this patch also teaches ArgumentCodersCocoa that there may be
CF types inside NS containers. If one is present, ArgumentCodersCocoa has to call into
ArgumentCodersCF to serialize it.

This patch doesn't add support for the reverse path, where an NS object is contained
within a CF container. I intentionally omitted implementing this because I wasn't sure
if it would be a layering violation; ArgumentCodersCococa.mm already #includes
ArgumentCodersCF.h, but ArgumentCodersCF.mm doesn't #include ArgumentCodersCocoa.h.
This path isn't actually necessary to solve my problem at hand, so someone else can
add support if necessary in the future. I also added a comment at the site where the
code would fail, describing what the problem is and a potential workaround.

This patch also adds support for our NSSecureCoding implementation for CGColors. This
is necessary because sometimes we want to serialize things like NSAttributedStrings,
which we don't have direct support for, so we use NSSecureCoding to serialize them
instead. NSAttributedStrings can contain fonts whose descriptor dictionaries contain
CGColors, so this path needs to work with CGColors too. Support is implemented using
NSKeyedArchiverDelegate and NSKeyedUnarchiverDelegate.

Test: IPCTestingAPI.CGColorInNSSecureCoding

The non-NSSecureCoding parts of this patch are tested by our regular LayoutTests
when DOM GPU Process rendering is enabled.

  • Shared/Cocoa/ArgumentCodersCocoa.mm: (-[WKSecureCodingArchivingDelegate archiver:willEncodeObject:]): (-[WKSecureCodingArchivingDelegate unarchiver:didDecodeObject:]): (-[WKSecureCodingCGColorWrapper wrappedColor]): (+[WKSecureCodingCGColorWrapper supportsSecureCoding]): (-[WKSecureCodingCGColorWrapper encodeWithCoder:]): (-[WKSecureCodingCGColorWrapper initWithCoder:]): (-[WKSecureCodingCGColorWrapper initWithCGColor:]): (IPC::typeFromObject): (IPC::decodeSecureCodingInternal): (IPC::encodeCFInternal): (IPC::decodeCFInternal): (IPC::encodeObject): (IPC::decodeObject):
  • Shared/cf/ArgumentCodersCF.cpp: (IPC::typeFromCFTypeRef): (IPC::ArgumentCoder<CFTypeRef>::encode): (IPC::ArgumentCoder<RetainPtr<CFTypeRef>>::decode): (IPC::ArgumentCoder<CGColorRef>::encode): (IPC::ArgumentCoder<RetainPtr<CGColorRef>>::decode):
  • Shared/cf/ArgumentCodersCF.h:

Tools:

  • Scripts/webkitpy/style/checkers/cpp.py:
  • TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:

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

10:57 AM Changeset in webkit [291672] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r291451. rdar://problem/89940620

[Apple Pay] REGRESSION(r283431): HAVE_PASSKIT_PAYMENT_METHOD_BILLING_ADDRESS was removed without also removing where it was used
https://bugs.webkit.org/show_bug.cgi?id=238056
<rdar://problem/89940620>

Reviewed by Tim Horton.

  • Modules/applepay/cocoa/PaymentMethodCocoa.mm: (WebCore::convert):

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

10:57 AM Changeset in webkit [291671] by Alan Coon
  • 4 edits
    2 adds in branches/safari-613-branch

Cherry-pick r291330. rdar://problem/90320701

REGRESSION (r282737): text-shadow is clipped
https://bugs.webkit.org/show_bug.cgi?id=237898
<rdar://problem/90320701>

Reviewed by Darin Adler.

Source/WebCore:

Inflate the ink overflow rect with the text shadow values (note that here, in the display builder we work with physical coordinates).

Test: fast/text/text-shadow-ink-overflow-missing.html

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp: (WebCore::Layout::InlineDisplayContentBuilder::appendTextDisplayBox):
  • rendering/style/RenderStyle.h: (WebCore::RenderStyle::getTextShadowHorizontalExtent const): (WebCore::RenderStyle::getTextShadowVerticalExtent const):

LayoutTests:

  • fast/text/text-shadow-ink-overflow-missing-expected.html: Added.
  • fast/text/text-shadow-ink-overflow-missing.html: Added.

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

10:57 AM Changeset in webkit [291670] by Alan Coon
  • 13 edits in branches/safari-613-branch/Source

Cherry-pick r291326. rdar://problem/85551863

Video poster disappears prematurely on play, leaving transparent video element.
https://bugs.webkit.org/show_bug.cgi?id=226960
<rdar://problem/79315114>

Reviewed by Jer Noble.

Source/WebCore:

If a media file has an enabled video track, don't advance readyState to
HAVE_ENOUGH_DATA until we have the first frame so we won't hide the poster image
until AVFoundation has something to render.

Tested manually.

  • html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::mediaPlayerFirstVideoFrameAvailable): Always log.
  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::updateStates): Move the test for the first video frame above the player item status check. If a file has a video track, don't advance to HAVE_ENOUGH_DATA unless we have the first video frame.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Clear m_cachedHasEnabledVideo. (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): Remove unneeded local variable. (WebCore::MediaPlayerPrivateAVFoundationObjC::platformSetVisible): Minro cleanup. (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Set hasVideo if AVPlayerItem.hasEnabledVideo is true, because it remains stable while AVAssetTracks sometimes disappear and reappear. (WebCore::MediaPlayerPrivateAVFoundationObjC::firstFrameAvailableDidChange): Add logging. (WebCore::MediaPlayerPrivateAVFoundationObjC::hasEnabledAudioDidChange): Ditto (WebCore::MediaPlayerPrivateAVFoundationObjC::hasEnabledVideoDidChange): New, cache AVPlayerItem.hasEnabledVideo. (WebCore::itemKVOProperties): (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Respond to @"hasEnabledVideo".
  • platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h:

Source/WebKit:

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote): Always log. (WebKit::MediaPlayerPrivateRemote::~MediaPlayerPrivateRemote): Ditto. (WebKit::MediaPlayerPrivateRemote::prepareForPlayback): Pass the player's content rect box to createVideoLayerRemote so it can be sized correctly even before it becomes visible. (WebKit::MediaPlayerPrivateRemote::firstVideoFrameAvailable): Always log. (WebKit::MediaPlayerPrivateRemote::renderingModeChanged): Ditto.
  • WebProcess/GPU/media/VideoLayerRemote.h:
  • WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm: (WebKit::createVideoLayerRemote): Set the new layer's frame so its children will be positioned correctly when the are made visible.

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

10:56 AM Changeset in webkit [291669] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r291324. rdar://problem/45607220

Crash under HTMLDocumentParser::didBeginYieldingParser()
https://bugs.webkit.org/show_bug.cgi?id=237930
<rdar://45607220>

Reviewed by Geoffrey Garen.

Add null pointer check.

No new tests, unable to reproduce.

  • html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::didBeginYieldingParser): (WebCore::HTMLDocumentParser::didEndYieldingParser):

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

10:56 AM Changeset in webkit [291668] by Alan Coon
  • 3 edits
    3 adds in branches/safari-613-branch

Cherry-pick r291303. rdar://problem/72432683

background-clip:text doesn't work with display:flex
https://bugs.webkit.org/show_bug.cgi?id=169125
<rdar://problem/72432683>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-backgrounds/background-clip/clip-text-flex-expected.html: Added.
  • web-platform-tests/css/css-backgrounds/background-clip/clip-text-flex-ref.html: Added.
  • web-platform-tests/css/css-backgrounds/background-clip/clip-text-flex.html: Added.

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/css-backgrounds/background-clip/clip-text-flex.html

  • rendering/RenderElement.cpp: (WebCore::RenderElement::paintAsInlineBlock):

Flexbox children paint as inline blocks. This path didn't support text clip paint phase.

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

10:56 AM Changeset in webkit [291667] by Alan Coon
  • 5 edits
    4 adds in branches/safari-613-branch

Cherry-pick r291282. rdar://problem/88857731

Dialog element only animates once
https://bugs.webkit.org/show_bug.cgi?id=236274

Reviewed by Dean Jackson, Tim Nguyen and Antti Koivisto.

LayoutTests/imported/w3c:

Import relevant WPT tests that had already been upstreamed in a previous, reverted
version of this patch.

  • web-platform-tests/css/css-animations/dialog-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-animation.html: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation.html: Added.
  • web-platform-tests/css/css-animations/support/testcommon.js: (addElement): (addDiv):

Source/WebCore:

Two issues related to CSS Animation surfaced in this bug which animates both <dialog>
and its ::backdrop as the dialog is open and eventually re-opened.

The first issue was that we didn't clear all CSS Animations state when a <dialog> was
closed and its style was set to display: none. We now call setAnimationsCreatedByMarkup
to correctly clear such state both when we identify a Styleable is newly getting
display: none. We do the same when cancelDeclarativeAnimations() is called, but also
call setCSSAnimationList() on the associated effect stack since that wasn't done either.
Now both functions do similar cleanup.

This allows us to remove removeCSSAnimationCreatedByMarkup() which did a fair bit of work
to clear CSS Animation state per-animation when we only ever used that function for
_all_ animations.

The second issue was that we never called cancelDeclarativeAnimations() for ::backdrop.
We now do that inside of Element::removeFromTopLayer() at a point where the code in
Styleable::fromRenderer() will still work as the element will still be contained in
Document::topLayerElements().

Tests: imported/w3c/web-platform-tests/css/css-animations/dialog-animation.html

imported/w3c/web-platform-tests/css/css-animations/dialog-backdrop-animation.html

  • dom/Element.cpp: (WebCore::Element::removeFromTopLayer):
  • style/Styleable.cpp: (WebCore::Styleable::cancelDeclarativeAnimations const): (WebCore::Styleable::updateCSSAnimations const): (WebCore::removeCSSAnimationCreatedByMarkup): Deleted.

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

10:56 AM Changeset in webkit [291666] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/ThirdParty/ANGLE

Cherry-pick r291218. rdar://problem/89382320

REGRESSION (iOS 15.4 beta) - WebGL yields incorrect results when using preserveDrawingBuffer on iOS 15.4 Beta
https://bugs.webkit.org/show_bug.cgi?id=237113

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-14
Reviewed by Myles C. Maxfield.

Cherry-pick without tests conflicting tests.

Cherry-pick ANGLE commit: 74f3270214394c896154e4bf9338e7d75002de61
From: Gregg Tavares <Gregg Tavares>
Date: Thu, 3 Mar 2022 13:13:34 -0800
Subject: [PATCH] Metal: Fix for mulitsampled buffers losing their contents

Fixes tst included as well as WebGL CTS

https://www.khronos.org/registry/webgl/sdk/tests/conformance2/renderbuffers/multisample-draws-between-blits.html

Both fail on M1 without this fix.

Also fixes WebKit bug https://bugs.webkit.org/show_bug.cgi?id=237113

Bug: angleproject:7073

  • src/libANGLE/renderer/metal/FrameBufferMtl.mm: (rx::FramebufferMtl::setLoadStoreActionOnRenderPassFirstStart):

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

10:56 AM Changeset in webkit [291665] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/bmalloc

Cherry-pick r291199. rdar://problem/89984164

Unreviewed, ASan specific build fix
https://bugs.webkit.org/show_bug.cgi?id=237572

  • libpas/src/libpas/pas_utils.h: (pas_zero_memory):

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

10:56 AM Changeset in webkit [291664] by Alan Coon
  • 10 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r291182. rdar://problem/88226412

Delay responsiveness checks for the Network Process until it has finished initialization
https://bugs.webkit.org/show_bug.cgi?id=237782
<rdar://88226412>

Reviewed by Geoffrey Garen.

Delay responsiveness checks for the Network Process until it has finished initialization.
Network process initialization can be slow but we have evidence that it is not truly
hung since we see network process terminations right as the network process is initiating
the WebProcess connection later on.

  • NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess):
  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • UIProcess/AuxiliaryProcessProxy.cpp: (WebKit::AuxiliaryProcessProxy::didFinishLaunching): (WebKit::AuxiliaryProcessProxy::beginResponsivenessChecks): (WebKit::AuxiliaryProcessProxy::startResponsivenessTimer):
  • UIProcess/AuxiliaryProcessProxy.h:
  • UIProcess/GPU/GPUProcessProxy.cpp: (WebKit::GPUProcessProxy::didFinishLaunching):
  • UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):
  • UIProcess/WebAuthentication/WebAuthnProcessProxy.cpp: (WebKit::WebAuthnProcessProxy::didFinishLaunching):
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didFinishLaunching):

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

10:56 AM Changeset in webkit [291663] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r291175. rdar://problem/88549631

Fix WebContent jetsam that occurs when selecting text in a large e-mail
https://bugs.webkit.org/show_bug.cgi?id=237698

Reviewed by Simon Fraser.

When selecting text in a large e-mail in MobileMail, we often jetsam. This is due to this
chain of events:

  1. If the selection extends enough to start causing the content to pan (which is easy to do when zoomed in on the mail content), then AutoscrollController ends up changing the scroll position of the FrameView to perform the pan.
  2. FrameView::requestScrollPositionUpdate tries to prepopulate tiles around the endpoint of the pan by calling TileController::prepopulateRect with visibleContentRect's size.

The problem is that MobileMail resizes their web view (and therefore FrameView) to match
the size of the content. This causes FrameView's visibleContentRect to be very large (>100k
pts high for some emails). As a result, we end up prepopulating every single tile in the
email, causing a huge spike in IOSurface memory usage that leads to a jetsam.

To fix this, we make FrameView::requestScrollPositionUpdate act more like
RenderLayerCompositor::visibleRectForLayerFlushing. In particular, on iOS, we now use
exposedContentRect instead of visibleContentRect. Since exposedContentRect is derived from
contentOffset/contentSize of the scroll view in the UIProcess, it's more correct and is much
smaller than visibleContentRect in this case.

  • page/FrameView.cpp: (WebCore::FrameView::requestScrollPositionUpdate):

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

10:56 AM Changeset in webkit [291662] by Alan Coon
  • 6 edits
    3 adds in branches/safari-613-branch

Cherry-pick r291141. rdar://problem/90035071

Main document is leaking on haaretz.co.il due to lazy image loading
https://bugs.webkit.org/show_bug.cgi?id=237660
<rdar://problem/90035071>

Reviewed by Geoffrey Garen.

Source/WebCore:

When an HTML image uses loading=lazy, ImageLoader::updateFromElement() may get
called twice. If the image is outside the viewport, the first time ImageLoader::updateFromElement()
is called, we'll request a CachedImage but we'll set m_lazyImageLoadState to LazyImageLoadState::Deferred
and not ask the CachedImage to load. Then, later on, if the HTML image approaches the viewport,
ImageLoader::loadDeferredImage() will get called. It will set m_lazyImageLoadState to LazyImageLoadState::LoadImmediately
and call updateFromElement() again. This time however, updateFromElement() will actually ask the CachedImage
to load.

The issue was that the first time ImageLoader::updateFromElement(), we would set m_lazyImageLoadState to Deferred
and not ask the CachedImage to load but still set m_hasPendingLoadEvent to true. This is problematic if the CachedImage
is not already loaded since no was was started and thus no load event is coming (and no load event may ever come if the
image never approaches the viewport). When updatedHasPendingEvent() is called, it will protect the HTMLImageElement if
m_hasPendingLoadEvent is true, to make sure the image element stays alive long enough for us to dispatch the load event.
With lazy loading, this meant that we would protect the HTMLImageElement right away and undefinitely since no load event
may ever come. This meant that when navigating away from a page with images that are lazily loaded (and not loaded yet),
we would leak the HTMLImageElements (and ImageLoaders), which in turn would keep the Document alive too.

To address the issue, we now make sure that m_hasPendingLoadEvent is no longer set to true when updateFromElement()
is called but the CachedImage is not already loaded and not loading (lazy loading case). When updateFromElement() gets
called the second time (when the lazily loaded image approaches the viewport), we make sure that the m_hasPendingLoadEvent
flag gets set to true then.

Test: fast/dom/lazy-image-loading-document-leak.html

  • loader/ImageLoader.cpp: (WebCore::ImageLoader::ImageLoader): (WebCore::ImageLoader::updateFromElement): (WebCore::ImageLoader::didUpdateCachedImage): (WebCore::ImageLoader::didStartLoading):
  • loader/ImageLoader.h:
  • loader/cache/CachedImage.cpp: (WebCore::CachedImage::load):
  • loader/cache/CachedImageClient.h: (WebCore::CachedImageClient::didStartLoading):

LayoutTests:

Add layout test coverage.

  • fast/dom/lazy-image-loading-document-leak-expected.txt: Added.
  • fast/dom/lazy-image-loading-document-leak.html: Added.
  • fast/dom/resources/lazy-image-loading-document-leak-popup.html: Added.

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

10:56 AM Changeset in webkit [291661] by Alan Coon
  • 4 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r291127. rdar://problem/90050632

Document is leaking on haaretz.co.il due to an async script
https://bugs.webkit.org/show_bug.cgi?id=237672
<rdar://problem/90050632>

Reviewed by Geoffrey Garen.

I haven't been able to reproduce this in the context of a layout test, however,
I see the https://acdn.adnxs.com/dmp/async_usersync.html document flakily leaking
on haaretz.co.il due to an async script (sometimes the top document too).

From a memgraph, I can see that the cycle is:
HTMLDocument -> ScriptRunner -> PendingScript (via m_scriptsToExecuteSoon) -> HTMLScriptElement -> HTMLDocument (again)

To address the issue, I updated Document::commonTeardown() to clear all its ScriptRunner's pending scripts, right after
we stop all ActiveDOMObjects. At this point, we no longer want to run script and clearing any pending scripts is critical
since they hold a strong reference to the Document.

I have validated the fix on haaretz.co.il since I wasn't able to write an automated
test for this.

  • dom/Document.cpp: (WebCore::Document::commonTeardown):
  • dom/ScriptRunner.cpp: (WebCore::ScriptRunner::clearPendingScripts):
  • dom/ScriptRunner.h:

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

10:56 AM Changeset in webkit [291660] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/bmalloc

Cherry-pick r291097. rdar://problem/89116983

[libpas] We should gurantee that in-flux-stash is fully baked when pointing table is set
https://bugs.webkit.org/show_bug.cgi?id=237697
rdar://89116983

Reviewed by Mark Lam.

To support enumerating hashtable which can be in the middle of resizing, we have in-flux-stash: this
small stash is used to keep old table and size while resizing. However, Mark pointed that
pas_tiny_large_map_hashtable_for_each_entry_remote's assertion is firing, which is ensuring that table's
underlying pointer should be NULL when the size is 0. But in-flux-stash, we did not guarantee that
in-flux-stash data is consistent when it is exposed to the enumerator (when setting hashtable_being_resized).

This patch inserts pas_compiler_fence when exposing and unexposing in-flux-stash. pas_compiler_fence is
enough (pas_store_store_fence is not necessary) because pas_enumerator runs after suspending the process.
Thus, data structure's consistency between instruction boundary is enough.

  • libpas/src/libpas/pas_hashtable.h:

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

10:56 AM Changeset in webkit [291659] by Alan Coon
  • 5 edits
    3 adds in branches/safari-613-branch

Cherry-pick r291030. rdar://problem/89989815

IntersectionObserver is causing massive document leaks on haaretz.co.il
https://bugs.webkit.org/show_bug.cgi?id=237619
<rdar://problem/89989815>

Reviewed by Simon Fraser.

Source/WebCore:

On haaretz.co.il, many of the iframe documents (for Google ad frames) were leaking due to
IntersectionObserver. In particular, IntersectionObserver::isReachableFromOpaqueRoots()
was returning true because m_targetsWaitingForFirstObservation was non-empty. This indicates
that the IntersectionObserver is waiting for its first observation since that target was
added. However, the observation is not coming because we navigated away from the document.

To address the issue, I updated Document::commonTeardown() to disconnect all
IntersectionObservers (and the very similar ResizeObservers), right after stopping all
ActiveDOMObject.

Test: fast/dom/intersection-observer-document-leak.html

  • dom/Document.cpp: (WebCore::Document::commonTeardown):
  • dom/Document.h:
  • page/IntersectionObserver.cpp: (WebCore::IntersectionObserver::disconnect): No longer return early if hasObservationTargets() returns false. This is because

LayoutTests:

Add layout test coverage.

  • fast/dom/intersection-observer-document-leak-expected.txt: Added.
  • fast/dom/intersection-observer-document-leak.html: Added.
  • fast/dom/resources/intersection-observer-document-leak-popup.html: Added.

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

10:56 AM Changeset in webkit [291658] by Alan Coon
  • 5 edits
    2 adds in branches/safari-613-branch

Cherry-pick r291029. rdar://problem/88690874

[Cocoa] metadata cue endTime may not be updated
https://bugs.webkit.org/show_bug.cgi?id=237630
rdar://88690874

Reviewed by Jer Noble.

Source/WebCore:

Data cues have a start time but not an explicit duration, a data cue ends when
the next data cue from the same track starts. This means we don’t know the
duration of cue #1 until cue #2 is delivered, so when cue #1 is delivered it is
given the end time of the media file’s duration and the actual end time is updated
when cue #2 arrives.

http://webkit.org/b/229924 refactored text, audio, and video tracks to not depend
on HTMLMediaElement. Because InbandDataTextTrack could no longer access the
HTMLMediaElement to get its duration, a duration property was added to TextTrackList
that InbandDataTextTrack uses to set the duration of temporary cues.
TextTrackList.duration is set when it is created and updated when the media player
reports a duration change.

This means that if the media file’s duration is not known when the text track list
is created, and the file's duration never changes, the text track list never has a
valid duration and data cues were not added to the temporary list.

Fix this by updating TextTrackList.duration when a HTMLMediaElement reaches HAVE_METADATA.

Test: http/tests/media/hls/track-in-band-hls-metadata-cue-duration.html

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::durationChanged): Update m_textTracks.duration and post the 'durationchange' event. (WebCore::HTMLMediaElement::setReadyState): Call durationChanged. (WebCore::HTMLMediaElement::mediaPlayerDurationChanged): Ditto.
  • html/HTMLMediaElement.h:
  • html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::addDataCue): Add cues to the incomplete cue map even if the track list doesn't have duration.

LayoutTests:

  • http/tests/media/hls/track-in-band-hls-metadata-cue-duration-expected.txt: Added.
  • http/tests/media/hls/track-in-band-hls-metadata-cue-duration.html: Added.

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

10:56 AM Changeset in webkit [291657] by Alan Coon
  • 3 edits
    2 adds in branches/safari-613-branch

Cherry-pick r291009. rdar://problem/89952347

AX: Speech Synthesis no longer returning list of voices in macOS 12.3
https://bugs.webkit.org/show_bug.cgi?id=237584
<rdar://problem/89952347>

Reviewed by Andres Gonzalez.

Source/WTF:

The minimum macOS version was meant to be 13 and above, but we started including 12.x releases inadvertently.

  • wtf/PlatformHave.h:

LayoutTests:

  • fast/speechsynthesis/voices-non-mock-expected.txt: Added.
  • fast/speechsynthesis/voices-non-mock.html: Added.

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

10:56 AM Changeset in webkit [291656] by Alan Coon
  • 13 edits in branches/safari-613-branch/Source/bmalloc

Cherry-pick r291007. rdar://problem/89984164

[libpas] Report more actionable crash in pas_enumerator
https://bugs.webkit.org/show_bug.cgi?id=237572

Reviewed by Saam Barati.

  1. Adds PAS_ASSERT_WITH_DETAIL, which can report more detailed crash information than PAS_ASSERT while it is not efficient as much as PAS_ASSERT. We use it only in pas_enumerator related code to report more actionable crash from these code. It is OK since pas_enumerator is not used usually, which will be used only when vmmap is attached.
  2. Extract enumerate_large_map, enumerate_small_large_map, and enumerate_tiny_large_map to report which part of these functions can crash (in very rare case).
  3. Ensure pas_thread_local_cache_create's thread_local_cache is exposed after setting up all the data.
  • libpas/src/libpas/pas_enumerable_range_list.c: (pas_enumerable_range_list_append): (pas_enumerable_range_list_iterate): (pas_enumerable_range_list_iterate_remote):
  • libpas/src/libpas/pas_enumerate_bitfit_heaps.c: (view_callback): (enumerate_bitfit_heap_callback):
  • libpas/src/libpas/pas_enumerate_initially_unaccounted_pages.c: (range_list_iterate_add_unaccounted_callback): (range_list_iterate_exclude_accounted_callback):
  • libpas/src/libpas/pas_enumerate_large_heaps.c: (range_list_iterate_add_large_payload_callback): (record_span): (large_map_hashtable_entry_callback): (small_large_map_hashtable_entry_callback): (tiny_large_map_hashtable_entry_callback): (enumerate_large_map): (enumerate_small_large_map): (enumerate_tiny_large_map): (pas_enumerate_large_heaps):
  • libpas/src/libpas/pas_enumerate_segregated_heaps.c: (local_allocator_map_entry_is_empty_or_deleted): (local_allocator_map_entry_is_empty): (local_allocator_map_entry_is_deleted): (collect_shared_page_directories_heap_callback): (enumerate_exclusive_view): (enumerate_shared_view): (enumerate_partial_view): (shared_page_directory_view_callback): (size_directory_view_callback): (consider_allocator): (pas_enumerate_segregated_heaps):
  • libpas/src/libpas/pas_enumerate_unaccounted_pages_as_meta.c: (pas_enumerate_unaccounted_pages_as_meta):
  • libpas/src/libpas/pas_enumerator.c: (pas_enumerator_create): (pas_enumerator_read_compact): (pas_enumerator_read): (pas_enumerator_add_unaccounted_pages): (pas_enumerator_exclude_accounted_page): (pas_enumerator_exclude_accounted_pages): (pas_enumerator_record): (pas_enumerator_record_page_payload_and_meta):
  • libpas/src/libpas/pas_enumerator.h: (pas_enumerator_record_kind_get_string):
  • libpas/src/libpas/pas_enumerator_region.c: (pas_enumerator_region_allocate):
  • libpas/src/libpas/pas_thread_local_cache.c: (pas_thread_local_cache_create):
  • libpas/src/libpas/pas_utils.c: (pas_assertion_failed_no_inline):
  • libpas/src/libpas/pas_utils.h: (pas_zero_memory):

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

10:55 AM Changeset in webkit [291655] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r291006. rdar://problem/85361911

The accessibility library should be soft linked optionally
https://bugs.webkit.org/show_bug.cgi?id=236513

Reviewed by Geoffrey Garen.

The accessibility library should be soft linked optionally, since it is not always present.

  • Shared/Cocoa/AuxiliaryProcessCocoa.mm: (WebKit::handleAXPreferenceChange): (WebKit::AuxiliaryProcess::handlePreferenceChange):

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

10:55 AM Changeset in webkit [291654] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290999. rdar://problem/89218299

UniqueIDBDatabase::didFireVersionChangeEvent should capture identifier of UniqueIDBDatabaseConnection
https://bugs.webkit.org/show_bug.cgi?id=236950
rdar://problem/89218299

Reviewed by Chris Dumez.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::didFireVersionChangeEvent):

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

10:55 AM Changeset in webkit [291653] by Alan Coon
  • 3 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290994. rdar://problem/89923867

REGRESSION (r290853): CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::FrameLoader::clear
https://bugs.webkit.org/show_bug.cgi?id=237565
<rdar://problem/88356074>

Reviewed by Chris Dumez.

No new tests. Fixes crashing test: accessibility/mac/value-change/value-change-user-info-textarea.html

newDocument may be the frame's document. We should make it a RefPtr
because it could get set to null in this function.

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::clear):
  • loader/FrameLoader.h:

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

10:55 AM Changeset in webkit [291652] by Alan Coon
  • 3 edits
    1 add in branches/safari-613-branch

Cherry-pick r290981. rdar://problem/83326232

Remove invalid ASSERT in LocaleIDBuilder::overrideLanguageScriptRegion().
https://bugs.webkit.org/show_bug.cgi?id=237573
<rdar://problem/83326232>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/handle-empty-localeID-in-localeIDBufferForLanguageTagWithNullTerminator.js: Added.

Source/JavaScriptCore:

The ASSERT(length) in LocaleIDBuilder::overrideLanguageScriptRegion() is simply
incorrect. The length can be 0 if uloc_forLanguageTag returns a 0 length in
localeIDBufferForLanguageTagWithNullTerminator(). LocaleIDBuilder::overrideLanguageScriptRegion()
already handles this scenario correctly. We just need to remove this incorrect ASSERT.

Also verified that we're producing the same result on the attached test case as
Chrome and Firefox produces.

  • runtime/IntlObject.cpp: (JSC::localeIDBufferForLanguageTagWithNullTerminator):

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

10:55 AM Changeset in webkit [291651] by Alan Coon
  • 10 edits in branches/safari-613-branch/Source

Cherry-pick r290969. rdar://problem/89638872

Preconnecting after process swap is a page load time improvement on some devices
https://bugs.webkit.org/show_bug.cgi?id=237055
<rdar://problem/89638872>

Reviewed by Geoffrey Garen.

Source/WebCore:

Export method.

  • platform/network/NetworkLoadMetrics.h:

Source/WebKit:

On some devices we see that doing a second preconnect on HTTP/1.1 is a significant page load time improvement.
This is due to the fact that most page loads on HTTP/1.1 will open several connections, and having two
preconnected connections instead of one, will speed up page load time. This patch implements this by starting
a second preconnect after the first has finished. It is important to wait until the first preconnect has
finished, otherwise the second preconnect will go to waste, since the underlying network layer does not yet
know if this is HTTP/1.1 or not. Since we do not see page load time improvement on iOS with this behavior,
it is currently only enabled for macOS. The next step is to investigate why it does not seem to be a page
load time improvement on iOS. We probably need to make sure the main resource load has started before we
start the second preconect. This will avoid that the second preconnect returns immediately.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::sendH2Ping): (WebKit::NetworkConnectionToWebProcess::preconnectTo):
  • NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::preconnectTo):
  • NetworkProcess/PreconnectTask.cpp: (WebKit::PreconnectTask::PreconnectTask): (WebKit::PreconnectTask::didFinishLoading): (WebKit::PreconnectTask::didFailLoading): (WebKit::PreconnectTask::didFinish):
  • NetworkProcess/PreconnectTask.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::SpeculativeLoadManager::preconnectForSubresource):

Source/WTF:

Add ENABLE guard for this behavior.

  • wtf/PlatformEnableCocoa.h:

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

10:55 AM Changeset in webkit [291650] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290878. rdar://problem/89000777

Release_Assert | WebCore::Document::addTopLayerElement()
https://bugs.webkit.org/show_bug.cgi?id=237307

Patch by Frédéric Wang <fwang@igalia.com> on 2022-03-07
Reviewed by Chris Dumez.

setBooleanAttribute() call in HTMLDialogElement::showModal() dispatches a DOMSubtreeModified
event. Postpone it so that listeners cannot disconnect the dialog element.

  • html/HTMLDialogElement.cpp: (WebCore::HTMLDialogElement::showModal): Add a queue to postpone event.

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

10:55 AM Changeset in webkit [291649] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/JavaScriptCore

Cherry-pick r290873. rdar://problem/89770507

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

Reviewed by Saam Barati.

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

  • assembler/JITOperationList.cpp: (JSC::JITOperationList::addPointers):

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

10:55 AM Changeset in webkit [291648] by Alan Coon
  • 16 edits in branches/safari-613-branch/Source

Cherry-pick r290856. rdar://problem/89569036

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

Reviewed by Devin Rousso.

Source/WebCore:

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

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

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

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

  • Modules/websockets/ThreadableWebSocketChannel.h: (WebCore::ThreadableWebSocketChannel::channelInspector const):
  • Modules/websockets/WebSocketChannelClient.h:
  • Add reason for error messages so they can be sent to Web Inspector.
  • Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveMessage): (WebCore::WebSocket::didReceiveBinaryData): (WebCore::WebSocket::didReceiveMessageError): (WebCore::WebSocket::didClose):
  • Modules/websockets/WebSocket.h:
  • Move inspector instrumentation calls from WebKit::WebSocketChannel to here so that they are not called until the socket is resumed.
  • We also now wrap these instrumentation calls in an unlikely check for frontends to avoid allocating the simulated call frames when Web Inspector isn't even open.
  • Modules/websockets/WebSocketChannelInspector.cpp: (WebCore::WebSocketChannelInspector::WebSocketChannelInspector): (WebCore::WebSocketChannelInspector::didCreateWebSocket const): (WebCore::WebSocketChannelInspector::willSendWebSocketHandshakeRequest const): (WebCore::WebSocketChannelInspector::didReceiveWebSocketHandshakeResponse const): (WebCore::WebSocketChannelInspector::didCloseWebSocket const): (WebCore::WebSocketChannelInspector::didReceiveWebSocketFrame const): (WebCore::WebSocketChannelInspector::didSendWebSocketFrame const): (WebCore::WebSocketChannelInspector::didReceiveWebSocketFrameError const): (WebCore::WebSocketChannelInspector::createFrame): (WebCore::WebSocketChannelInspector::didCreateWebSocket): Deleted. (WebCore::WebSocketChannelInspector::willSendWebSocketHandshakeRequest): Deleted. (WebCore::WebSocketChannelInspector::didReceiveWebSocketHandshakeResponse): Deleted. (WebCore::WebSocketChannelInspector::didCloseWebSocket): Deleted. (WebCore::WebSocketChannelInspector::didReceiveWebSocketFrame): Deleted. (WebCore::WebSocketChannelInspector::didSendWebSocketFrame): Deleted. (WebCore::WebSocketChannelInspector::didReceiveWebSocketFrameError): Deleted.
  • Modules/websockets/WebSocketChannelInspector.h:
  • Update to keep a WeakRef to the Document to reduce the amount of plumbing necessary to call these methods from WebSocket.
  • Move static utility method createFrame here from WebKit::WebSocketChannel since it is only used for inspector instrumentation.
  • Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError): (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
  • Modules/websockets/WorkerThreadableWebSocketChannel.h:
  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
  • Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::fail): (WebCore::WebSocketChannel::didFailSocketStream):
  • Modules/websockets/WebSocketChannel.h:
  • Update these classes to pass along a reason, if available, for errors.

Source/WebKit:

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

  • WebProcess/Network/WebSocketChannel.cpp: (WebKit::WebSocketChannel::notifySendFrame): (WebKit::WebSocketChannel::connect): (WebKit::WebSocketChannel::close): (WebKit::WebSocketChannel::fail): (WebKit::WebSocketChannel::disconnect): (WebKit::WebSocketChannel::didReceiveText): (WebKit::WebSocketChannel::didReceiveBinaryData): (WebKit::WebSocketChannel::didClose): (WebKit::WebSocketChannel::didReceiveMessageError): (WebKit::WebSocketChannel::didSendHandshakeRequest): (WebKit::WebSocketChannel::didReceiveHandshakeResponse): (WebKit::createWebSocketFrameForWebInspector): Deleted.
  • WebProcess/Network/WebSocketChannel.h:

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

10:55 AM Changeset in webkit [291647] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r290855. rdar://problem/82814846

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

Reviewed by Darin Adler.

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

  • UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm: (-[WKInspectorResourceURLSchemeHandler webView:startURLSchemeTask:]): (-[WKInspectorResourceURLSchemeHandler webView:stopURLSchemeTask:]):

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

10:55 AM Changeset in webkit [291646] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r290847. rdar://problem/89402338

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

Reviewed by Alan Bujtas.

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

  • WebProcess/WebPage/mac/TiledCoreAnimationScrollingCoordinator.mm: (WebKit::TiledCoreAnimationScrollingCoordinator::hasNodeWithAnimatedScrollChanged):

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

10:55 AM Changeset in webkit [291645] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290832. rdar://problem/89758344

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

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

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

  • rendering/RenderElement.cpp: (WebCore::RenderElement::moveLayers):

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

10:55 AM Changeset in webkit [291644] by Alan Coon
  • 4 edits
    2 adds in branches/safari-613-branch

Cherry-pick r290830. rdar://problem/89081463

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

Reviewed by Chris Dumez.

Source/WebCore:

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

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

  • dom/Element.cpp: (WebCore::Element::enqueueSecurityPolicyViolationEvent):
  • page/csp/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::reportViolation const): Also sets the composed value on the violation event as per the spec.

LayoutTests:

  • http/tests/security/contentSecurityPolicy/report-violation-to-document-after-element-has-been-detached-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/report-violation-to-document-after-element-has-been-detached.html: Added.

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

10:55 AM Changeset in webkit [291643] by Alan Coon
  • 4 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290820. rdar://problem/88301613

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

Reviewed by Eric Carlson.

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

Manually tested.

  • platform/mediastream/mac/AVVideoCaptureSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm: (WebCore::AVVideoCaptureSource::create): (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

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

10:55 AM Changeset in webkit [291642] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r290744. rdar://problem/81609371

[WebAuthn] Ensure presenter gets dismissed on iOS
https://bugs.webkit.org/show_bug.cgi?id=237336
rdar://81609371

Reviewed by Brent Fulgham.

Always call [m_presenter dismissWithError] to ensure presenter gets dismissed.

  • UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm: (WebKit::AuthenticatorPresenterCoordinator::dimissPresenter):

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

10:55 AM Changeset in webkit [291641] by Alan Coon
  • 7 edits
    4 adds in branches/safari-613-branch

Cherry-pick r290676. rdar://problem/83831093

[Cocoa] HLS stream currentTime sometimes jumps backwards
https://bugs.webkit.org/show_bug.cgi?id=235087
rdar://83831093

Reviewed by Dean Jackson.

Source/WebCore:

Test: http/tests/media/hls/hls-non-zero-start-time.html

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by: pass log identifier to lambda so the method name will be logged correctly. (WebCore::HTMLMediaElement::currentMediaTime const): Remove LOG_CACHED_TIME_WARNINGS build flag, always log time drift warnings when log level is DEBUG.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Log when periodic time observer is passed unexpected values. (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Use NSKeyValueObservingOptionInitial KVO option for "@duration" property because we sometimes don't get a duration changed event for HLS streams, so m_cachedDuration remains invalid. (WebCore::MediaPlayerPrivateAVFoundationObjC::currentMediaTimeDidChange const): Drive-by: fix use-after-move.

Source/WebKit:

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::currentTimeChanged): Always notify player when time jumps backwards.

LayoutTests:

  • http/tests/media/hls/hls-non-zero-start-time-expected.txt: Added.
  • http/tests/media/hls/hls-non-zero-start-time.html: Added.
  • http/tests/media/resources/hls/bip-bop-live.m3u8: Added.
  • http/tests/media/resources/hls/bipbop/start-offset.m3u8: Added.
  • http/tests/media/resources/hls/bipbop/start-offset.ts: Added.

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

10:55 AM Changeset in webkit [291640] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290675. rdar://problem/89585043

Remove release assert when UI process is blocking IOSurface IOKit access
https://bugs.webkit.org/show_bug.cgi?id=237278
<rdar://problem/89585043>

Unreviewed, address review comments.

Log error instead of creating CrashTracer reports.

  • platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::bytesPerRowAlignment):

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

10:54 AM Changeset in webkit [291639] by Alan Coon
  • 6 edits
    2 adds in branches/safari-613-branch

Cherry-pick r290645. rdar://problem/89180092

REGRESSION (r273129): Text contents in <span> with opacity not repainting/updating when sibling element has "will-change: transform"
https://bugs.webkit.org/show_bug.cgi?id=236876
<rdar://problem/89180092>

Reviewed by Simon Fraser.

Source/WebCore:

This patch implements a slightly naive repaint for inline boxes with self painting layers.

  1. Mark the line when it gains an inline box (RenderInline) with self painting layer (e.g. <span style="position: relative">this has dedicated layer</span>)
  2. Issue repaint at the end of the line layout on such renderers.

Test: fast/repaint/inline-box-with-self-paint-layer.html

  • rendering/LegacyInlineFlowBox.cpp: (WebCore::LegacyInlineFlowBox::addToLine):
  • rendering/LegacyInlineFlowBox.h: (WebCore::LegacyInlineFlowBox::LegacyInlineFlowBox): (WebCore::LegacyInlineFlowBox::hasSelfPaintInlineBox const):
  • rendering/LegacyLineLayout.cpp: (WebCore::repaintSelfPaintInlineBoxes): (WebCore::LegacyLineLayout::layoutRunsAndFloats):
  • rendering/RenderInline.cpp: (WebCore::RenderInline::clippedOverflowRect const): expand the ASSERT to enclsing inline boxes too.

LayoutTests:

  • fast/repaint/inline-box-with-self-paint-layer-expected.html: Added.
  • fast/repaint/inline-box-with-self-paint-layer.html: Added.

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

10:54 AM Changeset in webkit [291638] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290618. rdar://problem/89585043

Remove release assert when UI process is blocking IOSurface IOKit access
https://bugs.webkit.org/show_bug.cgi?id=237278

Reviewed by Darin Adler.

Remove release assert in IOSurface::bytesPerRowAlignment() when UI process is blocking IOSurface IOKit access.
Instead, log this event, and return an appropriate value.

  • platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::bytesPerRowAlignment):

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

10:54 AM Changeset in webkit [291637] by Alan Coon
  • 4 edits
    2 adds in branches/safari-613-branch

Cherry-pick r290615. rdar://problem/87919197

Handle widow relayout differently
https://bugs.webkit.org/show_bug.cgi?id=235519

Patch by Rob Buis <rbuis@igalia.com> on 2022-02-28
Reviewed by Alan Bujtas.

Source/WebCore:

Handle widow relayout differently to prevent function call recursion.

Test: fast/multicol/widow-many-relayouts-crash.html

  • rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::layoutBlock): (WebCore::RenderBlockFlow::relayoutToAvoidWidows): Deleted.
  • rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::didBreakAtLineToAvoidWidow const):

LayoutTests:

  • fast/multicol/widow-many-relayouts-crash-expected.txt: Added.
  • fast/multicol/widow-many-relayouts-crash.html: Added.

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

10:54 AM Changeset in webkit [291636] by Alan Coon
  • 4 edits in branches/safari-613-branch

Cherry-pick r290539. rdar://problem/88767812

[WebAuthn] Fallback to attestation=none whenever attestation fails
https://bugs.webkit.org/show_bug.cgi?id=237223
rdar://88767812

Reviewed by Brent Fulgham.

Source/WebKit:

Whenever attestation is requested by a RP and it fails to complete,
we previously errored out of the registration. The more correct platform
behavior in this case is to provide attestation=none.

Created API test for this behavior.

  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: (WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested):

Tools:

Add test for local authenticator attestation fallback behavior.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST):

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

10:54 AM Changeset in webkit [291635] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290526. rdar://problem/89372801

[Cocoa] HLS + Modern EME key rotation causes playback to stall indefinitely
https://bugs.webkit.org/show_bug.cgi?id=237214
<rdar://89372801>

Reviewed by Eric Carlson.

In r275916, Ref was changed to perform pointer equality in its operator==. This caused
takeUnexpectedKeyRequestForInitializationData() to fail to find key requests matching
the initData passed in through MediaKeySession.

Fix the equality test by calling .get() on the Ref, which causes the == to resolve to
FragmentedSharedBuffer::operator==().

  • platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: (WebCore::CDMInstanceFairPlayStreamingAVFObjC::takeUnexpectedKeyRequestForInitializationData):

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

10:54 AM Changeset in webkit [291634] by Alan Coon
  • 18 edits
    15 adds in branches/safari-613-branch

Cherry-pick r290519. rdar://problem/89148022

Re-add YouTubePluginReplacement, removed in r285252
https://bugs.webkit.org/show_bug.cgi?id=237182
Source/WebCore:

<rdar://89148022>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-25
Reviewed by Chris Dumez.

Tests: security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html

security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html
security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html
security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html

Its removal broke webpages that work in Chrome and Firefox, so back it comes.

  • Headers.cmake:
  • Modules/plugins: Copied from Source/WebCore/Modules/plugins.
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSPluginElementFunctions.cpp: (WebCore::pluginScriptObject):
  • bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation):
  • bindings/scripts/test/JS/JSTestPluginInterface.cpp: (WebCore::JSTestPluginInterface::visitChildrenImpl):
  • html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::createElementRenderer): (WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot): (WebCore::registrar): (WebCore::pluginReplacementForType): (WebCore::HTMLPlugInElement::requestObject): (WebCore::HTMLPlugInElement::scriptObjectForPluginReplacement):
  • html/HTMLPlugInElement.h: (WebCore::HTMLPlugInElement::pluginReplacementScriptObject):
  • html/shadow/ShadowPseudoIds.cpp: (WebCore::ShadowPseudoIds::webkitPluginReplacement):
  • html/shadow/ShadowPseudoIds.h:
  • html/shadow/YouTubeEmbedShadowElement.cpp:
  • html/shadow/YouTubeEmbedShadowElement.h:
  • page/Settings.yaml:

Tools:

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-25
Reviewed by Chris Dumez.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp:

LayoutTests:

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-25
Reviewed by Chris Dumez.

  • TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/win/TestExpectations:
  • security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement-expected.txt: Copied from LayoutTests/security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement-expected.txt.
  • security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html: Copied from LayoutTests/security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html.
  • security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement-expected.txt: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement-expected.txt.
  • security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html.
  • security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-expected.txt: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-expected.txt.
  • security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type-expected.txt: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type-expected.txt.
  • security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html.
  • security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html.

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

10:54 AM Changeset in webkit [291633] by Alan Coon
  • 4 edits
    1 add in branches/safari-613-branch

Cherry-pick r290517. rdar://problem/89428235

operationMaterializeObjectInOSR should DeferTerminationForAWhile instead of just DeferTermination.
https://bugs.webkit.org/show_bug.cgi?id=237173
rdar://problem/89450245

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/termination-exception-in-operationMaterializeObjectInOSR2.js: Added.

Source/JavaScriptCore:

DeferTermination can throw the TerminationException on destruction of the scope
object. operationMaterializeObjectInOSR() was using DeferTermination, resulting
in the TerminationException being thrown on exit. This trips up
validateDFGExceptionHandling testing (which is enabled on Debug builds) because the
TerminationException is unexpected. The solution is simply to use
DeferTerminationForAWhile instead, and let a more natural trap checkpoint throw
the TerminationException later.

Also refactored notifyDebuggerOfUnwinding() to return early if a debugger is not
present. This avoids unnecessarily entering and exiting a DeferTermination scope
in notifyDebuggerOfUnwinding(). This was observed while testing this change on
the attached test case.

  • ftl/FTLOperations.cpp: (JSC::FTL::operationMaterializeObjectInOSR):
  • interpreter/Interpreter.cpp: (JSC::notifyDebuggerOfUnwinding):

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

10:54 AM Changeset in webkit [291632] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r290328. rdar://problem/88567612

Fix GPUP WebGL generator script wrt uninitialised sized span
https://bugs.webkit.org/show_bug.cgi?id=235889
<rdar://problem/88567612>

Reviewed by Chris Dumez.

Even though we check if the synchronous message was received successfully before using it,
if we didn't check then we might have a problem with pointing to uninitialized memory, which we then wouldn't use for anything.
To fix this hypothetical problem, I start out by pointing to initialized memory.

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp: (WebKit::RemoteGraphicsContextGLProxy::getShaderPrecisionFormat):

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

10:54 AM Changeset in webkit [291631] by Alan Coon
  • 9 edits in branches/safari-613-branch/Source

Cherry-pick r288662. rdar://problem/89582442

[WP] Avoid calling IOSurfaceAlignProperty
https://bugs.webkit.org/show_bug.cgi?id=235659

Reviewed by Simon Fraser.

Source/WebCore:

Add information about alignment of bytes per row to IOSurface class.

  • platform/graphics/cocoa/IOSurface.h:
  • platform/graphics/cocoa/IOSurface.mm: (WebCore::surfaceBytesPerRowAlignment): (WebCore::IOSurface::bytesPerRowAlignment): (WebCore::IOSurface::setBytesPerRowAlignment):

Source/WebKit:

Avoid calling IOSurfaceAlignProperty in the WebContent process, since it requires IOKit access.
Information about the alignment of bytes per row of IOSurface will be retrieved in the UI process,
and sent to the WebContent process, where it will be stored.

  • Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode const): (WebKit::WebProcessCreationParameters::decode):
  • Shared/WebProcessCreationParameters.h:
  • Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::calculateBytesPerRow):
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeWebProcess):
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):

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

10:43 AM Changeset in webkit [291630] by pvollan@apple.com
  • 23 edits in trunk/Source

Enable content filtering in the Network process
https://bugs.webkit.org/show_bug.cgi?id=238156

Reviewed by Geoffrey Garen.

Source/WebCore:

There is no need for sandbox extensions in the WebContent process when content filtering
is taking place in the Network process.

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

(WebCore::NetworkExtensionContentFilter::enabled):

Source/WebKit:

Remove code associated with Network extension sandbox extensions.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • Shared/Cocoa/LoadParametersCocoa.mm:

(WebKit::LoadParameters::platformEncode const):
(WebKit::LoadParameters::platformDecode):

  • Shared/LoadParameters.h:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::addPlatformLoadParameters):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::reloadAfterUnblockedContentFilter): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponseShared):

  • UIProcess/WebPageProxy.h:
  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::contentFilterDidBlockLoad):
(WebKit::WebResourceLoader::cancelMainResourceLoadForContentFilter): Deleted.

  • WebProcess/Network/WebResourceLoader.h:
  • WebProcess/Network/WebResourceLoader.messages.in:
  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::platformDidReceiveLoadParameters):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didReceivePolicyDecision):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/com.apple.WebProcess.sb.in:

Source/WTF:

Set the feature flag.

  • wtf/PlatformEnableCocoa.h:
10:42 AM Changeset in webkit [291629] by jer.noble@apple.com
  • 3 edits
    2 adds in trunk

YouTube.com - Clicking anywhere on the progress bar pauses the video
https://bugs.webkit.org/show_bug.cgi?id=237750
<rdar://problem/90364846>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-unexpected-pause.html

When calling play() or pause() on a MediaPlayerPrivateMediaSourceAVFObjC, the object will
respond by calling m_player->playbackStateChanged(), which will in turn call
HTMLMediaElement::mediaPlayerPlaybackStateChanged() with the new state. However, HTMLMediaElement
expects this to be called only for unanticipated state changes, not expected state changes. And
when that method is called and the reported state does not match the element's own expected state,
the element calls its own play() or pause() function to update its own state to match the player's.
And because MediaPlayerPrivateMediaSourceAVFObjC calls this method on the next run loop, there is
an opportunity for those states to get out of sync, which happens when YouTube responds to a tap
in its timeline.

Remove the unnecessary "call on next run loop" behavior of MediaPlayerPrivateMediaSourceAVFObjC::
play() and ::pause(). Also, remove the unnecessary notification that the play state has changed. In
the future, this can be accomplished by adding a callback parameter to MediaPlayer::play() rather than
relying on a state change notification.

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playAtHostTime):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseAtHostTime):

LayoutTests:

  • media/media-source/media-source-unexpected-pause-expected.txt: Added.
  • media/media-source/media-source-unexpected-pause.html: Added.
10:35 AM Changeset in webkit [291628] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Inline swatch popovers should hide when inline swatches are removed
https://bugs.webkit.org/show_bug.cgi?id=235047
<rdar://problem/87687975>

Reviewed by Patrick Angle.

  • UserInterface/Views/InlineSwatch.js:

(WI.InlineSwatch):
(WI.InlineSwatch.prototype.dismissPopover):
(WI.InlineSwatch.prototype._presentPopover):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.detached):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
(WI.SpreadsheetStyleProperty.prototype._renderValue):
(WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):

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

[Merge-Queue] Add ValidateSquashed
https://bugs.webkit.org/show_bug.cgi?id=238172
<rdar://problem/90602594>

Reviewed by Aakash Jain.

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

(MergeQueueFactory.init): Add ValidateSquashed.

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

(TestExpectedBuildSteps): Ditto.

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

(VerifyGitHubIntegrity.send_email_for_github_issue):
(ValidateSquashed): Ensure that a pull request only has a single commit.
(ValidateSquashed.init): Do not log environment variables.
(ValidateSquashed.start): Log commits between the HEAD branch and base branch.
(ValidateSquashed.getResultSummary):
(ValidateSquashed.evaluateCommand): Check number of commits between HEAD and base branch.
(ValidateSquashed.doStepIf): Only run step for pull requests.
(ValidateSquashed.hideStepIf): Hide step if we aren't running it.

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

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

[macOS][WP] Add telemetry for syscalls used during launch
https://bugs.webkit.org/show_bug.cgi?id=235865
<rdar://problem/88228583>

Reviewed by Brent Fulgham.

Add telemetry in the WebContent process' sandbox on macOS to determine which syscalls are used only during launch.

  • WebProcess/com.apple.WebProcess.sb.in:
10:12 AM Changeset in webkit [291625] by J Pascoe
  • 8 edits in trunk

[WebAuthn] Pass along timeout to ASA and ignore timeout for conditional mediation requests
https://bugs.webkit.org/show_bug.cgi?id=238147
rdar://90509464

Reviewed by Brent Fulgham.

Source/WebKit:

Currently we don't pass the timeout from the rp into ASA, so the default timeout is always used.
This patch starts passing along the timeout to ASA, and creates a place for ASA to specify the
mediation of the request, so we can ignore the timeout for requests using conditional mediation.

Modified API test.

  • Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(toWebCore):
(-[_WKWebAuthenticationPanel makeCredentialWithMediationRequirement:clientDataHash:options:completionHandler:]):
(-[_WKWebAuthenticationPanel makeCredentialWithClientDataHash:options:completionHandler:]):
(-[_WKWebAuthenticationPanel getAssertionWithMediationRequirement:clientDataHash:options:completionHandler:]):
(-[_WKWebAuthenticationPanel getAssertionWithClientDataHash:options:completionHandler:]):

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManager::respondReceived):
(WebKit::AuthenticatorManager::initTimeOutTimer):

  • UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:

(WebKit::configureRegistrationRequestContext):
(WebKit::configureAssertionOptions):

Tools:

Modify API test to use new SPI.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

9:14 AM Changeset in webkit [291624] by J Pascoe
  • 10 edits in trunk/Source

[WebAuthn] Support getAssertion for virtual HID authenticators
https://bugs.webkit.org/show_bug.cgi?id=238154
rdar://problem/90593150

Reviewed by Brent Fulgham.

Source/WebCore:

Virtual authenticators for WebAuthn support different transprots: nfc, usb, internal,
and ble. Currently, we only fully support the internal transport and makeCredential for
usb-transport. The default transport for web-platform-tests is usb. This patch implements
getAssertion for hid-based virtual authneticators.

  • Modules/webauthn/WebAuthenticationUtils.cpp:

(WebCore::buildUserEntityMap):
(WebCore::buildCredentialDescriptor):

  • Modules/webauthn/WebAuthenticationUtils.h:
  • Modules/webauthn/fido/FidoConstants.h:

Source/WebKit:

Virtual authenticators for WebAuthn support different transports: nfc, usb, internal,
and ble. Currently, we only fully support the internal transport and makeCredential for
usb-transport. The default transport for web-platform-tests is usb. This patch implements
getAssertion for hid-based virtual authneticators.

Tested via manually creating virtual authenticator and performing create / get.

  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorManager.cpp:

(WebKit::VirtualAuthenticatorManager::addCredential):
(WebKit::VirtualAuthenticatorManager::credentialsMatchingList):

  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorManager.h:
  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorUtils.h:
  • UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorUtils.mm:

(WebKit::privateKeyFromBase64):
(WebKit::signatureForPrivateKey):

  • UIProcess/WebAuthentication/Virtual/VirtualHidConnection.cpp:

(WebKit::VirtualHidConnection::parseRequest):

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

It should be possible to copy text out of "AutoFilledAndViewable" password fields
https://bugs.webkit.org/show_bug.cgi?id=238160

Patch by Ricky Mondello <Ricky Mondello> on 2022-03-22
Reviewed by Geoffrey Garen.

Source/WebCore:

  • editing/Editor.cpp:

(WebCore::Editor::canCopy const): Allow copy in AutoFilledAndViewable password fields.

  • editing/VisibleSelection.cpp:

(WebCore::VisibleSelection::isInAutoFilledAndViewableField const): Added.

  • editing/VisibleSelection.h: Declare member function.

LayoutTests:

  • fast/forms/input-autofilled-and-viewable.html: Test copying.
8:45 AM Changeset in webkit [291622] by jer.noble@apple.com
  • 5 edits
    2 adds in trunk

Fetching a Blob URL with an unbounded Range header do not generate a Content-Range response header
https://bugs.webkit.org/show_bug.cgi?id=238170

Reviewed by Eric Carlson.

Source/WebCore:

Test: fetch/fetch-blob-unbounded-range.html

Handle the case where the request contains an unbounded range, and property calculate the rangeEnd
to pass into ParsedContentRange.

  • platform/network/BlobResourceHandle.cpp:

(WebCore::BlobResourceHandle::notifyResponseOnSuccess):

Source/WebKit:

Handle the case where the request contains an unbounded range, and property calculate the rangeEnd
to pass into ParsedContentRange.

  • NetworkProcess/NetworkDataTaskBlob.cpp:

(WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):

LayoutTests:

  • fetch/fetch-blob-unbounded-range-expected.txt: Added.
  • fetch/fetch-blob-unbounded-range.html: Added.
8:37 AM Changeset in webkit [291621] by magomez@igalia.com
  • 2 edits in trunk/Source/WebKit

Ensure that proxies are invalidated before destroying them.
https://bugs.webkit.org/show_bug.cgi?id=237187

Reviewed by Carlos Garcia Campos.

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::updateSceneState):

8:30 AM Changeset in webkit [291620] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Ensure there is a Network process after launching the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=238080
<rdar://88933565>

Reviewed by Chris Dumez.

After the WebContent process has finished launching, ensure there is a Network process
which will provide the WebContent process with the Launch Services database.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didFinishLaunching):

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

[Merge-Queue] Add ValidateCommitterAndReviewer
https://bugs.webkit.org/show_bug.cgi?id=238150
<rdar://problem/90587620>

Reviewed by Aakash Jain.

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

(CommitQueueFactory.init): Rename ValidateCommiterAndReviewer to ValidateCommiterAndReviewer.
(MergeQueueFactory.init): Add ValidateCommitterAndReviewer, PrintConfiguration, CleanGitRepo,
CheckOutSource, FetchBranches, ShowIdentifier, VerifyGitHubIntegrity, UpdateWorkingDirectory
and CheckOutPullRequest.

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

(TestExpectedBuildSteps): Add Merge-Queue step names.

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

(GitHubMixin.get_pr_json): Retry tied to attempt not index.
(GitHubMixin.get_reviewers): Get list of reviewers for pull-request in repository.
(ValidateCommitterAndReviewer): Renamed from ValidateCommiterAndReviewer, inherit from GitHubMixin.
(ValidateCommitterAndReviewer.init): Rename ValidateCommiterAndReviewer.
(ValidateCommitterAndReviewer.fail_build): Block pull request, differentiate comment for pull
request and patch.
(ValidateCommitterAndReviewer.start): Support pull requests.
(ValidateCommiterAndReviewer): Renamed to ValidateCommitterAndReviewer.

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

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

8:24 AM Changeset in webkit [291618] by Wenson Hsieh
  • 5 edits
    1 add in trunk

-[WKWebView _spellCheckerDocumentTag] is inconsistent with the document tag passed into NSSpellChecker
https://bugs.webkit.org/show_bug.cgi?id=238186
rdar://90591883

Reviewed by Tim Horton.

Source/WebKit:

Currently, WebViewImpl and WebPageProxy both maintain separate spellchecking document tag values, both of which
are derived from -[NSSpellChecker uniqueSpellDocumentTag]. While the former is used for autocorrection as well
as the WKWebView SPI -_spellCheckerDocumentTag, the latter is passed into NSSpellChecker API when performing
spellchecking.

For various reasons, Mail compose (using WebKit2) requires -_spellCheckerDocumentTag to be consistent with the
value of the spell checker document tag passed into -checkString:range:…:inSpellDocumentWithTag:orthography:.
Address this by simply having WebViewImpl call through into WebPageProxy's spellDocumentTag, such that the two
now share the same value.

Test: SpellCheckerDocumentTag.SpellCheckerDocumentTagWhenCheckingString

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

(WebKit::WebViewImpl::spellCheckerDocumentTag):

Tools:

Add a test to verify that the spell checking document tag passed into NSSpellChecker API is consistent with the
document tag reported by WKWebView.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/SpellCheckerDocumentTag.mm: Added.

(TestWebKitAPI::TEST):

7:48 AM Changeset in webkit [291617] by Jonathan Bedard
  • 2 edits in trunk/Tools

[git-webkit] Make radar conditional on authentication (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=238051
<rdar://problem/90384655>

Reviewed by Alexey Proskuryakov.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py:

(Tracker.init): Only check for authentication if library exists.

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

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

Move TextureMapper member variables, types and code out of GraphicsContextGLANGLE
https://bugs.webkit.org/show_bug.cgi?id=238200

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-03-22
Reviewed by Alejandro G. Castro.

Move member variables and code specific to the TextureMapper-oriented
GraphicsContextGLTextureMapperANGLE class from the parent
GraphicsContextGLANGLE class into GraphicsContextGLTextureMapperANGLE.

This means moving down various member variables and types as well as
friendship declarations. For behavior to remain the same, the
prepareTextureImpl() method is made virtual and overridden in the
TextureMapper class, but otherwise matches the previous behavior.

Nicosia::GCGLANGLELayer is adjusted to operate on a reference to the
derived class, not on the base GraphicsContextGLANGLE.

No new tests as there's no change in behavior.

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::prepareTextureImpl):

  • platform/graphics/angle/GraphicsContextGLANGLE.h:
  • platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp:

(Nicosia::GCGLANGLELayer::GCGLANGLELayer):

  • platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h:
  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLTextureMapperANGLE::prepareTextureImpl):
(WebCore::GraphicsContextGLTextureMapperANGLE::EGLImageBacking::EGLImageBacking):
(WebCore::GraphicsContextGLTextureMapperANGLE::EGLImageBacking::~EGLImageBacking):
(WebCore::GraphicsContextGLTextureMapperANGLE::EGLImageBacking::format const):
(WebCore::GraphicsContextGLTextureMapperANGLE::EGLImageBacking::stride const):
(WebCore::GraphicsContextGLTextureMapperANGLE::EGLImageBacking::releaseResources):
(WebCore::GraphicsContextGLTextureMapperANGLE::EGLImageBacking::isReleased):
(WebCore::GraphicsContextGLTextureMapperANGLE::EGLImageBacking::reset):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::EGLImageBacking): Deleted.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::~EGLImageBacking): Deleted.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::format const): Deleted.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::stride const): Deleted.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::releaseResources): Deleted.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::isReleased): Deleted.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::reset): Deleted.

  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.h:
7:41 AM Changeset in webkit [291615] by Jonathan Bedard
  • 2 edits in trunk/Tools

[Python 3] Use sys.executable instead of Python
https://bugs.webkit.org/show_bug.cgi?id=238175
<rdar://problem/90604107>

Reviewed by Ryan Haddad.

  • Tools/Scripts/webkitpy/common/system/executive_unittest.py:

(ExecutiveTest.test_run_command_with_bad_command):

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

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

[WPE][GTK] VideoFrameGStreamer missing include after -r291610 refactor
https://bugs.webkit.org/show_bug.cgi?id=238199

Patch by Alejandro G. Castro <alex@igalia.com> on 2022-03-22
Reviewed by Žan Doberšek.

We need to add the define we had in the file before the refactor.

  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
6:35 AM Changeset in webkit [291613] by Carlos Garcia Campos
  • 52 edits
    4 deletes in trunk

[GTK][WPE] Remove the ATK implementation
https://bugs.webkit.org/show_bug.cgi?id=238198

Reviewed by Adrian Perez de Castro.

.:

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • accessibility/AXObjectCache.h:
  • accessibility/AccessibilityList.cpp:

(WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::canSetValueAttribute const):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::textIteratorBehaviorForTextRange const):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::indexForVisiblePosition const):
(WebCore::AccessibilityRenderObject::shouldNotifyActiveDescendant const):

  • accessibility/AccessibilityTableColumn.cpp:

(WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored const):

  • accessibility/AccessibilityTableHeaderContainer.cpp:

(WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored const):

  • accessibility/atk/AXObjectCacheAtk.cpp: Removed.

(WebCore::wrapperParent): Deleted.
(WebCore::AXObjectCache::detachWrapper): Deleted.
(WebCore::AXObjectCache::attachWrapper): Deleted.
(WebCore::AXObjectCache::platformPerformDeferredCacheUpdate): Deleted.
(WebCore::getListObject): Deleted.
(WebCore::notifyChildrenSelectionChange): Deleted.
(WebCore::AXObjectCache::postPlatformNotification): Deleted.
(WebCore::AXObjectCache::nodeTextChangePlatformNotification): Deleted.
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Deleted.
(WebCore::AXObjectCache::platformHandleFocusedUIElementChanged): Deleted.
(WebCore::AXObjectCache::handleScrolledToAnchor): Deleted.

  • accessibility/atk/AccessibilityObjectAtk.cpp: Removed.

(WebCore::AccessibilityObject::detachPlatformWrapper): Deleted.
(WebCore::AccessibilityObject::accessibilityIgnoreAttachment const): Deleted.
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const): Deleted.
(WebCore::AccessibilityObject::allowsTextRanges const): Deleted.
(WebCore::AccessibilityObject::getLengthForTextRange const): Deleted.

  • accessibility/atk/WebKitAccessible.cpp: Removed.

(webkitAccessibleGetName): Deleted.
(webkitAccessibleGetDescription): Deleted.
(removeAtkRelationByType): Deleted.
(setAtkRelationSetFromCoreObject): Deleted.
(isRootObject): Deleted.
(webkitAccessibleGetParent): Deleted.
(webkitAccessibleGetNChildren): Deleted.
(webkitAccessibleRefChild): Deleted.
(webkitAccessibleGetIndexInParent): Deleted.
(webkitAccessibleGetAttributes): Deleted.
(atkRole): Deleted.
(webkitAccessibleGetRole): Deleted.
(isTextWithCaret): Deleted.
(setAtkStateSetFromCoreObject): Deleted.
(webkitAccessibleRefStateSet): Deleted.
(webkitAccessibleRefRelationSet): Deleted.
(webkitAccessibleInit): Deleted.
(webkitAccessibleGetObjectLocale): Deleted.
(webkit_accessible_class_init): Deleted.
(roleIsTextType): Deleted.
(interfaceMaskFromObject): Deleted.
(uniqueAccessibilityTypeName): Deleted.
(accessibilityTypeFromObject): Deleted.
(webkitAccessibleNew): Deleted.
(webkitAccessibleGetAccessibilityObject): Deleted.
(webkitAccessibleDetach): Deleted.
(webkitAccessibleIsDetached): Deleted.
(webkitAccessibleCacheAndReturnAtkProperty): Deleted.

  • accessibility/atk/WebKitAccessible.h: Removed.
  • accessibility/atk/WebKitAccessibleHyperlink.cpp: Removed.

(webkitAccessibleHyperlinkActionDoAction): Deleted.
(webkitAccessibleHyperlinkActionGetNActions): Deleted.
(webkitAccessibleHyperlinkActionGetDescription): Deleted.
(webkitAccessibleHyperlinkActionGetKeybinding): Deleted.
(webkitAccessibleHyperlinkActionGetName): Deleted.
(webkit_accessible_hyperlink_atk_action_interface_init): Deleted.
(webkitAccessibleHyperlinkGetURI): Deleted.
(webkitAccessibleHyperlinkGetObject): Deleted.
(rangeLengthForObject): Deleted.
(webkitAccessibleHyperlinkGetStartIndex): Deleted.
(webkitAccessibleHyperlinkGetEndIndex): Deleted.
(webkitAccessibleHyperlinkIsValid): Deleted.
(webkitAccessibleHyperlinkGetNAnchors): Deleted.
(webkitAccessibleHyperlinkIsSelectedLink): Deleted.
(webkitAccessibleHyperlinkGetProperty): Deleted.
(webkitAccessibleHyperlinkSetProperty): Deleted.
(webkit_accessible_hyperlink_class_init): Deleted.
(webkitAccessibleHyperlinkGetOrCreate): Deleted.

  • accessibility/atk/WebKitAccessibleHyperlink.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceAction.cpp: Removed.

(core): Deleted.
(webkitAccessibleActionDoAction): Deleted.
(webkitAccessibleActionGetNActions): Deleted.
(webkitAccessibleActionGetDescription): Deleted.
(webkitAccessibleActionGetKeybinding): Deleted.
(webkitAccessibleActionGetName): Deleted.
(webkitAccessibleActionInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceAction.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceComponent.cpp: Removed.

(atkToContents): Deleted.
(webkitAccessibleComponentRefAccessibleAtPoint): Deleted.
(webkitAccessibleComponentGetExtents): Deleted.
(webkitAccessibleComponentGrabFocus): Deleted.
(webkitAccessibleComponentScrollTo): Deleted.
(webkitAccessibleComponentScrollToPoint): Deleted.
(webkitAccessibleComponentInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceComponent.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceDocument.cpp: Removed.

(core): Deleted.
(documentAttributeValue): Deleted.
(webkitAccessibleDocumentGetAttributeValue): Deleted.
(webkitAccessibleDocumentGetAttributes): Deleted.
(webkitAccessibleDocumentGetLocale): Deleted.
(webkitAccessibleDocumentInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceDocument.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp: Removed.

(core): Deleted.
(webkitAccessibleEditableTextSetRunAttributes): Deleted.
(webkitAccessibleEditableTextSetTextContents): Deleted.
(webkitAccessibleEditableTextInsertText): Deleted.
(webkitAccessibleEditableTextCopyText): Deleted.
(webkitAccessibleEditableTextCutText): Deleted.
(webkitAccessibleEditableTextDeleteText): Deleted.
(webkitAccessibleEditableTextPasteText): Deleted.
(webkitAccessibleEditableTextInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceEditableText.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp: Removed.

(webkitAccessibleHyperlinkImplGetHyperlink): Deleted.
(webkitAccessibleHyperlinkImplInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp: Removed.

(core): Deleted.
(webkitAccessibleHypertextGetLink): Deleted.
(webkitAccessibleHypertextGetNLinks): Deleted.
(webkitAccessibleHypertextGetLinkIndex): Deleted.
(webkitAccessibleHypertextInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceHypertext.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceImage.cpp: Removed.

(core): Deleted.
(webkitAccessibleImageGetImagePosition): Deleted.
(webkitAccessibleImageGetImageDescription): Deleted.
(webkitAccessibleImageGetImageSize): Deleted.
(webkitAccessibleImageInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceImage.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceSelection.cpp: Removed.

(core): Deleted.
(listObjectForCoreSelection): Deleted.
(optionFromList): Deleted.
(optionFromSelection): Deleted.
(webkitAccessibleSelectionAddSelection): Deleted.
(webkitAccessibleSelectionClearSelection): Deleted.
(webkitAccessibleSelectionRefSelection): Deleted.
(webkitAccessibleSelectionGetSelectionCount): Deleted.
(webkitAccessibleSelectionIsChildSelected): Deleted.
(webkitAccessibleSelectionRemoveSelection): Deleted.
(webkitAccessibleSelectionSelectAllSelection): Deleted.
(webkitAccessibleSelectionInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceSelection.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceTable.cpp: Removed.

(core): Deleted.
(cell): Deleted.
(cellIndex): Deleted.
(cellAtIndex): Deleted.
(webkitAccessibleTableRefAt): Deleted.
(webkitAccessibleTableGetIndexAt): Deleted.
(webkitAccessibleTableGetColumnAtIndex): Deleted.
(webkitAccessibleTableGetRowAtIndex): Deleted.
(webkitAccessibleTableGetNColumns): Deleted.
(webkitAccessibleTableGetNRows): Deleted.
(webkitAccessibleTableGetColumnExtentAt): Deleted.
(webkitAccessibleTableGetRowExtentAt): Deleted.
(webkitAccessibleTableGetColumnHeader): Deleted.
(webkitAccessibleTableGetRowHeader): Deleted.
(webkitAccessibleTableGetCaption): Deleted.
(webkitAccessibleTableGetColumnDescription): Deleted.
(webkitAccessibleTableGetRowDescription): Deleted.
(webkitAccessibleTableInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceTable.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp: Removed.

(convertToGPtrArray): Deleted.
(core): Deleted.
(webkitAccessibleTableCellGetColumnHeaderCells): Deleted.
(webkitAccessibleTableCellGetRowHeaderCells): Deleted.
(webkitAccessibleTableCellGetColumnSpan): Deleted.
(webkitAccessibleTableCellGetRowSpan): Deleted.
(webkitAccessibleTableCellGetPosition): Deleted.
(webkitAccessibleTableCellGetTable): Deleted.
(webkitAccessibleTableCellInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceTableCell.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceText.cpp: Removed.

(core): Deleted.
(baselinePositionForRenderObject): Deleted.
(getAttributeSetForAccessibilityObject): Deleted.
(compareAttribute): Deleted.
(attributeSetDifference): Deleted.
(accessibilityObjectLength): Deleted.
(getAccessibilityObjectForOffset): Deleted.
(getRunAttributesFromAccessibilityObject): Deleted.
(textExtents): Deleted.
(offsetAdjustmentForListItem): Deleted.
(webCoreOffsetToAtkOffset): Deleted.
(atkOffsetToWebCoreOffset): Deleted.
(getNodeForAccessibilityObject): Deleted.
(getSelectionOffsetsForObject): Deleted.
(webkitAccessibleTextGetText): Deleted.
(emptyTextSelectionAtOffset): Deleted.
(webkitAccessibleTextGetChar): Deleted.
(nextWordStartPosition): Deleted.
(previousWordEndPosition): Deleted.
(wordAtPositionForAtkBoundary): Deleted.
(numberOfReplacedElementsBeforeOffset): Deleted.
(webkitAccessibleTextWordForBoundary): Deleted.
(isSentenceBoundary): Deleted.
(isWhiteSpaceBetweenSentences): Deleted.
(sentenceAtPositionForAtkBoundary): Deleted.
(webkitAccessibleTextSentenceForBoundary): Deleted.
(lineAtPositionForAtkBoundary): Deleted.
(webkitAccessibleTextLineForBoundary): Deleted.
(webkitAccessibleTextGetTextForOffset): Deleted.
(webkitAccessibleTextGetTextAfterOffset): Deleted.
(webkitAccessibleTextGetTextAtOffset): Deleted.
(webkitAccessibleTextGetTextBeforeOffset): Deleted.
(webkitAccessibleTextGetCharacterAtOffset): Deleted.
(webkitAccessibleTextGetCaretOffset): Deleted.
(webkitAccessibleTextGetRunAttributes): Deleted.
(webkitAccessibleTextGetDefaultAttributes): Deleted.
(webkitAccessibleTextGetCharacterExtents): Deleted.
(webkitAccessibleTextGetRangeExtents): Deleted.
(webkitAccessibleTextGetCharacterCount): Deleted.
(webkitAccessibleTextGetOffsetAtPoint): Deleted.
(webkitAccessibleTextGetNSelections): Deleted.
(webkitAccessibleTextGetSelection): Deleted.
(webkitAccessibleTextAddSelection): Deleted.
(webkitAccessibleTextSetSelection): Deleted.
(webkitAccessibleTextRemoveSelection): Deleted.
(webkitAccessibleTextSetCaretOffset): Deleted.
(webkitAccessibleTextGetStringAtOffset): Deleted.
(webkitAccessibleTextInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceText.h: Removed.
  • accessibility/atk/WebKitAccessibleInterfaceValue.cpp: Removed.

(core): Deleted.
(webkitAccessibleSetNewValue): Deleted.
(webkitAccessibleGetIncrementValue): Deleted.
(webkitAccessibleGetValueAndText): Deleted.
(webkitAccessibleGetIncrement): Deleted.
(webkitAccessibleSetValue): Deleted.
(webkitAccessibleGetRange): Deleted.
(webkitAccessibleValueGetCurrentValue): Deleted.
(webkitAccessibleValueGetMaximumValue): Deleted.
(webkitAccessibleValueGetMinimumValue): Deleted.
(webkitAccessibleValueSetCurrentValue): Deleted.
(webkitAccessibleValueGetMinimumIncrement): Deleted.
(webkitAccessibleValueInterfaceInit): Deleted.

  • accessibility/atk/WebKitAccessibleInterfaceValue.h: Removed.
  • accessibility/atk/WebKitAccessibleUtil.cpp: Removed.

(addToAtkAttributeSet): Deleted.
(contentsRelativeToAtkCoordinateType): Deleted.
(titleTagShouldBeUsedInDescriptionField): Deleted.
(accessibilityTitle): Deleted.
(accessibilityDescription): Deleted.
(selectionBelongsToObject): Deleted.
(objectFocusedAndCaretOffsetUnignored): Deleted.

  • accessibility/atk/WebKitAccessibleUtil.h: Removed.
  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::attributes const):

  • editing/FrameSelection.h:
  • editing/atk/FrameSelectionAtk.cpp: Removed.

(WebCore::emitTextSelectionChange): Deleted.
(WebCore::maybeEmitTextFocusChange): Deleted.
(WebCore::FrameSelection::notifyAccessibilityForSelectionChange): Deleted.

  • page/Settings.yaml:
  • platform/graphics/PlatformDisplay.cpp:
  • platform/graphics/PlatformDisplay.h:
  • platform/graphics/x11/PlatformDisplayX11.cpp:
  • platform/graphics/x11/PlatformDisplayX11.h:

Source/WebKit:

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp: Removed.

(coreRootObjectWrapperDetachedCallback): Deleted.
(rootWebAreaWrapper): Deleted.
(accessibilityRootObjectWrapper): Deleted.
(webkitWebPageAccessibilityObjectInitialize): Deleted.
(webkitWebPageAccessibilityObjectGetIndexInParent): Deleted.
(webkitWebPageAccessibilityObjectGetNChildren): Deleted.
(webkitWebPageAccessibilityObjectRefChild): Deleted.
(webkitWebPageAccessibilityObjectRefStateSet): Deleted.
(webkit_web_page_accessibility_object_class_init): Deleted.
(webkitWebPageAccessibilityObjectNew): Deleted.

  • WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.h: Removed.
  • WebProcess/WebPage/glib/WebPageGLib.cpp:

(WebKit::WebPage::platformInitialize):

  • WebProcess/wpe/WebProcessMainWPE.cpp:

(WebKit::initializeAccessibility): Deleted.

Tools:

  • DumpRenderTree/AccessibilityController.h:
  • DumpRenderTree/AccessibilityUIElement.h:
  • Scripts/valgrind/suppressions.txt:
  • Scripts/webkit-filter-log:
  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(testAccessibleChildrenChanged):
(testAccessibleAttributes):
(testAccessibleState):
(testAccessibleStateChanged):
(testAccessibleListMarkers):
(testTextSurrogatePair):
(testTextIterator):
(testTextExtents):
(testTextSelections):
(testTextAttributes):
(testTextStateChanged):
(testTextReplacedObjects):
(testTextListMarkers):
(testHyperlinkBasic):
(testHypertextBasic):
(testActionBasic):
(testDocumentBasic):
(testImageBasic):
(testSelectionMenuList):
(testTableBasic):

  • TestWebKitAPI/glib/PlatformGTK.cmake:
  • WebKitTestRunner/InjectedBundle/AccessibilityController.h:
  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp: Removed.

(WTR::AccessibilityController::resetToConsistentState): Deleted.
(WTR::childElementById): Deleted.
(WTR::AccessibilityController::accessibleElementById): Deleted.
(WTR::AccessibilityController::platformName): Deleted.
(WTR::AccessibilityController::injectAccessibilityPreference): Deleted.
(WTR::AccessibilityController::rootElement): Deleted.
(WTR::AccessibilityController::focusedElement): Deleted.
(WTR::AccessibilityController::addNotificationListener): Deleted.
(WTR::AccessibilityController::removeNotificationListener): Deleted.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp: Removed.

(): Deleted.
(WTR::AccessibilityNotificationHandler::AccessibilityNotificationHandler): Deleted.
(WTR::AccessibilityNotificationHandler::~AccessibilityNotificationHandler): Deleted.
(WTR::AccessibilityNotificationHandler::setNotificationFunctionCallback): Deleted.
(WTR::AccessibilityNotificationHandler::removeAccessibilityNotificationHandler): Deleted.
(WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks): Deleted.
(WTR::AccessibilityNotificationHandler::disconnectAccessibilityCallbacks): Deleted.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.h: Removed.

(WTR::AccessibilityNotificationHandler::create): Deleted.
(WTR::AccessibilityNotificationHandler::setPlatformElement): Deleted.
(WTR::AccessibilityNotificationHandler::platformElement const): Deleted.
(WTR::AccessibilityNotificationHandler::notificationFunctionCallback const): Deleted.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: Removed.

(): Deleted.
(WTR::AccessibilityUIElement::AccessibilityUIElement): Deleted.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Deleted.
(WTR::AccessibilityUIElement::isEqual): Deleted.
(WTR::AccessibilityUIElement::getChildren): Deleted.
(WTR::AccessibilityUIElement::getChildrenWithRange): Deleted.
(WTR::AccessibilityUIElement::childrenCount): Deleted.
(WTR::AccessibilityUIElement::elementAtPoint): Deleted.
(WTR::AccessibilityUIElement::indexOfChild): Deleted.
(WTR::AccessibilityUIElement::childAtIndex): Deleted.
(WTR::accessibilityElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::linkedUIElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaOwnsElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaOwnsReferencingElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaFlowToElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaFlowToReferencingElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaControlsElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaControlsReferencingElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaLabelledByElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaLabelledByReferencingElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaDescribedByElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaDescribedByReferencingElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaDetailsElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaDetailsReferencingElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaErrorMessageElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::ariaErrorMessageReferencingElementAtIndex): Deleted.
(WTR::AccessibilityUIElement::disclosedRowAtIndex): Deleted.
(WTR::AccessibilityUIElement::rowAtIndex): Deleted.
(WTR::AccessibilityUIElement::selectedChildAtIndex const): Deleted.
(WTR::AccessibilityUIElement::selectedChildrenCount const): Deleted.
(WTR::AccessibilityUIElement::selectedRowAtIndex): Deleted.
(WTR::AccessibilityUIElement::titleUIElement): Deleted.
(WTR::AccessibilityUIElement::parentElement): Deleted.
(WTR::AccessibilityUIElement::disclosedByRow): Deleted.
(WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Deleted.
(WTR::AccessibilityUIElement::attributesOfDocumentLinks): Deleted.
(WTR::AccessibilityUIElement::attributesOfChildren): Deleted.
(WTR::AccessibilityUIElement::allAttributes): Deleted.
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Deleted.
(WTR::AccessibilityUIElement::stringAttributeValue): Deleted.
(WTR::AccessibilityUIElement::numberAttributeValue): Deleted.
(WTR::AccessibilityUIElement::currentStateValue const): Deleted.
(WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Deleted.
(WTR::AccessibilityUIElement::rowHeaders const): Deleted.
(WTR::AccessibilityUIElement::columnHeaders const): Deleted.
(WTR::AccessibilityUIElement::uiElementAttributeValue const): Deleted.
(WTR::AccessibilityUIElement::boolAttributeValue): Deleted.
(WTR::AccessibilityUIElement::isAttributeSettable): Deleted.
(WTR::AccessibilityUIElement::isAttributeSupported): Deleted.
(WTR::AccessibilityUIElement::parameterizedAttributeNames): Deleted.
(WTR::AccessibilityUIElement::role): Deleted.
(WTR::AccessibilityUIElement::subrole): Deleted.
(WTR::AccessibilityUIElement::roleDescription): Deleted.
(WTR::AccessibilityUIElement::computedRoleString): Deleted.
(WTR::AccessibilityUIElement::title): Deleted.
(WTR::AccessibilityUIElement::description): Deleted.
(WTR::AccessibilityUIElement::orientation const): Deleted.
(WTR::AccessibilityUIElement::stringValue): Deleted.
(WTR::AccessibilityUIElement::language): Deleted.
(WTR::AccessibilityUIElement::helpText const): Deleted.
(WTR::AccessibilityUIElement::x): Deleted.
(WTR::AccessibilityUIElement::y): Deleted.
(WTR::AccessibilityUIElement::width): Deleted.
(WTR::AccessibilityUIElement::height): Deleted.
(WTR::AccessibilityUIElement::clickPointX): Deleted.
(WTR::AccessibilityUIElement::clickPointY): Deleted.
(WTR::AccessibilityUIElement::intValue const): Deleted.
(WTR::AccessibilityUIElement::minValue): Deleted.
(WTR::AccessibilityUIElement::maxValue): Deleted.
(WTR::AccessibilityUIElement::valueDescription): Deleted.
(WTR::AccessibilityUIElement::insertionPointLineNumber): Deleted.
(WTR::AccessibilityUIElement::isPressActionSupported): Deleted.
(WTR::AccessibilityUIElement::isIncrementActionSupported): Deleted.
(WTR::AccessibilityUIElement::isDecrementActionSupported): Deleted.
(WTR::AccessibilityUIElement::isEnabled): Deleted.
(WTR::AccessibilityUIElement::isRequired const): Deleted.
(WTR::AccessibilityUIElement::isFocused const): Deleted.
(WTR::AccessibilityUIElement::isSelected const): Deleted.
(WTR::AccessibilityUIElement::isSelectedOptionActive const): Deleted.
(WTR::AccessibilityUIElement::isExpanded const): Deleted.
(WTR::AccessibilityUIElement::isChecked const): Deleted.
(WTR::AccessibilityUIElement::isIndeterminate const): Deleted.
(WTR::AccessibilityUIElement::hierarchicalLevel const): Deleted.
(WTR::AccessibilityUIElement::speakAs): Deleted.
(WTR::AccessibilityUIElement::ariaIsGrabbed const): Deleted.
(WTR::AccessibilityUIElement::ariaDropEffects const): Deleted.
(WTR::AccessibilityUIElement::lineForIndex): Deleted.
(WTR::AccessibilityUIElement::rangeForLine): Deleted.
(WTR::AccessibilityUIElement::rangeForPosition): Deleted.
(WTR::AccessibilityUIElement::boundsForRange): Deleted.
(WTR::AccessibilityUIElement::stringForRange): Deleted.
(WTR::AccessibilityUIElement::attributedStringForRange): Deleted.
(WTR::AccessibilityUIElement::attributedStringRangeIsMisspelled): Deleted.
(WTR::AccessibilityUIElement::uiElementCountForSearchPredicate): Deleted.
(WTR::AccessibilityUIElement::uiElementForSearchPredicate): Deleted.
(WTR::AccessibilityUIElement::selectTextWithCriteria): Deleted.
(WTR::AccessibilityUIElement::attributesOfColumnHeaders): Deleted.
(WTR::AccessibilityUIElement::attributesOfRowHeaders): Deleted.
(WTR::AccessibilityUIElement::attributesOfColumns): Deleted.
(WTR::AccessibilityUIElement::attributesOfRows): Deleted.
(WTR::AccessibilityUIElement::attributesOfVisibleCells): Deleted.
(WTR::AccessibilityUIElement::attributesOfHeader): Deleted.
(WTR::AccessibilityUIElement::rowCount): Deleted.
(WTR::AccessibilityUIElement::columnCount): Deleted.
(WTR::AccessibilityUIElement::indexInTable): Deleted.
(WTR::AccessibilityUIElement::rowIndexRange): Deleted.
(WTR::AccessibilityUIElement::columnIndexRange): Deleted.
(WTR::AccessibilityUIElement::cellForColumnAndRow): Deleted.
(WTR::AccessibilityUIElement::horizontalScrollbar const): Deleted.
(WTR::AccessibilityUIElement::verticalScrollbar const): Deleted.
(WTR::AccessibilityUIElement::selectedTextRange): Deleted.
(WTR::AccessibilityUIElement::setSelectedTextRange): Deleted.
(WTR::AccessibilityUIElement::increment): Deleted.
(WTR::AccessibilityUIElement::decrement): Deleted.
(WTR::AccessibilityUIElement::showMenu): Deleted.
(WTR::AccessibilityUIElement::press): Deleted.
(WTR::AccessibilityUIElement::setSelectedChild const): Deleted.
(WTR::AccessibilityUIElement::setSelectedChildAtIndex const): Deleted.
(WTR::AccessibilityUIElement::removeSelectionAtIndex const): Deleted.
(WTR::AccessibilityUIElement::clearSelectedChildren const): Deleted.
(WTR::AccessibilityUIElement::accessibilityValue const): Deleted.
(WTR::AccessibilityUIElement::documentEncoding): Deleted.
(WTR::AccessibilityUIElement::documentURI): Deleted.
(WTR::AccessibilityUIElement::url): Deleted.
(WTR::AccessibilityUIElement::addNotificationListener): Deleted.
(WTR::AccessibilityUIElement::removeNotificationListener): Deleted.
(WTR::AccessibilityUIElement::isFocusable const): Deleted.
(WTR::AccessibilityUIElement::isSelectable const): Deleted.
(WTR::AccessibilityUIElement::isMultiSelectable const): Deleted.
(WTR::AccessibilityUIElement::isVisible const): Deleted.
(WTR::AccessibilityUIElement::isOffScreen const): Deleted.
(WTR::AccessibilityUIElement::isCollapsed const): Deleted.
(WTR::AccessibilityUIElement::isIgnored const): Deleted.
(WTR::AccessibilityUIElement::isSingleLine const): Deleted.
(WTR::AccessibilityUIElement::isMultiLine const): Deleted.
(WTR::AccessibilityUIElement::hasPopup const): Deleted.
(WTR::AccessibilityUIElement::takeFocus): Deleted.
(WTR::AccessibilityUIElement::takeSelection): Deleted.
(WTR::AccessibilityUIElement::addSelection): Deleted.
(WTR::AccessibilityUIElement::removeSelection): Deleted.
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Deleted.
(WTR::AccessibilityUIElement::textMarkerRangeForElement): Deleted.
(WTR::AccessibilityUIElement::textMarkerRangeLength): Deleted.
(WTR::AccessibilityUIElement::previousTextMarker): Deleted.
(WTR::AccessibilityUIElement::nextTextMarker): Deleted.
(WTR::AccessibilityUIElement::stringForTextMarkerRange): Deleted.
(WTR::AccessibilityUIElement::rectsForTextMarkerRange): Deleted.
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Deleted.
(WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange): Deleted.
(WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange): Deleted.
(WTR::AccessibilityUIElement::endTextMarkerForBounds): Deleted.
(WTR::AccessibilityUIElement::startTextMarkerForBounds): Deleted.
(WTR::AccessibilityUIElement::textMarkerForPoint): Deleted.
(WTR::AccessibilityUIElement::accessibilityElementForTextMarker): Deleted.
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange): Deleted.
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Deleted.
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute): Deleted.
(WTR::AccessibilityUIElement::indexForTextMarker): Deleted.
(WTR::AccessibilityUIElement::isTextMarkerValid): Deleted.
(WTR::AccessibilityUIElement::textMarkerForIndex): Deleted.
(WTR::AccessibilityUIElement::startTextMarker): Deleted.
(WTR::AccessibilityUIElement::endTextMarker): Deleted.
(WTR::AccessibilityUIElement::setSelectedTextMarkerRange): Deleted.
(WTR::AccessibilityUIElement::scrollToMakeVisible): Deleted.
(WTR::AccessibilityUIElement::scrollToGlobalPoint): Deleted.
(WTR::AccessibilityUIElement::scrollToMakeVisibleWithSubFocus): Deleted.
(WTR::AccessibilityUIElement::supportedActions const): Deleted.
(WTR::AccessibilityUIElement::pathDescription const): Deleted.
(WTR::AccessibilityUIElement::mathPostscriptsDescription const): Deleted.
(WTR::AccessibilityUIElement::mathPrescriptsDescription const): Deleted.
(WTR::AccessibilityUIElement::classList const): Deleted.
(WTR::stringAtOffset): Deleted.
(WTR::AccessibilityUIElement::characterAtOffset): Deleted.
(WTR::AccessibilityUIElement::wordAtOffset): Deleted.
(WTR::AccessibilityUIElement::lineAtOffset): Deleted.
(WTR::AccessibilityUIElement::sentenceAtOffset): Deleted.
(WTR::AccessibilityUIElement::replaceTextInRange): Deleted.
(WTR::AccessibilityUIElement::insertText): Deleted.
(WTR::AccessibilityUIElement::popupValue const): Deleted.

  • WebKitTestRunner/PlatformGTK.cmake:
  • WebKitTestRunner/PlatformWPE.cmake:
  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::defaults):

LayoutTests:

  • accessibility/gtk/aria-modal-state-exposed-expected.txt:
  • accessibility/gtk/aria-modal-state-exposed.html:
  • accessibility/gtk/name-from-label-expected.txt:
  • accessibility/gtk/name-from-label.html:
  • accessibility/gtk/object-attributes-expected.txt:
  • accessibility/gtk/object-attributes.html:
  • accessibility/language-attribute.html:
5:33 AM Changeset in webkit [291612] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

[GLIB] Use a static string for default application name
https://bugs.webkit.org/show_bug.cgi?id=238124

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

  • platform/glib/ApplicationGLib.cpp:

(WebCore::getApplicationName):

  • platform/glib/ApplicationGLib.h:
3:36 AM Changeset in webkit [291611] by youenn@apple.com
  • 91 edits in trunk/Source

Move RealtimeMediaSource::VideoSampleObserver::videoSampleAvailable to VideoFrame
https://bugs.webkit.org/show_bug.cgi?id=237884

Reviewed by Eric Carlson.

Source/WebCore:

Refactoring to do the following:

  • Renaming of VideoSampleObserver to VideoFrameObserver, videoSampleAvailable to videoFrameAvailable...
  • videoFrameAvailable takes a VideoFrame instead of a MediaSample
  • Use VideoFrame::rotation and VideoFrame::isMirrored.
  • Use VideoFrame::Rotation instead of MediaSample::VideoRotation

Update code according this renaming.
Move from using MediaSample to VideoFrame where it makes sense.

Prepare for removal of MediaSample as parent class of VideoFrame.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
  • html/canvas/WebGLRenderingContextBase.cpp:
  • platform/MediaSample.h:
  • platform/VideoFrame.cpp:
  • platform/VideoFrame.h:
  • platform/graphics/avfoundation/SampleBufferDisplayLayer.h:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:
  • platform/graphics/cv/ImageRotationSessionVT.h:
  • platform/graphics/cv/ImageRotationSessionVT.mm:
  • platform/graphics/cv/ImageTransferSessionVT.h:
  • platform/graphics/cv/ImageTransferSessionVT.mm:
  • platform/graphics/cv/VideoFrameCV.h:
  • platform/graphics/cv/VideoFrameCV.mm:
  • platform/graphics/gstreamer/VideoFrameGStreamer.cpp:
  • platform/graphics/gstreamer/VideoFrameGStreamer.h:
  • platform/mediarecorder/MediaRecorderPrivate.h:
  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
  • platform/mediarecorder/MediaRecorderPrivateMock.cpp:
  • platform/mediarecorder/MediaRecorderPrivateMock.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
  • platform/mediastream/RealtimeMediaSource.cpp:
  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeOutgoingVideoSource.cpp:
  • platform/mediastream/RealtimeOutgoingVideoSource.h:
  • platform/mediastream/RealtimeVideoCaptureSource.cpp:
  • platform/mediastream/RealtimeVideoCaptureSource.h:
  • platform/mediastream/RealtimeVideoSource.cpp:
  • platform/mediastream/RealtimeVideoSource.h:
  • platform/mediastream/VideoPreset.h:
  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.cpp:
  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.h:
  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp:
  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h:
  • platform/mediastream/ios/ReplayKitCaptureSource.mm:
  • platform/mediastream/libwebrtc/VideoFrameLibWebRTC.cpp:
  • platform/mediastream/libwebrtc/VideoFrameLibWebRTC.h:
  • platform/mediastream/libwebrtc/gstreamer/RealtimeIncomingVideoSourceLibWebRTC.cpp:
  • platform/mediastream/libwebrtc/gstreamer/RealtimeOutgoingVideoSourceLibWebRTC.cpp:
  • platform/mediastream/libwebrtc/gstreamer/RealtimeOutgoingVideoSourceLibWebRTC.h:
  • platform/mediastream/mac/AVVideoCaptureSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:
  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
  • platform/mock/MockRealtimeVideoSource.cpp:
  • platform/mock/MockRealtimeVideoSource.h:
  • testing/Internals.cpp:
  • testing/Internals.h:

Source/WebKit:

Move from using MediaSample to VideoFrame directly.

  • GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.cpp:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:
  • GPUProcess/webrtc/RemoteMediaRecorder.h:
  • GPUProcess/webrtc/RemoteMediaRecorder.messages.in:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
  • WebProcess/GPU/media/RemoteVideoFrameProxy.cpp:
  • WebProcess/GPU/media/RemoteVideoFrameProxy.h:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:
  • WebProcess/GPU/webrtc/SharedVideoFrame.cpp:
  • WebProcess/GPU/webrtc/SharedVideoFrame.h:
  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:
  • WebProcess/cocoa/RemoteCaptureSampleManager.h:
  • WebProcess/cocoa/RemoteCaptureSampleManager.messages.in:
  • WebProcess/cocoa/RemoteRealtimeVideoSource.h:
3:18 AM Changeset in webkit [291610] by commit-queue@webkit.org
  • 5 edits
    1 copy in trunk/Source/WebCore

[TextureMapper] Split GraphicsContextGLTextureMapper into two classes
https://bugs.webkit.org/show_bug.cgi?id=238141

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-03-22
Reviewed by Alejandro G. Castro.

Split GraphicsContextGLTextureMapper into two distinct classes. The
current class unconditionally inherits from GraphicsContextGLOpenGL, and
the new GraphicsContextGLTextureMapperANGLE inherits from
GraphicsContextGLANGLE. This reduces complexity and avoids the
implementation to span across two separate files. The two classes can
also be developed independently, with more changes and cleanups already
planned for the ANGLE variant.

No new tests due to no actual change in behavior.

  • platform/TextureMapper.cmake:
  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

(WebCore::createWebProcessGraphicsContextGL):
(WebCore::GraphicsContextGLTextureMapper::create):
(WebCore::GraphicsContextGLTextureMapper::GraphicsContextGLTextureMapper):
(WebCore::GraphicsContextGLTextureMapper::layerContentsDisplayDelegate):
(WebCore::GraphicsContextGLTextureMapper::copyTextureFromMedia):
(WebCore::GraphicsContextGLTextureMapper::paintCompositedResultsToVideoFrame):
(WebCore::GraphicsContextGLTextureMapper::platformInitialize):

  • platform/graphics/texmap/GraphicsContextGLTextureMapper.h:
  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLANGLE::platformDisplay const):
(WebCore::GraphicsContextGLANGLE::platformConfig const):
(WebCore::GraphicsContextGLANGLE::makeContextCurrent):
(WebCore::GraphicsContextGLANGLE::checkGPUStatus):
(WebCore::GraphicsContextGLANGLE::platformReleaseThreadResources):
(WebCore::GraphicsContextGLANGLE::readCompositedResults):
(WebCore::createWebProcessGraphicsContextGL):
(WebCore::GraphicsContextGLTextureMapperANGLE::create):
(WebCore::GraphicsContextGLTextureMapperANGLE::GraphicsContextGLTextureMapperANGLE):
(WebCore::GraphicsContextGLTextureMapperANGLE::~GraphicsContextGLTextureMapperANGLE):
(WebCore::GraphicsContextGLTextureMapperANGLE::layerContentsDisplayDelegate):
(WebCore::GraphicsContextGLTextureMapperANGLE::copyTextureFromMedia):
(WebCore::GraphicsContextGLTextureMapperANGLE::paintCompositedResultsToVideoFrame):
(WebCore::GraphicsContextGLTextureMapperANGLE::platformInitializeContext):
(WebCore::GraphicsContextGLTextureMapperANGLE::platformInitialize):
(WebCore::GraphicsContextGLTextureMapperANGLE::setContextVisibility):
(WebCore::GraphicsContextGLTextureMapperANGLE::reshapeDisplayBufferBacking):
(WebCore::GraphicsContextGLTextureMapperANGLE::prepareForDisplay):
(WebCore::GraphicsContextGLTextureMapper::platformInitializeContext): Deleted.
(WebCore::GraphicsContextGLTextureMapper::platformInitialize): Deleted.
(WebCore::GraphicsContextGLTextureMapper::setContextVisibility): Deleted.
(WebCore::GraphicsContextGLTextureMapper::prepareForDisplay): Deleted.
(WebCore::GraphicsContextGLTextureMapper::reshapeDisplayBufferBacking): Deleted.

  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.h: Copied from Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.h.
2:43 AM Changeset in webkit [291609] by Ziran Sun
  • 16 edits in trunk

[selection] Change form's selection attribute to unsigned long
https://bugs.webkit.org/show_bug.cgi?id=237951

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update test expectations as more sub-tests are now passing.

  • web-platform-tests/html/semantics/forms/textfieldselection/selection-expected.txt:
  • web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt:
  • web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange-expected.txt:

Source/WebCore:

We should change the type of attribute "selectionStart" and "selectionEnd"
from long to unsigned long. Also "start" and "end" parameters in function
selectionRange() need to be changed correspondingly.

This change is in line with Chromium CL at
https://github.com/chromium/chromium/commit/b6ff6db1c5683b5e564a72b0941ad504b410d1af

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setDefaultSelectionAfterFocus):
(WebCore::HTMLInputElement::selectionStartForBindings const):
(WebCore::HTMLInputElement::setSelectionStartForBindings):
(WebCore::HTMLInputElement::selectionEndForBindings const):
(WebCore::HTMLInputElement::setSelectionEndForBindings):
(WebCore::HTMLInputElement::setSelectionRangeForBindings):

  • html/HTMLInputElement.h:
  • html/HTMLInputElement.idl:
  • html/HTMLTextAreaElement.idl:
  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
(WebCore::HTMLTextFormControlElement::setSelectionStart):
(WebCore::HTMLTextFormControlElement::setSelectionEnd):
(WebCore::HTMLTextFormControlElement::select):
(WebCore::HTMLTextFormControlElement::setSelectionRange):
(WebCore::HTMLTextFormControlElement::selectionStart const):
(WebCore::HTMLTextFormControlElement::computeSelectionStart const):
(WebCore::HTMLTextFormControlElement::selectionEnd const):
(WebCore::HTMLTextFormControlElement::computeSelectionEnd const):

  • html/HTMLTextFormControlElement.h:

(WebCore::HTMLTextFormControlElement::cacheSelection):
(WebCore::HTMLTextFormControlElement::hasCachedSelection const):

LayoutTests:

Update test accordingly. This is inline with Chromium.

Note that for selection-start-end-readonly.html, two sub-tests
are now failing. This is the right behaviour since the test assumes
types for selectionStart and selectionEnd as "int". We could modify the
test and make the type as unsigned. Interestingly the test script's
format is strange and it seems having "return" for each line. Simply updating
some lines on the test scripts causes errors when applying the patch. We have
decided to address this test in a separate patch (maybe remove the file and added
a new one with proper format).

  • fast/forms/input-appearance-selection.html:
  • fast/forms/selection-functions-expected.txt:
  • fast/forms/selection-start-end-readonly-expected.txt:
1:51 AM Changeset in webkit [291608] by Diego Pino Garcia
  • 4 edits in trunk/Source

Source/WebCore:
Unreviewed, fix non-unified build after r291597

  • css/typedom/CSSNumericValue.cpp:

Source/WebKit:
Unreviewed, fix non-unified build after r291589

  • NetworkProcess/NetworkBroadcastChannelRegistry.cpp:
1:14 AM Changeset in webkit [291607] by mmaxfield@apple.com
  • 2 edits in trunk/Tools

Squelch warning message from output of build-jsc
https://bugs.webkit.org/show_bug.cgi?id=238177

Reviewed by Saam Barati.

There was a "prototype mismatch" error.

  • Scripts/webkitperl/BuildSubproject.pm:
12:44 AM Changeset in webkit [291606] by youenn@apple.com
  • 6 edits in trunk

Website policies are not respected when doing COOP based process swap
https://bugs.webkit.org/show_bug.cgi?id=238036
<rdar://89616625>

Reviewed by Chris Dumez.

Source/WebKit:

In case of normal process swap, we make use of website policies so everything is fine.
For COOP based process swap, this happens later on, at a point where we lost website policies.
To overcome this, we store the website policies used by a navigation inside the API::Navigation object.
It is used by continueNavigationInNewProcess to correctly initialize the new WebPage website policies.
We then set the website policies in the navigation object just before continuing the load in the same process,
as process swap may happen later when inspecting the response.
Minor refactoring in continueNavigationInNewProcess to get the policies directly from the given Navigation object.
Minor refactoring in receivedNavigationPolicyDecision to make the code doing process swap clearer.

Covered by API test.

  • UIProcess/API/APINavigation.h:

(API::Navigation::setWebsitePoliciesForProcessSwap):
(API::Navigation::takeWebsitePoliciesForProcessSwap):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation):

  • UIProcess/WebPageProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
12:21 AM Changeset in webkit [291605] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Adjust anchor/focus nodes after removal when LiveRangeSelection is enabled
https://bugs.webkit.org/show_bug.cgi?id=238004

Patch by Frédéric Wang <fwang@igalia.com> on 2022-03-22
Reviewed by Ryosuke Niwa.

This patch ensures that FrameSelection::nodeWillBeRemoved adjusts m_anchor and m_focus
when corresponding nodes are removed from the DOM tree. There are no behavior changes
when live range is disabled.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::nodeWillBeRemoved): When live range is enabled,
Ensure that anchor nodes are updated even when the selection is none and pass information
about whether anchor or focus are removed by the node removal.
(WebCore::FrameSelection::respondToNodeModification): Adjust anchor and focus if they
are removed, when live range is enabled.

  • editing/FrameSelection.h: Add arguments for anchor and focus.

Mar 21, 2022:

10:26 PM Changeset in webkit [291604] by Said Abou-Hallawa
  • 46 edits
    2 adds in trunk

[GPU Process] Make GraphicsContextState keep track of changes till they are applied
https://bugs.webkit.org/show_bug.cgi?id=238066
rdar://90585183

Reviewed by Simon Fraser.

Source/WebCore:

A member of type GraphicsContextState::ChangeFlags will be added to
GraphicsContextState to keep track of what has changes since it was last
applied. So we can eliminate the struct GraphicsContextStateChange.

We will have to have a single member for every GraphicsContextState::Change.

  1. So we will combine the color, the pattern, the gradient and the gradient space transform in one class called 'SourceBrush'.
  1. We will combine the shadow offset, the shadow blurRadius, the shadow color and the radius mode in one struct called 'DropShadow'
  1. And we will combine the CompositeOperator and the BledMode in one struct called 'CompositeMode'.

GraphicsContextState will handle setting its members, its encoding and
decoding and its streaming to text.

Adding a transparency layer in CG sets the global alpha to 1. We need to
sync the member GraphicsContextState.alpha with the platform alpha when
we beginTransparencyLayer() and when we endTransparencyLayer().

DisplayList::Recorder will keep its stack of GraphicsContextState. The
difference between the state of GraphicsContext and the state of the
Recorder is we eagerly apply the former to the platform context but we
lazily record the changes of the later. Recorder::didUpdateState()
overrides the base class method to just merge the changes from the base
class GraphicsContext::m_state to Recorder::currentState().state.
Recorder::appendStateChangeItem() records the accumulated changes in the
currentState() since the last drawing.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/BifurcatedGraphicsContext.cpp:

(WebCore::BifurcatedGraphicsContext::beginTransparencyLayer):
(WebCore::BifurcatedGraphicsContext::endTransparencyLayer):
(WebCore::BifurcatedGraphicsContext::didUpdateState):

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

(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::updateState):
(WebCore::GraphicsContext::getShadow const):
(WebCore::GraphicsContext::setStrokeColor): Deleted.
(WebCore::GraphicsContext::setShadow): Deleted.
(WebCore::GraphicsContext::clearShadow): Deleted.
(WebCore::GraphicsContext::setFillColor): Deleted.
(WebCore::GraphicsContext::setStrokePattern): Deleted.
(WebCore::GraphicsContext::setFillPattern): Deleted.
(WebCore::GraphicsContext::setStrokeGradient): Deleted.
(WebCore::GraphicsContext::setFillGradient): Deleted.
(WebCore::GraphicsContext::setCompositeOperation): Deleted.

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::fillColor const):
(WebCore::GraphicsContext::fillGradient const):
(WebCore::GraphicsContext::fillGradientSpaceTransform const):
(WebCore::GraphicsContext::fillPattern const):
(WebCore::GraphicsContext::setFillBrush):
(WebCore::GraphicsContext::setFillColor):
(WebCore::GraphicsContext::setFillGradient):
(WebCore::GraphicsContext::setFillPattern):
(WebCore::GraphicsContext::fillRule const):
(WebCore::GraphicsContext::setFillRule):
(WebCore::GraphicsContext::strokeColor const):
(WebCore::GraphicsContext::strokeGradient const):
(WebCore::GraphicsContext::strokeGradientSpaceTransform const):
(WebCore::GraphicsContext::strokePattern const):
(WebCore::GraphicsContext::setStrokeBrush):
(WebCore::GraphicsContext::setStrokeColor):
(WebCore::GraphicsContext::setStrokeGradient):
(WebCore::GraphicsContext::setStrokePattern):
(WebCore::GraphicsContext::strokeThickness const):
(WebCore::GraphicsContext::setStrokeThickness):
(WebCore::GraphicsContext::strokeStyle const):
(WebCore::GraphicsContext::setStrokeStyle):
(WebCore::GraphicsContext::dropShadow const):
(WebCore::GraphicsContext::shadowOffset const):
(WebCore::GraphicsContext::shadowBlur const):
(WebCore::GraphicsContext::shadowColor const):
(WebCore::GraphicsContext::setDropShadow):
(WebCore::GraphicsContext::setShadow):
(WebCore::GraphicsContext::clearShadow):
(WebCore::GraphicsContext::hasVisibleShadow const):
(WebCore::GraphicsContext::hasBlurredShadow const):
(WebCore::GraphicsContext::hasShadow const):
(WebCore::GraphicsContext::compositeMode const):
(WebCore::GraphicsContext::compositeOperation const):
(WebCore::GraphicsContext::blendMode const):
(WebCore::GraphicsContext::setCompositeMode):
(WebCore::GraphicsContext::setCompositeOperation):
(WebCore::GraphicsContext::alpha const):
(WebCore::GraphicsContext::setAlpha):
(WebCore::GraphicsContext::textDrawingMode const):
(WebCore::GraphicsContext::setTextDrawingMode):
(WebCore::GraphicsContext::imageInterpolationQuality const):
(WebCore::GraphicsContext::setImageInterpolationQuality):
(WebCore::GraphicsContext::setShouldAntialias):
(WebCore::GraphicsContext::setShouldSmoothFonts):
(WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts):
(WebCore::GraphicsContext::shadowsIgnoreTransforms const):
(WebCore::GraphicsContext::setShadowsIgnoreTransforms):
(WebCore::GraphicsContext::setDrawLuminanceMask):
(WebCore::GraphicsContext::setUseDarkAppearance):
(WebCore::GraphicsContext::blendModeOperation const): Deleted.

  • platform/graphics/GraphicsContextState.cpp:

(WebCore::GraphicsContextState::GraphicsContextState):
(WebCore::GraphicsContextState::hasOnlyPrimitiveChanges const):
(WebCore::GraphicsContextState::mergeChanges):
(WebCore::GraphicsContextState::didBeginTransparencyLayer):
(WebCore::GraphicsContextState::didEndTransparencyLayer):
(WebCore::stateChangeName):
(WebCore::GraphicsContextState::dump const):
(WebCore::operator<<):
(WebCore::GraphicsContextStateChange::changesFromState const): Deleted.
(WebCore::GraphicsContextStateChange::accumulate): Deleted.
(WebCore::GraphicsContextStateChange::apply const): Deleted.
(WebCore::GraphicsContextStateChange::dump const): Deleted.

  • platform/graphics/GraphicsContextState.h:

(WebCore::GraphicsContextState::GraphicsContextState):
(WebCore::GraphicsContextState::changes const):
(WebCore::GraphicsContextState::didApplyChanges):
(WebCore::GraphicsContextState::setFillBrush):
(WebCore::GraphicsContextState::setFillColor):
(WebCore::GraphicsContextState::setFillGradient):
(WebCore::GraphicsContextState::setFillPattern):
(WebCore::GraphicsContextState::setFillRule):
(WebCore::GraphicsContextState::setStrokeBrush):
(WebCore::GraphicsContextState::setStrokeColor):
(WebCore::GraphicsContextState::setStrokeGradient):
(WebCore::GraphicsContextState::setStrokePattern):
(WebCore::GraphicsContextState::setStrokeThickness):
(WebCore::GraphicsContextState::setStrokeStyle):
(WebCore::GraphicsContextState::setCompositeMode):
(WebCore::GraphicsContextState::setDropShadow):
(WebCore::GraphicsContextState::setAlpha):
(WebCore::GraphicsContextState::setImageInterpolationQuality):
(WebCore::GraphicsContextState::setTextDrawingMode):
(WebCore::GraphicsContextState::setShouldAntialias):
(WebCore::GraphicsContextState::setShouldSmoothFonts):
(WebCore::GraphicsContextState::setShouldSubpixelQuantizeFonts):
(WebCore::GraphicsContextState::setShadowsIgnoreTransforms):
(WebCore::GraphicsContextState::setDrawLuminanceMask):
(WebCore::GraphicsContextState::setUseDarkAppearance):
(WebCore::GraphicsContextState::setProperty):
(WebCore::GraphicsContextState::encode const):
(WebCore::GraphicsContextState::decode):
(WebCore::GraphicsContextStateChange::GraphicsContextStateChange): Deleted.

  • platform/graphics/GraphicsTypes.cpp:

(WebCore::operator<<):

  • platform/graphics/GraphicsTypes.h:

(WebCore::CompositeMode::operator==):
(WebCore::CompositeMode::encode const):
(WebCore::CompositeMode::decode):
(WebCore::DropShadow::isVisible const):
(WebCore::DropShadow::isBlurred const):
(WebCore::DropShadow::hasOutsets const):
(WebCore::operator==):
(WebCore::DropShadow::encode const):
(WebCore::DropShadow::decode):

  • platform/graphics/NullGraphicsContext.h:
  • platform/graphics/ShadowBlur.cpp:

(WebCore::ShadowBlur::ShadowBlur):

  • platform/graphics/ShadowBlur.h:
  • platform/graphics/SourceBrush.cpp: Added.

(WebCore::SourceBrush::SourceBrush):
(WebCore::SourceBrush::gradientSpaceTransform const):
(WebCore::SourceBrush::gradient const):
(WebCore::SourceBrush::pattern const):
(WebCore::SourceBrush::setGradient):
(WebCore::SourceBrush::setPattern):
(WebCore::operator<<):

  • platform/graphics/SourceBrush.h: Added.

(WebCore::SourceBrush::color const):
(WebCore::SourceBrush::setColor):
(WebCore::SourceBrush::brush const):
(WebCore::SourceBrush::setGradient):
(WebCore::SourceBrush::isPrimitive const):
(WebCore::operator==):
(WebCore::SourceBrush::Brush::LogicalGradient::encode const):
(WebCore::SourceBrush::Brush::LogicalGradient::decode):
(WebCore::SourceBrush::Brush::encode const):
(WebCore::SourceBrush::Brush::decode):
(WebCore::SourceBrush::encode const):
(WebCore::SourceBrush::decode):

  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::FillSource::FillSource):
(WebCore::Cairo::StrokeSource::StrokeSource):
(WebCore::Cairo::ShadowState::ShadowState):

  • platform/graphics/cairo/FontCairo.cpp:

(WebCore::FontCascade::drawGlyphs):

  • platform/graphics/cairo/GradientCairo.cpp:

(WebCore::Gradient::fill):

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContextCairo::drawRect):
(WebCore::GraphicsContextCairo::drawLine):
(WebCore::GraphicsContextCairo::drawEllipse):
(WebCore::GraphicsContextCairo::fillRect):
(WebCore::GraphicsContextCairo::drawLinesForText):
(WebCore::GraphicsContextCairo::didUpdateState):
(WebCore::GraphicsContextCairo::drawGlyphs):

  • platform/graphics/cairo/GraphicsContextCairo.h:
  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::GraphicsContextCG::GraphicsContextCG):
(WebCore::GraphicsContextCG::drawNativeImage):
(WebCore::GraphicsContextCG::applyStrokePattern):
(WebCore::GraphicsContextCG::applyFillPattern):
(WebCore::calculateDrawingMode):
(WebCore::GraphicsContextCG::drawPath):
(WebCore::GraphicsContextCG::fillPath):
(WebCore::GraphicsContextCG::strokePath):
(WebCore::GraphicsContextCG::fillRect):
(WebCore::GraphicsContextCG::fillRoundedRectImpl):
(WebCore::GraphicsContextCG::fillRectWithRoundedHole):
(WebCore::GraphicsContextCG::beginTransparencyLayer):
(WebCore::applyShadowOffsetWorkaroundIfNeeded):
(WebCore::setCGShadow):
(WebCore::GraphicsContextCG::didUpdateState):
(WebCore::GraphicsContextCG::strokeRect):
(WebCore::GraphicsContextCG::fillEllipse):
(WebCore::GraphicsContextCG::strokeEllipse):

  • platform/graphics/cg/GraphicsContextCG.h:
  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:

(WebCore::DrawGlyphsRecorder::populateInternalState):
(WebCore::DrawGlyphsRecorder::populateInternalContext):
(WebCore::DrawGlyphsRecorder::concludeInternalContext):
(WebCore::DrawGlyphsRecorder::updateFillBrush):
(WebCore::DrawGlyphsRecorder::updateStrokeBrush):
(WebCore::DrawGlyphsRecorder::updateCTM):
(WebCore::DrawGlyphsRecorder::updateShadow):
(WebCore::DrawGlyphsRecorder::recordDrawGlyphs):
(WebCore::DrawGlyphsRecorder::updateFillColor): Deleted.
(WebCore::DrawGlyphsRecorder::updateStrokeColor): Deleted.
(WebCore::shadowIsCleared): Deleted.

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::shouldDumpForFlags):

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::SetState::SetState):
(WebCore::DisplayList::SetState::apply):
(WebCore::DisplayList::operator<<):

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::SetState::state const):
(WebCore::DisplayList::SetState::encode const):
(WebCore::DisplayList::SetState::decode):
(WebCore::DisplayList::SetState::stateChange const): Deleted.
(WebCore::DisplayList::SetState::stateChange): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::appendStateChangeItem):
(WebCore::DisplayList::Recorder::appendStateChangeItemIfNecessary):
(WebCore::DisplayList::Recorder::state const):
(WebCore::DisplayList::Recorder::didUpdateState):
(WebCore::DisplayList::Recorder::save):
(WebCore::DisplayList::Recorder::restore):
(WebCore::DisplayList::Recorder::beginTransparencyLayer):
(WebCore::DisplayList::Recorder::endTransparencyLayer):
(WebCore::DisplayList::containsOnlyInlineStateChanges): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.h:

(WebCore::DisplayList::Recorder::ContextState::ContextState):
(WebCore::DisplayList::Recorder::ContextState::cloneForTransparencyLayer const):
(WebCore::DisplayList::Recorder::ContextState::cloneForSave const): Deleted.

  • platform/graphics/displaylists/DisplayListRecorderImpl.cpp:

(WebCore::DisplayList::RecorderImpl::recordSetState):

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

(WebCore::DisplayList::applySetStateItem):

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:

(Nicosia::CairoOperationRecorder::didUpdateState):
(Nicosia::CairoOperationRecorder::fillRect):
(Nicosia::CairoOperationRecorder::fillRoundedRect):
(Nicosia::CairoOperationRecorder::drawGlyphs):
(Nicosia::CairoOperationRecorder::drawRect):
(Nicosia::CairoOperationRecorder::drawLine):
(Nicosia::CairoOperationRecorder::drawLinesForText):
(Nicosia::CairoOperationRecorder::drawEllipse):

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
  • rendering/svg/RenderSVGPath.cpp:

(WebCore::useStrokeStyleToFill):

Source/WebKit:

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::setState):

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:

(WebKit::RemoteDisplayListRecorderProxy::recordSetState):

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

Tools:

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

(TestWebKitAPI::TEST):

LayoutTests:

  • displaylists/extent-includes-shadow-expected.txt:
  • displaylists/extent-includes-transforms-expected.txt:
  • displaylists/layer-dispay-list-expected.txt:
  • gpu-process/TestExpectations:
9:26 PM Changeset in webkit [291603] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] Change Date.parse to stop returning numbers with fractional part
https://bugs.webkit.org/show_bug.cgi?id=238050

Reviewed by Saam Barati.

JSTests:

  • stress/date-parse-timeclip.js: Added.

(shouldBe):

Source/JavaScriptCore:

Date.parse should return NaN or integer numbers[1,2]. This patch applies timeClip
to the result of Date.parse to ensure that the returned value is time value.

[1]: https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-date.parse
[2]: https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-time-values-and-time-range

  • runtime/DateConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

8:54 PM Changeset in webkit [291602] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix bug in Relationship::mergeImpl
https://bugs.webkit.org/show_bug.cgi?id=238183
<rdar://89822922>

Reviewed by Yusuke Suzuki.

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
8:52 PM Changeset in webkit [291601] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

AirFixObviousSpills needs to consider a PreIndex and PostIndex as clobbering the Reg used for indexing
https://bugs.webkit.org/show_bug.cgi?id=238178
<rdar://87345895>

Reviewed by Mark Lam.

Inside AirFixObviousSpills, we run a basic alias analysis for StackSlots and
registers. For example, when we overwrite a register, we clear anything
it's aliased with. However, the way we were doing this was by looking at
each Arg that was Defd. However, this iteration was missing that
PostIndex/PreIndex mutate the register that feeds into the address Arg.
This patch fixes the issue by walking the instruction in such a way that
we visit all the Defs we care about, both Regs and StackSlots.

  • b3/air/AirFixObviousSpills.cpp:
8:49 PM Changeset in webkit [291600] by Tyler Wilcock
  • 12 edits
    3 copies
    1 move
    8 adds
    2 deletes in trunk

AX: AccessibilityObject::visibleCharacterRange is extremely slow when called on objects with lots of text
https://bugs.webkit.org/show_bug.cgi?id=237678

Reviewed by Andres Gonzalez.

Source/WebCore:

AccessibilityObject::visibleCharacterRange is extremely slow when
called on objects with lots of text. For example, trying to enter a
large contenteditable element with VoiceOver causes "Safari not
responding" because WebKit is so slow to return this data.

This patch fixes this in two ways. First, we optimize computation of
the end boundary point by grabbing previous line start positions in
batches and binary searching within each batch to find the correct
value.

I tried to apply this algorithm to the computation of the start
boundary, but that regressed performance for small and medium text
objects, and didn't yield any noticeable improvement for large text
objects. Keeping start boundary computation as-is while changing the
end boundary computation provided the best performance at all text
sizes.

Second, this patch caches visibleCharacterRange results, as the same
inputs to this function will always yield the same output. It's common
for this data to be requested multiple times without any change in
page state (e.g. scrolling), so caching further improves performance
by a lot.

Additional testcases added to accessibility/visible-character-range.html to
ensure behavior is correct.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::previousLineStartBoundaryPoints const): Added.
(WebCore::AccessibilityObject::lastBoundaryPointContainedInRect const): Added.
(WebCore::AccessibilityObject::boundaryPointsContainedInRect const): Added.
(WebCore::AccessibilityObject::visibleCharacterRange const):
Wraps visibleCharacterRangeInternal to handle caching.
(WebCore::AccessibilityObject::visibleCharacterRangeInternal const):
(WebCore::AccessibilityObject::previousLineStartPositionInternal const): Added.
(WebCore::AccessibilityObject::previousLineStartPosition const):
Wraps previousLineStartPositionInternal to return default
VisualPosition if it returns std::nullopt (existing callers expect this behavior)

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::lastBoundaryPointContainedInRect const): Added.

  • dom/BoundaryPoint.cpp:

(WebCore::operator<<):

  • dom/BoundaryPoint.h:

Added implementation of operator<< to make debugging boundary points easier.

LayoutTests:

Add many new visible character range testcases split across four new tests.

  • accessibility/visible-character-range-basic.html: Added.
  • accessibility/visible-character-range-height-changes.html: Added.
  • accessibility/visible-character-range-scrolling.html: Added.
  • accessibility/visible-character-range-width-changes.html: Added.
  • platform/glib/TestExpectations: Skip new tests.
  • platform/ios-simulator-wk2/TestExpectations:

Mark new tests as crashing since the old test was crashing in main.

  • platform/ios/TestExpectations: Enable new tests.
  • platform/ios/accessibility/visible-character-range-basic-expected.txt: Added.
  • platform/ios/accessibility/visible-character-range-expected.txt: Removed.
  • platform/ios/accessibility/visible-character-range-height-changes-expected.txt: Added.
  • platform/ios/accessibility/visible-character-range-scrolling-expected.txt: Added.
  • platform/ios/accessibility/visible-character-range-width-changes-expected.txt: Added.
  • platform/mac-wk1/TestExpectations: Skip new tests.
  • platform/mac/accessibility/visible-character-range-basic-expected.txt: Added.
  • platform/mac/accessibility/visible-character-range-expected.txt: Removed.
  • platform/mac/accessibility/visible-character-range-height-changes-expected.txt: Added.
  • platform/mac/accessibility/visible-character-range-scrolling-expected.txt: Added.
  • platform/mac/accessibility/visible-character-range-width-changes-expected.txt: Added.
  • platform/win/TestExpectations: Skip new tests.
  • resources/accessibility-helper.js:

(visibleRange): Added.

8:33 PM Changeset in webkit [291599] by Simon Fraser
  • 9 edits in trunk/Source/WebKit

Do all RemoteLayerBackingStore buffer swapping in one batch
https://bugs.webkit.org/show_bug.cgi?id=238161

Reviewed by Tim Horton.

Previously, RemoteLayerBackingStore buffer swapping happened per-layer in
PlatformCALayerRemote::recursiveBuildTransaction().

To prepare for a single IPC for all buffer swapping, batch all the swapping under
prepareBackingStoresForDisplay() which is called from
RemoteLayerTreeContext::buildTransaction().

RemoteLayerBackingStoreCollection tracks m_backingStoresNeedingDisplay, and
RemoteLayerBackingStore implements needsDisplay() so we only add backing stores to this hash
set that need any buffer swapping.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::layerWillBeDisplayed):
(WebKit::RemoteLayerBackingStore::needsDisplay const):
(WebKit::RemoteLayerBackingStore::prepareToDisplay):
(WebKit::RemoteLayerBackingStore::paintContents):
(WebKit::RemoteLayerBackingStore::takePendingFlushers):

  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:

(WebKit::RemoteLayerBackingStoreCollection::backingStoreNeedsDisplay):
(WebKit::RemoteLayerBackingStoreCollection::prepareBackingStoresForDisplay):
(WebKit::RemoteLayerBackingStoreCollection::paintReachableBackingStoreContents):
(WebKit::RemoteLayerBackingStoreCollection::willFlushLayers):
(WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed):

  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.h:
  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.mm:

(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::backingStoreNeedsDisplay):
(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::prepareBackingStoreBuffers):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::buildTransaction):

8:28 PM Changeset in webkit [291598] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Adjust when _setPrivacyProxyFailClosedForUnreachableNonMainHosts is called
https://bugs.webkit.org/show_bug.cgi?id=237735

Reviewed by Geoff Garen.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
(WebKit::NetworkSessionCocoa::createWebSocketTask):

8:22 PM Changeset in webkit [291597] by commit-queue@webkit.org
  • 28 edits
    1 delete in trunk

Implement CSSNumericValue.mul, div, add, sub, max, and min
https://bugs.webkit.org/show_bug.cgi?id=238153

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-21
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/arithmetic.tentative-expected.txt:

Source/WebCore:

This implements all except the derived units of multiplication and the unit checking of the others.
They are an off-by-default experimental feature right now, part of css-typed-om which is being implemented.
They are covered by wpt tests.

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

(WebCore::toJSNewlyCreated):

  • css/typedom/CSSKeywordValue.h:

(WebCore::CSSKeywordValue::value const): Deleted.
(WebCore::CSSKeywordValue::CSSKeywordValue): Deleted.

  • css/typedom/CSSNumericValue.cpp:

(WebCore::negate):
(WebCore::invert):
(WebCore::operationOnValuesOfSameUnit):
(WebCore::CSSNumericValue::prependItemsOfTypeOrThis):
(WebCore::CSSNumericValue::addInternal):
(WebCore::CSSNumericValue::add):
(WebCore::CSSNumericValue::sub):
(WebCore::CSSNumericValue::multiplyInternal):
(WebCore::CSSNumericValue::mul):
(WebCore::CSSNumericValue::div):
(WebCore::CSSNumericValue::min):
(WebCore::CSSNumericValue::max):
(WebCore::CSSNumericValue::rectifyNumberish):
(WebCore::CSSNumericValue::toSum):

  • css/typedom/CSSNumericValue.h:

(isType):

  • css/typedom/CSSStyleValue.h:

(WebCore::isCSSNumericValue):
(WebCore::isCSSMathValue):

  • css/typedom/CSSUnitValue.h:

(isType):

  • css/typedom/numeric/CSSMathInvert.cpp:

(WebCore::CSSMathInvert::CSSMathInvert):

  • css/typedom/numeric/CSSMathInvert.h:

(isType):
(WebCore::CSSMathInvert::value const): Deleted.

  • css/typedom/numeric/CSSMathMax.cpp:

(WebCore::CSSMathMax::CSSMathMax):
(WebCore::CSSMathMax::create): Deleted.

  • css/typedom/numeric/CSSMathMax.h:

(isType):

  • css/typedom/numeric/CSSMathMin.cpp:

(WebCore::CSSMathMin::CSSMathMin):
(WebCore::CSSMathMin::create): Deleted.

  • css/typedom/numeric/CSSMathMin.h:

(isType):

  • css/typedom/numeric/CSSMathNegate.cpp:

(WebCore::CSSMathNegate::CSSMathNegate):
(WebCore::CSSMathNegate::create): Deleted.

  • css/typedom/numeric/CSSMathNegate.h:

(isType):
(WebCore::CSSMathNegate::value const): Deleted.

  • css/typedom/numeric/CSSMathProduct.cpp:

(WebCore::CSSMathProduct::CSSMathProduct):
(WebCore::CSSMathProduct::create): Deleted.

  • css/typedom/numeric/CSSMathProduct.h:

(isType):

  • css/typedom/numeric/CSSMathSum.cpp:

(WebCore::CSSMathSum::CSSMathSum):
(WebCore::CSSMathSum::create): Deleted.
(WebCore::CSSMathSum::values const): Deleted.

  • css/typedom/numeric/CSSMathSum.h:

(isType):

  • css/typedom/numeric/CSSMathValue.cpp: Removed.
  • css/typedom/numeric/CSSMathValue.h:

(WebCore::CSSMathValue::getOperator const): Deleted.
(): Deleted.
(isType): Deleted.

  • css/typedom/numeric/CSSNumericArray.cpp:

(WebCore::CSSNumericArray::create):
(WebCore::CSSNumericArray::CSSNumericArray):

  • css/typedom/numeric/CSSNumericArray.h:

(WebCore::CSSNumericArray::array const):

  • css/typedom/numeric/CSSNumericType.h:
  • css/typedom/transform/CSSTransformValue.h:

(WebCore::CSSTransformValue::length const): Deleted.

7:09 PM Changeset in webkit [291596] by Russell Epstein
  • 1 edit in branches/safari-614.1.6-branch/Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h

Unreviewed logging change. rdar://90517607

6:38 PM Changeset in webkit [291595] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[ iOS iPhone 12 ] fast/hidpi & fast/layers/hidpi tests are flaky text/image failing
https://bugs.webkit.org/show_bug.cgi?id=232384

Unreviewed test gardening.

  • platform/ios/TestExpectations:
6:35 PM Changeset in webkit [291594] by Oriol Brufau
  • 6 edits
    2 adds in trunk

[css-cascade] Let revert-layer roll back to preshints
https://bugs.webkit.org/show_bug.cgi?id=237532

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Add test.

  • web-platform-tests/css/css-cascade/presentational-hints-rollback-expected.txt: Added.
  • web-platform-tests/css/css-cascade/presentational-hints-rollback.html: Added.

Source/WebCore:

The patch makes presentational hints use a cascade layer priority of 0.
The priority of the lowest layer is then increased to 1.
This allows 'revert-layer' in author origin revert to the presentational
hints origin, which is between user origin and author origin.

Test: imported/w3c/web-platform-tests/css/css-cascade/presentational-hints-rollback.html

  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::addElementStyleProperties):
(WebCore::Style::ElementRuleCollector::matchAllRules):
(WebCore::Style::ElementRuleCollector::addElementInlineStyleProperties):

  • style/ElementRuleCollector.h:
  • style/RuleSetBuilder.cpp:

(WebCore::Style::RuleSetBuilder::updateCascadeLayerPriorities):

6:19 PM Changeset in webkit [291593] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebGPU

[WebGPU] maxAnisotropy > 16 is clamped, rather than illegal
https://bugs.webkit.org/show_bug.cgi?id=238063

Reviewed by Kimmo Kinnunen.

See https://github.com/gpuweb/gpuweb/issues/696#issuecomment-644343897

Let's add a maxAnisotropy value to samplers, and a maxAnisotropy limit(? query?) (likely only
ever 16 or 1), but not to validate that the former is less than the latter.

Test: api/operation/sampling/anisotropy.spec.ts

  • WebGPU/Sampler.mm:

(WebGPU::validateCreateSampler):
(WebGPU::Device::createSampler):

5:43 PM Changeset in webkit [291592] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REGRESSION: [ Monterey ] imported/w3c/web-platform-tests/html/canvas/element/line-styles/2d.line.width.scaledefault.html is a constant text failure
<rdar://problem/77527575?

Unreviewed test gardening.

  • platform/mac/TestExpectations: Removing no longer needed test expectation.
5:22 PM Changeset in webkit [291591] by Aditya Keerthi
  • 2 edits in trunk/Source/WebKit

Unreviewed, address post-landing feedback on r291445

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView compareFoundRange:toRange:inDocument:]):

Subtraction to determine ordering is an anti-pattern, due to the
possibility of overflow. Use comparison operators.

5:17 PM Changeset in webkit [291590] by Russell Epstein
  • 9 edits in branches/safari-613-branch/Source

Versioning.

WebKit-7613.2.4

4:46 PM Changeset in webkit [291589] by Chris Dumez
  • 19 edits
    3 adds in trunk

LayoutTests/imported/w3c:
BroadcastChannel instances in distinct opaque origins can communicate
https://bugs.webkit.org/show_bug.cgi?id=238090
<rdar://problem/90511155>

Reviewed by Alex Christensen.

Import web-platform-tests test coverage.

  • web-platform-tests/webmessaging/broadcastchannel/opaque-origin-expected.txt: Added.
  • web-platform-tests/webmessaging/broadcastchannel/opaque-origin.html: Added.
  • web-platform-tests/webmessaging/broadcastchannel/w3c-import.log:

Source/WebCore:
BroadcastChannel instances in distinct opaque origins can communicate
https://bugs.webkit.org/show_bug.cgi?id=238090
<rdar://problem/90511155>

Reviewed by Alex Christensen.

The issue is that we would use a ClientOrigin to distinguish origins for BroadcastChannel,
which relies on SecurityOriginData internally. A unique/opaque SecurityOrigin becomes an empty
SecurityOriginData upon conversion. As a result, when comparing ClientOrigin objects from
unique SecurityOrigins, they would compare as equal.

To address the issue, I introduced a new PartitionedSecurityOrigin type which is similar
to ClientOrigin but stores SecurityOrigin objects internally, instead of SecurityOriginData
objects. PartitionedSecurityOrigin's operator==() is such that different SecurityOrigins
would not be equal but the same unique SecurityOrigin would be. I then used this new
PartitionedSecurityOrigin type as key in our HashMap on the WebProcess side instead of
ClientOrigin. This allows communication between several BroadcastChannels from the same
unique origin, while preventing communication between distinct opaque origins.

When the PartitionedSecurityOrigin contains an opaque security origin, we don't involve
the Network Process at all since the destination can only be in the same WebProcess.

Test: imported/w3c/web-platform-tests/webmessaging/broadcastchannel/opaque-origin.html

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

(WebCore::shouldPartitionOrigin):
(WebCore::BroadcastChannel::MainThreadBridge::registerChannel):
(WebCore::BroadcastChannel::MainThreadBridge::unregisterChannel):
(WebCore::BroadcastChannel::MainThreadBridge::postMessage):

  • dom/BroadcastChannelRegistry.h:
  • loader/EmptyClients.cpp:
  • page/PartitionedSecurityOrigin.h: Added.

(WebCore::PartitionedSecurityOrigin::PartitionedSecurityOrigin):
(WebCore::PartitionedSecurityOrigin::isHashTableDeletedValue const):
(WebCore::PartitionedSecurityOrigin::isHashTableEmptyValue const):
(WebCore::operator==):
(WTF::add):
(WTF::PartitionedSecurityOriginHash::hash):
(WTF::PartitionedSecurityOriginHash::equal):
(WTF::HashTraits<WebCore::PartitionedSecurityOrigin>::emptyValue):
(WTF::HashTraits<WebCore::PartitionedSecurityOrigin>::constructEmptyValue):
(WTF::HashTraits<WebCore::PartitionedSecurityOrigin>::isEmptyValue):
(WTF::HashTraits<WebCore::PartitionedSecurityOrigin>::peek):
(WTF::HashTraits<WebCore::PartitionedSecurityOrigin>::take):

Source/WebKit:
BroadcastChannel instances in distinct opaque origins can communicate
https://bugs.webkit.org/show_bug.cgi?id=238090
<rdar://problem/90511155>

Reviewed by Alex Christensen.

The issue is that we would use a ClientOrigin to distinguish origins for BroadcastChannel,
which relies on SecurityOriginData internally. A unique/opaque SecurityOrigin becomes an empty
SecurityOriginData upon conversion. As a result, when comparing ClientOrigin objects from
unique SecurityOrigins, they would compare as equal.

To address the issue, I introduced a new PartitionedSecurityOrigin type which is similar
to ClientOrigin but stores SecurityOrigin objects internally, instead of SecurityOriginData
objects. PartitionedSecurityOrigin's operator==() is such that different SecurityOrigins
would not be equal but the same unique SecurityOrigin would be. I then used this new
PartitionedSecurityOrigin type as key in our HashMap on the WebProcess side instead of
ClientOrigin. This allows communication between several BroadcastChannels from the same
unique origin, while preventing communication between distinct opaque origins.

When the PartitionedSecurityOrigin contains an opaque security origin, we don't involve
the Network Process at all since the destination can only be in the same WebProcess.

  • WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp:

(WebKit::toClientOrigin):
(WebKit::WebBroadcastChannelRegistry::registerChannel):
(WebKit::WebBroadcastChannelRegistry::unregisterChannel):
(WebKit::WebBroadcastChannelRegistry::postMessage):
(WebKit::WebBroadcastChannelRegistry::postMessageLocally):
(WebKit::WebBroadcastChannelRegistry::postMessageToRemote):
(WebKit::WebBroadcastChannelRegistry::networkProcessCrashed):

  • WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.h:

Source/WebKitLegacy:
Dust off Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=238121

Reviewed by Yusuke Suzuki.

  • PlatformMac.cmake:
4:39 PM Changeset in webkit [291588] by Kate Cheney
  • 7 edits
    2 adds in trunk

nj.gov: Background color incorrect for 'State Vehicles' section
https://bugs.webkit.org/show_bug.cgi?id=238035
<rdar://problem/84543795>

Reviewed by Aditya Keerthi.

Source/WebCore:

Test: fast/css/non-form-control-element-drop-appearance.html

Update RenderTheme::adjustStyle to drop appearance for non-form
control elements when they are styled by the author.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustAppearanceForElement const):
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::isControlStyled const):

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

(WebCore::RenderStyle::borderAndBackgroundEqual const):

  • rendering/style/RenderStyle.h:

LayoutTests:

  • fast/css/non-form-control-element-drop-appearance-expected.html: Added.
  • fast/css/non-form-control-element-drop-appearance.html: Added.
  • editing/deleting/insert-in-orphaned-selection-crash.html: Added.

Now that we drop native style for non-form control elements, we need to
add height to the style to make sure this table element is selectable and
successfully tests what it needs to test.

4:36 PM Changeset in webkit [291587] by commit-queue@webkit.org
  • 4 edits in trunk

Unreviewed, reverting r291055.
https://bugs.webkit.org/show_bug.cgi?id=238145

Invalid test expectations

Reverted changeset:

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

3:44 PM Changeset in webkit [291586] by Russell Epstein
  • 2 edits in branches/safari-614.1.7-branch/Source/WebKit

Cherry-pick r291563. rdar://problem/90448244

Sandbox: Remove telemetry in Network Process sandbox macOS
https://bugs.webkit.org/show_bug.cgi?id=238041

Patch by Adam Mazander <mazander@apple.com> on 2022-03-21
Reviewed by Brent Fulgham.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:

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

3:14 PM Changeset in webkit [291585] by Matteo Flores
  • 1 edit in trunk/LayoutTests/ChangeLog

REGRESSION(r290797-r290793): [ iOS Debug ] 4 editing/selection/* tests are constant timeouts
https://bugs.webkit.org/show_bug.cgi?id=238155

Unreviewed test gardening.

  • platform/ios/TestExpectations:
3:14 PM Changeset in webkit [291584] by Matteo Flores
  • 1 edit in trunk/LayoutTests/platform/ios/TestExpectations

Need a short description (OOPS!).
Need the bug URL (OOPS!).

Reviewed by NOBODY (OOPS!).

  • platform/ios/TestExpectations:
2:44 PM Changeset in webkit [291583] by Russell Epstein
  • 1 copy in tags/Safari-614.1.5.9.2

Tag Safari-614.1.5.9.2.

2:42 PM Changeset in webkit [291582] by Russell Epstein
  • 8 edits
    2 adds in branches/safari-614.1.7-branch/Source

Cherry-pick r291564. rdar://problem/90463946

Add an addition point for system background color
https://bugs.webkit.org/show_bug.cgi?id=238108
<rdar://problem/90463946>

Reviewed by Aditya Keerthi.

Source/WebCore:

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/ios/WebCoreUIColorExtras.h: Added.
  • platform/ios/WebCoreUIColorExtras.mm: Added. (WebCore::systemBackgroundColor): Add an addition point.
  • rendering/RenderThemeIOS.mm: (WebCore::CSSValueSystemColorInformation::function): (WebCore::cssValueSystemColorInformationList): (WebCore::systemColorFromCSSValueSystemColorInformation): Adopt it for CSS use of system background color.

Source/WebKit:

  • UIProcess/API/ios/WKWebViewIOS.mm: (scrollViewBackgroundColor): Adopt systemBackgroundColor().
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::contentViewBackgroundColor):
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::platformUnderPageBackgroundColor const): Move the fallback to systemBackgroundColor into PageClientImpl so that it can realize the web view's trait collection.

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

2:35 PM Changeset in webkit [291581] by Russell Epstein
  • 8 edits
    2 adds in branches/safari-614.1.5.9-branch/Source

Cherry-pick r291564. rdar://problem/90463946

Add an addition point for system background color
https://bugs.webkit.org/show_bug.cgi?id=238108
<rdar://problem/90463946>

Reviewed by Aditya Keerthi.

Source/WebCore:

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/ios/WebCoreUIColorExtras.h: Added.
  • platform/ios/WebCoreUIColorExtras.mm: Added. (WebCore::systemBackgroundColor): Add an addition point.
  • rendering/RenderThemeIOS.mm: (WebCore::CSSValueSystemColorInformation::function): (WebCore::cssValueSystemColorInformationList): (WebCore::systemColorFromCSSValueSystemColorInformation): Adopt it for CSS use of system background color.

Source/WebKit:

  • UIProcess/API/ios/WKWebViewIOS.mm: (scrollViewBackgroundColor): Adopt systemBackgroundColor().
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::contentViewBackgroundColor):
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::platformUnderPageBackgroundColor const): Move the fallback to systemBackgroundColor into PageClientImpl so that it can realize the web view's trait collection.

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

2:32 PM Changeset in webkit [291580] by Russell Epstein
  • 9 edits in branches/safari-614.1.5.9-branch/Source

Versioning.

WebKit-7614.1.5.9.2

2:23 PM Changeset in webkit [291579] by Brent Fulgham
  • 4 edits in trunk

Disable the <model> element in Captive Portal mode.
https://bugs.webkit.org/show_bug.cgi?id=238148
<rdar://90562002>

Reviewed by Chris Dumez.

Source/WebKit:

When displaying content in a captive portal, we should make sure the experimental
<model> element is unavailable.

Tests: TestWebKitAPI

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::adjustSettingsForCaptivePortal): Added. Also turn off <model> support.
(WebKit::WebPage::updatePreferences): Call new helper function.

Tools:

Update tests to check <model> element.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1:44 PM Changeset in webkit [291578] by mmaxfield@apple.com
  • 6 edits in trunk

[WebGPU] Set the WebGPU WKPreference to true in layout tests
https://bugs.webkit.org/show_bug.cgi?id=238130

Reviewed by Sam Weinig.

Tools:

WebGPU isn't ready yet to show up in any Safari menus, so rather than just marking it as an experimental feature,
this patch just enables the preference in DumpRenderTree and WebKitTestRunner.

This doesn't require a linker change, because all of the WebGPU calls are already behind HAS(WEBGPU_IMPLEMENTATION).
Therefore, the immediate behavior change of this patch is that the IDL types are exposed in layout tests, but calling
WebGPU functions in layout tests will return undefined. When we finally link WebCore with WebGPU, then these
functions will automatically start working in layout tests. Outside of layout tests, the IDL types are still not
present, and so therefore the WebGPU functions cannot be called because they are not visible from script.

  • DumpRenderTree/TestOptions.cpp:

(WTR::TestOptions::defaults):

  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::defaults):

LayoutTests:

  • platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt:
12:57 PM Changeset in webkit [291577] by ysuzuki@apple.com
  • 4 edits
    1 add in trunk

[JSC] ReferenceError when using extra parens in class fields
https://bugs.webkit.org/show_bug.cgi?id=236843

Reviewed by Saam Barati.

JSTests:

  • stress/class-field-initializer-should-have-variable-scope.js: Added.

(shouldBe):
(test1.const.a.x.B):
(test1):
(test2.const.a.x.B):
(test2):
(test3.B.prototype.b):
(test3.B):
(test3):

Source/JavaScriptCore:

class field initializer should create its own used-variables set
to capture used variables separately from the other variables since
it becomes independent CodeBlock internally later. The current code
was wrong since,

  1. Incorrectly using the current set of class-scope.
  2. Incorrectly marking only the last set while parseAssignmentExpression can create a new set inside it.
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseClass):

  • parser/Parser.h:

(JSC::Scope::markLastUsedVariablesSetAsCaptured):

12:42 PM Changeset in webkit [291576] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Unreviewed test gardening after 246673@main.

  • fast/viewport/watchos/viewport-adaptations-after-navigation-expected.txt:
  • fast/viewport/watchos/viewport-with-system-minimum-layout-margins.html:
12:21 PM Changeset in webkit [291575] by mmaxfield@apple.com
  • 2 edits
    1 copy
    1 add in trunk/Tools

[WebGPU] Add a build-webgpu script
https://bugs.webkit.org/show_bug.cgi?id=238040

Reviewed by Saam Barati.

This patch adds a build-webgpu script by sharing code with the build-jsc script.
It moves almost all of the contents of the build-jsc script to a shared Perl module,
webkitperl/BuildSubproject.pm, and then has build-jsc and build-webgpu both call
into it to build the relevant projects.

  • Scripts/build-jsc:

(buildMyProject): Deleted.
(writeCongrats): Deleted.

  • Scripts/build-webgpu: Added.
  • Scripts/webkitperl/BuildSubproject.pm: Copied from Tools/Scripts/build-jsc.

(buildMyProject):
(writeCongrats):

12:16 PM Changeset in webkit [291574] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[media-controls] scrubbing on iOS when inline does not work
https://bugs.webkit.org/show_bug.cgi?id=238138
rdar://90046770

Reviewed by Dean Jackson.

This bug is simular to bug 238136. We cannot register pointer events on window on iOS.

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

(Slider.prototype._interactionEndTarget):

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

[watchOS] Add required syscall
https://bugs.webkit.org/show_bug.cgi?id=238117
<rdar://89964344>

Reviewed by Brent Fulgham.

Add rarely used syscall on watchOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
12:00 PM Changeset in webkit [291572] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[media-controls] tap gesture recognizer sometimes fails to recognize on iOS
https://bugs.webkit.org/show_bug.cgi?id=238136

Reviewed by Dean Jackson.

While on macOS it's fine to register pointer events handlers on the window object,
on iOS it may not be depending on the fullscreen state. However, it's always fine to
use the gesture recognizer's target on iOS, so let's default to that when touches
are supported.

  • Modules/modern-media-controls/gesture-recognizers/gesture-recognizer.js:

(GestureRecognizer.prototype.touchesBegan):
(GestureRecognizer.prototype.get _captureTarget):
(GestureRecognizer.prototype._removeTrackingListeners):

11:58 AM Changeset in webkit [291571] by mmaxfield@apple.com
  • 11 edits in trunk/Source/WebGPU

[WebGPU] Implement error reporting facilities
https://bugs.webkit.org/show_bug.cgi?id=238131

Reviewed by Kimmo Kinnunen.

This patch implements the GPUDevice.pushErrorScope() and GPUDevice.popErrorScope() functions,
according to the spec.

Now that we can report errors, we should be just about able to pass our first CTS test.

  • CommandLinePlayground/main.swift:
  • WebGPU/Buffer.mm:

(WebGPU::Buffer::mapAsync):
(WebGPU::Buffer::unmap):

  • WebGPU/CommandEncoder.h:

(WebGPU::CommandEncoder::create):

  • WebGPU/CommandEncoder.mm:

(WebGPU::Device::createCommandEncoder):
(WebGPU::CommandEncoder::CommandEncoder):
(WebGPU::CommandEncoder::copyBufferToBuffer):
(WebGPU::CommandEncoder::clearBuffer):
(WebGPU::CommandEncoder::finish):

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

(WebGPU::Device::currentErrorScope):
(WebGPU::Device::generateAValidationError):
(WebGPU::Device::validatePopErrorScope const):
(WebGPU::Device::popErrorScope):
(WebGPU::Device::pushErrorScope):
(WebGPU::Device::setUncapturedErrorCallback):

  • WebGPU/Queue.h:
  • WebGPU/Queue.mm:

(WebGPU::Queue::submit):

  • WebGPU/Sampler.h:

(WebGPU::Sampler::create):

  • WebGPU/Sampler.mm:

(WebGPU::Device::createSampler):
(WebGPU::Sampler::Sampler):

11:48 AM Changeset in webkit [291570] by Tyler Wilcock
  • 9 edits
    9 adds in trunk

AX: Include display: contents elements in the AX tree
https://bugs.webkit.org/show_bug.cgi?id=237834

Reviewed by Chris Fleizach.

Source/WebCore:

Because display: contents intentionally prevents a render object from being
generated for the element it's applied to, we don't add it to the AX tree as
part of our normal render tree walk, making these elements inaccessible.

This patch includes these elements as part of the DOM walk that
addHiddenChildren (now renamed to addNodeOnlyChildren) already does.

Also, because display: contents moves the affected element's children up a
level in the render tree, this patch also special cases:

  1. AccessibilityRenderObject::parentObject and similar methods to return their display: contents parent instead of their render tree parent
  2. AccessibilityObject::insertChild to only insert display: contents children to their display: contents parent, rather than their render tree parent

Test: accessibility/display-contents-element-roles.html, accessibility/aria-hidden-display-contents-element.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::getOrCreate):
Allow creation of AX objects from display: contents Nodes.
Also, don't create an object for a renderer that is in the process of
being destroyed (prevents display-contents-element-roles.html from crashing in ITM)

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::displayContentsParent const):
(WebCore::AccessibilityObject::insertChild):
If an object has a display: contents parent, and that parent isn't
this, return early.

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::parentObjectIfExists const):
(WebCore::AccessibilityRenderObject::parentObject const):
(WebCore::AccessibilityRenderObject::parentObjectUnignored const):
If an object has a display: contents parent, return that instead of
its render tree parent.
(WebCore::AccessibilityRenderObject::addNodeOnlyChildren):
Renamed from addHiddenChildren.
(WebCore::AccessibilityRenderObject::addChildren):
Don't clear m_subtreeDirty until after all children have been added.
Necessary to make aria-hidden-display-contents-element.html pass, as
we were clearing this too early, causing display: contents subtrees to
not be updated after aria-hidden changes.
(WebCore::AccessibilityRenderObject::addHiddenChildren):
Renamed to addNodeOnlyChildren.

  • accessibility/AccessibilityRenderObject.h:

LayoutTests:

  • accessibility/aria-hidden-display-contents-element-expected.txt: Added.
  • accessibility/aria-hidden-display-contents-element.html: Added.
  • accessibility/display-contents-element-roles-expected.txt: Added.
  • accessibility/display-contents-element-roles.html: Added.
  • platform/glib/accessibility/aria-hidden-display-contents-element-expected.txt: Added.
  • platform/glib/accessibility/display-contents-element-roles-expected.txt: Added.
  • platform/ios/TestExpectations: Enable new tests.
  • platform/ios/accessibility/aria-hidden-display-contents-element-expected.txt: Added.
  • platform/ios/accessibility/display-contents-element-roles-expected.txt: Added.
  • platform/win/TestExpectations: Skip display-contents-element-roles.html.
  • platform/win/accessibility/aria-hidden-display-contents-element-expected.txt: Added.
11:01 AM Changeset in webkit [291569] by Russell Epstein
  • 2 edits in branches/safari-614.1.7-branch/Source/WebCore

Cherry-pick r291514. rdar://problem/90500863

[iOS] Fix more build breakage from r291361
https://bugs.webkit.org/show_bug.cgi?id=238097
<rdar://problem/90505371>

Unreviewed build fix.

  • platform/ios/WebAVPlayerController.mm: Declare AVAssetTrack.

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

11:00 AM Changeset in webkit [291568] by Oriol Brufau
  • 2 edits in trunk/Source/WebCore

[css-cascade] Don't defer applying text decoration properties
https://bugs.webkit.org/show_bug.cgi?id=238126

Reviewed by Darin Adler.

shouldApplyPropertyInParseOrder() was returning true for these:

  • webkit-text-decoration
  • text-decoration-line
  • text-decoration-style
  • text-decoration-color
  • text-decoration-skip
  • text-decoration-skip-ink
  • text-underline-position
  • text-underline-offset
  • text-decoration-thickness
  • text-decoration

This was previously needed for text-decoration-line and text-decoration,
since they were implemented as longhands that shared a computed value.
But that's no longer the case, text-decoration became a shorthand in bug
237175.

AFAIK -webkit-text-decoration has always been a shorthand since it was
implemented in bug 92000, so having it in the list it's pointless,
only longhands matter. And text-decoration-skip became a shorthand in
bug 230244, so it's also pointless.

The other longhands seem unnecessary too, since they don't share a
computed style with other properties.

No test since there should be no observable change in behavior.

  • style/PropertyCascade.cpp:

(WebCore::Style::shouldApplyPropertyInParseOrder):

10:58 AM Changeset in webkit [291567] by youenn@apple.com
  • 4 edits in trunk/Source

Remove unneeded quotes in capture attribution string
https://bugs.webkit.org/show_bug.cgi?id=238132
<rdar://88794701>

Reviewed by Eric Carlson.

Source/WebCore:

  • en.lproj/Localizable.strings:

Source/WebKit:

Quotes are unneeded and made it less clear to read.

  • GPUProcess/cocoa/GPUConnectionToWebProcessCocoa.mm:

(WebKit::GPUConnectionToWebProcess::setCaptureAttributionString):

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

Accessing WebGL content crashes in macOS Recovery OS
https://bugs.webkit.org/show_bug.cgi?id=238139

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

Add a quick fix trying to circumvent a Recovery OS crash.
Parts of this will be reverted once the true source is found.

  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:

(WebCore::platformSupportsMetal):

10:47 AM Changeset in webkit [291565] by Russell Epstein
  • 1 copy in branches/safari-614.1.7-branch

New branch.

10:44 AM Changeset in webkit [291564] by timothy_horton@apple.com
  • 8 edits
    2 adds in trunk/Source

Add an addition point for system background color
https://bugs.webkit.org/show_bug.cgi?id=238108
<rdar://problem/90463946>

Reviewed by Aditya Keerthi.

Source/WebCore:

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/ios/WebCoreUIColorExtras.h: Added.
  • platform/ios/WebCoreUIColorExtras.mm: Added.

(WebCore::systemBackgroundColor):
Add an addition point.

  • rendering/RenderThemeIOS.mm:

(WebCore::CSSValueSystemColorInformation::function):
(WebCore::cssValueSystemColorInformationList):
(WebCore::systemColorFromCSSValueSystemColorInformation):
Adopt it for CSS use of system background color.

Source/WebKit:

  • UIProcess/API/ios/WKWebViewIOS.mm:

(scrollViewBackgroundColor):
Adopt systemBackgroundColor().

  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::contentViewBackgroundColor):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::platformUnderPageBackgroundColor const):
Move the fallback to systemBackgroundColor into PageClientImpl
so that it can realize the web view's trait collection.

10:37 AM Changeset in webkit [291563] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Sandbox: Remove telemetry in Network Process sandbox macOS
https://bugs.webkit.org/show_bug.cgi?id=238041

Patch by Adam Mazander <mazander@apple.com> on 2022-03-21
Reviewed by Brent Fulgham.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
10:20 AM Changeset in webkit [291562] by commit-queue@webkit.org
  • 18 edits in trunk/Source

Dust off Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=238121

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-21
Reviewed by Yusuke Suzuki.

Source/bmalloc:

  • PlatformMac.cmake:

Source/ThirdParty/ANGLE:

  • GLESv2.cmake:
  • Metal.cmake:

Source/ThirdParty/libwebrtc:

  • CMakeLists.txt:
  • Source/third_party/libwebm/common/vp9_level_stats.h:

Source/WebCore:

  • CMakeLists.txt:
  • PlatformMac.cmake:
  • SourcesCocoa.txt:

Source/WebCore/PAL:

  • pal/PlatformMac.cmake:

Source/WebKit:

  • PlatformMac.cmake:

Source/WebKitLegacy:

  • PlatformMac.cmake:
10:15 AM Changeset in webkit [291561] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Null check style in Editor::applyParagraphStyle
https://bugs.webkit.org/show_bug.cgi?id=238137

Patch by Rob Buis <rbuis@igalia.com> on 2022-03-21
Reviewed by Wenson Hsieh.

Null check style in Editor::applyParagraphStyle.

  • editing/Editor.cpp:

(WebCore::Editor::applyParagraphStyle):

9:57 AM Changeset in webkit [291560] by Jonathan Bedard
  • 2 edits in trunk/Tools

[Merge-Queue] Support multiple reviewers names
https://bugs.webkit.org/show_bug.cgi?id=238095
<rdar://problem/90503503>

Reviewed by Aakash Jain.

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

(ApplyPatch.start): Only apply the first reviewer name.
(ValidateCommiterAndReviewer.start): Support a list of reviewers.

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

9:29 AM Changeset in webkit [291559] by Jonathan Bedard
  • 9 edits
    3 deletes in trunk/Source

Unreviewed, reverting r291558.

Exceeded GitHub file size limit

Reverted changeset:

"Enable PGO when building for release and production"
https://bugs.webkit.org/show_bug.cgi?id=238119
https://commits.webkit.org/r291558

8:25 AM Changeset in webkit [291558] by Wenson Hsieh
  • 9 edits
    6 adds in trunk/Source

Enable PGO when building for release and production
https://bugs.webkit.org/show_bug.cgi?id=238119
rdar://90182309

Reviewed by Saam Barati.

Source/JavaScriptCore:

See WebCore/ChangeLog for more details.

  • Configurations/Base.xcconfig:
  • Configurations/JavaScriptCore.xcconfig:
  • Profiling/JavaScriptCore.profdata: Added.

Source/WebCore:

Add LLVM profiles to the WebCore, JavaScriptCore and WebKit frameworks, collected by running certain benchmarks
on ARM macOS. We then use this data for release and production builds by specifying a -fprofile-instr-use in
OTHER_CPLUSPLUSFLAGS. Across various configurations of macOS and iOS, this is an ~8% speedup on Speedometer.


| subtest | ms | ms | b / a | pValue |


| Elm-TodoMVC |101.721667 |99.571667 |0.978864 | 0.000211 (significant) |
| VueJS-TodoMVC |18.643333 |17.196667 |0.922403 | 0.000000 (significant) |
| EmberJS-TodoMVC |108.763333 |103.306667 |0.949830 | 0.000000 (significant) |
| BackboneJS-TodoMVC |37.951667 |34.693333 |0.914145 | 0.000000 (significant) |
| Preact-TodoMVC |13.586667 |12.818333 |0.943449 | 0.053277 |
| AngularJS-TodoMVC |117.130000 |110.755000 |0.945573 | 0.000000 (significant) |
| Vanilla-ES2015-TodoMVC |58.950000 |52.716667 |0.894261 | 0.000000 (significant) |
| Inferno-TodoMVC |52.660000 |49.571667 |0.941353 | 0.000000 (significant) |
| Flight-TodoMVC |51.551667 |46.230000 |0.896770 | 0.000000 (significant) |
| Angular2-TypeScript-TodoMVC |35.753333 |33.698333 |0.942523 | 0.000000 (significant) |
| VanillaJS-TodoMVC |48.400000 |42.670000 |0.881612 | 0.000000 (significant) |
| jQuery-TodoMVC |218.346667 |200.051667 |0.916211 | 0.000000 (significant) |
| EmberJS-Debug-TodoMVC |304.171667 |291.903333 |0.959666 | 0.000000 (significant) |
| React-TodoMVC |75.475000 |72.761667 |0.964050 | 0.000008 (significant) |
| React-Redux-TodoMVC |126.448333 |120.458333 |0.952629 | 0.000000 (significant) |
| Vanilla-ES2015-Babel-Webpack-TodoMVC |55.643333 |49.665000 |0.892560 | 0.000000 (significant) |


a mean = 306.08529
b mean = 330.01548
pValue = 0.0000000000
(Bigger means are better.)
1.078 times better
Results ARE significant

  • Configurations/Base.xcconfig:

For now, we additionally ignore errors that arise if profiled symbols differ from built symbols; in the future,
we'll need to implement some kind of strategy to detect when enough symbols in the profile data no longer match
symbols that appear in the built binaries, such that it might begin to negate the performance benefit from PGO.

Note that while the profile data was collected on an ARM Mac, performance tests have shown the profile data to
largely generalize well to other architectures and platforms as well (i.e. macOS x86_64 and iOS arm64e). As
such, instead of limiting this profile to ARM macOS, we can just use it everywhere (and perhaps, add platform-
or architecture-specific profile data later, if needed).

  • Configurations/WebCore.xcconfig:
  • Profiling/WebCore.profdata: Added.

Source/WebKit:

See WebCore/ChangeLog for more details.

  • Configurations/Base.xcconfig:
  • Configurations/WebKit.xcconfig:
  • Profiling/WebKit.profdata: Added.
6:17 AM Changeset in webkit [291557] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.36.0

WebKitGTK 2.36.0

6:16 AM Changeset in webkit [291556] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.36

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.36.0 release

.:

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

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.36.0.
2:27 AM Changeset in webkit [291555] by Ziran Sun
  • 7 edits in trunk

[selection] HTMLTextFormControlElement::subtreeHasChanged() shouldn't be called in setRangeText
https://bugs.webkit.org/show_bug.cgi?id=237720

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update test expectations as more sub-tests are now passing.

  • web-platform-tests/html/semantics/forms/textfieldselection/selection-value-interactions-expected.txt:
  • web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setRangeText-expected.txt:

Source/WebCore:

We shouldn't call HTMLTextFormControlElement::subtreeHasChanged() in HTMLTextFormControlElement::setRangeText.
It has been removed in patch for bug 237641. This patch is to further remove unnecessary code.

This change refers and imports some of the changes in chromium CL at
https://codereview.chromium.org/1577243002

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setRangeText):

LayoutTests:

Update test expectation as the test is now passing.

  • fast/forms/setrangetext-expected.txt:
1:45 AM Changeset in webkit [291554] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.36

Merge r291552 - REGRESSION(r286955): Rendering Links during search: highlighting fails
https://bugs.webkit.org/show_bug.cgi?id=237816

Reviewed by Simon Fraser.

Source/WebCore:

Since r286955 the same coalesced marked text loop is used for painting the foreground text in case of text with
decorations. StyledMarkedText::coalesceAdjacentWithEqualDecorations() doesn't take into account the text style,
so when selected foreground color is different we end up painting the whole decorated text with the same
foreground color for the selected and non-selected parts.

Test: fast/text/selection-with-text-decorations.html

  • rendering/StyledMarkedText.cpp:

(WebCore::StyledMarkedText::coalesceAdjacentWithEqualDecorations): Take into account the text styles too.

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::paintForegroundAndDecorations): Do not call
StyledMarkedText::coalesceAdjacentWithEqualForeground() in case of text with decorations, since it's unused.

LayoutTests:

  • fast/text/selection-with-text-decorations-expected.html: Added.
  • fast/text/selection-with-text-decorations.html: Added.
  • platform/ios/TestExpectations:
1:45 AM Changeset in webkit [291553] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.36/Source/WebCore

Merge r291544 - REGRESSION(r289154) [GSTREAMER] webrtc/vp8-then-h264.html is crashing after SDK update to fdo 21.08 and Gstreamer 1.20
https://bugs.webkit.org/show_bug.cgi?id=237872

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

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

(WebCore::VP8Decoder::Create): Fix typo in decoder factory test.

1:40 AM WebKitGTK/2.36.x edited by Carlos Garcia Campos
(diff)
1:35 AM Changeset in webkit [291552] by Carlos Garcia Campos
  • 5 edits
    2 adds in trunk

REGRESSION(r286955): Rendering Links during search: highlighting fails
https://bugs.webkit.org/show_bug.cgi?id=237816

Reviewed by Simon Fraser.

Source/WebCore:

Since r286955 the same coalesced marked text loop is used for painting the foreground text in case of text with
decorations. StyledMarkedText::coalesceAdjacentWithEqualDecorations() doesn't take into account the text style,
so when selected foreground color is different we end up painting the whole decorated text with the same
foreground color for the selected and non-selected parts.

Test: fast/text/selection-with-text-decorations.html

  • rendering/StyledMarkedText.cpp:

(WebCore::StyledMarkedText::coalesceAdjacentWithEqualDecorations): Take into account the text styles too.

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::paintForegroundAndDecorations): Do not call
StyledMarkedText::coalesceAdjacentWithEqualForeground() in case of text with decorations, since it's unused.

LayoutTests:

  • fast/text/selection-with-text-decorations-expected.html: Added.
  • fast/text/selection-with-text-decorations.html: Added.
  • platform/ios/TestExpectations:
12:41 AM Changeset in webkit [291551] by Diego Pino Garcia
  • 2 edits in trunk/Tools

Unreviewed, fix Debian Stable build after r291543

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(elementSize): Replace RELEASE_ASSERT_NOT_REACHED() for RELEASE_ASSERT_NOT_REACHED_UNDER_CONSTEXPR_CONTEXT().

12:14 AM Changeset in webkit [291550] by youenn@apple.com
  • 19 edits in trunk/Source

Remove use of MediaSampleAVFObjC from WebRTC pipelines
https://bugs.webkit.org/show_bug.cgi?id=237706
<rdar://problem/90425391>

Reviewed by Eric Carlson.

Source/WebCore:

Replace MediaSampleAVFObjC by VideoFrameCV when handling CVPixelBuffers.

Covered by existing tests.

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
  • platform/graphics/cv/ImageRotationSessionVT.mm:
  • platform/graphics/cv/ImageTransferSessionVT.h:
  • platform/graphics/cv/ImageTransferSessionVT.mm:
  • platform/graphics/cv/VideoFrameCV.h:
  • platform/graphics/cv/VideoFrameCV.mm:
  • platform/mediastream/RealtimeVideoSource.cpp:
  • platform/mediastream/RealtimeVideoSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:
  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:

Source/WebKit:

  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

Mar 20, 2022:

7:11 PM Changeset in webkit [291549] by Diego Pino Garcia
  • 3 edits in trunk/Source/WebCore

[WPE] Unreviewed, fix non-unified build after r291474 and r291508

  • css/CSSToLengthConversionData.h:
  • html/parser/AtomHTMLToken.h:
5:59 PM Changeset in webkit [291548] by Alan Bujtas
  • 31 edits
    3 moves in trunk/Source/WebCore

[IFC][Integration] Rename InlineIterator::Line to LineBox
https://bugs.webkit.org/show_bug.cgi?id=238128

Reviewed by Antti Koivisto.

  • dom/Position.cpp:

(WebCore::Position::upstream const):
(WebCore::Position::downstream const):
(WebCore::Position::rendersInDifferentPosition const):

  • editing/RenderedPosition.h:

(WebCore::RenderedPosition::lineBox const):
(WebCore::RenderedPosition::line const): Deleted.

  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::leftVisuallyDistinctCandidate const):
(WebCore::VisiblePosition::rightVisuallyDistinctCandidate const):
(WebCore::VisiblePosition::absoluteSelectionBoundsForLine const):

  • editing/VisibleUnits.cpp:

(WebCore::startTextOrLineBreakBox):
(WebCore::endTextOrLineBreakBox):
(WebCore::logicallyPreviousBox):
(WebCore::logicallyNextBox):
(WebCore::startPositionForLine):
(WebCore::endPositionForLine):
(WebCore::absoluteLineDirectionPointToLocalPointInBlock):
(WebCore::previousLinePosition):
(WebCore::nextLinePosition):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const):

  • layout/integration/InlineIteratorBox.cpp:

(WebCore::InlineIterator::Box::lineBox const):
(WebCore::InlineIterator::Box::style const):
(WebCore::InlineIterator::Box::line const): Deleted.

  • layout/integration/InlineIteratorBox.h:
  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::LineBoxIterator::LineBoxIterator):
(WebCore::InlineIterator::LineBoxIterator::atEnd const):
(WebCore::InlineIterator::LineBoxIterator::traverseNext):
(WebCore::InlineIterator::LineBoxIterator::traversePrevious):
(WebCore::InlineIterator::LineBoxIterator::operator== const):
(WebCore::InlineIterator::firstLineBoxFor):
(WebCore::InlineIterator::lastLineBoxFor):
(WebCore::InlineIterator::LineBox::next const):
(WebCore::InlineIterator::LineBox::previous const):
(WebCore::InlineIterator::LineBox::firstLeafBox const):
(WebCore::InlineIterator::LineBox::lastLeafBox const):
(WebCore::InlineIterator::closestBoxForHorizontalPosition):
(WebCore::InlineIterator::LineIterator::LineIterator): Deleted.
(WebCore::InlineIterator::LineIterator::atEnd const): Deleted.
(WebCore::InlineIterator::LineIterator::traverseNext): Deleted.
(WebCore::InlineIterator::LineIterator::traversePrevious): Deleted.
(WebCore::InlineIterator::LineIterator::operator== const): Deleted.
(WebCore::InlineIterator::firstLineFor): Deleted.
(WebCore::InlineIterator::lastLineFor): Deleted.
(WebCore::InlineIterator::Line::next const): Deleted.
(WebCore::InlineIterator::Line::previous const): Deleted.
(WebCore::InlineIterator::Line::firstLeafBox const): Deleted.
(WebCore::InlineIterator::Line::lastLeafBox const): Deleted.

  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::LineBox::height const):
(WebCore::InlineIterator::LineBoxIterator::LineBoxIterator):
(WebCore::InlineIterator::LineBoxIterator::operator++):
(WebCore::InlineIterator::LineBoxIterator::operator!= const):
(WebCore::InlineIterator::LineBoxIterator::operator== const):
(WebCore::InlineIterator::LineBoxIterator::operator* const):
(WebCore::InlineIterator::LineBoxIterator::operator-> const):
(WebCore::InlineIterator::previousLineBoxContentBottomOrBorderAndPadding):
(WebCore::InlineIterator::contentStartInBlockDirection):
(WebCore::InlineIterator::LineBox::LineBox):
(WebCore::InlineIterator::LineBox::contentLogicalTop const):
(WebCore::InlineIterator::LineBox::contentLogicalBottom const):
(WebCore::InlineIterator::LineBox::contentLogicalTopAdjustedForPrecedingLineBox const):
(WebCore::InlineIterator::LineBox::contentLogicalBottomAdjustedForFollowingLineBox const):
(WebCore::InlineIterator::LineBox::top const):
(WebCore::InlineIterator::LineBox::bottom const):
(WebCore::InlineIterator::LineBox::contentLogicalLeft const):
(WebCore::InlineIterator::LineBox::contentLogicalRight const):
(WebCore::InlineIterator::LineBox::contentLogicalWidth const):
(WebCore::InlineIterator::LineBox::isHorizontal const):
(WebCore::InlineIterator::LineBox::baselineType const):
(WebCore::InlineIterator::LineBox::containingBlock const):
(WebCore::InlineIterator::LineBox::containingFragment const):
(WebCore::InlineIterator::LineBox::isFirstAfterPageBreak const):
(WebCore::InlineIterator::LineBox::isFirst const):
(WebCore::InlineIterator::Line::lineBoxHeight const): Deleted.
(WebCore::InlineIterator::LineIterator::LineIterator): Deleted.
(WebCore::InlineIterator::LineIterator::operator++): Deleted.
(WebCore::InlineIterator::LineIterator::operator bool const): Deleted.
(WebCore::InlineIterator::LineIterator::operator!= const): Deleted.
(WebCore::InlineIterator::LineIterator::operator== const): Deleted.
(WebCore::InlineIterator::LineIterator::operator* const): Deleted.
(WebCore::InlineIterator::LineIterator::operator-> const): Deleted.
(WebCore::InlineIterator::previousLineContentBottomOrBorderAndPadding): Deleted.
(WebCore::InlineIterator::Line::Line): Deleted.
(WebCore::InlineIterator::Line::contentLogicalTop const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalBottom const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalTopAdjustedForPrecedingLine const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalBottomAdjustedForFollowingLine const): Deleted.
(WebCore::InlineIterator::Line::lineBoxTop const): Deleted.
(WebCore::InlineIterator::Line::lineBoxBottom const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalLeft const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalRight const): Deleted.
(WebCore::InlineIterator::Line::contentLogicalWidth const): Deleted.
(WebCore::InlineIterator::Line::isHorizontal const): Deleted.
(WebCore::InlineIterator::Line::baselineType const): Deleted.
(WebCore::InlineIterator::Line::containingBlock const): Deleted.
(WebCore::InlineIterator::Line::containingFragment const): Deleted.
(WebCore::InlineIterator::Line::isFirstAfterPageBreak const): Deleted.
(WebCore::InlineIterator::Line::isFirst const): Deleted.

  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineBoxIteratorLegacyPath::LineBoxIteratorLegacyPath):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::contentLogicalTopAdjustedForPrecedingLineBox const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::contentLogicalBottomAdjustedForFollowingLineBox const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::top const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::bottom const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::operator== const):
(WebCore::InlineIterator::LineIteratorLegacyPath::LineIteratorLegacyPath): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTop const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalBottom const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalTopAdjustedForPrecedingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalBottomAdjustedForFollowingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::lineBoxTop const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::lineBoxBottom const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalLeft const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::contentLogicalRight const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::isHorizontal const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::baselineType const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::containingBlock const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::containingFragment const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::isFirstAfterPageBreak const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::traverseNext): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::traversePrevious): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::operator== const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::atEnd const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::firstLeafBox const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::lastLeafBox const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineBoxIteratorModernPath::LineBoxIteratorModernPath):
(WebCore::InlineIterator::LineBoxIteratorModernPath::top const):
(WebCore::InlineIterator::LineBoxIteratorModernPath::bottom const):
(WebCore::InlineIterator::LineBoxIteratorModernPath::contentLogicalTopAdjustedForPrecedingLineBox const):
(WebCore::InlineIterator::LineBoxIteratorModernPath::contentLogicalBottomAdjustedForFollowingLineBox const):
(WebCore::InlineIterator::LineBoxIteratorModernPath::operator== const):
(WebCore::InlineIterator::LineIteratorModernPath::LineIteratorModernPath): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTop const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalBottom const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::lineBoxTop const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::lineBoxBottom const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForPrecedingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalBottomAdjustedForFollowingLine const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalLeft const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalRight const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::isHorizontal const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::baselineType const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::containingBlock const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::containingFragment const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::isFirstAfterPageBreak const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::traverseNext): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::traversePrevious): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::operator== const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::atEnd const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::firstLeafBox const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::lastLeafBox const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::setAtEnd): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::lines const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::line const): Deleted.

  • layout/integration/InlineIteratorLogicalOrderTraversal.cpp:

(WebCore::InlineIterator::makeLineLogicalOrderCache):
(WebCore::InlineIterator::updateLineLogicalOrderCacheIfNeeded):
(WebCore::InlineIterator::firstLeafOnLineInLogicalOrder):
(WebCore::InlineIterator::lastLeafOnLineInLogicalOrder):
(WebCore::InlineIterator::firstLeafOnLineInLogicalOrderWithNode):
(WebCore::InlineIterator::lastLeafOnLineInLogicalOrderWithNode):

  • layout/integration/InlineIteratorLogicalOrderTraversal.h:

(WebCore::InlineIterator::leafBoxesInLogicalOrder):

  • layout/integration/InlineIteratorTextBox.cpp:

(WebCore::InlineIterator::TextBox::selectionRect const):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::firstLineBox const):
(WebCore::LayoutIntegration::LineLayout::lastLineBox const):
(WebCore::LayoutIntegration::LineLayout::firstLine const): Deleted.
(WebCore::LayoutIntegration::LineLayout::lastLine const): Deleted.

  • layout/integration/LayoutIntegrationLineLayout.h:
  • layout/integration/LineSelection.h:

(WebCore::LineSelection::logicalTop):
(WebCore::LineSelection::logicalBottom):
(WebCore::LineSelection::logicalRect):
(WebCore::LineSelection::physicalRect):
(WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):
(WebCore::LineSelection::selectionState):

  • rendering/CaretRectComputation.cpp:

(WebCore::computeCaretRectForLinePosition):
(WebCore::computeCaretRectForText):
(WebCore::computeCaretRectForLineBreak):
(WebCore::computeCaretRectForBox):

  • rendering/InlineBoxPainter.cpp:

(WebCore::InlineBoxPainter::InlineBoxPainter):
(WebCore::InlineBoxPainter::paintMask):
(WebCore::InlineBoxPainter::paintDecorations):
(WebCore::InlineBoxPainter::style const):

  • rendering/InlineBoxPainter.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::adjustEnclosingTopForPrecedingBlock const):
(WebCore::RenderBlockFlow::inlineSelectionGaps):
(WebCore::RenderBlockFlow::containsNonZeroBidiLevel const):
(WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
(WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::getLeadingCorner const):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::paintOutline):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint):

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionForPoint):

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::TextBoxPainter):
(WebCore::TextBoxPainter::paintBackground):
(WebCore::textPosition):
(WebCore::TextBoxPainter::computePaintRect):

  • rendering/svg/SVGRootInlineBox.cpp:

(WebCore::SVGRootInlineBox::reorderValueListsToLogicalOrder):

  • style/InlineTextBoxStyle.cpp:

(WebCore::minLogicalTopForTextDecorationLine):
(WebCore::maxLogicalBottomForTextDecorationLine):
(WebCore::computeUnderlineOffset):

9:48 AM Changeset in webkit [291547] by commit-queue@webkit.org
  • 9 edits
    4 adds
    1 delete in trunk/Tools/buildstream

[Flatpak SDK] Bump to meson 0.60
https://bugs.webkit.org/show_bug.cgi?id=238112

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

  • elements/freedesktop-sdk.bst: Update junction and include patches for Meson update and

follow-up recipe updates.

  • elements/sdk-platform.bst: Remove shared-mime-info, the same version is shipped by the upstream SDK already.
  • elements/sdk/glib.bst: Remove invalid meson options
  • elements/sdk/gst-plugins-bad.bst: Ditto.
  • elements/sdk/gst-plugins-base.bst: Ditto.
  • elements/sdk/gstreamer.bst: Ditto.
  • elements/sdk/gtk+-3.bst: Ditto.
  • elements/sdk/gtk.bst: Ditto.
  • elements/sdk/shared-mime-info.bst: Removed.
  • patches/fdo-0001-gdk-pixbuf-Remove-invalid-meson-options.patch: Added.
  • patches/fdo-0001-gst-plugins-bad-Remove-invalid-meson-option.patch: Added.
  • patches/fdo-0001-meson-Bump-to-0.60.3.patch: Added.
  • patches/fdo-0001-shared-mime-info-Backport-meson-0.60-build-fix.patch: Added.
9:37 AM Changeset in webkit [291546] by Oriol Brufau
  • 9 edits
    2 adds in trunk

Fix CSS cascade regarding logical properties
https://bugs.webkit.org/show_bug.cgi?id=236199

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Expect animation-004.html to pass.
Add new test logicalprops-with-deferred-writing-mode.html

  • web-platform-tests/css/css-logical/animation-004-expected.txt:
  • web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode-expected.txt: Added.
  • web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode.html: Added.

Source/WebCore:

The CSS cascade was trying to resolve logical properties into physical
ones too early. This failed if we still didn't know the direction or
writing-mode, e.g. because they were set to a variable or to a CSS-wide
keyword.

This patch keeps logical properties as-is during the cascade. They are
only resolved when finally applied. Also, both logical properties and
their physical equivalents are now set to apply in parse order, since
'height: 0px; block-size: 1px' and 'block-size: 1px; height: 0px' can be
different, the order matters.

Tests: imported/w3c/web-platform-tests/css/css-logical/animation-004.html

imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-deferred-writing-mode.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json:
  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseValueWithVariableReferences):

  • style/PropertyCascade.cpp:

(WebCore::Style::shouldApplyPropertyInParseOrder):
(WebCore::Style::PropertyCascade::PropertyCascade):
(WebCore::Style::PropertyCascade::set):
(WebCore::Style::PropertyCascade::setDeferred):
(WebCore::Style::PropertyCascade::resolveDirectionAndWritingMode const): Deleted.
(WebCore::Style::PropertyCascade::direction const): Deleted.

  • style/PropertyCascade.h:

(WebCore::Style::PropertyCascade::areDeferredInOrder const):

  • style/StyleBuilder.cpp:

(WebCore::Style::Builder::Builder):
(WebCore::Style::Builder::applyProperty):
(WebCore::Style::directionFromStyle): Deleted.

8:52 AM WebKitGTK/2.36.x edited by Michael Catanzaro
(diff)
8:04 AM Changeset in webkit [291545] by Alan Bujtas
  • 9 edits in trunk/Source/WebCore

[IFC][Integration] Remove redundant InlineIterator::Line::contentLogicalTopAdjustedForHitTesting
https://bugs.webkit.org/show_bug.cgi?id=238107

Reviewed by Antti Koivisto.

It looks like contentLogicalTopAdjustedForHitTesting is just the combination of

  • containingBlock's border and padding before
  • LineSelection::logicalTop (which is either the line's content top or the previous line's content bottom)
  • line's content top
  • layout/integration/InlineIteratorLine.h:

(WebCore::InlineIterator::contentStartInBlockDirection):
(WebCore::InlineIterator::Line::contentLogicalTopAdjustedForHitTesting const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForPrecedingLine const):
(WebCore::InlineIterator::LineIteratorModernPath::contentLogicalTopAdjustedForHitTesting const): Deleted.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint): This seems to be missing the contentLogicalTop check.

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionForPoint):

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

REGRESSION(r289154) [GSTREAMER] webrtc/vp8-then-h264.html is crashing after SDK update to fdo 21.08 and Gstreamer 1.20
https://bugs.webkit.org/show_bug.cgi?id=237872

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

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

(WebCore::VP8Decoder::Create): Fix typo in decoder factory test.

6:37 AM Changeset in webkit [291543] by Adrian Perez de Castro
  • 2 edits in trunk/Tools

Fix clang warning after r291229

Unreviewed build fix.

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(elementSize): Move RELEASE_ASSERT_NOT_REACHED() out of the switch to make clang happy.

4:46 AM Changeset in webkit [291542] by Adrian Perez de Castro
  • 2 edits
    3 adds in trunk/Tools/buildstream

[Flatpak SDK] Include gi-docgen and its dependencies
https://bugs.webkit.org/show_bug.cgi?id=237681

Reviewed by Philippe Normand.

Import a build element for gi-docgen, which reuses most of the dependencies from the
Freedesktop SDK, except for the python-typogrify element, which is not available there
and this also adds an element for.

  • elements/sdk-platform.bst:
  • elements/sdk/gi-docgen.bst: Added.
  • elements/sdk/python3-smartypants.bst: Added.
  • elements/sdk/python3-typogrify.bst: Added.
4:40 AM Changeset in webkit [291541] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[WPE][GStreamer] media playback broken
https://bugs.webkit.org/show_bug.cgi?id=238110

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-03-20
Reviewed by Philippe Normand.

  • platform/graphics/gbm/GBMBufferSwapchain.cpp:

(WebCore::GBMBufferSwapchain::GBMBufferSwapchain):
Fix the assert that's hit when using eight-buffers capacity value. Just
a matter of using the more proper <= operator.

Note: See TracTimeline for information about the timeline view.