The current implementations of WebView::paintDocumentRectToContext and WebView::paintScrollViewRectToContextAtPoint only draw GDI-based content into the passed device context. This causes CALayer-based information to be skipped, since it typically draws on its own 60-hz timer outside of the normal paint operation. The purpose of these two methods is to allow a WebView to be rendered into a specific device context, usually representing a bitmap or back buffer. Consequently, we should perform a draw operation from the CALayerTree into the context when this method is called.
<rdar://problem/22635080>
Created attachment 261862 [details] Patch
Comment on attachment 261862 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=261862&action=review > Source/WebKit/win/WebView.cpp:6165 > + ::ValidateRect(m_viewWindow, nullptr); Is it correct to validate a rect in the window when you may be painting into an unrelated DC? > Source/WebKit/win/WebView.cpp:6192 > + ::ValidateRect(m_viewWindow, nullptr); Ditto. Also why isn't this code shared?
Comment on attachment 261862 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=261862&action=review >> Source/WebKit/win/WebView.cpp:6165 >> + ::ValidateRect(m_viewWindow, nullptr); > > Is it correct to validate a rect in the window when you may be painting into an unrelated DC? I think you are right. This should not be used here. >> Source/WebKit/win/WebView.cpp:6192 >> + ::ValidateRect(m_viewWindow, nullptr); > > Ditto. Also why isn't this code shared? It should be. I'll revise that.
Committed r190235: <http://trac.webkit.org/changeset/190235>