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

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2012
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 125659
issue 125661
issue 125664
issue 137033

Blocking:
issue 114285



Sign in to add a comment
link

Issue 108599: Hebrew page titles are reversed in header/footer of print

Reported by phistuck@gmail.com, Dec 25 2011 Project Member

Issue description

Chrome Version       : 16.0.912.63, 18.0.982.0 canary
OS Version: 5.1 (Windows XP)
Other browsers tested:
  Firefox 6: OK
     IE 6: OK

What steps will reproduce the problem?
1. Open attached reduce test case.
2. Ctrl+P.

What is the expected output?
The page title shows up as - עברית.

What do you see instead?
The page title shows up as - תירבע (reversed).

UserAgentStrings:
Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7
Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.15 (KHTML, like Gecko) Chrome/18.0.982.0 Safari/535.15
 

Comment 1 by phistuck@chromium.org, Dec 25 2011

Labels: -Area-Undefined Area-UI Feature-Printing Feature-I18N WebKit-RTL
Status: Untriaged

Comment 2 by jeremy@chromium.org, Dec 26 2011

No testcase attached :(

Comment 3 by phistuck@chromium.org, Dec 26 2011

So sorry!
Hebrew-Title-Test-Case.html
126 bytes View Download

Comment 4 by vandebo@chromium.org, Jan 4 2012

Cc: kmadhusu@chromium.org dpa...@chromium.org
Labels: Mstone-18
Status: Available
Summary: Hebrew page titles are reversed in header/footer of print

Comment 5 by thestig@chromium.org, Jan 4 2012

Labels: -OS-Windows OS-All
Probably our fault. It's fine in Safari on my Mac.

Comment 6 by thestig@chromium.org, Jan 4 2012

Labels: -Feature-Printing -WebKit-RTL Feature-PrintPreview
Also, not WK. This looks like a Skia issue. Chrome 16 on Mac renders the text correctly but Win/Linux/Mac Canary (w/skia) does not.

vandebo: Does Skia know anything about RTL? It seems we have to literally flip the bytes around for Skia to draw it correctly.

Comment 7 by vandebo@chromium.org, Jan 4 2012

Skia doesn't handle RTL, nor does it handle complex text like Thai.  We need to pass the title through the code that does text layout.

Comment 8 by js...@chromium.org, Jan 4 2012

Cc: xji@chromium.org
Do we just pass a string (Unicode character sequence) to Skia's drawing API in print-preview (header/footer)? If so, vandebo is right.  We have to pass a glyph array (positioned and shaped properly) to Skia instead of a character array. I think we already do this in other places where Skia is used (e.g. Webkit - Uniscribe on Windows, harfbuzz on Linux, tab title drawing, etc). 

xji has done something related for gtk-less UI (for ChromeOS) using Pango.

Comment 9 by thestig@chromium.org, Jan 4 2012

Yes, we just pass the Unicode string as is to Skia's drawing API in PrintHeaderFooterText() in print_web_view_helper.cc. If you are already familiar with the issue, would you mind taking this bug?

Comment 10 by arthurhsu@chromium.org, Jan 5 2012

Owner: arthurhsu@chromium.org
I can take the first shot since I'm also working on related issues on PDF ToUnicode generation.

Comment 11 by arthurhsu@chromium.org, Jan 6 2012

Status: Started

Comment 12 by arthurhsu@chromium.org, Feb 1 2012

Update on progress: we are pursuing the path of reusing RenderText to draw the header/footer but we've got some tough drawing issues to overcome.

Comment 13 by kareng@google.com, Feb 7 2012

Labels: MovedFrom18 Mstone-19

Comment 14 by arthurhsu@chromium.org, Mar 5 2012

Labels: -MovedFrom18 -Mstone-19 Mstone-20
Need to reevaluate the solution with Skia's i18n support.

Comment 15 by arthurhsu@chromium.org, May 1 2012

Blockedon: 125659

Comment 16 by arthurhsu@chromium.org, May 1 2012

Blocking: 114285

Comment 17 by arthurhsu@chromium.org, May 1 2012

Blockedon: 125661

Comment 18 by arthurhsu@chromium.org, May 1 2012

Blockedon: 125664

Comment 19 by arthurhsu@chromium.org, May 1 2012

Labels: -Mstone-20 Mstone-X
Due to the sheer size of blockers, pushing to milestone X.  A partial solution for Windows is already in review.

Comment 20 by bugdroid1@chromium.org, May 7 2012

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

------------------------------------------------------------------------
r135750 | arthurhsu@chromium.org | Mon May 07 15:54:20 PDT 2012

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/print_web_view_helper.cc?r1=135750&r2=135749&pathrev=135750

Fix RTL and complex script title in print preview header/footer.

Mac fixes is not there yet since RenderText does not support Mac for now.

BUG= 108599 
TEST=print preview pages in different languages


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

Comment 22 by bugdroid1@chromium.org, Nov 13 2012

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

------------------------------------------------------------------------
r167311 | vitalybuka@chromium.org | 2012-11-13T06:21:54.723607Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/print_web_view_helper_win.cc?r1=167311&r2=167310&pathrev=167311
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/browser_resources.grd?r1=167311&r2=167310&pathrev=167311
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/print_web_view_helper_linux.cc?r1=167311&r2=167310&pathrev=167311
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/print_web_view_helper.cc?r1=167311&r2=167310&pathrev=167311
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/print_web_view_helper.h?r1=167311&r2=167310&pathrev=167311
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/print_web_view_helper_mac.mm?r1=167311&r2=167310&pathrev=167311
   M http://src.chromium.org/viewvc/chrome/trunk/src/printing/print_settings_initializer.cc?r1=167311&r2=167310&pathrev=167311
   M http://src.chromium.org/viewvc/chrome/trunk/src/printing/print_job_constants.cc?r1=167311&r2=167310&pathrev=167311
   M http://src.chromium.org/viewvc/chrome/trunk/src/printing/units.cc?r1=167311&r2=167310&pathrev=167311
   M http://src.chromium.org/viewvc/chrome/trunk/src/printing/print_job_constants.h?r1=167311&r2=167310&pathrev=167311
   M http://src.chromium.org/viewvc/chrome/trunk/src/printing/units.h?r1=167311&r2=167310&pathrev=167311
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/print_preview/print_preview_page.html?r1=167311&r2=167310&pathrev=167311

Print headers and footers with WebKit.

Old implementation with gfx::RenderText had issues with fallback fonts. Sandbox does not allow to read required information from registry.

Also WebKit inplementation is smaller and more readable.

BUG= 152893 ,  108599 ,  133548 
TEST=manual: make sure that main content with or without headers is in the same place (default margin is exception). Make sure that any custom margins and paper layout produce reasonable result. If margins are to small, header and footer should be hidden.

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

Comment 23 by vitalyb...@chromium.org, Nov 13 2012

Owner: vitalyb...@chromium.org
Status: WontFix
Can't reproduce with current chromes. Issue is gone between 20.0.1132.57 and 21.0.1157.0

Comment 24 by dpa...@chromium.org, Nov 13 2012

Cc: -dpa...@chromium.org

Comment 25 by phistuck@chromium.org, Nov 13 2012

@vitalybuka - Did you test on all of the platforms?
Windows was indeed fixed a while ago. I believe the issue was kept open for platform parity.

Comment 26 by vitalyb...@chromium.org, Nov 13 2012

Status: Fixed
You are right. Mac is OK, but Linux is broken.

r167311 replace code on all platforms. I just have tested Win,Linux and Mac, all work as expected.

Comment 27 by vitalyb...@chromium.org, Nov 13 2012

I mean Linux was broken before r167311

Comment 28 by bugdroid1@chromium.org, Nov 17 2012

Project Member
Labels: merge-merged-1312
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=168379

------------------------------------------------------------------------
r168379 | vitalybuka@chromium.org | 2012-11-17T04:44:27.527594Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/branches/1312/src/printing/print_job_constants.cc?r1=168379&r2=168378&pathrev=168379
   M http://src.chromium.org/viewvc/chrome/branches/1312/src/printing/units.cc?r1=168379&r2=168378&pathrev=168379
   M http://src.chromium.org/viewvc/chrome/branches/1312/src/printing/print_job_constants.h?r1=168379&r2=168378&pathrev=168379
   M http://src.chromium.org/viewvc/chrome/branches/1312/src/printing/units.h?r1=168379&r2=168378&pathrev=168379
   A http://src.chromium.org/viewvc/chrome/branches/1312/src/chrome/browser/resources/print_preview/print_preview_page.html?r1=168379&r2=168378&pathrev=168379
   M http://src.chromium.org/viewvc/chrome/branches/1312/src/chrome/renderer/print_web_view_helper_win.cc?r1=168379&r2=168378&pathrev=168379
   M http://src.chromium.org/viewvc/chrome/branches/1312/src/chrome/browser/browser_resources.grd?r1=168379&r2=168378&pathrev=168379
   M http://src.chromium.org/viewvc/chrome/branches/1312/src/chrome/renderer/print_web_view_helper_linux.cc?r1=168379&r2=168378&pathrev=168379
   M http://src.chromium.org/viewvc/chrome/branches/1312/src/chrome/renderer/print_web_view_helper.cc?r1=168379&r2=168378&pathrev=168379
   M http://src.chromium.org/viewvc/chrome/branches/1312/src/chrome/renderer/print_web_view_helper.h?r1=168379&r2=168378&pathrev=168379
   M http://src.chromium.org/viewvc/chrome/branches/1312/src/chrome/renderer/print_web_view_helper_mac.mm?r1=168379&r2=168378&pathrev=168379
   M http://src.chromium.org/viewvc/chrome/branches/1312/src/printing/print_settings_initializer.cc?r1=168379&r2=168378&pathrev=168379

Merge 167311 - Print headers and footers with WebKit.

Old implementation with gfx::RenderText had issues with fallback fonts. Sandbox does not allow to read required information from registry.

Also WebKit inplementation is smaller and more readable.

BUG= 152893 ,  108599 ,  133548 
TEST=manual: make sure that main content with or without headers is in the same place (default margin is exception). Make sure that any custom margins and paper layout produce reasonable result. If margins are to small, header and footer should be hidden.

Review URL: https://chromiumcodereview.appspot.com/11359020

TBR=vitalybuka@chromium.org
Review URL: https://codereview.chromium.org/11316066
------------------------------------------------------------------------

Comment 29 by bugdroid1@chromium.org, Mar 11 2013

Project Member
Labels: -Area-UI -Feature-PrintPreview -Feature-I18N Cr-UI Cr-UI-I18N Cr-UI-Browser-PrintPreview

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

Project Member
Labels: -Cr-UI-I18N Cr-UI-Internationalization

Sign in to add a comment