Diff
Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (207593 => 207594)
--- branches/safari-602-branch/Source/WebCore/ChangeLog 2016-10-20 09:59:02 UTC (rev 207593)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog 2016-10-20 09:59:07 UTC (rev 207594)
@@ -1,5 +1,37 @@
2016-10-20 Matthew Hanson <matthew_han...@apple.com>
+ Merge r205214. rdar://problem/28476952
+
+ 2016-08-30 Ricky Mondello <rmonde...@apple.com>
+
+ "pluginReplacementEnabled" should be a Setting, not a RuntimeEnabledFeature
+ https://bugs.webkit.org/show_bug.cgi?id=161416
+ <rdar://problem/28050847>
+
+ Reviewed by Simon Fraser.
+
+ Mostly mechanical. Tested by running LayoutTests/plugins/quicktime-plugin-replacement.html and manually toggling
+ defaultPluginReplacementEnabled and observing a behavior change.
+
+ * bindings/generic/RuntimeEnabledFeatures.cpp:
+ (WebCore::RuntimeEnabledFeatures::reset): Purged of the pluginReplacementEnabled setting.
+ * bindings/generic/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setPluginReplacementEnabled): Deleted.
+ (WebCore::RuntimeEnabledFeatures::pluginReplacementEnabled): Deleted.
+ * html/HTMLPlugInElement.cpp:
+ (WebCore::HTMLPlugInElement::requestObject): Use the setting.
+ * page/Settings.cpp: Supply different values for iOS and other platforms, matching the RuntimeEnabledFeature values,
+ enabled for iOS and disabled otherwise.
+ * page/Settings.in: Declare the setting.
+ * testing/InternalSettings.cpp:
+ (WebCore::InternalSettings::Backup::Backup): Use the setting.
+ (WebCore::InternalSettings::Backup::restoreTo): Ditto.
+ (WebCore::InternalSettings::setPluginReplacementEnabled): Ditto.
+ * testing/InternalSettings.h: Can now throw an exception, like other Settings-backed members.
+ * testing/InternalSettings.idl: Declare this as possibly throwing an exception.
+
+2016-10-20 Matthew Hanson <matthew_han...@apple.com>
+
Merge r205212. rdar://problem/28476952
2016-08-30 Ricky Mondello <rmonde...@apple.com>
Modified: branches/safari-602-branch/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp (207593 => 207594)
--- branches/safari-602-branch/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp 2016-10-20 09:59:02 UTC (rev 207593)
+++ branches/safari-602-branch/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp 2016-10-20 09:59:07 UTC (rev 207594)
@@ -57,11 +57,6 @@
m_isDeviceOrientationEnabled = true;
m_isLinkPreloadEnabled = false;
m_isLangAttributeAwareFormControlUIEnabled = false;
-#if PLATFORM(IOS)
- m_isPluginReplacementEnabled = true;
-#else
- m_isPluginReplacementEnabled = false;
-#endif
m_isResourceTimingEnabled = false;
#if ENABLE(INDEXED_DATABASE)
m_isIndexedDBEnabled = true;
Modified: branches/safari-602-branch/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h (207593 => 207594)
--- branches/safari-602-branch/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h 2016-10-20 09:59:02 UTC (rev 207593)
+++ branches/safari-602-branch/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h 2016-10-20 09:59:07 UTC (rev 207594)
@@ -177,9 +177,6 @@
// The lang attribute support is incomplete and should only be turned on for tests.
void setLangAttributeAwareFormControlUIEnabled(bool isEnabled) { m_isLangAttributeAwareFormControlUIEnabled = isEnabled; }
- void setPluginReplacementEnabled(bool isEnabled) { m_isPluginReplacementEnabled = isEnabled; }
- bool pluginReplacementEnabled() const { return m_isPluginReplacementEnabled; }
-
void setResourceTimingEnabled(bool isEnabled) { m_isResourceTimingEnabled = isEnabled; }
bool resourceTimingEnabled() const { return m_isResourceTimingEnabled; }
@@ -246,7 +243,6 @@
bool m_isDeviceOrientationEnabled;
bool m_isLinkPreloadEnabled;
bool m_isLangAttributeAwareFormControlUIEnabled;
- bool m_isPluginReplacementEnabled;
bool m_isResourceTimingEnabled;
#if ENABLE(INDEXED_DATABASE)
Modified: branches/safari-602-branch/Source/WebCore/html/HTMLPlugInElement.cpp (207593 => 207594)
--- branches/safari-602-branch/Source/WebCore/html/HTMLPlugInElement.cpp 2016-10-20 09:59:02 UTC (rev 207593)
+++ branches/safari-602-branch/Source/WebCore/html/HTMLPlugInElement.cpp 2016-10-20 09:59:07 UTC (rev 207594)
@@ -403,7 +403,7 @@
bool HTMLPlugInElement::requestObject(const String& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues)
{
- if (!RuntimeEnabledFeatures::sharedFeatures().pluginReplacementEnabled())
+ if (!document().settings()->pluginReplacementEnabled())
return false;
if (m_pluginReplacement)
Modified: branches/safari-602-branch/Source/WebCore/page/Settings.cpp (207593 => 207594)
--- branches/safari-602-branch/Source/WebCore/page/Settings.cpp 2016-10-20 09:59:02 UTC (rev 207593)
+++ branches/safari-602-branch/Source/WebCore/page/Settings.cpp 2016-10-20 09:59:07 UTC (rev 207594)
@@ -146,6 +146,7 @@
static const bool defaultImageSubsamplingEnabled = true;
static const bool defaultScrollingTreeIncludesFrames = true;
static const bool defaultMediaControlsScaleWithPageZoom = true;
+static const bool defaultPluginReplacementEnabled = true;
#else
static const bool defaultFixedPositionCreatesStackingContext = false;
static const bool defaultFixedBackgroundsPaintRelativeToDocument = false;
@@ -159,6 +160,7 @@
static const bool defaultImageSubsamplingEnabled = false;
static const bool defaultScrollingTreeIncludesFrames = false;
static const bool defaultMediaControlsScaleWithPageZoom = true;
+static const bool defaultPluginReplacementEnabled = false;
#endif
static const bool defaultAllowsPictureInPictureMediaPlayback = true;
Modified: branches/safari-602-branch/Source/WebCore/page/Settings.in (207593 => 207594)
--- branches/safari-602-branch/Source/WebCore/page/Settings.in 2016-10-20 09:59:02 UTC (rev 207593)
+++ branches/safari-602-branch/Source/WebCore/page/Settings.in 2016-10-20 09:59:07 UTC (rev 207594)
@@ -272,3 +272,5 @@
shouldConvertInvalidURLsToBlank initial=true
springTimingFunctionEnabled initial=false
+
+pluginReplacementEnabled initial=defaultPluginReplacementEnabled
Modified: branches/safari-602-branch/Source/WebCore/testing/InternalSettings.cpp (207593 => 207594)
--- branches/safari-602-branch/Source/WebCore/testing/InternalSettings.cpp 2016-10-20 09:59:02 UTC (rev 207593)
+++ branches/safari-602-branch/Source/WebCore/testing/InternalSettings.cpp 2016-10-20 09:59:07 UTC (rev 207594)
@@ -91,7 +91,7 @@
, m_originalTimeWithoutMouseMovementBeforeHidingControls(settings.timeWithoutMouseMovementBeforeHidingControls())
, m_useLegacyBackgroundSizeShorthandBehavior(settings.useLegacyBackgroundSizeShorthandBehavior())
, m_autoscrollForDragAndDropEnabled(settings.autoscrollForDragAndDropEnabled())
- , m_pluginReplacementEnabled(RuntimeEnabledFeatures::sharedFeatures().pluginReplacementEnabled())
+ , m_pluginReplacementEnabled(settings.pluginReplacementEnabled())
, m_shouldConvertPositionStyleOnCopy(settings.shouldConvertPositionStyleOnCopy())
, m_fontFallbackPrefersPictographs(settings.fontFallbackPrefersPictographs())
, m_webFontsAlwaysFallBack(settings.webFontsAlwaysFallBack())
@@ -183,7 +183,7 @@
settings.setAllowsInlineMediaPlayback(m_allowsInlineMediaPlayback);
settings.setAllowsInlineMediaPlaybackAfterFullscreen(m_allowsInlineMediaPlaybackAfterFullscreen);
settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(m_inlineMediaPlaybackRequiresPlaysInlineAttribute);
- RuntimeEnabledFeatures::sharedFeatures().setPluginReplacementEnabled(m_pluginReplacementEnabled);
+ settings.setPluginReplacementEnabled(m_pluginReplacementEnabled);
#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
RuntimeEnabledFeatures::sharedFeatures().setIndexedDBWorkersEnabled(m_indexedDBWorkersEnabled);
#endif
@@ -548,9 +548,10 @@
settings()->setWebFontsAlwaysFallBack(enable);
}
-void InternalSettings::setPluginReplacementEnabled(bool enabled)
+void InternalSettings::setPluginReplacementEnabled(bool enabled, ExceptionCode& ec)
{
- RuntimeEnabledFeatures::sharedFeatures().setPluginReplacementEnabled(enabled);
+ InternalSettingsGuardForSettings();
+ settings()->setPluginReplacementEnabled(enabled);
}
void InternalSettings::setBackgroundShouldExtendBeyondPage(bool hasExtendedBackground, ExceptionCode& ec)
Modified: branches/safari-602-branch/Source/WebCore/testing/InternalSettings.h (207593 => 207594)
--- branches/safari-602-branch/Source/WebCore/testing/InternalSettings.h 2016-10-20 09:59:02 UTC (rev 207593)
+++ branches/safari-602-branch/Source/WebCore/testing/InternalSettings.h 2016-10-20 09:59:07 UTC (rev 207594)
@@ -156,7 +156,7 @@
void setAutoscrollForDragAndDropEnabled(bool, ExceptionCode&);
void setFontFallbackPrefersPictographs(bool, ExceptionCode&);
void setWebFontsAlwaysFallBack(bool, ExceptionCode&);
- void setPluginReplacementEnabled(bool);
+ void setPluginReplacementEnabled(bool, ExceptionCode&);
void setBackgroundShouldExtendBeyondPage(bool, ExceptionCode&);
void setShouldConvertPositionStyleOnCopy(bool, ExceptionCode&);
void setScrollingTreeIncludesFrames(bool, ExceptionCode&);
Modified: branches/safari-602-branch/Source/WebCore/testing/InternalSettings.idl (207593 => 207594)
--- branches/safari-602-branch/Source/WebCore/testing/InternalSettings.idl 2016-10-20 09:59:02 UTC (rev 207593)
+++ branches/safari-602-branch/Source/WebCore/testing/InternalSettings.idl 2016-10-20 09:59:07 UTC (rev 207594)
@@ -57,7 +57,7 @@
[RaisesException] void setForcePendingWebGLPolicy(boolean forced);
- void setPluginReplacementEnabled(boolean enabled);
+ [RaisesException] void setPluginReplacementEnabled(boolean enabled);
// Editing, forms
[RaisesException] void setEditingBehavior(DOMString behavior);