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

Issue 27094 link

Starred by 12 users

Issue metadata

Status: Archived
Owner: ----
Closed: Aug 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug
RTL

Blocked on:
issue 104606
issue 78602
issue 78603
issue 78604

Blocking:
issue 119595



Sign in to add a comment

[Meta] Page titles need to be displayed with directionality from page

Reported by evan@chromium.org, Nov 8 2009

Issue description

http://www.hadess.net/2009/11/notice-anything.html

Tab strip: ellipsis is on the wrong side (?).  Should we propagate the page 
directionality into the tab title?  This tab needs an LRM.

Content: title of page has boxes in it.  Font selection?
 
 Issue 27157  has been merged into this issue.
Labels: -Area-Misc Area-BrowserUI
This might be a dupe of 27161

Comment 3 by evan@chromium.org, Nov 10 2009

Labels: -Pri-2 Pri-3
Status: Assigned

Comment 4 by oritm@chromium.org, Dec 18 2009

Labels: -Area-BrowserUI Area-UI-Features
Area-UI-Features label replaces Area-BrowserUI label

Comment 5 by evan@chromium.org, Jan 26 2010

Labels: RTL
Hey Jeremy, can you comment on what ends up in the tab strip on Mac for this page, and 
what you think it should be?  I'll attach a screenshot of Linux -- obviously the big 
square in the middle is wrong, but how does the rest look to you?
hadess.png
32.3 KB View Download

Comment 6 by jeremy@chromium.org, Jan 26 2010

Let's keep this bug open for the tab title and file a separate one for the text rendering issues in the page.

There is currently no official standard for which directionality to use for displaying a page's title text.  We can 
either use the browser's UI language direction, the page's directionality or make a best guess on the 
directionality based on the contents of the page title.  None of these are ideal and we will always get it wrong 
sometimes.

Due to the above, using mixed directionality text in a page title pretty much guarantees cross-browser/OS 
inconsistency.

I've attached screenshots of how Chrome/Mac and Safari/Mac render the page title.

As much as I'd like for us to fix this, given the current inconsistent state of affairs I think this is pretty low 
priority.

Ultimately we should try to augment the standard by defining the behavior in this case and implement that on 
all platforms.
safari.png
7.9 KB View Download
chrome.png
25.9 KB View Download

Comment 7 by jeremy@chromium.org, Jan 26 2010

Issues with text rendering filed as  issue 33169 

Comment 8 by evan@chromium.org, Jan 26 2010

Labels: -OS-Linux OS-All
Status: Available
Summary: RTL page titles show up funny in tab strip
Labels: -Area-UI-Features Area-UI
Labels: -I18N bulkmove Feature-I18N
http://www.hadess.net/2009/11/notice-anything.html

Tab strip: ellipsis is on the wrong side (?).  Should we propagate the page 
directionality into the tab title?  This tab needs an LRM.

Content: title of page has boxes in it.  Font selection?

Comment 11 by evan@chromium.org, Mar 27 2011

Cc: a deleted user a deleted user
Haha, I filed this bug and completely forgot about it!

Comment 12 by evan@chromium.org, Mar 27 2011

Related WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=50961
Cc: evan%chr...@gtempaccount.com
The WebKit bug is now fixed :o)

Anyone working on the Chrome side of things?

Comment 14 by a...@chromium.org, Apr 6 2011

Cc: -a deleted user
Labels: meta
Owner: a deleted user
I'll take this, will file sub-bugs, fix what I can and delegate the rest.

Comment 15 by a...@chromium.org, Apr 6 2011

Summary: [Meta] Page titles need to be displayed with directionality from page

Comment 16 by a...@chromium.org, Apr 6 2011

Blockedon: 78602 78603 78604
The issues required for a fix are:

- correct truncation (i.e. showing the earlier characters in the string when truncating; broken on Mac)
- correct directionality (i.e. putting the ellipsis on the elided end of the string; broken on Win)
- correct embedded orientation (see attached test case, broken everywhere)
arrow.html
231 bytes View Download

Comment 17 by a...@chromium.org, Apr 6 2011

"- correct embedded orientation (see attached test case, broken everywhere)"

BTW, this is really broken _everywhere_. Safari 5 Mac, IE8, FF4 Mac. It would be awesome to get it right.

Comment 18 by evan@chromium.org, Apr 14 2011

FYI, I haven't fully fixed the WebKit side yet.  :(
I will let you know when I do.

Comment 19 by evan@chromium.org, Apr 20 2011

Cc: a deleted user
 Issue 79903  has been merged into this issue.
Project Member

Comment 20 by bugdroid1@chromium.org, Apr 20 2011

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=82400

------------------------------------------------------------------------
r82400 | evan@chromium.org | Wed Apr 20 16:25:41 PDT 2011

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_view_host.h?r1=82400&r2=82399&pathrev=82400
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/notifications/balloon_host.h?r1=82400&r2=82399&pathrev=82400
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/tab_contents.cc?r1=82400&r2=82399&pathrev=82400
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/prerender/prerender_contents.cc?r1=82400&r2=82399&pathrev=82400
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/render_view.cc?r1=82400&r2=82399&pathrev=82400
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/tab_contents/web_contents_unittest.cc?r1=82400&r2=82399&pathrev=82400
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/interstitial_page.h?r1=82400&r2=82399&pathrev=82400
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/prerender/prerender_manager.cc?r1=82400&r2=82399&pathrev=82400
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/interstitial_page.cc?r1=82400&r2=82399&pathrev=82400
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/tab_contents.h?r1=82400&r2=82399&pathrev=82400
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/view_messages.h?r1=82400&r2=82399&pathrev=82400
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/prerender/prerender_contents.h?r1=82400&r2=82399&pathrev=82400
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/render_view.h?r1=82400&r2=82399&pathrev=82400
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_view_host_delegate.h?r1=82400&r2=82399&pathrev=82400
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_view_host.cc?r1=82400&r2=82399&pathrev=82400

Plumb direction of document title through IPC layer.

It's ignored at the other end of the IPC, but I have tagged all
the places it needs to be obeyed with a link to the bug.

While I'm at it, switch UpdateTitle to using string16.

BUG= 27094 

Review URL: http://codereview.chromium.org/6880073
------------------------------------------------------------------------
Project Member

Comment 21 by bugdroid1@chromium.org, Apr 21 2011

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=82582

------------------------------------------------------------------------
r82582 | evan@chromium.org | Thu Apr 21 16:29:23 PDT 2011

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/notifications/balloon_host.h?r1=82582&r2=82581&pathrev=82582
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/tab_contents.cc?r1=82582&r2=82581&pathrev=82582
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/prerender/prerender_contents.cc?r1=82582&r2=82581&pathrev=82582
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/tab_contents/web_contents_unittest.cc?r1=82582&r2=82581&pathrev=82582
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/interstitial_page.h?r1=82582&r2=82581&pathrev=82582
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/prerender/prerender_manager.cc?r1=82582&r2=82581&pathrev=82582
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/interstitial_page.cc?r1=82582&r2=82581&pathrev=82582
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/tab_contents.h?r1=82582&r2=82581&pathrev=82582
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/prerender/prerender_contents.h?r1=82582&r2=82581&pathrev=82582
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_view_host_delegate.h?r1=82582&r2=82581&pathrev=82582
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_view_host.cc?r1=82582&r2=82581&pathrev=82582
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/navigation_entry.h?r1=82582&r2=82581&pathrev=82582
 M http://src.chromium.org/viewvc/chrome/trunk/src/base/i18n/rtl.h?r1=82582&r2=82581&pathrev=82582

Add and use a base::i18n::StringWithDirection for carrying titles.

This is a refactoring of r82400.  We're going to need the title
direction in a bunch of different places; it's better to package
it up as one object.

BUG= 27094 

Review URL: http://codereview.chromium.org/6878089
------------------------------------------------------------------------
Project Member

Comment 22 by bugdroid1@chromium.org, Apr 23 2011

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=82778

------------------------------------------------------------------------
r82778 | evan@chromium.org | Fri Apr 22 20:17:28 PDT 2011

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/navigation_controller.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/interstitial_page.h?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/interstitial_page.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/sessions/base_session_service.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/debugger/devtools_http_protocol_handler.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/external_tab_container_win.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/sessions/session_types.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/navigation_entry.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/tab_contents.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/site_instance_unittest.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/automation/testing_automation_provider.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/ui/cocoa/applescript/tab_applescript.mm?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/tab_contents.h?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/navigation_entry_unittest.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/render_view_host_manager_unittest.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/ui/browser.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/navigation_entry.h?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/sessions/session_service_unittest.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/ui/toolbar/back_forward_menu_model.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/ui_test_utils.cc?r1=82778&r2=82777&pathrev=82778
 M http://src.chromium.org/viewvc/chrome/trunk/src/base/i18n/rtl.h?r1=82778&r2=82777&pathrev=82778

Change NavigationEntry's title fields to carry the text direction.

Mark most of the users with a tag pointing at the bug, so they can
be fixed incrementally.

BUG= 27094 

Review URL: http://codereview.chromium.org/6894009
------------------------------------------------------------------------
Project Member

Comment 23 by bugdroid1@chromium.org, Apr 25 2011

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=82908

------------------------------------------------------------------------
r82908 | evan@chromium.org | Mon Apr 25 12:30:51 PDT 2011

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/render_view.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/tab_contents/web_contents_unittest.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/interstitial_page.h?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/prerender/prerender_manager.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/debugger/devtools_http_protocol_handler.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/external_tab_container_win.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/view_messages.h?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/prerender/prerender_contents.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/tab_contents.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/automation/testing_automation_provider.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/prerender/prerender_contents.h?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/tab_contents.h?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_view_host.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/render_view_host_manager_unittest.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/navigation_entry_unittest.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/navigation_entry.h?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/ui_test_utils.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/base/i18n/rtl.h?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/navigation_controller.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/notifications/balloon_host.h?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/sessions/base_session_service.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/interstitial_page.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/render_view.h?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_view_host_delegate.h?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/sessions/session_types.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/navigation_entry.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_view_host.h?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/site_instance_unittest.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/ui/cocoa/applescript/tab_applescript.mm?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/ui/browser.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/sessions/session_service_unittest.cc?r1=82908&r2=82907&pathrev=82908
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/ui/toolbar/back_forward_menu_model.cc?r1=82908&r2=82907&pathrev=82908

Revert my recent changes regarding title directionality.

This reverts:
  r82400: Plumb direction of document title through IPC layer.
  r82582: Add and use a base::i18n::StringWithDirection for carrying titles.
  r82778: Change NavigationEntry's title fields to carry the text direction.

I'm going to take an alternative approach; after getting this far, I can
see that this approach was too complicated.

BUG= 27094 

Review URL: http://codereview.chromium.org/6901003
------------------------------------------------------------------------
Project Member

Comment 24 by bugdroid1@chromium.org, Aug 1 2011

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=94923

------------------------------------------------------------------------
r94923 | evan@chromium.org | Mon Aug 01 10:17:11 PDT 2011

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/render_view.cc?r1=94923&r2=94922&pathrev=94923
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/render_view.h?r1=94923&r2=94922&pathrev=94923

Enforce the page title direction

WebKit now exposes the direction (in the RTL sense) of page titles.
When we receive a title+direction from WebKit, insert a strong
directionality character in the title to force all downstream
consumers of titles to display the text correctly.

BUG= 27094 

Review URL: http://codereview.chromium.org/7514013
------------------------------------------------------------------------

Comment 25 by evan@chromium.org, Aug 1 2011

Here are some URLs using <title dir=rtl> that should benefit from my change:

http://www.fxp.co.il/forumdisplay.php?f=257
http://www.isoc.org.il/index.html
http://he.wikipedia.org/wiki/HTML

Comment 26 by evan@chromium.org, Aug 1 2011

Status: Fixed
...and I have verified that Chrome built with my patch renders those titles correctly displays correctly on Linux.  The various OSes need to obey the extra information, but those are the blocked bugs.

Comment 27 by evan@chromium.org, Aug 1 2011

Owner: evan@chromium.org
Status: Assigned
Had to revert.  Life is so, so complicated.
Project Member

Comment 28 by bugdroid1@chromium.org, Aug 2 2011

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=95007

------------------------------------------------------------------------
r95007 | evan@chromium.org | Mon Aug 01 16:57:46 PDT 2011

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_view_host.h?r1=95007&r2=95006&pathrev=95007
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/tab_contents.cc?r1=95007&r2=95006&pathrev=95007
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/render_view.cc?r1=95007&r2=95006&pathrev=95007
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/tab_contents/web_contents_unittest.cc?r1=95007&r2=95006&pathrev=95007
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/interstitial_page.h?r1=95007&r2=95006&pathrev=95007
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/interstitial_page.cc?r1=95007&r2=95006&pathrev=95007
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/tab_contents.h?r1=95007&r2=95006&pathrev=95007
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/view_messages.h?r1=95007&r2=95006&pathrev=95007
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/render_view.h?r1=95007&r2=95006&pathrev=95007
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_view_host_delegate.h?r1=95007&r2=95006&pathrev=95007
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_view_host.cc?r1=95007&r2=95006&pathrev=95007

Plumb the title direction up to the renderer host

We need the title direction to properly display titles in Chrome UI.

Previously I tried just modifying the title when we get it from
WebKit to include directionality overrides, but the extensions API
needs the underlying title without direction markers.

This change plumbs the title direction up to RenderViewHostDelegate.
A further patch will make use of it from there.

BUG= 27094 

Review URL: http://codereview.chromium.org/7453050
------------------------------------------------------------------------
Project Member

Comment 29 by bugdroid1@chromium.org, Aug 2 2011

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=95008

------------------------------------------------------------------------
r95008 | evan@chromium.org | Mon Aug 01 16:58:16 PDT 2011

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/history/history_tab_helper.cc?r1=95008&r2=95007&pathrev=95008
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/navigation_entry.h?r1=95008&r2=95007&pathrev=95008
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/navigation_entry.cc?r1=95008&r2=95007&pathrev=95008

history: use display title, not page title

entry.title() is the underlying page title, but we want to record
in history the actual title we show to the user.  These differ in
corner cases like when the page lacks a title, and also importantly
in that the display title can include RTL metadata.

BUG= 27094 

Review URL: http://codereview.chromium.org/7453053
------------------------------------------------------------------------

Comment 30 by evan@chromium.org, Aug 17 2011

I had to revert my patches.  Extensions rely on some intermediate page title -- not the title of the page as found on the page, nor the fully fixed-up title of the page with LTR marks.  I'm not sure how to proceed.  I may introduce a "title_for_extensions_" variable on NavigationController so I can track it separately.

Comment 31 by evan@chromium.org, Sep 20 2011

Owner: ----
Not going to get to this before my leave, sorry.
Status: Available
Blocking: 119595
Blockedon: 120863
Blockedon: -120863 104606

Comment 36 by evan@chromium.org, Jun 11 2012

Blockedon: -78602 -78603 -78604 -104606 chromium:78602 chromium:78603 chromium:78604 chromium:104606
Blocking: -119595 chromium:119595
Cc: -evan@chromium.org
(Un-ccing myself from bugs.)

Comment 37 by evan@chromium.org, Jun 11 2012

(Un-ccing myself from bugs.)
Project Member

Comment 38 by bugdroid1@chromium.org, Mar 10 2013

Project Member

Comment 39 by bugdroid1@chromium.org, Mar 20 2013

Labels: -Cr-UI-I18N Cr-UI-Internationalization
This work was never finished and is being removed in https://codereview.chromium.org/23190034/.
Project Member

Comment 41 by bugdroid1@chromium.org, Aug 23 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=156607

------------------------------------------------------------------------
r156607 | esprehn@chromium.org | 2013-08-23T01:17:25.903326Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/Document.h?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/testing/runner/TestRunner.cpp?r1=156607&r2=156606&pathrev=156607
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/title-directionality-removeChild.html?r1=156607&r2=156606&pathrev=156607
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/title-directionality.html?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/svg/SVGTitleElement.cpp?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/loader/HistoryController.cpp?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/testing/runner/TestRunner.h?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/testing/runner/WebTestProxy.cpp?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/core.gypi?r1=156607&r2=156606&pathrev=156607
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/text/StringWithDirection.h?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/loader/HistoryController.h?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/loader/DocumentLoader.h?r1=156607&r2=156606&pathrev=156607
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/title-directionality-removeChild-expected.txt?r1=156607&r2=156606&pathrev=156607
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/title-directionality-expected.txt?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/html/HTMLTitleElement.cpp?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/FrameLoaderClientImpl.cpp?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/loader/FrameLoader.cpp?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/html/HTMLTitleElement.h?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/loader/FrameLoaderClient.h?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/loader/EmptyClients.h?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/loader/FrameLoader.h?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/FrameLoaderClientImpl.h?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=156607&r2=156606&pathrev=156607
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/Document.cpp?r1=156607&r2=156606&pathrev=156607

Remove code related to title directionality, we never used it

The project to support text direction in the page title (and history items) was never completed
and doesn't appear to work once we lazy attach in the parser. It's not clear why the style doesn't
inherit properly down through the <head>, but once we lazy attach the style never gets there.

Some day if Chromium decides to support text directions in titles we can resurrect this code
and figure out how to make it work in a lazy attach world.

BUG= 27094 

Review URL: https://chromiumcodereview.appspot.com/23190034
------------------------------------------------------------------------

Comment 42 by js...@chromium.org, Oct 13 2013

Cc: esprehn@chromium.org
Labels: -Pri-3 Pri-2
This should be at least Pri-2. 

Comment 43 by js...@chromium.org, Oct 14 2013

Cc: tony@chromium.org eseidel@chromium.org msw@chromium.org le...@chromium.org kkimlabs@chromium.org
Labels: Cr-UI-Browser-TabStrip
> It's not clear why the style doesn't inherit properly down through the <head>, 
> but once we lazy attach the style never gets there.

@esprehn, 
Should we have a separate bug as to why the style does not hiherit properly down through <head> and make it a blocker to this bug? 

BTW, apparently, the reason this was not completed had to do with an extension title. (comment 30)

Comment 44 by evan@chromium.org, Oct 14 2013

Just to elaborate on why this bug is hard:

WebKit can figure out just fine what the directionality of the <title> tag is.  (The inheriting logic has some corner cases but the simple case where the <html> has a dir works already).

What's hard is making all the code that *uses* titles handle directionality ok.  Your two options are:

1) make every bit of code that uses a title instead use a struct of title and directionality
This ends up being incredibly invasive and annoying, because titles are used everywhere -- in the history database, passed through to extensions, etc.  In the limit we expose the page title to extensions and extensions want to be able to display page titles correctly (imagine e.g. an extension that lists all your open tabs), so we'd need to add API to pass the directionality into the extension.

2) just insert an explicit directionality marker into the title string before passing it around
This makes all the code that uses titles magically work (e.g. code that asks "did the title change?" by using a string compare will still do the right thing when a page just dynamically changes the title directionality and not the text).
But it falls down because there are many other places where code wants the actual page title, not the page title with extra directionality markers in it.  Imagine e.g. an extension that does a string-match on the title of the page to find all Google Search results by regexing for r/Google Search - (.*)/.


Both of these could be made to work, but it's quite painful.

Comment 45 by js...@chromium.org, Oct 15 2013

Thanks a lot for the explanation, Evan. (I thought you got yourself off this bug :-))

Would it be feasible to introduce a new "function" (webkit api?) that gives 'direction-aware-title' (directionality-marker-added-title or a struct of bare title and directionality) and let callers decide which one to call, 'bare title' or 'direction-aware-title'? Then, we can change all the callers that need to use 'direction-aware-title' gradually. 
This still requires adding an extension API for the 'direction-aware-title'. 

Comment 46 by evan@chromium.org, Oct 15 2013

Yes, I think that is your best way forward.  That is roughly the approach I was taking on this bug.  See changes above like this one:
http://src.chromium.org/viewvc/chrome?revision=95008&view=revision
which use a separate GetTitleForDisplay() function.  (That was comment #29, in comment #30 I ended up needing to revert it)
Cc: -kkimlabs@chromium.org
Project Member

Comment 48 by sheriffbot@chromium.org, Feb 14 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been available for more than 365 days, and should be re-evaluated. Please re-triage this issue.
The Hotlist-Recharge-Cold label is applied for tracking purposes, and should not be removed after re-triaging the issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Archived (was: Untriaged)
Archiving old bugs that have Hotlist-Recharge-Cold and haven't been modified in over a year. 

If you feel this issue should still be addressed, feel free to reopen it or to file a new issue.

Sign in to add a comment