Index: chrome/browser/resources/uber/uber_utils.js |
diff --git a/chrome/browser/resources/uber/uber_utils.js b/chrome/browser/resources/uber/uber_utils.js |
index 04f8ba1fe9391efab9a9cd882973ee51c93d491e..5f5c6d2a28af31465f8b9379ddb6dbe89a0a3806 100644 |
--- a/chrome/browser/resources/uber/uber_utils.js |
+++ b/chrome/browser/resources/uber/uber_utils.js |
@@ -39,7 +39,8 @@ cr.define('uber', function() { |
* @private |
*/ |
function handleScroll() { |
- var offset = document.documentElement.scrollLeft * -1; |
+ var scrollLeft = scrollLeftForDocument(document); |
+ var offset = scrollLeft * -1; |
for (var i = 0; i < headerElements.length; i++) { |
// As a workaround for http://crbug.com/231830, set the transform to |
// 'none' rather than 0px. |
@@ -47,7 +48,7 @@ cr.define('uber', function() { |
'translateX(' + offset + 'px)' : 'none'; |
} |
- invokeMethodOnParent('adjustToScroll', document.documentElement.scrollLeft); |
+ invokeMethodOnParent('adjustToScroll', scrollLeft); |
}; |
/** |
@@ -67,7 +68,7 @@ cr.define('uber', function() { |
* @private |
*/ |
function handleFrameSelected() { |
- document.documentElement.scrollLeft = 0; |
+ setScrollTopForDocument(document, 0); |
} |
/** |