Closed Bug 429722 Opened 13 years ago Closed 13 years ago

long EV cert owner string obscures URL in location bar

Categories

(Firefox :: Address Bar, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 3.1a2

People

(Reporter: myk, Assigned: dao)

References

()

Details

Attachments

(3 files, 2 obsolete files)

Attached image screenshot
Long EV cert owner strings can obscure URLs in the location bar.

Attached is a screenshot of the location bar set to the OTP bank website (https://www.optbank.hu/), whose EV cert owner is "Orszagos Takarekpenztar es Kereskedelmi Bank Nyrt", with a 1024 wide window on a fresh profile.

In the screenshot, the URL is cut off near the end of the hostname, so browsing around the site gives the impression that the URL never changes.  Perhaps even longer strings would push the URL entirely offscreen.

The owner string is arguably more important than the URL for average users, but the URL string can still provide some valuable information, and some users may expect it to be visible as it normally is, so perhaps it would make sense to limit the size to which the owner string can grow and truncate the string beyond that size (or find some other solution to this problem).
Argh.  The correctly typoless URL to the website is: https://www.otpbank.hu/
We can probably just do this with a XUL crop tag and a max-width.  I'd incline
towards crop="center" so that we always get the location and the start of the
name, and are most likely to crop out things like "...heavy industries
incorporated..."

Obviously this is text we'd rather not disappear, but we'd also like to keep
the URL bar available.  :)  I'll see about a patch shortly.

Hmm - a patch is more pain than it should be here.  Attempting to set crop and max-width on the label causes rendering strangeness (pieces of the button jumping over to the far right, text alignment issues, &c.)  I'll cc Neil and see if he can offer insight - am I doing things wrong, or is XUL buggy when trying to set crop on labels inside a button?

Neil - how would you crop the label here?

http://mxr.mozilla.org/mozilla/source/browser/base/content/browser.xul#351
Attached patch WIP (obsolete) — Splinter Review
This patch sort-of fixes the problem.  More specifically:

- On Mac, this fixes things.
- On Windows, this adds the necessary cropping, and I was ready to call it "fixed" but it breaks the way we re-size the window.  Hard to explain, but basically, when you shrink a firefox window, the location bar shrinks to no-text-visible and then says "no more" and things like the search widget just start falling off the right of the window.  But with this patch, it doesn't stop elegantly, text overflows the right edge and gets very messy.  Obviously this has something to do with tinkering with the overflow: styling, but it's not clear how to fix it.
- On Linux, I don't know if this works yet, would love someone to take a look. Myk?
(In reply to comment #4)
> - On Linux, I don't know if this works yet, would love someone to take a look.
> Myk?

On Linux, the location bar has a minimum width, and narrowing the window eventually causes the search bar to overlap the location bar instead of merely being offscreen.  That sounds like something similar to what you're seeing on Windows.
(In reply to comment #5)
> Created an attachment (id=318277) [details]
> screenshot of problem with patch on linux
> 
> (In reply to comment #4)
> > - On Linux, I don't know if this works yet, would love someone to take a look.
> > Myk?
> 
> On Linux, the location bar has a minimum width, and narrowing the window
> eventually causes the search bar to overlap the location bar instead of merely
> being offscreen.  That sounds like something similar to what you're seeing on
> Windows.

Yeah, this is indeed what I'm talking about on Windows too.  Grr.

Neil, any ideas here?  If not, who should we get into the conversation?  Layout peeps like fantasai/roc/dbaron?
Duplicate of this bug: 448891
OS: Linux → All
Hardware: PC → All
(In reply to comment #6)
> Neil, any ideas here?  If not, who should we get into the conversation?  Layout
> peeps like fantasai/roc/dbaron?

Dao, do you have an idea?
Attached patch patchSplinter Review
Assignee: nobody → dao
Attachment #317356 - Attachment is obsolete: true
Attachment #318277 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #332188 - Flags: review?(johnath)
Looks lovely to me, Dao, but then again, I guess the proof here is in the application.  Does this do the "right thing" on all platforms?  If so, looks like it's worth punting to gavin for an official peer review and nom'ng for 3.0.x.
I tested this on Windows and Linux and it worked as expected.
Attachment #332188 - Flags: ui-review?(johnath)
Attachment #332188 - Flags: review?(johnath)
Attachment #332188 - Flags: review?(gavin.sharp)
Comment on attachment 332188 [details] [diff] [review]
patch

(In reply to comment #11)
> I tested this on Windows and Linux and it worked as expected.

And I've now confirmed that Mac does the right thing as well, sizing down doesn't create weird background issues or overlapping elements.

22em seems like a good compromise width - it means that the identity box on my mac is < 50% of the total width of the location bar at 1024x768.  And anyhow, once the clipping is in place, we can modify the width if needed - it's definitely an improvement over "as long as you like".

I've also confirmed (as expected) that it does smart things with long domain names when browser.identity.ssl_domain_display is set properly.
Attachment #332188 - Flags: ui-review?(johnath) → ui-review+
Attachment #332188 - Flags: review?(gavin.sharp) → review+
http://hg.mozilla.org/index.cgi/mozilla-central/rev/98cbd06e2376
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.1a2
Long owner strings have ellipses now and get shortened that way. Verified with:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a2pre) Gecko/20080819034536 Minefield/3.1a2pre ID:20080819034536

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1a2pre) Gecko/20080819020844 Minefield/3.1a2pre ID:20080819020844
Status: RESOLVED → VERIFIED
Duplicate of this bug: 414114
(In reply to comment #2)
> We can probably just do this with a XUL crop tag and a max-width.  I'd incline
> towards crop="center" so that we always get the location and the start of the
> name, and are most likely to crop out things like "...heavy industries
> incorporated..."

As proposed in bug 414114 already, wouldn't it make more sense to truncate the end of the organization name instead? I'm attaching an illustration which shows middle truncation on the left hand side and the proposed solution on the right hand side.

Will provide a patch (in a separate bug) if anybody is interested.
(In reply to comment #16)
> Will provide a patch (in a separate bug) if anybody is interested.

Please go ahead!
(In reply to comment #16)

> As proposed in bug 414114 already, wouldn't it make more sense to truncate the
> end of the organization name instead? I'm attaching an illustration which shows
> middle truncation on the left hand side and the proposed solution on the right
> hand side.
> 
> Will provide a patch (in a separate bug) if anybody is interested.

Yeah, I do think it's a separate bug, but a good idea, so as Dao says, please feel invited to do so.
(In reply to comment #18)
> Yeah, I do think it's a separate bug, but a good idea, so as Dao says, please
> feel invited to do so.

Done - bug 455334.
Duplicate of this bug: 454551
Duplicate of this bug: 457888
Duplicate of this bug: 460578
Duplicate of this bug: 462120
Depends on: 1218153
You need to log in before you can comment on or make changes to this bug.