[go: nahoru, domu]

Add Document::GetSingleViewLayout() and draw_utils::GetRectForSingleView().

Currently the generation of the single-view layout in PDFiumEngine is
untested. To make the generation of these layouts testable the following
helper functions are being added:

  draw_utils::GetRectForSingleView(), given the current document size
  and a page's size, returns a page rect formatted for single-view.

  Document::GetSingleViewLayout(), given a vector of page sizes,
  returns a vector of page rects formatted for single-view and updates
  the size of the document.

Bug: 51472
Change-Id: Ie9e746cc4fedda551ccfb22aab4b3b64822c6b89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1739666
Commit-Queue: Jeremy Chinsen <chinsenj@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684616}
7 files changed