Add a URL elision method tailored for a URL bar

Desktop / Chromium - Christopher Grant [] - 9 October 2017 11:47 EDT

VR mode currently shows a read-only URL bar. We currently bail from VR if the hostname doesn't fit on the bar, but we should be eliding instead.

Enamel's current guidance for this scenario is to elide from the right until we've chopped the path and related parts, then continue to elide from the front, preserving the TLD as long as possible. This is different from other elision helpers currently available.

This method, and the original ElideUrl() method, should converge incrementally to a single algorithm.


Change-Id: I19464f00df8f3e87743bbb19f857210164f810c3 Reviewed-on: Commit-Queue: Christopher Grant

6871e12 Add a URL elision method tailored for a URL bar
components/url_formatter/ | 7 +-
components/url_formatter/ | 138 ++++++++++++-
components/url_formatter/elide_url.h | 23 ++-
components/url_formatter/ | 259 ++++++++++++++++++++++---
4 files changed, 391 insertions(+), 36 deletions(-)


  • Share