Compute outline mid-line in way that works with negative start-values

Since the expression (x1+x2)/2 will always "round" towards zero, if one
of the points (usually x1) is negative, the wrong "mid-line" will be
computed, and as a result part of the outline will shift right/down.
Instead compute the mid-line as x1+(x2-x1)/2 (or x1+thickness/2) i.e
perform the division on something that is known to be non-negative and
then offset from the starting point. (Similar reasoning for the other
dimension.)

BUG=529010

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

git-svn-id: svn://svn.chromium.org/blink/trunk@202205 bbb929c8-8fbe-4397-9dbb-9b2b20218538
3 files changed
tree: 00a670760cc2fd164534c1be9082dc9360bceb9a
  1. third_party/