| Differences between
and this patch
- a/Source/WebCore/ChangeLog +45 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2014-03-22  Javier Fernandez  <jfernandez@igalia.com>
2
3
        [CSS Grid Layout] Update named <grid-line> syntax to the last version of the specs
4
        https://bugs.webkit.org/show_bug.cgi?id=129041
5
6
        Reviewed by Sergio Villar Senin.
7
8
        From Blink r162555 by <svillar@igalia.com>
9
10
        Names for grid lines are now specified as a list of whitespace separated
11
        idents enclosed in parentheses instead of as a list of strings.
12
13
        Updated tests to match the new <grid-line> syntax.
14
15
        * CMakeLists.txt:
16
        * GNUmakefile.list.am:
17
        * WebCore.xcodeproj/project.pbxproj: Added info of the new file for the CSSGridLineNamesValue class.
18
        * css/CSSComputedStyleDeclaration.cpp:
19
        (WebCore::addValuesForNamedGridLinesAtIndex): The named <grid-line> value is now a list.
20
        * css/CSSGrammar.y.in: New syntax for named <grid-line>.
21
        * css/CSSGridLineNamesValue.cpp: Added.
22
        (WebCore::CSSGridLineNamesValue::customCSSText): String representation of the named <grid-line> as a list of Strings.
23
        (WebCore::CSSGridLineNamesValue::CSSGridLineNamesValue): Constructor.
24
        (WebCore::CSSGridLineNamesValue::cloneForCSSOM): Ref counted cloning function.
25
        * css/CSSGridLineNamesValue.h: Added.
26
        (WebCore::CSSGridLineNamesValue::create): Ref counted constructor.
27
        * css/CSSParser.cpp:
28
        (WebCore::CSSParser::parseGridLineNames): It replaces the old parseGrdTrackNames.
29
        (WebCore::CSSParser::parseGridTrackList): Using the new named <grid-line> syntax.
30
        (WebCore::CSSParser::parseGridTrackRepeatFunction): Using the new named <grid-line> syntax.
31
        * css/CSSParser.h:
32
        * css/CSSParserValues.cpp:
33
        (WebCore::destroy): Handling the case of CSSValue being CSSValueList intances.
34
        (WebCore::CSSParserValue::createCSSValue): Handling the case of CSSValue being CSSValueList intances.
35
        * css/CSSParserValues.h:
36
        (WebCore::CSSParserValue::setFromValueList): Adds the named <grid-line> list to the CSSParserValueList instance.
37
        * css/CSSValue.cpp:
38
        (WebCore::CSSValue::equals): Handling the case of the new CSSGridLineNamesValue class.
39
        (WebCore::CSSValue::cssText): Handling the case of the new CSSGridLineNamesValue class.
40
        (WebCore::CSSValue::destroy): Handling the case of the new CSSGridLineNamesValue class.
41
        * css/CSSValue.h:
42
        (WebCore::CSSValue::isGridLineNamesValue): Type cast check for the new CSSGridLineNamesValue class.
43
        * css/StyleResolver.cpp:
44
        (WebCore::createGridTrackList): Using the new named <grid-line> syntax.
45
1
2014-03-22  Michael Saboff  <msaboff@apple.com>
46
2014-03-22  Michael Saboff  <msaboff@apple.com>
2
47
3
        toThis() on a JSWorkerGlobalScope should return a JSProxy and not undefined
48
        toThis() on a JSWorkerGlobalScope should return a JSProxy and not undefined
- a/Source/WebCore/CMakeLists.txt +1 lines
Lines 1037-1042 set(WebCore_SOURCES a/Source/WebCore/CMakeLists.txt_sec1
1037
    css/CSSFunctionValue.cpp
1037
    css/CSSFunctionValue.cpp
1038
    css/CSSGradientValue.cpp
1038
    css/CSSGradientValue.cpp
1039
    css/CSSGridTemplateAreasValue.cpp
1039
    css/CSSGridTemplateAreasValue.cpp
1040
    css/CSSGridLineNamesValue.cpp
1040
    css/CSSGroupingRule.cpp
1041
    css/CSSGroupingRule.cpp
1041
    css/CSSImageGeneratorValue.cpp
1042
    css/CSSImageGeneratorValue.cpp
1042
    css/CSSImageSetValue.cpp
1043
    css/CSSImageSetValue.cpp
- a/Source/WebCore/GNUmakefile.list.am +2 lines
Lines 2575-2580 webcore_sources += \ a/Source/WebCore/GNUmakefile.list.am_sec1
2575
	Source/WebCore/css/CSSFunctionValue.h \
2575
	Source/WebCore/css/CSSFunctionValue.h \
2576
	Source/WebCore/css/CSSGradientValue.cpp \
2576
	Source/WebCore/css/CSSGradientValue.cpp \
2577
	Source/WebCore/css/CSSGradientValue.h \
2577
	Source/WebCore/css/CSSGradientValue.h \
2578
	Source/WebCore/css/CSSGridLineNamesValue.h \
2579
	Source/WebCore/css/CSSGridLineNamesValue.cpp \
2578
	Source/WebCore/css/CSSGridTemplateAreasValue.cpp \
2580
	Source/WebCore/css/CSSGridTemplateAreasValue.cpp \
2579
	Source/WebCore/css/CSSGridTemplateAreasValue.h \
2581
	Source/WebCore/css/CSSGridTemplateAreasValue.h \
2580
	Source/WebCore/css/CSSGroupingRule.cpp \
2582
	Source/WebCore/css/CSSGroupingRule.cpp \
- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj +8 lines
Lines 5532-5537 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec1
5532
		CD641EB41818F5ED00EE4C41 /* SourceBufferPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = CD641EB21818F5ED00EE4C41 /* SourceBufferPrivate.h */; };
5532
		CD641EB41818F5ED00EE4C41 /* SourceBufferPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = CD641EB21818F5ED00EE4C41 /* SourceBufferPrivate.h */; };
5533
		CD641EBF1819B36000EE4C41 /* MediaTimeMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD641EBD1819B35900EE4C41 /* MediaTimeMac.cpp */; };
5533
		CD641EBF1819B36000EE4C41 /* MediaTimeMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD641EBD1819B35900EE4C41 /* MediaTimeMac.cpp */; };
5534
		CD641EC01819B36000EE4C41 /* MediaTimeMac.h in Headers */ = {isa = PBXBuildFile; fileRef = CD641EBE1819B35900EE4C41 /* MediaTimeMac.h */; };
5534
		CD641EC01819B36000EE4C41 /* MediaTimeMac.h in Headers */ = {isa = PBXBuildFile; fileRef = CD641EBE1819B35900EE4C41 /* MediaTimeMac.h */; };
5535
		CD7DBB2818CA19A400C11066 /* CSSGridLineNamesValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD7DBB2618CA11FF00C11066 /* CSSGridLineNamesValue.cpp */; };
5536
		CD7DBB2918CA19C600C11066 /* CSSGridLineNamesValue.h in Headers */ = {isa = PBXBuildFile; fileRef = CD7DBB2718CA11FF00C11066 /* CSSGridLineNamesValue.h */; };
5535
		CD7E05221651C28200C1201F /* WebCoreAVFResourceLoader.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD7E05211651A84100C1201F /* WebCoreAVFResourceLoader.mm */; };
5537
		CD7E05221651C28200C1201F /* WebCoreAVFResourceLoader.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD7E05211651A84100C1201F /* WebCoreAVFResourceLoader.mm */; };
5536
		CD82030A1395AB6A00F956C6 /* WebVideoFullscreenController.h in Headers */ = {isa = PBXBuildFile; fileRef = CD8203061395AB6A00F956C6 /* WebVideoFullscreenController.h */; settings = {ATTRIBUTES = (Private, ); }; };
5538
		CD82030A1395AB6A00F956C6 /* WebVideoFullscreenController.h in Headers */ = {isa = PBXBuildFile; fileRef = CD8203061395AB6A00F956C6 /* WebVideoFullscreenController.h */; settings = {ATTRIBUTES = (Private, ); }; };
5537
		CD82030B1395AB6A00F956C6 /* WebVideoFullscreenController.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD8203071395AB6A00F956C6 /* WebVideoFullscreenController.mm */; settings = {COMPILER_FLAGS = "-Wno-undef -Wno-deprecated-declarations"; }; };
5539
		CD82030B1395AB6A00F956C6 /* WebVideoFullscreenController.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD8203071395AB6A00F956C6 /* WebVideoFullscreenController.mm */; settings = {COMPILER_FLAGS = "-Wno-undef -Wno-deprecated-declarations"; }; };
Lines 12833-12838 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec2
12833
		CD641EBD1819B35900EE4C41 /* MediaTimeMac.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MediaTimeMac.cpp; sourceTree = "<group>"; };
12835
		CD641EBD1819B35900EE4C41 /* MediaTimeMac.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MediaTimeMac.cpp; sourceTree = "<group>"; };
12834
		CD641EBE1819B35900EE4C41 /* MediaTimeMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaTimeMac.h; sourceTree = "<group>"; };
12836
		CD641EBE1819B35900EE4C41 /* MediaTimeMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaTimeMac.h; sourceTree = "<group>"; };
12835
		CD641EC7181ED60100EE4C41 /* MediaSample.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaSample.h; sourceTree = "<group>"; };
12837
		CD641EC7181ED60100EE4C41 /* MediaSample.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaSample.h; sourceTree = "<group>"; };
12838
		CD7DBB2618CA11FF00C11066 /* CSSGridLineNamesValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSGridLineNamesValue.cpp; sourceTree = "<group>"; };
12839
		CD7DBB2718CA11FF00C11066 /* CSSGridLineNamesValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSGridLineNamesValue.h; sourceTree = "<group>"; };
12836
		CD7E05201651A84100C1201F /* WebCoreAVFResourceLoader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WebCoreAVFResourceLoader.h; path = objc/WebCoreAVFResourceLoader.h; sourceTree = "<group>"; };
12840
		CD7E05201651A84100C1201F /* WebCoreAVFResourceLoader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WebCoreAVFResourceLoader.h; path = objc/WebCoreAVFResourceLoader.h; sourceTree = "<group>"; };
12837
		CD7E05211651A84100C1201F /* WebCoreAVFResourceLoader.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WebCoreAVFResourceLoader.mm; path = objc/WebCoreAVFResourceLoader.mm; sourceTree = "<group>"; };
12841
		CD7E05211651A84100C1201F /* WebCoreAVFResourceLoader.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WebCoreAVFResourceLoader.mm; path = objc/WebCoreAVFResourceLoader.mm; sourceTree = "<group>"; };
12838
		CD8203061395AB6A00F956C6 /* WebVideoFullscreenController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVideoFullscreenController.h; sourceTree = "<group>"; };
12842
		CD8203061395AB6A00F956C6 /* WebVideoFullscreenController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVideoFullscreenController.h; sourceTree = "<group>"; };
Lines 21501-21506 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec3
21501
		F523D18402DE42E8018635CA /* css */ = {
21505
		F523D18402DE42E8018635CA /* css */ = {
21502
			isa = PBXGroup;
21506
			isa = PBXGroup;
21503
			children = (
21507
			children = (
21508
				CD7DBB2618CA11FF00C11066 /* CSSGridLineNamesValue.cpp */,
21509
				CD7DBB2718CA11FF00C11066 /* CSSGridLineNamesValue.h */,
21504
				FBD6AF8415EF21D4008B7110 /* BasicShapeFunctions.cpp */,
21510
				FBD6AF8415EF21D4008B7110 /* BasicShapeFunctions.cpp */,
21505
				FBD6AF8515EF21D4008B7110 /* BasicShapeFunctions.h */,
21511
				FBD6AF8515EF21D4008B7110 /* BasicShapeFunctions.h */,
21506
				A80E6CDA0A1989CA007FB8C5 /* Counter.h */,
21512
				A80E6CDA0A1989CA007FB8C5 /* Counter.h */,
Lines 23900-23905 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec4
23900
				9B24DE8E15194B9500C59C27 /* HTMLBDIElement.h in Headers */,
23906
				9B24DE8E15194B9500C59C27 /* HTMLBDIElement.h in Headers */,
23901
				A871DE2C0A152AC800B12A68 /* HTMLBodyElement.h in Headers */,
23907
				A871DE2C0A152AC800B12A68 /* HTMLBodyElement.h in Headers */,
23902
				A8CFF7AA0A156978000A4234 /* HTMLBRElement.h in Headers */,
23908
				A8CFF7AA0A156978000A4234 /* HTMLBRElement.h in Headers */,
23909
				CD7DBB2918CA19C600C11066 /* CSSGridLineNamesValue.h in Headers */,
23903
				A81369D2097374F600D74463 /* HTMLButtonElement.h in Headers */,
23910
				A81369D2097374F600D74463 /* HTMLButtonElement.h in Headers */,
23904
				93F199E508245E59001E9ABC /* HTMLCanvasElement.h in Headers */,
23911
				93F199E508245E59001E9ABC /* HTMLCanvasElement.h in Headers */,
23905
				996231F318D18AC300C03FDA /* InspectorWebBackendCommands.js in Headers */,
23912
				996231F318D18AC300C03FDA /* InspectorWebBackendCommands.js in Headers */,
Lines 27153-27158 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec5
27153
				26F40D4A14904A6300CA67C4 /* EventLoopIOS.mm in Sources */,
27160
				26F40D4A14904A6300CA67C4 /* EventLoopIOS.mm in Sources */,
27154
				1CA19E050DC255950065A994 /* EventLoopMac.mm in Sources */,
27161
				1CA19E050DC255950065A994 /* EventLoopMac.mm in Sources */,
27155
				939885C308B7E3D100E707C4 /* EventNames.cpp in Sources */,
27162
				939885C308B7E3D100E707C4 /* EventNames.cpp in Sources */,
27163
				CD7DBB2818CA19A400C11066 /* CSSGridLineNamesValue.cpp in Sources */,
27156
				E0FEF372B27C53EAC1C1FBEE /* EventSource.cpp in Sources */,
27164
				E0FEF372B27C53EAC1C1FBEE /* EventSource.cpp in Sources */,
27157
				E12EDBEA0B308E0B002704B6 /* EventTarget.cpp in Sources */,
27165
				E12EDBEA0B308E0B002704B6 /* EventTarget.cpp in Sources */,
27158
				BC60D8F20D2A11E000B9918F /* ExceptionBase.cpp in Sources */,
27166
				BC60D8F20D2A11E000B9918F /* ExceptionBase.cpp in Sources */,
- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp -3 / +9 lines
Lines 34-40 a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp_sec1
34
#include "CSSFontFeatureValue.h"
34
#include "CSSFontFeatureValue.h"
35
#include "CSSFontValue.h"
35
#include "CSSFontValue.h"
36
#include "CSSFunctionValue.h"
36
#include "CSSFunctionValue.h"
37
#include "CSSGridTemplateAreasValue.h"
38
#include "CSSLineBoxContainValue.h"
37
#include "CSSLineBoxContainValue.h"
39
#include "CSSParser.h"
38
#include "CSSParser.h"
40
#include "CSSPrimitiveValue.h"
39
#include "CSSPrimitiveValue.h"
Lines 57-63 a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp_sec2
57
#include "PseudoElement.h"
56
#include "PseudoElement.h"
58
#include "Rect.h"
57
#include "Rect.h"
59
#include "RenderBox.h"
58
#include "RenderBox.h"
60
#include "RenderGrid.h"
61
#include "RenderStyle.h"
59
#include "RenderStyle.h"
62
#include "RenderView.h"
60
#include "RenderView.h"
63
#include "SVGElement.h"
61
#include "SVGElement.h"
Lines 69-74 a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp_sec3
69
#include "WebKitFontFamilyNames.h"
67
#include "WebKitFontFamilyNames.h"
70
#include <wtf/text/StringBuilder.h>
68
#include <wtf/text/StringBuilder.h>
71
69
70
#if ENABLE(CSS_GRID_LAYOUT)
71
#include "CSSGridLineNamesValue.h"
72
#include "CSSGridTemplateAreasValue.h"
73
#include "RenderGrid.h"
74
#endif
75
72
#if ENABLE(CSS_SHAPES)
76
#if ENABLE(CSS_SHAPES)
73
#include "ShapeValue.h"
77
#include "ShapeValue.h"
74
#endif
78
#endif
Lines 996-1003 static void addValuesForNamedGridLinesAtIndex(const OrderedNamedGridLinesMap& or a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp_sec4
996
    if (namedGridLines.isEmpty())
1000
    if (namedGridLines.isEmpty())
997
        return;
1001
        return;
998
1002
1003
    RefPtr<CSSGridLineNamesValue> lineNames = CSSGridLineNamesValue::create();
999
    for (size_t i = 0; i < namedGridLines.size(); ++i)
1004
    for (size_t i = 0; i < namedGridLines.size(); ++i)
1000
        list.append(cssValuePool().createValue(namedGridLines[i], CSSPrimitiveValue::CSS_STRING));
1005
        lineNames->append(cssValuePool().createValue(namedGridLines[i], CSSPrimitiveValue::CSS_STRING));
1006
    list.append(lineNames.release());
1001
}
1007
}
1002
1008
1003
static PassRef<CSSValue> valueForGridTrackList(GridTrackSizingDirection direction, RenderObject* renderer, const RenderStyle* style, RenderView* renderView)
1009
static PassRef<CSSValue> valueForGridTrackList(GridTrackSizingDirection direction, RenderObject* renderer, const RenderStyle* style, RenderView* renderView)
- a/Source/WebCore/css/CSSGrammar.y.in -6 / +55 lines
Lines 68-76 static inline bool isCSSTokenAString(int yytype) a/Source/WebCore/css/CSSGrammar.y.in_sec1
68
68
69
#endif
69
#endif
70
70
71
static inline CSSParserValue makeIdentValue(CSSParserString string)
72
{
73
    CSSParserValue v;
74
    v.id = cssValueKeywordID(string);
75
    v.unit = CSSPrimitiveValue::CSS_IDENT;
76
    v.string = string;
77
    return v;
78
}
79
71
%}
80
%}
72
81
82
#if ENABLE_CSS_GRID_LAYOUT
83
%expect 30
84
#else
73
%expect 29
85
%expect 29
86
#endif
74
87
75
%nonassoc LOWEST_PREC
88
%nonassoc LOWEST_PREC
76
89
Lines 224-230 static inline bool isCSSTokenAString(int yytype) a/Source/WebCore/css/CSSGrammar.y.in_sec2
224
%type <keyframeRuleList> keyframes_rule
237
%type <keyframeRuleList> keyframes_rule
225
%destructor { delete $$; } keyframes_rule
238
%destructor { delete $$; } keyframes_rule
226
239
227
// These two parser values never need to be destroyed because they are never functions.
240
// These two parser values never need to be destroyed because they are never functions or value lists.
228
%type <value> key unary_term
241
%type <value> key unary_term
229
242
230
// These parser values need to be destroyed because they might be functions.
243
// These parser values need to be destroyed because they might be functions.
Lines 265-270 static inline bool isCSSTokenAString(int yytype) a/Source/WebCore/css/CSSGrammar.y.in_sec3
265
%union { CSSParser::Location location; }
278
%union { CSSParser::Location location; }
266
%type <location> error_location
279
%type <location> error_location
267
280
281
#if ENABLE_CSS_GRID_LAYOUT
282
%type <valueList> ident_list
283
%destructor { delete $$; } ident_list
284
285
%type <value> track_names_list
286
%destructor { destroy($$); } track_names_list
287
#endif
288
268
#if ENABLE_CSS3_CONDITIONAL_RULES
289
#if ENABLE_CSS3_CONDITIONAL_RULES
269
290
270
%token SUPPORTS_AND
291
%token SUPPORTS_AND
Lines 1343-1348 property: IDENT maybe_space { $$ = cssPropertyID($1); } ; a/Source/WebCore/css/CSSGrammar.y.in_sec4
1343
1364
1344
priority: IMPORTANT_SYM maybe_space { $$ = true; } | /* empty */ { $$ = false; } ;
1365
priority: IMPORTANT_SYM maybe_space { $$ = true; } | /* empty */ { $$ = false; } ;
1345
1366
1367
#if ENABLE_CSS_GRID_LAYOUT
1368
1369
ident_list:
1370
    IDENT maybe_space {
1371
        $$ = new CSSParserValueList;
1372
        $$->addValue(makeIdentValue($1));
1373
    }
1374
    | ident_list IDENT maybe_space {
1375
        $$ = $1;
1376
        $$->addValue(makeIdentValue($2));
1377
    }
1378
    ;
1379
1380
track_names_list:
1381
    '(' maybe_space closing_parenthesis {
1382
        $$.setFromValueList(std::make_unique<CSSParserValueList>());
1383
    }
1384
    | '(' maybe_space ident_list closing_parenthesis {
1385
        $$.setFromValueList(std::unique_ptr<CSSParserValueList>($3));
1386
    }
1387
    | '(' maybe_space expr_recovery closing_parenthesis {
1388
        $$.id = CSSValueInvalid;
1389
        $$.unit = 0;
1390
        YYERROR;
1391
    }
1392
  ;
1393
1394
#endif
1395
1346
expr: valid_expr | valid_expr expr_recovery { $$ = nullptr; delete $1; } ;
1396
expr: valid_expr | valid_expr expr_recovery { $$ = nullptr; delete $1; } ;
1347
1397
1348
valid_expr:
1398
valid_expr:
Lines 1375-1385 term: a/Source/WebCore/css/CSSGrammar.y.in_sec5
1375
  unary_term maybe_space
1425
  unary_term maybe_space
1376
  | unary_operator unary_term maybe_space { $$ = $2; $$.fValue *= $1; }
1426
  | unary_operator unary_term maybe_space { $$ = $2; $$.fValue *= $1; }
1377
  | STRING maybe_space { $$.id = CSSValueInvalid; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_STRING; }
1427
  | STRING maybe_space { $$.id = CSSValueInvalid; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_STRING; }
1378
  | IDENT maybe_space {
1428
  | IDENT maybe_space { $$ = makeIdentValue($1); }
1379
      $$.id = cssValueKeywordID($1);
1380
      $$.unit = CSSPrimitiveValue::CSS_IDENT;
1381
      $$.string = $1;
1382
  }
1383
  /* We might need to actually parse the number from a dimension, but we can't just put something that uses $$.string into unary_term. */
1429
  /* We might need to actually parse the number from a dimension, but we can't just put something that uses $$.string into unary_term. */
1384
  | DIMEN maybe_space { $$.id = CSSValueInvalid; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_DIMENSION; }
1430
  | DIMEN maybe_space { $$.id = CSSValueInvalid; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_DIMENSION; }
1385
  | unary_operator DIMEN maybe_space { $$.id = CSSValueInvalid; $$.string = $2; $$.unit = CSSPrimitiveValue::CSS_DIMENSION; }
1431
  | unary_operator DIMEN maybe_space { $$.id = CSSValueInvalid; $$.string = $2; $$.unit = CSSPrimitiveValue::CSS_DIMENSION; }
Lines 1394-1399 term: a/Source/WebCore/css/CSSGrammar.y.in_sec6
1394
  | '%' maybe_space { /* Handle width: %; */
1440
  | '%' maybe_space { /* Handle width: %; */
1395
      $$.id = CSSValueInvalid; $$.unit = 0;
1441
      $$.id = CSSValueInvalid; $$.unit = 0;
1396
  }
1442
  }
1443
#if ENABLE_CSS_GRID_LAYOUT
1444
  | track_names_list maybe_space
1445
#endif
1397
  ;
1446
  ;
1398
1447
1399
unary_term:
1448
unary_term:
- a/Source/WebCore/css/CSSGridLineNamesValue.cpp +52 lines
Line 0 a/Source/WebCore/css/CSSGridLineNamesValue.cpp_sec1
1
/*
2
 * Copyright (C) 2013, 2014 Igalia, S.L. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions are
6
 * met:
7
 *
8
 *     * Redistributions of source code must retain the above copyright
9
 * notice, this list of conditions and the following disclaimer.
10
 *     * Redistributions in binary form must reproduce the above
11
 * copyright notice, this list of conditions and the following disclaimer
12
 * in the documentation and/or other materials provided with the
13
 * distribution.
14
 *     * Neither the name of Google Inc. nor the names of its
15
 * contributors may be used to endorse or promote products derived from
16
 * this software without specific prior written permission.
17
 *
18
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
 */
30
31
#include "config.h"
32
#include "CSSGridLineNamesValue.h"
33
34
namespace WebCore {
35
36
String CSSGridLineNamesValue::customCSSText() const
37
{
38
    return "(" + CSSValueList::customCSSText() + ")";
39
}
40
41
CSSGridLineNamesValue::CSSGridLineNamesValue()
42
    : CSSValueList(GridLineNamesClass, SpaceSeparator)
43
{
44
}
45
46
PassRefPtr<CSSGridLineNamesValue> CSSGridLineNamesValue::cloneForCSSOM() const
47
{
48
    return adoptRef(new CSSGridLineNamesValue(*this));
49
}
50
51
}
52
- a/Source/WebCore/css/CSSGridLineNamesValue.h +58 lines
Line 0 a/Source/WebCore/css/CSSGridLineNamesValue.h_sec1
1
/*
2
 * Copyright (C) 2013, 2014 Igalia, S.L. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions are
6
 * met:
7
 *
8
 *     * Redistributions of source code must retain the above copyright
9
 * notice, this list of conditions and the following disclaimer.
10
 *     * Redistributions in binary form must reproduce the above
11
 * copyright notice, this list of conditions and the following disclaimer
12
 * in the documentation and/or other materials provided with the
13
 * distribution.
14
 *     * Neither the name of Google Inc. nor the names of its
15
 * contributors may be used to endorse or promote products derived from
16
 * this software without specific prior written permission.
17
 *
18
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
 */
30
31
#ifndef CSSGridLineNamesValue_h
32
#define CSSGridLineNamesValue_h
33
34
#include "CSSValueList.h"
35
#include <wtf/PassRefPtr.h>
36
37
namespace WebCore {
38
39
class CSSGridLineNamesValue : public CSSValueList {
40
public:
41
    static PassRefPtr<CSSGridLineNamesValue> create()
42
    {
43
        return adoptRef(new CSSGridLineNamesValue());
44
    }
45
46
    String customCSSText() const;
47
48
    PassRefPtr<CSSGridLineNamesValue> cloneForCSSOM() const;
49
50
private:
51
    CSSGridLineNamesValue();
52
};
53
54
CSS_VALUE_TYPE_CASTS(CSSGridLineNamesValue, isGridLineNamesValue());
55
56
}
57
58
#endif
- a/Source/WebCore/css/CSSParser.cpp -18 / +41 lines
Lines 40-46 a/Source/WebCore/css/CSSParser.cpp_sec1
40
#include "CSSFontValue.h"
40
#include "CSSFontValue.h"
41
#include "CSSFunctionValue.h"
41
#include "CSSFunctionValue.h"
42
#include "CSSGradientValue.h"
42
#include "CSSGradientValue.h"
43
#include "CSSGridTemplateAreasValue.h"
44
#include "CSSImageValue.h"
43
#include "CSSImageValue.h"
45
#include "CSSInheritedValue.h"
44
#include "CSSInheritedValue.h"
46
#include "CSSInitialValue.h"
45
#include "CSSInitialValue.h"
Lines 93-98 a/Source/WebCore/css/CSSParser.cpp_sec2
93
#include <wtf/text/StringBuilder.h>
92
#include <wtf/text/StringBuilder.h>
94
#include <wtf/text/StringImpl.h>
93
#include <wtf/text/StringImpl.h>
95
94
95
#if ENABLE(CSS_GRID_LAYOUT)
96
#include "CSSGridLineNamesValue.h"
97
#include "CSSGridTemplateAreasValue.h"
98
#endif
99
96
#if ENABLE(CSS_IMAGE_SET)
100
#if ENABLE(CSS_IMAGE_SET)
97
#include "CSSImageSetValue.h"
101
#include "CSSImageSetValue.h"
98
#endif
102
#endif
Lines 4871-4883 bool CSSParser::parseSingleGridAreaLonghand(RefPtr<CSSValue>& property) a/Source/WebCore/css/CSSParser.cpp_sec3
4871
    return true;
4875
    return true;
4872
}
4876
}
4873
4877
4874
void CSSParser::parseGridTrackNames(CSSParserValueList& parserValues, CSSValueList& values)
4878
void CSSParser::parseGridLineNames(CSSParserValueList& inputList, CSSValueList& valueList)
4875
{
4879
{
4876
    do {
4880
    ASSERT(inputList.current() && inputList.current()->unit == CSSParserValue::ValueList);
4877
        RefPtr<CSSPrimitiveValue> name = createPrimitiveStringValue(parserValues.current());
4881
4878
        values.append(name.release());
4882
    CSSParserValueList* identList = inputList.current()->valueList;
4879
        parserValues.next();
4883
    if (!identList->size()) {
4880
    } while (parserValues.current() && parserValues.current()->unit == CSSPrimitiveValue::CSS_STRING);
4884
        inputList.next();
4885
        return;
4886
    }
4887
4888
    RefPtr<CSSGridLineNamesValue> lineNames = CSSGridLineNamesValue::create();
4889
    while (CSSParserValue* identValue = identList->current()) {
4890
        ASSERT(identValue->unit == CSSPrimitiveValue::CSS_IDENT);
4891
        lineNames->append(createPrimitiveStringValue(identValue));
4892
        identList->next();
4893
    }
4894
    valueList.append(lineNames.release());
4895
4896
    inputList.next();
4881
}
4897
}
4882
4898
4883
bool CSSParser::parseGridTrackList(CSSPropertyID propId, bool important)
4899
bool CSSParser::parseGridTrackList(CSSPropertyID propId, bool important)
Lines 4892-4900 bool CSSParser::parseGridTrackList(CSSPropertyID propId, bool important) a/Source/WebCore/css/CSSParser.cpp_sec4
4892
    }
4908
    }
4893
4909
4894
    RefPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
4910
    RefPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
4895
    // Handle leading track names
4911
    // Handle leading  <custom-ident>*.
4896
    if (m_valueList->current() && m_valueList->current()->unit == CSSPrimitiveValue::CSS_STRING)
4912
    value = m_valueList->current();
4897
        parseGridTrackNames(*m_valueList, *values);
4913
    if (value && value->unit == CSSParserValue::ValueList)
4914
        parseGridLineNames(*m_valueList, *values);
4898
4915
4899
    bool seenTrackSizeOrRepeatFunction = false;
4916
    bool seenTrackSizeOrRepeatFunction = false;
4900
    while (CSSParserValue* currentValue = m_valueList->current()) {
4917
    while (CSSParserValue* currentValue = m_valueList->current()) {
Lines 4909-4916 bool CSSParser::parseGridTrackList(CSSPropertyID propId, bool important) a/Source/WebCore/css/CSSParser.cpp_sec5
4909
        }
4926
        }
4910
        seenTrackSizeOrRepeatFunction = true;
4927
        seenTrackSizeOrRepeatFunction = true;
4911
4928
4912
        if (m_valueList->current() && m_valueList->current()->unit == CSSPrimitiveValue::CSS_STRING)
4929
        // This will handle the trailing <custom-ident>* in the grammar.
4913
            parseGridTrackNames(*m_valueList, *values);
4930
        value = m_valueList->current();
4931
        if (value && value->unit == CSSParserValue::ValueList)
4932
            parseGridLineNames(*m_valueList, *values);
4914
    }
4933
    }
4915
4934
4916
    if (!seenTrackSizeOrRepeatFunction)
4935
    if (!seenTrackSizeOrRepeatFunction)
Lines 4932-4949 bool CSSParser::parseGridTrackRepeatFunction(CSSValueList& list) a/Source/WebCore/css/CSSParser.cpp_sec6
4932
    arguments->next(); // Skip the repetition count.
4951
    arguments->next(); // Skip the repetition count.
4933
    arguments->next(); // Skip the comma.
4952
    arguments->next(); // Skip the comma.
4934
4953
4935
    while (arguments->current()) {
4954
    // Handle leading <custom-ident>*.
4936
        if (arguments->current()->unit == CSSPrimitiveValue::CSS_STRING)
4955
    CSSParserValue* currentValue = arguments->current();
4937
            parseGridTrackNames(*arguments, *repeatedValues);
4956
    if (currentValue && currentValue->unit == CSSParserValue::ValueList)
4938
4957
        parseGridLineNames(*arguments, *repeatedValues);
4939
        if (!arguments->current())
4940
            break;
4941
4958
4959
    while (arguments->current()) {
4942
        RefPtr<CSSValue> trackSize = parseGridTrackSize(*arguments);
4960
        RefPtr<CSSValue> trackSize = parseGridTrackSize(*arguments);
4943
        if (!trackSize)
4961
        if (!trackSize)
4944
            return false;
4962
            return false;
4945
4963
4946
        repeatedValues->append(trackSize.release());
4964
        repeatedValues->append(trackSize.release());
4965
4966
        // This takes care of any trailing <custom-ident>* in the grammar.
4967
        currentValue = arguments->current();
4968
        if (currentValue && currentValue->unit == CSSParserValue::ValueList)
4969
            parseGridLineNames(*arguments, *repeatedValues);
4947
    }
4970
    }
4948
4971
4949
    for (size_t i = 0; i < repetitions; ++i) {
4972
    for (size_t i = 0; i < repetitions; ++i) {
- a/Source/WebCore/css/CSSParser.h -1 / +1 lines
Lines 163-169 public: a/Source/WebCore/css/CSSParser.h_sec1
163
    PassRefPtr<CSSValue> parseGridTrackSize(CSSParserValueList& inputList);
163
    PassRefPtr<CSSValue> parseGridTrackSize(CSSParserValueList& inputList);
164
    PassRefPtr<CSSPrimitiveValue> parseGridBreadth(CSSParserValue*);
164
    PassRefPtr<CSSPrimitiveValue> parseGridBreadth(CSSParserValue*);
165
    PassRefPtr<CSSValue> parseGridTemplateAreas();
165
    PassRefPtr<CSSValue> parseGridTemplateAreas();
166
    void parseGridTrackNames(CSSParserValueList& inputList, CSSValueList& values);
166
    void parseGridLineNames(CSSParserValueList&, CSSValueList&);
167
#endif
167
#endif
168
168
169
    bool parseDashboardRegions(CSSPropertyID, bool important);
169
    bool parseDashboardRegions(CSSPropertyID, bool important);
- a/Source/WebCore/css/CSSParserValues.cpp +4 lines
Lines 35-40 void destroy(const CSSParserValue& value) a/Source/WebCore/css/CSSParserValues.cpp_sec1
35
{
35
{
36
    if (value.unit == CSSParserValue::Function)
36
    if (value.unit == CSSParserValue::Function)
37
        delete value.function;
37
        delete value.function;
38
    else if (value.unit == CSSParserValue::ValueList)
39
        delete value.valueList;
38
}
40
}
39
41
40
CSSParserValueList::~CSSParserValueList()
42
CSSParserValueList::~CSSParserValueList()
Lines 77-82 PassRefPtr<CSSValue> CSSParserValue::createCSSValue() a/Source/WebCore/css/CSSParserValues.cpp_sec2
77
    }
79
    }
78
    if (unit == CSSParserValue::Function)
80
    if (unit == CSSParserValue::Function)
79
        return CSSFunctionValue::create(function);
81
        return CSSFunctionValue::create(function);
82
    if (unit == CSSParserValue::ValueList)
83
        return CSSValueList::createFromParserValueList(*valueList);
80
    if (unit >= CSSParserValue::Q_EMS)
84
    if (unit >= CSSParserValue::Q_EMS)
81
        return CSSPrimitiveValue::createAllowingMarginQuirk(fValue, CSSPrimitiveValue::CSS_EMS);
85
        return CSSPrimitiveValue::createAllowingMarginQuirk(fValue, CSSPrimitiveValue::CSS_EMS);
82
86
- a/Source/WebCore/css/CSSParserValues.h -3 / +13 lines
Lines 113-126 struct CSSParserValue { a/Source/WebCore/css/CSSParserValues.h_sec1
113
        int iValue;
113
        int iValue;
114
        CSSParserString string;
114
        CSSParserString string;
115
        CSSParserFunction* function;
115
        CSSParserFunction* function;
116
        CSSParserValueList* valueList;
116
    };
117
    };
117
    enum {
118
    enum {
118
        Operator = 0x100000,
119
        Operator  = 0x100000,
119
        Function = 0x100001,
120
        Function  = 0x100001,
120
        Q_EMS    = 0x100002
121
        ValueList = 0x100002,
122
        Q_EMS     = 0x100003,
121
    };
123
    };
122
    int unit;
124
    int unit;
123
125
126
    void setFromValueList(std::unique_ptr<CSSParserValueList>);
127
124
    PassRefPtr<CSSValue> createCSSValue();
128
    PassRefPtr<CSSValue> createCSSValue();
125
};
129
};
126
130
Lines 215-220 inline bool CSSParserSelector::hasShadowDescendant() const a/Source/WebCore/css/CSSParserValues.h_sec2
215
    return m_selector->relation() == CSSSelector::ShadowDescendant;
219
    return m_selector->relation() == CSSSelector::ShadowDescendant;
216
}
220
}
217
221
222
inline void CSSParserValue::setFromValueList(std::unique_ptr<CSSParserValueList> valueList)
223
{
224
    id = CSSValueInvalid;
225
    this->valueList = valueList.release();
226
    unit = ValueList;
227
}
218
}
228
}
219
229
220
#endif
230
#endif
- a/Source/WebCore/css/CSSValue.cpp +8 lines
Lines 57-62 a/Source/WebCore/css/CSSValue.cpp_sec1
57
#include "WebKitCSSTransformValue.h"
57
#include "WebKitCSSTransformValue.h"
58
58
59
#if ENABLE(CSS_GRID_LAYOUT)
59
#if ENABLE(CSS_GRID_LAYOUT)
60
#include "CSSGridLineNamesValue.h"
60
#include "CSSGridTemplateAreasValue.h"
61
#include "CSSGridTemplateAreasValue.h"
61
#endif
62
#endif
62
63
Lines 193-198 bool CSSValue::equals(const CSSValue& other) const a/Source/WebCore/css/CSSValue.cpp_sec2
193
        case InitialClass:
194
        case InitialClass:
194
            return compareCSSValues<CSSInitialValue>(*this, other);
195
            return compareCSSValues<CSSInitialValue>(*this, other);
195
#if ENABLE(CSS_GRID_LAYOUT)
196
#if ENABLE(CSS_GRID_LAYOUT)
197
        case GridLineNamesClass:
198
            return compareCSSValues<CSSGridLineNamesValue>(*this, other);
196
        case GridTemplateAreasClass:
199
        case GridTemplateAreasClass:
197
            return compareCSSValues<CSSGridTemplateAreasValue>(*this, other);
200
            return compareCSSValues<CSSGridTemplateAreasValue>(*this, other);
198
#endif
201
#endif
Lines 281-286 String CSSValue::cssText() const a/Source/WebCore/css/CSSValue.cpp_sec3
281
    case InitialClass:
284
    case InitialClass:
282
        return toCSSInitialValue(this)->customCSSText();
285
        return toCSSInitialValue(this)->customCSSText();
283
#if ENABLE(CSS_GRID_LAYOUT)
286
#if ENABLE(CSS_GRID_LAYOUT)
287
    case GridLineNamesClass:
288
        return toCSSGridLineNamesValue(this)->customCSSText();
284
    case GridTemplateAreasClass:
289
    case GridTemplateAreasClass:
285
        return toCSSGridTemplateAreasValue(this)->customCSSText();
290
        return toCSSGridTemplateAreasValue(this)->customCSSText();
286
#endif
291
#endif
Lines 374-379 void CSSValue::destroy() a/Source/WebCore/css/CSSValue.cpp_sec4
374
        delete toCSSInitialValue(this);
379
        delete toCSSInitialValue(this);
375
        return;
380
        return;
376
#if ENABLE(CSS_GRID_LAYOUT)
381
#if ENABLE(CSS_GRID_LAYOUT)
382
    case GridLineNamesClass:
383
        delete toCSSGridLineNamesValue(this);
384
        return;
377
    case GridTemplateAreasClass:
385
    case GridTemplateAreasClass:
378
        delete toCSSGridTemplateAreasValue(this);
386
        delete toCSSGridTemplateAreasValue(this);
379
        return;
387
        return;
- a/Source/WebCore/css/CSSValue.h +4 lines
Lines 99-104 public: a/Source/WebCore/css/CSSValue.h_sec1
99
#endif // ENABLE(CSS_FILTERS)
99
#endif // ENABLE(CSS_FILTERS)
100
#if ENABLE(CSS_GRID_LAYOUT)
100
#if ENABLE(CSS_GRID_LAYOUT)
101
    bool isGridTemplateAreasValue() const { return m_classType == GridTemplateAreasClass; }
101
    bool isGridTemplateAreasValue() const { return m_classType == GridTemplateAreasClass; }
102
    bool isGridLineNamesValue() const { return m_classType == GridLineNamesClass; }
102
#endif
103
#endif
103
    bool isSVGColor() const { return m_classType == SVGColorClass || m_classType == SVGPaintClass; }
104
    bool isSVGColor() const { return m_classType == SVGColorClass || m_classType == SVGPaintClass; }
104
    bool isSVGPaint() const { return m_classType == SVGPaintClass; }
105
    bool isSVGPaint() const { return m_classType == SVGPaintClass; }
Lines 174-179 protected: a/Source/WebCore/css/CSSValue.h_sec2
174
        WebKitCSSFilterClass,
175
        WebKitCSSFilterClass,
175
#endif
176
#endif
176
        WebKitCSSTransformClass,
177
        WebKitCSSTransformClass,
178
#if ENABLE(CSS_GRID_LAYOUT)
179
        GridLineNamesClass,
180
#endif
177
        // Do not append non-list class types here.
181
        // Do not append non-list class types here.
178
    };
182
    };
179
183
- a/Source/WebCore/css/StyleResolver.cpp -5 / +6 lines
Lines 144-149 a/Source/WebCore/css/StyleResolver.cpp_sec1
144
#endif
144
#endif
145
145
146
#if ENABLE(CSS_GRID_LAYOUT)
146
#if ENABLE(CSS_GRID_LAYOUT)
147
#include "CSSGridLineNamesValue.h"
147
#include "CSSGridTemplateAreasValue.h"
148
#include "CSSGridTemplateAreasValue.h"
148
#endif
149
#endif
149
150
Lines 2033-2048 static bool createGridTrackList(CSSValue* value, Vector<GridTrackSize>& trackSiz a/Source/WebCore/css/StyleResolver.cpp_sec2
2033
    size_t currentNamedGridLine = 0;
2034
    size_t currentNamedGridLine = 0;
2034
    for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
2035
    for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
2035
        CSSValue* currValue = i.value();
2036
        CSSValue* currValue = i.value();
2036
        if (currValue->isPrimitiveValue()) {
2037
        if (currValue->isGridLineNamesValue()) {
2037
            CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(currValue);
2038
            CSSGridLineNamesValue* lineNamesValue = toCSSGridLineNamesValue(currValue);
2038
            if (primitiveValue->isString()) {
2039
            for (CSSValueListIterator j = lineNamesValue; j.hasMore(); j.advance()) {
2039
                String namedGridLine = primitiveValue->getStringValue();
2040
                String namedGridLine = toCSSPrimitiveValue(j.value())->getStringValue();
2040
                NamedGridLinesMap::AddResult result = namedGridLines.add(namedGridLine, Vector<size_t>());
2041
                NamedGridLinesMap::AddResult result = namedGridLines.add(namedGridLine, Vector<size_t>());
2041
                result.iterator->value.append(currentNamedGridLine);
2042
                result.iterator->value.append(currentNamedGridLine);
2042
                OrderedNamedGridLinesMap::AddResult orderedResult = orderedNamedGridLines.add(currentNamedGridLine, Vector<String>());
2043
                OrderedNamedGridLinesMap::AddResult orderedResult = orderedNamedGridLines.add(currentNamedGridLine, Vector<String>());
2043
                orderedResult.iterator->value.append(namedGridLine);
2044
                orderedResult.iterator->value.append(namedGridLine);
2044
                continue;
2045
            }
2045
            }
2046
            continue;
2046
        }
2047
        }
2047
2048
2048
        ++currentNamedGridLine;
2049
        ++currentNamedGridLine;
- a/LayoutTests/ChangeLog +42 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2014-03-22  Javier Fernandez  <jfernandez@igalia.com>
2
3
        [CSS Grid Layout] Update named <grid-line> syntax to the last version of the specs
4
        https://bugs.webkit.org/show_bug.cgi?id=129041
5
6
        Reviewed by Sergio Villar Senin.
7
8
        From Blink r162555 by <svillar@igalia.com>
9
10
        Updated tests to match the new <grid-line> syntax.
11
12
        * fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
13
        * fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt:
14
        * fast/css-grid-layout/grid-element-repeat-get-set-expected.txt:
15
        * fast/css-grid-layout/grid-element-repeat-get-set.html:
16
        * fast/css-grid-layout/grid-item-bad-resolution-double-span.html:
17
        * fast/css-grid-layout/grid-item-named-grid-area-resolution.html:
18
        * fast/css-grid-layout/grid-item-named-grid-line-resolution.html:
19
        * fast/css-grid-layout/grid-item-negative-position-resolution.html:
20
        * fast/css-grid-layout/grid-item-position-changed-dynamic.html:
21
        * fast/css-grid-layout/named-grid-line-get-set-expected.txt:
22
        * fast/css-grid-layout/named-grid-line-get-set.html:
23
        * fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html:
24
        * fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt:
25
        * fast/css-grid-layout/non-grid-columns-rows-get-set-multiple-expected.txt:
26
        * fast/css-grid-layout/non-grid-element-repeat-get-set-expected.txt:
27
        * fast/css-grid-layout/non-grid-element-repeat-get-set.html:
28
        * fast/css-grid-layout/non-named-grid-line-get-set-expected.txt:
29
        * fast/css-grid-layout/non-named-grid-line-get-set.html:
30
        * fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js:
31
        (testInherit):
32
        (testInitial):
33
        * fast/css-grid-layout/resources/grid-columns-rows-get-set.js:
34
        (testInherit):
35
        (testInitial):
36
        * fast/css-grid-layout/resources/non-grid-columns-rows-get-set-multiple.js:
37
        (testInherit):
38
        (testInitial):
39
        * fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js:
40
        (testInherit):
41
        (testInitial):
42
1
2014-03-22  Michael Saboff  <msaboff@apple.com>
43
2014-03-22  Michael Saboff  <msaboff@apple.com>
2
44
3
        toThis() on a JSWorkerGlobalScope should return a JSProxy and not undefined
45
        toThis() on a JSWorkerGlobalScope should return a JSProxy and not undefined
- a/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt -4 / +4 lines
Lines 170-181 PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows' a/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt_sec1
170
PASS element.style.webkitGridTemplateRows is "none"
170
PASS element.style.webkitGridTemplateRows is "none"
171
171
172
Test setting grid-template-columns and grid-template-rows to 'inherit' through JS
172
Test setting grid-template-columns and grid-template-rows to 'inherit' through JS
173
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is '50px last'
173
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is '50px (last)'
174
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is 'first 20px'
174
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is '(first) 20px'
175
175
176
Test setting grid-template-columns and grid-template-rows to 'initial' through JS
176
Test setting grid-template-columns and grid-template-rows to 'initial' through JS
177
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is '450px last'
177
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is '450px (last)'
178
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is 'first 150px'
178
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is '(first) 150px'
179
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is 'none'
179
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is 'none'
180
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is 'none'
180
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is 'none'
181
PASS successfullyParsed is true
181
PASS successfullyParsed is true
- a/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt -4 / +4 lines
Lines 110-121 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-templat a/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt_sec1
110
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
110
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
111
111
112
Test setting grid-template-columns and grid-template-rows to 'inherit' through JS
112
Test setting grid-template-columns and grid-template-rows to 'inherit' through JS
113
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "50px 750px last"
113
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "50px 750px (last)"
114
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "20px middle 45px"
114
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "20px (middle) 45px"
115
115
116
Test setting grid-template-columns and grid-template-rows to 'initial' through JS
116
Test setting grid-template-columns and grid-template-rows to 'initial' through JS
117
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "1200px middle 55px"
117
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "1200px (middle) 55px"
118
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "200px line 400px line"
118
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "200px (line) 400px (line)"
119
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
119
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
120
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
120
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
121
PASS successfullyParsed is true
121
PASS successfullyParsed is true
- a/LayoutTests/fast/css-grid-layout/grid-element-repeat-get-set-expected.txt -11 / +11 lines
Lines 14-31 PASS window.getComputedStyle(twoSingleTrackRepeatWithChildren, '').getPropertyVa a/LayoutTests/fast/css-grid-layout/grid-element-repeat-get-set-expected.txt_sec1
14
PASS window.getComputedStyle(twoSingleTrackRepeatWithChildren, '').getPropertyValue('-webkit-grid-template-rows') is "44px 77px"
14
PASS window.getComputedStyle(twoSingleTrackRepeatWithChildren, '').getPropertyValue('-webkit-grid-template-rows') is "44px 77px"
15
PASS window.getComputedStyle(twoDoubleTrackRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "33px 120px 0px 120px"
15
PASS window.getComputedStyle(twoDoubleTrackRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "33px 120px 0px 120px"
16
PASS window.getComputedStyle(twoDoubleTrackRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "10px 77px 10px 0px"
16
PASS window.getComputedStyle(twoDoubleTrackRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "10px 77px 10px 0px"
17
PASS window.getComputedStyle(twoDoubleTrackWithNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "33px middle 250px end 0px middle 250px end"
17
PASS window.getComputedStyle(twoDoubleTrackWithNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "33px (middle) 250px (end) 0px (middle) 250px (end)"
18
PASS window.getComputedStyle(twoDoubleTrackWithNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "10px start 77px end 10px start 0px end"
18
PASS window.getComputedStyle(twoDoubleTrackWithNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "10px (start) 77px (end) 10px (start) 0px (end)"
19
PASS window.getComputedStyle(twoDoubleTrackWithTrailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "before 0px before 0px"
19
PASS window.getComputedStyle(twoDoubleTrackWithTrailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "(before) 0px (before) 0px"
20
PASS window.getComputedStyle(twoDoubleTrackWithTrailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "before 10px before 10px"
20
PASS window.getComputedStyle(twoDoubleTrackWithTrailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "(before) 10px (before) 10px"
21
PASS window.getComputedStyle(trailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "250px end"
21
PASS window.getComputedStyle(trailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "250px (end)"
22
PASS window.getComputedStyle(trailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "10px end"
22
PASS window.getComputedStyle(trailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "10px (end)"
23
PASS window.getComputedStyle(leadingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "start 250px 250px"
23
PASS window.getComputedStyle(leadingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "(start) 250px 250px"
24
PASS window.getComputedStyle(leadingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "start 10px 10px"
24
PASS window.getComputedStyle(leadingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "(start) 10px 10px"
25
PASS window.getComputedStyle(mixRepeatAfterNonRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "start 140px 250px 250px"
25
PASS window.getComputedStyle(mixRepeatAfterNonRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "(start) 140px 250px 250px"
26
PASS window.getComputedStyle(mixRepeatAfterNonRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "44px 10px 10px"
26
PASS window.getComputedStyle(mixRepeatAfterNonRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "44px 10px 10px"
27
PASS window.getComputedStyle(mixNonRepeatAfterRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "250px 250px 120px last"
27
PASS window.getComputedStyle(mixNonRepeatAfterRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "250px 250px 120px (last)"
28
PASS window.getComputedStyle(mixNonRepeatAfterRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "10px 10px end 0px"
28
PASS window.getComputedStyle(mixNonRepeatAfterRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "10px 10px (end) 0px"
29
29
30
Test invalid repeat syntax.
30
Test invalid repeat syntax.
31
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
31
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
- a/LayoutTests/fast/css-grid-layout/grid-element-repeat-get-set.html -17 / +17 lines
Lines 43-75 if (window.testRunner) a/LayoutTests/fast/css-grid-layout/grid-element-repeat-get-set.html_sec1
43
}
43
}
44
44
45
.twoDoubleTrackWithNamedGridLineRepeat {
45
.twoDoubleTrackWithNamedGridLineRepeat {
46
    -webkit-grid-template-rows: repeat(2, 10px 'start' auto 'end');
46
    -webkit-grid-template-rows: repeat(2, 10px (start) auto (end));
47
    -webkit-grid-template-columns: repeat(2, auto 'middle' 250px 'end');
47
    -webkit-grid-template-columns: repeat(2, auto (middle) 250px (end));
48
}
48
}
49
49
50
.twoDoubleTrackWithTrailingNamedGridLineRepeat {
50
.twoDoubleTrackWithTrailingNamedGridLineRepeat {
51
    -webkit-grid-template-rows: repeat(2, 'before' 10px);
51
    -webkit-grid-template-rows: repeat(2, (before) 10px);
52
    -webkit-grid-template-columns: repeat(2, 'before' auto);
52
    -webkit-grid-template-columns: repeat(2, (before) auto);
53
}
53
}
54
54
55
.trailingNamedGridLineRepeat {
55
.trailingNamedGridLineRepeat {
56
    -webkit-grid-template-rows: repeat(1, 10px) 'end';
56
    -webkit-grid-template-rows: repeat(1, 10px) (end);
57
    -webkit-grid-template-columns: repeat(1, 250px) 'end';
57
    -webkit-grid-template-columns: repeat(1, 250px) (end);
58
}
58
}
59
59
60
.leadingNamedGridLineRepeat {
60
.leadingNamedGridLineRepeat {
61
    -webkit-grid-template-rows: 'start' repeat(2, 10px);
61
    -webkit-grid-template-rows: (start) repeat(2, 10px);
62
    -webkit-grid-template-columns: 'start' repeat(2, 250px);
62
    -webkit-grid-template-columns: (start) repeat(2, 250px);
63
}
63
}
64
64
65
.mixRepeatAfterNonRepeat {
65
.mixRepeatAfterNonRepeat {
66
    -webkit-grid-template-rows: auto repeat(2, 10px);
66
    -webkit-grid-template-rows: auto repeat(2, 10px);
67
    -webkit-grid-template-columns: 'start' 140px repeat(2, 250px);
67
    -webkit-grid-template-columns: (start) 140px repeat(2, 250px);
68
}
68
}
69
69
70
.mixNonRepeatAfterRepeat {
70
.mixNonRepeatAfterRepeat {
71
    -webkit-grid-template-rows: repeat(2, 10px) 'end' auto;
71
    -webkit-grid-template-rows: repeat(2, 10px) (end) auto;
72
    -webkit-grid-template-columns: repeat(2, 250px) 15% 'last';
72
    -webkit-grid-template-columns: repeat(2, 250px) 15% (last);
73
}
73
}
74
</style>
74
</style>
75
<script src="../../resources/js-test-pre.js"></script>
75
<script src="../../resources/js-test-pre.js"></script>
Lines 108-119 if (window.testRunner) a/LayoutTests/fast/css-grid-layout/grid-element-repeat-get-set.html_sec2
108
    testGridTemplatesValues(document.getElementById("twoSingleTrackRepeat"), "400px 400px", "0px 0px");
108
    testGridTemplatesValues(document.getElementById("twoSingleTrackRepeat"), "400px 400px", "0px 0px");
109
    testGridTemplatesValues(document.getElementById("twoSingleTrackRepeatWithChildren"), "400px 400px", "44px 77px");
109
    testGridTemplatesValues(document.getElementById("twoSingleTrackRepeatWithChildren"), "400px 400px", "44px 77px");
110
    testGridTemplatesValues(document.getElementById("twoDoubleTrackRepeat"), "33px 120px 0px 120px", "10px 77px 10px 0px");
110
    testGridTemplatesValues(document.getElementById("twoDoubleTrackRepeat"), "33px 120px 0px 120px", "10px 77px 10px 0px");
111
    testGridTemplatesValues(document.getElementById("twoDoubleTrackWithNamedGridLineRepeat"), "33px middle 250px end 0px middle 250px end", "10px start 77px end 10px start 0px end");
111
    testGridTemplatesValues(document.getElementById("twoDoubleTrackWithNamedGridLineRepeat"), "33px (middle) 250px (end) 0px (middle) 250px (end)", "10px (start) 77px (end) 10px (start) 0px (end)");
112
    testGridTemplatesValues(document.getElementById("twoDoubleTrackWithTrailingNamedGridLineRepeat"), "before 0px before 0px", "before 10px before 10px");
112
    testGridTemplatesValues(document.getElementById("twoDoubleTrackWithTrailingNamedGridLineRepeat"), "(before) 0px (before) 0px", "(before) 10px (before) 10px");
113
    testGridTemplatesValues(document.getElementById("trailingNamedGridLineRepeat"), "250px end", "10px end");
113
    testGridTemplatesValues(document.getElementById("trailingNamedGridLineRepeat"), "250px (end)", "10px (end)");
114
    testGridTemplatesValues(document.getElementById("leadingNamedGridLineRepeat"), "start 250px 250px", "start 10px 10px");
114
    testGridTemplatesValues(document.getElementById("leadingNamedGridLineRepeat"), "(start) 250px 250px", "(start) 10px 10px");
115
    testGridTemplatesValues(document.getElementById("mixRepeatAfterNonRepeat"), "start 140px 250px 250px", "44px 10px 10px");
115
    testGridTemplatesValues(document.getElementById("mixRepeatAfterNonRepeat"), "(start) 140px 250px 250px", "44px 10px 10px");
116
    testGridTemplatesValues(document.getElementById("mixNonRepeatAfterRepeat"), "250px 250px 120px last", "10px 10px end 0px");
116
    testGridTemplatesValues(document.getElementById("mixNonRepeatAfterRepeat"), "250px 250px 120px (last)", "10px 10px (end) 0px");
117
117
118
    debug("");
118
    debug("");
119
    debug("Test invalid repeat syntax.");
119
    debug("Test invalid repeat syntax.");
- a/LayoutTests/fast/css-grid-layout/grid-item-bad-resolution-double-span.html -2 / +2 lines
Lines 8-15 if (window.testRunner) a/LayoutTests/fast/css-grid-layout/grid-item-bad-resolution-double-span.html_sec1
8
<style>
8
<style>
9
.grid {
9
.grid {
10
    display: -webkit-grid;
10
    display: -webkit-grid;
11
    -webkit-grid-template-rows: "firstRow" 10px 20px;
11
    -webkit-grid-template-rows: (firstRow) 10px 20px;
12
    -webkit-grid-template-columns: "firstColumn" 30px 40px;
12
    -webkit-grid-template-columns: (firstColumn) 30px 40px;
13
    -webkit-grid-auto-flow: row;
13
    -webkit-grid-auto-flow: row;
14
}
14
}
15
15
- a/LayoutTests/fast/css-grid-layout/grid-item-named-grid-area-resolution.html -1 / +1 lines
Lines 8-14 if (window.testRunner) a/LayoutTests/fast/css-grid-layout/grid-item-named-grid-area-resolution.html_sec1
8
<link href="resources/grid.css" rel="stylesheet"/>
8
<link href="resources/grid.css" rel="stylesheet"/>
9
<style>
9
<style>
10
.grid {
10
.grid {
11
    -webkit-grid-template-rows: "before" 50px "middle" 100px "after";
11
    -webkit-grid-template-rows: (before) 50px (middle) 100px (after);
12
    -webkit-grid-template-columns: 40px 80px 160px;
12
    -webkit-grid-template-columns: 40px 80px 160px;
13
}
13
}
14
14
- a/LayoutTests/fast/css-grid-layout/grid-item-named-grid-line-resolution.html -5 / +5 lines
Lines 8-24 if (window.testRunner) a/LayoutTests/fast/css-grid-layout/grid-item-named-grid-line-resolution.html_sec1
8
<link href="resources/grid.css" rel="stylesheet">
8
<link href="resources/grid.css" rel="stylesheet">
9
<style>
9
<style>
10
.gridWithoutRepeat {
10
.gridWithoutRepeat {
11
    -webkit-grid-template-columns: 'a' 50px 'b' 100px 'c' 200px 'd';
11
    -webkit-grid-template-columns: (a) 50px (b) 100px (c) 200px (d);
12
    -webkit-grid-template-rows: 'e' 50px 'f' 100px 'g' 200px 'h';
12
    -webkit-grid-template-rows: (e) 50px (f) 100px (g) 200px (h);
13
}
13
}
14
14
15
.gridWithRepeat {
15
.gridWithRepeat {
16
    -webkit-grid-template-columns: 'b' 50px 'b' 100px 'b' 200px 'b';
16
    -webkit-grid-template-columns: (b) 50px (b) 100px (b) 200px (b);
17
    -webkit-grid-template-rows: 'g' 50px 'g' 100px 'g' 200px 'g';
17
    -webkit-grid-template-rows: (g) 50px (g) 100px (g) 200px (g);
18
}
18
}
19
19
20
.gridFromSpecs {
20
.gridFromSpecs {
21
    -webkit-grid-template-columns: 'A' 10px 'B' 20px 'C' 30px 'A' 40px 'B' 50px 'C' 60px 'A' 70px 'B' 80px 'C';
21
    -webkit-grid-template-columns: (A) 10px (B) 20px (C) 30px (A) 40px (B) 50px (C) 60px (A) 70px (B) 80px (C);
22
    -webkit-grid-template-rows: 100px;
22
    -webkit-grid-template-rows: 100px;
23
}
23
}
24
24
- a/LayoutTests/fast/css-grid-layout/grid-item-negative-position-resolution.html -4 / +4 lines
Lines 7-14 if (window.testRunner) a/LayoutTests/fast/css-grid-layout/grid-item-negative-position-resolution.html_sec1
7
<link href="resources/grid.css" rel="stylesheet">
7
<link href="resources/grid.css" rel="stylesheet">
8
<style>
8
<style>
9
.grid {
9
.grid {
10
    -webkit-grid-template-columns: 'first' 50px 'middle' 100px 'last';
10
    -webkit-grid-template-columns: (first) 50px (middle) 100px (last);
11
    -webkit-grid-template-rows: 'first' 50px 'middle' 100px 'last';
11
    -webkit-grid-template-rows: (first) 50px (middle) 100px (last);
12
    /* To detect how much we extend the grid. */
12
    /* To detect how much we extend the grid. */
13
    -webkit-grid-auto-columns: 200px;
13
    -webkit-grid-auto-columns: 200px;
14
    -webkit-grid-auto-rows: 200px;
14
    -webkit-grid-auto-rows: 200px;
Lines 98-105 if (window.testRunner) a/LayoutTests/fast/css-grid-layout/grid-item-negative-position-resolution.html_sec2
98
}
98
}
99
99
100
.namedGridLineEndPositionStartNegativeInRowDirection {
100
.namedGridLineEndPositionStartNegativeInRowDirection {
101
    grid-column: -5 / -2 "middle";
101
    -webkit-grid-column: -5 / -2 "middle";
102
    grid-row: 1;
102
    -webkit-grid-row: 1;
103
}
103
}
104
</style>
104
</style>
105
<script src="../../resources/check-layout.js"></script>
105
<script src="../../resources/check-layout.js"></script>
- a/LayoutTests/fast/css-grid-layout/grid-item-position-changed-dynamic.html -4 / +4 lines
Lines 7-18 if (window.testRunner) a/LayoutTests/fast/css-grid-layout/grid-item-position-changed-dynamic.html_sec1
7
<link href="resources/grid.css" rel="stylesheet">
7
<link href="resources/grid.css" rel="stylesheet">
8
<style type="text/css">
8
<style type="text/css">
9
.grid {
9
.grid {
10
    -webkit-grid-template-columns: "col" 50px "col" 100px "col" 200px "col";
10
    -webkit-grid-template-columns: (col) 50px (col) 100px (col) 200px (col);
11
    -webkit-grid-template-rows: "row" 70px "row" 140px "row" 280px "row";
11
    -webkit-grid-template-rows: (row) 70px (row) 140px (row) 280px (row);
12
}
12
}
13
.differentNamedGridLines {
13
.differentNamedGridLines {
14
    -webkit-grid-template-columns: "col1" 50px "col2" 100px "col3" 200px "col4";
14
    -webkit-grid-template-columns: (col1) 50px (col2) 100px (col3) 200px (col4);
15
    -webkit-grid-template-rows: "row1" 70px "row2" 140px "row3" 280px "row4";
15
    -webkit-grid-template-rows: (row1) 70px (row2) 140px (row3) 280px (row4);
16
}
16
}
17
</style>
17
</style>
18
<script src="../../resources/check-layout.js"></script>
18
<script src="../../resources/check-layout.js"></script>
- a/LayoutTests/fast/css-grid-layout/named-grid-line-get-set-expected.txt -66 / +66 lines
Lines 4-77 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE a/LayoutTests/fast/css-grid-layout/named-grid-line-get-set-expected.txt_sec1
4
4
5
5
6
Test getting -webkit-grid-template-columns and -webkit-grid-template-rows set through CSS
6
Test getting -webkit-grid-template-columns and -webkit-grid-template-rows set through CSS
7
PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-template-columns') is "first 10px"
7
PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 10px"
8
PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-template-rows') is "first 15px"
8
PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-template-rows') is "(first) 15px"
9
PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-template-columns') is "424px last"
9
PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-template-columns') is "424px (last)"
10
PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-template-rows') is "162px last"
10
PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-template-rows') is "162px (last)"
11
PASS window.getComputedStyle(gridWithPercentWithoutSize, '').getPropertyValue('-webkit-grid-template-columns') is "0px last"
11
PASS window.getComputedStyle(gridWithPercentWithoutSize, '').getPropertyValue('-webkit-grid-template-columns') is "0px (last)"
12
PASS window.getComputedStyle(gridWithPercentWithoutSize, '').getPropertyValue('-webkit-grid-template-rows') is "0px last"
12
PASS window.getComputedStyle(gridWithPercentWithoutSize, '').getPropertyValue('-webkit-grid-template-rows') is "0px (last)"
13
PASS window.getComputedStyle(gridWithPercentWithoutSizeWithChildren, '').getPropertyValue('-webkit-grid-template-columns') is "77px last"
13
PASS window.getComputedStyle(gridWithPercentWithoutSizeWithChildren, '').getPropertyValue('-webkit-grid-template-columns') is "77px (last)"
14
PASS window.getComputedStyle(gridWithPercentWithoutSizeWithChildren, '').getPropertyValue('-webkit-grid-template-rows') is "22px last"
14
PASS window.getComputedStyle(gridWithPercentWithoutSizeWithChildren, '').getPropertyValue('-webkit-grid-template-rows') is "22px (last)"
15
PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-template-columns') is "first 0px"
15
PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 0px"
16
PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-template-rows') is "0px last"
16
PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-template-rows') is "0px (last)"
17
PASS window.getComputedStyle(gridWithAutoWithChildrenElement, '').getPropertyValue('-webkit-grid-template-columns') is "first 77px"
17
PASS window.getComputedStyle(gridWithAutoWithChildrenElement, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 77px"
18
PASS window.getComputedStyle(gridWithAutoWithChildrenElement, '').getPropertyValue('-webkit-grid-template-rows') is "22px last"
18
PASS window.getComputedStyle(gridWithAutoWithChildrenElement, '').getPropertyValue('-webkit-grid-template-rows') is "22px (last)"
19
PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('-webkit-grid-template-columns') is "first 80px"
19
PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 80px"
20
PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('-webkit-grid-template-rows') is "300px last"
20
PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('-webkit-grid-template-rows') is "300px (last)"
21
PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('-webkit-grid-template-columns') is "first nav 10px last"
21
PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('-webkit-grid-template-columns') is "(first nav) 10px (last)"
22
PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('-webkit-grid-template-rows') is "first nav 15px last"
22
PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('-webkit-grid-template-rows') is "(first nav) 15px (last)"
23
PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('-webkit-grid-template-columns') is "first nav 80px nav 120px last"
23
PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('-webkit-grid-template-columns') is "(first nav) 80px (nav) 120px (last)"
24
PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('-webkit-grid-template-rows') is "first nav2 150px nav2 450px last"
24
PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('-webkit-grid-template-rows') is "(first nav2) 150px (nav2) 450px (last)"
25
25
26
Test getting and setting -webkit-grid-template-columns and -webkit-grid-template-rows through JS
26
Test getting and setting -webkit-grid-template-columns and -webkit-grid-template-rows through JS
27
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first 18px"
27
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 18px"
28
PASS element.style.webkitGridTemplateColumns is "first 18px"
28
PASS element.style.webkitGridTemplateColumns is "(first) 18px"
29
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "66px last"
29
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "66px (last)"
30
PASS element.style.webkitGridTemplateRows is "66px last"
30
PASS element.style.webkitGridTemplateRows is "66px (last)"
31
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first 440px"
31
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 440px"
32
PASS element.style.webkitGridTemplateColumns is "first 55%"
32
PASS element.style.webkitGridTemplateColumns is "(first) 55%"
33
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "240px last"
33
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "240px (last)"
34
PASS element.style.webkitGridTemplateRows is "40% last"
34
PASS element.style.webkitGridTemplateRows is "40% (last)"
35
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first 0px"
35
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 0px"
36
PASS element.style.webkitGridTemplateColumns is "first auto"
36
PASS element.style.webkitGridTemplateColumns is "(first) auto"
37
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px last"
37
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px (last)"
38
PASS element.style.webkitGridTemplateRows is "auto last"
38
PASS element.style.webkitGridTemplateRows is "auto (last)"
39
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first 0px"
39
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 0px"
40
PASS element.style.webkitGridTemplateColumns is "first -webkit-min-content"
40
PASS element.style.webkitGridTemplateColumns is "(first) -webkit-min-content"
41
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px last"
41
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px (last)"
42
PASS element.style.webkitGridTemplateRows is "-webkit-min-content last"
42
PASS element.style.webkitGridTemplateRows is "-webkit-min-content (last)"
43
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first 0px"
43
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 0px"
44
PASS element.style.webkitGridTemplateColumns is "first -webkit-max-content"
44
PASS element.style.webkitGridTemplateColumns is "(first) -webkit-max-content"
45
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px last"
45
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px (last)"
46
PASS element.style.webkitGridTemplateRows is "-webkit-max-content last"
46
PASS element.style.webkitGridTemplateRows is "-webkit-max-content (last)"
47
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first 440px"
47
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 440px"
48
PASS element.style.webkitGridTemplateColumns is "first minmax(55%, 45px)"
48
PASS element.style.webkitGridTemplateColumns is "(first) minmax(55%, 45px)"
49
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "240px last"
49
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "240px (last)"
50
PASS element.style.webkitGridTemplateRows is "minmax(30px, 40%) last"
50
PASS element.style.webkitGridTemplateRows is "minmax(30px, 40%) (last)"
51
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first 220px"
51
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 220px"
52
PASS element.style.webkitGridTemplateColumns is "first minmax(22em, -webkit-max-content)"
52
PASS element.style.webkitGridTemplateColumns is "(first) minmax(22em, -webkit-max-content)"
53
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "50px last"
53
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "50px (last)"
54
PASS element.style.webkitGridTemplateRows is "minmax(-webkit-max-content, 5em) last"
54
PASS element.style.webkitGridTemplateRows is "minmax(-webkit-max-content, 5em) (last)"
55
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first 220px"
55
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 220px"
56
PASS element.style.webkitGridTemplateColumns is "first minmax(22em, -webkit-min-content)"
56
PASS element.style.webkitGridTemplateColumns is "(first) minmax(22em, -webkit-min-content)"
57
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "50px last"
57
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "50px (last)"
58
PASS element.style.webkitGridTemplateRows is "minmax(-webkit-min-content, 5em) last"
58
PASS element.style.webkitGridTemplateRows is "minmax(-webkit-min-content, 5em) (last)"
59
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first 0px"
59
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 0px"
60
PASS element.style.webkitGridTemplateColumns is "first minmax(-webkit-min-content, -webkit-max-content)"
60
PASS element.style.webkitGridTemplateColumns is "(first) minmax(-webkit-min-content, -webkit-max-content)"
61
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px last"
61
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "0px (last)"
62
PASS element.style.webkitGridTemplateRows is "minmax(-webkit-max-content, -webkit-min-content) last"
62
PASS element.style.webkitGridTemplateRows is "minmax(-webkit-max-content, -webkit-min-content) (last)"
63
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first nav 0px last"
63
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first nav) 0px (last)"
64
PASS element.style.webkitGridTemplateColumns is "first nav minmax(-webkit-min-content, -webkit-max-content) last"
64
PASS element.style.webkitGridTemplateColumns is "(first nav) minmax(-webkit-min-content, -webkit-max-content) (last)"
65
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "first nav 0px last"
65
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "(first nav) 0px (last)"
66
PASS element.style.webkitGridTemplateRows is "first nav minmax(-webkit-max-content, -webkit-min-content) last"
66
PASS element.style.webkitGridTemplateRows is "(first nav) minmax(-webkit-max-content, -webkit-min-content) (last)"
67
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first nav 0px nav 0px last"
67
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first nav) 0px (nav) 0px (last)"
68
PASS element.style.webkitGridTemplateColumns is "first nav minmax(-webkit-min-content, -webkit-max-content) nav auto last"
68
PASS element.style.webkitGridTemplateColumns is "(first nav) minmax(-webkit-min-content, -webkit-max-content) (nav) auto (last)"
69
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "first nav2 0px nav2 15px last"
69
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "(first nav2) 0px (nav2) 15px (last)"
70
PASS element.style.webkitGridTemplateRows is "first nav2 minmax(-webkit-max-content, -webkit-min-content) nav2 minmax(10px, 15px) last"
70
PASS element.style.webkitGridTemplateRows is "(first nav2) minmax(-webkit-max-content, -webkit-min-content) (nav2) minmax(10px, 15px) (last)"
71
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "foo bar 0px foo 0px bar"
71
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(foo bar) 0px (foo) 0px (bar)"
72
PASS element.style.webkitGridTemplateColumns is "foo bar auto foo auto bar"
72
PASS element.style.webkitGridTemplateColumns is "(foo bar) auto (foo) auto (bar)"
73
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "foo bar 0px foo 0px bar"
73
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "(foo bar) 0px (foo) 0px (bar)"
74
PASS element.style.webkitGridTemplateRows is "foo bar auto foo auto bar"
74
PASS element.style.webkitGridTemplateRows is "(foo bar) auto (foo) auto (bar)"
75
75
76
Test getting and setting invalid -webkit-grid-template-columns and -webkit-grid-template-rows through JS
76
Test getting and setting invalid -webkit-grid-template-columns and -webkit-grid-template-rows through JS
77
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
77
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
- a/LayoutTests/fast/css-grid-layout/named-grid-line-get-set.html -33 / +33 lines
Lines 19-46 if (window.testRunner) a/LayoutTests/fast/css-grid-layout/named-grid-line-get-set.html_sec1
19
    width: 77px;
19
    width: 77px;
20
}
20
}
21
.gridWithFixed {
21
.gridWithFixed {
22
    -webkit-grid-template-columns: "first" 10px;
22
    -webkit-grid-template-columns: (first) 10px;
23
    -webkit-grid-template-rows: "first" 15px;
23
    -webkit-grid-template-rows: (first) 15px;
24
}
24
}
25
.gridWithPercent {
25
.gridWithPercent {
26
    -webkit-grid-template-columns: 53% "last";
26
    -webkit-grid-template-columns: 53% (last);
27
    -webkit-grid-template-rows: 27% "last";
27
    -webkit-grid-template-rows: 27% (last);
28
}
28
}
29
.gridWithAuto {
29
.gridWithAuto {
30
    -webkit-grid-template-columns: "first" auto;
30
    -webkit-grid-template-columns: (first) auto;
31
    -webkit-grid-template-rows: auto "last";
31
    -webkit-grid-template-rows: auto (last);
32
}
32
}
33
.gridWithMinMax {
33
.gridWithMinMax {
34
    -webkit-grid-template-columns: "first" minmax(10%, 15px);
34
    -webkit-grid-template-columns: (first) minmax(10%, 15px);
35
    -webkit-grid-template-rows: minmax(20px, 50%) "last";
35
    -webkit-grid-template-rows: minmax(20px, 50%) (last);
36
}
36
}
37
.gridWithFixedMultiple {
37
.gridWithFixedMultiple {
38
    -webkit-grid-template-columns: "first" "nav" 10px "last";
38
    -webkit-grid-template-columns: (first nav) 10px (last);
39
    -webkit-grid-template-rows: "first" "nav" 15px "last";
39
    -webkit-grid-template-rows: (first nav) 15px (last);
40
}
40
}
41
.gridWithPercentageSameStringMultipleTimes {
41
.gridWithPercentageSameStringMultipleTimes {
42
    -webkit-grid-template-columns: "first" "nav" 10% "nav" 15% "last";
42
    -webkit-grid-template-columns: (first nav) 10% (nav) 15% (last);
43
    -webkit-grid-template-rows: "first" "nav2" 25% "nav2" 75% "last";
43
    -webkit-grid-template-rows: (first nav2) 25% (nav2) 75% (last);
44
}
44
}
45
</style>
45
</style>
46
<script src="../../resources/js-test-pre.js"></script>
46
<script src="../../resources/js-test-pre.js"></script>
Lines 64-93 if (window.testRunner) a/LayoutTests/fast/css-grid-layout/named-grid-line-get-set.html_sec2
64
    description('Test that setting and getting grid-template-columns and grid-template-rows works as expected');
64
    description('Test that setting and getting grid-template-columns and grid-template-rows works as expected');
65
65
66
    debug("Test getting -webkit-grid-template-columns and -webkit-grid-template-rows set through CSS");
66
    debug("Test getting -webkit-grid-template-columns and -webkit-grid-template-rows set through CSS");
67
    testGridTemplatesValues(document.getElementById("gridWithFixedElement"), "first 10px", "first 15px");
67
    testGridTemplatesValues(document.getElementById("gridWithFixedElement"), "(first) 10px", "(first) 15px");
68
    testGridTemplatesValues(document.getElementById("gridWithPercentElement"), "424px last", "162px last");
68
    testGridTemplatesValues(document.getElementById("gridWithPercentElement"), "424px (last)", "162px (last)");
69
    testGridTemplatesValues(document.getElementById("gridWithPercentWithoutSize"), "0px last", "0px last");
69
    testGridTemplatesValues(document.getElementById("gridWithPercentWithoutSize"), "0px (last)", "0px (last)");
70
    testGridTemplatesValues(document.getElementById("gridWithPercentWithoutSizeWithChildren"), "77px last", "22px last");
70
    testGridTemplatesValues(document.getElementById("gridWithPercentWithoutSizeWithChildren"), "77px (last)", "22px (last)");
71
    testGridTemplatesValues(document.getElementById("gridWithAutoElement"), "first 0px", "0px last");
71
    testGridTemplatesValues(document.getElementById("gridWithAutoElement"), "(first) 0px", "0px (last)");
72
    testGridTemplatesValues(document.getElementById("gridWithAutoWithChildrenElement"), "first 77px", "22px last");
72
    testGridTemplatesValues(document.getElementById("gridWithAutoWithChildrenElement"), "(first) 77px", "22px (last)");
73
    testGridTemplatesValues(document.getElementById("gridWithMinMax"), "first 80px", "300px last");
73
    testGridTemplatesValues(document.getElementById("gridWithMinMax"), "(first) 80px", "300px (last)");
74
    testGridTemplatesValues(document.getElementById("gridWithFixedMultiple"), "first nav 10px last", "first nav 15px last");
74
    testGridTemplatesValues(document.getElementById("gridWithFixedMultiple"), "(first nav) 10px (last)", "(first nav) 15px (last)");
75
    testGridTemplatesValues(document.getElementById("gridWithPercentageSameStringMultipleTimes"), "first nav 80px nav 120px last", "first nav2 150px nav2 450px last");
75
    testGridTemplatesValues(document.getElementById("gridWithPercentageSameStringMultipleTimes"), "(first nav) 80px (nav) 120px (last)", "(first nav2) 150px (nav2) 450px (last)");
76
76
77
    debug("");
77
    debug("");
78
    debug("Test getting and setting -webkit-grid-template-columns and -webkit-grid-template-rows through JS");
78
    debug("Test getting and setting -webkit-grid-template-columns and -webkit-grid-template-rows through JS");
79
    testGridTemplatesSetJSValues("'first' 18px", "66px 'last'", "first 18px", "66px last", "first 18px", "66px last");
79
    testGridTemplatesSetJSValues("(first) 18px", "66px (last)", "(first) 18px", "66px (last)", "(first) 18px", "66px (last)");
80
    testGridTemplatesSetJSValues("'first' 55%", "40% 'last'", "first 440px", "240px last", "first 55%", "40% last");
80
    testGridTemplatesSetJSValues("(first) 55%", "40% (last)", "(first) 440px", "240px (last)", "(first) 55%", "40% (last)");
81
    testGridTemplatesSetJSValues("'first' auto", "auto 'last'", "first 0px", "0px last", "first auto", "auto last");
81
    testGridTemplatesSetJSValues("(first) auto", "auto (last)", "(first) 0px", "0px (last)", "(first) auto", "auto (last)");
82
    testGridTemplatesSetJSValues("'first' -webkit-min-content", "-webkit-min-content 'last'", "first 0px", "0px last", "first -webkit-min-content", "-webkit-min-content last");
82
    testGridTemplatesSetJSValues("(first) -webkit-min-content", "-webkit-min-content (last)", "(first) 0px", "0px (last)", "(first) -webkit-min-content", "-webkit-min-content (last)");
83
    testGridTemplatesSetJSValues("'first' -webkit-max-content", "-webkit-max-content 'last'", "first 0px", "0px last", "first -webkit-max-content", "-webkit-max-content last");
83
    testGridTemplatesSetJSValues("(first) -webkit-max-content", "-webkit-max-content (last)", "(first) 0px", "0px (last)", "(first) -webkit-max-content", "-webkit-max-content (last)");
84
    testGridTemplatesSetJSValues("'first' minmax(55%, 45px)", "minmax(30px, 40%) 'last'", "first 440px", "240px last", "first minmax(55%, 45px)", "minmax(30px, 40%) last");
84
    testGridTemplatesSetJSValues("(first) minmax(55%, 45px)", "minmax(30px, 40%) (last)", "(first) 440px", "240px (last)", "(first) minmax(55%, 45px)", "minmax(30px, 40%) (last)");
85
    testGridTemplatesSetJSValues("'first' minmax(22em, -webkit-max-content)", "minmax(-webkit-max-content, 5em) 'last'", "first 220px", "50px last", "first minmax(22em, -webkit-max-content)", "minmax(-webkit-max-content, 5em) last");
85
    testGridTemplatesSetJSValues("(first) minmax(22em, -webkit-max-content)", "minmax(-webkit-max-content, 5em) (last)", "(first) 220px", "50px (last)", "(first) minmax(22em, -webkit-max-content)", "minmax(-webkit-max-content, 5em) (last)");
86
    testGridTemplatesSetJSValues("'first' minmax(22em, -webkit-min-content)", "minmax(-webkit-min-content, 5em) 'last'", "first 220px", "50px last", "first minmax(22em, -webkit-min-content)", "minmax(-webkit-min-content, 5em) last");
86
    testGridTemplatesSetJSValues("(first) minmax(22em, -webkit-min-content)", "minmax(-webkit-min-content, 5em) (last)", "(first) 220px", "50px (last)", "(first) minmax(22em, -webkit-min-content)", "minmax(-webkit-min-content, 5em) (last)");
87
    testGridTemplatesSetJSValues("'first' minmax(-webkit-min-content, -webkit-max-content)", "minmax(-webkit-max-content, -webkit-min-content) 'last'", "first 0px", "0px last", "first minmax(-webkit-min-content, -webkit-max-content)", "minmax(-webkit-max-content, -webkit-min-content) last");
87
    testGridTemplatesSetJSValues("(first) minmax(-webkit-min-content, -webkit-max-content)", "minmax(-webkit-max-content, -webkit-min-content) (last)", "(first) 0px", "0px (last)", "(first) minmax(-webkit-min-content, -webkit-max-content)", "minmax(-webkit-max-content, -webkit-min-content) (last)");
88
    testGridTemplatesSetJSValues("'first' 'nav' minmax(-webkit-min-content, -webkit-max-content) 'last'", "'first' 'nav' minmax(-webkit-max-content, -webkit-min-content) 'last'", "first nav 0px last", "first nav 0px last", "first nav minmax(-webkit-min-content, -webkit-max-content) last", "first nav minmax(-webkit-max-content, -webkit-min-content) last");
88
    testGridTemplatesSetJSValues("(first nav) minmax(-webkit-min-content, -webkit-max-content) (last)", "(first nav) minmax(-webkit-max-content, -webkit-min-content) (last)", "(first nav) 0px (last)", "(first nav) 0px (last)", "(first nav) minmax(-webkit-min-content, -webkit-max-content) (last)", "(first nav) minmax(-webkit-max-content, -webkit-min-content) (last)");
89
    testGridTemplatesSetJSValues("'first' 'nav' minmax(-webkit-min-content, -webkit-max-content) 'nav' auto 'last'", "'first' 'nav2' minmax(-webkit-max-content, -webkit-min-content) 'nav2' minmax(10px, 15px) 'last'", "first nav 0px nav 0px last", "first nav2 0px nav2 15px last", "first nav minmax(-webkit-min-content, -webkit-max-content) nav auto last", "first nav2 minmax(-webkit-max-content, -webkit-min-content) nav2 minmax(10px, 15px) last");
89
    testGridTemplatesSetJSValues("(first nav) minmax(-webkit-min-content, -webkit-max-content) (nav) auto (last)", "(first nav2) minmax(-webkit-max-content, -webkit-min-content) (nav2) minmax(10px, 15px) (last)", "(first nav) 0px (nav) 0px (last)", "(first nav2) 0px (nav2) 15px (last)", "(first nav) minmax(-webkit-min-content, -webkit-max-content) (nav) auto (last)", "(first nav2) minmax(-webkit-max-content, -webkit-min-content) (nav2) minmax(10px, 15px) (last)");
90
    testGridTemplatesSetJSValues("'foo' 'bar' auto 'foo' auto 'bar'", "'foo' 'bar' auto 'foo' auto 'bar'", "foo bar 0px foo 0px bar", "foo bar 0px foo 0px bar", "foo bar auto foo auto bar", "foo bar auto foo auto bar");
90
    testGridTemplatesSetJSValues("(foo bar) auto (foo) auto (bar)", "(foo bar) auto (foo) auto (bar)", "(foo bar) 0px (foo) 0px (bar)", "(foo bar) 0px (foo) 0px (bar)", "(foo bar) auto (foo) auto (bar)", "(foo bar) auto (foo) auto (bar)");
91
91
92
    debug("");
92
    debug("");
93
    debug("Test getting and setting invalid -webkit-grid-template-columns and -webkit-grid-template-rows through JS");
93
    debug("Test getting and setting invalid -webkit-grid-template-columns and -webkit-grid-template-rows through JS");
- a/LayoutTests/fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html -10 / +10 lines
Lines 20-47 if (window.testRunner) a/LayoutTests/fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html_sec1
20
  }
20
  }
21
21
22
  .gridUniqueNames {
22
  .gridUniqueNames {
23
      -webkit-grid-template-columns: "a" 50px "b" "b-start" 100px "c" 200px "d";
23
      -webkit-grid-template-columns: (a) 50px (b b-start) 100px (c) 200px (d);
24
      -webkit-grid-template-rows: "e" 50px "f" 100px "g" "g-start" 200px "h";
24
      -webkit-grid-template-rows: (e) 50px (f) 100px (g g-start) 200px (h);
25
  }
25
  }
26
26
27
  .gridWithNamedLineBeforeGridArea {
27
  .gridWithNamedLineBeforeGridArea {
28
      -webkit-grid-template-columns: "a-start" "c-start" 50px "d-start" 100px 200px;
28
      -webkit-grid-template-columns: (a-start c-start) 50px (d-start) 100px 200px;
29
      -webkit-grid-template-rows: "c-start" 50px "d-start" 100px 200px;
29
      -webkit-grid-template-rows: (c-start) 50px (d-start) 100px 200px;
30
  }
30
  }
31
31
32
  .gridWithNamedLineAfterGridArea {
32
  .gridWithNamedLineAfterGridArea {
33
      -webkit-grid-template-columns: 50px 100px "a-start" 200px;
33
      -webkit-grid-template-columns: 50px 100px (a-start) 200px;
34
      -webkit-grid-template-rows: 50px 100px "c-start" 200px;
34
      -webkit-grid-template-rows: 50px 100px (c-start) 200px;
35
  }
35
  }
36
36
37
  .gridWithEndLines {
37
  .gridWithEndLines {
38
      -webkit-grid-template-columns: 50px 100px "a-end" 200px "c-end";
38
      -webkit-grid-template-columns: 50px 100px (a-end) 200px (c-end);
39
      -webkit-grid-template-rows: 50px "c-end" 100px "d-end" 200px;
39
      -webkit-grid-template-rows: 50px (c-end) 100px (d-end) 200px;
40
  }
40
  }
41
41
42
  .gridRepeatedNames {
42
  .gridRepeatedNames {
43
      -webkit-grid-template-columns: "d-start" 50px "d-start" 100px "d-start" 200px;
43
      -webkit-grid-template-columns: (d-start) 50px (d-start) 100px (d-start) 200px;
44
      -webkit-grid-template-rows: 50px "c-end" 100px "c-end" 200px "c-end";
44
      -webkit-grid-template-rows: 50px (c-end) 100px (c-end) 200px (c-end);
45
  }
45
  }
46
46
47
</style>
47
</style>
- a/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt -4 / +4 lines
Lines 140-151 PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows' a/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt_sec1
140
PASS element.style.webkitGridTemplateRows is "none"
140
PASS element.style.webkitGridTemplateRows is "none"
141
141
142
Test setting grid-template-columns and grid-template-rows to 'inherit' through JS
142
Test setting grid-template-columns and grid-template-rows to 'inherit' through JS
143
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is '50px last'
143
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is '50px (last)'
144
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is 'first 101%'
144
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is '(first) 101%'
145
145
146
Test setting grid-template-columns and grid-template-rows to 'initial' through JS
146
Test setting grid-template-columns and grid-template-rows to 'initial' through JS
147
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is '150% last'
147
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is '150% (last)'
148
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is 'first 1fr'
148
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is '(first) 1fr'
149
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is 'none'
149
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is 'none'
150
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is 'none'
150
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is 'none'
151
PASS successfullyParsed is true
151
PASS successfullyParsed is true
- a/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-multiple-expected.txt -6 / +6 lines
Lines 98-111 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-templat a/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-multiple-expected.txt_sec1
98
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
98
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
99
99
100
Test setting grid-template-columns and grid-template-rows to 'inherit' through JS
100
Test setting grid-template-columns and grid-template-rows to 'inherit' through JS
101
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "50px 1fr last"
101
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "50px 1fr (last)"
102
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "101% middle 45px"
102
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "101% (middle) 45px"
103
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "50px 1fr last"
103
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "50px 1fr (last)"
104
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "101% middle 45px"
104
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "101% (middle) 45px"
105
105
106
Test setting grid-template-columns and grid-template-rows to 'initial' through JS
106
Test setting grid-template-columns and grid-template-rows to 'initial' through JS
107
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "150% middle 55px"
107
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "150% (middle) 55px"
108
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "1fr line 2fr line"
108
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "1fr (line) 2fr (line)"
109
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is 'none'
109
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is 'none'
110
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is 'none'
110
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is 'none'
111
PASS successfullyParsed is true
111
PASS successfullyParsed is true
- a/LayoutTests/fast/css-grid-layout/non-grid-element-repeat-get-set-expected.txt -11 / +11 lines
Lines 10-27 PASS window.getComputedStyle(twoSingleTrackRepeat, '').getPropertyValue('-webkit a/LayoutTests/fast/css-grid-layout/non-grid-element-repeat-get-set-expected.txt_sec1
10
PASS window.getComputedStyle(twoSingleTrackRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "auto auto"
10
PASS window.getComputedStyle(twoSingleTrackRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "auto auto"
11
PASS window.getComputedStyle(twoDoubleTrackRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "auto minmax(100px, 120px) auto minmax(100px, 120px)"
11
PASS window.getComputedStyle(twoDoubleTrackRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "auto minmax(100px, 120px) auto minmax(100px, 120px)"
12
PASS window.getComputedStyle(twoDoubleTrackRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "minmax(5px, 10px) auto minmax(5px, 10px) auto"
12
PASS window.getComputedStyle(twoDoubleTrackRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "minmax(5px, 10px) auto minmax(5px, 10px) auto"
13
PASS window.getComputedStyle(twoDoubleTrackWithNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "auto middle 250px end auto middle 250px end"
13
PASS window.getComputedStyle(twoDoubleTrackWithNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "auto (middle) 250px (end) auto (middle) 250px (end)"
14
PASS window.getComputedStyle(twoDoubleTrackWithNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "10px start auto end 10px start auto end"
14
PASS window.getComputedStyle(twoDoubleTrackWithNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "10px (start) auto (end) 10px (start) auto (end)"
15
PASS window.getComputedStyle(twoDoubleTrackWithTrailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "before auto before auto"
15
PASS window.getComputedStyle(twoDoubleTrackWithTrailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "(before) auto (before) auto"
16
PASS window.getComputedStyle(twoDoubleTrackWithTrailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "before 10px before 10px"
16
PASS window.getComputedStyle(twoDoubleTrackWithTrailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "(before) 10px (before) 10px"
17
PASS window.getComputedStyle(trailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "250px end"
17
PASS window.getComputedStyle(trailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "250px (end)"
18
PASS window.getComputedStyle(trailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "10px end"
18
PASS window.getComputedStyle(trailingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "10px (end)"
19
PASS window.getComputedStyle(leadingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "start 250px 250px"
19
PASS window.getComputedStyle(leadingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "(start) 250px 250px"
20
PASS window.getComputedStyle(leadingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "start 10px 10px"
20
PASS window.getComputedStyle(leadingNamedGridLineRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "(start) 10px 10px"
21
PASS window.getComputedStyle(mixRepeatAfterNonRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "start 140px 250px 250px"
21
PASS window.getComputedStyle(mixRepeatAfterNonRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "(start) 140px 250px 250px"
22
PASS window.getComputedStyle(mixRepeatAfterNonRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "auto 10px 10px"
22
PASS window.getComputedStyle(mixRepeatAfterNonRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "auto 10px 10px"
23
PASS window.getComputedStyle(mixNonRepeatAfterRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "250px 250px 15% last"
23
PASS window.getComputedStyle(mixNonRepeatAfterRepeat, '').getPropertyValue('-webkit-grid-template-columns') is "250px 250px 15% (last)"
24
PASS window.getComputedStyle(mixNonRepeatAfterRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "10px 10px end auto"
24
PASS window.getComputedStyle(mixNonRepeatAfterRepeat, '').getPropertyValue('-webkit-grid-template-rows') is "10px 10px (end) auto"
25
25
26
Test invalid repeat syntax.
26
Test invalid repeat syntax.
27
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
27
PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
- a/LayoutTests/fast/css-grid-layout/non-grid-element-repeat-get-set.html -17 / +17 lines
Lines 23-55 if (window.testRunner) a/LayoutTests/fast/css-grid-layout/non-grid-element-repeat-get-set.html_sec1
23
}
23
}
24
24
25
.twoDoubleTrackWithNamedGridLineRepeat {
25
.twoDoubleTrackWithNamedGridLineRepeat {
26
    -webkit-grid-template-rows: repeat(2, 10px 'start' auto 'end');
26
    -webkit-grid-template-rows: repeat(2, 10px (start) auto (end));
27
    -webkit-grid-template-columns: repeat(2, auto 'middle' 250px 'end');
27
    -webkit-grid-template-columns: repeat(2, auto (middle) 250px (end));
28
}
28
}
29
29
30
.twoDoubleTrackWithTrailingNamedGridLineRepeat {
30
.twoDoubleTrackWithTrailingNamedGridLineRepeat {
31
    -webkit-grid-template-rows: repeat(2, 'before' 10px);
31
    -webkit-grid-template-rows: repeat(2, (before) 10px);
32
    -webkit-grid-template-columns: repeat(2, 'before' auto);
32
    -webkit-grid-template-columns: repeat(2, (before) auto);
33
}
33
}
34
34
35
.trailingNamedGridLineRepeat {
35
.trailingNamedGridLineRepeat {
36
    -webkit-grid-template-rows: repeat(1, 10px) 'end';
36
    -webkit-grid-template-rows: repeat(1, 10px) (end);
37
    -webkit-grid-template-columns: repeat(1, 250px) 'end';
37
    -webkit-grid-template-columns: repeat(1, 250px) (end);
38
}
38
}
39
39
40
.leadingNamedGridLineRepeat {
40
.leadingNamedGridLineRepeat {
41
    -webkit-grid-template-rows: 'start' repeat(2, 10px);
41
    -webkit-grid-template-rows: (start) repeat(2, 10px);
42
    -webkit-grid-template-columns: 'start' repeat(2, 250px);
42
    -webkit-grid-template-columns: (start) repeat(2, 250px);
43
}
43
}
44
44
45
.mixRepeatAfterNonRepeat {
45
.mixRepeatAfterNonRepeat {
46
    -webkit-grid-template-rows: auto repeat(2, 10px);
46
    -webkit-grid-template-rows: auto repeat(2, 10px);
47
    -webkit-grid-template-columns: 'start' 140px repeat(2, 250px);
47
    -webkit-grid-template-columns: (start) 140px repeat(2, 250px);
48
}
48
}
49
49
50
.mixNonRepeatAfterRepeat {
50
.mixNonRepeatAfterRepeat {
51
    -webkit-grid-template-rows: repeat(2, 10px) 'end' auto;
51
    -webkit-grid-template-rows: repeat(2, 10px) (end) auto;
52
    -webkit-grid-template-columns: repeat(2, 250px) 15% 'last';
52
    -webkit-grid-template-columns: repeat(2, 250px) 15% (last);
53
}
53
}
54
</style>
54
</style>
55
<script src="../../resources/js-test-pre.js"></script>
55
<script src="../../resources/js-test-pre.js"></script>
Lines 73-84 if (window.testRunner) a/LayoutTests/fast/css-grid-layout/non-grid-element-repeat-get-set.html_sec2
73
    testGridTemplatesValues(document.getElementById("singleSingleTrackRepeat"), "15%", "18px");
73
    testGridTemplatesValues(document.getElementById("singleSingleTrackRepeat"), "15%", "18px");
74
    testGridTemplatesValues(document.getElementById("twoSingleTrackRepeat"), "minmax(15px, 50%) minmax(15px, 50%)", "auto auto");
74
    testGridTemplatesValues(document.getElementById("twoSingleTrackRepeat"), "minmax(15px, 50%) minmax(15px, 50%)", "auto auto");
75
    testGridTemplatesValues(document.getElementById("twoDoubleTrackRepeat"), "auto minmax(100px, 120px) auto minmax(100px, 120px)", "minmax(5px, 10px) auto minmax(5px, 10px) auto");
75
    testGridTemplatesValues(document.getElementById("twoDoubleTrackRepeat"), "auto minmax(100px, 120px) auto minmax(100px, 120px)", "minmax(5px, 10px) auto minmax(5px, 10px) auto");
76
    testGridTemplatesValues(document.getElementById("twoDoubleTrackWithNamedGridLineRepeat"), "auto middle 250px end auto middle 250px end", "10px start auto end 10px start auto end");
76
    testGridTemplatesValues(document.getElementById("twoDoubleTrackWithNamedGridLineRepeat"), "auto (middle) 250px (end) auto (middle) 250px (end)", "10px (start) auto (end) 10px (start) auto (end)");
77
    testGridTemplatesValues(document.getElementById("twoDoubleTrackWithTrailingNamedGridLineRepeat"), "before auto before auto", "before 10px before 10px");
77
    testGridTemplatesValues(document.getElementById("twoDoubleTrackWithTrailingNamedGridLineRepeat"), "(before) auto (before) auto", "(before) 10px (before) 10px");
78
    testGridTemplatesValues(document.getElementById("trailingNamedGridLineRepeat"), "250px end", "10px end");
78
    testGridTemplatesValues(document.getElementById("trailingNamedGridLineRepeat"), "250px (end)", "10px (end)");
79
    testGridTemplatesValues(document.getElementById("leadingNamedGridLineRepeat"), "start 250px 250px", "start 10px 10px");
79
    testGridTemplatesValues(document.getElementById("leadingNamedGridLineRepeat"), "(start) 250px 250px", "(start) 10px 10px");
80
    testGridTemplatesValues(document.getElementById("mixRepeatAfterNonRepeat"), "start 140px 250px 250px", "auto 10px 10px");
80
    testGridTemplatesValues(document.getElementById("mixRepeatAfterNonRepeat"), "(start) 140px 250px 250px", "auto 10px 10px");
81
    testGridTemplatesValues(document.getElementById("mixNonRepeatAfterRepeat"), "250px 250px 15% last", "10px 10px end auto");
81
    testGridTemplatesValues(document.getElementById("mixNonRepeatAfterRepeat"), "250px 250px 15% (last)", "10px 10px (end) auto");
82
82
83
    debug("");
83
    debug("");
84
    debug("Test invalid repeat syntax.");
84
    debug("Test invalid repeat syntax.");
- a/LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set-expected.txt -60 / +60 lines
Lines 4-71 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE a/LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set-expected.txt_sec1
4
4
5
5
6
Test getting grid-template-columns and grid-template-rows set through CSS
6
Test getting grid-template-columns and grid-template-rows set through CSS
7
PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-template-columns') is "first 10px"
7
PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 10px"
8
PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-template-rows') is "first 15px"
8
PASS window.getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-template-rows') is "(first) 15px"
9
PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-template-columns') is "53% last"
9
PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-template-columns') is "53% (last)"
10
PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-template-rows') is "27% last"
10
PASS window.getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-template-rows') is "27% (last)"
11
PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-template-columns') is "first auto"
11
PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-template-columns') is "(first) auto"
12
PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-template-rows') is "auto last"
12
PASS window.getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-template-rows') is "auto (last)"
13
PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('-webkit-grid-template-columns') is "first minmax(10%, 15px)"
13
PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('-webkit-grid-template-columns') is "(first) minmax(10%, 15px)"
14
PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('-webkit-grid-template-rows') is "minmax(20px, 50%) last"
14
PASS window.getComputedStyle(gridWithMinMax, '').getPropertyValue('-webkit-grid-template-rows') is "minmax(20px, 50%) (last)"
15
PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('-webkit-grid-template-columns') is "first nav 10px last"
15
PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('-webkit-grid-template-columns') is "(first nav) 10px (last)"
16
PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('-webkit-grid-template-rows') is "first nav 15px last"
16
PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('-webkit-grid-template-rows') is "(first nav) 15px (last)"
17
PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('-webkit-grid-template-columns') is "first nav 10% nav 15% last"
17
PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('-webkit-grid-template-columns') is "(first nav) 10% (nav) 15% (last)"
18
PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('-webkit-grid-template-rows') is "first nav2 25% nav2 75% last"
18
PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('-webkit-grid-template-rows') is "(first nav2) 25% (nav2) 75% (last)"
19
19
20
Test getting and setting grid-template-columns and grid-template-rows through JS
20
Test getting and setting grid-template-columns and grid-template-rows through JS
21
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first 18px"
21
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 18px"
22
PASS element.style.webkitGridTemplateColumns is "first 18px"
22
PASS element.style.webkitGridTemplateColumns is "(first) 18px"
23
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "66px last"
23
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "66px (last)"
24
PASS element.style.webkitGridTemplateRows is "66px last"
24
PASS element.style.webkitGridTemplateRows is "66px (last)"
25
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first 55%"
25
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) 55%"
26
PASS element.style.webkitGridTemplateColumns is "first 55%"
26
PASS element.style.webkitGridTemplateColumns is "(first) 55%"
27
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "40% last"
27
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "40% (last)"
28
PASS element.style.webkitGridTemplateRows is "40% last"
28
PASS element.style.webkitGridTemplateRows is "40% (last)"
29
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first auto"
29
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) auto"
30
PASS element.style.webkitGridTemplateColumns is "first auto"
30
PASS element.style.webkitGridTemplateColumns is "(first) auto"
31
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "auto last"
31
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "auto (last)"
32
PASS element.style.webkitGridTemplateRows is "auto last"
32
PASS element.style.webkitGridTemplateRows is "auto (last)"
33
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first -webkit-min-content"
33
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) -webkit-min-content"
34
PASS element.style.webkitGridTemplateColumns is "first -webkit-min-content"
34
PASS element.style.webkitGridTemplateColumns is "(first) -webkit-min-content"
35
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "-webkit-min-content last"
35
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "-webkit-min-content (last)"
36
PASS element.style.webkitGridTemplateRows is "-webkit-min-content last"
36
PASS element.style.webkitGridTemplateRows is "-webkit-min-content (last)"
37
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first -webkit-max-content"
37
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) -webkit-max-content"
38
PASS element.style.webkitGridTemplateColumns is "first -webkit-max-content"
38
PASS element.style.webkitGridTemplateColumns is "(first) -webkit-max-content"
39
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "-webkit-max-content last"
39
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "-webkit-max-content (last)"
40
PASS element.style.webkitGridTemplateRows is "-webkit-max-content last"
40
PASS element.style.webkitGridTemplateRows is "-webkit-max-content (last)"
41
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first minmax(55%, 45px)"
41
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) minmax(55%, 45px)"
42
PASS element.style.webkitGridTemplateColumns is "first minmax(55%, 45px)"
42
PASS element.style.webkitGridTemplateColumns is "(first) minmax(55%, 45px)"
43
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "minmax(30px, 40%) last"
43
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "minmax(30px, 40%) (last)"
44
PASS element.style.webkitGridTemplateRows is "minmax(30px, 40%) last"
44
PASS element.style.webkitGridTemplateRows is "minmax(30px, 40%) (last)"
45
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first minmax(220px, -webkit-max-content)"
45
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) minmax(220px, -webkit-max-content)"
46
PASS element.style.webkitGridTemplateColumns is "first minmax(22em, -webkit-max-content)"
46
PASS element.style.webkitGridTemplateColumns is "(first) minmax(22em, -webkit-max-content)"
47
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "minmax(-webkit-max-content, 50px) last"
47
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "minmax(-webkit-max-content, 50px) (last)"
48
PASS element.style.webkitGridTemplateRows is "minmax(-webkit-max-content, 5em) last"
48
PASS element.style.webkitGridTemplateRows is "minmax(-webkit-max-content, 5em) (last)"
49
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first minmax(220px, -webkit-min-content)"
49
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) minmax(220px, -webkit-min-content)"
50
PASS element.style.webkitGridTemplateColumns is "first minmax(22em, -webkit-min-content)"
50
PASS element.style.webkitGridTemplateColumns is "(first) minmax(22em, -webkit-min-content)"
51
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "minmax(-webkit-min-content, 50px) last"
51
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "minmax(-webkit-min-content, 50px) (last)"
52
PASS element.style.webkitGridTemplateRows is "minmax(-webkit-min-content, 5em) last"
52
PASS element.style.webkitGridTemplateRows is "minmax(-webkit-min-content, 5em) (last)"
53
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first minmax(-webkit-min-content, -webkit-max-content)"
53
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first) minmax(-webkit-min-content, -webkit-max-content)"
54
PASS element.style.webkitGridTemplateColumns is "first minmax(-webkit-min-content, -webkit-max-content)"
54
PASS element.style.webkitGridTemplateColumns is "(first) minmax(-webkit-min-content, -webkit-max-content)"
55
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "minmax(-webkit-max-content, -webkit-min-content) last"
55
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "minmax(-webkit-max-content, -webkit-min-content) (last)"
56
PASS element.style.webkitGridTemplateRows is "minmax(-webkit-max-content, -webkit-min-content) last"
56
PASS element.style.webkitGridTemplateRows is "minmax(-webkit-max-content, -webkit-min-content) (last)"
57
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first nav minmax(-webkit-min-content, -webkit-max-content) last"
57
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first nav) minmax(-webkit-min-content, -webkit-max-content) (last)"
58
PASS element.style.webkitGridTemplateColumns is "first nav minmax(-webkit-min-content, -webkit-max-content) last"
58
PASS element.style.webkitGridTemplateColumns is "(first nav) minmax(-webkit-min-content, -webkit-max-content) (last)"
59
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "first nav minmax(-webkit-max-content, -webkit-min-content) last"
59
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "(first nav) minmax(-webkit-max-content, -webkit-min-content) (last)"
60
PASS element.style.webkitGridTemplateRows is "first nav minmax(-webkit-max-content, -webkit-min-content) last"
60
PASS element.style.webkitGridTemplateRows is "(first nav) minmax(-webkit-max-content, -webkit-min-content) (last)"
61
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "first nav minmax(-webkit-min-content, -webkit-max-content) nav auto last"
61
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(first nav) minmax(-webkit-min-content, -webkit-max-content) (nav) auto (last)"
62
PASS element.style.webkitGridTemplateColumns is "first nav minmax(-webkit-min-content, -webkit-max-content) nav auto last"
62
PASS element.style.webkitGridTemplateColumns is "(first nav) minmax(-webkit-min-content, -webkit-max-content) (nav) auto (last)"
63
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "first nav2 minmax(-webkit-max-content, -webkit-min-content) nav2 minmax(10px, 15px) last"
63
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "(first nav2) minmax(-webkit-max-content, -webkit-min-content) (nav2) minmax(10px, 15px) (last)"
64
PASS element.style.webkitGridTemplateRows is "first nav2 minmax(-webkit-max-content, -webkit-min-content) nav2 minmax(10px, 15px) last"
64
PASS element.style.webkitGridTemplateRows is "(first nav2) minmax(-webkit-max-content, -webkit-min-content) (nav2) minmax(10px, 15px) (last)"
65
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "foo bar auto foo auto bar"
65
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "(foo bar) auto (foo) auto (bar)"
66
PASS element.style.webkitGridTemplateColumns is "foo bar auto foo auto bar"
66
PASS element.style.webkitGridTemplateColumns is "(foo bar) auto (foo) auto (bar)"
67
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "foo bar auto foo auto bar"
67
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "(foo bar) auto (foo) auto (bar)"
68
PASS element.style.webkitGridTemplateRows is "foo bar auto foo auto bar"
68
PASS element.style.webkitGridTemplateRows is "(foo bar) auto (foo) auto (bar)"
69
69
70
Test getting and setting invalid grid-template-columns and grid-template-rows through JS
70
Test getting and setting invalid grid-template-columns and grid-template-rows through JS
71
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
71
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
- a/LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set.html -34 / +34 lines
Lines 14-41 if (window.testRunner) a/LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set.html_sec1
14
    width: 77px;
14
    width: 77px;
15
}
15
}
16
.gridWithFixed {
16
.gridWithFixed {
17
    -webkit-grid-template-columns: "first" 10px;
17
    -webkit-grid-template-columns: (first) 10px;
18
    -webkit-grid-template-rows: "first" 15px;
18
    -webkit-grid-template-rows: (first) 15px;
19
}
19
}
20
.gridWithPercent {
20
.gridWithPercent {
21
    -webkit-grid-template-columns: 53% "last";
21
    -webkit-grid-template-columns: 53% (last);
22
    -webkit-grid-template-rows: 27% "last";
22
    -webkit-grid-template-rows: 27% (last);
23
}
23
}
24
.gridWithAuto {
24
.gridWithAuto {
25
    -webkit-grid-template-columns: "first" auto;
25
    -webkit-grid-template-columns: (first) auto;
26
    -webkit-grid-template-rows: auto "last";
26
    -webkit-grid-template-rows: auto (last);
27
}
27
}
28
.gridWithMinMax {
28
.gridWithMinMax {
29
    -webkit-grid-template-columns: "first" minmax(10%, 15px);
29
    -webkit-grid-template-columns: (first) minmax(10%, 15px);
30
    -webkit-grid-template-rows: minmax(20px, 50%) "last";
30
    -webkit-grid-template-rows: minmax(20px, 50%) (last);
31
}
31
}
32
.gridWithFixedMultiple {
32
.gridWithFixedMultiple {
33
    -webkit-grid-template-columns: "first" "nav" 10px "last";
33
    -webkit-grid-template-columns: (first nav) 10px (last);
34
    -webkit-grid-template-rows: "first" "nav" 15px "last";
34
    -webkit-grid-template-rows: (first nav) 15px (last);
35
}
35
}
36
.gridWithPercentageSameStringMultipleTimes {
36
.gridWithPercentageSameStringMultipleTimes {
37
    -webkit-grid-template-columns: "first" "nav" 10% "nav" 15% "last";
37
    -webkit-grid-template-columns: (first nav) 10% (nav) 15% (last);
38
    -webkit-grid-template-rows: "first" "nav2" 25% "nav2" 75% "last";
38
    -webkit-grid-template-rows: (first nav2) 25% (nav2) 75% (last);
39
}
39
}
40
</style>
40
</style>
41
<script src="../../resources/js-test-pre.js"></script>
41
<script src="../../resources/js-test-pre.js"></script>
Lines 56-96 if (window.testRunner) a/LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set.html_sec2
56
    description('Test that setting and getting grid-template-columns and grid-template-rows works as expected');
56
    description('Test that setting and getting grid-template-columns and grid-template-rows works as expected');
57
57
58
    debug("Test getting grid-template-columns and grid-template-rows set through CSS");
58
    debug("Test getting grid-template-columns and grid-template-rows set through CSS");
59
    testGridTemplatesValues(document.getElementById("gridWithFixedElement"), "first 10px", "first 15px");
59
    testGridTemplatesValues(document.getElementById("gridWithFixedElement"), "(first) 10px", "(first) 15px");
60
    testGridTemplatesValues(document.getElementById("gridWithPercentElement"), "53% last", "27% last");
60
    testGridTemplatesValues(document.getElementById("gridWithPercentElement"), "53% (last)", "27% (last)");
61
    testGridTemplatesValues(document.getElementById("gridWithAutoElement"), "first auto", "auto last");
61
    testGridTemplatesValues(document.getElementById("gridWithAutoElement"), "(first) auto", "auto (last)");
62
    testGridTemplatesValues(document.getElementById("gridWithMinMax"), "first minmax(10%, 15px)", "minmax(20px, 50%) last");
62
    testGridTemplatesValues(document.getElementById("gridWithMinMax"), "(first) minmax(10%, 15px)", "minmax(20px, 50%) (last)");
63
    testGridTemplatesValues(document.getElementById("gridWithFixedMultiple"), "first nav 10px last", "first nav 15px last");
63
    testGridTemplatesValues(document.getElementById("gridWithFixedMultiple"), "(first nav) 10px (last)", "(first nav) 15px (last)");
64
    testGridTemplatesValues(document.getElementById("gridWithPercentageSameStringMultipleTimes"), "first nav 10% nav 15% last", "first nav2 25% nav2 75% last");
64
    testGridTemplatesValues(document.getElementById("gridWithPercentageSameStringMultipleTimes"), "(first nav) 10% (nav) 15% (last)", "(first nav2) 25% (nav2) 75% (last)");
65
65
66
    debug("");
66
    debug("");
67
    debug("Test getting and setting grid-template-columns and grid-template-rows through JS");
67
    debug("Test getting and setting grid-template-columns and grid-template-rows through JS");
68
    testNonGridTemplatesSetJSValues("'first' 18px", "66px 'last'", "first 18px", "66px last", "first 18px", "66px last");
68
    testNonGridTemplatesSetJSValues("(first) 18px", "66px (last)", "(first) 18px", "66px (last)", "(first) 18px", "66px (last)");
69
    testNonGridTemplatesSetJSValues("'first' 55%", "40% 'last'", "first 55%", "40% last", "first 55%", "40% last");
69
    testNonGridTemplatesSetJSValues("(first) 55%", "40% (last)", "(first) 55%", "40% (last)", "(first) 55%", "40% (last)");
70
    testNonGridTemplatesSetJSValues("'first' auto", "auto 'last'", "first auto", "auto last", "first auto", "auto last");
70
    testNonGridTemplatesSetJSValues("(first) auto", "auto (last)", "(first) auto", "auto (last)", "(first) auto", "auto (last)");
71
    testNonGridTemplatesSetJSValues("'first' -webkit-min-content", "-webkit-min-content 'last'", "first -webkit-min-content", "-webkit-min-content last", "first -webkit-min-content", "-webkit-min-content last");
71
    testNonGridTemplatesSetJSValues("(first) -webkit-min-content", "-webkit-min-content (last)", "(first) -webkit-min-content", "-webkit-min-content (last)", "(first) -webkit-min-content", "-webkit-min-content (last)");
72
    testNonGridTemplatesSetJSValues("'first' -webkit-max-content", "-webkit-max-content 'last'", "first -webkit-max-content", "-webkit-max-content last", "first -webkit-max-content", "-webkit-max-content last");
72
    testNonGridTemplatesSetJSValues("(first) -webkit-max-content", "-webkit-max-content (last)", "(first) -webkit-max-content", "-webkit-max-content (last)", "(first) -webkit-max-content", "-webkit-max-content (last)");
73
    testNonGridTemplatesSetJSValues("'first' minmax(55%, 45px)", "minmax(30px, 40%) 'last'", "first minmax(55%, 45px)", "minmax(30px, 40%) last", "first minmax(55%, 45px)", "minmax(30px, 40%) last");
73
    testNonGridTemplatesSetJSValues("(first) minmax(55%, 45px)", "minmax(30px, 40%) (last)", "(first) minmax(55%, 45px)", "minmax(30px, 40%) (last)", "(first) minmax(55%, 45px)", "minmax(30px, 40%) (last)");
74
    testNonGridTemplatesSetJSValues("'first' minmax(22em, -webkit-max-content)", "minmax(-webkit-max-content, 5em) 'last'", "first minmax(220px, -webkit-max-content)", "minmax(-webkit-max-content, 50px) last", "first minmax(22em, -webkit-max-content)", "minmax(-webkit-max-content, 5em) last", "first minmax(220px, -webkit-max-content)", "minmax(-webkit-max-content, 50px) last", "minmax(-webkit-max-content, 50px) last");
74
    testNonGridTemplatesSetJSValues("(first) minmax(22em, -webkit-max-content)", "minmax(-webkit-max-content, 5em) (last)", "(first) minmax(220px, -webkit-max-content)", "minmax(-webkit-max-content, 50px) (last)", "(first) minmax(22em, -webkit-max-content)", "minmax(-webkit-max-content, 5em) (last)", "(first) minmax(220px, -webkit-max-content)", "minmax(-webkit-max-content, 50px) (last)", "minmax(-webkit-max-content, 50px) (last)");
75
    testNonGridTemplatesSetJSValues("'first' minmax(22em, -webkit-min-content)", "minmax(-webkit-min-content, 5em) 'last'", "first minmax(220px, -webkit-min-content)", "minmax(-webkit-min-content, 50px) last", "first minmax(22em, -webkit-min-content)", "minmax(-webkit-min-content, 5em) last", "first minmax(220px, -webkit-min-content)", "minmax(-webkit-min-content, 50px) last", "minmax(-webkit-min-content, 50px) last");
75
    testNonGridTemplatesSetJSValues("(first) minmax(22em, -webkit-min-content)", "minmax(-webkit-min-content, 5em) (last)", "(first) minmax(220px, -webkit-min-content)", "minmax(-webkit-min-content, 50px) (last)", "(first) minmax(22em, -webkit-min-content)", "minmax(-webkit-min-content, 5em) (last)", "(first) minmax(220px, -webkit-min-content)", "minmax(-webkit-min-content, 50px) (last)", "minmax(-webkit-min-content, 50px) (last)");
76
    testNonGridTemplatesSetJSValues("'first' minmax(-webkit-min-content, -webkit-max-content)", "minmax(-webkit-max-content, -webkit-min-content) 'last'", "first minmax(-webkit-min-content, -webkit-max-content)", "minmax(-webkit-max-content, -webkit-min-content) last", "first minmax(-webkit-min-content, -webkit-max-content)", "minmax(-webkit-max-content, -webkit-min-content) last");
76
    testNonGridTemplatesSetJSValues("(first) minmax(-webkit-min-content, -webkit-max-content)", "minmax(-webkit-max-content, -webkit-min-content) (last)", "(first) minmax(-webkit-min-content, -webkit-max-content)", "minmax(-webkit-max-content, -webkit-min-content) (last)", "(first) minmax(-webkit-min-content, -webkit-max-content)", "minmax(-webkit-max-content, -webkit-min-content) (last)");
77
    testNonGridTemplatesSetJSValues("'first' 'nav' minmax(-webkit-min-content, -webkit-max-content) 'last'", "'first' 'nav' minmax(-webkit-max-content, -webkit-min-content) 'last'", "first nav minmax(-webkit-min-content, -webkit-max-content) last", "first nav minmax(-webkit-max-content, -webkit-min-content) last", "first nav minmax(-webkit-min-content, -webkit-max-content) last", "first nav minmax(-webkit-max-content, -webkit-min-content) last");
77
    testNonGridTemplatesSetJSValues("(first nav) minmax(-webkit-min-content, -webkit-max-content) (last)", "(first nav) minmax(-webkit-max-content, -webkit-min-content) (last)", "(first nav) minmax(-webkit-min-content, -webkit-max-content) (last)", "(first nav) minmax(-webkit-max-content, -webkit-min-content) (last)", "(first nav) minmax(-webkit-min-content, -webkit-max-content) (last)", "(first nav) minmax(-webkit-max-content, -webkit-min-content) (last)");
78
    testNonGridTemplatesSetJSValues("'first' 'nav' minmax(-webkit-min-content, -webkit-max-content) 'nav' auto 'last'", "'first' 'nav2' minmax(-webkit-max-content, -webkit-min-content) 'nav2' minmax(10px, 15px) 'last'", "first nav minmax(-webkit-min-content, -webkit-max-content) nav auto last", "first nav2 minmax(-webkit-max-content, -webkit-min-content) nav2 minmax(10px, 15px) last", "first nav minmax(-webkit-min-content, -webkit-max-content) nav auto last", "first nav2 minmax(-webkit-max-content, -webkit-min-content) nav2 minmax(10px, 15px) last");;
78
    testNonGridTemplatesSetJSValues("(first nav) minmax(-webkit-min-content, -webkit-max-content) (nav) auto (last)", "(first nav2) minmax(-webkit-max-content, -webkit-min-content) (nav2) minmax(10px, 15px) (last)", "(first nav) minmax(-webkit-min-content, -webkit-max-content) (nav) auto (last)", "(first nav2) minmax(-webkit-max-content, -webkit-min-content) (nav2) minmax(10px, 15px) (last)", "(first nav) minmax(-webkit-min-content, -webkit-max-content) (nav) auto (last)", "(first nav2) minmax(-webkit-max-content, -webkit-min-content) (nav2) minmax(10px, 15px) (last)");;
79
    testNonGridTemplatesSetJSValues("'foo' 'bar' auto 'foo' auto 'bar'", "'foo' 'bar' auto 'foo' auto 'bar'", "foo bar auto foo auto bar", "foo bar auto foo auto bar", "foo bar auto foo auto bar", "foo bar auto foo auto bar");
79
    testNonGridTemplatesSetJSValues("(foo bar) auto (foo) auto (bar)", "(foo bar) auto (foo) auto (bar)", "(foo bar) auto (foo) auto (bar)", "(foo bar) auto (foo) auto (bar)", "(foo bar) auto (foo) auto (bar)", "(foo bar) auto (foo) auto (bar)");
80
80
81
    debug("");
81
    debug("");
82
    debug("Test getting and setting invalid grid-template-columns and grid-template-rows through JS");
82
    debug("Test getting and setting invalid grid-template-columns and grid-template-rows through JS");
83
    element = document.createElement("div");
83
    element = document.createElement("div");
84
    document.body.appendChild(element);
84
    document.body.appendChild(element);
85
    element.style.webkitGridTemplateColumns = "'foo'";
85
    element.style.webkitGridTemplateColumns = "(foo)";
86
    element.style.webkitGridTemplateRows = "'bar";
86
    element.style.webkitGridTemplateRows = "(bar)";
87
    shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns')", "none");
87
    shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns')", "none");
88
    shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows')", "none");
88
    shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows')", "none");
89
89
90
    element = document.createElement("div");
90
    element = document.createElement("div");
91
    document.body.appendChild(element);
91
    document.body.appendChild(element);
92
    element.style.webkitGridTemplateColumns = "'foo' 'bar'";
92
    element.style.webkitGridTemplateColumns = "(foo bar)";
93
    element.style.webkitGridTemplateRows = "'bar' 'foo'";
93
    element.style.webkitGridTemplateRows = "(bar foo)";
94
    shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns')", "none");
94
    shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns')", "none");
95
    shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows')", "none");
95
    shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows')", "none");
96
</script>
96
</script>
- a/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js -6 / +6 lines
Lines 66-80 function testInherit() a/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js_sec1
66
    document.body.appendChild(parentElement);
66
    document.body.appendChild(parentElement);
67
    parentElement.style.width = "800px";
67
    parentElement.style.width = "800px";
68
    parentElement.style.font = "10px Ahem"; // Used to resolve em font consistently.
68
    parentElement.style.font = "10px Ahem"; // Used to resolve em font consistently.
69
    parentElement.style.webkitGridTemplateColumns = "50px 1fr 'last'";
69
    parentElement.style.webkitGridTemplateColumns = "50px 1fr (last)";
70
    parentElement.style.webkitGridTemplateRows = "2em 'middle' 45px";
70
    parentElement.style.webkitGridTemplateRows = "2em (middle) 45px";
71
71
72
    element = document.createElement("div");
72
    element = document.createElement("div");
73
    parentElement.appendChild(element);
73
    parentElement.appendChild(element);
74
    element.style.display = "-webkit-grid";
74
    element.style.display = "-webkit-grid";
75
    element.style.webkitGridTemplateColumns = "inherit";
75
    element.style.webkitGridTemplateColumns = "inherit";
76
    element.style.webkitGridTemplateRows = "inherit";
76
    element.style.webkitGridTemplateRows = "inherit";
77
    testGridTemplatesValues(element, "50px 750px last", "20px middle 45px");
77
    testGridTemplatesValues(element, "50px 750px (last)", "20px (middle) 45px");
78
78
79
    document.body.removeChild(parentElement);
79
    document.body.removeChild(parentElement);
80
}
80
}
Lines 89-97 function testInitial() a/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js_sec2
89
    element.style.display = "-webkit-grid";
89
    element.style.display = "-webkit-grid";
90
    element.style.width = "800px";
90
    element.style.width = "800px";
91
    element.style.height = "600px";
91
    element.style.height = "600px";
92
    element.style.webkitGridTemplateColumns = "150% 'middle' 55px";
92
    element.style.webkitGridTemplateColumns = "150% (middle) 55px";
93
    element.style.webkitGridTemplateRows = "1fr 'line' 2fr 'line'";
93
    element.style.webkitGridTemplateRows = "1fr (line) 2fr (line)";
94
    testGridTemplatesValues(element, "1200px middle 55px", "200px line 400px line");
94
    testGridTemplatesValues(element, "1200px (middle) 55px", "200px (line) 400px (line)");
95
95
96
    element.style.webkitGridTemplateColumns = "initial";
96
    element.style.webkitGridTemplateColumns = "initial";
97
    element.style.webkitGridTemplateRows = "initial";
97
    element.style.webkitGridTemplateRows = "initial";
- a/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js -8 / +8 lines
Lines 102-117 function testInherit() a/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js_sec1
102
    var parentElement = document.createElement("div");
102
    var parentElement = document.createElement("div");
103
    document.body.appendChild(parentElement);
103
    document.body.appendChild(parentElement);
104
    parentElement.style.font = "10px Ahem"; // Used to resolve em font consistently.
104
    parentElement.style.font = "10px Ahem"; // Used to resolve em font consistently.
105
    parentElement.style.webkitGridTemplateColumns = "50px 'last'";
105
    parentElement.style.webkitGridTemplateColumns = "50px (last)";
106
    parentElement.style.webkitGridTemplateRows = "'first' 2em";
106
    parentElement.style.webkitGridTemplateRows = "(first) 2em";
107
107
108
    element = document.createElement("div");
108
    element = document.createElement("div");
109
    parentElement.appendChild(element);
109
    parentElement.appendChild(element);
110
    element.style.display = "-webkit-grid";
110
    element.style.display = "-webkit-grid";
111
    element.style.webkitGridTemplateColumns = "inherit";
111
    element.style.webkitGridTemplateColumns = "inherit";
112
    element.style.webkitGridTemplateRows = "inherit";
112
    element.style.webkitGridTemplateRows = "inherit";
113
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns')", "'50px last'");
113
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns')", "'50px (last)'");
114
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows')", "'first 20px'");
114
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows')", "'(first) 20px'");
115
115
116
    document.body.removeChild(parentElement);
116
    document.body.removeChild(parentElement);
117
}
117
}
Lines 126-135 function testInitial() a/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js_sec2
126
    element.style.display = "-webkit-grid";
126
    element.style.display = "-webkit-grid";
127
    element.style.width = "300px";
127
    element.style.width = "300px";
128
    element.style.height = "150px";
128
    element.style.height = "150px";
129
    element.style.webkitGridTemplateColumns = "150% 'last'";
129
    element.style.webkitGridTemplateColumns = "150% (last)";
130
    element.style.webkitGridTemplateRows = "'first' 1fr";
130
    element.style.webkitGridTemplateRows = "(first) 1fr";
131
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns')", "'450px last'");
131
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns')", "'450px (last)'");
132
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows')", "'first 150px'");
132
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows')", "'(first) 150px'");
133
133
134
    element.style.display = "-webkit-grid";
134
    element.style.display = "-webkit-grid";
135
    element.style.webkitGridTemplateColumns = "initial";
135
    element.style.webkitGridTemplateColumns = "initial";
- a/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set-multiple.js -7 / +7 lines
Lines 62-76 function testInherit() a/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set-multiple.js_sec1
62
{
62
{
63
    var parentElement = document.createElement("div");
63
    var parentElement = document.createElement("div");
64
    document.body.appendChild(parentElement);
64
    document.body.appendChild(parentElement);
65
    parentElement.style.webkitGridTemplateColumns = "50px 1fr 'last'";
65
    parentElement.style.webkitGridTemplateColumns = "50px 1fr (last)";
66
    parentElement.style.webkitGridTemplateRows = "101% 'middle' 45px";
66
    parentElement.style.webkitGridTemplateRows = "101% (middle) 45px";
67
    testGridTemplatesValues(parentElement, "50px 1fr last", "101% middle 45px");
67
    testGridTemplatesValues(parentElement, "50px 1fr (last)", "101% (middle) 45px");
68
68
69
    element = document.createElement("div");
69
    element = document.createElement("div");
70
    parentElement.appendChild(element);
70
    parentElement.appendChild(element);
71
    element.style.webkitGridTemplateColumns = "inherit";
71
    element.style.webkitGridTemplateColumns = "inherit";
72
    element.style.webkitGridTemplateRows = "inherit";
72
    element.style.webkitGridTemplateRows = "inherit";
73
    testGridTemplatesValues(element, "50px 1fr last", "101% middle 45px");
73
    testGridTemplatesValues(element, "50px 1fr (last)", "101% (middle) 45px");
74
74
75
    document.body.removeChild(parentElement);
75
    document.body.removeChild(parentElement);
76
}
76
}
Lines 82-90 function testInitial() a/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set-multiple.js_sec2
82
{
82
{
83
    element = document.createElement("div");
83
    element = document.createElement("div");
84
    document.body.appendChild(element);
84
    document.body.appendChild(element);
85
    element.style.webkitGridTemplateColumns = "150% 'middle' 55px";
85
    element.style.webkitGridTemplateColumns = "150% (middle) 55px";
86
    element.style.webkitGridTemplateRows = "1fr 'line' 2fr 'line'";
86
    element.style.webkitGridTemplateRows = "1fr (line) 2fr (line)";
87
    testGridTemplatesValues(element, "150% middle 55px", "1fr line 2fr line");
87
    testGridTemplatesValues(element, "150% (middle) 55px", "1fr (line) 2fr (line)");
88
88
89
    element.style.webkitGridTemplateColumns = "initial";
89
    element.style.webkitGridTemplateColumns = "initial";
90
    element.style.webkitGridTemplateRows = "initial";
90
    element.style.webkitGridTemplateRows = "initial";
- a/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js -8 / +8 lines
Lines 84-98 function testInherit() a/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js_sec1
84
{
84
{
85
    var parentElement = document.createElement("div");
85
    var parentElement = document.createElement("div");
86
    document.body.appendChild(parentElement);
86
    document.body.appendChild(parentElement);
87
    parentElement.style.webkitGridTemplateColumns = "50px 'last'";
87
    parentElement.style.webkitGridTemplateColumns = "50px (last)";
88
    parentElement.style.webkitGridTemplateRows = "'first' 101%";
88
    parentElement.style.webkitGridTemplateRows = "(first) 101%";
89
89
90
    element = document.createElement("div");
90
    element = document.createElement("div");
91
    parentElement.appendChild(element);
91
    parentElement.appendChild(element);
92
    element.style.webkitGridTemplateColumns = "inherit";
92
    element.style.webkitGridTemplateColumns = "inherit";
93
    element.style.webkitGridTemplateRows = "inherit";
93
    element.style.webkitGridTemplateRows = "inherit";
94
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns')", "'50px last'");
94
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns')", "'50px (last)'");
95
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows')", "'first 101%'");
95
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows')", "'(first) 101%'");
96
96
97
    document.body.removeChild(parentElement);
97
    document.body.removeChild(parentElement);
98
}
98
}
Lines 104-113 function testInitial() a/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js_sec2
104
{
104
{
105
    element = document.createElement("div");
105
    element = document.createElement("div");
106
    document.body.appendChild(element);
106
    document.body.appendChild(element);
107
    element.style.webkitGridTemplateColumns = "150% 'last'";
107
    element.style.webkitGridTemplateColumns = "150% (last)";
108
    element.style.webkitGridTemplateRows = "'first' 1fr";
108
    element.style.webkitGridTemplateRows = "(first) 1fr";
109
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns')", "'150% last'");
109
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns')", "'150% (last)'");
110
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows')", "'first 1fr'");
110
    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows')", "'(first) 1fr'");
111
111
112
    element.style.webkitGridTemplateColumns = "initial";
112
    element.style.webkitGridTemplateColumns = "initial";
113
    element.style.webkitGridTemplateRows = "initial";
113
    element.style.webkitGridTemplateRows = "initial";

Return to Bug 129041