| Summary: | [Model] add support for seeking animations | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Antoine Quint <graouts> | ||||
| Component: | New Bugs | Assignee: | Antoine Quint <graouts> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | cdumez, dino, esprehn+autocc, ews-watchlist, kondapallykalyan, thorton, webkit-bug-importer, wenson_hsieh | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Antoine Quint
2021-11-19 05:53:27 PST
Created attachment 444811 [details]
Patch
Comment on attachment 444811 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=444811&action=review > Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm:367 > + callOnMainRunLoop([weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler), error = WebCore::ResourceError { WebCore::ResourceError::Type::General }] () mutable { Nit - I would just pass in `WebCore::ResourceError { WebCore::ResourceError::Type::General }` below, instead of copying it in the block. > Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm:376 > + callOnMainRunLoop([duration, weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler)] () mutable { It's not super clear from reading the code (or the ChangeLog) why this would need to be called on the next runloop. Could we explain in either the ChangeLog or a comment here? > Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm:389 > + callOnMainRunLoop([weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler), error = WebCore::ResourceError { WebCore::ResourceError::Type::General }] () mutable { (Ditto re: the error) > Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm:398 > + callOnMainRunLoop([currentTime, weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler)] () mutable { (Ditto) > Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm:420 > + callOnMainRunLoop([weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler)] () mutable { (Ditto) (In reply to Wenson Hsieh from comment #3) > Comment on attachment 444811 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=444811&action=review > > > Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm:367 > > + callOnMainRunLoop([weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler), error = WebCore::ResourceError { WebCore::ResourceError::Type::General }] () mutable { > > Nit - I would just pass in `WebCore::ResourceError { > WebCore::ResourceError::Type::General }` below, instead of copying it in the > block. Will fix in commit. > > Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm:376 > > + callOnMainRunLoop([duration, weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler)] () mutable { > > It's not super clear from reading the code (or the ChangeLog) why this would > need to be called on the next runloop. Could we explain in either the > ChangeLog or a comment here? > > > Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm:389 > > + callOnMainRunLoop([weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler), error = WebCore::ResourceError { WebCore::ResourceError::Type::General }] () mutable { > > (Ditto re: the error) > > > Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm:398 > > + callOnMainRunLoop([currentTime, weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler)] () mutable { > > (Ditto) > > > Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm:420 > > + callOnMainRunLoop([weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler)] () mutable { > > (Ditto) I'll remove all calls to callOnMainRunLoop() in the commit. Committed r286068 (244455@main): <https://commits.webkit.org/244455@main> |