Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[Model] clean up compile-time flags and condition IDL methods behind …
…them https://bugs.webkit.org/show_bug.cgi?id=233407 Reviewed by Tim Horton. Source/WebCore: We condition the availability of IDL methods recently added to HTMLModelElement by the new set of ENABLE_MODEL_ELEMENT_XXX_CONTROL flags. * Modules/model-element/HTMLModelElement.cpp: * Modules/model-element/HTMLModelElement.h: * Modules/model-element/HTMLModelElement.idl: * Modules/model-element/ModelPlayer.h: * Modules/model-element/dummy/DummyModelPlayer.cpp: * Modules/model-element/dummy/DummyModelPlayer.h: * Modules/model-element/scenekit/SceneKitModelPlayer.h: * Modules/model-element/scenekit/SceneKitModelPlayer.mm: Source/WebCore/PAL: We adopt the changes made to flags in wtf/PlatformEnableCocoa.h and wtf/PlatformHave.h. We also remove the use of existing flags in QuartzCoreSPI.h since they're not actually valid. * pal/spi/cocoa/QuartzCoreSPI.h: * pal/spi/ios/SystemPreviewSPI.h: * pal/spi/mac/SystemPreviewSPI.h: Source/WebKit: On top of adopting the changes made to flags in wtf/PlatformEnableCocoa.h and wtf/PlatformHave.h, we condition the definition of code related to IDL methods recently added to HTMLModelElement by the new set of ENABLE_MODEL_ELEMENT_XXX_CONTROL flags, uncluding WebPageProxy messages allowing for this feature to work. * Shared/ModelIdentifier.h: (WebKit::ModelIdentifier::encode const): (WebKit::ModelIdentifier::decode): * UIProcess/Cocoa/ModelElementControllerCocoa.mm: (WebKit::previewHasCameraSupport): (WebKit::ModelElementController::getCameraForModelElement): (WebKit::ModelElementController::setCameraForModelElement): (WebKit::previewHasAnimationSupport): (WebKit::ModelElementController::isPlayingAnimationForModelElement): (WebKit::ModelElementController::setAnimationIsPlayingForModelElement): (WebKit::ModelElementController::isLoopingAnimationForModelElement): (WebKit::ModelElementController::setIsLoopingAnimationForModelElement): (WebKit::ModelElementController::animationDurationForModelElement): (WebKit::ModelElementController::animationCurrentTimeForModelElement): (WebKit::ModelElementController::setAnimationCurrentTimeForModelElement): (WebKit::previewHasAudioSupport): (WebKit::ModelElementController::hasAudioForModelElement): (WebKit::ModelElementController::isMutedForModelElement): (WebKit::ModelElementController::setIsMutedForModelElement): * UIProcess/ModelElementController.h: * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm: (WebKit::RemoteLayerTreeHost::makeNode): * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/ios/WKModelInteractionGestureRecognizer.h: * UIProcess/ios/WKModelInteractionGestureRecognizer.mm: * UIProcess/ios/WKModelView.h: * UIProcess/ios/WKModelView.mm: * WebProcess/Model/ARKitInlinePreviewModelPlayer.h: * WebProcess/Model/ARKitInlinePreviewModelPlayer.mm: * WebProcess/Model/WebModelPlayerProvider.cpp: (WebKit::WebModelPlayerProvider::createModelPlayer): * WebProcess/Model/ios/ARKitInlinePreviewModelPlayerIOS.h: * WebProcess/Model/ios/ARKitInlinePreviewModelPlayerIOS.mm: * WebProcess/Model/mac/ARKitInlinePreviewModelPlayerMac.h: * WebProcess/Model/mac/ARKitInlinePreviewModelPlayerMac.mm: (WebKit::ARKitInlinePreviewModelPlayerMac::supportsMouseInteraction): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::setWebsiteDataStoreParameters): Source/WTF: We refactor and augment the flags related to the <model> element. First, we change the following existing flags from ENABLE to HAVE since they are about the availability of specific APIs in ARKit, and more specific ASVInlinePreview. The changes are as follows: ENABLE_ARKIT_INLINE_PREVIEW_IOS => HAVE_ASV_INLINE_PREVIEW_IOS ENABLE_ARKIT_INLINE_PREVIEW_MAC => HAVE_ASV_INLINE_PREVIEW_MAC ENABLE_ARKIT_INLINE_PREVIEW_CAMERA_TRANSFORM => HAVE_ASV_INLINE_PREVIEW_CAMERA_CONTROL ENABLE_ARKIT_INLINE_PREVIEW_ANIMATIONS_CONTROL => HAVE_ASV_INLINE_PREVIEW_ANIMATION_CONTROL ENABLE_ARKIT_INLINE_PREVIEW_AUDIO_CONTROL => HAVE_ASV_INLINE_PREVIEW_AUDIO_CONTROL We retain the ENABLE_ARKIT_INLINE_PREVIEW flag however as, even when the ASVInlinePreview API is available, we may elect to not use this API. Then, we add three new flags to specify whether some <model> features exposed to the Web are enabled, all currently conditioned by the matching HAVE_ASV_INLINE_PREVIEW_ flags, but those could be subject to more complex rules when other <model> backends expose supporting APIs for these features. ENABLE_MODEL_ELEMENT_CAMERA_CONTROL ENABLE_MODEL_ELEMENT_ANIMATION_CONTROL ENABLE_MODEL_ELEMENT_AUDIO_CONTROL Finally, we modify the macOS version used to define the HAVE_ASV_INLINE_PREVIEW_XXX_CONTROL flags. * wtf/PlatformEnableCocoa.h: * wtf/PlatformHave.h: Canonical link: https://commits.webkit.org/244608@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
309 additions
and 93 deletions.
- +33 −0 Source/WTF/ChangeLog
- +8 −10 Source/WTF/wtf/PlatformEnableCocoa.h
- +15 −2 Source/WTF/wtf/PlatformHave.h
- +19 −0 Source/WebCore/ChangeLog
- +6 −0 Source/WebCore/Modules/model-element/HTMLModelElement.cpp
- +8 −0 Source/WebCore/Modules/model-element/HTMLModelElement.h
- +13 −13 Source/WebCore/Modules/model-element/HTMLModelElement.idl
- +6 −0 Source/WebCore/Modules/model-element/ModelPlayer.h
- +6 −0 Source/WebCore/Modules/model-element/dummy/DummyModelPlayer.cpp
- +6 −0 Source/WebCore/Modules/model-element/dummy/DummyModelPlayer.h
- +6 −0 Source/WebCore/Modules/model-element/scenekit/SceneKitModelPlayer.h
- +6 −0 Source/WebCore/Modules/model-element/scenekit/SceneKitModelPlayer.mm
- +15 −0 Source/WebCore/PAL/ChangeLog
- +0 −4 Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h
- +2 −2 Source/WebCore/PAL/pal/spi/ios/SystemPreviewSPI.h
- +3 −3 Source/WebCore/PAL/pal/spi/mac/SystemPreviewSPI.h
- +53 −0 Source/WebKit/ChangeLog
- +7 −7 Source/WebKit/Shared/ModelIdentifier.h
- +34 −23 Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm
- +11 −5 Source/WebKit/UIProcess/ModelElementController.h
- +2 −2 Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm
- +8 −2 Source/WebKit/UIProcess/WebPageProxy.cpp
- +8 −2 Source/WebKit/UIProcess/WebPageProxy.h
- +7 −3 Source/WebKit/UIProcess/WebPageProxy.messages.in
- +1 −1 Source/WebKit/UIProcess/ios/WKModelInteractionGestureRecognizer.h
- +1 −1 Source/WebKit/UIProcess/ios/WKModelInteractionGestureRecognizer.mm
- +1 −1 Source/WebKit/UIProcess/ios/WKModelView.h
- +1 −1 Source/WebKit/UIProcess/ios/WKModelView.mm
- +6 −0 Source/WebKit/WebProcess/Model/ARKitInlinePreviewModelPlayer.h
- +6 −0 Source/WebKit/WebProcess/Model/ARKitInlinePreviewModelPlayer.mm
- +4 −4 Source/WebKit/WebProcess/Model/WebModelPlayerProvider.cpp
- +1 −1 Source/WebKit/WebProcess/Model/ios/ARKitInlinePreviewModelPlayerIOS.h
- +1 −1 Source/WebKit/WebProcess/Model/ios/ARKitInlinePreviewModelPlayerIOS.mm
- +1 −1 Source/WebKit/WebProcess/Model/mac/ARKitInlinePreviewModelPlayerMac.h
- +2 −2 Source/WebKit/WebProcess/Model/mac/ARKitInlinePreviewModelPlayerMac.mm
- +2 −2 Source/WebKit/WebProcess/WebProcess.cpp
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
Oops, something went wrong.