Title: [151767] trunk/Source/WebKit2
Revision
151767
Author
[email protected]
Date
2013-06-19 21:30:32 -0700 (Wed, 19 Jun 2013)

Log Message

Expose plug-ins CFBundleShortVersionString in the WKPluginInformation dictionary
https://bugs.webkit.org/show_bug.cgi?id=117816

Reviewed by Geoffrey Garen.

- Adds a new key for the WKPluginInformation dictionary: WKPluginInformationBundleShortVersionKey().

* Shared/API/c/WKPluginInformation.cpp:
(WKPluginInformationBundleShortVersionKey):
* Shared/API/c/WKPluginInformation.h:
* Shared/Plugins/Netscape/PluginInformation.cpp:
(WebKit::pluginInformationBundleShortVersionKey):
* Shared/Plugins/Netscape/PluginInformation.h:
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::getPluginInfo):
* Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
(WebKit::getPlatformPluginModuleInformation):
* Shared/Plugins/PluginModuleInfo.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (151766 => 151767)


--- trunk/Source/WebKit2/ChangeLog	2013-06-20 04:22:50 UTC (rev 151766)
+++ trunk/Source/WebKit2/ChangeLog	2013-06-20 04:30:32 UTC (rev 151767)
@@ -1,3 +1,24 @@
+2013-06-19  Sam Weinig  <[email protected]>
+
+        Expose plug-ins CFBundleShortVersionString in the WKPluginInformation dictionary
+        https://bugs.webkit.org/show_bug.cgi?id=117816
+
+        Reviewed by Geoffrey Garen.
+
+        - Adds a new key for the WKPluginInformation dictionary: WKPluginInformationBundleShortVersionKey().
+
+        * Shared/API/c/WKPluginInformation.cpp:
+        (WKPluginInformationBundleShortVersionKey):
+        * Shared/API/c/WKPluginInformation.h:
+        * Shared/Plugins/Netscape/PluginInformation.cpp:
+        (WebKit::pluginInformationBundleShortVersionKey):
+        * Shared/Plugins/Netscape/PluginInformation.h:
+        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
+        (WebKit::NetscapePluginModule::getPluginInfo):
+        * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
+        (WebKit::getPlatformPluginModuleInformation):
+        * Shared/Plugins/PluginModuleInfo.h:
+
 2013-06-19  Ruth Fong  <[email protected]>
 
         <rdar://problem/14197983> Rename functions from Bug 117667 and add safeguards for !ENABLE(VIDEO) platforms (117765)

Modified: trunk/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp (151766 => 151767)


--- trunk/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp	2013-06-20 04:22:50 UTC (rev 151766)
+++ trunk/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp	2013-06-20 04:30:32 UTC (rev 151767)
@@ -44,6 +44,12 @@
     return toAPI(key);
 }
 
+WKStringRef WKPluginInformationBundleShortVersionKey()
+{
+    static WebString* key = WebString::create(pluginInformationBundleShortVersionKey()).leakRef();
+    return toAPI(key);
+}
+
 WKStringRef WKPluginInformationPathKey()
 {
     static WebString* key = WebString::create(pluginInformationPathKey()).leakRef();

Modified: trunk/Source/WebKit2/Shared/API/c/WKPluginInformation.h (151766 => 151767)


--- trunk/Source/WebKit2/Shared/API/c/WKPluginInformation.h	2013-06-20 04:22:50 UTC (rev 151766)
+++ trunk/Source/WebKit2/Shared/API/c/WKPluginInformation.h	2013-06-20 04:30:32 UTC (rev 151767)
@@ -41,6 +41,9 @@
 WK_EXPORT WKStringRef WKPluginInformationBundleVersionKey();
 
 /* Value type: WKStringRef */
+WKStringRef WKPluginInformationBundleShortVersionKey();
+
+/* Value type: WKStringRef */
 WK_EXPORT WKStringRef WKPluginInformationPathKey();
 
 /* Value type: WKStringRef */

Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp (151766 => 151767)


--- trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp	2013-06-20 04:22:50 UTC (rev 151766)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp	2013-06-20 04:30:32 UTC (rev 151767)
@@ -46,6 +46,11 @@
     return ASCIILiteral("PluginInformationBundleVersion");
 }
 
+String pluginInformationBundleShortVersionKey()
+{
+    return ASCIILiteral("PluginInformationBundleShortVersion");
+}
+
 String pluginInformationPathKey()
 {
     return ASCIILiteral("PluginInformationPath");

Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h (151766 => 151767)


--- trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h	2013-06-20 04:22:50 UTC (rev 151766)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h	2013-06-20 04:30:32 UTC (rev 151767)
@@ -36,6 +36,7 @@
 // Plug-in module information keys
 String pluginInformationBundleIdentifierKey();
 String pluginInformationBundleVersionKey();
+String pluginInformationBundleShortVersionKey();
 String pluginInformationPathKey();
 String pluginInformationDisplayNameKey();
 String pluginInformationDefaultLoadPolicyKey();

Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm (151766 => 151767)


--- trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm	2013-06-20 04:22:50 UTC (rev 151766)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm	2013-06-20 04:30:32 UTC (rev 151767)
@@ -378,6 +378,11 @@
             plugin.versionString = static_cast<CFStringRef>(versionTypeRef);
     }
 
+    if (CFTypeRef shortVersionTypeRef = CFBundleGetValueForInfoDictionaryKey(bundle.get(), CFSTR("CFBundleShortVersionString"))) {
+        if (CFGetTypeID(shortVersionTypeRef) == CFStringGetTypeID())
+            plugin.shortVersionString = static_cast<CFStringRef>(shortVersionTypeRef);
+    }
+
     if (CFTypeRef preferencePathTypeRef = CFBundleGetValueForInfoDictionaryKey(bundle.get(), CFSTR("WebPluginPreferencePanePath"))) {
         if (CFGetTypeID(preferencePathTypeRef) == CFStringGetTypeID())
             plugin.preferencePanePath = static_cast<CFStringRef>(preferencePathTypeRef);

Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm (151766 => 151767)


--- trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm	2013-06-20 04:22:50 UTC (rev 151766)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm	2013-06-20 04:30:32 UTC (rev 151767)
@@ -39,6 +39,7 @@
 {
     map.set(pluginInformationBundleIdentifierKey(), WebString::create(plugin.bundleIdentifier));
     map.set(pluginInformationBundleVersionKey(), WebString::create(plugin.versionString));
+    map.set(pluginInformationBundleShortVersionKey(), WebString::create(plugin.shortVersionString));
     map.set(pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey(), WebBoolean::create(WKIsPluginUpdateAvailable(nsStringFromWebCoreString(plugin.bundleIdentifier))));
     map.set(pluginInformationHasSandboxProfileKey(), WebBoolean::create(pluginHasSandboxProfile(plugin.bundleIdentifier)));
 }

Modified: trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h (151766 => 151767)


--- trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h	2013-06-20 04:22:50 UTC (rev 151766)
+++ trunk/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h	2013-06-20 04:30:32 UTC (rev 151767)
@@ -54,6 +54,7 @@
     cpu_type_t pluginArchitecture;
     String bundleIdentifier;
     String versionString;
+    String shortVersionString;
     String preferencePanePath;
 #endif
 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to