Clarify page rectangles in DocumentLayout
This change splits DocumentLayout::page_rect() into two methods, page_rect() and page_bounds_rect(), to better mirror the corresponding APIs in PDFEngine, GetPageRect() (page rectangle before insets) and GetPageBoundsRect() (page rectangle after insets). The existing page_rect() method is equivalent to PDFEngine's GetPageBoundsRect(), which is confusing, so it has been renamed to page_bounds_rect(). The new page_rect() method is equivalent to PDFEngine's GetPageRect(). (This will be useful in a future change.) DocumentLayout is now responsible for adding insets to the page rectangles returned by draw_utils::GetRectForSingleView(), etc., eliminating the need to pass the insets to these functions. Bug: 885110 Change-Id: I4ef345333abbb5b75892c32ffff8dee24e20ef05 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762601Reviewed-by:Lei Zhang <thestig@chromium.org> Commit-Queue: K Moon <kmoon@chromium.org> Cr-Commit-Position: refs/heads/master@{#689735}
Showing
Please register or sign in to comment