summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org>2015-08-26 07:54:57 +0000
committerdcheng@chromium.org <dcheng@chromium.org>2015-08-26 07:54:57 +0000
commit4a2e50c180cbb1ff36d65d00a1c476339c230661 (patch)
treeca5a88e28001ad463f1ce9bc6f71c6745749c5e0
parenta75851a7360149e1fe5ec844b7522c798275e122 (diff)
downloadchromium_src-4a2e50c180cbb1ff36d65d00a1c476339c230661.zip
chromium_src-4a2e50c180cbb1ff36d65d00a1c476339c230661.tar.gz
chromium_src-4a2e50c180cbb1ff36d65d00a1c476339c230661.tar.bz2
Remove javaEnabled setting.
As of M45, NPAPI support is (almost) completely gone, so Java will never be supported anyway. BUG=none Review URL: https://codereview.chromium.org/1306403003 git-svn-id: svn://svn.chromium.org/blink/trunk@201211 bbb929c8-8fbe-4397-9dbb-9b2b20218538
-rw-r--r--third_party/WebKit/LayoutTests/fast/plugins/plugin-placeholder-explicit-size.html2
-rw-r--r--third_party/WebKit/LayoutTests/fast/plugins/plugin-placeholder.html2
-rw-r--r--third_party/WebKit/Source/core/frame/Settings.in1
-rw-r--r--third_party/WebKit/Source/core/html/HTMLAppletElement.cpp27
-rw-r--r--third_party/WebKit/Source/core/html/HTMLAppletElement.h1
-rw-r--r--third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp2
-rw-r--r--third_party/WebKit/Source/modules/plugins/NavigatorPlugins.cpp10
-rw-r--r--third_party/WebKit/Source/modules/plugins/NavigatorPlugins.h1
-rw-r--r--third_party/WebKit/Source/web/WebSettingsImpl.cpp5
-rw-r--r--third_party/WebKit/Source/web/WebSettingsImpl.h1
-rw-r--r--third_party/WebKit/public/web/WebSettings.h1
11 files changed, 4 insertions, 49 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/plugins/plugin-placeholder-explicit-size.html b/third_party/WebKit/LayoutTests/fast/plugins/plugin-placeholder-explicit-size.html
index 465ce24..6a2ff70 100644
--- a/third_party/WebKit/LayoutTests/fast/plugins/plugin-placeholder-explicit-size.html
+++ b/third_party/WebKit/LayoutTests/fast/plugins/plugin-placeholder-explicit-size.html
@@ -18,8 +18,6 @@ applet, embed, object { display: block; margin: 10px; }
</template>
<script>
-internals.settings.setJavaEnabled(true);
-
var templateContent = document.getElementById('placeholder-template').content;
Array.prototype.forEach.call(document.querySelectorAll("applet, embed, object"), function(plugin) {
internals.forcePluginPlaceholder(plugin, templateContent);
diff --git a/third_party/WebKit/LayoutTests/fast/plugins/plugin-placeholder.html b/third_party/WebKit/LayoutTests/fast/plugins/plugin-placeholder.html
index fd59c04..823bed1 100644
--- a/third_party/WebKit/LayoutTests/fast/plugins/plugin-placeholder.html
+++ b/third_party/WebKit/LayoutTests/fast/plugins/plugin-placeholder.html
@@ -18,8 +18,6 @@ applet, embed, object { display: block; margin: 10px; }
</template>
<script>
-internals.settings.setJavaEnabled(true);
-
var templateContent = document.getElementById('placeholder-template').content;
Array.prototype.forEach.call(document.querySelectorAll("applet, embed, object"), function(plugin) {
internals.forcePluginPlaceholder(plugin, templateContent);
diff --git a/third_party/WebKit/Source/core/frame/Settings.in b/third_party/WebKit/Source/core/frame/Settings.in
index b21450a..8fe8b25 100644
--- a/third_party/WebKit/Source/core/frame/Settings.in
+++ b/third_party/WebKit/Source/core/frame/Settings.in
@@ -266,7 +266,6 @@ backgroundHtmlParserPendingTokenLimit type=unsigned, initial=0
# be loaded later.
doHtmlPreloadScanning initial=true
-javaEnabled initial=false
pluginsEnabled initial=false
viewportEnabled initial=false, invalidate=ViewportDescription
diff --git a/third_party/WebKit/Source/core/html/HTMLAppletElement.cpp b/third_party/WebKit/Source/core/html/HTMLAppletElement.cpp
index af9de0c..7d63cb4 100644
--- a/third_party/WebKit/Source/core/html/HTMLAppletElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLAppletElement.cpp
@@ -92,20 +92,12 @@ bool HTMLAppletElement::layoutObjectIsNeeded(const ComputedStyle& style)
LayoutObject* HTMLAppletElement::createLayoutObject(const ComputedStyle& style)
{
- if (!canEmbedJava() || openShadowRoot())
- return LayoutObject::createObject(this, style);
-
- if (usePlaceholderContent())
- return new LayoutBlockFlow(this);
-
- return new LayoutApplet(this);
+ return LayoutObject::createObject(this, style);
}
LayoutPart* HTMLAppletElement::layoutPartForJSBindings() const
{
- if (!canEmbedJava())
- return nullptr;
- return HTMLPlugInElement::layoutPartForJSBindings();
+ return nullptr;
}
LayoutPart* HTMLAppletElement::existingLayoutPart() const
@@ -209,21 +201,6 @@ void HTMLAppletElement::updateWidgetInternal()
}
}
-bool HTMLAppletElement::canEmbedJava() const
-{
- if (document().isSandboxed(SandboxPlugins))
- return false;
-
- Settings* settings = document().settings();
- if (!settings)
- return false;
-
- if (!settings->javaEnabled())
- return false;
-
- return true;
-}
-
bool HTMLAppletElement::canEmbedURL(const KURL& url) const
{
if (!document().securityOrigin()->canDisplay(url)) {
diff --git a/third_party/WebKit/Source/core/html/HTMLAppletElement.h b/third_party/WebKit/Source/core/html/HTMLAppletElement.h
index 296ab31..397aa54 100644
--- a/third_party/WebKit/Source/core/html/HTMLAppletElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLAppletElement.h
@@ -50,7 +50,6 @@ private:
LayoutPart* existingLayoutPart() const override;
void updateWidgetInternal() override;
- bool canEmbedJava() const;
bool canEmbedURL(const KURL&) const;
bool shouldRegisterAsNamedItem() const override { return true; }
diff --git a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
index cde57a8..d102832 100644
--- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
@@ -619,7 +619,7 @@ bool HTMLPlugInElement::pluginIsLoadable(const KURL& url, const String& mimeType
if (!settings)
return false;
- if (MIMETypeRegistry::isJavaAppletMIMEType(mimeType) && !settings->javaEnabled())
+ if (MIMETypeRegistry::isJavaAppletMIMEType(mimeType))
return false;
if (document().isSandboxed(SandboxPlugins))
diff --git a/third_party/WebKit/Source/modules/plugins/NavigatorPlugins.cpp b/third_party/WebKit/Source/modules/plugins/NavigatorPlugins.cpp
index bf48d9c..c86cd06 100644
--- a/third_party/WebKit/Source/modules/plugins/NavigatorPlugins.cpp
+++ b/third_party/WebKit/Source/modules/plugins/NavigatorPlugins.cpp
@@ -60,7 +60,7 @@ DOMMimeTypeArray* NavigatorPlugins::mimeTypes(Navigator& navigator)
// static
bool NavigatorPlugins::javaEnabled(Navigator& navigator)
{
- return NavigatorPlugins::from(navigator).javaEnabled(navigator.frame());
+ return false;
}
DOMPluginArray* NavigatorPlugins::plugins(LocalFrame* frame) const
@@ -77,14 +77,6 @@ DOMMimeTypeArray* NavigatorPlugins::mimeTypes(LocalFrame* frame) const
return m_mimeTypes.get();
}
-bool NavigatorPlugins::javaEnabled(LocalFrame* frame) const
-{
- if (!frame || !frame->settings())
- return false;
-
- return frame->settings()->javaEnabled();
-}
-
DEFINE_TRACE(NavigatorPlugins)
{
visitor->trace(m_plugins);
diff --git a/third_party/WebKit/Source/modules/plugins/NavigatorPlugins.h b/third_party/WebKit/Source/modules/plugins/NavigatorPlugins.h
index 635d096..e91cd16 100644
--- a/third_party/WebKit/Source/modules/plugins/NavigatorPlugins.h
+++ b/third_party/WebKit/Source/modules/plugins/NavigatorPlugins.h
@@ -36,7 +36,6 @@ private:
DOMPluginArray* plugins(LocalFrame*) const;
DOMMimeTypeArray* mimeTypes(LocalFrame*) const;
- bool javaEnabled(LocalFrame*) const;
mutable Member<DOMPluginArray> m_plugins;
mutable Member<DOMMimeTypeArray> m_mimeTypes;
diff --git a/third_party/WebKit/Source/web/WebSettingsImpl.cpp b/third_party/WebKit/Source/web/WebSettingsImpl.cpp
index 8de095d..92b11bb 100644
--- a/third_party/WebKit/Source/web/WebSettingsImpl.cpp
+++ b/third_party/WebKit/Source/web/WebSettingsImpl.cpp
@@ -344,11 +344,6 @@ void WebSettingsImpl::setTextAreasAreResizable(bool areResizable)
m_settings->setTextAreasAreResizable(areResizable);
}
-void WebSettingsImpl::setJavaEnabled(bool enabled)
-{
- m_settings->setJavaEnabled(enabled);
-}
-
void WebSettingsImpl::setAllowScriptsToCloseWindows(bool allow)
{
m_settings->setAllowScriptsToCloseWindows(allow);
diff --git a/third_party/WebKit/Source/web/WebSettingsImpl.h b/third_party/WebKit/Source/web/WebSettingsImpl.h
index 781088d..45f5895 100644
--- a/third_party/WebKit/Source/web/WebSettingsImpl.h
+++ b/third_party/WebKit/Source/web/WebSettingsImpl.h
@@ -106,7 +106,6 @@ public:
void setImagesEnabled(bool) override;
void setInlineTextBoxAccessibilityEnabled(bool) override;
void setInvertViewportScrollOrder(bool) override;
- void setJavaEnabled(bool) override;
void setJavaScriptCanAccessClipboard(bool) override;
void setJavaScriptCanOpenWindowsAutomatically(bool) override;
void setJavaScriptEnabled(bool) override;
diff --git a/third_party/WebKit/public/web/WebSettings.h b/third_party/WebKit/public/web/WebSettings.h
index da2fd18..ec7bc3f 100644
--- a/third_party/WebKit/public/web/WebSettings.h
+++ b/third_party/WebKit/public/web/WebSettings.h
@@ -181,7 +181,6 @@ public:
virtual void setImagesEnabled(bool) = 0;
virtual void setInlineTextBoxAccessibilityEnabled(bool) = 0;
virtual void setInvertViewportScrollOrder(bool) = 0;
- virtual void setJavaEnabled(bool) = 0;
virtual void setJavaScriptCanAccessClipboard(bool) = 0;
virtual void setJavaScriptCanOpenWindowsAutomatically(bool) = 0;
virtual void setJavaScriptEnabled(bool) = 0;