Clean-up in preparation for <rdar://5505062> WebKit's version-independent...
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 30 Sep 2007 01:58:28 +0000 (01:58 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 30 Sep 2007 01:58:28 +0000 (01:58 +0000)
         Reviewed by Steve.

         * ProgIDMacros.h: Stringify the passed in class name.
         * WebKitDLL.cpp: Added a FOR_EACH_CLASS macro to ensure that our class
         lists stay in the right order, and updated uses of the *_PROGID macros
         for to take the stringification into account.

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

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

index e78c3818143e19cc7a7b002549b264a13f250fe0..3eff9cab13f9295f6ebb94f3f0cf3e669366ff60 100644 (file)
@@ -1,3 +1,14 @@
+2007-09-29  Adam Roben  <aroben@apple.com>
+
+        Clean-up in preparation for <rdar://5505062> WebKit's version-independent ProgIDs contain version numbers
+
+        Reviewed by Steve.
+
+        * ProgIDMacros.h: Stringify the passed in class name.
+        * WebKitDLL.cpp: Added a FOR_EACH_CLASS macro to ensure that our class
+        lists stay in the right order, and updated uses of the *_PROGID macros
+        for to take the stringification into account.
+
 2007-09-27  Kevin McCullough  <kmccullough@apple.com>
 
         Reviewed by Darin.
index 8565af28b8b529e9ec5dc265d89931b651217536..c3ff1e6669544ad373a727326fda7cd7fa9239c5 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef ProgIDMacros_h
 #define ProgIDMacros_h
 
-#define PRODUCTION_PROGID(className) TEXT("WebKit.") TEXT(className) TEXT(".3")
+#define PRODUCTION_PROGID(className) TEXT("WebKit.") TEXT(#className) TEXT(".3")
 #define OPENSOURCE_PROGID(className) TEXT("OpenSource") PRODUCTION_PROGID(className)
 
 #endif // !defined(ProgIDMacros_h)
index 83339f9981c0e11662ce78e55998cf972093d89f..a7be35d77dfc994d763f8c5eb951cd7dc5a9d966 100644 (file)
@@ -46,26 +46,31 @@ ULONG gLockCount;
 ULONG gClassCount;
 HINSTANCE gInstance;
 
+#define FOR_EACH_CLASS(macro) \
+    macro(CFDictionaryPropertyBag) \
+    macro(WebCache) \
+    macro(WebDebugProgram) \
+    macro(WebDownload) \
+    macro(WebError) \
+    macro(WebHistory) \
+    macro(WebHistoryItem) \
+    macro(WebIconDatabase) \
+    macro(WebJavaScriptCollector) \
+    macro(WebKitStatistics) \
+    macro(WebMutableURLRequest) \
+    macro(WebNotificationCenter) \
+    macro(WebPreferences) \
+    macro(WebScrollBar) \
+    macro(WebURLCredential) \
+    macro(WebURLProtectionSpace) \
+    macro(WebURLRequest) \
+    macro(WebURLResponse) \
+    macro(WebView)
+
+#define CLSID_FOR_CLASS(cls) CLSID_##cls,
+
 static CLSID gRegCLSIDs[] = {
-    CLSID_WebView,
-    CLSID_WebIconDatabase,
-    CLSID_WebMutableURLRequest,
-    CLSID_WebURLRequest,
-    CLSID_WebNotificationCenter,
-    CLSID_WebHistory,
-    CLSID_CFDictionaryPropertyBag,
-    CLSID_WebHistoryItem,
-    CLSID_WebCache,
-    CLSID_WebJavaScriptCollector,
-    CLSID_WebPreferences,
-    CLSID_WebScrollBar,
-    CLSID_WebKitStatistics,
-    CLSID_WebError,
-    CLSID_WebURLCredential,
-    CLSID_WebDownload,
-    CLSID_WebURLProtectionSpace,
-    CLSID_WebDebugProgram,
-    CLSID_WebURLResponse
+    FOR_EACH_CLASS(CLSID_FOR_CLASS)
 };
 
 void shutDownWebKit()
@@ -133,35 +138,17 @@ STDAPI DllCanUnloadNow(void)
 
 //key                                                                                       value name              value }
 #define KEYS_FOR_CLASS(cls) \
-{ TEXT("CLSID\\{########-####-####-####-############}"),                                    0,                      TEXT(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("{########-####-####-####-############}") }
+{ PROGID(cls),                                                                              0,                      TEXT(#cls) }, \
+{ PROGID(cls) TEXT("\\CLSID"),                                                              0,                      TEXT("{########-####-####-####-############}") },
 
 static const int gSlotsPerEntry = 7;
 static LPCTSTR gRegTable[][3] = {
-    KEYS_FOR_CLASS("WebView"),
-    KEYS_FOR_CLASS("WebIconDatabase"),
-    KEYS_FOR_CLASS("WebMutableURLRequest"),
-    KEYS_FOR_CLASS("WebURLRequest"),
-    KEYS_FOR_CLASS("WebNotificationCenter"),
-    KEYS_FOR_CLASS("WebHistory"),
-    KEYS_FOR_CLASS("CFDictionaryPropertyBag"),
-    KEYS_FOR_CLASS("WebHistoryItem"),
-    KEYS_FOR_CLASS("WebCache"),
-    KEYS_FOR_CLASS("WebJavaScriptCollector"),
-    KEYS_FOR_CLASS("WebPreferences"),
-    KEYS_FOR_CLASS("WebScrollBar"),
-    KEYS_FOR_CLASS("WebKitStatistics"),
-    KEYS_FOR_CLASS("WebError"),
-    KEYS_FOR_CLASS("WebURLCredential"),
-    KEYS_FOR_CLASS("WebDownload"),
-    KEYS_FOR_CLASS("WebURLProtectionSpace"),
-    KEYS_FOR_CLASS("WebDebugProgram"),
-    KEYS_FOR_CLASS("WebURLResponse")
+    FOR_EACH_CLASS(KEYS_FOR_CLASS)
 };
 
 static void substituteGUID(LPTSTR str, const UUID* guid)