-
commit-queue@webkit.org authored
<hr> appears gray instead of green because of color attribute is defined followed by noshade attribute https://bugs.webkit.org/show_bug.cgi?id=17674 Patch by Gurpreet Kaur <k.gurpreet@samsung.com> on 2014-01-06 Reviewed by Simon Fraser. Source/WebCore: The noshade attribute is a boolean attribute and when set on hr element it shows a gray color. When there is color attribute the default gray color should be replaced by the color mentioned by the color attribute. Firefox and IE show the same behaviour but Webkit is different. Making the behaviour of Webkit similiar to Firefox and IE's behaviour. Test: fast/dom/HTMLHrElement/hr-color-noshade-attribute.html * html/HTMLHRElement.cpp: (WebCore::HTMLHRElement::collectStyleForPresentationAttribute): When the color attribute is present that value is applied and the default gray color is ignored. Incase of no color attribute the default gray color is applied. LayoutTests: * fast/dom/HTMLHrElement: Added. * fast/dom/HTMLHrElement/hr-color-noshade-attribute-expected.txt: Added. * fast/dom/HTMLHrElement/hr-color-noshade-attribute.html: Added. Added new test cases to test the functionality of noshade and color attribute of hr element when color attribute is present along with noshade attribute, invalid color attribute and color noshade attributes added via javascript. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
af23827c