<rdar://problem/9155067> REGRESSION (float-based line boxes): Gaps and overlaps in...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 May 2011 09:19:17 +0000 (09:19 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 May 2011 09:19:17 +0000 (09:19 +0000)
commitc2518071730d5c4635c3718b45d3aa840147bccc
treefa877275eaa58d80473a3a1ba273e42bd568dea9
parent4cd5434ae7dd221cd0208f0eb2dc2f8c8e794982
<rdar://problem/9155067> REGRESSION (float-based line boxes): Gaps and overlaps in selection highlight
https://bugs.webkit.org/show_bug.cgi?id=56658

Reviewed by Anders Carlsson.

Source/WebCore:

Test: fast/text/selection-rect-rounding.html

* platform/graphics/FontFastPath.cpp:
(WebCore::Font::selectionRectForSimpleText): Account for non-integral anchor point coordinates.
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::selectionRectForComplexText): Ditto.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::selectionRect): Floor the horizontal sides of the clip rect.
(WebCore::InlineTextBox::paintSelection): Pass the logical left location to Font::selectionRectForText(),
since it affects rounding.

LayoutTests:

* fast/text/selection-rect-rounding.html: Added.
* platform/mac/fast/text/selection-rect-rounding-expected.png: Added.
* platform/mac/fast/text/selection-rect-rounding-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@85411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/text/selection-rect-rounding.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/text/selection-rect-rounding-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/text/selection-rect-rounding-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/FontFastPath.cpp
Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp
Source/WebCore/rendering/InlineTextBox.cpp