| Index: chrome/browser/resources/ntp4/tile_page.js
|
| ===================================================================
|
| --- chrome/browser/resources/ntp4/tile_page.js (revision 96867)
|
| +++ chrome/browser/resources/ntp4/tile_page.js (working copy)
|
| @@ -793,17 +793,21 @@
|
| this.scrollbarUpdate_ = 0;
|
|
|
| var content = this.content_;
|
| - if (content.scrollHeight == content.clientHeight) {
|
| +
|
| + // Adjust height to account for possible header-bar.
|
| + var adjustedClientHeight = content.clientHeight - content.offsetTop;
|
| +
|
| + if (content.scrollHeight == adjustedClientHeight) {
|
| this.scrollbar_.hidden = true;
|
| return;
|
| } else {
|
| this.scrollbar_.hidden = false;
|
| }
|
|
|
| - var thumbTop = content.scrollTop / content.scrollHeight *
|
| + var thumbTop = content.offsetTop +
|
| + content.scrollTop / content.scrollHeight * adjustedClientHeight;
|
| + var thumbHeight = adjustedClientHeight / content.scrollHeight *
|
| this.clientHeight;
|
| - var thumbHeight = content.clientHeight / content.scrollHeight *
|
| - this.clientHeight;
|
|
|
| this.scrollbar_.style.top = thumbTop + 'px';
|
| this.scrollbar_.style.height = thumbHeight + 'px';
|
|
|