Title: [124799] trunk
- Revision
- 124799
- Author
- [email protected]
- Date
- 2012-08-06 13:42:01 -0700 (Mon, 06 Aug 2012)
Log Message
If the Apple Java plug-in is blocked and no runtime is installed, don't load it
https://bugs.webkit.org/show_bug.cgi?id=93289
<rdar://problem/11730092>
Reviewed by Dan Bernstein.
Source/WebKit2:
If the Apple Java plug-in is blocked, but there's no Java runtime installed (or the Java plug-in is disabled),
don't even include it in the plug-in info store.
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::shouldBlockPlugin):
Since this is static now, it shouldn't be const.
* UIProcess/Plugins/PluginInfoStore.h:
(PluginInfoStore):
shouldBlockPlugin can be static.
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::PluginInfoStore::shouldUsePlugin):
Return false if the Apple Java plug-in is blocked but Java isn't installed or enabled.
(WebKit::PluginInfoStore::shouldBlockPlugin):
Since this is static now, it shouldn't be const.
WebKitLibraries:
Add WKJLIsRuntimeAndWebComponentsInstalled().
* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceMountainLion.a:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (124798 => 124799)
--- trunk/Source/WebKit2/ChangeLog 2012-08-06 20:41:20 UTC (rev 124798)
+++ trunk/Source/WebKit2/ChangeLog 2012-08-06 20:42:01 UTC (rev 124799)
@@ -1,3 +1,29 @@
+2012-08-06 Anders Carlsson <[email protected]>
+
+ If the Apple Java plug-in is blocked and no runtime is installed, don't load it
+ https://bugs.webkit.org/show_bug.cgi?id=93289
+ <rdar://problem/11730092>
+
+ Reviewed by Dan Bernstein.
+
+ If the Apple Java plug-in is blocked, but there's no Java runtime installed (or the Java plug-in is disabled),
+ don't even include it in the plug-in info store.
+
+ * UIProcess/Plugins/PluginInfoStore.cpp:
+ (WebKit::PluginInfoStore::shouldBlockPlugin):
+ Since this is static now, it shouldn't be const.
+
+ * UIProcess/Plugins/PluginInfoStore.h:
+ (PluginInfoStore):
+ shouldBlockPlugin can be static.
+
+ * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
+ (WebKit::PluginInfoStore::shouldUsePlugin):
+ Return false if the Apple Java plug-in is blocked but Java isn't installed or enabled.
+
+ (WebKit::PluginInfoStore::shouldBlockPlugin):
+ Since this is static now, it shouldn't be const.
+
2012-08-06 Mario Sanchez Prada <[email protected]>
[WK2][GTK] Improvements for the new spell-checking API
Modified: trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp (124798 => 124799)
--- trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp 2012-08-06 20:41:20 UTC (rev 124798)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp 2012-08-06 20:42:01 UTC (rev 124799)
@@ -187,7 +187,7 @@
}
#if !PLATFORM(MAC)
-bool PluginInfoStore::shouldBlockPlugin(const PluginModuleInfo&) const
+bool PluginInfoStore::shouldBlockPlugin(const PluginModuleInfo&)
{
return false;
}
Modified: trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.h (124798 => 124799)
--- trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.h 2012-08-06 20:41:20 UTC (rev 124798)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.h 2012-08-06 20:42:01 UTC (rev 124799)
@@ -56,7 +56,7 @@
// Return whether this plug-in should be blocked from being instantiated.
// Note that the plug-in will still be seen by e.g. navigator.plugins
- bool shouldBlockPlugin(const PluginModuleInfo&) const;
+ static bool shouldBlockPlugin(const PluginModuleInfo&);
private:
PluginModuleInfo findPluginForMIMEType(const String& mimeType) const;
Modified: trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm (124798 => 124799)
--- trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm 2012-08-06 20:41:20 UTC (rev 124798)
+++ trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginInfoStoreMac.mm 2012-08-06 20:42:01 UTC (rev 124799)
@@ -123,10 +123,17 @@
if (!checkForPreferredPlugin(alreadyLoadedPlugins, plugin, "com.apple.java.JavaAppletPlugin", "com.oracle.java.JavaAppletPlugin"))
return false;
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+ if (plugin.bundleIdentifier == "com.apple.java.JavaAppletPlugin" && shouldBlockPlugin(plugin) && !WKJLIsRuntimeAndWebComponentsInstalled()) {
+ // If the Apple Java plug-in is blocked and there's no Java runtime installed, just pretend that the plug-in doesn't exist.
+ return false;
+ }
+#endif
+
return true;
}
-bool PluginInfoStore::shouldBlockPlugin(const PluginModuleInfo& plugin) const
+bool PluginInfoStore::shouldBlockPlugin(const PluginModuleInfo& plugin)
{
return WKShouldBlockPlugin(plugin.bundleIdentifier, plugin.versionString);
}
Modified: trunk/WebKitLibraries/ChangeLog (124798 => 124799)
--- trunk/WebKitLibraries/ChangeLog 2012-08-06 20:41:20 UTC (rev 124798)
+++ trunk/WebKitLibraries/ChangeLog 2012-08-06 20:42:01 UTC (rev 124799)
@@ -1,3 +1,17 @@
+2012-08-06 Anders Carlsson <[email protected]>
+
+ If the Apple Java plug-in is blocked and no runtime is installed, don't load it
+ https://bugs.webkit.org/show_bug.cgi?id=93289
+ <rdar://problem/11730092>
+
+ Reviewed by Dan Bernstein.
+
+ Add WKJLIsRuntimeAndWebComponentsInstalled().
+
+ * WebKitSystemInterface.h:
+ * libWebKitSystemInterfaceLion.a:
+ * libWebKitSystemInterfaceMountainLion.a:
+
2012-08-01 Jon Lee <[email protected]>
Update WKSI.
Modified: trunk/WebKitLibraries/WebKitSystemInterface.h (124798 => 124799)
--- trunk/WebKitLibraries/WebKitSystemInterface.h 2012-08-06 20:41:20 UTC (rev 124798)
+++ trunk/WebKitLibraries/WebKitSystemInterface.h 2012-08-06 20:42:01 UTC (rev 124799)
@@ -501,6 +501,10 @@
CGFloat WKNSReboundDeltaForElasticDelta(CGFloat delta);
#endif
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+Boolean WKJLIsRuntimeAndWebComponentsInstalled(void);
+#endif
+
#ifdef __cplusplus
}
#endif
Modified: trunk/WebKitLibraries/libWebKitSystemInterfaceLion.a
(Binary files differ)
Modified: trunk/WebKitLibraries/libWebKitSystemInterfaceMountainLion.a
(Binary files differ)
Modified: trunk/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
(Binary files differ)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes