commit | 7c1ceb980b168072487f7bd0a2c83194b195fccc | [log] [tgz] |
---|---|---|
author | Sandra Sun <[email protected]> | Wed Jan 17 05:48:01 2018 |
committer | Commit Bot <[email protected]> | Wed Jan 17 05:48:01 2018 |
tree | a116a06b65e40fa19ca48ea8d799cac19836cdeb | |
parent | 7be978ffe3f6071d973eeae17aa05bd593d03777 [diff] |
Do not scroll invisible selection into view. When we call focus() on an <input> element, we would scroll the element into view, then the selected text in it into view. However, if the <input> element has a selection that is not currently visible, it will first scroll the <input> into view, then try to scroll an empty LayoutRect(0, 0, 0x0) into view, which might cause the <input> out of view at last. In this patch, we would check whether the selection's visible rect is empty before scrolling it into view. Bug: 796880 Change-Id: Id5f7783a4efe137b180771280bd0c0c9dd1ab1ad Reviewed-on: https://chromium-review.googlesource.com/854779 Commit-Queue: Sandra Sun <[email protected]> Reviewed-by: David Bokan <[email protected]> Cr-Commit-Position: refs/heads/master@{#529638}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .