Reviewed by Darin Adler.
[WebKit.git] / Source / WebKit2 / ChangeLog
index 6b6b5af2fd3d67693f1d746a034a6a0e381b24d9..e2f679a96cb271f5b8bc653897faeeec6af60ca0 100644 (file)
@@ -1,3 +1,35 @@
+2011-02-04  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=53823
+        Print layout sometimes seen on screen
+
+        <rdar://problem/8948742> REGRESSION (WebKit2) - When I print a page, I visually see it re-layout
+        <rdar://problem/8899389> REGRESSION(WebKit2): Wrong content can appear when print dialog is up
+
+        * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setAutodisplay): Removed a
+        branch that didn't do anything useful.
+
+        * UIProcess/API/mac/WKPrintingView.h:
+        * UIProcess/API/mac/WKPrintingView.mm:
+        (-[WKPrintingView _suspendAutodisplay]):
+        (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
+        (-[WKPrintingView _delayedResumeAutodisplay]):
+        (-[WKPrintingView knowsPageRange:]):
+        (-[WKPrintingView beginDocument]):
+        (-[WKPrintingView endDocument]):
+        When page setup changes, or when going from print preview to actual printing, AppKit calls
+        -endDocument just to begin it again. Delay resuming autodisplay until the next run loop
+        iteration.
+
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::invalidateContentsAndWindow):
+        (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
+        Tightened it up from other side - we should never send pixels to UI process while in
+        printing mode. This is not 100% reliable, because relayout doesn't happen immediately,
+        and we can still have print layout in screen mode - but it helps.
+
 2011-02-04  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Mark Rowe.