Reviewed by Darin Adler.
[WebKit.git] / Source / WebKit2 / WebProcess / WebCoreSupport / WebChromeClient.cpp
index 75d493cab2bedde2d75f4b31ae1b04e790f83772..e5830222c7c972b1b057305ad823a809568b3940 100644 (file)
@@ -355,11 +355,15 @@ void WebChromeClient::invalidateWindow(const IntRect&, bool)
 
 void WebChromeClient::invalidateContentsAndWindow(const IntRect& rect, bool)
 {
+    if (m_page->corePage()->mainFrame()->document()->printing())
+        return;
     m_page->drawingArea()->setNeedsDisplay(rect);
 }
 
 void WebChromeClient::invalidateContentsForSlowScroll(const IntRect& rect, bool)
 {
+    if (m_page->corePage()->mainFrame()->document()->printing())
+        return;
     m_page->pageDidScroll();
     m_page->drawingArea()->setNeedsDisplay(rect);
 }