[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:08:31 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 75bf8e69477a79ba97581f931bbe35b3cf6a472d
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 7 21:19:58 2011 +0000

    Fill the WKView with white when the web process hasn't drawn anything yet
    
    Fixes <http://webkit.org/b/52023> WKView accumulates pixel garbage
    before web process has had a chance to draw anything (if Aero is
    disabled)
    
    Reviewed by Jon Honeycutt.
    
    * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
    (WebKit::ChunkedUpdateDrawingAreaProxy::paint):
    * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
    * UIProcess/DrawingAreaProxy.h:
    * UIProcess/LayerBackedDrawingAreaProxy.cpp:
    (WebKit::LayerBackedDrawingAreaProxy::paint):
    * UIProcess/LayerBackedDrawingAreaProxy.h:
    * UIProcess/TiledDrawingAreaProxy.cpp:
    (WebKit::TiledDrawingAreaProxy::paint):
    * UIProcess/TiledDrawingAreaProxy.h:
    * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
    (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
    * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
    (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
    * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
    (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
    * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp:
    (WebKit::LayerBackedDrawingAreaProxy::paint):
    Changed these functions to return a boolean indicating whether we
    actually painted anything.
    
    * UIProcess/win/WebView.cpp:
    (WebKit::WebView::onPaintEvent): Fill with white (and don't call
    didDraw) when the DrawingAreaProxy isn't able to paint.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75267 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 544883e..214d382 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,39 @@
+2011-01-06  Adam Roben  <aroben at apple.com>
+
+        Fill the WKView with white when the web process hasn't drawn anything
+        yet
+
+        Fixes <http://webkit.org/b/52023> WKView accumulates pixel garbage
+        before web process has had a chance to draw anything (if Aero is
+        disabled)
+
+        Reviewed by Jon Honeycutt.
+
+        * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
+        (WebKit::ChunkedUpdateDrawingAreaProxy::paint):
+        * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
+        * UIProcess/DrawingAreaProxy.h:
+        * UIProcess/LayerBackedDrawingAreaProxy.cpp:
+        (WebKit::LayerBackedDrawingAreaProxy::paint):
+        * UIProcess/LayerBackedDrawingAreaProxy.h:
+        * UIProcess/TiledDrawingAreaProxy.cpp:
+        (WebKit::TiledDrawingAreaProxy::paint):
+        * UIProcess/TiledDrawingAreaProxy.h:
+        * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
+        (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
+        * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
+        (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
+        * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
+        (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
+        * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp:
+        (WebKit::LayerBackedDrawingAreaProxy::paint):
+        Changed these functions to return a boolean indicating whether we
+        actually painted anything.
+
+        * UIProcess/win/WebView.cpp:
+        (WebKit::WebView::onPaintEvent): Fill with white (and don't call
+        didDraw) when the DrawingAreaProxy isn't able to paint.
+
 2011-01-06  Jessie Berlin  <jberlin at apple.com>
 
         Reviewed by Jon Honeycutt.
diff --git a/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp b/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
index 3ac4db2..22e9c84 100644
--- a/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
@@ -55,22 +55,22 @@ ChunkedUpdateDrawingAreaProxy::~ChunkedUpdateDrawingAreaProxy()
 {
 }
 
-void ChunkedUpdateDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext context)
+bool ChunkedUpdateDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext context)
 {
     if (m_isWaitingForDidSetFrameNotification) {
         WebPageProxy* page = this->page();
         if (!page->isValid())
-            return;
+            return false;
         
         if (page->process()->isLaunching())
-            return;
+            return false;
 
         OwnPtr<CoreIPC::ArgumentDecoder> arguments = page->process()->connection()->waitFor(DrawingAreaProxyLegacyMessage::DidSetSize, page->pageID(), 0.04);
         if (arguments)
             didReceiveMessage(page->process()->connection(), CoreIPC::MessageID(DrawingAreaProxyLegacyMessage::DidSetSize), arguments.get());
     }
 
-    platformPaint(rect, context);
+    return platformPaint(rect, context);
 }
 
 void ChunkedUpdateDrawingAreaProxy::sizeDidChange()
diff --git a/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.h b/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.h
index 2c94c40..348d04f 100644
--- a/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.h
+++ b/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.h
@@ -68,13 +68,13 @@ private:
 
     // DrawingAreaProxy
     virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
-    virtual void paint(const WebCore::IntRect&, PlatformDrawingContext);
+    virtual bool paint(const WebCore::IntRect&, PlatformDrawingContext);
     virtual void sizeDidChange();
     virtual void setPageIsVisible(bool isVisible);
     
     void ensureBackingStore();
     void invalidateBackingStore();
-    void platformPaint(const WebCore::IntRect&, PlatformDrawingContext);
+    bool platformPaint(const WebCore::IntRect&, PlatformDrawingContext);
     void drawUpdateChunkIntoBackingStore(UpdateChunk*);
     void didSetSize(UpdateChunk*);
     void update(UpdateChunk*);
diff --git a/WebKit2/UIProcess/DrawingAreaProxy.h b/WebKit2/UIProcess/DrawingAreaProxy.h
index d7de581..6f80f76 100644
--- a/WebKit2/UIProcess/DrawingAreaProxy.h
+++ b/WebKit2/UIProcess/DrawingAreaProxy.h
@@ -56,7 +56,9 @@ public:
     virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*) = 0;
     virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*) { ASSERT_NOT_REACHED(); }
 
-    virtual void paint(const WebCore::IntRect&, PlatformDrawingContext) = 0;
+    // Returns true if painting was successful, false otherwise.
+    virtual bool paint(const WebCore::IntRect&, PlatformDrawingContext) = 0;
+
     virtual void sizeDidChange() = 0;
     virtual void setPageIsVisible(bool isVisible) = 0;
     
diff --git a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
index af11ee8..ffa91de 100644
--- a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
@@ -56,8 +56,9 @@ LayerBackedDrawingAreaProxy::~LayerBackedDrawingAreaProxy()
 }
 
 #if !PLATFORM(WIN)
-void LayerBackedDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext context)
+bool LayerBackedDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext context)
 {
+    return true;
 }
 #endif
 
diff --git a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h
index 3ce96a8..bbaa643 100644
--- a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h
+++ b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h
@@ -67,7 +67,7 @@ private:
     virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
     virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);
 
-    virtual void paint(const WebCore::IntRect&, PlatformDrawingContext);
+    virtual bool paint(const WebCore::IntRect&, PlatformDrawingContext);
     virtual void sizeDidChange();
     virtual void setPageIsVisible(bool isVisible);
 
diff --git a/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp b/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
index 55b0159..b687192 100644
--- a/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
@@ -315,15 +315,15 @@ void TiledDrawingAreaProxy::tileBufferUpdateComplete()
     m_tileCreationTimer.startOneShot(0);
 }
 
-void TiledDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext context)
+bool TiledDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext context)
 {
     if (m_isWaitingForDidSetFrameNotification) {
         WebPageProxy* page = this->page();
         if (!page->isValid())
-            return;
+            return false;
 
         if (page->process()->isLaunching())
-            return;
+            return false;
     }
 
     adjustVisibleRect();
@@ -348,7 +348,9 @@ void TiledDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext co
                 currentTile->paint(&gc, dirtyRect);
         }
     }
+
     gc.restore();
+    return true;
 }
 
 void TiledDrawingAreaProxy::adjustVisibleRect()
diff --git a/WebKit2/UIProcess/TiledDrawingAreaProxy.h b/WebKit2/UIProcess/TiledDrawingAreaProxy.h
index a4b440c..80bc20d 100644
--- a/WebKit2/UIProcess/TiledDrawingAreaProxy.h
+++ b/WebKit2/UIProcess/TiledDrawingAreaProxy.h
@@ -115,7 +115,7 @@ private:
     // DrawingAreaProxy
     virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
     virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder&);
-    virtual void paint(const WebCore::IntRect&, PlatformDrawingContext);
+    virtual bool paint(const WebCore::IntRect&, PlatformDrawingContext);
     virtual void sizeDidChange();
     virtual void setPageIsVisible(bool isVisible);
 
diff --git a/WebKit2/UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm b/WebKit2/UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm
index bfa63df..909745b 100644
--- a/WebKit2/UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm
+++ b/WebKit2/UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm
@@ -60,10 +60,10 @@ void ChunkedUpdateDrawingAreaProxy::invalidateBackingStore()
     m_bitmapContext = 0;
 }
 
-void ChunkedUpdateDrawingAreaProxy::platformPaint(const IntRect& rect, CGContextRef context)
+bool ChunkedUpdateDrawingAreaProxy::platformPaint(const IntRect& rect, CGContextRef context)
 {
     if (!m_bitmapContext)
-        return;
+        return false;
 
     CGContextSaveGState(context);
 
@@ -79,6 +79,7 @@ void ChunkedUpdateDrawingAreaProxy::platformPaint(const IntRect& rect, CGContext
     CGContextDrawImage(context, CGRectMake(0, 0, CGImageGetWidth(image.get()), CGImageGetHeight(image.get())), image.get());
 
     CGContextRestoreGState(context);
+    return true;
 }
 
 void ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore(UpdateChunk* updateChunk)
diff --git a/WebKit2/UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp b/WebKit2/UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp
index b9cc976..06ce7c6 100644
--- a/WebKit2/UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp
+++ b/WebKit2/UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp
@@ -56,12 +56,13 @@ void ChunkedUpdateDrawingAreaProxy::invalidateBackingStore()
     m_backingStoreImage = QImage();
 }
 
-void ChunkedUpdateDrawingAreaProxy::platformPaint(const IntRect& rect, QPainter* painter)
+bool ChunkedUpdateDrawingAreaProxy::platformPaint(const IntRect& rect, QPainter* painter)
 {
     if (m_backingStoreImage.isNull())
-        return;
+        return false;
 
     painter->drawImage(QPoint(0, 0), m_backingStoreImage);
+    return true;
 }
 
 void ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore(UpdateChunk* updateChunk)
diff --git a/WebKit2/UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp b/WebKit2/UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp
index e366e9c..6a1ee36 100644
--- a/WebKit2/UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp
+++ b/WebKit2/UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp
@@ -64,13 +64,14 @@ void ChunkedUpdateDrawingAreaProxy::invalidateBackingStore()
     m_backingStoreBitmap.clear();
 }
 
-void ChunkedUpdateDrawingAreaProxy::platformPaint(const IntRect& rect, HDC hdc)
+bool ChunkedUpdateDrawingAreaProxy::platformPaint(const IntRect& rect, HDC hdc)
 {
     if (!m_backingStoreBitmap)
-        return;
+        return false;
 
     // BitBlt from the backing-store to the passed in hdc.
     ::BitBlt(hdc, rect.x(), rect.y(), rect.width(), rect.height(), m_backingStoreDC.get(), rect.x(), rect.y(), SRCCOPY);
+    return true;
 }
 
 void ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore(UpdateChunk* updateChunk)
diff --git a/WebKit2/UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp b/WebKit2/UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp
index 3c4a8b8..8259272 100644
--- a/WebKit2/UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp
+++ b/WebKit2/UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp
@@ -55,8 +55,9 @@ void LayerBackedDrawingAreaProxy::detachCompositingContext()
 {
 }
 
-void LayerBackedDrawingAreaProxy::paint(const IntRect&, PlatformDrawingContext)
+bool LayerBackedDrawingAreaProxy::paint(const IntRect&, PlatformDrawingContext)
 {
+    return false;
 }
 
 } // namespace WebKit
diff --git a/WebKit2/UIProcess/win/WebView.cpp b/WebKit2/UIProcess/win/WebView.cpp
index d95526b..1f7dc1f 100644
--- a/WebKit2/UIProcess/win/WebView.cpp
+++ b/WebKit2/UIProcess/win/WebView.cpp
@@ -387,10 +387,9 @@ LRESULT WebView::onPaintEvent(HWND hWnd, UINT message, WPARAM, LPARAM, bool& han
     PAINTSTRUCT paintStruct;
     HDC hdc = ::BeginPaint(m_window, &paintStruct);
 
-    if (m_page->isValid() && m_page->drawingArea()) {
-        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 {
+    else {
         // Mac checks WebPageProxy::drawsBackground and
         // WebPageProxy::drawsTransparentBackground here, but those are always false on Windows
         // currently (see <http://webkit.org/b/52009>).

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list