Changing font size with pinch gesture in Reader Mode
When users pinch in Reader Mode, the page would zoom in or out as if it is a normal web page allowing user-zoom. At the end of pinch gesture, the page would do text reflow. These pinch-to-zoom and text reflow effects are not native, but are emulated using CSS and JavaScript. In order to achieve near-native zooming and panning frame rate, fake 3D transform is used so that the layer doesn't repaint for each frame. After the text reflow, the web content shown in the viewport should roughly be the same paragraph before zooming. The control point of font size is the html element, so that both "em" and "rem" are adjusted. Accordingly, font size of body is no longer specified in CSS in unit of pixel. Some CSS styles and animations are updated to fix issues specific to resizing. BUG=445632 Review URL: https://codereview.chromium.org/1009703002 Cr-Commit-Position: refs/heads/master@{#326945}
Showing
This diff is collapsed.
Please register or sign in to comment