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

Side by Side Diff: chrome/browser/resources/print_preview/layout_settings.js

Issue 8585017: PrintPreview: Honor the print media page size and margin values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added one more test Created 8 years, 11 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 * Creates a LayoutSettings object. This object encapsulates all settings and 9 * Creates a LayoutSettings object. This object encapsulates all settings and
10 * logic related to layout mode (portrait/landscape). 10 * logic related to layout mode (portrait/landscape).
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // If the chosen layout is same as before, nothing needs to be done. 93 // If the chosen layout is same as before, nothing needs to be done.
94 if (this.hasChanged_()) 94 if (this.hasChanged_())
95 setDefaultValuesAndRegeneratePreview(true); 95 setDefaultValuesAndRegeneratePreview(true);
96 }, 96 },
97 97
98 /** 98 /**
99 * Listener executing when a |customEvents.PDF_LOADED| event occurs. 99 * Listener executing when a |customEvents.PDF_LOADED| event occurs.
100 * @private 100 * @private
101 */ 101 */
102 onPDFLoaded_: function() { 102 onPDFLoaded_: function() {
103 this.fadeInOut_(!previewModifiable); 103 this.fadeInOut_(!previewModifiable || hasPageSizeStyle);
104 }, 104 },
105 105
106 /** 106 /**
107 * @param {boolean} fadeOut True if |this.layoutOption_| should be faded 107 * @param {boolean} fadeOut True if |this.layoutOption_| should be faded
108 * out, false if it should be faded in. 108 * out, false if it should be faded in.
109 * @private 109 * @private
110 */ 110 */
111 fadeInOut_: function(fadeOut) { 111 fadeInOut_: function(fadeOut) {
112 fadeOut ? fadeOutOption(this.layoutOption_) : 112 fadeOut ? fadeOutOption(this.layoutOption_) :
113 fadeInOption(this.layoutOption_); 113 fadeInOption(this.layoutOption_);
114 } 114 }
115 }; 115 };
116 116
117 return { 117 return {
118 LayoutSettings: LayoutSettings, 118 LayoutSettings: LayoutSettings,
119 }; 119 };
120 }); 120 });
OLDNEW
« no previous file with comments | « chrome/browser/printing/printing_message_filter.cc ('k') | chrome/browser/resources/print_preview/print_preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698