Bug 138709

Summary: [iOS] CoreGraphics SPI not available in public SDK
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebCore Misc.Assignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, commit-queue, ddkilzer, esprehn+autocc, glenn, kondapallykalyan, mmaxfield
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: iOS 8.1   
Bug Depends on:    
Bug Blocks: 136487, 138742, 138751    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch ddkilzer: review+, ddkilzer: commit-queue-

Description Daniel Bates 2014-11-13 14:38:48 PST
Various CoreGraphics private headers are used in the iOS WebKit port. Towards building the port using the public SDK, we should forward declare the applicable CoreGraphics SPI.
Comment 1 Daniel Bates 2014-11-13 14:46:05 PST
Created attachment 241504 [details]
Patch
Comment 2 WebKit Commit Bot 2014-11-13 14:48:48 PST
Attachment 241504 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/spi/cocoa/CoreGraphicsSPI.h:69:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cocoa/CoreGraphicsSPI.h:70:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cocoa/CoreGraphicsSPI.h:71:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cocoa/CoreGraphicsSPI.h:72:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cocoa/CoreGraphicsSPI.h:73:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cocoa/CoreGraphicsSPI.h:74:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cocoa/CoreGraphicsSPI.h:79:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cocoa/CoreGraphicsSPI.h:80:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cocoa/CoreGraphicsSPI.h:85:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 9 in 23 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Daniel Bates 2014-11-13 15:54:48 PST
Created attachment 241514 [details]
Patch

Incorporate the functionality of CGFontUnicodeSupportSPI.h into CoreGraphicsSPI.h and remove CGFontUnicodeSupportSPI.h. Moved file CoreGraphicsSPI.h to platform/spi/cg as we will make use of this file when building for the Apple Windows port. Update Visual Studio project files.
Comment 4 WebKit Commit Bot 2014-11-13 16:00:25 PST
Attachment 241514 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:69:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:70:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:71:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:72:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:73:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:74:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:79:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:80:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:85:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 9 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Daniel Bates 2014-11-13 18:00:05 PST
Created attachment 241525 [details]
Patch
Comment 6 WebKit Commit Bot 2014-11-13 18:01:00 PST
Attachment 241525 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:69:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:70:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:71:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:72:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:73:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:74:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:79:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:80:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:85:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 9 in 28 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Daniel Bates 2014-11-13 20:27:34 PST
Created attachment 241544 [details]
Patch
Comment 8 WebKit Commit Bot 2014-11-13 20:30:01 PST
Attachment 241544 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/mac/FontMac.mm:40:  "CoreGraphicsSPI.h" already included at Source/WebCore/platform/graphics/mac/FontMac.mm:26  [build/include] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:70:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:71:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:72:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:73:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:74:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:75:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:80:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:81:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:86:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 10 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 Daniel Bates 2014-11-13 20:35:20 PST
Created attachment 241545 [details]
Patch
Comment 10 WebKit Commit Bot 2014-11-13 20:36:56 PST
Attachment 241545 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/mac/FontMac.mm:40:  "CoreGraphicsSPI.h" already included at Source/WebCore/platform/graphics/mac/FontMac.mm:26  [build/include] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:70:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:71:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:72:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:73:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:74:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:75:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:80:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:81:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:86:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 10 in 25 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 Daniel Bates 2014-11-13 20:52:32 PST
Created attachment 241548 [details]
Patch

Rebase patch following the patch for bug #125273.
Comment 12 WebKit Commit Bot 2014-11-13 20:54:57 PST
Attachment 241548 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:70:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:71:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:72:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:73:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:74:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:75:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:80:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:81:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:86:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:87:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 10 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 13 Daniel Bates 2014-11-14 09:01:55 PST
Created attachment 241593 [details]
Patch
Comment 14 WebKit Commit Bot 2014-11-14 09:04:13 PST
Attachment 241593 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:70:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:71:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:72:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:73:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:74:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:75:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:80:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:81:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:86:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h:87:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 10 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 15 David Kilzer (:ddkilzer) 2014-11-14 14:18:15 PST
Comment on attachment 241593 [details]
Patch

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

r=me

> Source/WebCore/WebCore.xcodeproj/project.pbxproj:25936
>  				CDCFABBD18C0AF78006F8450 /* SelectionSubtreeRoot.h in Headers */,
> +				CE1252371A15BDBE00864480 /* CoreGraphicsSPI.h in Headers */,
>  				E44B4BB4141650D7002B1D8B /* SelectorChecker.h in Headers */,

Nit: Alphabetize.

> Source/WebCore/platform/ios/wak/WKGraphics.h:34
> +typedef int WKCompositeOperation;
> +typedef uint32_t CGFontAntialiasingStyle;

Why is WKCompositeOperation and int instead of uint32_t?
Comment 16 Daniel Bates 2014-11-14 14:21:26 PST
(In reply to comment #15)
> > Source/WebCore/WebCore.xcodeproj/project.pbxproj:25936
> >  				CDCFABBD18C0AF78006F8450 /* SelectionSubtreeRoot.h in Headers */,
> > +				CE1252371A15BDBE00864480 /* CoreGraphicsSPI.h in Headers */,
> >  				E44B4BB4141650D7002B1D8B /* SelectorChecker.h in Headers */,
> 
> Nit: Alphabetize.
> 

Will fix before landing.

> > Source/WebCore/platform/ios/wak/WKGraphics.h:34
> > +typedef int WKCompositeOperation;
> > +typedef uint32_t CGFontAntialiasingStyle;
> 
> Why is WKCompositeOperation and int instead of uint32_t?

As discussed on IRC today, the data type of WKCompositeOperation was chosen to match the underlying data type of CGCompositeOperation.
Comment 17 Daniel Bates 2014-11-14 14:27:57 PST
Committed r176140: <http://trac.webkit.org/changeset/176140>