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

Unified Diff: chrome/browser/resources/print_preview/print_preview.js

Issue 9699040: PrintPreview: Hide/Show the header footer option based on print frame margins. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/print_preview/print_preview.js
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js
index d39d666e4924aa39738980a91ad31d8619eba303..ede43d63cc4c571a68527842be7aaa32499ce151 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -872,8 +872,12 @@ function onDidGetPreviewPageCount(pageCount, previewResponseId) {
* in points.
* @param {boolean} hasCustomPageSizeStyle Indicates whether the previewed
* document has a custom page size style.
+ * @param {boolean} headerFooterApplies Indicates whether the header
+ * footer is applicable for the given settings.
*/
-function onDidGetDefaultPageLayout(pageLayout, hasCustomPageSizeStyle) {
+function onDidGetDefaultPageLayout(pageLayout,
+ hasCustomPageSizeStyle,
+ headerFooterApplies) {
hasPageSizeStyle = hasCustomPageSizeStyle;
marginSettings.currentDefaultPageLayout = new print_preview.PageLayout(
pageLayout.contentWidth,
@@ -882,6 +886,7 @@ function onDidGetDefaultPageLayout(pageLayout, hasCustomPageSizeStyle) {
pageLayout.marginTop,
pageLayout.marginRight,
pageLayout.marginBottom);
+ headerFooterSettings.setVisibility(headerFooterApplies);
}
/**

Powered by Google App Engine
This is Rietveld 408576698