Changeset 220800 in webkit
- Timestamp:
- Aug 16, 2017 11:59:28 AM (7 years ago)
- Location:
- trunk/PerformanceTests
- Files:
-
- 7 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/PerformanceTests/ChangeLog
r220752 r220800 1 2017-08-16 Mathias Bynens <mathias@qiwi.be> 2 3 Speedometer: Document Backbone example 4 https://bugs.webkit.org/show_bug.cgi?id=175626 5 6 Reviewed by Ryosuke Niwa. 7 8 * Speedometer/resources/todomvc/architecture-examples/backbone/index.html: Made title consistent. 9 * Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/backbone/backbone-min.js: Added. 10 * Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/backbone/backbone-min.map: Added. 11 * Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/jquery/dist/jquery.js: Updated per build steps. 12 * Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/jquery/dist/jquery.min.js: Added. 13 * Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/jquery/dist/jquery.min.map: Added. 14 * Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/todomvc-app-css/index.css: Updated per build steps. 15 * Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/underscore/underscore-min.js: Added. 16 * Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/underscore/underscore-min.map: Added. 17 * Speedometer/resources/todomvc/architecture-examples/backbone/package-lock.json: Added. 18 * Speedometer/resources/todomvc/architecture-examples/backbone/readme.md: Documented build steps. 19 1 20 2017-08-15 Michael Saboff <msaboff@apple.com> 2 21 -
trunk/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/backbone/index.html
r216716 r220800 3 3 <head> 4 4 <meta charset="utf-8"> 5 <title>Backbone.js • TodoMVC</title>5 <title>Backbone.js TodoMVC example</title> 6 6 <link rel="stylesheet" href="node_modules/todomvc-common/base.css"> 7 7 <link rel="stylesheet" href="node_modules/todomvc-app-css/index.css"> … … 51 51 </script> 52 52 <!-- <script src="node_modules/todomvc-common/base.js"></script> --> 53 <script src="node_modules/jquery/dist/jquery. js"></script>54 <script src="node_modules/underscore/underscore .js"></script>55 <script src="node_modules/backbone/backbone .js"></script>53 <script src="node_modules/jquery/dist/jquery.min.js"></script> 54 <script src="node_modules/underscore/underscore-min.js"></script> 55 <script src="node_modules/backbone/backbone-min.js"></script> 56 56 <script src="js/backbone.sync.js"></script> 57 57 <script src="js/models/todo.js"></script> -
trunk/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/jquery/dist/jquery.js
r216716 r220800 1 1 /*! 2 * jQuery JavaScript Library v3. 1.12 * jQuery JavaScript Library v3.2.1 3 3 * https://jquery.com/ 4 4 * … … 6 6 * https://sizzlejs.com/ 7 7 * 8 * Copyright jQueryFoundation and other contributors8 * Copyright JS Foundation and other contributors 9 9 * Released under the MIT license 10 10 * https://jquery.org/license 11 11 * 12 * Date: 201 6-09-22T22:30Z12 * Date: 2017-03-20T18:59Z 13 13 */ 14 14 ( function( global, factory ) { … … 89 89 90 90 var 91 version = "3. 1.1",91 version = "3.2.1", 92 92 93 93 // Define a local copy of jQuery … … 237 237 // Recurse if we're merging plain objects or arrays 238 238 if ( deep && copy && ( jQuery.isPlainObject( copy ) || 239 ( copyIsArray = jQuery.isArray( copy ) ) ) ) {239 ( copyIsArray = Array.isArray( copy ) ) ) ) { 240 240 241 241 if ( copyIsArray ) { 242 242 copyIsArray = false; 243 clone = src && jQuery.isArray( src ) ? src : [];243 clone = src && Array.isArray( src ) ? src : []; 244 244 245 245 } else { … … 279 279 return jQuery.type( obj ) === "function"; 280 280 }, 281 282 isArray: Array.isArray,283 281 284 282 isWindow: function( obj ) { … … 354 352 camelCase: function( string ) { 355 353 return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); 356 },357 358 nodeName: function( elem, name ) {359 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();360 354 }, 361 355 … … 894 888 * Create key-value caches of limited size 895 889 * @returns {function(string, object)} Returns the Object data after storing it on itself with 896 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)897 * deleting the oldest entry890 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) 891 * deleting the oldest entry 898 892 */ 899 893 function createCache() { … … 2844 2838 var rneedsContext = jQuery.expr.match.needsContext; 2845 2839 2840 2841 2842 function nodeName( elem, name ) { 2843 2844 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 2845 2846 }; 2846 2847 var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); 2847 2848 … … 3195 3196 }, 3196 3197 contents: function( elem ) { 3197 return elem.contentDocument || jQuery.merge( [], elem.childNodes ); 3198 if ( nodeName( elem, "iframe" ) ) { 3199 return elem.contentDocument; 3200 } 3201 3202 // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only 3203 // Treat the template element as a regular one in browsers that 3204 // don't support it. 3205 if ( nodeName( elem, "template" ) ) { 3206 elem = elem.content || elem; 3207 } 3208 3209 return jQuery.merge( [], elem.childNodes ); 3198 3210 } 3199 3211 }, function( name, fn ) { … … 3241 3253 * Create a callback list using the following parameters: 3242 3254 * 3243 * options: an optional list of space-separated options that will change how3244 * the callback list behaves or a more traditional option object3255 * options: an optional list of space-separated options that will change how 3256 * the callback list behaves or a more traditional option object 3245 3257 * 3246 3258 * By default a callback list will act like an event callback list and can be … … 3249 3261 * Possible options: 3250 3262 * 3251 * once:will ensure the callback list can only be fired once (like a Deferred)3263 * once: will ensure the callback list can only be fired once (like a Deferred) 3252 3264 * 3253 * memory:will keep track of previous values and will call any callback added3254 * after the list has been fired right away with the latest "memorized"3255 * values (like a Deferred)3265 * memory: will keep track of previous values and will call any callback added 3266 * after the list has been fired right away with the latest "memorized" 3267 * values (like a Deferred) 3256 3268 * 3257 * unique:will ensure a callback can only be added once (no duplicate in the list)3269 * unique: will ensure a callback can only be added once (no duplicate in the list) 3258 3270 * 3259 * stopOnFalse: interrupt callings when a callback returns false3271 * stopOnFalse: interrupt callings when a callback returns false 3260 3272 * 3261 3273 */ … … 3293 3305 3294 3306 // Enforce single-firing 3295 locked = options.once;3307 locked = locked || options.once; 3296 3308 3297 3309 // Execute callbacks for all pending executions, … … 3462 3474 } 3463 3475 3464 function adoptValue( value, resolve, reject ) {3476 function adoptValue( value, resolve, reject, noValue ) { 3465 3477 var method; 3466 3478 … … 3478 3490 } else { 3479 3491 3480 // Support: Android 4.0 only 3481 // Strict mode functions invoked without .call/.apply get global-object context 3482 resolve.call( undefined, value ); 3492 // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: 3493 // * false: [ value ].slice( 0 ) => resolve( value ) 3494 // * true: [ value ].slice( 1 ) => resolve() 3495 resolve.apply( undefined, [ value ].slice( noValue ) ); 3483 3496 } 3484 3497 … … 3490 3503 // Support: Android 4.0 only 3491 3504 // Strict mode functions invoked without .call/.apply get global-object context 3492 reject. call( undefined, value);3505 reject.apply( undefined, [ value ] ); 3493 3506 } 3494 3507 } … … 3815 3828 // Single- and empty arguments are adopted like Promise.resolve 3816 3829 if ( remaining <= 1 ) { 3817 adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject ); 3830 adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, 3831 !remaining ); 3818 3832 3819 3833 // Use .then() to unwrap secondary thenables (cf. gh-3000) … … 3886 3900 // the ready event fires. See #6781 3887 3901 readyWait: 1, 3888 3889 // Hold (or release) the ready event3890 holdReady: function( hold ) {3891 if ( hold ) {3892 jQuery.readyWait++;3893 } else {3894 jQuery.ready( true );3895 }3896 },3897 3902 3898 3903 // Handle when the DOM is ready … … 4131 4136 4132 4137 // Support array or space separated string of keys 4133 if ( jQuery.isArray( key ) ) {4138 if ( Array.isArray( key ) ) { 4134 4139 4135 4140 // If key is an array of keys... … … 4178 4183 4179 4184 4180 // Implementation Summary4185 // Implementation Summary 4181 4186 // 4182 // 1. Enforce API surface and semantic compatibility with 1.9.x branch4183 // 2. Improve the module's maintainability by reducing the storage4184 // paths to a single mechanism.4185 // 3. Use the same single mechanism to support "private" and "user" data.4186 // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)4187 // 5. Avoid exposing implementation details on user objects (eg. expando properties)4188 // 6. Provide a clear path for implementation upgrade to WeakMap in 20144187 // 1. Enforce API surface and semantic compatibility with 1.9.x branch 4188 // 2. Improve the module's maintainability by reducing the storage 4189 // paths to a single mechanism. 4190 // 3. Use the same single mechanism to support "private" and "user" data. 4191 // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) 4192 // 5. Avoid exposing implementation details on user objects (eg. expando properties) 4193 // 6. Provide a clear path for implementation upgrade to WeakMap in 2014 4189 4194 4190 4195 var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, … … 4357 4362 // Speed up dequeue by getting out quickly if this is just a lookup 4358 4363 if ( data ) { 4359 if ( !queue || jQuery.isArray( data ) ) {4364 if ( !queue || Array.isArray( data ) ) { 4360 4365 queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); 4361 4366 } else { … … 4734 4739 } 4735 4740 4736 if ( tag === undefined || tag && jQuery.nodeName( context, tag ) ) {4741 if ( tag === undefined || tag && nodeName( context, tag ) ) { 4737 4742 return jQuery.merge( [ context ], ret ); 4738 4743 } … … 5341 5346 // For checkbox, fire native event so checked state will be right 5342 5347 trigger: function() { 5343 if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {5348 if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) { 5344 5349 this.click(); 5345 5350 return false; … … 5349 5354 // For cross-browser consistency, don't fire native .click() on links 5350 5355 _default: function( event ) { 5351 return jQuery.nodeName( event.target, "a" );5356 return nodeName( event.target, "a" ); 5352 5357 } 5353 5358 }, … … 5626 5631 rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; 5627 5632 5633 // Prefer a tbody over its parent table for containing new rows 5628 5634 function manipulationTarget( elem, content ) { 5629 if ( jQuery.nodeName( elem, "table" ) &&5630 jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {5631 5632 return elem.getElementsByTagName( "tbody")[ 0 ] || elem;5635 if ( nodeName( elem, "table" ) && 5636 nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { 5637 5638 return jQuery( ">tbody", elem )[ 0 ] || elem; 5633 5639 } 5634 5640 … … 6160 6166 function curCSS( elem, name, computed ) { 6161 6167 var width, minWidth, maxWidth, ret, 6168 6169 // Support: Firefox 51+ 6170 // Retrieving style before computed somehow 6171 // fixes an issue with getting wrong values 6172 // on detached elements 6162 6173 style = elem.style; 6163 6174 6164 6175 computed = computed || getStyles( elem ); 6165 6176 6166 // Support: IE <=9 only 6167 // getPropertyValue is only needed for .css('filter') (#12537) 6177 // getPropertyValue is needed for: 6178 // .css('filter') (IE 9 only, #12537) 6179 // .css('--customProperty) (#3144) 6168 6180 if ( computed ) { 6169 6181 ret = computed.getPropertyValue( name ) || computed[ name ]; … … 6231 6243 // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display 6232 6244 rdisplayswap = /^(none|table(?!-c[ea]).+)/, 6245 rcustomProp = /^--/, 6233 6246 cssShow = { position: "absolute", visibility: "hidden", display: "block" }, 6234 6247 cssNormalTransform = { … … 6260 6273 } 6261 6274 6275 // Return a property mapped along what jQuery.cssProps suggests or to 6276 // a vendor prefixed property. 6277 function finalPropName( name ) { 6278 var ret = jQuery.cssProps[ name ]; 6279 if ( !ret ) { 6280 ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; 6281 } 6282 return ret; 6283 } 6284 6262 6285 function setPositiveNumber( elem, value, subtract ) { 6263 6286 … … 6320 6343 function getWidthOrHeight( elem, name, extra ) { 6321 6344 6322 // Start with offset property, which is equivalent to the border-box value 6323 var val, 6324 valueIsBorderBox = true, 6345 // Start with computed style 6346 var valueIsBorderBox, 6325 6347 styles = getStyles( elem ), 6348 val = curCSS( elem, name, styles ), 6326 6349 isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; 6327 6350 6328 // Support: IE <=11 only 6329 // Running getBoundingClientRect on a disconnected node 6330 // in IE throws an error. 6331 if ( elem.getClientRects().length ) { 6332 val = elem.getBoundingClientRect()[ name ]; 6333 } 6334 6335 // Some non-html elements return undefined for offsetWidth, so check for null/undefined 6336 // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 6337 // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 6338 if ( val <= 0 || val == null ) { 6339 6340 // Fall back to computed then uncomputed css if necessary 6341 val = curCSS( elem, name, styles ); 6342 if ( val < 0 || val == null ) { 6343 val = elem.style[ name ]; 6344 } 6345 6346 // Computed unit is not pixels. Stop here and return. 6347 if ( rnumnonpx.test( val ) ) { 6348 return val; 6349 } 6350 6351 // Check for style in case a browser which returns unreliable values 6352 // for getComputedStyle silently falls back to the reliable elem.style 6353 valueIsBorderBox = isBorderBox && 6354 ( support.boxSizingReliable() || val === elem.style[ name ] ); 6355 6356 // Normalize "", auto, and prepare for extra 6357 val = parseFloat( val ) || 0; 6358 } 6351 // Computed unit is not pixels. Stop here and return. 6352 if ( rnumnonpx.test( val ) ) { 6353 return val; 6354 } 6355 6356 // Check for style in case a browser which returns unreliable values 6357 // for getComputedStyle silently falls back to the reliable elem.style 6358 valueIsBorderBox = isBorderBox && 6359 ( support.boxSizingReliable() || val === elem.style[ name ] ); 6360 6361 // Fall back to offsetWidth/Height when value is "auto" 6362 // This happens for inline elements with no explicit setting (gh-3571) 6363 if ( val === "auto" ) { 6364 val = elem[ "offset" + name[ 0 ].toUpperCase() + name.slice( 1 ) ]; 6365 } 6366 6367 // Normalize "", auto, and prepare for extra 6368 val = parseFloat( val ) || 0; 6359 6369 6360 6370 // Use the active box-sizing model to add/subtract irrelevant styles … … 6421 6431 var ret, type, hooks, 6422 6432 origName = jQuery.camelCase( name ), 6433 isCustomProp = rcustomProp.test( name ), 6423 6434 style = elem.style; 6424 6435 6425 name = jQuery.cssProps[ origName ] || 6426 ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName ); 6436 // Make sure that we're working with the right name. We don't 6437 // want to query the value if it is a CSS custom property 6438 // since they are user-defined. 6439 if ( !isCustomProp ) { 6440 name = finalPropName( origName ); 6441 } 6427 6442 6428 6443 // Gets hook for the prefixed version, then unprefixed version … … 6460 6475 ( value = hooks.set( elem, value, extra ) ) !== undefined ) { 6461 6476 6462 style[ name ] = value; 6477 if ( isCustomProp ) { 6478 style.setProperty( name, value ); 6479 } else { 6480 style[ name ] = value; 6481 } 6463 6482 } 6464 6483 … … 6479 6498 css: function( elem, name, extra, styles ) { 6480 6499 var val, num, hooks, 6481 origName = jQuery.camelCase( name ); 6482 6483 // Make sure that we're working with the right name 6484 name = jQuery.cssProps[ origName ] || 6485 ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName ); 6500 origName = jQuery.camelCase( name ), 6501 isCustomProp = rcustomProp.test( name ); 6502 6503 // Make sure that we're working with the right name. We don't 6504 // want to modify the value if it is a CSS custom property 6505 // since they are user-defined. 6506 if ( !isCustomProp ) { 6507 name = finalPropName( origName ); 6508 } 6486 6509 6487 6510 // Try prefixed name followed by the unprefixed name … … 6508 6531 return extra === true || isFinite( num ) ? num || 0 : val; 6509 6532 } 6533 6510 6534 return val; 6511 6535 } … … 6607 6631 i = 0; 6608 6632 6609 if ( jQuery.isArray( name ) ) {6633 if ( Array.isArray( name ) ) { 6610 6634 styles = getStyles( elem ); 6611 6635 len = name.length; … … 6745 6769 6746 6770 var 6747 fxNow, timerId,6771 fxNow, inProgress, 6748 6772 rfxtypes = /^(?:toggle|show|hide)$/, 6749 6773 rrun = /queueHooks$/; 6750 6774 6751 function raf() { 6752 if ( timerId ) { 6753 window.requestAnimationFrame( raf ); 6775 function schedule() { 6776 if ( inProgress ) { 6777 if ( document.hidden === false && window.requestAnimationFrame ) { 6778 window.requestAnimationFrame( schedule ); 6779 } else { 6780 window.setTimeout( schedule, jQuery.fx.interval ); 6781 } 6782 6754 6783 jQuery.fx.tick(); 6755 6784 } … … 6978 7007 easing = specialEasing[ name ]; 6979 7008 value = props[ index ]; 6980 if ( jQuery.isArray( value ) ) {7009 if ( Array.isArray( value ) ) { 6981 7010 easing = value[ 1 ]; 6982 7011 value = props[ index ] = value[ 0 ]; … … 7037 7066 deferred.notifyWith( elem, [ animation, percent, remaining ] ); 7038 7067 7068 // If there's more to do, yield 7039 7069 if ( percent < 1 && length ) { 7040 7070 return remaining; 7041 } else { 7042 deferred.resolveWith( elem, [ animation ] ); 7043 return false; 7044 } 7071 } 7072 7073 // If this was an empty animation, synthesize a final progress notification 7074 if ( !length ) { 7075 deferred.notifyWith( elem, [ animation, 1, 0 ] ); 7076 } 7077 7078 // Resolve the animation and report its conclusion 7079 deferred.resolveWith( elem, [ animation ] ); 7080 return false; 7045 7081 }, 7046 7082 animation = deferred.promise( { … … 7107 7143 } 7108 7144 7145 // Attach callbacks from options 7146 animation 7147 .progress( animation.opts.progress ) 7148 .done( animation.opts.done, animation.opts.complete ) 7149 .fail( animation.opts.fail ) 7150 .always( animation.opts.always ); 7151 7109 7152 jQuery.fx.timer( 7110 7153 jQuery.extend( tick, { … … 7115 7158 ); 7116 7159 7117 // attach callbacks from options 7118 return animation.progress( animation.opts.progress ) 7119 .done( animation.opts.done, animation.opts.complete ) 7120 .fail( animation.opts.fail ) 7121 .always( animation.opts.always ); 7160 return animation; 7122 7161 } 7123 7162 … … 7170 7209 }; 7171 7210 7172 // Go to the end state if fx are off or if document is hidden7173 if ( jQuery.fx.off || document.hidden) {7211 // Go to the end state if fx are off 7212 if ( jQuery.fx.off ) { 7174 7213 opt.duration = 0; 7175 7214 … … 7363 7402 timer = timers[ i ]; 7364 7403 7365 // Checks the timer has not already been removed7404 // Run the timer and safely remove it when done (allowing for external removal) 7366 7405 if ( !timer() && timers[ i ] === timer ) { 7367 7406 timers.splice( i--, 1 ); … … 7377 7416 jQuery.fx.timer = function( timer ) { 7378 7417 jQuery.timers.push( timer ); 7379 if ( timer() ) { 7380 jQuery.fx.start(); 7381 } else { 7382 jQuery.timers.pop(); 7383 } 7418 jQuery.fx.start(); 7384 7419 }; 7385 7420 7386 7421 jQuery.fx.interval = 13; 7387 7422 jQuery.fx.start = function() { 7388 if ( !timerId ) { 7389 timerId = window.requestAnimationFrame ? 7390 window.requestAnimationFrame( raf ) : 7391 window.setInterval( jQuery.fx.tick, jQuery.fx.interval ); 7392 } 7423 if ( inProgress ) { 7424 return; 7425 } 7426 7427 inProgress = true; 7428 schedule(); 7393 7429 }; 7394 7430 7395 7431 jQuery.fx.stop = function() { 7396 if ( window.cancelAnimationFrame ) { 7397 window.cancelAnimationFrame( timerId ); 7398 } else { 7399 window.clearInterval( timerId ); 7400 } 7401 7402 timerId = null; 7432 inProgress = null; 7403 7433 }; 7404 7434 … … 7517 7547 set: function( elem, value ) { 7518 7548 if ( !support.radioValue && value === "radio" && 7519 jQuery.nodeName( elem, "input" ) ) {7549 nodeName( elem, "input" ) ) { 7520 7550 var val = elem.value; 7521 7551 elem.setAttribute( "type", value ); … … 7948 7978 val += ""; 7949 7979 7950 } else if ( jQuery.isArray( val ) ) {7980 } else if ( Array.isArray( val ) ) { 7951 7981 val = jQuery.map( val, function( value ) { 7952 7982 return value == null ? "" : value + ""; … … 8007 8037 !option.disabled && 8008 8038 ( !option.parentNode.disabled || 8009 ! jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {8039 !nodeName( option.parentNode, "optgroup" ) ) ) { 8010 8040 8011 8041 // Get the specific value for the option … … 8059 8089 jQuery.valHooks[ this ] = { 8060 8090 set: function( elem, value ) { 8061 if ( jQuery.isArray( value ) ) {8091 if ( Array.isArray( value ) ) { 8062 8092 return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); 8063 8093 } … … 8354 8384 var name; 8355 8385 8356 if ( jQuery.isArray( obj ) ) {8386 if ( Array.isArray( obj ) ) { 8357 8387 8358 8388 // Serialize array item. … … 8406 8436 8407 8437 // If an array was passed in, assume that it is an array of form elements. 8408 if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {8438 if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { 8409 8439 8410 8440 // Serialize the form elements … … 8452 8482 } 8453 8483 8454 if ( jQuery.isArray( val ) ) {8484 if ( Array.isArray( val ) ) { 8455 8485 return jQuery.map( val, function( val ) { 8456 8486 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; … … 9877 9907 9878 9908 9879 /**9880 * Gets a window from an element9881 */9882 function getWindow( elem ) {9883 return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;9884 }9885 9886 9909 jQuery.offset = { 9887 9910 setOffset: function( elem, options, i ) { … … 9948 9971 } 9949 9972 9950 var doc Elem, win, rect, doc,9973 var doc, docElem, rect, win, 9951 9974 elem = this[ 0 ]; 9952 9975 … … 9955 9978 } 9956 9979 9980 // Return zeros for disconnected and hidden (display: none) elements (gh-2310) 9957 9981 // Support: IE <=11 only 9958 9982 // Running getBoundingClientRect on a … … 9964 9988 rect = elem.getBoundingClientRect(); 9965 9989 9966 // Make sure element is not hidden (display: none) 9967 if ( rect.width || rect.height ) { 9968 doc = elem.ownerDocument; 9969 win = getWindow( doc ); 9970 docElem = doc.documentElement; 9971 9972 return { 9973 top: rect.top + win.pageYOffset - docElem.clientTop, 9974 left: rect.left + win.pageXOffset - docElem.clientLeft 9975 }; 9976 } 9977 9978 // Return zeros for disconnected and hidden elements (gh-2310) 9979 return rect; 9990 doc = elem.ownerDocument; 9991 docElem = doc.documentElement; 9992 win = doc.defaultView; 9993 9994 return { 9995 top: rect.top + win.pageYOffset - docElem.clientTop, 9996 left: rect.left + win.pageXOffset - docElem.clientLeft 9997 }; 9980 9998 }, 9981 9999 … … 10003 10021 // Get correct offsets 10004 10022 offset = this.offset(); 10005 if ( ! jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {10023 if ( !nodeName( offsetParent[ 0 ], "html" ) ) { 10006 10024 parentOffset = offsetParent.offset(); 10007 10025 } … … 10050 10068 jQuery.fn[ method ] = function( val ) { 10051 10069 return access( this, function( elem, method, val ) { 10052 var win = getWindow( elem ); 10070 10071 // Coalesce documents and windows 10072 var win; 10073 if ( jQuery.isWindow( elem ) ) { 10074 win = elem; 10075 } else if ( elem.nodeType === 9 ) { 10076 win = elem.defaultView; 10077 } 10053 10078 10054 10079 if ( val === undefined ) { … … 10159 10184 } ); 10160 10185 10186 jQuery.holdReady = function( hold ) { 10187 if ( hold ) { 10188 jQuery.readyWait++; 10189 } else { 10190 jQuery.ready( true ); 10191 } 10192 }; 10193 jQuery.isArray = Array.isArray; 10161 10194 jQuery.parseJSON = JSON.parse; 10195 jQuery.nodeName = nodeName; 10162 10196 10163 10197 … … 10216 10250 10217 10251 10218 10219 10252 return jQuery; 10220 10253 } ); -
trunk/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/todomvc-app-css/index.css
r216716 r220800 113 113 } 114 114 115 label[for='toggle-all'] {116 display: none;117 }118 119 115 .toggle-all { 120 position: absolute; 121 top: -55px; 122 left: -12px; 116 text-align: center; 117 border: none; /* Mobile Safari */ 118 opacity: 0; 119 position: absolute; 120 } 121 122 .toggle-all + label { 123 123 width: 60px; 124 124 height: 34px; 125 text-align: center; 126 border: none; /* Mobile Safari */ 127 } 128 129 .toggle-all:before { 125 font-size: 0; 126 position: absolute; 127 top: -52px; 128 left: -13px; 129 -webkit-transform: rotate(90deg); 130 transform: rotate(90deg); 131 } 132 133 .toggle-all + label:before { 130 134 content: '❯'; 131 135 font-size: 22px; … … 134 138 } 135 139 136 .toggle-all:checked :before {140 .toggle-all:checked + label:before { 137 141 color: #737373; 138 142 } … … 184 188 } 185 189 186 .todo-list li .toggle:after { 187 content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="-10 -18 100 135"><circle cx="50" cy="50" r="50" fill="none" stroke="#ededed" stroke-width="3"/></svg>'); 188 } 189 190 .todo-list li .toggle:checked:after { 191 content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="-10 -18 100 135"><circle cx="50" cy="50" r="50" fill="none" stroke="#bddad5" stroke-width="3"/><path fill="#5dc2af" d="M72 25L42 71 27 56l-4 4 20 20 34-52z"/></svg>'); 190 .todo-list li .toggle { 191 opacity: 0; 192 } 193 194 .todo-list li .toggle + label { 195 /* 196 Firefox requires `#` to be escaped - https://bugzilla.mozilla.org/show_bug.cgi?id=922433 197 IE and Edge requires *everything* to be escaped to render, so we do that instead of just the `#` - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7157459/ 198 */ 199 background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23ededed%22%20stroke-width%3D%223%22/%3E%3C/svg%3E'); 200 background-repeat: no-repeat; 201 background-position: center left; 202 } 203 204 .todo-list li .toggle:checked + label { 205 background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23bddad5%22%20stroke-width%3D%223%22/%3E%3Cpath%20fill%3D%22%235dc2af%22%20d%3D%22M72%2025L42%2071%2027%2056l-4%204%2020%2020%2034-52z%22/%3E%3C/svg%3E'); 192 206 } 193 207 194 208 .todo-list li label { 195 209 word-break: break-all; 196 padding: 15px 60px 15px 15px; 197 margin-left: 45px; 210 padding: 15px 15px 15px 60px; 198 211 display: block; 199 212 line-height: 1.2; … … 351 364 height: 40px; 352 365 } 353 354 .toggle-all {355 -webkit-transform: rotate(90deg);356 transform: rotate(90deg);357 -webkit-appearance: none;358 appearance: none;359 }360 366 } 361 367 -
trunk/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/backbone/readme.md
r156073 r220800 1 # Backbone.js TodoMVC Example1 # Speedometer 2.0: Backbone.js TodoMVC example 2 2 3 > Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface. 3 ## Test locally 4 4 5 > _[Backbone.js - backbonejs.org](http://backbonejs.org)_ 5 1. Run `npm install` to install the dependencies. 6 2. Run a local server from this directory. (You could use [`npm i -g http-server`](https://github.com/indexzero/http-server).) 7 3. Open the URL pointing to the local server in your web browser of choice. 6 8 9 ## Build 7 10 8 ## Learning Backbone.js 9 10 The [Backbone.js website](http://backbonejs.org) is a great resource for getting started. 11 12 Here are some links you may find helpful: 13 14 * [Annotated source code](http://backbonejs.org/docs/backbone.html) 15 * [Applications built with Backbone.js](http://backbonejs.org/#examples) 16 * [FAQ](http://backbonejs.org/#faq) 17 18 Articles and guides from the community: 19 20 * [Developing Backbone.js Applications](http://addyosmani.github.io/backbone-fundamentals) 21 * [Collection of tutorials, blog posts, and example sites](https://github.com/documentcloud/backbone/wiki/Tutorials%2C-blog-posts-and-example-sites) 22 23 Get help from other Backbone.js users: 24 25 * [Backbone.js on StackOverflow](http://stackoverflow.com/questions/tagged/backbone.js) 26 * [Google Groups mailing list](https://groups.google.com/forum/#!forum/backbonejs) 27 * [Backbone.js on Twitter](http://twitter.com/documentcloud) 28 29 _If you have other helpful links to share, or find any of the links above no longer work, please [let us know](https://github.com/tastejs/todomvc/issues)._ 11 There is no build step for this example.
Note: See TracChangeset
for help on using the changeset viewer.