diff options
| author | battre@chromium.org <battre@chromium.org> | 2015-08-26 09:11:12 +0000 |
|---|---|---|
| committer | battre@chromium.org <battre@chromium.org> | 2015-08-26 09:11:12 +0000 |
| commit | 6ec618d49284d2da7bd79b6731586023c74bc191 (patch) | |
| tree | bf77982112e77db7d4ed80afbfc94f9f2923d250 | |
| parent | de50230291178cd315636d6a16696e28386a54f1 (diff) | |
| download | chromium_src-6ec618d49284d2da7bd79b6731586023c74bc191.zip chromium_src-6ec618d49284d2da7bd79b6731586023c74bc191.tar.gz chromium_src-6ec618d49284d2da7bd79b6731586023c74bc191.tar.bz2 | |
Reland of move javaEnabled setting. (patchset #1 id:1 of https://codereview.chromium.org/1318703002/ )
Reason for revert:
Relanding because this had no impact. The bug disappeared and re-appeared regardless of this CL.
Original issue's description:
> Revert of Remove javaEnabled setting. (patchset #1 id:1 of https://codereview.chromium.org/1306403003/ )
>
> Reason for revert:
> Reverting to see whether this fixes the compilation.
>
> Original issue's description:
> > Remove javaEnabled setting.
> >
> > As of M45, NPAPI support is (almost) completely gone, so Java will never
> > be supported anyway.
> >
> > BUG=none
> >
> > Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201211
>
> TBR=haraken@chromium.org,dcheng@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=none
>
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201217
TBR=haraken@chromium.org,dcheng@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=none
Review URL: https://codereview.chromium.org/1319673003
git-svn-id: svn://svn.chromium.org/blink/trunk@201218 bbb929c8-8fbe-4397-9dbb-9b2b20218538
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; |
