forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make scroll_offset not stored in dip scale in BrowserViewRenderer
The scroll amount passed into BrowserViewRenderer::ScrollTo is physical pixel with page_scale_factor applied. Before --use-zoom-for-dsf enabled, the scroll amount was divided by both dip_scale_ and page_scale_factor_ to convert to scroll amount in dip. With the flag enabled, it still need to divide by the page_scale_factor, but it incorrectly passed the original offset without take page_scale_factor into account, causes scroll amount larger than the max_scroll_offset. When --use-zoom-for-dsf is enabled, scroll_offset_dip_ and max_scroll_offset_dip_ are convert from/to physical pixel in every it get used. We shouldn't stored them in dip. So, this cl changes scroll_offset_dip_ to scroll_offset_unscaled_ and max_scroll_offset_dip_ to max_scroll_offset_unscaled_, as they were in physical pixel when zoom-for-dsf enabled, and dip otherwise. Instead of having dip_scale applied every time it was set. TEST: webview_ui_test.test.DropDownListTest#testDropDownScaledViewPortUseWideViewPort Bug: 869995, 873617 Change-Id: I694ca54438620e7afdf8db210704f40fb2c1ba54 Reviewed-on: https://chromium-review.googlesource.com/1162519 Reviewed-by: Bo <boliu@chromium.org> Reviewed-by: David Bokan <bokan@chromium.org> Commit-Queue: Ella Ge <eirage@chromium.org> Cr-Commit-Position: refs/heads/master@{#582692}
- Loading branch information
Showing
4 changed files
with
74 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters