| OLD | NEW |
| 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 cr.define('print_preview', function() { | 5 cr.define('print_preview', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Draggable control for setting a page margin. | 9 * Draggable control for setting a page margin. |
| 10 * @param {!print_preview.ticket_items.CustomMargins.Orientation} orientation | 10 * @param {!print_preview.ticket_items.CustomMargins.Orientation} orientation |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 }, | 371 }, |
| 372 | 372 |
| 373 /** | 373 /** |
| 374 * Called when opacity CSS transition ends. | 374 * Called when opacity CSS transition ends. |
| 375 * @private | 375 * @private |
| 376 */ | 376 */ |
| 377 onWebkitTransitionEnd_: function(event) { | 377 onWebkitTransitionEnd_: function(event) { |
| 378 if (event.propertyName != 'opacity') | 378 if (event.propertyName != 'opacity') |
| 379 return; | 379 return; |
| 380 var elStyle = window.getComputedStyle(this.getElement()); | 380 var elStyle = window.getComputedStyle(this.getElement()); |
| 381 var opacity = parseInt(elStyle.getPropertyValue('opacity')); | 381 var opacity = parseInt(elStyle.getPropertyValue('opacity'), 10); |
| 382 this.textbox_.setAttribute('aria-hidden', opacity == 0); | 382 this.textbox_.setAttribute('aria-hidden', opacity == 0); |
| 383 }, | 383 }, |
| 384 | 384 |
| 385 /** | 385 /** |
| 386 * Called when textbox content changes. Starts text change timeout. | 386 * Called when textbox content changes. Starts text change timeout. |
| 387 * @private | 387 * @private |
| 388 */ | 388 */ |
| 389 onTextboxInput_: function(event) { | 389 onTextboxInput_: function(event) { |
| 390 if (this.textTimeout_) { | 390 if (this.textTimeout_) { |
| 391 clearTimeout(this.textTimeout_); | 391 clearTimeout(this.textTimeout_); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 this.setIsFocused_(false); | 432 this.setIsFocused_(false); |
| 433 cr.dispatchSimpleEvent(this, MarginControl.EventType.TEXT_CHANGE); | 433 cr.dispatchSimpleEvent(this, MarginControl.EventType.TEXT_CHANGE); |
| 434 } | 434 } |
| 435 }; | 435 }; |
| 436 | 436 |
| 437 // Export | 437 // Export |
| 438 return { | 438 return { |
| 439 MarginControl: MarginControl | 439 MarginControl: MarginControl |
| 440 }; | 440 }; |
| 441 }); | 441 }); |
| OLD | NEW |