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

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

Issue 11818062: Adds option to enable CSS backgrounds for printing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge with trunk. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/print_preview/preview_generator.js
diff --git a/chrome/browser/resources/print_preview/preview_generator.js b/chrome/browser/resources/print_preview/preview_generator.js
index ac33649bc21b6f66005f7ff948313f14afd0bb7a..37bb0836610f6e95d33836c8e819e268be598a7b 100644
--- a/chrome/browser/resources/print_preview/preview_generator.js
+++ b/chrome/browser/resources/print_preview/preview_generator.js
@@ -91,6 +91,13 @@ cr.define('print_preview', function() {
this.marginsType_ = print_preview.ticket_items.MarginsType.Value.DEFAULT;
/**
+ * Whether the document should have element CSS backgrounds printed.
+ * @type {boolean}
+ * @private
+ */
+ this.isCssBackgroundEnabled_ = false;
+
+ /**
* Destination that was selected for the last preview.
* @type {print_preview.Destination}
* @private
@@ -153,6 +160,8 @@ cr.define('print_preview', function() {
this.isFitToPageEnabled_ = this.printTicketStore_.isFitToPageEnabled();
this.pageNumberSet_ = this.printTicketStore_.getPageNumberSet();
this.marginsType_ = this.printTicketStore_.getMarginsType();
+ this.isCssBackgroundEnabled_ =
+ this.printTicketStore_.isCssBackgroundEnabled();
this.selectedDestination_ = this.destinationStore_.selectedDestination;
this.inFlightRequestId_++;
@@ -256,6 +265,8 @@ cr.define('print_preview', function() {
print_preview.ticket_items.MarginsType.Value.CUSTOM &&
!ticketStore.getCustomMargins().equals(
ticketStore.getDocumentMargins())) ||
+ (ticketStore.isCssBackgroundEnabled() !=
+ this.isCssBackgroundEnabled_) ||
(this.selectedDestination_ !=
this.destinationStore_.selectedDestination);
},
« no previous file with comments | « chrome/browser/resources/print_preview/native_layer.js ('k') | chrome/browser/resources/print_preview/print_preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698