Narrow underlines are too tall
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jan 2014 20:30:33 +0000 (20:30 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jan 2014 20:30:33 +0000 (20:30 +0000)
commit6fd8eec8073879539b046a8acf63b5152a6c62f7
tree6df1f8f24f00ccf33a1c89993ec857c7c219aae0
parent06f284550ffdd72eca2f7c62477df168143f60ea
Narrow underlines are too tall
https://bugs.webkit.org/show_bug.cgi?id=126708

Reviewed by Simon Fraser.

Source/WebCore:

I made a typo in r158392 and used was settings the line rect's
height equal to its width. No one noticed because of the subsequent
if statement.

Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines.html

* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::computeLineBoundsAndAntialiasingModeForText):

LayoutTests:

This test clips to a region that should not be drawn in, then draws a scaled underline. It then compares
the output to an empty element.

* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines-expected.html: Added.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines-expected.html [new file with mode: 0644]
LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp