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. |