Adjust gfx::Rect's width and height to avoid integer overflow

It is possible that the origin plus the bounds of a gfx::Rect can exceed
the range of an integer, as reflected in clusterfuzz.

This CL makes gfx::Rect adjust the width and height if origin + bounds
can result in an overflow.

BUG=637985
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2268423003
Cr-Commit-Position: refs/heads/master@{#416118}


CrOS-Libchrome-Original-Commit: 86fc67cca4eaad94ec7bf3daebf905939abdd03c
3 files changed
tree: 6e390d3805a28e058dfd4b224f284fa21e2b8eb4
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/