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

Side by Side Diff: chrome/browser/resources/print_preview/previewarea/margin_control_container.js

Issue 574193002: Compile print_preview, part 1: remove all warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@true_master
Patch Set: rebase Created 6 years, 2 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 cr.define('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * UI component used for setting custom print margins. 9 * UI component used for setting custom print margins.
10 * @param {!print_preview.DocumentInfo} documentInfo Document data model. 10 * @param {!print_preview.DocumentInfo} documentInfo Document data model.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 if (scaleTransform != this.scaleTransform_) { 146 if (scaleTransform != this.scaleTransform_) {
147 this.scaleTransform_ = scaleTransform; 147 this.scaleTransform_ = scaleTransform;
148 for (var orientation in this.controls_) { 148 for (var orientation in this.controls_) {
149 this.controls_[orientation].setScaleTransform(scaleTransform); 149 this.controls_[orientation].setScaleTransform(scaleTransform);
150 } 150 }
151 } 151 }
152 }, 152 },
153 153
154 /** 154 /**
155 * Clips margin controls to the given clip size in pixels. 155 * Clips margin controls to the given clip size in pixels.
156 * @param {print_preview.Size} Size to clip the margin controls to. 156 * @param {print_preview.Size} clipSize Size to clip the margin controls to.
157 */ 157 */
158 updateClippingMask: function(clipSize) { 158 updateClippingMask: function(clipSize) {
159 if (!clipSize) { 159 if (!clipSize) {
160 return; 160 return;
161 } 161 }
162 this.clippingSize_ = clipSize; 162 this.clippingSize_ = clipSize;
163 for (var orientation in this.controls_) { 163 for (var orientation in this.controls_) {
164 var el = this.controls_[orientation].getElement(); 164 var el = this.controls_[orientation].getElement();
165 el.style.clip = 'rect(' + 165 el.style.clip = 'rect(' +
166 (-el.offsetTop) + 'px, ' + 166 (-el.offsetTop) + 'px, ' +
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } 456 }
457 } 457 }
458 } 458 }
459 }; 459 };
460 460
461 // Export 461 // Export
462 return { 462 return {
463 MarginControlContainer: MarginControlContainer 463 MarginControlContainer: MarginControlContainer
464 }; 464 };
465 }); 465 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698