Fix selection rounding issues

Follow up for r176653 that failed to account for gap rects. Revert the
change to round the right edge (introduced in r176653) and instead
always round the two edges. This avoids having the right edge cut off
the end of the last character and results in a selection that better
represents the text.

Furthermore this allows us to remove rounding and precision hacks like
flooring values twice, adding epsilon or adjusting the clip rect to
account for over painting.

Also update inline and block gap selection painting to use the same
rounding logic instead of flooring and then pixel snapping as the
difference in rounding logic is what caused the selection over and
under painting bugs.

* EllipsisBox.cpp
  (EllipsisBox::paintSelection)
    Remove alignSelectionRectToDevicePixels call.
* InlineTextBox.cpp
  (alignSelectionRectToDevicePixels)
    Remove alignSelectionRectToDevicePixels helper function.
  (InlineTextBox::paintSelection)
    Remove alignSelectionRectToDevicePixels call.
* Font.cpp
  (FloatRect Font::pixelSnappedSelectionRect)
    Change how selection rects are snapped to device pixels to round
    both edges to avoid overlap and remove unnecesarry epsilon.
* RenderBlock.cpp
  (alignSelectionRectToDevicePixels)
    Add LayoutRect version of alignSelectionRectToDevicePixels mirroring
    the Font version.
  (RenderBlock::blockSelectionGap)
  (RenderBlock::logicalLeftSelectionGap)
  (RenderBlock::logicalRightSelectionGap)
    Update to use alignSelectionRectToDevicePixels instead of
    pixelSnappedIntRect and remove explicit floorToInt call.

TEST=editing/style/block-style-003.html,
     editing/style/create-block-for-style-006.html,
     editing/style/create-block-for-style-011.html,
     editing/style/create-block-for-style-012.html
BUG=388823
R=pdr@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177698 bbb929c8-8fbe-4397-9dbb-9b2b20218538