Skip to content
  • hyatt@apple.com's avatar
    https://bugs.webkit.org/show_bug.cgi?id=45993, convert printing to the new pagination model. · 5d4b645a
    hyatt@apple.com authored
    Reviewed by Simon Fraser.
    
    WebCore: 
    
    Make printing store the page height in the RenderView and push that into the layout state to
    use the new pagination model.  The old pagination model is retained because it is still used
    for embedded WebViews.
    
    * page/FrameView.cpp:
    (WebCore::FrameView::reset):
    (WebCore::FrameView::layout):
    (WebCore::FrameView::forceLayout):
    (WebCore::FrameView::forceLayoutForPagination):
    (WebCore::FrameView::adjustPageHeight):
    * page/FrameView.h:
    * page/PrintContext.cpp:
    (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
    * rendering/RenderBlock.cpp:
    (WebCore::RenderBlock::paintChildren):
    * rendering/RenderBox.cpp:
    (WebCore::RenderBox::calcHeight):
    * rendering/RenderImage.cpp:
    (WebCore::RenderImage::paintReplaced):
    * rendering/RenderLineBoxList.cpp:
    (WebCore::RenderLineBoxList::paint):
    * rendering/RenderVideo.cpp:
    (WebCore::RenderVideo::paintReplaced):
    * rendering/RenderView.cpp:
    (WebCore::RenderView::RenderView):
    (WebCore::RenderView::layout):
    (WebCore::RenderView::paint):
    (WebCore::RenderView::setBestTruncatedAt):
    * rendering/RenderView.h:
    (WebCore::RenderView::popLayoutState):
    (WebCore::RenderView::pageHeight):
    (WebCore::RenderView::setPageHeight):
    (WebCore::RenderView::bestTruncatedAt):
    (WebCore::RenderView::truncatedAt):
    (WebCore::RenderView::setTruncatedAt):
    (WebCore::RenderView::printRect):
    (WebCore::RenderView::setPrintRect):
    (WebCore::RenderView::pushLayoutState):
    (WebCore::LayoutStateMaintainer::LayoutStateMaintainer):
    (WebCore::LayoutStateMaintainer::push):
    (WebCore::LayoutStateMaintainer::pop):
    
    WebKit/mac: 
    
    Make printing store the page height in the RenderView and push that into the layout state to
    use the new pagination model.  The old pagination model is retained because it is still used
    for embedded WebViews.
    
    * WebView/WebHTMLView.mm:
    (-[WebHTMLView _adjustedBottomOfPageWithTop:bottom:limit:]):
    
    LayoutTests: 
    
    Remove the overflow test, since the new model treats overflow:auto/scroll as unsplittable.
    
    * printing/page-break-always-for-overflow-expected.txt: Removed.
    * printing/page-break-always-for-overflow.html: Removed.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    5d4b645a