Summary: | [WK2][iOS] Avoid synchronous IPC on view state change when the content is not visible | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||
Component: | WebKit2 | Assignee: | Chris Dumez <cdumez> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | barraclough, darin, mitz, simon.fraser, thorton, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=134623 | ||||||||
Attachments: |
|
Description
Chris Dumez
2015-06-19 22:11:25 PDT
Created attachment 255278 [details]
Patch
Comment on attachment 255278 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=255278&action=review > Source/WebKit2/UIProcess/WebPageProxy.cpp:1376 > m_viewStateChangeWantsSynchronousReply = true; I wish we could just call "drawingArea->hideContentUntilNextUpdate()" here but it will display a grey tab until we get the IPC back, and I believe Tim told me this wasn't OK. (In reply to comment #2) > Comment on attachment 255278 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=255278&action=review > > > Source/WebKit2/UIProcess/WebPageProxy.cpp:1376 > > m_viewStateChangeWantsSynchronousReply = true; > > I wish we could just call "drawingArea->hideContentUntilNextUpdate()" here > but it will display a grey tab until we get the IPC back, and I believe Tim > told me this wasn't OK. Right, tab switch isn't allowed to flash unless it's unavoidable (sync IPC in both directions, for example). Comment on attachment 255278 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=255278&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:2594 > +- (void)_hideContentUntilNextUpdate Sad to expose this implementation detail, but it's not the worst thing. > Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:426 > + return !m_remoteLayerTreeHost.rootLayer(); Technically this could also mean that we haven't gotten the first commit yet (making the name slightly but probably not meaningfully inaccurate). Comment on attachment 255278 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=255278&action=review >> Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:426 >> + return !m_remoteLayerTreeHost.rootLayer(); > > Technically this could also mean that we haven't gotten the first commit yet (making the name slightly but probably not meaningfully inaccurate). Right, would "hasVisibleContent()" be better? Comment on attachment 255278 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=255278&action=review >>> Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:426 >>> + return !m_remoteLayerTreeHost.rootLayer(); >> >> Technically this could also mean that we haven't gotten the first commit yet (making the name slightly but probably not meaningfully inaccurate). > > Right, would "hasVisibleContent()" be better? I think so. Created attachment 255296 [details]
Patch
Comment on attachment 255296 [details] Patch Clearing flags on attachment: 255296 Committed r185799: <http://trac.webkit.org/changeset/185799> All reviewed patches have been landed. Closing bug. |