Index: chrome/browser/resources/file_manager/css/gallery.css |
diff --git a/chrome/browser/resources/file_manager/css/gallery.css b/chrome/browser/resources/file_manager/css/gallery.css |
index fdb0b5adae1604545c5cc4e11ed473265c8b7cdf..505c94781acee051a4709b1185a6ed5fb73e9cd4 100644 |
--- a/chrome/browser/resources/file_manager/css/gallery.css |
+++ b/chrome/browser/resources/file_manager/css/gallery.css |
@@ -111,6 +111,43 @@ body { |
opacity: 0; |
} |
+/* Full resolution image is invisible unless printing. */ |
+.gallery > .image-container > canvas.fullres { |
+ display: none; |
+} |
+ |
+@media print { |
+ /* Do not print anything but the image. */ |
+ .gallery > :not(.image-container) { |
+ display: none !important; |
+ } |
+ |
+ /* Center the printed image. */ |
+ .gallery > .image-container { |
+ -webkit-box-align: center; |
+ -webkit-box-orient: horizontal; |
+ -webkit-box-pack: center; |
+ display: -webkit-box; |
+ } |
+ |
+ /* Do not print the screen resolution image. */ |
+ .gallery > .image-container > canvas.image { |
+ display: none !important; |
+ } |
+ |
+ /* Print the full resolution image instead. */ |
+ .gallery > .image-container > canvas.fullres { |
+ display: block !important; |
+ max-height: 100%; |
+ max-width: 100%; |
+ } |
+ |
+ /* Print video at the center of the page */ |
+ .gallery > .image-container > video.image { |
+ position: auto !important; |
+ } |
+} |
+ |
/* Toolbar */ |
.gallery > .toolbar { |