• Jeremy Chinsen's avatar
    Add bottom-side logic for two-up view to PDFiumEngine::FillPageSides(). · ac1759e6
    Jeremy Chinsen authored
    Currently the logic in PDFiumEngine::FillPageSides() for drawing the
    empty space below a page only handles single-up view. In two-up view,
    a page may be shorter than the one adjacent to it. In this case, the
    bottom gap must have height as tall as the difference in the adjacent
    pages' height.
    
    This CL changes FillPageSides() such that when |two_up_view_| is true,
    it calls draw_utils::GetBottomGapBetweenRects() with the current page
    and |dirty_in_screen|, computing the space of |dirty_in_screen| that
    is below the page, and finally drawing it as empty space. This allows
    FillPageSides() to properly draw the bottom empty space for a page in
    two-up view.
    
    Bug: 51472
    Change-Id: Idd01fd959419fd8aebc2f70f514eb83ba61c160c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1720792Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
    Commit-Queue: Jeremy Chinsen <chinsenj@google.com>
    Cr-Commit-Position: refs/heads/master@{#682548}
    ac1759e6
pdfium_engine.cc 119 KB