Fix scrollbar overflow with ScaleToEnclosingRectSafe

ScaleToEnclosingRect DCHECKS that the scale that's being done won't
overflow, however this can't be known because the scrollbar's
internal scale is determined by page content.  Clamp these values
safely instead of DCHECKing.

R=danakj@chromium.org
BUG=652604
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

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


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