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

Side by Side Diff: chrome/test/data/third_party/spaceport/js/features.js

Issue 10134041: Add test data for spaceport benchmark. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 define([ ], function () {
2 // CSS transform feature detection based off of
3 // http://andrew-hoyer.com/experiments/rain/
4 // Public domain
5
6 var style = document.createElement('div').style;
7
8 function getFirstIn(object, propertyNames) {
9 return propertyNames.filter(function(name) {
10 return name in object;
11 }).shift();
12 }
13
14 var transformOriginStyleProperty = getFirstIn(style, [
15 'transformOrigin',
16 'WebkitTransformOrigin',
17 'MozTransformOrigin',
18 'msTransformOrigin',
19 'OTransformOrigin'
20 ]);
21
22 var transformStyleProperty = getFirstIn(style, [
23 'transform',
24 'WebkitTransform',
25 'MozTransform',
26 'msTransform',
27 'OTransform'
28 ]);
29
30 var CSSMatrix = window[getFirstIn(window, [
31 'CSSMatrix',
32 'WebKitCSSMatrix',
33 'WebkitCSSMatrix'
34 ])];
35
36 // Firefox has a bug where it requires 'px' for translate matrix
37 // elements (where it should accept plain numbers).
38 var matrixTranslateSuffix = transformStyleProperty === 'MozTransform' ? 'px' : '';
39
40 return {
41 transformOriginStyleProperty: transformOriginStyleProperty,
42 transformStyleProperty: transformStyleProperty,
43 matrixTranslateSuffix: matrixTranslateSuffix,
44 CSSMatrix: CSSMatrix
45 }
46 });
OLDNEW
« no previous file with comments | « chrome/test/data/third_party/spaceport/js/curl.js ('k') | chrome/test/data/third_party/spaceport/js/fullReport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698