Commit 5314c04f authored by Stephen McGruer's avatar Stephen McGruer Committed by Commit Bot

Remove WebKitAnimationEvent

This is an obsolete prefixed alias of AnimationEvent. An
intent-to-remove has been sent, and has got LGTM*3.

Blink intent thread: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/EgMUDqySZwE

Bug: 695504
Change-Id: Ia86e830fe3f653aa6a7b2f983afb75fd4d088831
Reviewed-on: https://chromium-review.googlesource.com/1238497
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: default avatarDave Tapuska <dtapuska@chromium.org>
Reviewed-by: default avatarTim Volodine <timvolodine@chromium.org>
Reviewed-by: default avatarRick Byers <rbyers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593405}
parent 21eea353
......@@ -6332,12 +6332,6 @@ interface WebGLTexture
interface WebGLUniformLocation
attribute @@toStringTag
method constructor
interface WebKitAnimationEvent : Event
attribute @@toStringTag
getter animationName
getter elapsedTime
getter pseudoElement
method constructor
interface WebKitCSSMatrix : DOMMatrixReadOnly
attribute @@toStringTag
getter a
......
......@@ -78,11 +78,139 @@
assert_equals(event.animationName, "sample");
}, "animationName set to 'sample'");
test(function() {
var event = new AnimationEvent("test", {animationName: undefined});
assert_equals(event.animationName, "");
}, "animationName set to undefined");
test(function() {
var event = new AnimationEvent("test", {animationName: null});
assert_equals(event.animationName, "null");
}, "animationName set to null");
test(function() {
var event = new AnimationEvent("test", {animationName: false});
assert_equals(event.animationName, "false");
}, "animationName set to false");
test(function() {
var event = new AnimationEvent("test", {animationName: true});
assert_equals(event.animationName, "true");
}, "animationName set to true");
test(function() {
var event = new AnimationEvent("test", {animationName: 0.5});
assert_equals(event.animationName, "0.5");
}, "animationName set to a number");
test(function() {
var event = new AnimationEvent("test", {animationName: []});
assert_equals(event.animationName, "");
}, "animationName set to []");
test(function() {
var event = new AnimationEvent("test", {animationName: [1, 2, 3]});
assert_equals(event.animationName, "1,2,3");
}, "animationName set to [1, 2, 3]");
test(function() {
var event = new AnimationEvent("test", {animationName: {sample: 0.5}});
assert_equals(event.animationName, "[object Object]");
}, "animationName set to an object");
test(function() {
var event = new AnimationEvent("test",
{animationName: {valueOf: function () { return 'sample'; }}});
assert_equals(event.animationName, "[object Object]");
}, "animationName set to an object with a valueOf function");
test(function() {
var event = new AnimationEvent("test", {elapsedTime: 0.5});
assert_equals(event.elapsedTime, 0.5);
}, "elapsedTime set to 0.5");
test(function() {
var event = new AnimationEvent("test", {elapsedTime: -0.5});
assert_equals(event.elapsedTime, -0.5);
}, "elapsedTime set to -0.5");
test(function() {
var event = new AnimationEvent("test", {elapsedTime: undefined});
assert_equals(event.elapsedTime, 0);
}, "elapsedTime set to undefined");
test(function() {
var event = new AnimationEvent("test", {elapsedTime: null});
assert_equals(event.elapsedTime, 0);
}, "elapsedTime set to null");
test(function() {
var event = new AnimationEvent("test", {elapsedTime: false});
assert_equals(event.elapsedTime, 0);
}, "elapsedTime set to false");
test(function() {
var event = new AnimationEvent("test", {elapsedTime: true});
assert_equals(event.elapsedTime, 1);
}, "elapsedTime set to true");
test(function() {
var event = new AnimationEvent("test", {elapsedTime: ""});
assert_equals(event.elapsedTime, 0);
}, "elapsedTime set to ''");
test(function() {
var event = new AnimationEvent("test", {elapsedTime: []});
assert_equals(event.elapsedTime, 0);
}, "elapsedTime set to []");
test(function() {
var event = new AnimationEvent("test", {elapsedTime: [0.5]});
assert_equals(event.elapsedTime, 0.5);
}, "elapsedTime set to [0.5]");
test(function() {
var event = new AnimationEvent(
"test", {elapsedTime: { valueOf: function() { return 0.5; }}});
assert_equals(event.elapsedTime, 0.5);
}, "elapsedTime set to an object with a valueOf function");
test(function() {
assert_throws(new TypeError(), function() {
new AnimationEvent("test", {elapsedTime: NaN});
}, 'elapsedTime cannot be NaN so was expecting a TypeError');
}, "elapsedTime cannot be set to NaN");
test(function() {
assert_throws(new TypeError(), function() {
new AnimationEvent("test", {elapsedTime: Infinity});
}, 'elapsedTime cannot be Infinity so was expecting a TypeError');
}, "elapsedTime cannot be set to Infinity");
test(function() {
assert_throws(new TypeError(), function() {
new AnimationEvent("test", {elapsedTime: -Infinity});
}, 'elapsedTime cannot be -Infinity so was expecting a TypeError');
}, "elapsedTime cannot be set to -Infinity");
test(function() {
assert_throws(new TypeError(), function() {
new AnimationEvent("test", {elapsedTime: "sample"});
}, 'elapsedTime cannot be a string so was expecting a TypeError');
}, "elapsedTime cannot be set to 'sample'");
test(function() {
assert_throws(new TypeError(), function() {
new AnimationEvent("test", {elapsedTime: [0.5, 1.0]});
}, 'elapsedTime cannot be a multi-element array so was expecting a TypeError');
}, "elapsedTime cannot be set to [0.5, 1.0]");
test(function() {
assert_throws(new TypeError(), function() {
new AnimationEvent("test", {elapsedTime: { sample: 0.5}});
}, 'elapsedTime cannot be an object so was expecting a TypeError');
}, "elapsedTime cannot be set to an object");
test(function() {
var eventInit = {animationName: "sample", elapsedTime: 0.5};
var event = new AnimationEvent("test", eventInit);
......
<!DOCTYPE html>
<title>Historical CSS Animation features must be removed</title>
<link rel="help" href="http://www.w3.org/TR/css3-animations">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
function isInterfaceNuked(name) {
test(function() {
assert_equals(window[name], undefined)
}, "Historical CSS features must be removed: " + name)
}
var nukedInterfaces = [
"WebKitAnimationEvent", // Replaced by unprefixed AnimationEvent
];
nukedInterfaces.forEach(isInterfaceNuked);
</script>
This tests the constructor for the WebKitAnimationEvent DOM class.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS new WebKitAnimationEvent('eventType').bubbles is false
PASS new WebKitAnimationEvent('eventType').cancelable is false
PASS new WebKitAnimationEvent('eventType').animationName is ""
PASS new WebKitAnimationEvent('eventType').elapsedTime is 0
PASS new WebKitAnimationEvent('eventType', { bubbles: false }).bubbles is false
PASS new WebKitAnimationEvent('eventType', { bubbles: true }).bubbles is true
PASS new WebKitAnimationEvent('eventType', { cancelable: false }).cancelable is false
PASS new WebKitAnimationEvent('eventType', { cancelable: true }).cancelable is true
PASS new WebKitAnimationEvent('eventType', { animationName: 'doremi' }).animationName is "doremi"
PASS new WebKitAnimationEvent('eventType', { animationName: '' }).animationName is ""
PASS new WebKitAnimationEvent('eventType', { animationName: undefined }).animationName is ""
PASS new WebKitAnimationEvent('eventType', { animationName: null }).animationName is "null"
PASS new WebKitAnimationEvent('eventType', { animationName: false }).animationName is "false"
PASS new WebKitAnimationEvent('eventType', { animationName: true }).animationName is "true"
PASS new WebKitAnimationEvent('eventType', { animationName: 12345 }).animationName is "12345"
PASS new WebKitAnimationEvent('eventType', { animationName: 18446744073709551615 }).animationName is "18446744073709552000"
PASS new WebKitAnimationEvent('eventType', { animationName: NaN }).animationName is "NaN"
PASS new WebKitAnimationEvent('eventType', { animationName: [] }).animationName is ""
PASS new WebKitAnimationEvent('eventType', { animationName: [1, 2, 3] }).animationName is "1,2,3"
PASS new WebKitAnimationEvent('eventType', { animationName: {doremi: 12345} }).animationName is "[object Object]"
PASS new WebKitAnimationEvent('eventType', { animationName: {valueOf: function () { return 'doremi'; } } }).animationName is "[object Object]"
PASS new WebKitAnimationEvent('eventType', { elapsedTime: 0 }).elapsedTime is 0
PASS new WebKitAnimationEvent('eventType', { elapsedTime: 123.45 }).elapsedTime is 123.45
PASS new WebKitAnimationEvent('eventType', { elapsedTime: -123.45 }).elapsedTime is -123.45
PASS new WebKitAnimationEvent('eventType', { elapsedTime: 18446744073709551615 }).elapsedTime is 18446744073709551615
PASS new WebKitAnimationEvent('eventType', { elapsedTime: NaN }).elapsedTime threw exception TypeError: Failed to construct 'AnimationEvent': The provided double value is non-finite..
PASS new WebKitAnimationEvent('eventType', { elapsedTime: Infinity }).elapsedTime threw exception TypeError: Failed to construct 'AnimationEvent': The provided double value is non-finite..
PASS new WebKitAnimationEvent('eventType', { elapsedTime: -Infinity }).elapsedTime threw exception TypeError: Failed to construct 'AnimationEvent': The provided double value is non-finite..
PASS new WebKitAnimationEvent('eventType', { elapsedTime: undefined }).elapsedTime is 0
PASS new WebKitAnimationEvent('eventType', { elapsedTime: null }).elapsedTime is 0
PASS new WebKitAnimationEvent('eventType', { elapsedTime: false }).elapsedTime is 0
PASS new WebKitAnimationEvent('eventType', { elapsedTime: true }).elapsedTime is 1
PASS new WebKitAnimationEvent('eventType', { elapsedTime: '' }).elapsedTime is 0
PASS new WebKitAnimationEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime threw exception TypeError: Failed to construct 'AnimationEvent': The provided double value is non-finite..
PASS new WebKitAnimationEvent('eventType', { elapsedTime: [] }).elapsedTime is 0
PASS new WebKitAnimationEvent('eventType', { elapsedTime: [123.45] }).elapsedTime is 123.45
PASS new WebKitAnimationEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime threw exception TypeError: Failed to construct 'AnimationEvent': The provided double value is non-finite..
PASS new WebKitAnimationEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime threw exception TypeError: Failed to construct 'AnimationEvent': The provided double value is non-finite..
PASS new WebKitAnimationEvent('eventType', { elapsedTime: {valueOf: function () { return 123.45 } } }).elapsedTime is 123.45
PASS new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: true, animationName: 'doremi', elapsedTime: 123.45 }).bubbles is true
PASS new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: true, animationName: 'doremi', elapsedTime: 123.45 }).cancelable is true
PASS new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: true, animationName: 'doremi', elapsedTime: 123.45 }).animationName is 'doremi'
PASS new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: true, animationName: 'doremi', elapsedTime: 123.45 }).elapsedTime is 123.45
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script>
description("This tests the constructor for the WebKitAnimationEvent DOM class.");
// No initializer is passed.
shouldBe("new WebKitAnimationEvent('eventType').bubbles", "false");
shouldBe("new WebKitAnimationEvent('eventType').cancelable", "false");
shouldBeEqualToString("new WebKitAnimationEvent('eventType').animationName", "");
shouldBe("new WebKitAnimationEvent('eventType').elapsedTime", "0");
// bubbles is passed.
shouldBe("new WebKitAnimationEvent('eventType', { bubbles: false }).bubbles", "false");
shouldBe("new WebKitAnimationEvent('eventType', { bubbles: true }).bubbles", "true");
// cancelable is passed.
shouldBe("new WebKitAnimationEvent('eventType', { cancelable: false }).cancelable", "false");
shouldBe("new WebKitAnimationEvent('eventType', { cancelable: true }).cancelable", "true");
// animationName is passed.
// Strings.
shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: 'doremi' }).animationName", "doremi");
shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: '' }).animationName", "");
// Non-strings.
shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: undefined }).animationName", "");
shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: null }).animationName", "null");
shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: false }).animationName", "false");
shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: true }).animationName", "true");
shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: 12345 }).animationName", "12345");
shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: 18446744073709551615 }).animationName", "18446744073709552000");
shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: NaN }).animationName", "NaN");
shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: [] }).animationName", "");
shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: [1, 2, 3] }).animationName", "1,2,3");
shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: {doremi: 12345} }).animationName", "[object Object]");
shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: {valueOf: function () { return 'doremi'; } } }).animationName", "[object Object]");
// elapsedTime is passed.
// Numeric values.
shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: 0 }).elapsedTime", "0");
shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: 123.45 }).elapsedTime", "123.45");
shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: -123.45 }).elapsedTime", "-123.45");
shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: 18446744073709551615 }).elapsedTime", "18446744073709551615");
shouldThrow("new WebKitAnimationEvent('eventType', { elapsedTime: NaN }).elapsedTime");
shouldThrow("new WebKitAnimationEvent('eventType', { elapsedTime: Infinity }).elapsedTime");
shouldThrow("new WebKitAnimationEvent('eventType', { elapsedTime: -Infinity }).elapsedTime");
// Non-numeric values.
shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: undefined }).elapsedTime", "0");
shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: null }).elapsedTime", "0");
shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: false }).elapsedTime", "0");
shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: true }).elapsedTime", "1");
shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: '' }).elapsedTime", "0");
shouldThrow("new WebKitAnimationEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime");
shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: [] }).elapsedTime", "0");
shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: [123.45] }).elapsedTime", "123.45");
shouldThrow("new WebKitAnimationEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime");
shouldThrow("new WebKitAnimationEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime");
shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: {valueOf: function () { return 123.45 } } }).elapsedTime", "123.45");
// All initializers are passed.
shouldBe("new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: true, animationName: 'doremi', elapsedTime: 123.45 }).bubbles", "true");
shouldBe("new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: true, animationName: 'doremi', elapsedTime: 123.45 }).cancelable", "true");
shouldBe("new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: true, animationName: 'doremi', elapsedTime: 123.45 }).animationName", "'doremi'");
shouldBe("new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: true, animationName: 'doremi', elapsedTime: 123.45 }).elapsedTime", "123.45");
</script>
</body>
</html>
......@@ -40,7 +40,6 @@ PASS Uint8Array.length is 3
PASS Uint8ClampedArray.length is 3
PASS VTTCue.length is 3
PASS WebGLContextEvent.length is 1
PASS WebKitAnimationEvent.length is 1
PASS WebKitCSSMatrix.length is 0
PASS WebKitMutationObserver.length is 1
PASS WebSocket.length is 1
......
......@@ -44,7 +44,6 @@ shouldBe('Uint8Array.length', '3');
shouldBe('Uint8ClampedArray.length', '3');
shouldBe('VTTCue.length', '3');
shouldBe('WebGLContextEvent.length', '1');
shouldBe('WebKitAnimationEvent.length', '1');
shouldBe('WebKitCSSMatrix.length', '0');
shouldBe('WebKitMutationObserver.length', '1');
shouldBe('WebSocket.length', '1');
......
......@@ -8119,12 +8119,6 @@ interface WebGLUniformLocation
interface WebGLVertexArrayObject
attribute @@toStringTag
method constructor
interface WebKitAnimationEvent : Event
attribute @@toStringTag
getter animationName
getter elapsedTime
getter pseudoElement
method constructor
interface WebKitCSSMatrix : DOMMatrixReadOnly
attribute @@toStringTag
getter a
......
......@@ -9887,12 +9887,6 @@ interface WebGPUDevice
getter adapter
method constructor
method dummy
interface WebKitAnimationEvent : Event
attribute @@toStringTag
getter animationName
getter elapsedTime
getter pseudoElement
method constructor
interface WebKitCSSMatrix : DOMMatrixReadOnly
attribute @@toStringTag
getter a
......
......@@ -3,10 +3,6 @@
// document.createEvent() argument.
// https://dom.spec.whatwg.org/#dom-document-createevent
data: [
{
name: "WebKitAnimationEvent",
ImplementedAs: "AnimationEvent",
},
{
name: "Events",
ImplementedAs: "Event",
......
......@@ -197,7 +197,6 @@
[MeasureAs=StyleMedia] readonly attribute StyleMedia styleMedia;
[DeprecateAs=PrefixedRequestAnimationFrame] long webkitRequestAnimationFrame(FrameRequestCallback callback);
[DeprecateAs=PrefixedCancelAnimationFrame, ImplementedAs=cancelAnimationFrame] void webkitCancelAnimationFrame(long id);
[Measure] attribute AnimationEventConstructor WebKitAnimationEvent;
[DeprecateAs=PrefixedWindowURL] attribute URLConstructor webkitURL;
[MeasureAs=PrefixedMutationObserverConstructor] attribute MutationObserverConstructor WebKitMutationObserver;
......
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