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

Issue 772476 link

Starred by 4 users

Issue metadata

Status: WontFix
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Task
Team-Security-UX


Show other hotlists

Hotlists containing this issue:
EnamelAndFriendsFixIt


Sign in to add a comment

Unify and simplify URL elision methods

Project Member Reported by cjgrant@chromium.org, Oct 6 2017

Issue description

A new URL elision function may land soon, which differs from ElideUrl() in a number of ways.

- It doesn't favor the filename in a path.
- It elides the hostname blindly from the left, without special handling of subdomain.
- It returns a Parsed struct describing the shortened URL, which can be used to emphasize and style the result.

The new method targets URLs displayed in VR.  Currently, for security, if the VR browser encounters a URL with a hostname too long for the URL bar, the browser kicks out of VR completely.  We need to fix this, allowing the URL to be both shortened and properly styled.

At the same time, VR can't afford the runtime penalty imposed by ElideUrl()'s n^2 path elision approach.

This bug tracks the convergence of these two approaches.  That means (at least):

- Updating both methods to measure text in LTR direction, matching how the string should later be rendered.
- Reworking the file-preserving path elision algorithm to be faster, such that VR can leverage it.
- Getting approval to have ElideUrl() drop its special handling of subdomains, in favor of Enamel's recommendation to simply elide the host from the left side.
- Settling on one or more wrapper functions around a single elision method, or, using a unified ElideUrl() everywhere.

 

Comment 1 by est...@chromium.org, Nov 10 2017

Labels: Hotlist-EnamelAndFriendsFixIt
Status: WontFix (was: Assigned)
URL elision for VR is heading in a different direction.  After considering the latest enamel guidance for origin presentation, and discussing with msw@, VR will move to a fade-based approach.

This removes the need for the newly-introduced ElideUrlSimple(), and as such, it will be removed after the switch-over.

Sign in to add a comment