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

Unified Diff: chrome/browser/resources/file_manager/js/image_editor/image_view.js

Issue 10832270: Print photos in full resolution from the Photo Editor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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
« no previous file with comments | « chrome/browser/resources/file_manager/css/gallery.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/js/image_editor/image_view.js
diff --git a/chrome/browser/resources/file_manager/js/image_editor/image_view.js b/chrome/browser/resources/file_manager/js/image_editor/image_view.js
index 2b453877e6ee69eb8b554166ebc7527deccbc9dd..93b758239dc4e9e68952a16854872ea6f9006d03 100644
--- a/chrome/browser/resources/file_manager/js/image_editor/image_view.js
+++ b/chrome/browser/resources/file_manager/js/image_editor/image_view.js
@@ -495,6 +495,9 @@ ImageView.prototype.prefetch = function(id, url) {
ImageView.prototype.replaceContent_ = function(
content, opt_reuseScreenCanvas, opt_width, opt_height, opt_preview) {
+ if (this.contentCanvas_ && this.contentCanvas_.parentNode == this.container_)
+ this.container_.removeChild(this.contentCanvas_);
+
if (content.constructor.name == 'HTMLVideoElement') {
this.contentCanvas_ = null;
this.videoElement_ = content;
@@ -526,6 +529,10 @@ ImageView.prototype.replaceContent_ = function(
this.preview_ = opt_preview;
// If this is not a thumbnail, cache the content and the screen-scale image.
if (this.hasValidImage()) {
+ // Insert the full resolution canvas into DOM so that it can be printed.
+ this.container_.appendChild(this.contentCanvas_);
+ this.contentCanvas_.classList.add('fullres');
+
this.contentCache_.putItem(this.contentID_, this.contentCanvas_, true);
this.screenCache_.putItem(this.contentID_, this.screenImage_);
« no previous file with comments | « chrome/browser/resources/file_manager/css/gallery.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698