Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1190)

Unified Diff: Source/platform/scroll/ScrollbarTheme.cpp

Issue 819953002: Mac: Update scrollbar size and input position during impl-overscroll (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Clean up Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698