Issue metadata
Sign in to add a comment
|
Android sometimes doesn't update origin elision when changing to landscape |
||||||||||||||||||||||||
Issue descriptionChrome Version: Chrome 56.0.2924.87 OS: Android 7.1.1 Device: Nexus 5X What steps will reproduce the problem? (1) Hold the phone in portrait. (2) Visit https://www-newyorker-com.cdn.ampproject.org/v/www.newyorker.com/culture/jia-tolentino/beauty-and-the-bestiality/amp?amp_js_v=9 (3) Rotate to landscape. What is the expected result? The whole origin is visible: landscape-expected.png What happens instead? While portrait, the origin is correctly elided from the left: portrait-pre-rotation.png https://www-newyorker-com.cdn.ampproject.org/v/www.newyorker.com/culture/jia-tolentino/beauty-and-the-bestiality/amp?amp_js_v=9 The origin is elided: landscape-observed.png ...newyorker-com.cdn.ampproject.org/v/www.newyorker.com/culture/jia-tolen... This doesn't always happen. I presume this has to do with the size of the screen, the length of the origin, and the length of the path. This might be related to Issue 705778 (Android: Certain URLs don't elide origin correctly). tedchoc@, could you help triage?
,
Sep 21 2017
,
Sep 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/995c535793ecd77fc2661c428d507a017d042db1 commit 995c535793ecd77fc2661c428d507a017d042db1 Author: Ted Choc <tedchoc@google.com> Date: Fri Sep 22 19:43:34 2017 [Android] Fix Omnibox URL eliding/positioning. bringPointIntoView causes issues if you call it back to back while in a layout pass. It defers setting the position till after layout and the last one wins (so our attempt to ensure the beginning was focused bringPointIntoView(1) would sometimes be clobbered). In addition, using setSelection() triggers Android to attempt to make your selection visible under certain situations (it attempts on text changes). When this happens, TextView registers as a predraw listener and resets the scroll position on the next draw frame and that can sometimes clobber our attempts of calling bringPointIntoView. This disables TextView's handling of bringPointIntoView entirely when the text isn't focused (and the trailing domain should be shown). Instead of relying on that behavior, we now call scrollTo ourselves with our own calculated positions. I tested using URLs from the two bugs listed as well as: crbug.com/723100 BUG= 705778 , 705780 Change-Id: I6b6c7a53ef1a15a32a93773026a48bbc7985771f Reviewed-on: https://chromium-review.googlesource.com/677881 Reviewed-by: Theresa <twellington@chromium.org> Commit-Queue: Ted Choc <tedchoc@chromium.org> Cr-Commit-Position: refs/heads/master@{#503824} [modify] https://crrev.com/995c535793ecd77fc2661c428d507a017d042db1/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java [modify] https://crrev.com/995c535793ecd77fc2661c428d507a017d042db1/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
,
Sep 22 2017
,
Sep 26 2017
The whole origin is now visible in landscape mode as mentioned @ landscape-expected.png in latest M63-63.0.3223.7, checked on Nexus 5X/7.1.2. In portrait mode origin is not visible during pre rotation and post rotation.
,
Sep 26 2017
Can you add screenshots for the behavior you're seeing? The origin should always be visible, so that sounds like an issue if it is not visible during pre rotation.
,
Sep 27 2017
Please find screenshot and video taken on Nexus 5X/7.1.2 @ http://go/chrome-androidlogs1/6/705780
,
Sep 27 2017
That behavior is what we expect. It is always showing the last part of the domain, so that is good. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by mpear...@chromium.org
, Jun 27 2017