<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span> changed
<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>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #249890 Flags</td>
<td>review?
</td>
<td>review+, commit-queue-
</td>
</tr></table>
<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#c17">Comment # 17</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:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span></b>
<pre>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>
<span class="quote">> 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;
> +}</span >
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.
<span class="quote">> Source/WebCore/css/CSSParser.cpp:3661
> + ASSERT(columnCount || coulmnWidth);</span >
This will fail to compile because of the typo: coulmnWidth.
<span class="quote">> LayoutTests/fast/css/getPropertyValue-columns.html:38
> + shouldBeEqualToString('columnsValue("columns4")', 'auto auto');</span >
Is this serialization of "auto" as "auto auto" correct behavior, or a bug?</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>