Chromium Code Reviews| Index: Source/platform/scroll/ScrollbarTheme.cpp |
| diff --git a/Source/platform/scroll/ScrollbarTheme.cpp b/Source/platform/scroll/ScrollbarTheme.cpp |
| index a2f67d12e936f4080b7fefa0566e969e6abc80ed..6385344184bf2f8ebe59f103d4de15348f191da5 100644 |
| --- a/Source/platform/scroll/ScrollbarTheme.cpp |
| +++ b/Source/platform/scroll/ScrollbarTheme.cpp |
| @@ -274,11 +274,17 @@ int ScrollbarTheme::thumbLength(ScrollbarThemeClient* scrollbar) |
| if (!scrollbar->enabled()) |
| return 0; |
| + // It is safe to compute the overhang by adding the result from the main |
| + // thread overscroll mode (first) // and then adding the result from |
|
Ken Russell (switch to Gerrit)
2014/12/22 23:46:08
Reformat this comment.
ccameron
2014/12/22 23:57:23
Done.
|
| + // compositor thread overscroll (second) because the modes are mutually |
| + // exclusive modes (determining which mode is in use here will require lots |
|
Ken Russell (switch to Gerrit)
2014/12/22 23:46:08
"modes are mutually exclusive"
ccameron
2014/12/22 23:57:23
Done.
|
| + // of temporary plumbing, and the main thread mode is to be deleted). |
| float overhang = 0; |
| if (scrollbar->currentPos() < 0) |
| overhang = -scrollbar->currentPos(); |
| else if (scrollbar->visibleSize() + scrollbar->currentPos() > scrollbar->totalSize()) |
| overhang = scrollbar->currentPos() + scrollbar->visibleSize() - scrollbar->totalSize(); |
| + overhang += fabsf(scrollbar->elasticOverscroll()); |
| float proportion = 0.0f; |
| float totalSize = usedTotalSize(scrollbar); |
| if (totalSize > 0.0f) { |