RESOLVED FIXED 186130
Move animated resize into the layer tree transaction, and make it asynchronous
https://bugs.webkit.org/show_bug.cgi?id=186130
Summary Move animated resize into the layer tree transaction, and make it asynchronous
Tim Horton
Reported 2018-05-31 01:15:56 PDT
Move animated resize into the layer tree transaction, and make it asynchronous
Attachments
Patch (44.67 KB, patch)
2018-05-31 01:16 PDT, Tim Horton
no flags
Patch (46.46 KB, patch)
2018-05-31 17:38 PDT, Tim Horton
no flags
Patch (66.11 KB, patch)
2018-06-05 19:04 PDT, Tim Horton
no flags
Patch (66.30 KB, patch)
2018-06-05 23:28 PDT, Tim Horton
no flags
Patch (64.33 KB, patch)
2018-06-05 23:33 PDT, Tim Horton
no flags
Archive of layout-test-results from ews200 for win-future (12.81 MB, application/zip)
2018-06-06 02:46 PDT, EWS Watchlist
no flags
Tim Horton
Comment 1 2018-05-31 01:16:56 PDT
Tim Horton
Comment 2 2018-05-31 01:17:38 PDT
Not sure this is 100% done (and it definitely needs a changelog), but it’s getting there.
Tim Horton
Comment 3 2018-05-31 17:38:21 PDT
Sam Weinig
Comment 4 2018-06-01 19:34:09 PDT
Very cool! Given how complex this logic is, do you have any ideas about how we could add automated tests for this?
Tim Horton
Comment 5 2018-06-01 19:57:14 PDT
Pretty sure we already have API tests for animated resize. I’m not sure it’s worth it to write an API test for “animated resize doesn’t synchronously block the UI process”, though.
Tim Horton
Comment 6 2018-06-01 19:57:58 PDT
It is possible we could test some of the smaller changes, though.
Simon Fraser (smfr)
Comment 7 2018-06-05 10:25:24 PDT
Comment on attachment 341717 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=341717&action=review > Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:274 > + std::optional<uint64_t> dynamicViewportSizeUpdateID() const { return m_dynamicViewportSizeUpdateID; } Why do we not have typedefs for uint64_t things. > Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:312 > + std::optional<uint64_t> m_dynamicViewportSizeUpdateID { std::nullopt }; No need to initialize to nullopt. Same with the one above. > Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:352 > + BOOL _waitingForEndAnimatedResize; > + BOOL _waitingForCommitAfterAnimatedResize; Do these get cleared in "the web process did crash" code path? > Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:1758 > +- (void)_didCommitLayerTreeDuringAnimatedResize:(const WebKit::RemoteLayerTreeTransaction&)layerTreeTransaction Things kinda sounds like it should return a BOOL, but I can't think of a better name. > Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:2917 > + if (!_lastSentViewLayoutSize || newViewLayoutSize != _lastSentViewLayoutSize.value()) > + [self _dispatchSetViewLayoutSize:newViewLayoutSize]; > + if (!_lastSentMaximumUnobscuredSize || newMaximumUnobscuredSize != _lastSentMaximumUnobscuredSize.value()) > + [self _dispatchSetMaximumUnobscuredSize:WebCore::FloatSize(newMaximumUnobscuredSize)]; > + if (!_lastSentDeviceOrientation || newOrientation != _lastSentDeviceOrientation.value()) > + [self _dispatchSetDeviceOrientation:newOrientation]; Some blank lines between these would be nice. > Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:316 > + m_process->send(Messages::WebPage::DynamicViewportSizeUpdate(viewLayoutSize, maximumUnobscuredSize, targetExposedContentRect, targetUnobscuredRect, targetUnobscuredRectInScrollViewCoordinates, unobscuredSafeAreaInsets, targetScale, deviceOrientation, dynamicViewportSizeUpdateID), m_pageID); Maybe unwrap this. > Source/WebKit/WebProcess/WebPage/WebPage.h:1658 > uint64_t m_currentAssistedNodeIdentifier { 0 }; Oh look a uint64_t that's something totally different.
Tim Horton
Comment 8 2018-06-05 19:04:18 PDT
Tim Horton
Comment 9 2018-06-05 19:04:46 PDT
Still have to make the crash case work right. There’s a bunch of preexisting problems, I’m just adding some more :)
Tim Horton
Comment 10 2018-06-05 23:28:38 PDT
Tim Horton
Comment 11 2018-06-05 23:33:40 PDT
Tim Horton
Comment 12 2018-06-05 23:34:47 PDT
(In reply to Tim Horton from comment #9) > Still have to make the crash case work right. There’s a bunch of preexisting > problems, I’m just adding some more :) Not true! It’s actually fine. But we should clean the existing mechanism up, because it duplicates a lot of code.
Tim Horton
Comment 13 2018-06-05 23:37:13 PDT
EWS Watchlist
Comment 14 2018-06-06 02:46:29 PDT
Comment on attachment 342037 [details] Patch Attachment 342037 [details] did not pass win-ews (win): Output: http://webkit-queues.webkit.org/results/8027639 New failing tests: storage/domstorage/storage-close-database-on-idle.html
EWS Watchlist
Comment 15 2018-06-06 02:46:40 PDT
Created attachment 342041 [details] Archive of layout-test-results from ews200 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews200 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
WebKit Commit Bot
Comment 16 2018-06-06 09:32:32 PDT
Comment on attachment 342037 [details] Patch Clearing flags on attachment: 342037 Committed r232544: <https://trac.webkit.org/changeset/232544>
WebKit Commit Bot
Comment 17 2018-06-06 09:32:33 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.