-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=6047 Source/WebCore: Text-decorations are applied during paint phase. The style was not being properly selected in case of first line box. The patch fixes this. Patch by Pravin D <pravind.2k4@gmail.com> on 2012-05-07 Reviewed by Eric Seidel. Tests: fast/css/first-line-text-decoration-inherited-from-parent.html fast/css/first-line-text-decoration.html * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintDecoration): Inform the decoration color retriever if this box is part of the first line box or not. * rendering/RenderObject.cpp: (WebCore::decorationColor): Changed the argument from RenderObject* to RenderStyle*. As this function is just a helper to getTextDecorationColors as used RenderObject solely to retrieve the corresponding RenderStyle, which(RenderStyle*) was already available with the latter function. (WebCore::RenderObject::getTextDecorationColors): Take a new variable to check if first line style or the regular style has to be used. Sends RenderStyle* as an argument to decorationColor(). * rendering/RenderObject.h: (RenderObject): LayoutTests: Patch by Pravin D <pravind.2k4@gmail.com> on 2012-05-07 Reviewed by Eric Seidel. * fast/css/first-line-text-decoration.html: Added. * platform/qt-linux/fast/css/first-line-text-decoration-expected.png: Added. * platform/qt-linux/fast/css/first-line-text-decoration-expected.txt: Added. This test checks if text-decoration present in the tags first-line style is applied properly. * fast/css/first-line-text-decoration-inherited-from-parent.html: Added. * platform/qt-linux/fast/css/first-line-text-decoration-inherited-from-parent-expected.png: Added. * platform/qt-linux/fast/css/first-line-text-decoration-inherited-from-parent-expected.txt: Added. This test checks if the text-decoration and text color is chosen properly in the case where the first-line style is inherited from a parent and contains such text-decorations. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
29facb8b