Issue metadata
Sign in to add a comment
|
VR omnibox: Fine-tune scheme types that receive fade-elide treatment |
||||||||||||||||||||||||||||
Issue descriptionFade-based elision has now replaced ellipsis-based elision on the VR URL bar. The algorithm is simple: 1. Horizontally shift the URL to ensure the rightmost edge of the rendered TLD (and a bit of path) are visible. 2. Fade either edge if they overflow the field. The horizontal shift is selectively applied based on URL. Currently, we shift if the URL is standard, not 'file' scheme, and has a non-empty host portion. Can I get an Enamel sanity-check of this criteria? Are there tweaks we should make? For example, msw@ asked about 'filesystem' scheme during review. --- For reference, the new approach is much less code. Its tests are here: https://cs.chromium.org/chromium/src/chrome/browser/vr/elements/omnibox_formatting_unittest.cc?dr=CSs&sq=package:chromium&l=120
,
Feb 12 2018
I think that sounds okay to me, and similar to what we do on Android. elawrence, could you double-check too if that elision algorithm sounds good?
,
Feb 20 2018
Assigning to elawrence@ to obtain that answer. Please bounce this back to me (or close it), depending on the response. Thanks!
,
Feb 20 2018
Filesystem URIs have HTTP(S) URIs embedded within and as such should also be displayed with as much of the "tail" of the hostname visible as possible. e.g. for filesystem:http://webdbg.com/temporary/ if we have room for only 12 characters, I'd expect to see: webdbg.com/t Similarly, I'm not sure I understand why we'd want to show file URIs from the left. I don't think they are very interesting from a spoofing point-of-view (due to the fact that web content shouldn't be able to navigate to file://) but it seems like optimizing to show the tail of any hostname would also be reasonable here?
,
Feb 23 2018
Interesting input, Eric! On filesystems: That's interesting, and I'll look into it. On files: Given that there's just a scheme and path, it'd be useful to show both, but we can't. If we right-align files, and the filename is really long, we'd get "eally_long_filename.txt" or similar. I'll go ahead with that change unless you disagree. Thanks for thinking about this!
,
Feb 26 2018
,
Mar 2 2018
,
Mar 5 2018
,
Mar 5 2018
Hmm, no, but I applied that component only so it'd be properly triaged and obtain the feedback you gave. Restoring the component.
,
Mar 6 2018
@cjgrant : is this MVP given it's P2?
,
Apr 3 2018
On filesystem scheme handling: I briefly looked into this, and found it'll be tricky to do. GURL and url::Parsed have the notion of an inner URL (eg. the 'http' host inside the outer filesystem scheme), but FormatUrl() doesn't seem to. When we format a filesystem URL, it builds a new Parsed representation of the URL, but doesn't supply any insight into the inner URL. To make this work, we'd need to augment components/url_formatter to understand inner URLs, and apply formatting to them as well. See: https://cs.chromium.org/chromium/src/components/url_formatter/url_formatter.cc?q=url_formatter::FormatUrl&sq=package:chromium&dr=Ss&l=460 @elawrence, in the VR browser use-case, do you consider the filesystem case to be a spoofing risk? I don't understand this case well enough to judge this.
,
Apr 3 2018
On file:///: Thinking more about this, I wonder if there's more value in showing the user that they're looking at a file, than there is in viewing the tail end of the filename. As it's not a spoofing risk, I haven't touched this change yet.
,
Apr 3 2018
RE #11: I believe the risk of spoofing via filesystem:// is pretty low; the feature is pretty obscure and I believe meacer@ is looking to deprecate top-level navigations to such URLs. RE #5/#12: One point to note is that a file:// URI may contain a hostname, if the target file is located on a different system, e.g. file://machinename/folder/file.txt
,
Apr 3 2018
Yes, filesystem navigations are going away in M68: https://groups.google.com/a/chromium.org/forum/#!search/filesystem/blink-dev/X7rZeU93vjw/mQNBez7jBQAJ
,
Apr 3 2018
Thanks for the quick responses on FileSystem! Case closed on that front. On file scheme: We should simply remove our special-case for file. Then, if there's a hostname, we'll present it the same way we would for http/https - show the rightmost portion. If there's no host (ie. the file:///path case), then we'll just show it like a data URL: "file:///really/long/path/..." To Eric's original point, if there's a strong desire to show the end of the path (ie. filename) over the scheme, then we have a different special case - that is, in the "file with no hostname" case, right-align the whole thing. I think we've agreed this isn't a security/spoofing thing, but a "what makes sense" thing.
,
Apr 3 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1cecec489fc7a1e8216e2c8b90bc270b9e504d2c commit 1cecec489fc7a1e8216e2c8b90bc270b9e504d2c Author: Christopher Grant <cjgrant@chromium.org> Date: Tue Apr 03 21:05:30 2018 VR: Treat file URLs like https in origin presentation If a file URL has a hostname, treat it like an http/https hostname. In other words, don't special-case the file scheme, and ensure we show the rightmost portion of the hostname if present. BUG= 805026 Change-Id: I609198db5523d0ec9085e4a4942e7276ee2c273e Reviewed-on: https://chromium-review.googlesource.com/993496 Reviewed-by: Eric Lawrence <elawrence@chromium.org> Commit-Queue: Christopher Grant <cjgrant@chromium.org> Cr-Commit-Position: refs/heads/master@{#547826} [modify] https://crrev.com/1cecec489fc7a1e8216e2c8b90bc270b9e504d2c/chrome/browser/vr/elements/omnibox_formatting.cc [modify] https://crrev.com/1cecec489fc7a1e8216e2c8b90bc270b9e504d2c/chrome/browser/vr/elements/omnibox_formatting_unittest.cc [modify] https://crrev.com/1cecec489fc7a1e8216e2c8b90bc270b9e504d2c/chrome/browser/vr/testapp/vr_test_context.cc
,
Apr 4 2018
,
May 8 2018
Fix verified in build 67.0.3396.29 beta. Looks good. |
|||||||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||||||
Comment 1 by cjgrant@chromium.org
, Jan 29 2018