Bug 150396 - check-webkit-style complains about missing operator whitespace inside character literal
Summary: check-webkit-style complains about missing operator whitespace inside charact...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Frédéric Wang (:fredw)
URL:
Keywords:
Depends on:
Blocks: 150394 150451
  Show dependency treegraph
 
Reported: 2015-10-21 10:09 PDT by Frédéric Wang (:fredw)
Modified: 2015-10-24 16:37 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.70 KB, patch)
2015-10-24 08:52 PDT, Frédéric Wang (:fredw)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Wang (:fredw) 2015-10-21 10:09:57 PDT
Bug 150394, contains a patch that loads the OS/2 table as follows:

  CFDataRef os2Table = CGFontCopyTableForTag(m_platformData.cgFont(), 'OS/2')

Here 'OS/2' is a character literal (32 bit integer) used as a tag representing the TrueType table. The slash is not used as an operator, however check-webkit-style complains with the following message:

  ERROR: Source/WebCore/platform/graphics/cocoa/FontCocoa.mm:179:  Missing spaces around /  [whitespace/operators] [3]
Comment 1 Frédéric Wang (:fredw) 2015-10-24 08:52:58 PDT
Created attachment 263979 [details]
Patch
Comment 2 Frédéric Wang (:fredw) 2015-10-24 08:56:24 PDT
Note that the 'OS/2' case is already in the source code:

https://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm#L284
Comment 3 Csaba Osztrogonác 2015-10-24 12:21:04 PDT
Comment on attachment 263979 [details]
Patch

Could you please add a new unittest covers this change?
Comment 4 Csaba Osztrogonác 2015-10-24 12:22:03 PDT
(In reply to comment #3)
> Comment on attachment 263979 [details]
> Patch
> 
> Could you please add a new unittest covers this change?

Sorry, please ignore this comment.
Comment 5 Frédéric Wang (:fredw) 2015-10-24 16:37:07 PDT
Committed r191538: <http://trac.webkit.org/changeset/191538>