|
|
Created:
6 years, 10 months ago by Gurpreet Modified:
6 years, 9 months ago CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org, lgombos, gyuyoung-inactive, ryuan, tonikitoo_ Base URL:
https://chromium.googlesource.com/chromium/blink.git@master Visibility:
Public. |
Descriptionhr color attribute not working.
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 Blink is different. Making
the behaviour of Blink similiar to Firefox and IE's behaviour.
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.
I already landed this patch on Webkit. Just modified the layout test file.
http://trac.webkit.org/changeset/161334
R=esprehn@chromium.org,eseidel@chromium.org
BUG=175359
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168571
Patch Set 1 #
Total comments: 2
Patch Set 2 : #
Total comments: 1
Patch Set 3 : #Patch Set 4 : #
Messages
Total messages: 29 (0 generated)
See my nit. https://codereview.chromium.org/162993002/diff/1/LayoutTests/fast/dom/HTMLHrE... File LayoutTests/fast/dom/HTMLHrElement/hr-color-noshade-attribute.html (right): https://codereview.chromium.org/162993002/diff/1/LayoutTests/fast/dom/HTMLHrE... LayoutTests/fast/dom/HTMLHrElement/hr-color-noshade-attribute.html:7: <hr id="hrElement1" color="red" noshade> Patch looks good but it seems like you use a tab here? Please make the test indenting consistent.
On 2014/02/14 19:04:15, rwlbuis wrote: > See my nit. > > https://codereview.chromium.org/162993002/diff/1/LayoutTests/fast/dom/HTMLHrE... > File LayoutTests/fast/dom/HTMLHrElement/hr-color-noshade-attribute.html (right): > > https://codereview.chromium.org/162993002/diff/1/LayoutTests/fast/dom/HTMLHrE... > LayoutTests/fast/dom/HTMLHrElement/hr-color-noshade-attribute.html:7: <hr > id="hrElement1" color="red" noshade> > Patch looks good but it seems like you use a tab here? Please make the test > indenting consistent. Thanks for the review. Done. Please have a look.
Changes done. Please have a look. https://codereview.chromium.org/162993002/diff/1/LayoutTests/fast/dom/HTMLHrE... File LayoutTests/fast/dom/HTMLHrElement/hr-color-noshade-attribute.html (right): https://codereview.chromium.org/162993002/diff/1/LayoutTests/fast/dom/HTMLHrE... LayoutTests/fast/dom/HTMLHrElement/hr-color-noshade-attribute.html:7: <hr id="hrElement1" color="red" noshade> On 2014/02/14 19:04:15, rwlbuis wrote: > Patch looks good but it seems like you use a tab here? Please make the test > indenting consistent. Done.
Please review. Thanks.
The CQ bit was checked by k.gurpreet@samsung.com
The CQ bit was unchecked by k.gurpreet@samsung.com
The CQ bit was checked by k.gurpreet@samsung.com
The CQ bit was unchecked by commit-bot@chromium.org
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an LGTM may have been provided, it was from a non-committer or a lowly provisional committer, _not_ a full super star committer. See http://www.chromium.org/getting-involved/become-a-committer Note that this has nothing to do with OWNERS files.
The CQ bit was unchecked by k.gurpreet@samsung.com
https://codereview.chromium.org/162993002/diff/90001/LayoutTests/fast/dom/HTM... File LayoutTests/fast/dom/HTMLHrElement/script-tests/color-noshade-attribute.js (right): https://codereview.chromium.org/162993002/diff/90001/LayoutTests/fast/dom/HTM... LayoutTests/fast/dom/HTMLHrElement/script-tests/color-noshade-attribute.js:12: document.getElementById('hrElement5').setAttribute("noshade", ""); Nit: you should choose one indenting style and stick to it (' ' use in parameter list).
lgtm
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/k.gurpreet@samsung.com/162993002/90001
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for Source/core/html/HTMLHRElement.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file Source/core/html/HTMLHRElement.cpp Hunk #1 FAILED at 76. 1 out of 1 hunk FAILED -- saving rejects to file Source/core/html/HTMLHRElement.cpp.rej Patch: Source/core/html/HTMLHRElement.cpp Index: Source/core/html/HTMLHRElement.cpp diff --git a/Source/core/html/HTMLHRElement.cpp b/Source/core/html/HTMLHRElement.cpp index 7a6edf88eb51c5aeadaf83839ea9482c77a9624c..00f0cbde606c26f51df191bdb941bbcf8d0c6d75 100644 --- a/Source/core/html/HTMLHRElement.cpp +++ b/Source/core/html/HTMLHRElement.cpp @@ -76,11 +76,13 @@ void HTMLHRElement::collectStyleForPresentationAttribute(const QualifiedName& na addHTMLColorToStyle(style, CSSPropertyBorderColor, value); addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value); } else if (name == noshadeAttr) { - addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderStyle, CSSValueSolid); + if (!hasAttribute(colorAttr)) { + addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderStyle, CSSValueSolid); - RefPtr<CSSPrimitiveValue> darkGrayValue = cssValuePool().createColorValue(Color::darkGray); - style->setProperty(CSSPropertyBorderColor, darkGrayValue); - style->setProperty(CSSPropertyBackgroundColor, darkGrayValue); + RefPtr<CSSPrimitiveValue> darkGrayValue = cssValuePool().createColorValue(Color::darkGray); + style->setProperty(CSSPropertyBorderColor, darkGrayValue); + style->setProperty(CSSPropertyBackgroundColor, darkGrayValue); + } } else if (name == sizeAttr) { StringImpl* si = value.impl(); int size = si->toInt();
The CQ bit was checked by k.gurpreet@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/k.gurpreet@samsung.com/162993002/160001
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for Source/core/html/HTMLHRElement.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file Source/core/html/HTMLHRElement.cpp Hunk #1 FAILED at 76. 1 out of 1 hunk FAILED -- saving rejects to file Source/core/html/HTMLHRElement.cpp.rej Patch: Source/core/html/HTMLHRElement.cpp Index: Source/core/html/HTMLHRElement.cpp diff --git a/Source/core/html/HTMLHRElement.cpp b/Source/core/html/HTMLHRElement.cpp index 7a6edf88eb51c5aeadaf83839ea9482c77a9624c..912c589e927827e4183666eef859a4be03da5150 100644 --- a/Source/core/html/HTMLHRElement.cpp +++ b/Source/core/html/HTMLHRElement.cpp @@ -76,11 +76,13 @@ void HTMLHRElement::collectStyleForPresentationAttribute(const QualifiedName& na addHTMLColorToStyle(style, CSSPropertyBorderColor, value); addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value); } else if (name == noshadeAttr) { - addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderStyle, CSSValueSolid); + if (!hasAttribute(colorAttr)) { + addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderStyle, CSSValueSolid); - RefPtr<CSSPrimitiveValue> darkGrayValue = cssValuePool().createColorValue(Color::darkGray); - style->setProperty(CSSPropertyBorderColor, darkGrayValue); - style->setProperty(CSSPropertyBackgroundColor, darkGrayValue); + RefPtrWillBeRawPtr<CSSPrimitiveValue> darkGrayValue = cssValuePool().createColorValue(Color::darkGray); + style->setProperty(CSSPropertyBorderColor, darkGrayValue); + style->setProperty(CSSPropertyBackgroundColor, darkGrayValue); + } } else if (name == sizeAttr) { StringImpl* si = value.impl(); int size = si->toInt();
The CQ bit was checked by k.gurpreet@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/k.gurpreet@samsung.com/162993002/180001
The CQ bit was unchecked by k.gurpreet@samsung.com
The CQ bit was checked by k.gurpreet@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/k.gurpreet@samsung.com/162993002/180001
On 2014/03/04 19:14:47, eseidel wrote: > lgtm Thanks Eric for the review.
On 2014/03/05 14:15:50, Gurpreet wrote: > On 2014/03/04 19:14:47, eseidel wrote: > > lgtm > > Thanks Eric for the review. BTW one thing to take into account for future patches, it is better to give a clear description for each patch set that you upload. This makes it easier for the reviewer to see what changed.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/k.gurpreet@samsung.com/162993002/180001
Message was sent while issue was closed.
Change committed as 168571
Message was sent while issue was closed.
On 2014/03/05 15:55:35, rwlbuis wrote: > On 2014/03/05 14:15:50, Gurpreet wrote: > > On 2014/03/04 19:14:47, eseidel wrote: > > > lgtm > > > > Thanks Eric for the review. > > BTW one thing to take into account for future patches, it is better to give a > clear description for each patch set that you upload. This makes it easier for > the reviewer to see what changed. Sure Rob will take care for future patches. Thanks. |