[iOS] Add WebKitSystemInterface for iOS 8.1
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Dec 2014 00:17:37 +0000 (00:17 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Dec 2014 00:17:37 +0000 (00:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=139831

Reviewed by Alexey Proskuryakov.

Tools:

Implement support in copy-webkitlibraries-to-product-directory to copy
WebKitSystemInterface for iOS to the product directory and have build-webkit
pass --wksi to copy-webkitlibraries-to-product-directory when building for iOS.

* Scripts/build-webkit:
* Scripts/copy-webkitlibraries-to-product-directory:

WebKitLibraries:

Towards building the iOS WebKit port using the public SDK, add the
WebKitSystemInterface for iOS version 8.1.

* WebKitSystemInterfaceIOS.h: Added.
* libWebKitSystemInterfaceIOSDevice8.1.a: Added.
* libWebKitSystemInterfaceIOSSimulator8.1.a: Added.

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

Tools/ChangeLog
Tools/Scripts/build-webkit
Tools/Scripts/copy-webkitlibraries-to-product-directory
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterfaceIOS.h [new file with mode: 0644]
WebKitLibraries/libWebKitSystemInterfaceIOSDevice8.1.a [new file with mode: 0644]
WebKitLibraries/libWebKitSystemInterfaceIOSSimulator8.1.a [new file with mode: 0644]

index e0c3650..4daf00c 100644 (file)
@@ -1,5 +1,19 @@
 2014-12-19  Daniel Bates  <dabates@apple.com>
 
+        [iOS] Add WebKitSystemInterface for iOS 8.1
+        https://bugs.webkit.org/show_bug.cgi?id=139831
+
+        Reviewed by Alexey Proskuryakov.
+
+        Implement support in copy-webkitlibraries-to-product-directory to copy
+        WebKitSystemInterface for iOS to the product directory and have build-webkit
+        pass --wksi to copy-webkitlibraries-to-product-directory when building for iOS.
+
+        * Scripts/build-webkit:
+        * Scripts/copy-webkitlibraries-to-product-directory:
+
+2014-12-19  Daniel Bates  <dabates@apple.com>
+
         copy-webkitlibraries-to-product-directory uses wrong SDK when called from build-webkit
         https://bugs.webkit.org/show_bug.cgi?id=139829
 
index bf2c729..cb7a8c5 100755 (executable)
@@ -195,7 +195,7 @@ if (isAppleMacWebKit()) {
     } else {
         my @copyLibrariesArgs = (
             "perl", "Tools/Scripts/copy-webkitlibraries-to-product-directory",
-            "--sdk", xcodeSDK(), "--llvm", "--prefer-system-llvm",
+            "--sdk", xcodeSDK(), "--wksi", "--llvm", "--prefer-system-llvm",
             "--llvm-subdirectory", "internal-llvm", productDir(),
             "--llvm-prefix", "/usr/local"
         );
index fbe3faa..2ced734 100755 (executable)
@@ -142,12 +142,20 @@ if ($wksi) {
     my $libraryDir = $useFullLibPaths ? "$productDir/usr/local/lib" : $productDir;
     (system("mkdir", "-p", $libraryDir) == 0) or die;
 
-    my @librariesToCopy = (
-        "libWebKitSystemInterfaceMountainLion.a",
-        "libWebKitSystemInterfaceMavericks.a",
-        "libWebKitSystemInterfaceYosemite.a",
-    );
-    
+    my @librariesToCopy;
+    if (isIOSWebKit()) {
+        push(@librariesToCopy, (
+            "libWebKitSystemInterfaceIOSDevice8.1.a",
+            "libWebKitSystemInterfaceIOSSimulator8.1.a",
+        ));
+    } else {
+        push(@librariesToCopy, (
+            "libWebKitSystemInterfaceMountainLion.a",
+            "libWebKitSystemInterfaceMavericks.a",
+            "libWebKitSystemInterfaceYosemite.a"
+        ));
+    }
+
     foreach my $libraryName (@librariesToCopy) {
         my $sourceLibrary = "WebKitLibraries/" . $libraryName;
         my $targetLibrary = "$libraryDir/" . $libraryName;
@@ -159,6 +167,7 @@ if ($wksi) {
     }
     
     dittoHeaders("WebKitLibraries/WebKitSystemInterface.h", "$productDir/usr/local/include/WebKitSystemInterface.h");
+    dittoHeaders("WebKitLibraries/WebKitSystemInterfaceIOS.h", "$productDir/usr/local/include/WebKitSystemInterfaceIOS.h") if isIOSWebKit();
 }
 
 if ($llvm) {
@@ -318,6 +327,9 @@ if ($llvm) {
 if ($clean) {
     print "Cleaning.\n";    
     (system("rm", "-rf", "$productDir/usr/local/include/WebKitSystemInterface.h") == 0) or die;
+    if (isIOSWebKit()) {
+        (system("rm", "-rf", "$productDir/usr/local/include/WebKitSystemInterfaceIOS.h") == 0) or die;
+    }
     (system("rm", "-rf", "$productDir$llvmPrefix") == 0) or die;
     unlink glob "$productDir/libWebKitSystemInterface*" or die if glob "$productDir/libWebKitSystemInterface*";
     unlink glob "$productDir/usr/local/lib/libWebKitSystemInterface*" or die if glob "$productDir/usr/local/lib/libWebKitSystemInterface*";
index 80a39a0..f601f4c 100644 (file)
@@ -1,3 +1,17 @@
+2014-12-19  Daniel Bates  <dabates@apple.com>
+
+        [iOS] Add WebKitSystemInterface for iOS 8.1
+        https://bugs.webkit.org/show_bug.cgi?id=139831
+
+        Reviewed by Alexey Proskuryakov.
+
+        Towards building the iOS WebKit port using the public SDK, add the
+        WebKitSystemInterface for iOS version 8.1.
+
+        * WebKitSystemInterfaceIOS.h: Added.
+        * libWebKitSystemInterfaceIOSDevice8.1.a: Added.
+        * libWebKitSystemInterfaceIOSSimulator8.1.a: Added.
+
 2014-12-17  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Unreviewed build fix (for full build)
diff --git a/WebKitLibraries/WebKitSystemInterfaceIOS.h b/WebKitLibraries/WebKitSystemInterfaceIOS.h
new file mode 100644 (file)
index 0000000..b09c9d8
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ *  WebKitSystemInterfaceIOS.h
+ *  Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
+ */
+
+#import <CoreGraphics/CoreGraphics.h>
+
+#ifdef __OBJC__
+@class UIScreen;
+#else
+class UIScreen;
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+bool WKExecutableWasLinkedOnOrAfterIOSVersion(int);
+
+bool WKIsGB18030ComplianceRequired(void);
+
+typedef enum {
+    WKDeviceClassInvalid = -1,
+    WKDeviceClassiPad,
+    WKDeviceClassiPhone,
+    WKDeviceClassiPod,
+} WKDeviceClass;
+int WKGetDeviceClass(void);
+
+CFStringRef WKGetUserAgent(void);
+CFStringRef WKGetOSNameForUserAgent(void);
+CFStringRef WKGetDeviceName(void);
+CFStringRef WKGetPlatformNameForNavigator(void);
+CFStringRef WKGetVendorNameForNavigator(void);
+
+CGSize WKGetScreenSize(void);
+CGSize WKGetAvailableScreenSize(void);
+
+float WKGetMinimumZoomFontSize(void);
+
+float WKGetScreenScaleFactor(void);
+float WKGetScaleFactorForScreen(UIScreen *);
+
+#ifdef __OBJC__
+NSData *WKAXRemoteToken(CFUUIDRef);
+void WKAXStoreRemoteConnectionInformation(id, pid_t, mach_port_t, CFUUIDRef);
+void WKAXRegisterRemoteApp(void);
+#endif
+
+bool WKIsOptimizedFullscreenSupported(void);
+typedef enum {
+    WKMediaUIPartOptimizedFullscreenButton = 0,
+    WKMediaUIPartOptimizedFullscreenPlaceholder
+} WKMediaUIPart;
+CFStringRef WKGetMediaUIImageData(int);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/WebKitLibraries/libWebKitSystemInterfaceIOSDevice8.1.a b/WebKitLibraries/libWebKitSystemInterfaceIOSDevice8.1.a
new file mode 100644 (file)
index 0000000..75894d6
Binary files /dev/null and b/WebKitLibraries/libWebKitSystemInterfaceIOSDevice8.1.a differ
diff --git a/WebKitLibraries/libWebKitSystemInterfaceIOSSimulator8.1.a b/WebKitLibraries/libWebKitSystemInterfaceIOSSimulator8.1.a
new file mode 100644 (file)
index 0000000..c70df6e
Binary files /dev/null and b/WebKitLibraries/libWebKitSystemInterfaceIOSSimulator8.1.a differ