Refactor visual viewport size methods
This CL does some cleanups around size-related methods in VisualViewport. Changes here include: - Making VisibleRect methods allow including or excluding the scrollbar sizes. The default is now to exclude, matching the intuition of what the visible rect is as well as the convention set in ScrollableArea. - VisibleWidth, VisibleHeight are no longer overriden and use the correct convention regarding scrollbars. - Use VisibleRect in other methods rather than duplicating code - Added, clarified, and corrected comments in visual viewport - Updated tests (and converted to more modern style) to not use internals visual viewport methods where a web-visible API exists. - Explicitly use PageZoomFactor for zoom adjustment, rather than the misleadingly named AdjustScroll helper. Change-Id: I4df38bbff78224cccf47f0ee86a573c8fe033c5d Reviewed-on: https://chromium-review.googlesource.com/1082928Reviewed-by:Jianpeng Chao <chaopeng@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#565062}
Showing
Please register or sign in to comment