Bug 187500

Summary: doAfterNextPresentationUpdate should not be called while content is hidden due to animated resize
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, commit-queue, ews-watchlist, simon.fraser, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
simon.fraser: review+
Patch
none
Patch none

Tim Horton
Reported 2018-07-09 18:01:23 PDT
doAfterNextPresentationUpdate should not be called while content is hidden due to animated resize
Attachments
Patch (14.05 KB, patch)
2018-07-09 18:01 PDT, Tim Horton
simon.fraser: review+
Patch (14.02 KB, patch)
2018-07-09 22:45 PDT, Tim Horton
no flags
Patch (14.18 KB, patch)
2018-07-10 13:50 PDT, Tim Horton
no flags
Tim Horton
Comment 1 2018-07-09 18:01:48 PDT
EWS Watchlist
Comment 2 2018-07-09 18:03:37 PDT
Attachment 344649 [details] did not pass style-queue: ERROR: Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:350: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 1 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Simon Fraser (smfr)
Comment 3 2018-07-09 18:09:13 PDT
Comment on attachment 344649 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344649&action=review > Source/WebKit/ChangeLog:14 > + and asynchronously hide it when the resize/rotation is complete. This "asynchronously hide" -> "asynchronously show"? > Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:6358 > +- (void)_internalDoAfterNextPresentationUpdate:(void (^)(void))updateBlock withoutWaitingForPainting:(BOOL)withoutWaitingForPainting withoutWaitingForAnimatedResize:(BOOL)withoutWaitingForAnimatedResize The "without" BOOLs lead to hard to read code (imagine withoutWaitingForPainting:NO which is a double negative). > Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:6378 > + if (!withoutWaitingForAnimatedResize && strongSelf->_dynamicViewportUpdateMode != WebKit::DynamicViewportUpdateMode::NotResizing) { Now I have to think about what !withoutWaitingForAnimatedResize means > Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:6394 > + [self _internalDoAfterNextPresentationUpdate:updateBlock withoutWaitingForPainting:NO withoutWaitingForAnimatedResize:NO]; Arg
Tim Horton
Comment 4 2018-07-09 18:18:09 PDT
Comment on attachment 344649 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344649&action=review >> Source/WebKit/ChangeLog:14 >> + and asynchronously hide it when the resize/rotation is complete. This > > "asynchronously hide" -> "asynchronously show"? ... yes >> Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:6358 >> +- (void)_internalDoAfterNextPresentationUpdate:(void (^)(void))updateBlock withoutWaitingForPainting:(BOOL)withoutWaitingForPainting withoutWaitingForAnimatedResize:(BOOL)withoutWaitingForAnimatedResize > > The "without" BOOLs lead to hard to read code (imagine withoutWaitingForPainting:NO which is a double negative). I know, but withoutWaitingForPainting is the name of the existing and used SPI :(
Tim Horton
Comment 5 2018-07-09 20:36:06 PDT
Tim Horton
Comment 6 2018-07-09 22:45:49 PDT
EWS Watchlist
Comment 7 2018-07-09 22:47:29 PDT
Attachment 344668 [details] did not pass style-queue: ERROR: Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:350: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 1 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Simon Fraser (smfr)
Comment 8 2018-07-10 13:45:35 PDT
Comment on attachment 344649 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344649&action=review > Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:456 > +- (void)_doAfterNextPresentationUpdateWithoutWaitingForAnimatedResize:(void (^)(void))updateBlock WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); For testing?
Tim Horton
Comment 9 2018-07-10 13:50:13 PDT
EWS Watchlist
Comment 10 2018-07-10 13:53:14 PDT
Attachment 344719 [details] did not pass style-queue: ERROR: Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:350: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 1 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 11 2018-07-10 14:29:31 PDT
Comment on attachment 344719 [details] Patch Clearing flags on attachment: 344719 Committed r233698: <https://trac.webkit.org/changeset/233698>
WebKit Commit Bot
Comment 12 2018-07-10 14:29: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.