Summary: | Views should be made visible before painting in WM_PRINTCLIENT messages | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brian Weinstein <bweinstein> | ||||||
Component: | WebKit2 | Assignee: | Brian Weinstein <bweinstein> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | aroben | ||||||
Priority: | P2 | Keywords: | InRadar, PlatformOnly | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | Windows 7 | ||||||||
Attachments: |
|
Description
Brian Weinstein
2011-04-15 11:17:40 PDT
Created attachment 89817 [details]
[PATCH] Fix
Comment on attachment 89817 [details] [PATCH] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=89817&action=review > Source/WebKit2/UIProcess/win/WebView.cpp:693 > + bool isVisible = isViewVisible(); Maybe this should be wasVisible? (In reply to comment #2) > (From update of attachment 89817 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=89817&action=review > > > Source/WebKit2/UIProcess/win/WebView.cpp:693 > > + bool isVisible = isViewVisible(); > > Maybe this should be wasVisible? Yeah, I was waffling on a name here. wasVisible is good. Thanks! Comment on attachment 89817 [details] [PATCH] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=89817&action=review > Source/WebKit2/UIProcess/win/WebView.cpp:700 > + if (!isVisible) > + setIsVisible(true); > + > paint(hdc, winRect); > > + if (!isVisible) > + setIsVisible(false); I think it's worth adding a comment explaining why we do this. It's a little unfortunate that we don't have more fine-grained control of this. Today, the visible state of the view only affects whether painting happens. In the future it could affect more things which we don't want to touch here. Maybe a FIXME saying that it would be good to have a more-direct way of telling the web process to draw even if we're invisible would be enough here. > Source/WebKit2/UIProcess/win/WebView.cpp:1482 > +void WebView::setIsVisible(bool isVisible) > +{ > + m_isVisible = isVisible; > + m_page->viewStateDidChange(WebPageProxy::ViewIsVisible); > +} Seems like onShowWindowEvent should call this function. Created attachment 89831 [details]
[PATCH] Fix v2
|