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

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

Issue 1036943004: Use custom scrollbars for print preview on non-retina mac displays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/pdf/pdf.js
diff --git a/chrome/browser/resources/pdf/pdf.js b/chrome/browser/resources/pdf/pdf.js
index c652ca4f3ad0065447aa2a45c19b8c7517bbb633..5a513e11b80f262b28fd5daf895bde765ccd40f0 100644
--- a/chrome/browser/resources/pdf/pdf.js
+++ b/chrome/browser/resources/pdf/pdf.js
@@ -75,6 +75,16 @@ function PDFViewer(streamDetails) {
this.streamDetails_.originalUrl.indexOf('chrome://print') == 0;
this.isMaterial_ = location.pathname.substring(1) === 'index-material.html';
+ // Hack to enable custom scrollbars for print preview on non-retina mac
+ // displays. Remove after crbug.com/466039 is fixed.
+ if (this.isPrintPreview_) {
+ var link = document.createElement('link');
+ link.rel = 'stylesheet';
+ link.type = 'text/css';
+ link.href = 'scrollbars-mac.css';
+ document.getElementsByTagName('head')[0].appendChild(link);
+ }
+
// The sizer element is placed behind the plugin element to cause scrollbars
// to be displayed in the window. It is sized according to the document size
// of the pdf and zoom level.

Powered by Google App Engine
This is Rietveld 408576698