cc: Clamp the fixed thumb size to be at least zero.
WebKit is providing a negative thumb size sometimes, which causes asserts in gfx::Size once we re-enable those DCHECKs. BUG=160799 R=enne Review URL: https://chromiumcodereview.appspot.com/11365247 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167766 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user