Subpixel rendering: Make selection gaps painting subpixel aware.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 May 2014 18:49:37 +0000 (18:49 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 May 2014 18:49:37 +0000 (18:49 +0000)
commitf42518143251daa6088a34c959ce441aa88b5144
tree80cf90f1208190564605149c7a777293fcd0bcdb
parent46add2589e8ad722c95fc77c6f44ed0fc58b68e7
Subpixel rendering: Make selection gaps painting subpixel aware.
https://bugs.webkit.org/show_bug.cgi?id=132169

Reviewed by Simon Fraser.

Push selection gaps painting to device pixel boundaries instead of integral CSS pixel positions.

Source/WebCore:
Test: fast/inline/hidpi-selection-gap-on-subpixel-position.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::blockSelectionGap):
(WebCore::RenderBlock::logicalLeftSelectionGap):
(WebCore::RenderBlock::logicalRightSelectionGap):

LayoutTests:
* fast/inline/hidpi-selection-gap-on-subpixel-position-expected.html: Added.
* fast/inline/hidpi-selection-gap-on-subpixel-position.html: Added. : &nbsp is needed to make
this test pass on WK2. Font rendering reports differences. 0.9 transparency is added so that
text selection code does modify the color's alpha channel and I can properly match it.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/inline/hidpi-selection-gap-on-subpixel-position-expected.html [new file with mode: 0644]
LayoutTests/fast/inline/hidpi-selection-gap-on-subpixel-position.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp