New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 617439 link

Starred by 4 users

Issue metadata

Status: Duplicate
Merged: issue 437993
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression

Blocked on:
issue 630365



Sign in to add a comment

Text at top of Page Info Bubble dialog should be selectable

Project Member Reported by shrike@chromium.org, Jun 5 2016

Issue description

Version: 53.0.2758.0 Canary
OS: 10.11

What steps will reproduce the problem?
(1) Activate MacViews webui dialogs
(2) Navigate to http://www.apple.com
(3) Click the lock icon in the Omnibox

What is the expected output?
The bubble that appears says, "You connection to this site is not private.", and that text should be selectable.

What do you see instead?
The text is not selectable. The message and the site URL should both be selectable.

Please use labels and text to provide additional information.

 
Summary: Text at top of Origin Info Bubble dialog should be selectable (was: Text at top of HTTPAuth dialog should be selectable)
Are we sure we want this? Sure it's a change from the existing Cocoa dialog, but I suspect it's a bug that someone forgot to disable selection on the NSControl for the Cocoa dialog.

Safari's ~equivalent dialog (attached) has no selectable text. And elsewhere in Chrome we go to lengths [1] to ensure text is not selectable. And E.g. the Cocoa old-school HTTPAuth dialog in Chrome has no selectable text outside of the text fields (also attached). For that one go to, e.g. apted.net/chat with MacViews webui dialogs *disabled*.

[1] E.g. https://cs.chromium.org/chromium/src/ui/base/cocoa/controls/hyperlink_text_view.mm?q=selectionRangeForProposedRange&sq=package:chromium&l=55
Screen Shot 2016-06-06 at 10.02.44 AM.png
53.6 KB View Download
Screen Shot 2016-06-06 at 10.07.25 AM.png
30.5 KB View Download
The text in OS X alert panels is selectable (e.g. the Confirm Navigation alert in Chrome) - I think the fact that Safari's text is not selectable in that alert is not a bug per se, but it's not what you want.

Selectable text in alerts is useful when users need to report errors - instead of transcribing the error or trying to remember it they can just copy/paste it. For this reason the text at the top of the OIB should be selectable, as should the text in HTTPAuth dialog (not sure why the text there is divided into two separate fields, but that is for another bug).

Screen Shot 2016-06-05 at 8.03.41 PM.png
94.8 KB View Download
Project Member

Comment 3 by sheriffbot@chromium.org, Jul 7 2016

Labels: -M-53 M-54 MovedFrom-53
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Blockedon: 630365
I looked into this a bunch. The basic problem here is that views::Label does not support text selection at all; there's no way to enable it, so we'll have to implement it. I filed  https://crbug.com/630365  for that.
Components: UI>Browser>Bubbles
Some parts of views UI just use read only textfields with the same background as the dialog to emulated selectable Labels. See the Cookie info in the Collected Cookies dialog, in particular the value for fields like Name, Content etc. Code-https://cs.chromium.org/chromium/src/chrome/browser/ui/views/cookie_info_view.h?cl=GROK&gsn=SetEnabled&q=CookieInfoVie&sq=package:chromium&l=30. 

Though seems it has its own drawbacks. Placing the cursor within the textfield causes the cursor to blink. Maybe just subclassing Textfield can help with these though.

Comment 7 by msw@chromium.org, Aug 11 2016

Cc: msw@chromium.org
Read-only textfields also lack multi-line support.
Ellyjones, are you still trying to make labels selectable?
Owner: karandeepb@chromium.org
Status: Assigned (was: Available)
Here's where this bug was:

views::Label does not support text selection at all. views::Textfield does, and all the logic for selecting text with the mouse and so on is actually inside views::Textfield. However, you can't necessarily use views::Textfield as a drop-in replacement for views::Label, since views::Label supports multi-line text with wrapping and views::Textfield does not support multi-line text.

For this particular use, we might be able to get away with a views::Textfield, as long as we can guarantee the text is one line. If it could be multiple lines, we need to either:

1) Implement selection support in views::Label, by extracting the code from views::Textfield and making it reusable.
2) Implement multi-line text support with wrapping in views::Textfield

And then we need to implement multi-line text support in RenderTextMac either way.

karandeepb@, want to take a look? :)
Cc: tapted@chromium.org
So I read a bit about the state of the different RenderText implementations,
Currently RenderTextMac (which we use for Labels) does not support text selection. So for MacViews, we would also need to implement selection for RenderTextMac. But I think the plan is to move to RenderTextHarfbuzz completely. So don't think we should be spending time working on RenderTextMac. 

We could change Labels to use RenderTextHarfbuzz, but I found a comment by tapted@ that there are the following blockers for it-
"-We pop-up NSMenus on top of views::Labels in Comboboxes -- we need the layout to match, and NSMenu will never use Harfbuzz
-I need to ensure the performance is comparable"


A question for tapted@ once he returns: given that NSMenu text layout can't/won't ever match up with Harfbuzz, does this effectively mean we will never switch to Harfbuzz?
Summary: Text at top of Page Info Bubble dialog should be selectable (was: Text at top of Origin Info Bubble dialog should be selectable)
(Standardizing terminology.)
Cc: lgar...@chromium.org
Blocking: 437993
Mergedinto: 437993
Status: Duplicate (was: Assigned)
Merging this into  issue 437993 .
Blocking: -437993

Sign in to add a comment