Title: [207595] branches/safari-602-branch
Revision
207595
Author
matthew_han...@apple.com
Date
2016-10-20 02:59:15 -0700 (Thu, 20 Oct 2016)

Log Message

Merge r205271. rdar://problem/28476952

Modified Paths

Diff

Modified: branches/safari-602-branch/LayoutTests/ChangeLog (207594 => 207595)


--- branches/safari-602-branch/LayoutTests/ChangeLog	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/LayoutTests/ChangeLog	2016-10-20 09:59:15 UTC (rev 207595)
@@ -1,3 +1,25 @@
+2016-10-20  Matthew Hanson  <matthew_han...@apple.com>
+
+        Merge r205271. rdar://problem/28476952
+
+    2016-08-31  Ricky Mondello  <rmonde...@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-10-14  Ryan Haddad  <ryanhad...@apple.com>
 
         Merge r203602.

Modified: branches/safari-602-branch/LayoutTests/plugins/quicktime-plugin-replacement.html (207594 => 207595)


--- branches/safari-602-branch/LayoutTests/plugins/quicktime-plugin-replacement.html	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/LayoutTests/plugins/quicktime-plugin-replacement.html	2016-10-20 09:59:15 UTC (rev 207595)
@@ -111,7 +111,7 @@
                 if (window.testRunner) {
                     window.testRunner.waitUntilDone();
                     window.testRunner.dumpAsText()
-                    window.internals.settings.setPluginReplacementEnabled(true);
+                    window.internals.settings.setQuickTimePluginReplacementEnabled(true);
                 }
 
                 div = document.getElementById("parent");

Modified: branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/object-src-none-blocks-quicktime-plugin-replacement.html (207594 => 207595)


--- branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/object-src-none-blocks-quicktime-plugin-replacement.html	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/object-src-none-blocks-quicktime-plugin-replacement.html	2016-10-20 09:59:15 UTC (rev 207595)
@@ -9,7 +9,7 @@
 }
 
 if (window.internals)
-    window.internals.settings.setPluginReplacementEnabled(true);
+    window.internals.settings.setQuickTimePluginReplacementEnabled(true);
 
 function done()
 {

Modified: branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html (207594 => 207595)


--- branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html	2016-10-20 09:59:15 UTC (rev 207595)
@@ -9,7 +9,7 @@
 }
 
 if (window.internals)
-    window.internals.settings.setPluginReplacementEnabled(true);
+    window.internals.settings.setYouTubeFlashPluginReplacementEnabled(true);
 
 function done()
 {

Modified: branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-allows-quicktime-plugin-replacement.html (207594 => 207595)


--- branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-allows-quicktime-plugin-replacement.html	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-allows-quicktime-plugin-replacement.html	2016-10-20 09:59:15 UTC (rev 207595)
@@ -9,7 +9,7 @@
 }
 
 if (window.internals)
-    window.internals.settings.setPluginReplacementEnabled(true);
+    window.internals.settings.setQuickTimePluginReplacementEnabled(true);
 </script>
 </head>
 <body>

Modified: branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html (207594 => 207595)


--- branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html	2016-10-20 09:59:15 UTC (rev 207595)
@@ -9,7 +9,7 @@
 }
 
 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 () {

Modified: branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement-without-mime-type.html (207594 => 207595)


--- branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement-without-mime-type.html	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement-without-mime-type.html	2016-10-20 09:59:15 UTC (rev 207595)
@@ -9,7 +9,7 @@
 }
 
 if (window.internals)
-    window.internals.settings.setPluginReplacementEnabled(true);
+    window.internals.settings.setQuickTimePluginReplacementEnabled(true);
 
 function done()
 {

Modified: branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement.html (207594 => 207595)


--- branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement.html	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement.html	2016-10-20 09:59:15 UTC (rev 207595)
@@ -9,7 +9,7 @@
 }
 
 if (window.internals)
-    window.internals.settings.setPluginReplacementEnabled(true);
+    window.internals.settings.setQuickTimePluginReplacementEnabled(true);
 
 function done()
 {

Modified: branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html (207594 => 207595)


--- branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html	2016-10-20 09:59:15 UTC (rev 207595)
@@ -9,7 +9,7 @@
 }
 
 if (window.internals)
-    window.internals.settings.setPluginReplacementEnabled(true);
+    window.internals.settings.setYouTubeFlashPluginReplacementEnabled(true);
 
 function done()
 {

Modified: branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html (207594 => 207595)


--- branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html	2016-10-20 09:59:15 UTC (rev 207595)
@@ -9,7 +9,7 @@
 }
 
 if (window.internals)
-    window.internals.settings.setPluginReplacementEnabled(true);
+    window.internals.settings.setYouTubeFlashPluginReplacementEnabled(true);
 
 function done()
 {

Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (207594 => 207595)


--- branches/safari-602-branch/Source/WebCore/ChangeLog	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog	2016-10-20 09:59:15 UTC (rev 207595)
@@ -1,5 +1,46 @@
 2016-10-20  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r205271. rdar://problem/28476952
+
+    2016-08-31  Ricky Mondello  <rmonde...@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-10-20  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r205214. rdar://problem/28476952
 
     2016-08-30  Ricky Mondello  <rmonde...@apple.com>

Modified: branches/safari-602-branch/Source/WebCore/Modules/plugins/PluginReplacement.h (207594 => 207595)


--- branches/safari-602-branch/Source/WebCore/Modules/plugins/PluginReplacement.h	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/Source/WebCore/Modules/plugins/PluginReplacement.h	2016-10-20 09:59:15 UTC (rev 207595)
@@ -38,6 +38,7 @@
 class RenderElement;
 class RenderStyle;
 class RenderTreePosition;
+class Settings;
 class ShadowRoot;
 class URL;
 
@@ -56,14 +57,16 @@
 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 @@
         , m_supportsType(other.m_supportsType)
         , m_supportsFileExtension(other.m_supportsFileExtension)
         , m_supportsURL(other.m_supportsURL)
+        , m_isEnabledBySettings(other.m_isEnabledBySettings)
     {
     }
 
@@ -79,12 +83,14 @@
     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&);

Modified: branches/safari-602-branch/Source/WebCore/Modules/plugins/QuickTimePluginReplacement.h (207594 => 207595)


--- branches/safari-602-branch/Source/WebCore/Modules/plugins/QuickTimePluginReplacement.h	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/Source/WebCore/Modules/plugins/QuickTimePluginReplacement.h	2016-10-20 09:59:15 UTC (rev 207595)
@@ -49,6 +49,7 @@
     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; }

Modified: branches/safari-602-branch/Source/WebCore/Modules/plugins/QuickTimePluginReplacement.mm (207594 => 207595)


--- branches/safari-602-branch/Source/WebCore/Modules/plugins/QuickTimePluginReplacement.mm	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/Source/WebCore/Modules/plugins/QuickTimePluginReplacement.mm	2016-10-20 09:59:15 UTC (rev 207595)
@@ -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 @@
 
 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 @@
     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)

Modified: branches/safari-602-branch/Source/WebCore/Modules/plugins/YouTubePluginReplacement.cpp (207594 => 207595)


--- branches/safari-602-branch/Source/WebCore/Modules/plugins/YouTubePluginReplacement.cpp	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/Source/WebCore/Modules/plugins/YouTubePluginReplacement.cpp	2016-10-20 09:59:15 UTC (rev 207595)
@@ -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 @@
 
 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 @@
 {
     return isYouTubeURL(url);
 }
+
+bool YouTubePluginReplacement::isEnabledBySettings(const Settings* settings)
+{
+    return settings->youTubeFlashPluginReplacementEnabled();
+}
     
 }

Modified: branches/safari-602-branch/Source/WebCore/Modules/plugins/YouTubePluginReplacement.h (207594 => 207595)


--- branches/safari-602-branch/Source/WebCore/Modules/plugins/YouTubePluginReplacement.h	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/Source/WebCore/Modules/plugins/YouTubePluginReplacement.h	2016-10-20 09:59:15 UTC (rev 207595)
@@ -46,6 +46,7 @@
     static bool supportsMimeType(const String&);
     static bool supportsFileExtension(const String&);
     static bool supportsURL(const URL&);
+    static bool isEnabledBySettings(const Settings*);
 
     bool installReplacement(ShadowRoot&) final;
 

Modified: branches/safari-602-branch/Source/WebCore/html/HTMLPlugInElement.cpp (207594 => 207595)


--- branches/safari-602-branch/Source/WebCore/html/HTMLPlugInElement.cpp	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/Source/WebCore/html/HTMLPlugInElement.cpp	2016-10-20 09:59:15 UTC (rev 207595)
@@ -403,9 +403,6 @@
 
 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;
 
@@ -414,7 +411,7 @@
         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());

Modified: branches/safari-602-branch/Source/WebCore/page/Settings.cpp (207594 => 207595)


--- branches/safari-602-branch/Source/WebCore/page/Settings.cpp	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/Source/WebCore/page/Settings.cpp	2016-10-20 09:59:15 UTC (rev 207595)
@@ -146,7 +146,8 @@
 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;
@@ -160,7 +161,8 @@
 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;

Modified: branches/safari-602-branch/Source/WebCore/page/Settings.in (207594 => 207595)


--- branches/safari-602-branch/Source/WebCore/page/Settings.in	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/Source/WebCore/page/Settings.in	2016-10-20 09:59:15 UTC (rev 207595)
@@ -273,4 +273,5 @@
 
 springTimingFunctionEnabled initial=false
 
-pluginReplacementEnabled initial=defaultPluginReplacementEnabled
+quickTimePluginReplacementEnabled initial=defaultQuickTimePluginReplacementEnabled
+youTubeFlashPluginReplacementEnabled initial=defaultYouTubeFlashPluginReplacementEnabled

Modified: branches/safari-602-branch/Source/WebCore/testing/InternalSettings.cpp (207594 => 207595)


--- branches/safari-602-branch/Source/WebCore/testing/InternalSettings.cpp	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/Source/WebCore/testing/InternalSettings.cpp	2016-10-20 09:59:15 UTC (rev 207595)
@@ -91,7 +91,8 @@
     , 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 @@
     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,12 +550,18 @@
     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)
 {
     InternalSettingsGuardForSettings();

Modified: branches/safari-602-branch/Source/WebCore/testing/InternalSettings.h (207594 => 207595)


--- branches/safari-602-branch/Source/WebCore/testing/InternalSettings.h	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/Source/WebCore/testing/InternalSettings.h	2016-10-20 09:59:15 UTC (rev 207595)
@@ -91,7 +91,8 @@
         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 @@
     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&);

Modified: branches/safari-602-branch/Source/WebCore/testing/InternalSettings.idl (207594 => 207595)


--- branches/safari-602-branch/Source/WebCore/testing/InternalSettings.idl	2016-10-20 09:59:07 UTC (rev 207594)
+++ branches/safari-602-branch/Source/WebCore/testing/InternalSettings.idl	2016-10-20 09:59:15 UTC (rev 207595)
@@ -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);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to