Diff
Modified: trunk/Source/WTF/ChangeLog (268667 => 268668)
--- trunk/Source/WTF/ChangeLog 2020-10-19 13:46:33 UTC (rev 268667)
+++ trunk/Source/WTF/ChangeLog 2020-10-19 15:36:08 UTC (rev 268668)
@@ -1,3 +1,12 @@
+2020-10-19 Antoine Quint <grao...@webkit.org>
+
+ Move remaining Web Animations runtime-enabled features to settings
+ https://bugs.webkit.org/show_bug.cgi?id=217903
+
+ Reviewed by Sam Weinig.
+
+ * Scripts/Preferences/WebPreferencesExperimental.yaml:
+
2020-10-18 David Kilzer <ddkil...@apple.com>
Fix -Wdeprecated-copy warnings in WTF and _javascript_Core
Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (268667 => 268668)
--- trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml 2020-10-19 13:46:33 UTC (rev 268667)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml 2020-10-19 15:36:08 UTC (rev 268668)
@@ -832,7 +832,6 @@
type: bool
humanReadableName: "Web Animations composite operations"
humanReadableDescription: "Support for the CompositeOperation enum and properties consuming it"
- webcoreBinding: RuntimeEnabledFeatures
defaultValue:
WebKitLegacy:
default: false
@@ -839,6 +838,8 @@
WebKit:
"ENABLE(EXPERIMENTAL_FEATURES)" : true
default: false
+ WebCore:
+ default: false
# FIXME: This is enabled when ENABLE(EXPERIMENTAL_FEATURES) is true in WebKit2. Perhaps we should consider using that for WebKitLegacy as well.
WebAnimationsMutableTimelinesEnabled:
@@ -845,7 +846,6 @@
type: bool
humanReadableName: "Web Animations mutable timelines"
humanReadableDescription: "Support for setting the timeline property of an Animation object"
- webcoreBinding: RuntimeEnabledFeatures
defaultValue:
WebKitLegacy:
default: false
@@ -852,6 +852,8 @@
WebKit:
"ENABLE(EXPERIMENTAL_FEATURES)" : true
default: false
+ WebCore:
+ default: false
# FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
WebAuthenticationEnabled:
Modified: trunk/Source/WebCore/ChangeLog (268667 => 268668)
--- trunk/Source/WebCore/ChangeLog 2020-10-19 13:46:33 UTC (rev 268667)
+++ trunk/Source/WebCore/ChangeLog 2020-10-19 15:36:08 UTC (rev 268668)
@@ -1,3 +1,23 @@
+2020-10-19 Antoine Quint <grao...@webkit.org>
+
+ Move remaining Web Animations runtime-enabled features to settings
+ https://bugs.webkit.org/show_bug.cgi?id=217903
+
+ Reviewed by Sam Weinig.
+
+ * animation/KeyframeEffect.cpp:
+ (WebCore::processKeyframeLikeObject):
+ (WebCore::processIterableKeyframes):
+ (WebCore::processPropertyIndexedKeyframes):
+ (WebCore::KeyframeEffect::getKeyframes):
+ * animation/KeyframeEffect.idl:
+ * animation/WebAnimation.idl:
+ * page/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setWebAnimationsCompositeOperationsEnabled): Deleted.
+ (WebCore::RuntimeEnabledFeatures::webAnimationsCompositeOperationsEnabled const): Deleted.
+ (WebCore::RuntimeEnabledFeatures::setWebAnimationsMutableTimelinesEnabled): Deleted.
+ (WebCore::RuntimeEnabledFeatures::webAnimationsMutableTimelinesEnabled const): Deleted.
+
2020-10-19 Antti Koivisto <an...@apple.com>
[LFC][Integration] Respect relayoutChildren flag
Modified: trunk/Source/WebCore/animation/KeyframeEffect.cpp (268667 => 268668)
--- trunk/Source/WebCore/animation/KeyframeEffect.cpp 2020-10-19 13:46:33 UTC (rev 268667)
+++ trunk/Source/WebCore/animation/KeyframeEffect.cpp 2020-10-19 15:36:08 UTC (rev 268668)
@@ -52,7 +52,7 @@
#include "RenderBoxModelObject.h"
#include "RenderElement.h"
#include "RenderStyle.h"
-#include "RuntimeEnabledFeatures.h"
+#include "Settings.h"
#include "StyleAdjuster.h"
#include "StylePendingResources.h"
#include "StyleResolver.h"
@@ -219,8 +219,12 @@
else
baseProperties.offset = nullptr;
baseProperties.easing = baseKeyframe.easing;
- if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCompositeOperationsEnabled())
- baseProperties.composite = baseKeyframe.composite;
+
+ auto* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(&lexicalGlobalObject)->scriptExecutionContext();
+ if (is<Document>(scriptExecutionContext)) {
+ if (downcast<Document>(*scriptExecutionContext).settings().webAnimationsCompositeOperationsEnabled())
+ baseProperties.composite = baseKeyframe.composite;
+ }
}
RETURN_IF_EXCEPTION(scope, Exception { TypeError });
@@ -297,10 +301,11 @@
auto* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(&lexicalGlobalObject)->scriptExecutionContext();
if (!is<Document>(scriptExecutionContext))
return { };
- CSSParserContext parserContext(downcast<Document>(*scriptExecutionContext));
+ auto& document = downcast<Document>(*scriptExecutionContext);
+ CSSParserContext parserContext(document);
// 1. Let iter be GetIterator(object, method).
- forEachInIterable(lexicalGlobalObject, keyframesInput.get(), method, [&parsedKeyframes, &parserContext](VM& vm, JSGlobalObject& lexicalGlobalObject, JSValue nextValue) -> ExceptionOr<void> {
+ forEachInIterable(lexicalGlobalObject, keyframesInput.get(), method, [&parsedKeyframes, &document, &parserContext](VM& vm, JSGlobalObject& lexicalGlobalObject, JSValue nextValue) -> ExceptionOr<void> {
// Steps 2 through 6 are already implemented by forEachInIterable().
auto scope = DECLARE_THROW_SCOPE(vm);
if (!nextValue || !nextValue.isObject()) {
@@ -331,7 +336,7 @@
// When calling processKeyframeLikeObject() with the "allow lists" flag set to false, the only composite
// alternatives we should expect is CompositeOperationAuto.
- if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCompositeOperationsEnabled()) {
+ if (document.settings().webAnimationsCompositeOperationsEnabled()) {
ASSERT(WTF::holds_alternative<CompositeOperationOrAuto>(keyframeLikeObject.baseProperties.composite));
keyframeOutput.composite = WTF::get<CompositeOperationOrAuto>(keyframeLikeObject.baseProperties.composite);
}
@@ -365,7 +370,8 @@
auto* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(&lexicalGlobalObject)->scriptExecutionContext();
if (!is<Document>(scriptExecutionContext))
return { };
- CSSParserContext parserContext(downcast<Document>(*scriptExecutionContext));
+ auto& document = downcast<Document>(*scriptExecutionContext);
+ CSSParserContext parserContext(document);
// 2. For each member, m, in property-indexed keyframe, perform the following steps:
for (auto& m : propertyIndexedKeyframe.propertiesAndValues) {
@@ -474,7 +480,7 @@
parsedKeyframes[i].easing = easings[i];
// 12. If the “composite” member of the property-indexed keyframe is not an empty sequence:
- if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCompositeOperationsEnabled()) {
+ if (document.settings().webAnimationsCompositeOperationsEnabled()) {
Vector<CompositeOperationOrAuto> compositeModes;
if (WTF::holds_alternative<Vector<CompositeOperationOrAuto>>(propertyIndexedKeyframe.baseProperties.composite))
compositeModes = WTF::get<Vector<CompositeOperationOrAuto>>(propertyIndexedKeyframe.baseProperties.composite);
@@ -686,9 +692,13 @@
computedKeyframe.offset = parsedKeyframe.offset;
computedKeyframe.computedOffset = parsedKeyframe.computedOffset;
computedKeyframe.easing = timingFunctionForKeyframeAtIndex(i)->cssText();
- if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCompositeOperationsEnabled())
- computedKeyframe.composite = parsedKeyframe.composite;
+ auto* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(&lexicalGlobalObject)->scriptExecutionContext();
+ if (is<Document>(scriptExecutionContext)) {
+ if (downcast<Document>(*scriptExecutionContext).settings().webAnimationsCompositeOperationsEnabled())
+ computedKeyframe.composite = parsedKeyframe.composite;
+ }
+
auto outputKeyframe = convertDictionaryToJS(lexicalGlobalObject, *jsCast<JSDOMGlobalObject*>(&lexicalGlobalObject), computedKeyframe);
// 3. For each animation property-value pair specified on keyframe, declaration, perform the following steps:
Modified: trunk/Source/WebCore/animation/KeyframeEffect.idl (268667 => 268668)
--- trunk/Source/WebCore/animation/KeyframeEffect.idl 2020-10-19 13:46:33 UTC (rev 268667)
+++ trunk/Source/WebCore/animation/KeyframeEffect.idl 2020-10-19 15:36:08 UTC (rev 268668)
@@ -34,8 +34,8 @@
attribute Element? target;
[MayThrowException] attribute CSSOMString? pseudoElement;
- [EnabledAtRuntime=WebAnimationsCompositeOperations] attribute IterationCompositeOperation iterationComposite;
- [EnabledAtRuntime=WebAnimationsCompositeOperations] attribute CompositeOperation composite;
+ [EnabledBySetting=WebAnimationsCompositeOperations] attribute IterationCompositeOperation iterationComposite;
+ [EnabledBySetting=WebAnimationsCompositeOperations] attribute CompositeOperation composite;
[CallWith=GlobalObject, ImplementedAs=getBindingsKeyframes] sequence<object> getKeyframes();
[MayThrowException, CallWith=GlobalObject, ImplementedAs=setBindingsKeyframes] undefined setKeyframes(object? keyframes);
};
Modified: trunk/Source/WebCore/animation/WebAnimation.idl (268667 => 268668)
--- trunk/Source/WebCore/animation/WebAnimation.idl 2020-10-19 13:46:33 UTC (rev 268667)
+++ trunk/Source/WebCore/animation/WebAnimation.idl 2020-10-19 15:36:08 UTC (rev 268668)
@@ -47,7 +47,7 @@
attribute DOMString id;
[ImplementedAs=bindingsEffect] attribute AnimationEffect? effect;
- [RuntimeConditionallyReadWrite=WebAnimationsMutableTimelines] attribute AnimationTimeline? timeline;
+ [SettingsConditionallyReadWrite=WebAnimationsMutableTimelines] attribute AnimationTimeline? timeline;
[ImplementedAs=bindingsStartTime] attribute double? startTime;
[MayThrowException, ImplementedAs=bindingsCurrentTime] attribute double? currentTime;
attribute double playbackRate;
Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (268667 => 268668)
--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h 2020-10-19 13:46:33 UTC (rev 268667)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h 2020-10-19 15:36:08 UTC (rev 268668)
@@ -59,12 +59,6 @@
void setModernMediaControlsEnabled(bool areEnabled) { m_areModernMediaControlsEnabled = areEnabled; }
bool modernMediaControlsEnabled() const { return m_areModernMediaControlsEnabled; }
- void setWebAnimationsCompositeOperationsEnabled(bool areEnabled) { m_areWebAnimationsCompositeOperationsEnabled = areEnabled; }
- bool webAnimationsCompositeOperationsEnabled() const { return m_areWebAnimationsCompositeOperationsEnabled; }
-
- void setWebAnimationsMutableTimelinesEnabled(bool areEnabled) { m_areWebAnimationsMutableTimelinesEnabled = areEnabled; }
- bool webAnimationsMutableTimelinesEnabled() const { return m_areWebAnimationsMutableTimelinesEnabled; }
-
void setImageBitmapEnabled(bool isEnabled) { m_isImageBitmapEnabled = isEnabled; }
bool imageBitmapEnabled() const { return m_isImageBitmapEnabled; }
@@ -261,8 +255,6 @@
bool m_isMenuItemElementEnabled { false };
bool m_isDirectoryUploadEnabled { false };
bool m_isCustomPasteboardDataEnabled { false };
- bool m_areWebAnimationsCompositeOperationsEnabled { false };
- bool m_areWebAnimationsMutableTimelinesEnabled { false };
bool m_isImageBitmapEnabled { true };
#if ENABLE(OFFSCREEN_CANVAS)
bool m_isOffscreenCanvasEnabled { false };
Modified: trunk/Source/WebKitLegacy/win/ChangeLog (268667 => 268668)
--- trunk/Source/WebKitLegacy/win/ChangeLog 2020-10-19 13:46:33 UTC (rev 268667)
+++ trunk/Source/WebKitLegacy/win/ChangeLog 2020-10-19 15:36:08 UTC (rev 268668)
@@ -1,3 +1,13 @@
+2020-10-19 Antoine Quint <grao...@webkit.org>
+
+ Move remaining Web Animations runtime-enabled features to settings
+ https://bugs.webkit.org/show_bug.cgi?id=217903
+
+ Reviewed by Sam Weinig.
+
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+
2020-10-17 Sam Weinig <wei...@apple.com>
[Preferences] Add infrastructure for generating preferences for WWindows WebKitLegacy
Modified: trunk/Source/WebKitLegacy/win/WebView.cpp (268667 => 268668)
--- trunk/Source/WebKitLegacy/win/WebView.cpp 2020-10-19 13:46:33 UTC (rev 268667)
+++ trunk/Source/WebKitLegacy/win/WebView.cpp 2020-10-19 15:36:08 UTC (rev 268668)
@@ -5253,12 +5253,12 @@
hr = prefsPrivate->webAnimationsCompositeOperationsEnabled(&enabled);
if (FAILED(hr))
return hr;
- RuntimeEnabledFeatures::sharedFeatures().setWebAnimationsCompositeOperationsEnabled(!!enabled);
+ settings.setWebAnimationsCompositeOperationsEnabled(!!enabled);
hr = prefsPrivate->webAnimationsMutableTimelinesEnabled(&enabled);
if (FAILED(hr))
return hr;
- RuntimeEnabledFeatures::sharedFeatures().setWebAnimationsMutableTimelinesEnabled(!!enabled);
+ settings.setWebAnimationsMutableTimelinesEnabled(!!enabled);
hr = prefsPrivate->CSSCustomPropertiesAndValuesEnabled(&enabled);
if (FAILED(hr))