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

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

Issue 7639023: Revert 96567 - Reland 96406 - Print preview page selection should not require a rerendering of dr... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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/page_settings.js
===================================================================
--- chrome/browser/resources/print_preview/page_settings.js (revision 96579)
+++ chrome/browser/resources/print_preview/page_settings.js (working copy)
@@ -177,8 +177,9 @@
/**
* Updates |this.previouslySelectedPages_| with the currently selected
* pages.
+ * @private
*/
- updatePageSelection: function() {
+ updatePageSelection_: function() {
this.previouslySelectedPages_ = this.selectedPagesSet;
},
@@ -193,14 +194,6 @@
},
/**
- * Checks if the page selection has changed and is valid.
- * @return {boolean} true if the page selection is changed and is valid.
- */
- hasPageSelectionChangedAndIsValid: function() {
- return this.isPageSelectionValid() && this.hasPageSelectionChanged_();
- },
-
- /**
* Validates the contents of |this.selectedPagesTextfield|.
*
* @return {boolean} true if the text is valid.
@@ -219,8 +212,8 @@
* @return {boolean} true if a new preview was requested.
*/
requestPrintPreviewIfNeeded: function() {
- if (this.hasPageSelectionChangedAndIsValid()) {
- this.updatePageSelection();
+ if (this.isPageSelectionValid() && this.hasPageSelectionChanged_()) {
+ this.updatePageSelection_();
requestPrintPreview();
return true;
}
@@ -281,6 +274,7 @@
cr.dispatchSimpleEvent(document, 'updatePrintButton');
return;
}
+ this.previouslySelectedPages_ = this.selectedPagesSet;
requestPrintPreview();
},
« no previous file with comments | « chrome/browser/printing/print_preview_message_handler.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