Commit 9a9ed89b authored by Philip Rogers's avatar Philip Rogers Committed by Commit Bot

Remove the SMIL runtime enabled feature and associated test suite

This was originally added in an attempt to remove SMIL [1] but that is
no longer being pursued.

[1] https://chromium.googlesource.com/chromium/src/+/e1ddf6ccc2e25dd02b7e97cc861c8a87fb6eca47

TBR=wangxianzhu@chromium.org

Change-Id: Ieb69c21e4848497b25890acac7a2c2125a70b075
Reviewed-on: https://chromium-review.googlesource.com/c/1313116
Commit-Queue: Philip Rogers <pdr@chromium.org>
Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Reviewed-by: default avatarEric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605359}
parent bfabe441
...@@ -97,7 +97,6 @@ Bug(none) virtual/unified-autoplay/ [ Skip ] ...@@ -97,7 +97,6 @@ Bug(none) virtual/unified-autoplay/ [ Skip ]
Bug(none) virtual/video-surface-layer/ [ Skip ] Bug(none) virtual/video-surface-layer/ [ Skip ]
Bug(none) virtual/webrtc-wpt-unified-plan/ [ Skip ] Bug(none) virtual/webrtc-wpt-unified-plan/ [ Skip ]
Bug(none) virtual/windows-directwrite/ [ Skip ] Bug(none) virtual/windows-directwrite/ [ Skip ]
Bug(none) virtual/without-smil/ [ Skip ]
Bug(none) vr/ [ Skip ] Bug(none) vr/ [ Skip ]
Bug(none) wake_lock/ [ Skip ] Bug(none) wake_lock/ [ Skip ]
Bug(none) wasm/ [ Skip ] Bug(none) wasm/ [ Skip ]
......
...@@ -93,7 +93,6 @@ Bug(none) virtual/unified-autoplay/ [ Skip ] ...@@ -93,7 +93,6 @@ Bug(none) virtual/unified-autoplay/ [ Skip ]
Bug(none) virtual/user-activation-v2/ [ Skip ] Bug(none) virtual/user-activation-v2/ [ Skip ]
Bug(none) virtual/video-surface-layer/ [ Skip ] Bug(none) virtual/video-surface-layer/ [ Skip ]
Bug(none) virtual/windows-directwrite/ [ Skip ] Bug(none) virtual/windows-directwrite/ [ Skip ]
Bug(none) virtual/without-smil/ [ Skip ]
crbug.com/778875 virtual/threaded/animations/animationworklet/ [ Skip ] crbug.com/778875 virtual/threaded/animations/animationworklet/ [ Skip ]
crbug.com/841567 virtual/threaded/fast/scrolling [ Skip ] crbug.com/841567 virtual/threaded/fast/scrolling [ Skip ]
......
...@@ -1002,7 +1002,6 @@ virtual/stable/web-animations-api/additive-animations-unsupported.html ...@@ -1002,7 +1002,6 @@ virtual/stable/web-animations-api/additive-animations-unsupported.html
virtual/stable/webexposed/internal-properties-should-not-be-exposed.html virtual/stable/webexposed/internal-properties-should-not-be-exposed.html
virtual/threaded/animations/stability/pseudo-element-animation-with-marker-crash.html virtual/threaded/animations/stability/pseudo-element-animation-with-marker-crash.html
virtual/threaded/printing/page-and-element-geometry-match.html virtual/threaded/printing/page-and-element-geometry-match.html
virtual/without-smil/svg/animations/exposed/effect.html
wake_lock/wakelock-api.html wake_lock/wakelock-api.html
wake_lock/wakelock-in-nested-frame.html wake_lock/wakelock-in-nested-frame.html
webaudio/AudioParam/audioparam-setValueCurve-duration.html webaudio/AudioParam/audioparam-setValueCurve-duration.html
......
...@@ -210,11 +210,6 @@ ...@@ -210,11 +210,6 @@
"base": "web-animations-api", "base": "web-animations-api",
"args": ["--stable-release-mode"] "args": ["--stable-release-mode"]
}, },
{
"prefix": "without-smil",
"base": "svg/animations/exposed",
"args": ["--disable-blink-features=SMIL"]
},
{ {
"prefix": "linux-subpixel", "prefix": "linux-subpixel",
"base": "platform/linux/fast/text/subpixel", "base": "platform/linux/fast/text/subpixel",
......
# This suite runs tests with the --disable-blink-features=smil flag.
Deprecation of SMIL is tracked in http://crbug.com/482689.
PASS rect.width.animVal.value is 100
PASS rect.height.animVal.value is 200
PASS rect["transform"].animVal.numberOfItems is 1
PASS rect["transform"].animVal.getItem(0).angle is 300
<!DOCTYPE html>
<html>
<head>
<script src="../../../../../resources/js-test.js"></script>
<script>
'use strict';
function checkWidth() {
var rect = document.getElementById('rect');
shouldBe('rect.width.animVal.value', '100');
shouldBe('rect.height.animVal.value', '200');
shouldBe('rect["transform"].animVal.numberOfItems', '1');
shouldBe('rect["transform"].animVal.getItem(0).angle', '300');
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.notifyDone();
}
}
jsTestIsAsync = true;
requestAnimationFrame(checkWidth);
if (window.testRunner) {
testRunner.waitUntilDone();
}
</script>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<discard>
<rect id="rect" width="100" height="200" fill="#123456" transform="rotate(300)">
<set attributeName="width" to="400"/>
<animate attributeName="height" from="500" to="500" dur="1min"/>
<animateTransform attributeName="transform" type="rotate" from="600" to="600" dur="1min"/>
<animateColor attributeName="fill" from="blue" to="blue" dur="1min"/>
<animateMotion from="100" to="100" dur="1min">
<mpath xlink:href="#motionPath" />
</animateMotion>
</rect>
</discard>
<path id="motionPath" d="m0,0 h200 v300 z" stroke-width="5" stroke="green"/>
</svg>
<p id="description"></p>
<div id="console"></div>
</body>
</html>
PASS svg.animationsPaused is undefined.
PASS svg.getCurrentTime is undefined.
PASS svg.pauseAnimations is undefined.
PASS svg.setCurrentTime is undefined.
PASS svg.unpauseAnimations is undefined.
PASS animation.beginElement is undefined.
PASS animation.beginElementAt is undefined.
PASS animation.endElement is undefined.
PASS animation.endElementAt is undefined.
PASS animation.getCurrentTime is undefined.
PASS animation.getSimpleDuration is undefined.
PASS animation.getStartTime is undefined.
PASS animation.onbegin is undefined.
PASS animation.onend is undefined.
PASS animation.onrepeat is undefined.
PASS animation.targetElement is undefined.
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE html>
<html>
<head>
<script src="../../../../../resources/js-test.js"></script>
</head>
<body>
<svg id="svg" xmlns="http://www.w3.org/2000/svg">
<rect width="100" height="200">
<set id="animation" attributeName="width" to="300"/>
</rect>
</svg>
<script>
'use strict';
var svg = document.getElementById('svg');
var animation = document.getElementById('animation');
shouldBeUndefined("svg.animationsPaused");
shouldBeUndefined("svg.getCurrentTime");
shouldBeUndefined("svg.pauseAnimations");
shouldBeUndefined("svg.setCurrentTime");
shouldBeUndefined("svg.unpauseAnimations");
shouldBeUndefined("animation.beginElement");
shouldBeUndefined("animation.beginElementAt");
shouldBeUndefined("animation.endElement");
shouldBeUndefined("animation.endElementAt");
shouldBeUndefined("animation.getCurrentTime");
shouldBeUndefined("animation.getSimpleDuration");
shouldBeUndefined("animation.getStartTime");
shouldBeUndefined("animation.onbegin");
shouldBeUndefined("animation.onend");
shouldBeUndefined("animation.onrepeat");
shouldBeUndefined("animation.targetElement");
if (window.testRunner)
testRunner.dumpAsText();
</script>
<p id="description"></p>
<div id="console"></div>
</body>
</html>
...@@ -40,7 +40,6 @@ SVGAnimationElement::SVGAnimationElement(const QualifiedName& tag_name, ...@@ -40,7 +40,6 @@ SVGAnimationElement::SVGAnimationElement(const QualifiedName& tag_name,
animation_valid_(false), animation_valid_(false),
calc_mode_(kCalcModeLinear), calc_mode_(kCalcModeLinear),
animation_mode_(kNoAnimation) { animation_mode_(kNoAnimation) {
DCHECK(RuntimeEnabledFeatures::SMILEnabled());
UseCounter::Count(document, WebFeature::kSVGAnimationElement); UseCounter::Count(document, WebFeature::kSVGAnimationElement);
} }
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
// https://svgwg.org/specs/animations/#InterfaceSVGAnimationElement // https://svgwg.org/specs/animations/#InterfaceSVGAnimationElement
[RuntimeEnabled=SMIL]
interface SVGAnimationElement : SVGElement { interface SVGAnimationElement : SVGElement {
readonly attribute SVGElement targetElement; readonly attribute SVGElement targetElement;
......
...@@ -36,7 +36,6 @@ namespace blink { ...@@ -36,7 +36,6 @@ namespace blink {
inline SVGDiscardElement::SVGDiscardElement(Document& document) inline SVGDiscardElement::SVGDiscardElement(Document& document)
: SVGSMILElement(svg_names::kDiscardTag, document) { : SVGSMILElement(svg_names::kDiscardTag, document) {
DCHECK(RuntimeEnabledFeatures::SMILEnabled());
} }
DEFINE_NODE_FACTORY(SVGDiscardElement) DEFINE_NODE_FACTORY(SVGDiscardElement)
......
...@@ -30,6 +30,5 @@ ...@@ -30,6 +30,5 @@
// https://svgwg.org/specs/animations/#InterfaceSVGDiscardElement // https://svgwg.org/specs/animations/#InterfaceSVGDiscardElement
[RuntimeEnabled=SMIL]
interface SVGDiscardElement : SVGElement { interface SVGDiscardElement : SVGElement {
}; };
...@@ -43,7 +43,6 @@ void SVGDocumentExtensions::RemoveTimeContainer(SVGSVGElement* element) { ...@@ -43,7 +43,6 @@ void SVGDocumentExtensions::RemoveTimeContainer(SVGSVGElement* element) {
void SVGDocumentExtensions::AddWebAnimationsPendingSVGElement( void SVGDocumentExtensions::AddWebAnimationsPendingSVGElement(
SVGElement& element) { SVGElement& element) {
DCHECK(RuntimeEnabledFeatures::WebAnimationsSVGEnabled());
web_animations_pending_svg_elements_.insert(&element); web_animations_pending_svg_elements_.insert(&element);
} }
...@@ -54,12 +53,10 @@ void SVGDocumentExtensions::ServiceOnAnimationFrame(Document& document) { ...@@ -54,12 +53,10 @@ void SVGDocumentExtensions::ServiceOnAnimationFrame(Document& document) {
} }
void SVGDocumentExtensions::ServiceAnimations() { void SVGDocumentExtensions::ServiceAnimations() {
if (RuntimeEnabledFeatures::SMILEnabled()) { HeapVector<Member<SVGSVGElement>> time_containers;
HeapVector<Member<SVGSVGElement>> time_containers; CopyToVector(time_containers_, time_containers);
CopyToVector(time_containers_, time_containers); for (const auto& container : time_containers)
for (const auto& container : time_containers) container->TimeContainer()->ServiceAnimations();
container->TimeContainer()->ServiceAnimations();
}
SVGElementSet web_animations_pending_svg_elements; SVGElementSet web_animations_pending_svg_elements;
web_animations_pending_svg_elements.swap( web_animations_pending_svg_elements.swap(
......
...@@ -29,7 +29,6 @@ namespace blink { ...@@ -29,7 +29,6 @@ namespace blink {
inline SVGMPathElement::SVGMPathElement(Document& document) inline SVGMPathElement::SVGMPathElement(Document& document)
: SVGElement(svg_names::kMPathTag, document), SVGURIReference(this) { : SVGElement(svg_names::kMPathTag, document), SVGURIReference(this) {
DCHECK(RuntimeEnabledFeatures::SMILEnabled());
} }
void SVGMPathElement::Trace(blink::Visitor* visitor) { void SVGMPathElement::Trace(blink::Visitor* visitor) {
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
// https://svgwg.org/specs/animations/#InterfaceSVGMPathElement // https://svgwg.org/specs/animations/#InterfaceSVGMPathElement
[RuntimeEnabled=SMIL]
interface SVGMPathElement : SVGElement { interface SVGMPathElement : SVGElement {
}; };
......
...@@ -514,17 +514,15 @@ Node::InsertionNotificationRequest SVGSVGElement::InsertedInto( ...@@ -514,17 +514,15 @@ Node::InsertionNotificationRequest SVGSVGElement::InsertedInto(
if (root_parent.GetDocument().IsXMLDocument()) if (root_parent.GetDocument().IsXMLDocument())
UseCounter::Count(GetDocument(), WebFeature::kSVGSVGElementInXMLDocument); UseCounter::Count(GetDocument(), WebFeature::kSVGSVGElementInXMLDocument);
if (RuntimeEnabledFeatures::SMILEnabled()) { GetDocument().AccessSVGExtensions().AddTimeContainer(this);
GetDocument().AccessSVGExtensions().AddTimeContainer(this);
// Animations are started at the end of document parsing and after firing
// Animations are started at the end of document parsing and after firing // the load event, but if we miss that train (deferred programmatic
// the load event, but if we miss that train (deferred programmatic // element insertion for example) we need to initialize the time container
// element insertion for example) we need to initialize the time container // here.
// here. if (!GetDocument().Parsing() && GetDocument().LoadEventFinished() &&
if (!GetDocument().Parsing() && GetDocument().LoadEventFinished() && !TimeContainer()->IsStarted())
!TimeContainer()->IsStarted()) TimeContainer()->Start();
TimeContainer()->Start();
}
} }
return SVGGraphicsElement::InsertedInto(root_parent); return SVGGraphicsElement::InsertedInto(root_parent);
} }
......
...@@ -59,11 +59,11 @@ interface SVGSVGElement : SVGGraphicsElement { ...@@ -59,11 +59,11 @@ interface SVGSVGElement : SVGGraphicsElement {
// SVG Animations // SVG Animations
// https://svgwg.org/specs/animations/#InterfaceSVGSVGElement // https://svgwg.org/specs/animations/#InterfaceSVGSVGElement
[MeasureAs=SVGSMILPausing, RuntimeEnabled=SMIL] void pauseAnimations(); [MeasureAs=SVGSMILPausing] void pauseAnimations();
[MeasureAs=SVGSMILPausing, RuntimeEnabled=SMIL] void unpauseAnimations(); [MeasureAs=SVGSMILPausing] void unpauseAnimations();
[MeasureAs=SVGSMILPausing, RuntimeEnabled=SMIL] boolean animationsPaused(); [MeasureAs=SVGSMILPausing] boolean animationsPaused();
[MeasureAs=SVGSMILCurrentTime, RuntimeEnabled=SMIL] float getCurrentTime(); [MeasureAs=SVGSMILCurrentTime] float getCurrentTime();
[MeasureAs=SVGSMILCurrentTime, RuntimeEnabled=SMIL] void setCurrentTime(float seconds); [MeasureAs=SVGSMILCurrentTime] void setCurrentTime(float seconds);
}; };
SVGSVGElement implements SVGFitToViewBox; SVGSVGElement implements SVGFitToViewBox;
......
...@@ -12,35 +12,21 @@ ...@@ -12,35 +12,21 @@
{ {
name: "animate", name: "animate",
noTypeHelpers: true, noTypeHelpers: true,
runtimeEnabled: "SMIL",
}, },
{ {
name: "animateColor", name: "animateColor",
JSInterfaceName: "SVGElement", JSInterfaceName: "SVGElement",
interfaceName: "SVGUnknownElement", interfaceName: "SVGUnknownElement",
noConstructor: true, noConstructor: true,
runtimeEnabled: "SMIL",
},
{
name: "animateMotion",
runtimeEnabled: "SMIL",
},
{
name: "animateTransform",
runtimeEnabled: "SMIL",
},
{
name: "set",
runtimeEnabled: "SMIL",
}, },
"animateMotion",
"animateTransform",
"set",
"circle", "circle",
"clipPath", "clipPath",
"defs", "defs",
"desc", "desc",
{ "discard",
name: "discard",
runtimeEnabled: "SMIL",
},
"ellipse", "ellipse",
"feBlend", "feBlend",
"feColorMatrix", "feColorMatrix",
...@@ -79,7 +65,6 @@ ...@@ -79,7 +65,6 @@
{ {
name: "mpath", name: "mpath",
interfaceName: "SVGMPathElement", interfaceName: "SVGMPathElement",
runtimeEnabled: "SMIL",
}, },
"path", "path",
"pattern", "pattern",
......
...@@ -1193,10 +1193,6 @@ ...@@ -1193,10 +1193,6 @@
{ {
name: "SlimmingPaintV2", name: "SlimmingPaintV2",
}, },
{
name: "SMIL",
status: "stable",
},
{ {
name: "SmoothScrollJSIntervention", name: "SmoothScrollJSIntervention",
status: "stable", status: "stable",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment