<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [CSS MultiColumn] Parse "columns: auto <length>" shorthand property value properly"
href="https://bugs.webkit.org/show_bug.cgi?id=143248#c18">Comment # 18</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [CSS MultiColumn] Parse "columns: auto <length>" shorthand property value properly"
href="https://bugs.webkit.org/show_bug.cgi?id=143248">bug 143248</a>
from <span class="vcard"><a class="email" href="mailto:jh718.park@samsung.com" title="Joonghun Park <jh718.park@samsung.com>"> <span class="fn">Joonghun Park</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=143248#c17">comment #17</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=249890&action=diff" name="attach_249890" title="Patch">attachment 249890</a> <a href="attachment.cgi?id=249890&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=249890&action=review">https://bugs.webkit.org/attachment.cgi?id=249890&action=review</a>
>
> > Source/WebCore/css/CSSParser.cpp:3618
> > +RefPtr<CSSValue> CSSParser::parseColumnWidth()
> > +{
> > + ValueWithCalculation valueWithCalculation(*m_valueList->current());
> > + CSSValueID id = valueWithCalculation.value().id;
> > + // Always parse this property in strict mode, since it would be ambiguous otherwise when used in the 'columns' shorthand property.
> > + if (id == CSSValueAuto || (validateUnit(valueWithCalculation, FLength | FNonNeg, CSSStrictMode) && parsedDouble(valueWithCalculation))) {
> > + RefPtr<CSSValue> parsedValue = parseValidPrimitive(id, valueWithCalculation);
> > + m_valueList->next();
> > + return parsedValue;
> > + }
> > +
> > + return nullptr;
> > +}
>
> I think these functions would read better with early return (check for error
> and return nullptr) rather than nesting the normal code path inside an if.
> Yes, I'd apply it.
> > Source/WebCore/css/CSSParser.cpp:3661
> > + ASSERT(columnCount || coulmnWidth);
>
> This will fail to compile because of the typo: coulmnWidth.
> After applying your feedback, I found this assert statment is not safisfied when we are in "columns: auto" case. So I removed it.
> > LayoutTests/fast/css/getPropertyValue-columns.html:38
> > + shouldBeEqualToString('columnsValue("columns4")', 'auto auto');
>
> Is this serialization of "auto" as "auto auto" correct behavior, or a bug?</span >
Hmm, it seems that spec doesn't say anything about it. In my opinion, 'auto auto' looks more consistent, but I choose to maintain current state.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>