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

Side by Side Diff: ui/file_manager/file_manager/common/js/util.js

Issue 1549903002: Replace -webkit-transform with transform in Chrome UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase CL Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Namespace for utility functions. 6 * Namespace for utility functions.
7 */ 7 */
8 var util = {}; 8 var util = {};
9 9
10 /** 10 /**
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 * }} 252 * }}
253 */ 253 */
254 util.Transform; 254 util.Transform;
255 255
256 /** 256 /**
257 * @param {Element} element Element to transform. 257 * @param {Element} element Element to transform.
258 * @param {util.Transform} transform Transform object, 258 * @param {util.Transform} transform Transform object,
259 * contains scaleX, scaleY and rotate90 properties. 259 * contains scaleX, scaleY and rotate90 properties.
260 */ 260 */
261 util.applyTransform = function(element, transform) { 261 util.applyTransform = function(element, transform) {
262 element.style.webkitTransform = 262 element.style.transform =
263 transform ? 'scaleX(' + transform.scaleX + ') ' + 263 transform ? 'scaleX(' + transform.scaleX + ') ' +
264 'scaleY(' + transform.scaleY + ') ' + 264 'scaleY(' + transform.scaleY + ') ' +
265 'rotate(' + transform.rotate90 * 90 + 'deg)' : 265 'rotate(' + transform.rotate90 * 90 + 'deg)' :
266 ''; 266 '';
267 }; 267 };
268 268
269 /** 269 /**
270 * Extracts path from filesystem: URL. 270 * Extracts path from filesystem: URL.
271 * @param {string} url Filesystem URL. 271 * @param {string} url Filesystem URL.
272 * @return {?string} The path. 272 * @return {?string} The path.
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 * @return {!Promise} A promise which can be rejected by timeout. 1099 * @return {!Promise} A promise which can be rejected by timeout.
1100 */ 1100 */
1101 util.timeoutPromise = function(promise, ms, opt_message) { 1101 util.timeoutPromise = function(promise, ms, opt_message) {
1102 return Promise.race([ 1102 return Promise.race([
1103 promise, 1103 promise,
1104 util.delay(ms).then(function() { 1104 util.delay(ms).then(function() {
1105 throw new Error(opt_message || 'Operation timed out.'); 1105 throw new Error(opt_message || 'Operation timed out.');
1106 }) 1106 })
1107 ]); 1107 ]);
1108 }; 1108 };
OLDNEW
« no previous file with comments | « ui/accessibility/extensions/colorenhancer/res/setup.css ('k') | ui/file_manager/file_manager/foreground/css/common.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698