Bug 89133 - [Chromium-Android] Initialize font rendering in DumpRenderTree
Summary: [Chromium-Android] Initialize font rendering in DumpRenderTree
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Xianzhu Wang
URL:
Keywords:
Depends on: 89014 89162
Blocks: 66687
  Show dependency treegraph
 
Reported: 2012-06-14 15:33 PDT by Xianzhu Wang
Modified: 2012-06-14 21:07 PDT (History)
9 users (show)

See Also:


Attachments
patch (4.61 KB, patch)
2012-06-14 15:42 PDT, Xianzhu Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xianzhu Wang 2012-06-14 15:33:50 PDT
Chromium-android use chromium-linux as the baseline of layout test, so we need to configure it to let the layout test results match those of chromium-linux as much as possible.

In downstream, we initialize font rendering for Android in WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp for both DumpRenderTree and Chromium, which is not good.
We should initialize font rendering in DumpRenderTree code through WebKit API.
Comment 1 Xianzhu Wang 2012-06-14 15:42:03 PDT
Created attachment 147664 [details]
patch
Comment 2 Adam Barth 2012-06-14 15:45:07 PDT
Comment on attachment 147664 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=147664&action=review

> Source/WebKit/chromium/src/linuxish/WebFontRendering.cpp:74
> +#if OS(LINUX)
> +    WebFontInfo::setSubpixelPositioning(useSubpixelPositioning);
> +#endif

Is there non-test code that needs to be updated here as well?
Comment 3 Xianzhu Wang 2012-06-14 15:49:04 PDT
Comment on attachment 147664 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=147664&action=review

>> Source/WebKit/chromium/src/linuxish/WebFontRendering.cpp:74
>> +#endif
> 
> Is there non-test code that needs to be updated here as well?

No except Chromium. I'll update the patch in http://codereview.chromium.org/10544103/ and request review.
Comment 4 Tony Chang 2012-06-14 16:22:15 PDT
Comment on attachment 147664 [details]
patch

FWIW, the name linuxish is ambiguous to me.  Maybe we should make a fontconfig directory instead?
Comment 5 Xianzhu Wang 2012-06-14 16:44:29 PDT
(In reply to comment #4)
> (From update of attachment 147664 [details])
> FWIW, the name linuxish is ambiguous to me.  Maybe we should make a fontconfig directory instead?

In Chromium's build/filename_rules.gyp, 'linuxish' is used to indicate directories or files used when 'OS=="android" or OS=="linux" or OS=="openbsd" or OS=="freebsd"'. The implementation of WebFontRendering depends on HarfBuzz and/or Freetype port of Skia (don't know much details of it). In WebKit the harfbuzz directory is included when 'use_x11=1 or OS=="android"' so it seems to equal to 'linuxish' in Chromium's term.
Comment 6 James Robinson 2012-06-14 16:47:38 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > (From update of attachment 147664 [details] [details])
> > FWIW, the name linuxish is ambiguous to me.  Maybe we should make a fontconfig directory instead?
> 
> In Chromium's build/filename_rules.gyp, 'linuxish' is used to indicate directories or files used when 'OS=="android" or OS=="linux" or OS=="openbsd" or OS=="freebsd"'. The implementation of WebFontRendering depends on HarfBuzz and/or Freetype port of Skia (don't know much details of it). In WebKit the harfbuzz directory is included when 'use_x11=1 or OS=="android"' so it seems to equal to 'linuxish' in Chromium's term.

Drop the "ish". Just "linux", it's simpler.
Comment 7 Xianzhu Wang 2012-06-14 16:58:10 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > (From update of attachment 147664 [details] [details] [details])
> > > FWIW, the name linuxish is ambiguous to me.  Maybe we should make a fontconfig directory instead?
> > 
> > In Chromium's build/filename_rules.gyp, 'linuxish' is used to indicate directories or files used when 'OS=="android" or OS=="linux" or OS=="openbsd" or OS=="freebsd"'. The implementation of WebFontRendering depends on HarfBuzz and/or Freetype port of Skia (don't know much details of it). In WebKit the harfbuzz directory is included when 'use_x11=1 or OS=="android"' so it seems to equal to 'linuxish' in Chromium's term.
> 
> Drop the "ish". Just "linux", it's simpler.

No, in Chromium's build/filename_rules.gyp, files containing "_linux" and directories named "linux", and it's not possible to include them back in particular gyp with normal 'sources/' under conditions. Tricky 'target_conditions' must be used to override the rules. I changed the directory to "linuxish" to meet the Chromium's file name rule.
Comment 8 James Robinson 2012-06-14 16:59:21 PDT
There has to be a better solution than saying "linuxish".
Comment 9 Xianzhu Wang 2012-06-14 17:25:35 PDT
cq- because of the concerns of naming. We should make a decision of it. I'll send a mail to chromium-dev for it.
Comment 10 Adam Barth 2012-06-14 17:26:47 PDT
> There has to be a better solution than saying "linuxish".

IMHO, we should follow Chromium's conventions here for now.  If we'd like to improve on linuxish, we should probably start by talking with the folks who picked that name.  I suspect the choice might be more constrained that we might guess at first.

Sharing this code between Linux and Android is valuable.  We can move forward with this patch and debate project-wide naming issues in parallel.
Comment 11 Xianzhu Wang 2012-06-14 18:11:39 PDT
Comment on attachment 147664 [details]
patch

cq+ now. I'd be glad to make change based on any new decision.
Comment 12 WebKit Review Bot 2012-06-14 20:07:12 PDT
Comment on attachment 147664 [details]
patch

Clearing flags on attachment: 147664

Committed r120394: <http://trac.webkit.org/changeset/120394>
Comment 13 WebKit Review Bot 2012-06-14 20:07:17 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 WebKit Review Bot 2012-06-14 20:59:18 PDT
Re-opened since this is blocked by 89162