Positioned text underline can look like a strike-through
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Nov 2018 01:08:33 +0000 (01:08 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Nov 2018 01:08:33 +0000 (01:08 +0000)
commit53187a507de31fe4d7fa0e18f8f778449dd6ce76
tree06ce9ef9caa784ad25772914019866f7bbd8fbe0
parentfce756bfab69559723a07713703e5531d165cc73
Positioned text underline can look like a strike-through
https://bugs.webkit.org/show_bug.cgi?id=191341

Reviewed by Simon Fraser.

Source/WebCore:

We should just clamp the value so it can't go above the baseline.

We shouldn't do this at parse time because it's totally reasonable for text-underline-position: under to want
a negative text-underline-offset. Instead, we just do it at used value time.

Test: fast/css3-text/css3-text-decoration/text-underline-negative.html

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):

LayoutTests:

* fast/css3-text/css3-text-decoration/text-underline-negative-expected.html: Added.
* fast/css3-text/css3-text-decoration/text-underline-negative.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css3-text/css3-text-decoration/text-underline-negative-expected.html [new file with mode: 0644]
LayoutTests/fast/css3-text/css3-text-decoration/text-underline-negative.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/style/InlineTextBoxStyle.cpp