Break pluginReplacementEnabled into youTubeFlashPluginReplacementEnabled and quickTim...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Aug 2016 23:59:00 +0000 (23:59 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Aug 2016 23:59:00 +0000 (23:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=161424
<rdar://problem/28050847>

Patch by Ricky Mondello <rmondello@apple.com> on 2016-08-31
Reviewed by Dean Jackson.

Source/WebCore:

Replace the single pluginReplacementEnabled setting with individual settings for the YouTube Flash plug-in
behavior and the QuickTime plug-in behavior. Unless otherwise noted, this change copies the existing plumbing
for pluginReplacementEnabled and renames it twice. The default values for these settings remain the same.

* Modules/plugins/PluginReplacement.h:
(WebCore::ReplacementPlugin::ReplacementPlugin): Augment the constructor.
(WebCore::ReplacementPlugin::isEnabledBySettings): Added.
* Modules/plugins/QuickTimePluginReplacement.h: Declare a static member function.
* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::QuickTimePluginReplacement::registerPluginReplacement): Properly create a ReplacementPlugin instance.
(WebCore::QuickTimePluginReplacement::isEnabledBySettings): Added.
* Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::YouTubePluginReplacement::registerPluginReplacement): Properly create a ReplacementPlugin instance.
(WebCore::YouTubePluginReplacement::isEnabledBySettings): Added.
* Modules/plugins/YouTubePluginReplacement.h: Declare a static member function.
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::requestObject): Ask the ReplacementPlugin whether it's enabled, rather than assume
    all plug-in replacement is guarded by a single run-time setting.
* page/Settings.cpp: Declare values for defaults for both settings.
* page/Settings.in: Declare two settings.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup): Handle both settings.
(WebCore::InternalSettings::Backup::restoreTo): Ditto.
(WebCore::InternalSettings::setQuickTimePluginReplacementEnabled): Added.
(WebCore::InternalSettings::setYouTubeFlashPluginReplacementEnabled): Added.
(WebCore::InternalSettings::setPluginReplacementEnabled): Deleted.
* testing/InternalSettings.h: Duplicate and rename.
* testing/InternalSettings.idl: Ditto.

LayoutTests:

* plugins/quicktime-plugin-replacement.html: Updated for the internal setting rename.
* security/contentSecurityPolicy/object-src-none-blocks-quicktime-plugin-replacement.html: Ditto.
* security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html: Ditto.
* security/contentSecurityPolicy/plugins-types-allows-quicktime-plugin-replacement.html: Ditto.
* security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html: Ditto.
* security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement-without-mime-type.html: Ditto.
* security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement.html: Ditto.
* security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html: Ditto.
* security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html: Ditto.

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

22 files changed:
LayoutTests/ChangeLog
LayoutTests/plugins/quicktime-plugin-replacement.html
LayoutTests/security/contentSecurityPolicy/object-src-none-blocks-quicktime-plugin-replacement.html
LayoutTests/security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html
LayoutTests/security/contentSecurityPolicy/plugins-types-allows-quicktime-plugin-replacement.html
LayoutTests/security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html
LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement-without-mime-type.html
LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement.html
LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html
LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/plugins/PluginReplacement.h
Source/WebCore/Modules/plugins/QuickTimePluginReplacement.h
Source/WebCore/Modules/plugins/QuickTimePluginReplacement.mm
Source/WebCore/Modules/plugins/YouTubePluginReplacement.cpp
Source/WebCore/Modules/plugins/YouTubePluginReplacement.h
Source/WebCore/html/HTMLPlugInElement.cpp
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.in
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl

index e570da2..3642cb9 100644 (file)
@@ -1,3 +1,21 @@
+2016-08-31  Ricky Mondello  <rmondello@apple.com>
+
+        Break pluginReplacementEnabled into youTubeFlashPluginReplacementEnabled and quickTimePluginReplacementEnabled
+        https://bugs.webkit.org/show_bug.cgi?id=161424
+        <rdar://problem/28050847>
+
+        Reviewed by Dean Jackson.
+
+        * plugins/quicktime-plugin-replacement.html: Updated for the internal setting rename.
+        * security/contentSecurityPolicy/object-src-none-blocks-quicktime-plugin-replacement.html: Ditto.
+        * security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html: Ditto.
+        * security/contentSecurityPolicy/plugins-types-allows-quicktime-plugin-replacement.html: Ditto.
+        * security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html: Ditto.
+        * security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement-without-mime-type.html: Ditto.
+        * security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement.html: Ditto.
+        * security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html: Ditto.
+        * security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html: Ditto.
+
 2016-08-31  Mark Lam  <mark.lam@apple.com>
 
         Gardening: skipping a flaky test from the JSC test suite.
index bf2472d..191dd54 100644 (file)
                 if (window.testRunner) {
                     window.testRunner.waitUntilDone();
                     window.testRunner.dumpAsText()
-                    window.internals.settings.setPluginReplacementEnabled(true);
+                    window.internals.settings.setQuickTimePluginReplacementEnabled(true);
                 }
 
                 div = document.getElementById("parent");
index d8f6a82..b010f84 100644 (file)
@@ -9,7 +9,7 @@ if (window.testRunner) {
 }
 
 if (window.internals)
-    window.internals.settings.setPluginReplacementEnabled(true);
+    window.internals.settings.setQuickTimePluginReplacementEnabled(true);
 
 function done()
 {
index f34a7e8..0a853ce 100644 (file)
@@ -9,7 +9,7 @@ if (window.testRunner) {
 }
 
 if (window.internals)
-    window.internals.settings.setPluginReplacementEnabled(true);
+    window.internals.settings.setYouTubeFlashPluginReplacementEnabled(true);
 
 function done()
 {
index 45ae973..2c0d5cb 100644 (file)
@@ -9,7 +9,7 @@ if (window.testRunner) {
 }
 
 if (window.internals)
-    window.internals.settings.setPluginReplacementEnabled(true);
+    window.internals.settings.setQuickTimePluginReplacementEnabled(true);
 </script>
 </head>
 <body>
index 7df0a0f..cc2fb41 100644 (file)
@@ -9,7 +9,7 @@ if (window.testRunner) {
 }
 
 if (window.internals)
-    window.internals.settings.setPluginReplacementEnabled(true);
+    window.internals.settings.setYouTubeFlashPluginReplacementEnabled(true);
 
 // Waiting at least 100ms seems to ensure that YouTube plugin replacement has loaded.
 window.setTimeout(function () {
index 6e2a0e5..06dbc67 100644 (file)
@@ -9,7 +9,7 @@ if (window.testRunner) {
 }
 
 if (window.internals)
-    window.internals.settings.setPluginReplacementEnabled(true);
+    window.internals.settings.setQuickTimePluginReplacementEnabled(true);
 
 function done()
 {
index 8865ad9..66d7a19 100644 (file)
@@ -9,7 +9,7 @@ if (window.testRunner) {
 }
 
 if (window.internals)
-    window.internals.settings.setPluginReplacementEnabled(true);
+    window.internals.settings.setYouTubeFlashPluginReplacementEnabled(true);
 
 function done()
 {
index 293ab24..5ce0be8 100644 (file)
@@ -1,3 +1,40 @@
+2016-08-31  Ricky Mondello  <rmondello@apple.com>
+
+        Break pluginReplacementEnabled into youTubeFlashPluginReplacementEnabled and quickTimePluginReplacementEnabled
+        https://bugs.webkit.org/show_bug.cgi?id=161424
+        <rdar://problem/28050847>
+
+        Reviewed by Dean Jackson.
+
+        Replace the single pluginReplacementEnabled setting with individual settings for the YouTube Flash plug-in
+        behavior and the QuickTime plug-in behavior. Unless otherwise noted, this change copies the existing plumbing
+        for pluginReplacementEnabled and renames it twice. The default values for these settings remain the same.
+
+        * Modules/plugins/PluginReplacement.h:
+        (WebCore::ReplacementPlugin::ReplacementPlugin): Augment the constructor.
+        (WebCore::ReplacementPlugin::isEnabledBySettings): Added.
+        * Modules/plugins/QuickTimePluginReplacement.h: Declare a static member function.
+        * Modules/plugins/QuickTimePluginReplacement.mm:
+        (WebCore::QuickTimePluginReplacement::registerPluginReplacement): Properly create a ReplacementPlugin instance.
+        (WebCore::QuickTimePluginReplacement::isEnabledBySettings): Added.
+        * Modules/plugins/YouTubePluginReplacement.cpp:
+        (WebCore::YouTubePluginReplacement::registerPluginReplacement): Properly create a ReplacementPlugin instance.
+        (WebCore::YouTubePluginReplacement::isEnabledBySettings): Added.
+        * Modules/plugins/YouTubePluginReplacement.h: Declare a static member function.
+        * html/HTMLPlugInElement.cpp:
+        (WebCore::HTMLPlugInElement::requestObject): Ask the ReplacementPlugin whether it's enabled, rather than assume
+            all plug-in replacement is guarded by a single run-time setting.
+        * page/Settings.cpp: Declare values for defaults for both settings.
+        * page/Settings.in: Declare two settings.
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::Backup::Backup): Handle both settings.
+        (WebCore::InternalSettings::Backup::restoreTo): Ditto.
+        (WebCore::InternalSettings::setQuickTimePluginReplacementEnabled): Added.
+        (WebCore::InternalSettings::setYouTubeFlashPluginReplacementEnabled): Added.
+        (WebCore::InternalSettings::setPluginReplacementEnabled): Deleted.
+        * testing/InternalSettings.h: Duplicate and rename.
+        * testing/InternalSettings.idl: Ditto.
+
 2016-08-31  Yoav Weiss  <yoav@yoav.ws>
 
         Add event support for link preload.
index 84b604c..e444edc 100644 (file)
@@ -38,6 +38,7 @@ class HTMLPlugInElement;
 class RenderElement;
 class RenderStyle;
 class RenderTreePosition;
+class Settings;
 class ShadowRoot;
 class URL;
 
@@ -56,14 +57,16 @@ typedef Ref<PluginReplacement> (*CreatePluginReplacement)(HTMLPlugInElement&, co
 typedef bool (*PluginReplacementSupportsType)(const String&);
 typedef bool (*PluginReplacementSupportsFileExtension)(const String&);
 typedef bool (*PluginReplacementSupportsURL)(const URL&);
-    
+typedef bool (*PluginReplacementEnabledForSettings)(const Settings*);
+
 class ReplacementPlugin {
 public:
-    ReplacementPlugin(CreatePluginReplacement constructor, PluginReplacementSupportsType supportsType, PluginReplacementSupportsFileExtension supportsFileExtension, PluginReplacementSupportsURL supportsURL)
+    ReplacementPlugin(CreatePluginReplacement constructor, PluginReplacementSupportsType supportsType, PluginReplacementSupportsFileExtension supportsFileExtension, PluginReplacementSupportsURL supportsURL, PluginReplacementEnabledForSettings isEnabledBySettings)
         : m_constructor(constructor)
         , m_supportsType(supportsType)
         , m_supportsFileExtension(supportsFileExtension)
         , m_supportsURL(supportsURL)
+        , m_isEnabledBySettings(isEnabledBySettings)
     {
     }
 
@@ -72,6 +75,7 @@ public:
         , m_supportsType(other.m_supportsType)
         , m_supportsFileExtension(other.m_supportsFileExtension)
         , m_supportsURL(other.m_supportsURL)
+        , m_isEnabledBySettings(other.m_isEnabledBySettings)
     {
     }
 
@@ -79,12 +83,14 @@ public:
     bool supportsType(const String& mimeType) const { return m_supportsType(mimeType); }
     bool supportsFileExtension(const String& extension) const { return m_supportsFileExtension(extension); }
     bool supportsURL(const URL& url) const { return m_supportsURL(url); }
-    
+    bool isEnabledBySettings(const Settings* settings) const { return m_isEnabledBySettings(settings); };
+
 private:
     CreatePluginReplacement m_constructor;
     PluginReplacementSupportsType m_supportsType;
     PluginReplacementSupportsFileExtension m_supportsFileExtension;
     PluginReplacementSupportsURL m_supportsURL;
+    PluginReplacementEnabledForSettings m_isEnabledBySettings;
 };
 
 typedef void (*PluginReplacementRegistrar)(const ReplacementPlugin&);
index 522e945..c7a15f0 100644 (file)
@@ -49,6 +49,7 @@ private:
     static bool supportsMimeType(const String&);
     static bool supportsFileExtension(const String&);
     static bool supportsURL(const URL&) { return true; }
+    static bool isEnabledBySettings(const Settings*);
 
     bool installReplacement(ShadowRoot&) final;
     JSC::JSObject* scriptObject() final { return m_scriptObject; }
index 08650ab..bffb4f2 100644 (file)
@@ -42,6 +42,7 @@
 #import "RenderElement.h"
 #import "ScriptController.h"
 #import "ScriptSourceCode.h"
+#import "Settings.h"
 #import "UserAgentScripts.h"
 #import <objc/runtime.h>
 #import <AVFoundation/AVFoundation.h>
@@ -72,7 +73,7 @@ static String quickTimePluginReplacementScript()
 
 void QuickTimePluginReplacement::registerPluginReplacement(PluginReplacementRegistrar registrar)
 {
-    registrar(ReplacementPlugin(create, supportsMimeType, supportsFileExtension, supportsURL));
+    registrar(ReplacementPlugin(create, supportsMimeType, supportsFileExtension, supportsURL, isEnabledBySettings));
 }
 
 Ref<PluginReplacement> QuickTimePluginReplacement::create(HTMLPlugInElement& plugin, const Vector<String>& paramNames, const Vector<String>& paramValues)
@@ -114,6 +115,11 @@ bool QuickTimePluginReplacement::supportsFileExtension(const String& extension)
     return extensionSet.get().contains(extension);
 }
 
+bool QuickTimePluginReplacement::isEnabledBySettings(const Settings* settings)
+{
+    return settings->quickTimePluginReplacementEnabled();
+}
+
 QuickTimePluginReplacement::QuickTimePluginReplacement(HTMLPlugInElement& plugin, const Vector<String>& paramNames, const Vector<String>& paramValues)
     :PluginReplacement()
     , m_parentElement(&plugin)
index 6b98cc5..576ab3e 100644 (file)
@@ -32,6 +32,7 @@
 #include "HTMLPlugInElement.h"
 #include "Page.h"
 #include "RenderElement.h"
+#include "Settings.h"
 #include "ShadowRoot.h"
 #include "YouTubeEmbedShadowElement.h"
 #include <wtf/text/StringBuilder.h>
@@ -40,7 +41,7 @@ namespace WebCore {
 
 void YouTubePluginReplacement::registerPluginReplacement(PluginReplacementRegistrar registrar)
 {
-    registrar(ReplacementPlugin(create, supportsMimeType, supportsFileExtension, supportsURL));
+    registrar(ReplacementPlugin(create, supportsMimeType, supportsFileExtension, supportsURL, isEnabledBySettings));
 }
 
 Ref<PluginReplacement> YouTubePluginReplacement::create(HTMLPlugInElement& plugin, const Vector<String>& paramNames, const Vector<String>& paramValues)
@@ -344,5 +345,10 @@ bool YouTubePluginReplacement::supportsURL(const URL& url)
 {
     return isYouTubeURL(url);
 }
+
+bool YouTubePluginReplacement::isEnabledBySettings(const Settings* settings)
+{
+    return settings->youTubeFlashPluginReplacementEnabled();
+}
     
 }
index fc77261..327ac7a 100644 (file)
@@ -46,6 +46,7 @@ private:
     static bool supportsMimeType(const String&);
     static bool supportsFileExtension(const String&);
     static bool supportsURL(const URL&);
+    static bool isEnabledBySettings(const Settings*);
 
     bool installReplacement(ShadowRoot&) final;
 
index ccdfb60..8a09280 100644 (file)
@@ -374,9 +374,6 @@ static ReplacementPlugin* pluginReplacementForType(const URL& url, const String&
 
 bool HTMLPlugInElement::requestObject(const String& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues)
 {
-    if (!document().settings()->pluginReplacementEnabled())
-        return false;
-
     if (m_pluginReplacement)
         return true;
 
@@ -385,7 +382,7 @@ bool HTMLPlugInElement::requestObject(const String& url, const String& mimeType,
         completedURL = document().completeURL(url);
 
     ReplacementPlugin* replacement = pluginReplacementForType(completedURL, mimeType);
-    if (!replacement)
+    if (!replacement || !replacement->isEnabledBySettings(document().settings()))
         return false;
 
     LOG(Plugins, "%p - Found plug-in replacement for %s.", this, completedURL.string().utf8().data());
index 0d1f1a1..3b58b14 100644 (file)
@@ -145,7 +145,8 @@ static const bool defaultShouldRespectImageOrientation = true;
 static const bool defaultImageSubsamplingEnabled = true;
 static const bool defaultScrollingTreeIncludesFrames = true;
 static const bool defaultMediaControlsScaleWithPageZoom = true;
-static const bool defaultPluginReplacementEnabled = true;
+static const bool defaultQuickTimePluginReplacementEnabled = true;
+static const bool defaultYouTubeFlashPluginReplacementEnabled = true;
 #else
 static const bool defaultFixedPositionCreatesStackingContext = false;
 static const bool defaultFixedBackgroundsPaintRelativeToDocument = false;
@@ -159,7 +160,8 @@ static const bool defaultShouldRespectImageOrientation = false;
 static const bool defaultImageSubsamplingEnabled = false;
 static const bool defaultScrollingTreeIncludesFrames = false;
 static const bool defaultMediaControlsScaleWithPageZoom = true;
-static const bool defaultPluginReplacementEnabled = false;
+static const bool defaultQuickTimePluginReplacementEnabled = false;
+static const bool defaultYouTubeFlashPluginReplacementEnabled = false;
 #endif
 
 static const bool defaultAllowsPictureInPictureMediaPlayback = true;
index 7350b34..97aef1c 100644 (file)
@@ -280,4 +280,5 @@ treatIPAddressAsDomain initial=false
 # Runtime-enabled features
 visualViewportEnabled initial=false
 
-pluginReplacementEnabled initial=defaultPluginReplacementEnabled
+quickTimePluginReplacementEnabled initial=defaultQuickTimePluginReplacementEnabled
+youTubeFlashPluginReplacementEnabled initial=defaultYouTubeFlashPluginReplacementEnabled
index f0e8592..aa95c68 100644 (file)
@@ -91,7 +91,8 @@ InternalSettings::Backup::Backup(Settings& settings)
     , m_originalTimeWithoutMouseMovementBeforeHidingControls(settings.timeWithoutMouseMovementBeforeHidingControls())
     , m_useLegacyBackgroundSizeShorthandBehavior(settings.useLegacyBackgroundSizeShorthandBehavior())
     , m_autoscrollForDragAndDropEnabled(settings.autoscrollForDragAndDropEnabled())
-    , m_pluginReplacementEnabled(settings.pluginReplacementEnabled())
+    , m_quickTimePluginReplacementEnabled(settings.quickTimePluginReplacementEnabled())
+    , m_youTubeFlashPluginReplacementEnabled(settings.youTubeFlashPluginReplacementEnabled())
     , m_shouldConvertPositionStyleOnCopy(settings.shouldConvertPositionStyleOnCopy())
     , m_fontFallbackPrefersPictographs(settings.fontFallbackPrefersPictographs())
     , m_webFontsAlwaysFallBack(settings.webFontsAlwaysFallBack())
@@ -183,7 +184,8 @@ void InternalSettings::Backup::restoreTo(Settings& settings)
     settings.setAllowsInlineMediaPlayback(m_allowsInlineMediaPlayback);
     settings.setAllowsInlineMediaPlaybackAfterFullscreen(m_allowsInlineMediaPlaybackAfterFullscreen);
     settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(m_inlineMediaPlaybackRequiresPlaysInlineAttribute);
-    settings.setPluginReplacementEnabled(m_pluginReplacementEnabled);
+    settings.setQuickTimePluginReplacementEnabled(m_quickTimePluginReplacementEnabled);
+    settings.setYouTubeFlashPluginReplacementEnabled(m_youTubeFlashPluginReplacementEnabled);
 #if ENABLE(INDEXED_DATABASE_IN_WORKERS)
     RuntimeEnabledFeatures::sharedFeatures().setIndexedDBWorkersEnabled(m_indexedDBWorkersEnabled);
 #endif
@@ -548,10 +550,16 @@ void InternalSettings::setWebFontsAlwaysFallBack(bool enable, ExceptionCode& ec)
     settings()->setWebFontsAlwaysFallBack(enable);
 }
 
-void InternalSettings::setPluginReplacementEnabled(bool enabled, ExceptionCode& ec)
+void InternalSettings::setQuickTimePluginReplacementEnabled(bool enabled, ExceptionCode& ec)
 {
     InternalSettingsGuardForSettings();
-    settings()->setPluginReplacementEnabled(enabled);
+    settings()->setQuickTimePluginReplacementEnabled(enabled);
+}
+
+void InternalSettings::setYouTubeFlashPluginReplacementEnabled(bool enabled, ExceptionCode& ec)
+{
+    InternalSettingsGuardForSettings();
+    settings()->setYouTubeFlashPluginReplacementEnabled(enabled);
 }
 
 void InternalSettings::setBackgroundShouldExtendBeyondPage(bool hasExtendedBackground, ExceptionCode& ec)
index cb925a5..946a9c2 100644 (file)
@@ -91,7 +91,8 @@ public:
         bool m_originalTimeWithoutMouseMovementBeforeHidingControls;
         bool m_useLegacyBackgroundSizeShorthandBehavior;
         bool m_autoscrollForDragAndDropEnabled;
-        bool m_pluginReplacementEnabled;
+        bool m_quickTimePluginReplacementEnabled;
+        bool m_youTubeFlashPluginReplacementEnabled;
         bool m_shouldConvertPositionStyleOnCopy;
         bool m_fontFallbackPrefersPictographs;
         bool m_webFontsAlwaysFallBack;
@@ -156,7 +157,8 @@ public:
     void setAutoscrollForDragAndDropEnabled(bool, ExceptionCode&);
     void setFontFallbackPrefersPictographs(bool, ExceptionCode&);
     void setWebFontsAlwaysFallBack(bool, ExceptionCode&);
-    void setPluginReplacementEnabled(bool, ExceptionCode&);
+    void setQuickTimePluginReplacementEnabled(bool, ExceptionCode&);
+    void setYouTubeFlashPluginReplacementEnabled(bool, ExceptionCode&);
     void setBackgroundShouldExtendBeyondPage(bool, ExceptionCode&);
     void setShouldConvertPositionStyleOnCopy(bool, ExceptionCode&);
     void setScrollingTreeIncludesFrames(bool, ExceptionCode&);
index 982e3a9..7ef597a 100644 (file)
@@ -57,7 +57,8 @@
 
     [RaisesException] void setForcePendingWebGLPolicy(boolean forced);
 
-    [RaisesException] void setPluginReplacementEnabled(boolean enabled);
+    [RaisesException] void setQuickTimePluginReplacementEnabled(boolean enabled);
+    [RaisesException] void setYouTubeFlashPluginReplacementEnabled(boolean enabled);
 
     // Editing, forms
     [RaisesException] void setEditingBehavior(DOMString behavior);