Make sure that the border width isn't larger than the border box.

The border box is subject to pixel snapping, but the border width is
rounded.  If the border box snaps down and the border width rounds up,
overpainting can occur.  The border widths are now clamped to the
corresponding border box dimension to prevent this.  This behavior
is in line with Edge.

BUG=739431

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I622d721579a0aad8109900268ca88d5cd85dd11e
Reviewed-on: https://chromium-review.googlesource.com/695109
Commit-Queue: Karl Anders Øygard <karlo@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#507644}
5 files changed