Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: third_party/closure_compiler/externs/web_animations.js

Issue 1736733003: MD Settings: Custom expand/collapse section animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/closure_compiler/externs/compiled_resources2.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/closure_compiler/externs/web_animations.js
diff --git a/third_party/closure_compiler/externs/web_animations.js b/third_party/closure_compiler/externs/web_animations.js
new file mode 100644
index 0000000000000000000000000000000000000000..2a8ea4ad3133b7ced061c3b4833a526db867bb41
--- /dev/null
+++ b/third_party/closure_compiler/externs/web_animations.js
@@ -0,0 +1,169 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview Minimal Closure externs for Web Animations.
+ * "Minimal" because the web-animations spec is in flux, Chromium's support is
+ * changing, and the intended consumer (MD Settings) is actually using the
+ * web-animations-js polyfill for the time being.
Dan Beam 2016/03/14 21:27:53 can you add @see <link> for this file and any part
michaelpg 2016/03/15 00:06:50 Done.
+ */
+
+/**
+ * @enum {number}
+ */
Dan Beam 2016/03/14 21:27:53 nit: almost all of these short jsdoc comments can
michaelpg 2016/03/15 00:06:50 Done.
+var FillMode = {
+ 'none': 0,
+ 'forwards': 1,
+ 'backwards': 2,
+ 'both': 3,
+ 'auto': 4
+};
+
+/**
+ * @enum {number}
+ */
+var PlaybackDirection = {
+ 'normal': 0,
+ 'reverse': 1,
+ 'alternate': 2,
+ 'alternate-reverse': 3
+};
+
+/**
+ * @constructor
+ * @param {!Event} event
+ */
+var EventHandlerNonNull = function(event) {};
+
+/**
+ * @typedef {?EventHandlerNonNull}
+ */
+var EventHandler;
+
+/**
+ * @constructor
+ */
+var KeyframeAnimationOptions = function() {};
+
+/**
+ * @constructor
+ */
+var KeyframeEffectOptions = function() {};
+
+/**
+ * @type {number}
+ */
+KeyframeEffectOptions.prototype.delay = 0;
Dan Beam 2016/03/14 21:27:53 one advantage of the .prototype.* route is that yo
michaelpg 2016/03/15 00:06:50 Ok, but then why not extend this logic to function
Dan Beam 2016/03/16 00:23:14 suppose that's OK, too, as long as you can name an
michaelpg 2016/03/16 03:11:15 Yeah it seems to work just the same. I'll keep it
+
+/**
+ * @type {number}
+ */
+KeyframeEffectOptions.prototype.endDelay = 0;
+
+/**
+ * @type {!FillMode}
+ */
+KeyframeEffectOptions.prototype.fill = FillMode.auto;
+
+/**
+ * @type {number}
+ */
+KeyframeEffectOptions.prototype.iterationStart = 0;
+
+/**
+ * @type {number}
+ */
+KeyframeEffectOptions.prototype.iterations = 1;
+
+/**
+ * @type {number|string}
+ */
+KeyframeEffectOptions.prototype.duration = 'auto';
+
+/**
+ * @type {number}
+ */
+KeyframeEffectOptions.prototype.playbackRate = 1;
+
+/**
+ * @type {!PlaybackDirection}
+ */
+KeyframeEffectOptions.prototype.direction = PlaybackDirection.normal;
+
+/**
+ * @type {string}
+ */
+KeyframeEffectOptions.prototype.easing = 'linear';
+
+/**
+ * @type {string}
+ */
+KeyframeEffectOptions.prototype.id = '';
+
+/**
+ * @interface
+ * @extends {EventTarget}
+ */
+var Animation = function() {};
+
+/**
+ * @type {string}
+ */
+Animation.prototype.id;
+
+/**
+ * @type {?number}
+ */
+Animation.prototype.startTime;
+
+/**
+ * @type {?number}
+ */
+Animation.prototype.currentTime;
+
+/**
+ * @type {number}
+ */
+Animation.prototype.playbackRate;
+
+Animation.prototype.finish = function() {};
+
+Animation.prototype.play = function() {};
+
+Animation.prototype.pause = function() {};
+
+Animation.prototype.reverse = function() {};
+
+Animation.prototype.cancel = function() {};
+
+/**
+ * @param {boolean=} opt_useCapture
+ * @override
+ */
+Animation.prototype.addEventListener = function(
+ type, listener, opt_useCapture) {};
+
+/**
+ * @type {EventHandler}
+ */
+Animation.prototype.onfinish;
+
+/**
+ * @type {EventHandler}
+ */
+Animation.prototype.oncancel;
+
+/**
+ * @interface
+ */
+function Animatable() {};
Dan Beam 2016/03/14 21:27:53 no ;
michaelpg 2016/03/15 00:06:50 Done.
+
+Animatable.prototype = /** @lends {Element.prototype} */({
Dan Beam 2016/03/14 21:27:53 til: @lends is a thing
+ /**
+ * @param {?Array<Object>|Object} effect
+ * @param {number|!KeyframeEffectOptions=} opt_timing
+ * @return {!Animation}
+ */
+ animate: function(effect, opt_timing) {},
+});
« no previous file with comments | « third_party/closure_compiler/externs/compiled_resources2.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698