Changeset 286068 in webkit
- Timestamp:
- Nov 19, 2021 11:05:53 AM (8 months ago)
- Location:
- trunk/Source
- Files:
-
- 20 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/Modules/model-element/HTMLModelElement.cpp (modified) (2 diffs)
-
WebCore/Modules/model-element/HTMLModelElement.h (modified) (1 diff)
-
WebCore/Modules/model-element/HTMLModelElement.idl (modified) (1 diff)
-
WebCore/Modules/model-element/ModelPlayer.h (modified) (2 diffs)
-
WebCore/Modules/model-element/dummy/DummyModelPlayer.cpp (modified) (2 diffs)
-
WebCore/Modules/model-element/dummy/DummyModelPlayer.h (modified) (1 diff)
-
WebCore/Modules/model-element/scenekit/SceneKitModelPlayer.h (modified) (1 diff)
-
WebCore/Modules/model-element/scenekit/SceneKitModelPlayer.mm (modified) (1 diff)
-
WebCore/PAL/ChangeLog (modified) (1 diff)
-
WebCore/PAL/pal/spi/ios/SystemPreviewSPI.h (modified) (1 diff)
-
WebCore/PAL/pal/spi/mac/SystemPreviewSPI.h (modified) (1 diff)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm (modified) (1 diff)
-
WebKit/UIProcess/ModelElementController.h (modified) (1 diff)
-
WebKit/UIProcess/WebPageProxy.cpp (modified) (1 diff)
-
WebKit/UIProcess/WebPageProxy.h (modified) (1 diff)
-
WebKit/UIProcess/WebPageProxy.messages.in (modified) (1 diff)
-
WebKit/WebProcess/Model/ARKitInlinePreviewModelPlayer.h (modified) (1 diff)
-
WebKit/WebProcess/Model/ARKitInlinePreviewModelPlayer.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r286067 r286068 1 2021-11-19 Antoine Quint <graouts@webkit.org> 2 3 [Model] add support for seeking animations 4 https://bugs.webkit.org/show_bug.cgi?id=233362 5 <rdar://problem/85428812> 6 7 Reviewed by Wenson Hsieh. 8 9 We add three new promise-based methods to the HTMLModelElement IDL to allow seeking the animation 10 built into the USDZ asset: animationDuration(), animationCurrentTime() and setAnimationCurrentTime(). 11 All these methods are promise-based. 12 13 * Modules/model-element/HTMLModelElement.cpp: 14 (WebCore::HTMLModelElement::animationDuration): 15 (WebCore::HTMLModelElement::animationCurrentTime): 16 (WebCore::HTMLModelElement::setAnimationCurrentTime): 17 * Modules/model-element/HTMLModelElement.h: 18 * Modules/model-element/HTMLModelElement.idl: 19 * Modules/model-element/ModelPlayer.h: 20 * Modules/model-element/dummy/DummyModelPlayer.cpp: 21 (WebCore::DummyModelPlayer::animationDuration): 22 (WebCore::DummyModelPlayer::animationCurrentTime): 23 (WebCore::DummyModelPlayer::setAnimationCurrentTime): 24 * Modules/model-element/dummy/DummyModelPlayer.h: 25 * Modules/model-element/scenekit/SceneKitModelPlayer.h: 26 * Modules/model-element/scenekit/SceneKitModelPlayer.mm: 27 (WebCore::SceneKitModelPlayer::animationDuration): 28 (WebCore::SceneKitModelPlayer::animationCurrentTime): 29 (WebCore::SceneKitModelPlayer::setAnimationCurrentTime): 30 1 31 2021-11-19 Ryan Haddad <ryanhaddad@apple.com> 2 32 -
trunk/Source/WebCore/Modules/model-element/HTMLModelElement.cpp
r286066 r286068 57 57 #include "RenderModel.h" 58 58 #include <wtf/IsoMallocInlines.h> 59 #include <wtf/Seconds.h> 59 60 #include <wtf/URL.h> 60 61 … … 468 469 } 469 470 471 void HTMLModelElement::animationDuration(DurationPromise&& promise) 472 { 473 if (!m_modelPlayer) { 474 promise.reject(); 475 return; 476 } 477 478 m_modelPlayer->animationDuration([promise = WTFMove(promise)] (std::optional<Seconds> duration) mutable { 479 if (!duration) 480 promise.reject(); 481 else 482 promise.resolve(duration->seconds()); 483 }); 484 } 485 486 void HTMLModelElement::animationCurrentTime(CurrentTimePromise&& promise) 487 { 488 if (!m_modelPlayer) { 489 promise.reject(); 490 return; 491 } 492 493 m_modelPlayer->animationCurrentTime([promise = WTFMove(promise)] (std::optional<Seconds> currentTime) mutable { 494 if (!currentTime) 495 promise.reject(); 496 else 497 promise.resolve(currentTime->seconds()); 498 }); 499 } 500 501 void HTMLModelElement::setAnimationCurrentTime(double currentTime, DOMPromiseDeferred<void>&& promise) 502 { 503 if (!m_modelPlayer) { 504 promise.reject(); 505 return; 506 } 507 508 m_modelPlayer->setAnimationCurrentTime(Seconds(currentTime), [promise = WTFMove(promise)] (bool success) mutable { 509 if (success) 510 promise.resolve(); 511 else 512 promise.reject(); 513 }); 514 } 515 470 516 // MARK: - Audio support. 471 517 -
trunk/Source/WebCore/Modules/model-element/HTMLModelElement.h
r286066 r286068 85 85 void setIsLoopingAnimation(bool, DOMPromiseDeferred<void>&&); 86 86 87 using DurationPromise = DOMPromiseDeferred<IDLDouble>; 88 void animationDuration(DurationPromise&&); 89 using CurrentTimePromise = DOMPromiseDeferred<IDLDouble>; 90 void animationCurrentTime(CurrentTimePromise&&); 91 void setAnimationCurrentTime(double, DOMPromiseDeferred<void>&&); 92 87 93 using HasAudioPromise = DOMPromiseDeferred<IDLBoolean>; 88 94 void hasAudio(HasAudioPromise&&); -
trunk/Source/WebCore/Modules/model-element/HTMLModelElement.idl
r286066 r286068 45 45 Promise<undefined> setIsLoopingAnimation(boolean looping); 46 46 47 Promise<double> animationDuration(); 48 Promise<double> animationCurrentTime(); 49 Promise<undefined> setAnimationCurrentTime(double currentTime); 50 47 51 Promise<boolean> hasAudio(); 48 52 Promise<boolean> isMuted(); -
trunk/Source/WebCore/Modules/model-element/ModelPlayer.h
r286066 r286068 33 33 #include <wtf/Forward.h> 34 34 #include <wtf/MonotonicTime.h> 35 #include <wtf/Seconds.h> 35 36 36 37 namespace WebCore { … … 56 57 virtual void isLoopingAnimation(CompletionHandler<void(std::optional<bool>&&)>&&) = 0; 57 58 virtual void setIsLoopingAnimation(bool, CompletionHandler<void(bool success)>&&) = 0; 59 virtual void animationDuration(CompletionHandler<void(std::optional<Seconds>&&)>&&) = 0; 60 virtual void animationCurrentTime(CompletionHandler<void(std::optional<Seconds>&&)>&&) = 0; 61 virtual void setAnimationCurrentTime(Seconds, CompletionHandler<void(bool success)>&&) = 0; 58 62 virtual void hasAudio(CompletionHandler<void(std::optional<bool>&&)>&&) = 0; 59 63 virtual void isMuted(CompletionHandler<void(std::optional<bool>&&)>&&) = 0; -
trunk/Source/WebCore/Modules/model-element/dummy/DummyModelPlayer.cpp
r286066 r286068 87 87 } 88 88 89 void DummyModelPlayer::hasAudio(CompletionHandler<void(std::optional<bool>&&)>&&)90 {91 }92 93 89 void DummyModelPlayer::isLoopingAnimation(CompletionHandler<void(std::optional<bool>&&)>&&) 94 90 { … … 96 92 97 93 void DummyModelPlayer::setIsLoopingAnimation(bool, CompletionHandler<void(bool success)>&&) 94 { 95 } 96 97 void DummyModelPlayer::animationDuration(CompletionHandler<void(std::optional<Seconds>&&)>&&) 98 { 99 } 100 101 void DummyModelPlayer::animationCurrentTime(CompletionHandler<void(std::optional<Seconds>&&)>&&) 102 { 103 } 104 105 void DummyModelPlayer::setAnimationCurrentTime(Seconds, CompletionHandler<void(bool success)>&&) 106 { 107 } 108 109 void DummyModelPlayer::hasAudio(CompletionHandler<void(std::optional<bool>&&)>&&) 98 110 { 99 111 } -
trunk/Source/WebCore/Modules/model-element/dummy/DummyModelPlayer.h
r286066 r286068 54 54 void isLoopingAnimation(CompletionHandler<void(std::optional<bool>&&)>&&) override; 55 55 void setIsLoopingAnimation(bool, CompletionHandler<void(bool success)>&&) override; 56 void animationDuration(CompletionHandler<void(std::optional<Seconds>&&)>&&) override; 57 void animationCurrentTime(CompletionHandler<void(std::optional<Seconds>&&)>&&) override; 58 void setAnimationCurrentTime(Seconds, CompletionHandler<void(bool success)>&&) override; 56 59 void hasAudio(CompletionHandler<void(std::optional<bool>&&)>&&) override; 57 60 void isMuted(CompletionHandler<void(std::optional<bool>&&)>&&) override; -
trunk/Source/WebCore/Modules/model-element/scenekit/SceneKitModelPlayer.h
r286066 r286068 68 68 void isLoopingAnimation(CompletionHandler<void(std::optional<bool>&&)>&&) override; 69 69 void setIsLoopingAnimation(bool, CompletionHandler<void(bool success)>&&) override; 70 void animationDuration(CompletionHandler<void(std::optional<Seconds>&&)>&&) override; 71 void animationCurrentTime(CompletionHandler<void(std::optional<Seconds>&&)>&&) override; 72 void setAnimationCurrentTime(Seconds, CompletionHandler<void(bool success)>&&) override; 70 73 void hasAudio(CompletionHandler<void(std::optional<bool>&&)>&&) override; 71 74 void isMuted(CompletionHandler<void(std::optional<bool>&&)>&&) override; -
trunk/Source/WebCore/Modules/model-element/scenekit/SceneKitModelPlayer.mm
r286066 r286068 113 113 } 114 114 115 void SceneKitModelPlayer::animationDuration(CompletionHandler<void(std::optional<Seconds>&&)>&&) 116 { 117 } 118 119 void SceneKitModelPlayer::animationCurrentTime(CompletionHandler<void(std::optional<Seconds>&&)>&&) 120 { 121 } 122 123 void SceneKitModelPlayer::setAnimationCurrentTime(Seconds, CompletionHandler<void(bool success)>&&) 124 { 125 } 126 115 127 void SceneKitModelPlayer::hasAudio(CompletionHandler<void(std::optional<bool>&&)>&&) 116 128 { -
trunk/Source/WebCore/PAL/ChangeLog
r286067 r286068 1 2021-11-19 Antoine Quint <graouts@webkit.org> 2 3 [Model] add support for seeking animations 4 https://bugs.webkit.org/show_bug.cgi?id=233362 5 <rdar://problem/85428812> 6 7 Reviewed by Wenson Hsieh. 8 9 Add the new ARQL SPIs we are using to query the animation duration, the current and time 10 as well as allowing to set the latter. 11 12 * pal/spi/ios/SystemPreviewSPI.h: 13 * pal/spi/mac/SystemPreviewSPI.h: 14 1 15 2021-11-19 Ryan Haddad <ryanhaddad@apple.com> 2 16 -
trunk/Source/WebCore/PAL/pal/spi/ios/SystemPreviewSPI.h
r286066 r286068 109 109 - (void)setCameraTransform:(simd_float3)transform; 110 110 111 @property (nonatomic, readwrite) NSTimeInterval currentTime; 112 @property (nonatomic, readonly) NSTimeInterval duration; 111 113 @property (nonatomic, readwrite) BOOL isLooping; 112 114 @property (nonatomic, readonly) BOOL isPlaying; -
trunk/Source/WebCore/PAL/pal/spi/mac/SystemPreviewSPI.h
r286066 r286068 59 59 - (void)setCameraTransform:(simd_float3)transform; 60 60 61 @property (nonatomic, readwrite) NSTimeInterval currentTime; 62 @property (nonatomic, readonly) NSTimeInterval duration; 61 63 @property (nonatomic, readwrite) BOOL isLooping; 62 64 @property (nonatomic, readonly) BOOL isPlaying; -
trunk/Source/WebKit/ChangeLog
r286067 r286068 1 2021-11-19 Antoine Quint <graouts@webkit.org> 2 3 [Model] add support for seeking animations 4 https://bugs.webkit.org/show_bug.cgi?id=233362 5 <rdar://problem/85428812> 6 7 Reviewed by Wenson Hsieh. 8 9 Expose new WebPageProxy messages to let the WebProcess message the UIProcess 10 to call into ASVInlinePreview methods to get and set the animation's current 11 time as well as getting its duration. 12 13 * UIProcess/Cocoa/ModelElementControllerCocoa.mm: 14 (WebKit::ModelElementController::animationDurationForModelElement): 15 (WebKit::ModelElementController::animationCurrentTimeForModelElement): 16 (WebKit::ModelElementController::setAnimationCurrentTimeForModelElement): 17 * UIProcess/ModelElementController.h: 18 * UIProcess/WebPageProxy.cpp: 19 (WebKit::WebPageProxy::modelElementAnimationDuration): 20 (WebKit::WebPageProxy::modelElementAnimationCurrentTime): 21 (WebKit::WebPageProxy::modelElementSetAnimationCurrentTime): 22 * UIProcess/WebPageProxy.h: 23 * UIProcess/WebPageProxy.messages.in: 24 * WebProcess/Model/ARKitInlinePreviewModelPlayer.h: 25 * WebProcess/Model/ARKitInlinePreviewModelPlayer.mm: 26 (WebKit::ARKitInlinePreviewModelPlayer::animationDuration): 27 (WebKit::ARKitInlinePreviewModelPlayer::animationCurrentTime): 28 (WebKit::ARKitInlinePreviewModelPlayer::setAnimationCurrentTime): 29 1 30 2021-11-19 Ryan Haddad <ryanhaddad@apple.com> 2 31 -
trunk/Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm
r286066 r286068 391 391 } 392 392 393 void ModelElementController::animationDurationForModelElement(ModelIdentifier modelIdentifier, CompletionHandler<void(Expected<Seconds, WebCore::ResourceError>)>&& completionHandler) 394 { 395 auto* preview = previewForModelIdentifier(modelIdentifier); 396 if (!previewHasAnimationSupport(preview)) { 397 completionHandler(makeUnexpected(WebCore::ResourceError { WebCore::ResourceError::Type::General })); 398 return; 399 } 400 401 #if ENABLE(ARKIT_INLINE_PREVIEW_ANIMATIONS_CONTROL) 402 completionHandler(Seconds([preview duration])); 403 #else 404 ASSERT_NOT_REACHED(); 405 #endif 406 } 407 408 void ModelElementController::animationCurrentTimeForModelElement(ModelIdentifier modelIdentifier, CompletionHandler<void(Expected<Seconds, WebCore::ResourceError>)>&& completionHandler) 409 { 410 auto* preview = previewForModelIdentifier(modelIdentifier); 411 if (!previewHasAnimationSupport(preview)) { 412 completionHandler(makeUnexpected(WebCore::ResourceError { WebCore::ResourceError::Type::General })); 413 return; 414 } 415 416 #if ENABLE(ARKIT_INLINE_PREVIEW_ANIMATIONS_CONTROL) 417 completionHandler(Seconds([preview currentTime])); 418 #else 419 ASSERT_NOT_REACHED(); 420 #endif 421 } 422 423 void ModelElementController::setAnimationCurrentTimeForModelElement(ModelIdentifier modelIdentifier, Seconds currentTime, CompletionHandler<void(bool)>&& completionHandler) 424 { 425 auto* preview = previewForModelIdentifier(modelIdentifier); 426 if (!previewHasAnimationSupport(preview)) { 427 completionHandler(false); 428 return; 429 } 430 431 #if ENABLE(ARKIT_INLINE_PREVIEW_ANIMATIONS_CONTROL) 432 preview.currentTime = currentTime.seconds(); 433 completionHandler(true); 434 #else 435 ASSERT_NOT_REACHED(); 436 #endif 437 } 393 438 394 439 static bool previewHasAudioSupport(ASVInlinePreview *preview) -
trunk/Source/WebKit/UIProcess/ModelElementController.h
r286066 r286068 59 59 void isLoopingAnimationForModelElement(ModelIdentifier, CompletionHandler<void(Expected<bool, WebCore::ResourceError>)>&&); 60 60 void setIsLoopingAnimationForModelElement(ModelIdentifier, bool, CompletionHandler<void(bool)>&&); 61 void animationDurationForModelElement(ModelIdentifier, CompletionHandler<void(Expected<Seconds, WebCore::ResourceError>)>&&); 62 void animationCurrentTimeForModelElement(ModelIdentifier, CompletionHandler<void(Expected<Seconds, WebCore::ResourceError>)>&&); 63 void setAnimationCurrentTimeForModelElement(ModelIdentifier, Seconds, CompletionHandler<void(bool)>&&); 61 64 void hasAudioForModelElement(ModelIdentifier, CompletionHandler<void(Expected<bool, WebCore::ResourceError>)>&&); 62 65 void isMutedForModelElement(ModelIdentifier, CompletionHandler<void(Expected<bool, WebCore::ResourceError>)>&&); -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r286066 r286068 10864 10864 } 10865 10865 10866 void WebPageProxy::modelElementAnimationDuration(ModelIdentifier modelIdentifier, CompletionHandler<void(Expected<Seconds, WebCore::ResourceError>)>&& completionHandler) 10867 { 10868 modelElementController()->animationDurationForModelElement(modelIdentifier, WTFMove(completionHandler)); 10869 } 10870 10871 void WebPageProxy::modelElementAnimationCurrentTime(ModelIdentifier modelIdentifier, CompletionHandler<void(Expected<Seconds, WebCore::ResourceError>)>&& completionHandler) 10872 { 10873 modelElementController()->animationCurrentTimeForModelElement(modelIdentifier, WTFMove(completionHandler)); 10874 } 10875 10876 void WebPageProxy::modelElementSetAnimationCurrentTime(ModelIdentifier modelIdentifier, Seconds currentTime, CompletionHandler<void(bool)>&& completionHandler) 10877 { 10878 modelElementController()->setAnimationCurrentTimeForModelElement(modelIdentifier, currentTime, WTFMove(completionHandler)); 10879 } 10880 10866 10881 void WebPageProxy::modelElementHasAudio(ModelIdentifier modelIdentifier, CompletionHandler<void(Expected<bool, ResourceError>)>&& completionHandler) 10867 10882 { -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r286066 r286068 595 595 void modelElementIsLoopingAnimation(ModelIdentifier, CompletionHandler<void(Expected<bool, WebCore::ResourceError>)>&&); 596 596 void modelElementSetIsLoopingAnimation(ModelIdentifier, bool, CompletionHandler<void(bool)>&&); 597 void modelElementAnimationDuration(ModelIdentifier, CompletionHandler<void(Expected<Seconds, WebCore::ResourceError>)>&&); 598 void modelElementAnimationCurrentTime(ModelIdentifier, CompletionHandler<void(Expected<Seconds, WebCore::ResourceError>)>&&); 599 void modelElementSetAnimationCurrentTime(ModelIdentifier, Seconds, CompletionHandler<void(bool)>&&); 597 600 void modelElementHasAudio(ModelIdentifier, CompletionHandler<void(Expected<bool, WebCore::ResourceError>)>&&); 598 601 void modelElementIsMuted(ModelIdentifier, CompletionHandler<void(Expected<bool, WebCore::ResourceError>)>&&); -
trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in
r286066 r286068 602 602 ModelElementIsLoopingAnimation(struct WebKit::ModelIdentifier modelIdentifier) -> (Expected<bool, WebCore::ResourceError> result) Async 603 603 ModelElementSetIsLoopingAnimation(struct WebKit::ModelIdentifier modelIdentifier, bool isLooping) -> (bool success) Async 604 ModelElementAnimationDuration(struct WebKit::ModelIdentifier modelIdentifier) -> (Expected<Seconds, WebCore::ResourceError> result) Async 605 ModelElementAnimationCurrentTime(struct WebKit::ModelIdentifier modelIdentifier) -> (Expected<Seconds, WebCore::ResourceError> result) Async 606 ModelElementSetAnimationCurrentTime(struct WebKit::ModelIdentifier modelIdentifier, Seconds currentTime) -> (bool success) Async 604 607 ModelElementHasAudio(struct WebKit::ModelIdentifier modelIdentifier) -> (Expected<bool, WebCore::ResourceError> result) Async 605 608 ModelElementIsMuted(struct WebKit::ModelIdentifier modelIdentifier) -> (Expected<bool, WebCore::ResourceError> result) Async -
trunk/Source/WebKit/WebProcess/Model/ARKitInlinePreviewModelPlayer.h
r286066 r286068 60 60 void isLoopingAnimation(CompletionHandler<void(std::optional<bool>&&)>&&) override; 61 61 void setIsLoopingAnimation(bool, CompletionHandler<void(bool success)>&&) override; 62 void animationDuration(CompletionHandler<void(std::optional<Seconds>&&)>&&) override; 63 void animationCurrentTime(CompletionHandler<void(std::optional<Seconds>&&)>&&) override; 64 void setAnimationCurrentTime(Seconds, CompletionHandler<void(bool success)>&&) override; 62 65 void hasAudio(CompletionHandler<void(std::optional<bool>&&)>&&) override; 63 66 void isMuted(CompletionHandler<void(std::optional<bool>&&)>&&) override; -
trunk/Source/WebKit/WebProcess/Model/ARKitInlinePreviewModelPlayer.mm
r286066 r286068 197 197 } 198 198 199 void ARKitInlinePreviewModelPlayer::animationDuration(CompletionHandler<void(std::optional<Seconds>&&)>&& completionHandler) 200 { 201 auto modelIdentifier = this->modelIdentifier(); 202 if (!modelIdentifier) { 203 completionHandler(std::nullopt); 204 return; 205 } 206 207 RefPtr strongPage = m_page.get(); 208 if (!strongPage) { 209 completionHandler(std::nullopt); 210 return; 211 } 212 213 CompletionHandler<void(Expected<Seconds, WebCore::ResourceError>)> remoteCompletionHandler = [completionHandler = WTFMove(completionHandler)] (Expected<Seconds, WebCore::ResourceError> result) mutable { 214 if (!result) { 215 completionHandler(std::nullopt); 216 return; 217 } 218 219 completionHandler(*result); 220 }; 221 222 strongPage->sendWithAsyncReply(Messages::WebPageProxy::ModelElementAnimationDuration(*modelIdentifier), WTFMove(remoteCompletionHandler)); 223 } 224 225 void ARKitInlinePreviewModelPlayer::animationCurrentTime(CompletionHandler<void(std::optional<Seconds>&&)>&& completionHandler) 226 { 227 auto modelIdentifier = this->modelIdentifier(); 228 if (!modelIdentifier) { 229 completionHandler(std::nullopt); 230 return; 231 } 232 233 RefPtr strongPage = m_page.get(); 234 if (!strongPage) { 235 completionHandler(std::nullopt); 236 return; 237 } 238 239 CompletionHandler<void(Expected<Seconds, WebCore::ResourceError>)> remoteCompletionHandler = [completionHandler = WTFMove(completionHandler)] (Expected<Seconds, WebCore::ResourceError> result) mutable { 240 if (!result) { 241 completionHandler(std::nullopt); 242 return; 243 } 244 245 completionHandler(*result); 246 }; 247 248 strongPage->sendWithAsyncReply(Messages::WebPageProxy::ModelElementAnimationCurrentTime(*modelIdentifier), WTFMove(remoteCompletionHandler)); 249 } 250 251 void ARKitInlinePreviewModelPlayer::setAnimationCurrentTime(Seconds currentTime, CompletionHandler<void(bool success)>&& completionHandler) 252 { 253 auto modelIdentifier = this->modelIdentifier(); 254 if (!modelIdentifier) { 255 completionHandler(false); 256 return; 257 } 258 259 RefPtr strongPage = m_page.get(); 260 if (!strongPage) { 261 completionHandler(false); 262 return; 263 } 264 265 CompletionHandler<void(bool)> remoteCompletionHandler = [completionHandler = WTFMove(completionHandler)] (bool success) mutable { 266 completionHandler(success); 267 }; 268 269 strongPage->sendWithAsyncReply(Messages::WebPageProxy::ModelElementSetAnimationCurrentTime(*modelIdentifier, currentTime), WTFMove(remoteCompletionHandler)); 270 } 271 199 272 void ARKitInlinePreviewModelPlayer::hasAudio(CompletionHandler<void(std::optional<bool>&&)>&& completionHandler) 200 273 {
Note: See TracChangeset
for help on using the changeset viewer.