Fix crash with viewport units when using auto resize mode.
This crash is caused because of a divide-by-zero when calculating viewport units. The zero width visual viewport occurs because the WebView is responsible for resizing the VisualViewport but the autoresize code resizes the FrameView. This does eventually lead to resizing the WebView when a layout occurs and calls though to WebView::layoutUpdated, however, until that happens the layout will use the 0 value. This isn't ever a problem since the calculation that's dividing by 0 is used to adjust the browser controls to the minimum page scale but autoresize isn't ever used on Android, which is the only platform that uses browser controls and a non-1 minimum page scale. BUG=667712 Review-Url: https://codereview.chromium.org/2616893004 Cr-Commit-Position: refs/heads/master@{#442048}
Showing
Please register or sign in to comment