Summary: | Provide WKView SPI to defer telling the WebPageProxy and WebProcess about changes in the hosting window | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||||
Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | andersca, sam, simon.fraser | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Tim Horton
2013-02-20 17:30:31 PST
Created attachment 189425 [details]
patch
Comment on attachment 189425 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=189425&action=review Let's try some new names. > Source/WebKit2/UIProcess/API/mac/WKView.mm:211 > + unsigned _windowChangesDeferredCount; viewInWindowDeferredCount? > Source/WebKit2/UIProcess/API/mac/WKView.mm:1907 > + if ([self windowChangesDeferred]) { > + _data->_page->viewStateDidChange(WebPageProxy::ViewIsVisible); > + _data->_windowChangeWasDeferred = YES; The naming makes this confusing. It's easy to think that -windowChangesDeferred would return data->_windowChangeWasDeferred. > Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h:60 > +- (BOOL)windowChangesDeferred; How about: -beginDeferringViewInWindowChanges -endDeferringViewInWindowChanges -shouldDeferViewInWindowChanges Created attachment 189444 [details]
new names
Comment on attachment 189444 [details] new names View in context: https://bugs.webkit.org/attachment.cgi?id=189444&action=review > Source/WebKit2/UIProcess/API/mac/WKView.mm:213 > + BOOL _windowChangeWasDeferred; Want to rename this to 'viewInWindowChangeWasDeferred'? > Source/WebKit2/UIProcess/API/mac/WKView.mm:3306 > + if (!(--_data->_viewInWindowChangesDeferredCount) && _data->_windowChangeWasDeferred) { Would be clearer to just hoist the --_data->_viewInWindowChangesDeferredCount outside the condition. |