Fix numerical inaccuracy in background-size auto

We were using intrinsic_width * tile_size / intrinsic_height to
compute the auto size when only one dimension is given. The values
are in LayoutUnits and the expression overflows when the tile is
large and the image is large, resulting in significant distortion
of the background. The effect is most prominant on high-dpi devices
but also manifests at high zoom.

Bug: 921269
Change-Id: I78c2d0adf3c23b1b9d4158d2ffe8d775b3f5b9f4
Reviewed-on: https://chromium-review.googlesource.com/c/1413175
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623564}
5 files changed