Fix <rdar://5505062> WebKit's version-independent ProgIDs contain version...
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2007 17:55:01 +0000 (17:55 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2007 17:55:01 +0000 (17:55 +0000)
        I also added a few registry keys for our version-independent ProgIDs
        that we were missing.

        Reviewed by Steve.

        * ProgIDMacros.h: Added new macros to get version-independent ProgIDs.
        * WebKitDLL.cpp: Use the version-independent ProgIDs in the right
        places, and added some new keys for version-independent ProgIDs.

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

WebKit/win/ChangeLog
WebKit/win/ProgIDMacros.h
WebKit/win/WebKitDLL.cpp

index 0582326ff7c6f837aec13e74694bcc43e16b1994..329fd3f63be1a7396cd35b46fe6b27a8b5042a09 100644 (file)
@@ -1,3 +1,16 @@
+2007-10-02  Adam Roben  <aroben@apple.com>
+
+        Fix <rdar://5505062> WebKit's version-independent ProgIDs contain version numbers
+
+        I also added a few registry keys for our version-independent ProgIDs
+        that we were missing.
+
+        Reviewed by Steve.
+
+        * ProgIDMacros.h: Added new macros to get version-independent ProgIDs.
+        * WebKitDLL.cpp: Use the version-independent ProgIDs in the right
+        places, and added some new keys for version-independent ProgIDs.
+
 2007-10-02  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Adam.
index c3ff1e6669544ad373a727326fda7cd7fa9239c5..db42ba8dff5f2915c2d2f92af2c98877fc88f40b 100644 (file)
 #ifndef ProgIDMacros_h
 #define ProgIDMacros_h
 
-#define PRODUCTION_PROGID(className) TEXT("WebKit.") TEXT(#className) TEXT(".3")
-#define OPENSOURCE_PROGID(className) TEXT("OpenSource") PRODUCTION_PROGID(className)
+#define STRINGIFIED_VERSION(version) STRINGIFY(version)
+#define STRINGIFY(s) TEXT(#s)
+
+#define CURRENT_PROGID_VERSION 523
+#define VERSION_INDEPENDENT_PRODUCTION_PROGID(className) TEXT("WebKit.") TEXT(#className)
+#define VERSION_INDEPENDENT_OPENSOURCE_PROGID(className) TEXT("OpenSource") VERSION_INDEPENDENT_PRODUCTION_PROGID(className)
+#define VERSIONED_PROGID(versionIndependentProgID, version) versionIndependentProgID TEXT(".") STRINGIFIED_VERSION(version)
 
 #endif // !defined(ProgIDMacros_h)
index a7be35d77dfc994d763f8c5eb951cd7dc5a9d966..0c06bc72bb38d5864d5091f853ab12158a958e25 100644 (file)
@@ -131,22 +131,32 @@ STDAPI DllCanUnloadNow(void)
 }
 
 #if __BUILDBOT__
-#define PROGID(className) PRODUCTION_PROGID(className)
+#define VERSION_INDEPENDENT_PROGID(className) VERSION_INDEPENDENT_PRODUCTION_PROGID(className)
 #else
-#define PROGID(className) OPENSOURCE_PROGID(className)
+#define VERSION_INDEPENDENT_PROGID(className) VERSION_INDEPENDENT_OPENSOURCE_PROGID(className)
 #endif
+#define CURRENT_VERSIONED_PROGID(className) VERSIONED_PROGID(VERSION_INDEPENDENT_PROGID(className), CURRENT_PROGID_VERSION)
+#define VERSIONED_303_PROGID(className) VERSIONED_PROGID(VERSION_INDEPENDENT_PROGID(className), 3)
 
+// FIXME: The last line of this macro only here for the benefit of Safari 3.0.3. Once a newer version
+// is released, the last line should be removed and gSlotsPerEntry should be decremented by 1.
 //key                                                                                       value name              value }
 #define KEYS_FOR_CLASS(cls) \
 { TEXT("CLSID\\{########-####-####-####-############}"),                                    0,                      TEXT(#cls) }, \
 { TEXT("CLSID\\{########-####-####-####-############}\\InprocServer32"),                    0,                      (LPCTSTR)-1 }, \
 { TEXT("CLSID\\{########-####-####-####-############}\\InprocServer32"),                    TEXT("ThreadingModel"), TEXT("Apartment") }, \
-{ TEXT("CLSID\\{########-####-####-####-############}\\ProgID"),                            0,                      PROGID(cls) }, \
-{ TEXT("CLSID\\{########-####-####-####-############}\\VersionIndependentProgID"),          0,                      PROGID(cls) }, \
-{ PROGID(cls),                                                                              0,                      TEXT(#cls) }, \
-{ PROGID(cls) TEXT("\\CLSID"),                                                              0,                      TEXT("{########-####-####-####-############}") },
-
-static const int gSlotsPerEntry = 7;
+{ TEXT("CLSID\\{########-####-####-####-############}\\ProgID"),                            0,                      CURRENT_VERSIONED_PROGID(cls) }, \
+{ CURRENT_VERSIONED_PROGID(cls),                                                            0,                      TEXT(#cls) }, \
+{ CURRENT_VERSIONED_PROGID(cls) TEXT("\\CLSID"),                                            0,                      TEXT("{########-####-####-####-############}") }, \
+{ TEXT("CLSID\\{########-####-####-####-############}\\VersionIndependentProgID"),          0,                      VERSION_INDEPENDENT_PROGID(cls) }, \
+{ VERSION_INDEPENDENT_PROGID(cls),                                                          0,                      TEXT(#cls) }, \
+{ VERSION_INDEPENDENT_PROGID(cls) TEXT("\\CLSID"),                                          0,                      TEXT("{########-####-####-####-############}") }, \
+{ VERSION_INDEPENDENT_PROGID(cls) TEXT("\\CurVer"),                                         0,                      STRINGIFIED_VERSION(CURRENT_PROGID_VERSION) }, \
+{ VERSIONED_303_PROGID(cls),                                                                0,                      TEXT(#cls) }, \
+{ VERSIONED_303_PROGID(cls) TEXT("\\CLSID"),                                                0,                      TEXT("{########-####-####-####-############}") }, \
+// end of macro
+
+static const int gSlotsPerEntry = 12;
 static LPCTSTR gRegTable[][3] = {
     FOR_EACH_CLASS(KEYS_FOR_CLASS)
 };