Skip to content
  • ap@apple.com's avatar
    Reviewed by Darin Adler. · 3e58000f
    ap@apple.com authored
            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.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    3e58000f