RESOLVED FIXED 16828
WebView never paints if first page load is canceled after being committed but before layout
https://bugs.webkit.org/show_bug.cgi?id=16828
Summary WebView never paints if first page load is canceled after being committed but...
Adam Roben (:aroben)
Reported 2008-01-10 15:32:24 PST
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.
Attachments
patch 1/2 (2.82 KB, patch)
2008-01-11 12:34 PST, Adam Roben (:aroben)
hyatt: review+
patch 2/2 (1.49 KB, patch)
2008-01-11 12:40 PST, Adam Roben (:aroben)
hyatt: review+
Adam Roben (:aroben)
Comment 1 2008-01-10 15:33:39 PST
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.
Adam Roben (:aroben)
Comment 2 2008-01-10 15:34:15 PST
Dave Hyatt
Comment 3 2008-01-10 15:35:33 PST
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).
Adam Roben (:aroben)
Comment 4 2008-01-10 15:38:14 PST
Hyatt also says we should make sure the Windows and Mac agree on when painting should be suppressed.
Adam Roben (:aroben)
Comment 5 2008-01-11 12:25:29 PST
I have a fix for this.
Adam Roben (:aroben)
Comment 6 2008-01-11 12:34:30 PST
Created attachment 18399 [details] patch 1/2
Adam Roben (:aroben)
Comment 7 2008-01-11 12:40:14 PST
Created attachment 18400 [details] patch 2/2
Dave Hyatt
Comment 8 2008-01-11 12:41:21 PST
Comment on attachment 18399 [details] patch 1/2 r=me
Dave Hyatt
Comment 9 2008-01-11 12:42:01 PST
Comment on attachment 18400 [details] patch 2/2 r=me
Adam Roben (:aroben)
Comment 10 2008-01-11 13:06:39 PST
Landed as r29415 and r29416
Note You need to log in before you can comment on or make changes to this bug.