Fix rounding in paintSelection
authoreae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2012 20:57:38 +0000 (20:57 +0000)
committereae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2012 20:57:38 +0000 (20:57 +0000)
commitd55f3c01676eec7516a89b4f3edae1a3b144f3de
tree8bd5580e5bd99c519e3c1dae1e9dcac45dc7502d
parentbb01c7b500207676ad7edb35d8592fdfe34b5695
Fix rounding in paintSelection
https://bugs.webkit.org/show_bug.cgi?id=86693

Reviewed by Eric Seidel.

Break out rounding logic from InlineTextBox::paintSelection into separate
function and use it for all the EllipsisBox paintSelection implementation
and selection gap calculation. This ensures that selections are painted
without gaps and overlaps once we turn on subpixel layout.

No new tests, covered by existing tests in editing/selection and
editing/style.

* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paintSelection):
* rendering/InlineTextBox.cpp:
(WebCore::alignSelectionRectToDevicePixels):
(WebCore):
(WebCore::InlineTextBox::paintSelection):
* rendering/InlineTextBox.h:
(WebCore):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftSelectionGap):
(WebCore::RenderBlock::logicalRightSelectionGap):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/EllipsisBox.cpp
Source/WebCore/rendering/InlineTextBox.cpp
Source/WebCore/rendering/InlineTextBox.h
Source/WebCore/rendering/RenderBlock.cpp