Fix a 'type-limits' warning in StringSlicer::FindValidBoundaryAfter
Fix a 'type-limits' warning in StringSlicer::FindValidBoundaryAfter

StringSlicer::FindValidBoundaryAfter passes a size_t value to the
'length' argument of U16_SET_CP_LIMIT, which expects the argument to be
an int32. When compiling with -Werror=type-limits, that results in the
following compilation error:

../../ui/gfx/text_elider.cc: In member function 'size_t
gfx::StringSlicer::FindValidBoundaryAfter(size_t) const':
../../ui/gfx/text_elider.cc:150:59: error: comparison of unsigned
expression < 0 is always false [-Werror=type-limits]
     U16_SET_CP_LIMIT(text_.data(), 0, index, text_.length());
                                                           ^
../../third_party/icu/source/common/unicode/utf16.h:618:41: note: in
definition of macro 'U16_SET_CP_LIMIT'
     if((start)<(i) && ((i)<(length) || (length)<0) &&
U16_IS_LEAD((s)[(i)-1]) && U16_IS_TRAIL((s)[i])) { \
                                         ^

This CL fixes the 'type-limits' warning above.

BUG=424334
TEST=Build mojo successfully with '-Werror=type-limits' and os="chromeos"

Original review URL: https://codereview.chromium.org/681123006

R=jamesr@chromium.org, jamesr

Review URL: https://codereview.chromium.org/693653002

chinmaygarde/mojo,afandria/mojo,chinmaygarde/mojo,chinmaygarde/mojo,jianglu/mojo,collinjackson/mojo,afandria/mojo,afandria/mojo,jianglu/mojo,collinjackson/mojo,afandria/mojo,collinjackson/mojo,afandria/mojo,chinmaygarde/mojo,collinjackson/mojo,collinjackson/mojo,collinjackson/mojo,afandria/mojo,chinmaygarde/mojo,jianglu/mojo,jianglu/mojo,jianglu/mojo,chinmaygarde/mojo,chinmaygarde/mojo,jianglu/mojo,jianglu/mojo,collinjackson/mojo,chinmaygarde/mojo,chinmaygarde/mojo,collinjackson/mojo,collinjackson/mojo,afandria/mojo,jianglu/mojo,afandria/mojo