New issue
Advanced search Search tips

Issue 838159 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Missing scheme on clipboard after enabling steady-state scheme elision

Project Member Reported by elawrence@chromium.org, Apr 30 2018

Issue description

Chrome Version       : 68.0.3415.0
OS Version: 10.0

What steps will reproduce the problem?
1. Enable Enable chrome://flags/#omnibox-ui-hide-steady-state-url-scheme-and-subdomains
2. Visit https://www.feistyduck.com/bulletproof-tls-newsletter/issue_40_certificate_transparency_logging_is_now_mandatory.html
3. Click into the middle of the url (all visible text selects)
4. Hit CTRL+X

What is the expected result? Complete URL, including the scheme, is copied to the clipboard.

What happens instead of that? Only display text is copied.


Please provide any additional information below. Attach a screenshot if
possible.

UserAgentString: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3415.0 Safari/537.36

 
WrongScheme.png
16.1 KB View Download
Cc: tommycli@chromium.org
Summary: Missing scheme on clipboard after enabling steady-state scheme elision (was: Wrong scheme on clipboard after enabling steady-state scheme elision)
(technically, the scheme on the clipboard is missing entirely, which results in interpretation as HTTP rather than HTTPS by all common software).
Description: Show this description
Owner: tommycli@chromium.org
Status: Assigned (was: Untriaged)
Beyond the scheme going missing, any "trivial" subdomain labels are also stripped.

e.g. "https://en.m.wikipedia.org/wiki/Fiddler_(software)" yields "en.wikipedia.org/wiki/Fiddler_(software)"
Unfortunately, neither tommycli nor I can reproduce this (I'm also on Windows 10, also running 68.0.3415.0). When we copy the text from the omnibox, we're seeing the full URL on the clipboard, as intended.

We'll have to brainstorm what conditions might be different for you to account for the breakage.
Cc: -tommycli@chromium.org jdonnelly@chromium.org
Re #6: To be clear, when you focus the omnibox, does it look like this as you hit CTRL+C?

(If I double-click the full url to edit such that the scheme appears, this doesn't repro).
FocusButNotEditing.png
3.0 KB View Download
I cannot reproduce this at 100%, but after playing with it a bit, I find that using CTRL+X or right-click>Cut (rather than CTRL+C or right-click>Copy) seems to reproduce the problem.
Ah. This seems to reproduce in cases where CUT is present *and* a trivial subdomain is found. So perhaps the issue is that the codepath used in CUT that tries to figure out whether you're at the front of the URL doesn't account for the trivial subdomain hiding?

https://www.example.com > "example.com"
https://example.com > "https://example.com/"
Here's a weird variant:

https://www.bayden.com/test/videoest.html -> Ctrl+X yields "https://bayden.com/test/videoest.html", so we've got a case where the scheme is added back, but the subdomain is still elided.
Description: Show this description
Re #8: Yes, it looks like your screenshot. The elided URL is all that is visible but the full URL is put on the clipboard.
Re #10: Good news, I guess? I had this (the bug) happen to me once just now. I don't know what was different and I tried following the exact same steps to reproduce it without any luck.

It's *possible* that I used Ctrl-X the one time it happened but at the moment I'm trying all variations of cut and copy and can't get it to reproduce.
Re #11: Ok, I'm seeing the "unelide the scheme but not the www" with right-click, Cut.

tommycli: feel free to come by my desk any time and I can (hopefully) reproduce it for you.
Wow that IS strange - Thank you, I was able to reproduce it using the Right-click Cut instructions.
Project Member

Comment 17 by bugdroid1@chromium.org, May 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b84f1e3579e4f82974733d45fbe79c3ead2c19ce

commit b84f1e3579e4f82974733d45fbe79c3ead2c19ce
Author: Tommy C. Li <tommycli@chromium.org>
Date: Fri May 04 18:00:25 2018

Omnibox UI Experiments: Steady State Elisions - Fix Cut to clipboard

This CL improves the after-Cut text processing to reliably handle the
Cut case when Steady State Elisions is on.

Previously, the logic relied on IsSelectAll, which doesn't work
correctly in the Cut case. Now it just compares the contents of the
paste buffer vs. the current page's display URL.

This also has the side benefit of simplifying the API.

It also updates a test to explicitly check a Steady State Elisions
case.

Bug:  838159 ,  797354 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Iae3ee431051e2f7bbbf63a0b87e82b7f363213aa
Reviewed-on: https://chromium-review.googlesource.com/1040912
Reviewed-by: Justin Donnelly <jdonnelly@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Tommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556113}
[modify] https://crrev.com/b84f1e3579e4f82974733d45fbe79c3ead2c19ce/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
[modify] https://crrev.com/b84f1e3579e4f82974733d45fbe79c3ead2c19ce/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
[modify] https://crrev.com/b84f1e3579e4f82974733d45fbe79c3ead2c19ce/components/omnibox/browser/omnibox_edit_model.cc
[modify] https://crrev.com/b84f1e3579e4f82974733d45fbe79c3ead2c19ce/components/omnibox/browser/omnibox_edit_model.h
[modify] https://crrev.com/b84f1e3579e4f82974733d45fbe79c3ead2c19ce/components/omnibox/browser/omnibox_edit_model_unittest.cc
[modify] https://crrev.com/b84f1e3579e4f82974733d45fbe79c3ead2c19ce/ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm

Status: Fixed (was: Assigned)
Above CL should fix it.

Sign in to add a comment