WebView never paints if the first page load is canceled after the load is committed but before the first layout occurs. To reproduce: 1. Run a WebKit nightly <http://nightly.webkit.org/> 2. Set your Safari preferences to open new windows with a web page that loads slowly 3. Press Ctrl-N to create a new window 4. Quickly press Esc to cancel the load The result is that the WebView portion of the Safari window never paints until you load a new page. Dragging another window over the WebView area leaves behind garbage pixels. Resizing the window doesn't help.
The problem line of code seems to be this <http://trac.webkit.org/projects/webkit/browser/trunk/WebKit/win/WebView.cpp?rev=29369#L1590>: if (!webView->isPainting() && (!dataSource || coreFrame && (coreFrame->view()->didFirstLayout() || !coreFrame->loader()->committedFirstRealDocumentLoad()))) didFirstLayout() is returning false and committedFirstRealDocumentLoad() is returning true.
<rdar://problem/5682402>
firstLayout was a hack put in on Windows prior to having the full networking layer (with its notion of being "committed") ported over from Mac. I suspect the firstLayout check is no longer needed (and does not match Mac anyway).
Hyatt also says we should make sure the Windows and Mac agree on when painting should be suppressed.
I have a fix for this.
Created attachment 18399 [details] patch 1/2
Created attachment 18400 [details] patch 2/2
Comment on attachment 18399 [details] patch 1/2 r=me
Comment on attachment 18400 [details] patch 2/2 r=me
Landed as r29415 and r29416