Commit c7e99bb0 authored by nyquist@chromium.org's avatar nyquist@chromium.org

Remove DCHECK for negative sizes for Android

There are still places in downstream Android code where a negative size
is provided as width or height to the SizeBase template for set_width,
set_height and the constructor.

The DCHECK was added in:
https://chromiumcodereview.appspot.com/11410024

BUG=168927

Review URL: https://chromiumcodereview.appspot.com/11823012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175723 0039d316-1c4b-4281-b951-d872f2087c98
parent ead39c5d
......@@ -16,13 +16,18 @@ namespace gfx {
template<typename Class, typename Type>
void SizeBase<Class, Type>::set_width(Type width) {
#if !defined(OS_ANDROID)
// TODO(aelias): Remove these ifdefs for Android. See http://crbug.com/168927
DCHECK(!(width < 0));
#endif
width_ = width < 0 ? 0 : width;
}
template<typename Class, typename Type>
void SizeBase<Class, Type>::set_height(Type height) {
#if !defined(OS_ANDROID)
DCHECK(!(height < 0));
#endif
height_ = height < 0 ? 0 : height;
}
......@@ -30,8 +35,10 @@ template<typename Class, typename Type>
SizeBase<Class, Type>::SizeBase(Type width, Type height)
: width_(width < 0 ? 0 : width),
height_(height < 0 ? 0 : height) {
#if !defined(OS_ANDROID)
DCHECK(!(width < 0));
DCHECK(!(height < 0));
#endif
}
} // namespace gfx
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment