[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

aroben at apple.com aroben at apple.com
Wed Dec 22 12:51:24 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6140e034e04c34c3fcdcdc8a3e919a200823bbe6
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 31 18:47:16 2010 +0000

    Handle WM_PRINTCLIENT in WebKit2 on Windows
    
    Reviewed by Sam Weinig.
    
    * UIProcess/win/WebView.cpp:
    (WebKit::WebView::wndProc): Call through to onPrintClientEvent when we
    get a WM_PRINTCLIENT message.
    (WebKit::WebView::onPrintClientEvent): Added. Paints the entire view
    into the HDC provided by Windows.
    
    * UIProcess/win/WebView.h: Added onPrintClientEvent.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66514 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 0aa0e2c..c0246ae 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-31  Adam Roben  <aroben at apple.com>
+
+        Handle WM_PRINTCLIENT in WebKit2 on Windows
+
+        Reviewed by Sam Weinig.
+
+        * UIProcess/win/WebView.cpp:
+        (WebKit::WebView::wndProc): Call through to onPrintClientEvent when we
+        get a WM_PRINTCLIENT message.
+        (WebKit::WebView::onPrintClientEvent): Added. Paints the entire view
+        into the HDC provided by Windows.
+
+        * UIProcess/win/WebView.h: Added onPrintClientEvent.
+
 2010-08-27  Adam Roben  <aroben at apple.com>
 
         Don't send messages to the injected bundle if the web process has
diff --git a/WebKit2/UIProcess/win/WebView.cpp b/WebKit2/UIProcess/win/WebView.cpp
index fe9209d..4678c82 100644
--- a/WebKit2/UIProcess/win/WebView.cpp
+++ b/WebKit2/UIProcess/win/WebView.cpp
@@ -86,6 +86,9 @@ LRESULT WebView::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
         case WM_PAINT:
             lResult = onPaintEvent(hWnd, message, wParam, lParam, handled);
             break;
+        case WM_PRINTCLIENT:
+            lResult = onPrintClientEvent(hWnd, message, wParam, lParam, handled);
+            break;
         case WM_MOUSEMOVE:
         case WM_LBUTTONDOWN:
         case WM_MBUTTONDOWN:
@@ -347,6 +350,19 @@ LRESULT WebView::onPaintEvent(HWND hWnd, UINT message, WPARAM, LPARAM, bool& han
     return 0;
 }
 
+LRESULT WebView::onPrintClientEvent(HWND hWnd, UINT, WPARAM wParam, LPARAM, bool& handled)
+{
+    HDC hdc = reinterpret_cast<HDC>(wParam);
+    RECT winRect;
+    ::GetClientRect(hWnd, &winRect);
+    IntRect rect = winRect;
+
+    m_page->drawingArea()->paint(rect, hdc);
+
+    handled = true;
+    return 0;
+}
+
 LRESULT WebView::onSizeEvent(HWND, UINT, WPARAM, LPARAM lParam, bool& handled)
 {
     int width = LOWORD(lParam);
diff --git a/WebKit2/UIProcess/win/WebView.h b/WebKit2/UIProcess/win/WebView.h
index aee8801..2d536aa 100644
--- a/WebKit2/UIProcess/win/WebView.h
+++ b/WebKit2/UIProcess/win/WebView.h
@@ -69,6 +69,7 @@ private:
     LRESULT onWheelEvent(HWND hWnd, UINT message, WPARAM, LPARAM, bool& handled);
     LRESULT onKeyEvent(HWND hWnd, UINT message, WPARAM, LPARAM, bool& handled);
     LRESULT onPaintEvent(HWND hWnd, UINT message, WPARAM, LPARAM, bool& handled);
+    LRESULT onPrintClientEvent(HWND hWnd, UINT message, WPARAM, LPARAM, bool& handled);
     LRESULT onSizeEvent(HWND hWnd, UINT message, WPARAM, LPARAM, bool& handled);
     LRESULT onWindowPositionChangedEvent(HWND hWnd, UINT message, WPARAM, LPARAM, bool& handled);
     LRESULT onSetFocusEvent(HWND hWnd, UINT message, WPARAM, LPARAM, bool& handled);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list