Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Issue 7514013: Enforce the page title direction (Closed)

Created:
9 years, 5 months ago by Evan Martin
Modified:
9 years, 4 months ago
Reviewers:
brettw, DaveMoore, jeremy
CC:
chromium-reviews, joi+watch-content_chromium.org, jam
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=94923

Patch Set 1 #

Patch Set 2 : ok #

Total comments: 1

Patch Set 3 : fix #

Patch Set 4 : reup #

Total comments: 2

Patch Set 5 : ok #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -13 lines) Patch
M content/renderer/render_view.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/render_view.cc View 1 2 3 4 4 chunks +30 lines, -12 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Evan Martin
Hi, I'd like your advice on this change. With it, all titles within Chrome will ...
9 years, 5 months ago (2011-07-26 18:59:45 UTC) #1
DaveMoore
If this guarantees that base::i18n::GetFirstStrongCharacterDirection() returns RIGHT_TO_LEFT then my new code should work fine. On ...
9 years, 5 months ago (2011-07-26 23:16:38 UTC) #2
jeremy
LGTM
9 years, 5 months ago (2011-07-27 08:30:37 UTC) #3
brettw
Seems like a fine approach. http://codereview.chromium.org/7514013/diff/2001/content/renderer/render_view.cc File content/renderer/render_view.cc (right): http://codereview.chromium.org/7514013/diff/2001/content/renderer/render_view.cc#newcode1189 content/renderer/render_view.cc:1189: fixed_title.push_back(0x200E); // U+200E LRM ...
9 years, 4 months ago (2011-07-27 22:28:22 UTC) #4
Evan Martin
PTAL I have a hack in place to not break tests. I believe the resulting ...
9 years, 4 months ago (2011-07-28 22:25:46 UTC) #5
brettw
http://codereview.chromium.org/7514013/diff/9002/content/renderer/render_view.cc File content/renderer/render_view.cc (right): http://codereview.chromium.org/7514013/diff/9002/content/renderer/render_view.cc#newcode252 content/renderer/render_view.cc:252: bool IsStronglyLTR(char16 ch) { If the check in rtl.h ...
9 years, 4 months ago (2011-07-29 17:14:00 UTC) #6
Evan Martin
PTAL http://codereview.chromium.org/7514013/diff/9002/content/renderer/render_view.cc File content/renderer/render_view.cc (right): http://codereview.chromium.org/7514013/diff/9002/content/renderer/render_view.cc#newcode252 content/renderer/render_view.cc:252: bool IsStronglyLTR(char16 ch) { On 2011/07/29 17:14:00, brettw ...
9 years, 4 months ago (2011-07-30 00:05:14 UTC) #7
brettw
LGTM
9 years, 4 months ago (2011-08-01 16:16:00 UTC) #8
Evan Martin
9 years, 4 months ago (2011-08-01 19:06:53 UTC) #9
It turns out that this doesn't work.  The extensions API exposes the page title,
and we don't want to break extensions that rely on the page title string
equalling the old value.  I think I may have to go back to my previous patches
that pass the title direction around again.  :~(

Powered by Google App Engine
This is Rietveld 408576698