(In reply to comment #2)
> This patch seems to be necessary as well. Not sure whether it deserves its own bug, though.
>
> * https://chromiumcodereview.appspot.com/22929020
There is already a bug for porting this patch, it's #127837, so added dependency.
Comment on attachment 225833[details]
Patch rebased.
View in context: https://bugs.webkit.org/attachment.cgi?id=225833&action=review
Looks like the patch does not apply. As a general comment be careful of adding the code inside the compiler guards.
I'm setting the r- also because the issues in the grammar.
> Source/WebCore/ChangeLog:7
> +
You should probably mention the original author? ;). Ditto to the other ChangeLogs.
> Source/WebCore/css/CSSGrammar.y.in:71
> +inline static CSSParserValue makeIdentValue(CSSParserString string)
"static inline" is much more common.
> Source/WebCore/css/CSSGrammar.y.in:82
> +%expect 30
Hmm this is bad, are you sure that it adds reduce/shift conflicts? IIRC the patch that landed in Blink didn't add any.
> Source/WebCore/css/CSSGrammar.y.in:1400
> +
See my comment bellow about sinkFloatingValueList/createFloatingValueList.
> Source/WebCore/css/CSSParser.cpp:4878
> +void CSSParser::parseGridLineNames(CSSParserValueList* parserValues, CSSValueList& valueList)
Definitely not correct. You should keep using the reference as it cannot be null. Then fix the usage of parserValues inside the function.
> Source/WebCore/css/CSSParser.cpp:11393
> +
I think we shouldn't need these two. Check how we create CSSParserValueLists and handle them with std::unique_ptr directly in the grammar.
> Source/WebCore/css/CSSParser.h:166
> + void parseGridLineNames(CSSParserValueList* inputList, CSSValueList&);
Reference not raw pointer.
> Source/WebCore/css/CSSValue.cpp:43
> +#include "CSSGridLineNamesValue.h"
Only when ENABLE(CSS_GRID_LAYOUT).
> Source/WebCore/css/CSSValue.h:106
> + bool isGridLineNamesValue() const { return m_classType == GridLineNamesClass; }
This should go inside the ENABLE(CSS_GRID_LAYOUT) block.
> Source/WebCore/css/CSSValue.h:178
> + GridLineNamesClass,
Ditto.
Attachment 226047[details] did not pass style-queue:
ERROR: Source/WebCore/css/CSSParserValues.h:122: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4]
Total errors found: 1 in 36 files
If any of these errors are false positives, please file a bug against check-webkit-style.
(In reply to comment #6)
> (From update of attachment 225833[details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=225833&action=review
>
> > Source/WebCore/css/CSSGrammar.y.in:82
> > +%expect 30
>
> Hmm this is bad, are you sure that it adds reduce/shift conflicts? IIRC the patch that landed in Blink didn't add any.
>
At least it fails at build time because if that, claiming that it expects 30 shift/reduce conflicts.
Attachment 226127[details] did not pass style-queue:
ERROR: Source/WebCore/css/CSSParserValues.h:122: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4]
Total errors found: 1 in 38 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 226127[details]
Added gmake and xcode info of the new files.
View in context: https://bugs.webkit.org/attachment.cgi?id=226127&action=review
Getting better, but r- due to missing guards and mistakes in the tests.
> Source/WebCore/ChangeLog:13
> + Updated tests to match the new grid line-name syntax.
the new <grid-line>
> Source/WebCore/css/CSSGrammar.y.in:278
> +%type <value> track_names_list
Maybe we could guard the grammar code. The ident_list is general purpose and might be reused in the future by some other stuff but it would be a matter of moving it out of the guards.
> Source/WebCore/css/CSSParser.cpp:4894
> + lineNames->append(lineName.release());
You can join these two in a single line.
> Source/WebCore/css/CSSParser.cpp:4932
> + // This will handle the trailing <ident>* in the grammar.
<custom-ident>
> Source/WebCore/css/CSSParser.cpp:4957
> + // Handle leading <ident>*.
Ditto.
> Source/WebCore/css/CSSParser.cpp:4973
> + // This takes care of any trailing <ident>* in the grammar.
Ditto.
> Source/WebCore/css/CSSParser.h:570
> + Vector<CSSParserValueList*> m_floatingValueLists;
This is not needed.
> Source/WebCore/css/CSSValue.cpp:43
> +#include "CSSGridLineNamesValue.h"
ENABLE(CSS_GRID_LAYOUT)
> Source/WebCore/css/StyleResolver.cpp:44
> +#include "CSSGridLineNamesValue.h"
ENABLE(CSS_GRID_LAYOUT)
> LayoutTests/fast/css-grid-layout/grid-item-negative-position-resolution.html:102
> + -webkit-grid-row: 1;
Good catch!!! but you forgot the "middle".
> LayoutTests/fast/css-grid-layout/named-grid-line-get-set-expected.txt:67
> +FAIL getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') should be (first nav) 0px (nav) 0px (last). Was (nav first) 0px (nav) 0px (last).
Those FAIL's are not correct. The problem is that the line names are listed in the wrong order. We have bug 127837 for that. In the meantime just use the unordered version.
> LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set-expected.txt:17
> +FAIL window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('-webkit-grid-template-columns') should be (first nav) 10% (nav) 15% (last). Was (nav first) 10% (nav) 15% (last).
Same issue here with the order of the line names.
> LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set-expected.txt:61
> +FAIL getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') should be (first nav) minmax(-webkit-min-content, -webkit-max-content) (nav) auto (last). Was (nav first) minmax(-webkit-min-content, -webkit-max-content) (nav) auto (last).
Ditto.
> LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set.html:92
> + element.style.webkitGridTemplateColumns = "(foo 'bar)";
extra "'" here
Attachment 226297[details] did not pass style-queue:
ERROR: Source/WebCore/css/CSSParserValues.h:122: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4]
Total errors found: 1 in 38 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Attachment 226418[details] did not pass style-queue:
ERROR: Source/WebCore/css/CSSParserValues.h:122: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4]
Total errors found: 1 in 38 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 226422[details]
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-03 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Attachment 226499[details] did not pass style-queue:
ERROR: Source/WebCore/css/CSSParserValues.h:122: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4]
Total errors found: 1 in 38 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 226499[details]
Getting back the 'maybe_space' that produced the conflict, but protect it with 'ifdef'.
View in context: https://bugs.webkit.org/attachment.cgi?id=226499&action=review
Looks good. review- because of the storage leaks
> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:40
> +#if ENABLE(CSS_GRID_LAYOUT)
> +#include "CSSGridLineNamesValue.h"
> #include "CSSGridTemplateAreasValue.h"
> +#endif
Conditional includes go in a separate paragraph, not sorted in with the rest of the includes. Look at the sections for CSS_SHAPES and other defines in this same source file for an example of how to do it correctly.
> Source/WebCore/css/CSSGrammar.y.in:282
> +%type <valueList> ident_list
This will result in a storage leak in some parsing error cases. Any <valueList> element needs a %destructor. See the %type <valueList> section above for an example of how we do this.
> Source/WebCore/css/CSSGrammar.y.in:283
> +%type <value> track_names_list
This will result in a storage leak in some parsing error cases. The <value> element needs a %destructor. See the %type <value> section above for an example of how we do this.
> Source/WebCore/css/CSSGridLineNamesValue.h:58
> +CSS_VALUE_TYPE_CASTS(CSSGridLineNamesValue, isGridLineNamesValue());
> +}
> +
> +
> +#endif
Blank lines here are wrong. Should move the "}" down one line.
> Source/WebCore/css/CSSParser.cpp:43
> +#if ENABLE(CSS_GRID_LAYOUT)
Same incorrect includes formatting here. Conditional includes go into a separate paragraph.
> Source/WebCore/css/CSSParser.cpp:4963
> - if (arguments->current()->unit == CSSPrimitiveValue::CSS_STRING)
> - parseGridTrackNames(*arguments, *repeatedValues);
>
> if (!arguments->current())
Extra blank line left here. Please delete it.
> Source/WebCore/css/CSSParserValues.cpp:39
> {
> if (value.unit == CSSParserValue::Function)
> delete value.function;
> + else if (value.unit == CSSParserValue::ValueList)
> + delete value.valueList;
> }
Making this change means we have to call destroy on parser values even if we are not certain they are functions. This means we have to examine the cases in CSSParser.y where it says we don’t need to call destroy because the values are never functions and make sure they are never functions *or value lists*. And revise the comment that says, "These two parser values never need to be destroyed because they are never functions" to say "These two parser values never need to be destroyed because they are never functions or value lists".
> Source/WebCore/css/CSSParserValues.h:126
> + inline void setFromValueList(std::unique_ptr<CSSParserValueList>);
I believe the "inline" here has no effect" and should be omitted.
If this is a good pattern I’d like to see it used for the other types too, not just the new one.
Attachment 226681[details] did not pass style-queue:
ERROR: Source/WebCore/css/CSSParserValues.h:122: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4]
Total errors found: 1 in 38 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 226694[details]
Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-13 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Created attachment 226698[details]
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-02 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Created attachment 226703[details]
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-16 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Attachment 226705[details] did not pass style-queue:
ERROR: Source/WebCore/css/CSSParserValues.h:122: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4]
Total errors found: 1 in 38 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 226705[details]
Rebased and fixed test failures.
Rejecting attachment 226705[details] from commit-queue.
Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 226705, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit
Last 500 characters of output:
s-grid-layout/resources/grid-columns-rows-get-set-multiple.js
patching file LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js
patching file LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set-multiple.js
patching file LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js
Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Sergio Villar Senin']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit
Full output: http://webkit-queues.appspot.com/results/4850857027829760
Attachment 227558[details] did not pass style-queue:
ERROR: Source/WebCore/css/CSSParserValues.h:122: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4]
Total errors found: 1 in 38 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Attachment 227559[details] did not pass style-queue:
ERROR: Source/WebCore/css/CSSParserValues.h:122: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4]
Total errors found: 1 in 38 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 227567[details]
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-04 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Attachment 227609[details] did not pass style-queue:
ERROR: Source/WebCore/css/CSSParserValues.h:122: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4]
Total errors found: 1 in 38 files
If any of these errors are false positives, please file a bug against check-webkit-style.
2014-03-04 16:05 PST, Javier Fernandez
2014-03-04 17:11 PST, Javier Fernandez
2014-03-06 15:19 PST, Javier Fernandez
2014-03-07 07:29 PST, Javier Fernandez
2014-03-10 04:47 PDT, Javier Fernandez
2014-03-11 05:10 PDT, Javier Fernandez
2014-03-11 07:03 PDT, Build Bot
2014-03-12 06:21 PDT, Javier Fernandez
2014-03-14 04:27 PDT, Javier Fernandez
2014-03-14 05:40 PDT, Build Bot
2014-03-14 06:16 PDT, Build Bot
2014-03-14 06:46 PDT, Build Bot
2014-03-14 06:52 PDT, Javier Fernandez
2014-03-22 11:41 PDT, Javier Fernandez
2014-03-22 11:51 PDT, Javier Fernandez
2014-03-22 13:39 PDT, Build Bot
2014-03-23 08:05 PDT, Javier Fernandez