Index: chrome/browser/resources/pdf/pdf.js |
diff --git a/chrome/browser/resources/pdf/pdf.js b/chrome/browser/resources/pdf/pdf.js |
index e3cd1f346c96643af0e7550fb2da638d896e0f41..4b7e9ce9cee6ba92d4a33ccb70c108324fb759ad 100644 |
--- a/chrome/browser/resources/pdf/pdf.js |
+++ b/chrome/browser/resources/pdf/pdf.js |
@@ -569,6 +569,8 @@ PDFViewer.prototype = { |
if (this.materialToolbar_) |
this.materialToolbar_.strings = strings; |
this.zoomToolbar_.strings = strings; |
+ document.dir = strings['textdirection']; |
+ document.lang = strings['language']; |
} else { |
this.passwordScreen_.text = strings.passwordPrompt; |
this.progressBar_.text = strings.pageLoading; |
@@ -748,8 +750,9 @@ PDFViewer.prototype = { |
// will be half a scrollbar width further left than the spec but if there |
// is a scrollbar visible it will be half a scrollbar width further right |
// than the spec. |
- this.zoomToolbar_.style.right = -verticalScrollbarWidth + |
- (scrollbarWidth / 2) + 'px'; |
+ if (document.dir == 'ltr') |
raymes
2015/09/28 03:14:53
nit: add comment about why this is the case
add {}
tsergeant
2015/09/28 04:26:33
Done
|
+ this.zoomToolbar_.style.right = -verticalScrollbarWidth + |
+ (scrollbarWidth / 2) + 'px'; |
// Having a horizontal scrollbar is much rarer so we don't offset the |
// toolbar from the bottom any more than what the spec says. This means |
// that when there is a scrollbar visible, it will be a full scrollbar |