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

Unified Diff: third_party/polymer/v1_0/components-chromium/polymer-externs/polymer.externs.js

Issue 1187823002: Update Polymer components and re-run reproduce.sh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 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
Index: third_party/polymer/v1_0/components-chromium/polymer-externs/polymer.externs.js
diff --git a/third_party/polymer/v1_0/components-chromium/polymer-externs/polymer.externs.js b/third_party/polymer/v1_0/components-chromium/polymer-externs/polymer.externs.js
index d07a15b4daae7024e32f7ede63cf9ede49025ea2..41008e3bdf1fbadbfaf97df69e202fdc42615a5b 100644
--- a/third_party/polymer/v1_0/components-chromium/polymer-externs/polymer.externs.js
+++ b/third_party/polymer/v1_0/components-chromium/polymer-externs/polymer.externs.js
@@ -53,11 +53,11 @@ PolymerElement.prototype.is;
PolymerElement.prototype.extends;
/**
- * An array of objects whose properties get mixed in to this element.
- *
+ * An array of objects whose properties get added to this element.
+ * @see https://www.polymer-project.org/1.0/docs/devguide/behaviors.html
* @type {!Array<!Object>|undefined}
*/
-PolymerElement.prototype.mixins;
+PolymerElement.prototype.behaviors;
/**
* A string-separated list of dependent properties that should result in a
@@ -111,6 +111,12 @@ PolymerElement.prototype.hostAttributes;
PolymerElement.prototype.listeners;
/**
+ * Return the element whose local dom within which this element is contained.
+ * @type {?Element}
+ */
+PolymerElement.prototype.domHost;
+
+/**
* Notifies the event binding system of a change to a property.
* @param {string} path The path to set.
* @param {*} value The value to send in the update notification.
@@ -118,11 +124,44 @@ PolymerElement.prototype.listeners;
PolymerElement.prototype.notifyPath = function(path, value) {};
/**
- * Shorthand for setting a property, then calling notifyPath.
- * @param {string} path The path to set.
- * @param {*} value The new value.
+ * Convienence method for setting a value to a path and notifying any
+ * elements bound to the same path.
+ *
+ * Note, if any part in the path except for the last is undefined,
+ * this method does nothing (this method does not throw when
+ * dereferencing undefined paths).
+ *
+ * @param {(string|Array<(string|number)>)} path Path to the value
+ * to read. The path may be specified as a string (e.g. `foo.bar.baz`)
+ * or an array of path parts (e.g. `['foo.bar', 'baz']`). Note that
+ * bracketed expressions are not supported; string-based path parts
+ * *must* be separated by dots. Note that when dereferencing array
+ * indicies, the index may be used as a dotted part directly
+ * (e.g. `users.12.name` or `['users', 12, 'name']`).
+ * @param {*} value Value to set at the specified path.
+ * @param {Object=} root Root object from which the path is evaluated.
+*/
+PolymerElement.prototype.set = function(path, value, root) {};
+
+/**
+ * Convienence method for reading a value from a path.
+ *
+ * Note, if any part in the path is undefined, this method returns
+ * `undefined` (this method does not throw when dereferencing undefined
+ * paths).
+ *
+ * @param {(string|Array<(string|number)>)} path Path to the value
+ * to read. The path may be specified as a string (e.g. `foo.bar.baz`)
+ * or an array of path parts (e.g. `['foo.bar', 'baz']`). Note that
+ * bracketed expressions are not supported; string-based path parts
+ * *must* be separated by dots. Note that when dereferencing array
+ * indicies, the index may be used as a dotted part directly
+ * (e.g. `users.12.name` or `['users', 12, 'name']`).
+ * @param {Object=} root Root object from which the path is evaluated.
+ * @return {*} Value at the path, or `undefined` if any part of the path
+ * is undefined.
*/
-PolymerElement.prototype.setPathValue = function(path, value) {};
+PolymerElement.prototype.get = function(path, root) {};
/**
* Fire an event.
@@ -167,12 +206,47 @@ PolymerElement.prototype.toggleAttribute = function(name, bool, node) {};
PolymerElement.prototype.attributeFollows = function(name, newNode, oldNode) {};
/**
+ * Convenience method to add an event listener on a given element, late bound to
+ * a named method on this element.
+ * @param {!Element} node Element to add event listener to.
+ * @param {string} eventName Name of event to listen for.
+ * @param {string} methodName Name of handler method on this to call.
+ */
+PolymerElement.prototype.listen = function(node, eventName, methodName) {};
+
+/**
+ * Override scrolling behavior to all direction, one direction, or none.
+ *
+ * Valid scroll directions:
+ * 'all': scroll in any direction
+ * 'x': scroll only in the 'x' direction
+ * 'y': scroll only in the 'y' direction
+ * 'none': disable scrolling for this node
+ *
+ * @param {string=} direction Direction to allow scrolling Defaults to all.
+ * @param {HTMLElement=} node Element to apply scroll direction setting.
+ * Defaults to this.
+ */
+PolymerElement.prototype.setScrollDirection = function(direction, node) {};
+
+/**
* @param {!Function} method
* @param {number=} wait
* @return {number} A handle which can be used to cancel the job.
*/
PolymerElement.prototype.async = function(method, wait) {};
+Polymer.Base;
+
+/**
+ * Used by the promise-polyfill on its own.
+ *
+ * @param {!Function} method
+ * @param {number=} wait
+ * @return {number} A handle which can be used to cancel the job.
+ */
+Polymer.Base.async = function(method, wait) {};
+
/**
* @param {number} handle
*/
@@ -218,9 +292,9 @@ PolymerElement.prototype.transform = function(transform, node) {};
/**
* Transforms the specified node, or this element if no node is specified.
- * @param {string} x
- * @param {string} y
- * @param {string} z
+ * @param {number|string} x
+ * @param {number|string} y
+ * @param {number|string} z
* @param {HTMLElement=} node
*/
PolymerElement.prototype.translate3d = function(x, y, z, node) {};
@@ -247,6 +321,39 @@ PolymerElement.prototype.arrayDelete = function(array, item) {};
*/
PolymerElement.prototype.resolveUrl = function(url) {};
+/**
+ * Logs a message to the console.
+ *
+ * @param {!Array} var_args
+ * @protected
+ */
+PolymerElement.prototype._log = function(var_args) {};
+
+/**
+ * Logs a message to the console with a 'warn' level.
+ *
+ * @param {!Array} var_args
+ * @protected
+ */
+PolymerElement.prototype._warn = function(var_args) {};
+
+/**
+ * Logs a message to the console with an 'error' level.
+ *
+ * @param {!Array} var_args
+ * @protected
+ */
+PolymerElement.prototype._error = function(var_args) {};
+
+/**
+ * Formats string arguments together for a console log.
+ *
+ * @param {...*} var_args
+ * @return {!Array} The formatted array of args to a log function.
+ * @protected
+ */
+PolymerElement.prototype._logf = function(var_args) {};
+
/**
* A Polymer DOM API for manipulating DOM such that local DOM and light DOM
@@ -316,6 +423,9 @@ PolymerDomApi.prototype.getDistributedNodes = function() {};
/** @return {!Array<!Node>} */
PolymerDomApi.prototype.getDestinationInsertionPoints = function() {};
+/** @return {?Node} */
+PolymerDomApi.prototype.getOwnerRoot = function() {};
+
/**
* @param {string} attribute
* @param {string|number|boolean} value Values are converted to strings with
@@ -331,12 +441,88 @@ PolymerDomApi.prototype.removeAttribute = function(attribute) {};
PolymerDomApi.prototype.classList;
/**
- * Returns a Polymer-friendly API for manipulating DOM of a specified node.
+ * A Polymer Event API.
*
- * @param {?Node} node
- * @return {!PolymerDomApi}
+ * @constructor
*/
-Polymer.dom = function(node) {};
+var PolymerEventApi = function() {};
+
+/** @type {?EventTarget} */
+PolymerEventApi.prototype.rootTarget;
+
+/** @type {?EventTarget} */
+PolymerEventApi.prototype.localTarget;
+
+/** @type {?Array<!Element>|undefined} */
+PolymerEventApi.prototype.path;
+
+/**
+ * Returns a Polymer-friendly API for manipulating DOM of a specified node or
+ * an event API for a specified event..
+ *
+ * @param {?Node|?Event} nodeOrEvent
+ * @return {!PolymerDomApi|!PolymerEventApi}
+ */
+Polymer.dom = function(nodeOrEvent) {};
Polymer.dom.flush = function() {};
+Polymer.CaseMap;
+
+/**
+ * Convert a string from dash to camel-case.
+ * @param {string} dash
+ * @return {string} The string in camel-case.
+ */
+Polymer.CaseMap.dashToCamelCase = function(dash) {};
+
+/**
+ * Convert a string from camel-case to dash format.
+ * @param {string} camel
+ * @return {string} The string in dash format.
+ */
+Polymer.CaseMap.camelToDashCase = function(camel) {};
+
+
+/**
+ * An Event type fired when moving while finger/button is down.
+ * state - a string indicating the tracking state:
+ * + start: fired when tracking is first detected (finger/button down and
+ * moved past a pre-set distance threshold)
+ * + track: fired while tracking
+ * + end: fired when tracking ends
+ * x - clientX coordinate for event
+ * y - clientY coordinate for event
+ * dx - change in pixels horizontally since the first track event
+ * dy - change in pixels vertically since the first track event
+ * ddx - change in pixels horizontally since last track event
+ * ddy - change in pixels vertically since last track event
+ * hover() - a function that may be called to determine the element currently
+ * being hovered
+ *
+ * @typedef {{
+ * state: string,
+ * x: number,
+ * y: number,
+ * dx: number,
+ * dy: number,
+ * ddx: number,
+ * ddy: number,
+ * hover: (function(): Node)
+ * }}
+ */
+var PolymerTrackEvent;
+
+/**
+ * An Event type fired when a finger does down, up, or taps.
+ * x - clientX coordinate for event
+ * y - clientY coordinate for event
+ * sourceEvent - the original DOM event that caused the down action
+ *
+ * @typedef {{
+ * x: number,
+ * y: number,
+ * sourceEvent: Event
+ * }}
+ */
+var PolymerTouchEvent;

Powered by Google App Engine
This is Rietveld 408576698