| Summary: | [Model] add support for controlling looping 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 02:43:47 PST
Created attachment 444795 [details]
Patch
Comment on attachment 444795 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=444795&action=review > Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm:366 > + callOnMainRunLoop([weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler), error = WebCore::ResourceError { WebCore::ResourceError::Type::General }] () mutable { Nit - might be simpler as `completionHandler(makeUnexpected(WebCore::ResourceError { WebCore::ResourceError::Type::General }));`, instead of copying the error via block capture. > Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm:397 > + callOnMainRunLoop([weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler)] () mutable { Same question as the other patch — could we clarify why we need these `callOnMainRunLoop`s? (In reply to Wenson Hsieh from comment #3) > Comment on attachment 444795 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=444795&action=review > > > Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm:366 > > + callOnMainRunLoop([weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler), error = WebCore::ResourceError { WebCore::ResourceError::Type::General }] () mutable { > > Nit - might be simpler as > `completionHandler(makeUnexpected(WebCore::ResourceError { > WebCore::ResourceError::Type::General }));`, instead of copying the error > via block capture. Absolutely, will fix when landing. > > Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm:397 > > + callOnMainRunLoop([weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler)] () mutable { > > Same question as the other patch — could we clarify why we need these > `callOnMainRunLoop`s? I think we only need those when using block-based APIs, will remove the use of `callOnMainRunLoop()` when landing. Committed r286066 (244453@main): <https://commits.webkit.org/244453@main> |