[webkit-changes] [WebKit/WebKit] 67e8a2: Use ASCIILiteral instead of `const char*` for Supp...

Chris Dumez noreply at github.com
Thu Jan 11 19:09:36 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 67e8a2009c5394a9dd03bc78614a938df568b6c9
      https://github.com/WebKit/WebKit/commit/67e8a2009c5394a9dd03bc78614a938df568b6c9
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2024-01-11 (Thu, 11 Jan 2024)

  Changed paths:
    M Source/WTF/wtf/text/ASCIILiteral.h
    M Source/WebCore/Modules/async-clipboard/NavigatorClipboard.cpp
    M Source/WebCore/Modules/async-clipboard/NavigatorClipboard.h
    M Source/WebCore/Modules/audiosession/NavigatorAudioSession.cpp
    M Source/WebCore/Modules/audiosession/NavigatorAudioSession.h
    M Source/WebCore/Modules/beacon/NavigatorBeacon.cpp
    M Source/WebCore/Modules/beacon/NavigatorBeacon.h
    M Source/WebCore/Modules/cache/WindowOrWorkerGlobalScopeCaches.cpp
    M Source/WebCore/Modules/contact-picker/NavigatorContacts.cpp
    M Source/WebCore/Modules/contact-picker/NavigatorContacts.h
    M Source/WebCore/Modules/cookie-consent/NavigatorCookieConsent.h
    M Source/WebCore/Modules/credentialmanagement/NavigatorCredentials.cpp
    M Source/WebCore/Modules/credentialmanagement/NavigatorCredentials.h
    M Source/WebCore/Modules/encryptedmedia/MediaKeySystemController.cpp
    M Source/WebCore/Modules/encryptedmedia/MediaKeySystemController.h
    M Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp
    M Source/WebCore/Modules/gamepad/NavigatorGamepad.h
    M Source/WebCore/Modules/geolocation/GeolocationController.cpp
    M Source/WebCore/Modules/geolocation/GeolocationController.h
    M Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp
    M Source/WebCore/Modules/geolocation/NavigatorGeolocation.h
    M Source/WebCore/Modules/indexeddb/WindowOrWorkerGlobalScopeIndexedDatabase.cpp
    M Source/WebCore/Modules/mediacapabilities/NavigatorMediaCapabilities.cpp
    M Source/WebCore/Modules/mediacapabilities/NavigatorMediaCapabilities.h
    M Source/WebCore/Modules/mediacapabilities/WorkerNavigatorMediaCapabilities.cpp
    M Source/WebCore/Modules/mediacapabilities/WorkerNavigatorMediaCapabilities.h
    M Source/WebCore/Modules/mediasession/NavigatorMediaSession.cpp
    M Source/WebCore/Modules/mediasession/NavigatorMediaSession.h
    M Source/WebCore/Modules/mediastream/NavigatorMediaDevices.cpp
    M Source/WebCore/Modules/mediastream/NavigatorMediaDevices.h
    M Source/WebCore/Modules/mediastream/UserMediaController.cpp
    M Source/WebCore/Modules/mediastream/UserMediaController.h
    M Source/WebCore/Modules/notifications/NotificationController.cpp
    M Source/WebCore/Modules/notifications/NotificationController.h
    M Source/WebCore/Modules/permissions/NavigatorPermissions.cpp
    M Source/WebCore/Modules/permissions/NavigatorPermissions.h
    M Source/WebCore/Modules/permissions/WorkerNavigatorPermissions.cpp
    M Source/WebCore/Modules/permissions/WorkerNavigatorPermissions.h
    M Source/WebCore/Modules/pictureinpicture/DocumentPictureInPicture.h
    M Source/WebCore/Modules/pictureinpicture/HTMLVideoElementPictureInPicture.h
    M Source/WebCore/Modules/push-api/ServiceWorkerRegistrationPushAPI.cpp
    M Source/WebCore/Modules/push-api/ServiceWorkerRegistrationPushAPI.h
    M Source/WebCore/Modules/screen-wake-lock/NavigatorScreenWakeLock.cpp
    M Source/WebCore/Modules/screen-wake-lock/NavigatorScreenWakeLock.h
    M Source/WebCore/Modules/speech/LocalDOMWindowSpeechSynthesis.cpp
    M Source/WebCore/Modules/speech/LocalDOMWindowSpeechSynthesis.h
    M Source/WebCore/Modules/webdriver/NavigatorWebDriver.cpp
    M Source/WebCore/Modules/webdriver/NavigatorWebDriver.h
    M Source/WebCore/Modules/webxr/NavigatorWebXR.cpp
    M Source/WebCore/Modules/webxr/NavigatorWebXR.h
    M Source/WebCore/css/DOMCSSPaintWorklet.cpp
    M Source/WebCore/css/DOMCSSPaintWorklet.h
    M Source/WebCore/css/DOMCSSRegisterCustomProperty.cpp
    M Source/WebCore/css/DOMCSSRegisterCustomProperty.h
    M Source/WebCore/css/typedom/CSSNumericFactory.cpp
    M Source/WebCore/css/typedom/CSSNumericFactory.h
    M Source/WebCore/dom/DeviceMotionController.cpp
    M Source/WebCore/dom/DeviceMotionController.h
    M Source/WebCore/dom/DeviceOrientationController.cpp
    M Source/WebCore/dom/DeviceOrientationController.h
    M Source/WebCore/dom/DocumentStorageAccess.cpp
    M Source/WebCore/dom/DocumentStorageAccess.h
    M Source/WebCore/html/NavigatorUserActivation.cpp
    M Source/WebCore/html/NavigatorUserActivation.h
    M Source/WebCore/page/NavigatorIsLoggedIn.cpp
    M Source/WebCore/page/NavigatorIsLoggedIn.h
    M Source/WebCore/platform/Supplementable.h
    M Source/WebCore/testing/InternalSettings.cpp
    M Source/WebCore/testing/InternalSettings.h
    M Source/WebCore/workers/service/background-fetch/ServiceWorkerRegistrationBackgroundFetchAPI.cpp
    M Source/WebCore/workers/service/background-fetch/ServiceWorkerRegistrationBackgroundFetchAPI.h
    M Source/WebKit/NetworkProcess/Cookies/WebCookieManager.cpp
    M Source/WebKit/NetworkProcess/Cookies/WebCookieManager.h
    M Source/WebKit/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp
    M Source/WebKit/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h
    M Source/WebKit/NetworkProcess/NetworkProcess.h
    M Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.h
    M Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm
    M Source/WebKit/Shared/Authentication/AuthenticationManager.cpp
    M Source/WebKit/Shared/Authentication/AuthenticationManager.h
    M Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.cpp
    M Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.h
    M Source/WebKit/UIProcess/WebGeolocationManagerProxy.cpp
    M Source/WebKit/UIProcess/WebGeolocationManagerProxy.h
    M Source/WebKit/UIProcess/WebProcessPool.h
    M Source/WebKit/WebProcess/GPU/media/RemoteCDMFactory.cpp
    M Source/WebKit/WebProcess/GPU/media/RemoteCDMFactory.h
    M Source/WebKit/WebProcess/GPU/media/RemoteLegacyCDMFactory.cpp
    M Source/WebKit/WebProcess/GPU/media/RemoteLegacyCDMFactory.h
    M Source/WebKit/WebProcess/GPU/media/RemoteMediaEngineConfigurationFactory.cpp
    M Source/WebKit/WebProcess/GPU/media/RemoteMediaEngineConfigurationFactory.h
    M Source/WebKit/WebProcess/Geolocation/WebGeolocationManager.cpp
    M Source/WebKit/WebProcess/Geolocation/WebGeolocationManager.h
    M Source/WebKit/WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
    M Source/WebKit/WebProcess/MediaCache/WebMediaKeyStorageManager.h
    M Source/WebKit/WebProcess/Notifications/WebNotificationManager.cpp
    M Source/WebKit/WebProcess/Notifications/WebNotificationManager.h
    M Source/WebKit/WebProcess/WebProcess.h
    M Source/WebKit/WebProcess/cocoa/AudioSessionRoutingArbitrator.cpp
    M Source/WebKit/WebProcess/cocoa/AudioSessionRoutingArbitrator.h
    M Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.cpp
    M Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.h
    M Source/WebKit/WebProcess/glib/UserMediaCaptureManager.h

  Log Message:
  -----------
  Use ASCIILiteral instead of `const char*` for Supplementable key
https://bugs.webkit.org/show_bug.cgi?id=267431

Reviewed by Geoffrey Garen.

It makes string lifetime clearer.

* Source/WTF/wtf/text/ASCIILiteral.h:
(WTF::ASCIILiteralPtrHash::hash):
(WTF::ASCIILiteralPtrHash::equal):
* Source/WebCore/Modules/async-clipboard/NavigatorClipboard.cpp:
(WebCore::NavigatorClipboard::supplementName):
* Source/WebCore/Modules/async-clipboard/NavigatorClipboard.h:
* Source/WebCore/Modules/audiosession/NavigatorAudioSession.cpp:
(WebCore::NavigatorAudioSession::supplementName):
* Source/WebCore/Modules/audiosession/NavigatorAudioSession.h:
* Source/WebCore/Modules/beacon/NavigatorBeacon.cpp:
(WebCore::NavigatorBeacon::supplementName):
* Source/WebCore/Modules/beacon/NavigatorBeacon.h:
* Source/WebCore/Modules/cache/WindowOrWorkerGlobalScopeCaches.cpp:
(WebCore::DOMWindowCaches::supplementName):
(WebCore::WorkerGlobalScopeCaches::supplementName):
* Source/WebCore/Modules/contact-picker/NavigatorContacts.cpp:
(WebCore::NavigatorContacts::supplementName):
* Source/WebCore/Modules/contact-picker/NavigatorContacts.h:
* Source/WebCore/Modules/cookie-consent/NavigatorCookieConsent.h:
* Source/WebCore/Modules/credentialmanagement/NavigatorCredentials.cpp:
(WebCore::NavigatorCredentials::supplementName):
* Source/WebCore/Modules/credentialmanagement/NavigatorCredentials.h:
* Source/WebCore/Modules/encryptedmedia/MediaKeySystemController.cpp:
(WebCore::MediaKeySystemController::supplementName):
* Source/WebCore/Modules/encryptedmedia/MediaKeySystemController.h:
* Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::supplementName):
* Source/WebCore/Modules/gamepad/NavigatorGamepad.h:
* Source/WebCore/Modules/geolocation/GeolocationController.cpp:
(WebCore::GeolocationController::supplementName):
* Source/WebCore/Modules/geolocation/GeolocationController.h:
* Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp:
(WebCore::NavigatorGeolocation::supplementName):
* Source/WebCore/Modules/geolocation/NavigatorGeolocation.h:
* Source/WebCore/Modules/indexeddb/WindowOrWorkerGlobalScopeIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::supplementName):
(WebCore::WorkerGlobalScopeIndexedDatabase::supplementName):
* Source/WebCore/Modules/mediacapabilities/NavigatorMediaCapabilities.cpp:
(WebCore::NavigatorMediaCapabilities::supplementName):
* Source/WebCore/Modules/mediacapabilities/NavigatorMediaCapabilities.h:
* Source/WebCore/Modules/mediacapabilities/WorkerNavigatorMediaCapabilities.cpp:
(WebCore::WorkerNavigatorMediaCapabilities::supplementName):
* Source/WebCore/Modules/mediacapabilities/WorkerNavigatorMediaCapabilities.h:
* Source/WebCore/Modules/mediasession/NavigatorMediaSession.cpp:
(WebCore::NavigatorMediaSession::supplementName):
* Source/WebCore/Modules/mediasession/NavigatorMediaSession.h:
* Source/WebCore/Modules/mediastream/NavigatorMediaDevices.cpp:
(WebCore::NavigatorMediaDevices::supplementName):
* Source/WebCore/Modules/mediastream/NavigatorMediaDevices.h:
* Source/WebCore/Modules/mediastream/UserMediaController.cpp:
(WebCore::UserMediaController::supplementName):
* Source/WebCore/Modules/mediastream/UserMediaController.h:
* Source/WebCore/Modules/notifications/NotificationController.cpp:
(WebCore::NotificationController::supplementName):
* Source/WebCore/Modules/notifications/NotificationController.h:
* Source/WebCore/Modules/permissions/NavigatorPermissions.cpp:
(WebCore::NavigatorPermissions::supplementName):
* Source/WebCore/Modules/permissions/NavigatorPermissions.h:
* Source/WebCore/Modules/permissions/WorkerNavigatorPermissions.cpp:
(WebCore::WorkerNavigatorPermissions::supplementName):
* Source/WebCore/Modules/permissions/WorkerNavigatorPermissions.h:
* Source/WebCore/Modules/pictureinpicture/DocumentPictureInPicture.h:
(WebCore::DocumentPictureInPicture::supplementName):
* Source/WebCore/Modules/pictureinpicture/HTMLVideoElementPictureInPicture.h:
(WebCore::HTMLVideoElementPictureInPicture::supplementName):
* Source/WebCore/Modules/push-api/ServiceWorkerRegistrationPushAPI.cpp:
(WebCore::ServiceWorkerRegistrationPushAPI::supplementName):
* Source/WebCore/Modules/push-api/ServiceWorkerRegistrationPushAPI.h:
* Source/WebCore/Modules/screen-wake-lock/NavigatorScreenWakeLock.cpp:
(WebCore::NavigatorScreenWakeLock::supplementName):
* Source/WebCore/Modules/screen-wake-lock/NavigatorScreenWakeLock.h:
* Source/WebCore/Modules/speech/LocalDOMWindowSpeechSynthesis.cpp:
(WebCore::LocalDOMWindowSpeechSynthesis::supplementName):
* Source/WebCore/Modules/speech/LocalDOMWindowSpeechSynthesis.h:
* Source/WebCore/Modules/webdriver/NavigatorWebDriver.cpp:
(WebCore::NavigatorWebDriver::supplementName):
* Source/WebCore/Modules/webdriver/NavigatorWebDriver.h:
* Source/WebCore/css/DOMCSSPaintWorklet.cpp:
(WebCore::DOMCSSPaintWorklet::supplementName):
* Source/WebCore/css/DOMCSSPaintWorklet.h:
* Source/WebCore/css/DOMCSSRegisterCustomProperty.cpp:
(WebCore::DOMCSSRegisterCustomProperty::supplementName):
* Source/WebCore/css/DOMCSSRegisterCustomProperty.h:
* Source/WebCore/css/typedom/CSSNumericFactory.cpp:
(WebCore::CSSNumericFactory::supplementName):
* Source/WebCore/css/typedom/CSSNumericFactory.h:
* Source/WebCore/dom/DeviceMotionController.cpp:
(WebCore::DeviceMotionController::supplementName):
* Source/WebCore/dom/DeviceMotionController.h:
* Source/WebCore/dom/DeviceOrientationController.cpp:
(WebCore::DeviceOrientationController::supplementName):
* Source/WebCore/dom/DeviceOrientationController.h:
* Source/WebCore/dom/DocumentStorageAccess.cpp:
(WebCore::DocumentStorageAccess::supplementName):
* Source/WebCore/dom/DocumentStorageAccess.h:
* Source/WebCore/html/NavigatorUserActivation.cpp:
(WebCore::NavigatorUserActivation::supplementName):
* Source/WebCore/html/NavigatorUserActivation.h:
* Source/WebCore/page/NavigatorIsLoggedIn.cpp:
(WebCore::NavigatorIsLoggedIn::supplementName):
* Source/WebCore/page/NavigatorIsLoggedIn.h:
* Source/WebCore/platform/Supplementable.h:
(WebCore::Supplement::provideTo):
(WebCore::Supplement::from):
(WebCore::Supplementable::provideSupplement):
(WebCore::Supplementable::removeSupplement):
(WebCore::Supplementable::requireSupplement):
* Source/WebCore/testing/InternalSettings.cpp:
(WebCore::InternalSettings::supplementName):
* Source/WebCore/testing/InternalSettings.h:
* Source/WebCore/workers/service/background-fetch/ServiceWorkerRegistrationBackgroundFetchAPI.cpp:
(WebCore::ServiceWorkerRegistrationBackgroundFetchAPI::supplementName):
* Source/WebCore/workers/service/background-fetch/ServiceWorkerRegistrationBackgroundFetchAPI.h:
* Source/WebKit/NetworkProcess/Cookies/WebCookieManager.cpp:
(WebKit::WebCookieManager::supplementName):
* Source/WebKit/NetworkProcess/Cookies/WebCookieManager.h:
* Source/WebKit/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp:
(WebKit::LegacyCustomProtocolManager::supplementName):
* Source/WebKit/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h:
* Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.h:
* Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm:
(WebKit::LaunchServicesDatabaseObserver::supplementName):
* Source/WebKit/Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::supplementName):
* Source/WebKit/Shared/Authentication/AuthenticationManager.h:
* Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::supplementName):
* Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.h:
* Source/WebKit/UIProcess/WebGeolocationManagerProxy.cpp:
(WebKit::WebGeolocationManagerProxy::supplementName):
* Source/WebKit/UIProcess/WebGeolocationManagerProxy.h:
* Source/WebKit/WebProcess/GPU/media/RemoteCDMFactory.cpp:
(WebKit::RemoteCDMFactory::supplementName):
* Source/WebKit/WebProcess/GPU/media/RemoteCDMFactory.h:
* Source/WebKit/WebProcess/GPU/media/RemoteLegacyCDMFactory.cpp:
(WebKit::RemoteLegacyCDMFactory::supplementName):
* Source/WebKit/WebProcess/GPU/media/RemoteLegacyCDMFactory.h:
* Source/WebKit/WebProcess/GPU/media/RemoteMediaEngineConfigurationFactory.cpp:
(WebKit::RemoteMediaEngineConfigurationFactory::supplementName):
* Source/WebKit/WebProcess/GPU/media/RemoteMediaEngineConfigurationFactory.h:
* Source/WebKit/WebProcess/Geolocation/WebGeolocationManager.cpp:
(WebKit::WebGeolocationManager::supplementName):
* Source/WebKit/WebProcess/Geolocation/WebGeolocationManager.h:
* Source/WebKit/WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
(WebKit::WebMediaKeyStorageManager::supplementName):
* Source/WebKit/WebProcess/MediaCache/WebMediaKeyStorageManager.h:
* Source/WebKit/WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::supplementName):
* Source/WebKit/WebProcess/Notifications/WebNotificationManager.h:
* Source/WebKit/WebProcess/WebProcess.h:
* Source/WebKit/WebProcess/cocoa/AudioSessionRoutingArbitrator.cpp:
(WebKit::AudioSessionRoutingArbitrator::supplementName):
* Source/WebKit/WebProcess/cocoa/AudioSessionRoutingArbitrator.h:
* Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::supplementName):
* Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.h:
* Source/WebKit/WebProcess/glib/UserMediaCaptureManager.h:
(WebKit::UserMediaCaptureManager::supplementName):

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




More information about the webkit-changes mailing list