• jfernandez@igalia.com's avatar
    [CSS Grid Layout] Implementation of the grid-template shorthand. · faa12a29
    jfernandez@igalia.com authored
    This shorthand sets the values for the grid-template-columns, 
    grid-template-rows and grid-template-areas, so the 
    implementation tries to reuse as much available parsing 
    functions as possible.
    
    The "parsingGridTrackList" was refactored to return a 
    CSSValue and let the "parseValue" function to assign the 
    property value. The "forwardSlash" operator is now valid 
    when the track-list clause is part of a shorthand. The  
    "parseValue" function checkouts that only additional 
    clauses are allowed when processing shorthands; the 
    grid-columns-rows-get-set.html tests was modified to verify 
    this.
    
    The "parseGridTemplateAreas" was refactored too, in order 
    to process single areas's rows. This is very useful for the 
    gris-template secondary syntax, which mixes areas and rows 
    values.
    
    
    Finally, the "parseGirdLineNames" function was modified as 
    well by defining an new argument to concatenate head/tail 
    custom-ident elements and ensure the identList is at the 
    heading index, since it's now possible the parseList was 
    rewound.
    
    The implementation of the grid-template shorthand tries 
    first to match the <grid-template-columns> / <grid-template-rows> 
    syntax, failing back to the secondary syntax if needed. 
    This approach requires to rewind the parseList but it 
    produces a clearer code.
     
    TEST=fast/css-grid-layout/grid-template-shorthand-get-set.html
    
    BUG=79180
    
    Review URL: https://codereview.chromium.org/149373004
    
    git-svn-id: svn://svn.chromium.org/blink/trunk@170552 bbb929c8-8fbe-4397-9dbb-9b2b20218538
    faa12a29
grid-template-shorthand-get-set-expected.txt 16.3 KB