[Webkit-unassigned] [Bug 128980] [CSS Grid Layout] Implementation of the grid-template shorthand.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 24 16:58:56 PDT 2014
https://bugs.webkit.org/show_bug.cgi?id=128980
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #228512|review?, commit-queue? |review+, commit-queue-
Flag| |
--- Comment #4 from Darin Adler <darin at apple.com> 2014-04-24 16:59:13 PST ---
(From update of attachment 228512)
View in context: https://bugs.webkit.org/attachment.cgi?id=228512&action=review
> Source/WebCore/css/CSSParser.cpp:4809
> + size_t rowCount = 0;
> + size_t columnCount = 0;
size_t seems like overkill for these. I don’t think we handle those kinds of huge row and column counts. Why not just “unsigned”?
> Source/WebCore/css/CSSParser.cpp:4811
> + RefPtr<CSSValueList> templateRows = CSSValueList::createSpaceSeparated();
Why create this just before an early return? I suggest moving this declaration down.
> Source/WebCore/css/CSSParser.cpp:4817
> + while (m_valueList->current()) {
could write this as a do/while to avoid the redundant check at the start of the loop
> Source/WebCore/css/CSSParser.cpp:4837
> + templateRows->append(value);
value.release() would avoid a bit of reference count churn
> Source/WebCore/css/CSSParser.cpp:4853
> + addProperty(CSSPropertyWebkitGridTemplateColumns, cssValuePool().createIdentifierValue(CSSValueNone), important);
Extra space here after the comma.
> Source/WebCore/css/CSSParser.cpp:4895
> + addProperty(CSSPropertyWebkitGridTemplateColumns, columnsValue, important);
columnsValue.release()
> Source/WebCore/css/CSSParser.cpp:4896
> + addProperty(CSSPropertyWebkitGridTemplateRows, rowsValue, important);
rowsValue.release()
> Source/WebCore/css/CSSParser.cpp:5029
> + return values;
values.release()
> Source/WebCore/css/CSSParser.cpp:5273
> + if (!gridRowNames.length())
isEmpty is preferred over !length
> Source/WebCore/css/CSSParser.cpp:5296
> + for (lookAheadColumn = currentColumn; lookAheadColumn < (columnCount - 1); ++lookAheadColumn) {
Parentheses here don’t make the code clearer. I suggest omitting them.
> Source/WebCore/css/CSSParser.h:50
> +
> +
Extra space here. Just one blank line will do.
> Source/WebCore/css/CSSParser.h:77
> +#if ENABLE(CSS_GRID_LAYOUT)
> +class CSSGridLineNamesValue;
> +#endif
Not really helpful to put forward declarations inside an #if. I suggest just declaring this unconditionally.
> Source/WebCore/css/CSSParser.h:178
> + void parseGridLineNames(CSSParserValueList&, CSSValueList&, CSSGridLineNamesValue* = 0);
nullptr
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list