Bug 65543 - [Chromium] Fix OOP font loading to work on 10.6.6 and above.
Summary: [Chromium] Fix OOP font loading to work on 10.6.6 and above.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jeremy Moskovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-02 08:25 PDT by Jeremy Moskovich
Modified: 2011-08-03 03:48 PDT (History)
8 users (show)

See Also:


Attachments
Patch (14.56 KB, patch)
2011-08-02 08:31 PDT, Jeremy Moskovich
no flags Details | Formatted Diff | Diff
Patch (15.07 KB, patch)
2011-08-03 02:05 PDT, Jeremy Moskovich
no flags Details | Formatted Diff | Diff
Patch for landing (15.08 KB, patch)
2011-08-03 03:18 PDT, Jeremy Moskovich
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Moskovich 2011-08-02 08:25:09 PDT
In 10.6.6 the function used to get the unique ID from the font in the  renderer was changed so it fails in the sandbox (it now tries to access the on-disk font file).
Comment 1 Jeremy Moskovich 2011-08-02 08:31:47 PDT
Created attachment 102656 [details]
Patch
Comment 2 Dimitri Glazkov (Google) 2011-08-02 08:58:23 PDT
Comment on attachment 102656 [details]
Patch

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

> Source/WebCore/ChangeLog:6
> +        In 10.6.6 the function used to get the unique ID for an NSFont in the 

I don't feel qualified to review the patch's functional parts, so I'll nitpick style and spirit.

> Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm:148
> +        // TODO: PlatformBridge::loadFont() should consult the id cache

TODO -> FIXME, file a bug and reference here.
Comment 3 Ryosuke Niwa 2011-08-02 09:17:15 PDT
Comment on attachment 102656 [details]
Patch

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

I don't know enough about Cocoa to review this patch either :(

> Source/WebCore/ChangeLog:8
> +        the on-disk font file).  In order to work around this, we get the font

We don't double-space sentences.

> Source/WebCore/ChangeLog:11
> +        To speed things up, we introduce 2 levels of caching in WebKit.  A font

Ditto about double-spacing.
Comment 4 Kenneth Russell 2011-08-02 12:13:58 PDT
Comment on attachment 102656 [details]
Patch

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

The code looks good to me overall. (If this started failing in 10.6.6 why wasn't it found until now?) Please fix the nits upon landing. r=me

> Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm:132
> +    if (font.get())

You should be able to just write "if (font) ...".

> Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm:138
> +    if (!PlatformBridge::loadFont(nsFont, &container, &fontID)) {

No braces on single-line if statements.

> Source/WebKit/chromium/public/mac/WebSandboxSupport.h:59
> +    virtual bool loadFont(NSFont* srcFont, ATSFontContainerRef*, uint32_t* fontID) = 0;

I see you've already landed the downstream override of the new signature -- great.
Comment 5 Jeremy Moskovich 2011-08-03 02:05:39 PDT
Created attachment 102754 [details]
Patch
Comment 6 WebKit Review Bot 2011-08-03 03:13:13 PDT
Comment on attachment 102754 [details]
Patch

Rejecting attachment 102754 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=ec2-cq-02', '--port..." exit_code: 1

Last 500 characters of output:
hangeLog does not appear to be a valid reviewer according to committers.py.
ERROR: /mnt/git/webkit-commit-queue/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).
Updating OpenSource
Current branch master is up to date.
Updating chromium port dependencies using gclient...

________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
Updating webkit projects from gyp files...

Full output: http://queues.webkit.org/results/9284990
Comment 7 Jeremy Moskovich 2011-08-03 03:18:25 PDT
Created attachment 102762 [details]
Patch for landing
Comment 8 WebKit Review Bot 2011-08-03 03:48:36 PDT
Comment on attachment 102762 [details]
Patch for landing

Clearing flags on attachment: 102762

Committed r92269: <http://trac.webkit.org/changeset/92269>
Comment 9 WebKit Review Bot 2011-08-03 03:48:42 PDT
All reviewed patches have been landed.  Closing bug.