Excessive expansion of justified text when rounding hacks are enabled
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jul 2011 00:39:46 +0000 (00:39 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jul 2011 00:39:46 +0000 (00:39 +0000)
commit0ffa14fec2f1794286d73dfd660d6ff8b0021f8c
treee8c7a7991794cd64c6f7456fe89781ed2c330145
parent973fa9012c007d140867e6ddb0735056904bf222
Excessive expansion of justified text when rounding hacks are enabled
https://bugs.webkit.org/show_bug.cgi?id=64331

Reviewed by Anders Carlsson.

Source/WebCore:

Test: platform/mac/fast/text/rounding-hacks-expansion.html

When rounding hacks are enabled, the expansion at each expansion opportunity should be by an
integer. Restored more of the logic that was removed in r78846 in order to ensure this.

* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advance):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):

LayoutTests:

* platform/mac/fast/text/rounding-hacks-expansion.html: Added.
* platform/mac/platform/mac/fast/text/rounding-hacks-expansion-expected.png: Added.
* platform/mac/platform/mac/fast/text/rounding-hacks-expansion-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/fast/text/rounding-hacks-expansion.html [new file with mode: 0644]
LayoutTests/platform/mac/platform/mac/fast/text/rounding-hacks-expansion-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/platform/mac/fast/text/rounding-hacks-expansion-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/WidthIterator.cpp
Source/WebCore/platform/graphics/mac/ComplexTextController.cpp