Move private methods from WKGraphics.h to a separate header file
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Feb 2017 21:58:21 +0000 (21:58 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Feb 2017 21:58:21 +0000 (21:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=167996

Reviewed by Alexey  Proskuryakov.

* platform/ios/wak/WKGraphicsInternal.h: Added.
* WebCore.xcodeproj/project.pbxproj: Added WKGraphicsInternal.h
* platform/ios/wak/WKGraphics.h: Moved methods to WKGraphicsInternal.h
* platform/graphics/mac/GraphicsContextMac.mm: Included new header file.
* platform/ios/wak/WKGraphics.mm: Same.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211899 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm
Source/WebCore/platform/ios/wak/WKGraphics.h
Source/WebCore/platform/ios/wak/WKGraphics.mm
Source/WebCore/platform/ios/wak/WKGraphicsInternal.h [new file with mode: 0644]

index a617fca..94eb639 100644 (file)
@@ -1,3 +1,16 @@
+2017-02-08  Aakash Jain  <aakash_jain@apple.com>
+
+        Move private methods from WKGraphics.h to a separate header file
+        https://bugs.webkit.org/show_bug.cgi?id=167996
+
+        Reviewed by Alexey  Proskuryakov.
+
+        * platform/ios/wak/WKGraphicsInternal.h: Added.
+        * WebCore.xcodeproj/project.pbxproj: Added WKGraphicsInternal.h
+        * platform/ios/wak/WKGraphics.h: Moved methods to WKGraphicsInternal.h
+        * platform/graphics/mac/GraphicsContextMac.mm: Included new header file.
+        * platform/ios/wak/WKGraphics.mm: Same.
+
 2017-02-08  Brady Eidson  <beidson@apple.com>
 
         Opt-out iBooks from synchronous willSendRequest on iOS.
index 9364e01..2bd9e07 100644 (file)
                EBF5121C1696496C0056BD25 /* JSTypeConversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EBF5121A1696496C0056BD25 /* JSTypeConversions.cpp */; };
                EBF5121D1696496C0056BD25 /* JSTypeConversions.h in Headers */ = {isa = PBXBuildFile; fileRef = EBF5121B1696496C0056BD25 /* JSTypeConversions.h */; };
                ECCDB8811E4B8C5900A1AEA6 /* WKContentObservationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = ECCDB8801E4B8C5900A1AEA6 /* WKContentObservationInternal.h */; };
+               ECCDB8871E4BB63F00A1AEA6 /* WKGraphicsInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = ECCDB8861E4BB63F00A1AEA6 /* WKGraphicsInternal.h */; };
                ED2BA83C09A24B91006C0AC4 /* DocumentMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = ED2BA83B09A24B91006C0AC4 /* DocumentMarker.h */; settings = {ATTRIBUTES = (Private, ); }; };
                ED501DC60B249F2900AE18D9 /* EditorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED501DC50B249F2900AE18D9 /* EditorMac.mm */; };
                EDE3A5000C7A430600956A37 /* ColorMac.h in Headers */ = {isa = PBXBuildFile; fileRef = EDE3A4FF0C7A430600956A37 /* ColorMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
                EBF5121A1696496C0056BD25 /* JSTypeConversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTypeConversions.cpp; sourceTree = "<group>"; };
                EBF5121B1696496C0056BD25 /* JSTypeConversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTypeConversions.h; sourceTree = "<group>"; };
                ECCDB8801E4B8C5900A1AEA6 /* WKContentObservationInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContentObservationInternal.h; sourceTree = "<group>"; };
+               ECCDB8861E4BB63F00A1AEA6 /* WKGraphicsInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKGraphicsInternal.h; sourceTree = "<group>"; };
                ED2BA83B09A24B91006C0AC4 /* DocumentMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentMarker.h; sourceTree = "<group>"; };
                ED501DC50B249F2900AE18D9 /* EditorMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = EditorMac.mm; sourceTree = "<group>"; };
                EDE3A4FF0C7A430600956A37 /* ColorMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorMac.h; sourceTree = "<group>"; };
                A148328B187F506800DA63A6 /* wak */ = {
                        isa = PBXGroup;
                        children = (
+                               ECCDB8861E4BB63F00A1AEA6 /* WKGraphicsInternal.h */,
                                ECCDB8801E4B8C5900A1AEA6 /* WKContentObservationInternal.h */,
                                FE69986F192087E7006936BD /* FloatingPointEnvironment.cpp */,
                                FE699870192087E7006936BD /* FloatingPointEnvironment.h */,
                                0FC4E410187F82E10045882C /* ScrollingTreeIOS.h in Headers */,
                                0FE5806419327A6200DE32EB /* ScrollingTreeMac.h in Headers */,
                                1AAADDE414DC8C8F00AF64B3 /* ScrollingTreeNode.h in Headers */,
+                               ECCDB8871E4BB63F00A1AEA6 /* WKGraphicsInternal.h in Headers */,
                                0FEA3E80191B3169000F1B55 /* ScrollingTreeOverflowScrollingNode.h in Headers */,
                                9391A99D1629D70000297330 /* ScrollingTreeScrollingNode.h in Headers */,
                                0FB8890A167D2FA10010CDA5 /* ScrollingTreeStickyNode.h in Headers */,
index 2b1afe3..03679ec 100644 (file)
@@ -37,6 +37,7 @@
 #if PLATFORM(IOS)
 #import "Color.h"
 #import "WKGraphics.h"
+#import "WKGraphicsInternal.h"
 #endif
 
 #if !PLATFORM(IOS)
index 86dc3c2..78c079b 100644 (file)
@@ -30,8 +30,6 @@
 
 #import <CoreGraphics/CoreGraphics.h>
 
-typedef int WKCompositeOperation;
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -40,11 +38,6 @@ WEBCORE_EXPORT CGContextRef WKGetCurrentGraphicsContext(void);
 WEBCORE_EXPORT void WKSetCurrentGraphicsContext(CGContextRef);
 
 WEBCORE_EXPORT void WKRectFill(CGContextRef, CGRect aRect);
-void WKRectFillUsingOperation(CGContextRef, CGRect, WKCompositeOperation);
-
-CGImageRef WKGraphicsCreateImageFromBundleWithName(const char *image_file);
-CGPatternRef WKCreatePatternFromCGImage(CGImageRef imageRef);
-void WKSetPattern(CGContextRef context, CGPatternRef pattern, bool fill, bool stroke);
 
 #ifdef __cplusplus
 }
index 2de43df..3b3b3d1 100644 (file)
@@ -25,6 +25,7 @@
 
 #import "config.h"
 #import "WKGraphics.h"
+#import "WKGraphicsInternal.h"
 
 #if PLATFORM(IOS)
 
diff --git a/Source/WebCore/platform/ios/wak/WKGraphicsInternal.h b/Source/WebCore/platform/ios/wak/WKGraphicsInternal.h
new file mode 100644 (file)
index 0000000..3fed476
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if TARGET_OS_IPHONE
+
+#import <CoreGraphics/CoreGraphics.h>
+
+typedef int WKCompositeOperation;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void WKRectFillUsingOperation(CGContextRef, CGRect, WKCompositeOperation);
+CGImageRef WKGraphicsCreateImageFromBundleWithName(const char *image_file);
+CGPatternRef WKCreatePatternFromCGImage(CGImageRef imageRef);
+void WKSetPattern(CGContextRef context, CGPatternRef pattern, bool fill, bool stroke);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // TARGET_OS_IPHONE