Bug 97360 - [Chromium][Mac] Remove loadFont from PlatformSupport
Summary: [Chromium][Mac] Remove loadFont from PlatformSupport
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: Mark Pilgrim (Google)
URL:
Keywords:
Depends on:
Blocks: 82948
  Show dependency treegraph
 
Reported: 2012-09-21 13:53 PDT by Mark Pilgrim (Google)
Modified: 2012-09-24 16:57 PDT (History)
7 users (show)

See Also:


Attachments
Patch (4.55 KB, patch)
2012-09-21 13:56 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
Patch (4.94 KB, patch)
2012-09-21 17:34 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
Patch (4.81 KB, patch)
2012-09-21 20:24 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
Patch (4.98 KB, patch)
2012-09-24 16:13 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Pilgrim (Google) 2012-09-21 13:53:57 PDT
[Chromium][Mac] Remove loadFont from PlatformSupport
Comment 1 Mark Pilgrim (Google) 2012-09-21 13:56:19 PDT
Created attachment 165184 [details]
Patch
Comment 2 WebKit Review Bot 2012-09-21 13:59:00 PDT
Attachment 165184 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebKit/chromium/ChangeLog:8:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:8:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 2 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Mark Pilgrim (Google) 2012-09-21 14:03:43 PDT
I have many words for you, WebKit Style Guidelines. None are appropriate in mixed company.
Comment 4 Eric Seidel (no email) 2012-09-21 14:06:20 PDT
Are you using webkit-patch upload?  It would warn you about these before uploading the patch?

Or you can run check-webkit-style manually
Comment 5 Adam Barth 2012-09-21 16:46:14 PDT
Maybe it checks style before you author the change log?
Comment 6 Adam Barth 2012-09-21 16:48:19 PDT
Comment on attachment 165184 [details]
Patch

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

> Source/WebCore/platform/chromium/PlatformSupport.h:94
>  #if OS(DARWIN)
> -    static bool loadFont(NSFont* srcFont, CGFontRef*, uint32_t* fontID);
>  #elif OS(UNIX)

Should we clean up this ifdef?

> Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm:126
> +    WebKit::WebSandboxSupport* ss = WebKit::Platform::current()->sandboxSupport();

ss -> sandboxSupport (please use complete words in variable names)

> Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm:128
> +    if (!ss)
> +        return 0;

Should we add an ASSERT_NOT_REACHED here like the old code had?
Comment 7 Mark Pilgrim (Google) 2012-09-21 17:34:59 PDT
Created attachment 165233 [details]
Patch
Comment 8 Mark Pilgrim (Google) 2012-09-21 17:35:37 PDT
Comment on attachment 165233 [details]
Patch

Style nits addressed. abarth's suggestions implemented.
Comment 9 WebKit Review Bot 2012-09-21 18:27:14 PDT
Comment on attachment 165233 [details]
Patch

Rejecting attachment 165233 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
rejects to file Source/WebCore/platform/chromium/PlatformSupport.h.rej
patching file Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm
patching file Source/WebKit/chromium/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebKit/chromium/src/PlatformSupport.cpp
Hunk #1 succeeded at 218 with fuzz 2.

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Adam Barth']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue

Full output: http://queues.webkit.org/results/13950846
Comment 10 Mark Pilgrim (Google) 2012-09-21 20:24:41 PDT
Created attachment 165242 [details]
Patch
Comment 11 Mark Pilgrim (Google) 2012-09-21 20:25:00 PDT
Comment on attachment 165242 [details]
Patch

Repatched to ToT.
Comment 12 Adam Barth 2012-09-24 10:44:46 PDT
Comment on attachment 165242 [details]
Patch

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

> Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm:130
> +       // This function should only be called in response to an error loading a
> +       // font due to being blocked by the sandbox.
> +       // This by definition shouldn't happen if there is no sandbox support.

Looks like these should be indented one more space, right?
Comment 13 Adam Barth 2012-09-24 10:45:15 PDT
Comment on attachment 165242 [details]
Patch

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

> Source/WebKit/chromium/src/PlatformSupport.cpp:220
>  #if OS(DARWIN)

This ifdef doesn't seem to be needed anymore since none of the cases do anything.  ;)
Comment 14 Mark Pilgrim (Google) 2012-09-24 16:13:07 PDT
Created attachment 165461 [details]
Patch
Comment 15 Mark Pilgrim (Google) 2012-09-24 16:13:26 PDT
Comment on attachment 165461 [details]
Patch

Nits addressed.
Comment 16 WebKit Review Bot 2012-09-24 16:57:07 PDT
Comment on attachment 165461 [details]
Patch

Clearing flags on attachment: 165461

Committed r129429: <http://trac.webkit.org/changeset/129429>
Comment 17 WebKit Review Bot 2012-09-24 16:57:11 PDT
All reviewed patches have been landed.  Closing bug.