[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

mrowe at apple.com mrowe at apple.com
Wed Dec 22 13:25:35 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit cc98cb1fe77e8f86bd63b453803d53975230c4b8
Author: mrowe at apple.com <mrowe at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Sep 15 00:19:27 2010 +0000

    Part of <rdar://problem/8420003>.  Make it possible to override the version number used in linked-in-or-after checks.
    
    Reviewed by John Sullivan.
    
    * Misc/WebKitVersionChecks.h: Remove two unused functions from the header and add a method to set the overriden version.
    * Misc/WebKitVersionChecks.m:
    (WebKitLinkedOnOrAfter):
    (setWebKitLinkTimeVersion): Set the overridden version.
    (WebKitLinkTimeVersion): Return the overridden version if set, otherwise do the old thing.
    * WebView/WebPreferences.mm:
    (+[WebPreferences setWebKitLinkTimeVersion:]): Call through to set the overridden version.
    * WebView/WebPreferencesPrivate.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67518 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index a9e0304..2ac7cc2 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,18 @@
+2010-09-14  Mark Rowe  <mrowe at apple.com>
+
+        Reviewed by John Sullivan.
+
+        Part of <rdar://problem/8420003>.  Make it possible to override the version number used in linked-in-or-after checks.
+
+        * Misc/WebKitVersionChecks.h: Remove two unused functions from the header and add a method to set the overriden version.
+        * Misc/WebKitVersionChecks.m:
+        (WebKitLinkedOnOrAfter):
+        (setWebKitLinkTimeVersion): Set the overridden version.
+        (WebKitLinkTimeVersion): Return the overridden version if set, otherwise do the old thing.
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences setWebKitLinkTimeVersion:]): Call through to set the overridden version.
+        * WebView/WebPreferencesPrivate.h:
+
 2010-09-14  Eric Seidel  <eric at webkit.org>
 
         Unreviewed, reverting changes r67451 and r67451.
diff --git a/WebKit/mac/Misc/WebKitVersionChecks.h b/WebKit/mac/Misc/WebKitVersionChecks.h
index 8b34c94..94286d6 100644
--- a/WebKit/mac/Misc/WebKitVersionChecks.h
+++ b/WebKit/mac/Misc/WebKitVersionChecks.h
@@ -30,9 +30,9 @@
     Version numbers are based on the 'current library version' specified in the WebKit build rules.
     All of these methods return or take version numbers with each part shifted to the left 2 bytes.
     For example the version 1.2.3 is returned as 0x00010203 and version 200.3.5 is returned as 0x00C80305
-    A version of -1 is returned if the main executable did not link against WebKit (should never happen).
+    A version of -1 is returned if the main executable did not link against WebKit.
 
-    Please use the current WebKit version number, available in WebKit/Configurations/Version.xcconfig,
+    Please use the current WebKit version number, available in WebKit/mac/Configurations/Version.xcconfig,
     when adding a new version constant.
 */
 
@@ -60,8 +60,7 @@ extern "C" {
 #endif
 
 BOOL WebKitLinkedOnOrAfter(int version);
-int WebKitLinkTimeVersion(void);
-int WebKitRunTimeVersion(void);
+void setWebKitLinkTimeVersion(int);
 
 #ifdef __cplusplus
 }
diff --git a/WebKit/mac/Misc/WebKitVersionChecks.m b/WebKit/mac/Misc/WebKitVersionChecks.m
index 5659273..a63e10b 100644
--- a/WebKit/mac/Misc/WebKitVersionChecks.m
+++ b/WebKit/mac/Misc/WebKitVersionChecks.m
@@ -29,17 +29,23 @@
 #import "WebKitVersionChecks.h"
 #import <mach-o/dyld.h>
 
+static int WebKitLinkTimeVersion(void);
+static int overridenWebKitLinkTimeVersion;
+
 BOOL WebKitLinkedOnOrAfter(int version)
 {
-    return (WebKitLinkTimeVersion() >= version); 
+    return (WebKitLinkTimeVersion() >= version);
 }
 
-int WebKitLinkTimeVersion(void)
+void setWebKitLinkTimeVersion(int version)
 {
-    return NSVersionOfLinkTimeLibrary("WebKit");
+    overridenWebKitLinkTimeVersion = version;
 }
 
-int WebKitRunTimeVersion(void)
+static int WebKitLinkTimeVersion(void)
 {
-    return NSVersionOfRunTimeLibrary("WebKit");
+    if (overridenWebKitLinkTimeVersion)
+        return overridenWebKitLinkTimeVersion;
+
+    return NSVersionOfLinkTimeLibrary("WebKit");
 }
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index a4a5383..075ffa8 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -1357,6 +1357,11 @@ static NSString *classIBCreatorID = nil;
     return [self _boolValueForKey:WebKitFullScreenEnabledPreferenceKey];
 }
 
++ (void)setWebKitLinkTimeVersion:(int)version
+{
+    setWebKitLinkTimeVersion(version);
+}
+
 @end
 
 @implementation WebPreferences (WebInternal)
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index 783038d..968a9dc 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -203,6 +203,8 @@ extern NSString *WebPreferencesRemovedNotification;
 + (void)_setInitialDefaultTextEncodingToSystemEncoding;
 + (void)_setIBCreatorID:(NSString *)string;
 
++ (void)setWebKitLinkTimeVersion:(int)version;
+
 // For WebView's use only.
 - (void)willAddToWebView;
 - (void)didRemoveFromWebView;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list