Text decorations specified on the containing block are not properly applied when...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Oct 2012 11:42:11 +0000 (11:42 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Oct 2012 11:42:11 +0000 (11:42 +0000)
commit8edd33a663e898debebfadcc60d4191f40d7d90a
tree72f07951e13b5910b5834ae107e8296318be574d
parentcbaf92134372ef8df8eaf7fa353dd0ad21e00b70
Text decorations specified on the containing block are not properly applied when ::first-line is present.
https://bugs.webkit.org/show_bug.cgi?id=93829

Patch by Arpita Bahuguna <arpitabahuguna@gmail.com> on 2012-10-09
Reviewed by Abhishek Arya.

Source/WebCore:

If a container's style and its pseudo :first-line style have unique
text-decorations specified for them, only the :first-line text-decoarations
were being applied.

The uploaded patch intends to first compute the text decoration colors
for the containing box, followed by that of the first-line (if specified).

This thus avoids the condition wherein our containing box's text-decorations
were not getting applied at all since initially we were only computing
for the first-line style.

Test: fast/css/text-decorations-on-first-line-and-containing-block.html

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
getTextDecorationColors() is first called for computing the containing box's
text-decoration values and then for first-line style's text-decorations,
if specified.

LayoutTests:

* fast/css/text-decorations-on-first-line-and-containing-block-expected.html: Added.
* fast/css/text-decorations-on-first-line-and-containing-block.html: Added.
Tests added for verifying the behavior of text-decorations when specified
both for the ::first-line as well as its containing block.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css/text-decorations-on-first-line-and-containing-block-expected.html [new file with mode: 0644]
LayoutTests/fast/css/text-decorations-on-first-line-and-containing-block.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/InlineTextBox.cpp