-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update PermissionsPolicy to match latest spec
https://bugs.webkit.org/show_bug.cgi?id=273982 rdar://127848428 Reviewed by Youenn Fablet. This patch implements some algorithms and does some refactoring/renaming in PermissionPolicy based on latest version of spec. * Source/WebCore/Modules/applepay/PaymentSession.cpp: (WebCore::PaymentSession::canCreateSession): * Source/WebCore/Modules/audiosession/DOMAudioSession.cpp: (WebCore::DOMAudioSession::setType): (WebCore::DOMAudioSession::type const): (WebCore::DOMAudioSession::state const): (WebCore::DOMAudioSession::scheduleStateChangeEvent): * Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp: * Source/WebCore/Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::shouldBlockGeolocationRequests): * Source/WebCore/Modules/mediastream/MediaDevices.cpp: (WebCore::checkCameraAccess): (WebCore::checkMicrophoneAccess): (WebCore::checkSpeakerAccess): (WebCore::MediaDevices::listenForDeviceChanges): * Source/WebCore/Modules/mediastream/UserMediaController.cpp: (WebCore::UserMediaController::logEnumerateDevicesDenial): * Source/WebCore/Modules/mediastream/UserMediaRequest.cpp: (WebCore::UserMediaRequest::start): * Source/WebCore/Modules/permissions/Permissions.cpp: (WebCore::isAllowedByPermissionsPolicy): * Source/WebCore/Modules/screen-wake-lock/WakeLock.cpp: (WebCore::WakeLock::request): * Source/WebCore/Modules/speech/SpeechRecognition.cpp: (WebCore::SpeechRecognition::startRecognition): * Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp: (WebCore::AuthenticatorCoordinator::discoverFromExternalSource): * Source/WebCore/Modules/webxr/WebXRSystem.cpp: (WebCore::WebXRSystem::isSessionSupported): (WebCore::WebXRSystem::isFeaturePermitted const): * Source/WebCore/dom/FullscreenManager.cpp: (WebCore::FullscreenManager::requestFullscreenForElement): (WebCore::FullscreenManager::isFullscreenEnabled const): * Source/WebCore/html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::permissionsPolicy const): * Source/WebCore/html/PermissionsPolicy.cpp: (WebCore::toFeatureNameForLogging): (WebCore::readFeatureIdentifier): (WebCore::splitOnAsciiWhiteSpace): (WebCore::isPermissionsPolicyAllowedByDocumentAndAllOwners): (WebCore::PermissionsPolicy::Allowlist::matches const): (WebCore::PermissionsPolicy::parseAllowlist): (WebCore::PermissionsPolicy::parsePolicyDirective): (WebCore::PermissionsPolicy::declaredOrigin const): (WebCore::PermissionsPolicy::PermissionsPolicy): (WebCore::PermissionsPolicy::allows const): (WebCore::policyTypeName): Deleted. (WebCore::isAllowedByPermissionsPolicy): Deleted. (WebCore::processOriginItem): Deleted. (WebCore::updateList): Deleted. (WebCore::PermissionsPolicy::parse): Deleted. * Source/WebCore/html/PermissionsPolicy.h: (WebCore::PermissionsPolicy::defaultPolicy): (WebCore::PermissionsPolicy::parse): (WebCore::PermissionsPolicy::Allowlist::Allowlist): * Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::makeXRCompatible): * Source/WebCore/loader/FrameLoader.cpp: (WebCore::FrameLoader::updateRequestAndAddExtraFields): * Source/WebCore/page/LocalDOMWindow.cpp: (WebCore::LocalDOMWindow::isAllowedToUseDeviceMotion const): (WebCore::LocalDOMWindow::isAllowedToUseDeviceOrientation const): * Source/WebCore/page/Navigator.cpp: (WebCore::validateWebSharePolicy): * Source/WebCore/xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest): Canonical link: https://commits.webkit.org/278786@main
- Loading branch information
Showing
21 changed files
with
300 additions
and
372 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.