| Index: ui/views/controls/scrollbar/base_scroll_bar.cc
|
| diff --git a/ui/views/controls/scrollbar/base_scroll_bar.cc b/ui/views/controls/scrollbar/base_scroll_bar.cc
|
| index 2e9d7f277562bfeab5132bbd39cb29e9e26b5922..99ec75a5510baa15918982b277ed4243e63e9ca2 100644
|
| --- a/ui/views/controls/scrollbar/base_scroll_bar.cc
|
| +++ b/ui/views/controls/scrollbar/base_scroll_bar.cc
|
| @@ -388,7 +388,8 @@ void BaseScrollBar::ExecuteCommand(int id) {
|
| ///////////////////////////////////////////////////////////////////////////////
|
| // BaseScrollBar, ScrollBar implementation:
|
|
|
| -void BaseScrollBar::Update(int viewport_size, int content_size,
|
| +void BaseScrollBar::Update(int viewport_size,
|
| + int content_size,
|
| int contents_scroll_offset) {
|
| ScrollBar::Update(viewport_size, content_size, contents_scroll_offset);
|
|
|
| @@ -404,6 +405,7 @@ void BaseScrollBar::Update(int viewport_size, int content_size,
|
| contents_scroll_offset = 0;
|
| if (contents_scroll_offset > content_size)
|
| contents_scroll_offset = content_size;
|
| + contents_scroll_offset_ = contents_scroll_offset;
|
|
|
| // Thumb Height and Thumb Pos.
|
| // The height of the thumb is the ratio of the Viewport height to the
|
| @@ -498,7 +500,7 @@ int BaseScrollBar::CalculateThumbPosition(int contents_scroll_offset) const {
|
| }
|
|
|
| int BaseScrollBar::CalculateContentsOffset(int thumb_position,
|
| - bool scroll_to_middle) const {
|
| + bool scroll_to_middle) const {
|
| if (scroll_to_middle)
|
| thumb_position = thumb_position - (thumb_->GetSize() / 2);
|
| return (thumb_position * contents_size_) / GetTrackSize();
|
|
|