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

Unified Diff: cc/scrollbar_geometry_stub.cc

Issue 11365247: cc: Clamp the fixed thumb size to be at least zero. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: header Created 8 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scrollbar_geometry_stub.cc
diff --git a/cc/scrollbar_geometry_stub.cc b/cc/scrollbar_geometry_stub.cc
index b9f8cf23033d678605f41104289e550aa53b0233..51fc4f934cbf4749d9546263687f45bb8639f665 100644
--- a/cc/scrollbar_geometry_stub.cc
+++ b/cc/scrollbar_geometry_stub.cc
@@ -4,6 +4,8 @@
#include "cc/scrollbar_geometry_stub.h"
+#include <cmath>
+
using WebKit::WebRect;
using WebKit::WebScrollbar;
using WebKit::WebScrollbarThemeGeometry;
@@ -31,7 +33,7 @@ int ScrollbarGeometryStub::thumbPosition(WebScrollbar* scrollbar)
int ScrollbarGeometryStub::thumbLength(WebScrollbar* scrollbar)
{
- return m_geometry->thumbLength(scrollbar);
+ return std::max(0, m_geometry->thumbLength(scrollbar));
}
int ScrollbarGeometryStub::trackPosition(WebScrollbar* scrollbar)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698