gfx: Make conversions from Size to SizeF be explicit.

This removes the implicit operator from Size to SizeF and adds an
explicit constructor instead.

There are many places in the code that want to do:

an_integer_size = ToFlooredSize(ScaleSize(an_integer_size, x));

This would make these all look like

an_integer_size = ToFlooredSize(ScaleSize(gfx::RectF(an_integer_size), x));

But that's pretty verbose. So add helpers similar to those we have
already for gfx::Rect, for when you want to scale a Size to a Size,
such as

an_integer_size = ScaleToFlooredSize(an_integer_size, x);

R=sky@chromium.org, vmpstr
BUG=342848
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#350889}


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