[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

aroben at apple.com aroben at apple.com
Fri Jan 21 15:04:00 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 9b33e0af269ebbc855d44c73018ceb0cee7f0ea9
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 6 20:48:33 2011 +0000

    Make WKView fill with white when the web process has crashed
    
    Previously we would just draw whatever we had last drawn into the
    WKView (i.e., a stale picture of the web page), which was confusing
    (because the web page would mysteriously not respond to input) and ugly
    (because it wouldn't behave properly if the window was resized).
    
    Fixes <http://webkit.org/b/52004> WKView keeps painting a stale
    picture of the web page when the web process crashes
    
    Reviewed by Ada Chan.
    
    * UIProcess/win/WebView.cpp:
    (WebKit::WebView::onPaintEvent): Ported code from -[WKView drawRect:]
    to fill with white if the page is invalid or has no DrawingArea. As a
    bonus, also ported the call to WebPageProxy::didDraw from that method.
    
    (WebKit::WebView::processDidCrash):
    (WebKit::WebView::didRelaunchProcess):
    Invalidate our window so that we'll redraw with white or the new page.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75185 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index f075558..dc523ac 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,5 +1,28 @@
 2011-01-06  Adam Roben  <aroben at apple.com>
 
+        Make WKView fill with white when the web process has crashed
+
+        Previously we would just draw whatever we had last drawn into the
+        WKView (i.e., a stale picture of the web page), which was confusing
+        (because the web page would mysteriously not respond to input) and ugly
+        (because it wouldn't behave properly if the window was resized).
+
+        Fixes <http://webkit.org/b/52004> WKView keeps painting a stale
+        picture of the web page when the web process crashes
+
+        Reviewed by Ada Chan.
+
+        * UIProcess/win/WebView.cpp:
+        (WebKit::WebView::onPaintEvent): Ported code from -[WKView drawRect:]
+        to fill with white if the page is invalid or has no DrawingArea. As a
+        bonus, also ported the call to WebPageProxy::didDraw from that method.
+
+        (WebKit::WebView::processDidCrash):
+        (WebKit::WebView::didRelaunchProcess):
+        Invalidate our window so that we'll redraw with white or the new page.
+
+2011-01-06  Adam Roben  <aroben at apple.com>
+
         Make WKViews work on Windows after a crashed web process gets relaunched
 
         Fixes <http://webkit.org/b/52001> Relaunching the web process fails to
diff --git a/WebKit2/UIProcess/win/WebView.cpp b/WebKit2/UIProcess/win/WebView.cpp
index 4d04c89..4c2dc9f 100644
--- a/WebKit2/UIProcess/win/WebView.cpp
+++ b/WebKit2/UIProcess/win/WebView.cpp
@@ -387,7 +387,15 @@ LRESULT WebView::onPaintEvent(HWND hWnd, UINT message, WPARAM, LPARAM, bool& han
     PAINTSTRUCT paintStruct;
     HDC hdc = ::BeginPaint(m_window, &paintStruct);
 
-    m_page->drawingArea()->paint(IntRect(paintStruct.rcPaint), hdc);
+    if (m_page->isValid() && m_page->drawingArea()) {
+        m_page->drawingArea()->paint(IntRect(paintStruct.rcPaint), hdc);
+        m_page->didDraw();
+    } else {
+        // Mac checks WebPageProxy::drawsBackground and
+        // WebPageProxy::drawsTransparentBackground here, but those are always false on Windows
+        // currently (see <http://webkit.org/b/52009>).
+        ::FillRect(hdc, &paintStruct.rcPaint, reinterpret_cast<HBRUSH>(COLOR_WINDOW + 1));
+    }
 
     ::EndPaint(m_window, &paintStruct);
 
@@ -574,6 +582,7 @@ void WebView::close()
 
 void WebView::processDidCrash()
 {
+    ::InvalidateRect(m_window, 0, TRUE);
 }
 
 void WebView::didRelaunchProcess()
@@ -585,6 +594,8 @@ void WebView::didRelaunchProcess()
     m_page->reinitializeWebPage(IntRect(clientRect).size());
     updateActiveState();
     m_page->setFocused(::GetFocus() == m_window);
+
+    ::InvalidateRect(m_window, 0, TRUE);
 }
 
 void WebView::takeFocus(bool)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list