| Differences between
and this patch
- a/Source/WebCore/ChangeLog +76 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2011-11-28  Julien Chaffraix  <jchaffraix@webkit.org>
2
3
        Add limited parsing support for grid-columns and grid-rows
4
        https://bugs.webkit.org/show_bug.cgi?id=72531
5
6
        Reviewed by Tony Chang.
7
8
        Test: fast/css-grid-layout/grid-columns-rows-get-set.html
9
10
        Added support for:
11
        <track-list> := <length> | <percentage> | 'none' | 'auto'
12
13
        * CMakeLists.txt:
14
        * GNUmakefile.list.am:
15
        * Target.pri:
16
        * WebCore.gypi:
17
        * WebCore.vcproj/WebCore.vcproj:
18
        * WebCore.xcodeproj/project.pbxproj:
19
        * rendering/style/StyleAllInOne.cpp:
20
        Updated our build systems.
21
22
        * css/CSSComputedStyleDeclaration.cpp:
23
        (WebCore::valueForGridTrackList):
24
        Helper function to convert our RenderStyle information to a proper CSSValue.
25
        It doesn't do much now but it will be expanded as we add more support.
26
27
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Call the previous
28
        function.
29
30
        * css/CSSParser.h:
31
        * css/CSSParser.cpp:
32
        (WebCore::CSSParser::parseValue):
33
        (WebCore::CSSParser::parseGridTrackList):
34
        CSS parsing part of this change. Pretty simple for now.
35
36
        * css/CSSPropertyNames.in:
37
        Added -webkit-grid-columns and -webkit-grid-rows.
38
39
        * css/CSSProperty.cpp:
40
        (WebCore::CSSProperty::isInheritedProperty):
41
        * css/CSSStyleApplyProperty.cpp:
42
        (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
43
        * css/CSSStyleSelector.cpp:
44
        (WebCore::CSSStyleSelector::applyProperty):
45
        Style application plumbing.
46
47
        * rendering/style/RenderStyle.cpp:
48
        (WebCore::RenderStyle::RenderStyle):
49
        (WebCore::RenderStyle::diff):
50
        This change is required for later when we add layout for our grid.
51
52
        * rendering/style/RenderStyle.h:
53
        (WebCore::InheritedFlags::gridColumns):
54
        (WebCore::InheritedFlags::gridRows):
55
        (WebCore::InheritedFlags::setGridColumns):
56
        (WebCore::InheritedFlags::setGridRows):
57
        (WebCore::InheritedFlags::initialGridColumns):
58
        (WebCore::InheritedFlags::initialGridRows):
59
        Getters / Setters and initial values.
60
61
        * rendering/style/StyleGridData.cpp: Added.
62
        (WebCore::StyleGridData::StyleGridData):
63
        * rendering/style/StyleGridData.h: Added.
64
        (WebCore::StyleGridData::create):
65
        (WebCore::StyleGridData::copy):
66
        (WebCore::StyleGridData::operator==):
67
        (WebCore::StyleGridData::operator!=):
68
        This class holds the grid element information. For now pretty simple
69
        shell that will be used for the rest of the support.
70
71
        * rendering/style/StyleRareNonInheritedData.cpp:
72
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
73
        (WebCore::StyleRareNonInheritedData::operator==):
74
        * rendering/style/StyleRareNonInheritedData.h:
75
        Added StyleGridElementData to StyleRareNonInheritedData.
76
1
2011-11-28  Martin Robinson  <mrobinson@igalia.com>
77
2011-11-28  Martin Robinson  <mrobinson@igalia.com>
2
78
3
        Fix 'make dist' by adding two missing files to source list.
79
        Fix 'make dist' by adding two missing files to source list.
- a/Source/WebCore/CMakeLists.txt +1 lines
Lines 1327-1332 SET(WebCore_SOURCES a/Source/WebCore/CMakeLists.txt_sec1
1327
    rendering/style/StyleFilterData.cpp
1327
    rendering/style/StyleFilterData.cpp
1328
    rendering/style/StyleFlexibleBoxData.cpp
1328
    rendering/style/StyleFlexibleBoxData.cpp
1329
    rendering/style/StyleGeneratedImage.cpp
1329
    rendering/style/StyleGeneratedImage.cpp
1330
    rendering/style/StyleGridData.cpp
1330
    rendering/style/StyleInheritedData.cpp
1331
    rendering/style/StyleInheritedData.cpp
1331
    rendering/style/StyleMarqueeData.cpp
1332
    rendering/style/StyleMarqueeData.cpp
1332
    rendering/style/StyleMultiColData.cpp
1333
    rendering/style/StyleMultiColData.cpp
- a/Source/WebCore/GNUmakefile.list.am +2 lines
Lines 3300-3305 webcore_sources += \ a/Source/WebCore/GNUmakefile.list.am_sec1
3300
	Source/WebCore/rendering/style/StyleFlexibleBoxData.h \
3300
	Source/WebCore/rendering/style/StyleFlexibleBoxData.h \
3301
	Source/WebCore/rendering/style/StyleGeneratedImage.cpp \
3301
	Source/WebCore/rendering/style/StyleGeneratedImage.cpp \
3302
	Source/WebCore/rendering/style/StyleGeneratedImage.h \
3302
	Source/WebCore/rendering/style/StyleGeneratedImage.h \
3303
	Source/WebCore/rendering/style/StyleGridData.cpp \
3304
	Source/WebCore/rendering/style/StyleGridData.h \
3303
	Source/WebCore/rendering/style/StyleImage.h \
3305
	Source/WebCore/rendering/style/StyleImage.h \
3304
	Source/WebCore/rendering/style/StyleInheritedData.cpp \
3306
	Source/WebCore/rendering/style/StyleInheritedData.cpp \
3305
	Source/WebCore/rendering/style/StyleInheritedData.h \
3307
	Source/WebCore/rendering/style/StyleInheritedData.h \
- a/Source/WebCore/Target.pri +1 lines
Lines 1263-1268 SOURCES += \ a/Source/WebCore/Target.pri_sec1
1263
    rendering/style/StyleFilterData.cpp \
1263
    rendering/style/StyleFilterData.cpp \
1264
    rendering/style/StyleFlexibleBoxData.cpp \
1264
    rendering/style/StyleFlexibleBoxData.cpp \
1265
    rendering/style/StyleGeneratedImage.cpp \
1265
    rendering/style/StyleGeneratedImage.cpp \
1266
    rendering/style/StyleGridData.cpp \
1266
    rendering/style/StyleInheritedData.cpp \
1267
    rendering/style/StyleInheritedData.cpp \
1267
    rendering/style/StyleMarqueeData.cpp \
1268
    rendering/style/StyleMarqueeData.cpp \
1268
    rendering/style/StyleMultiColData.cpp \
1269
    rendering/style/StyleMultiColData.cpp \
- a/Source/WebCore/WebCore.gypi +2 lines
Lines 953-958 a/Source/WebCore/WebCore.gypi_sec1
953
            'rendering/style/StyleFilterData.h',
953
            'rendering/style/StyleFilterData.h',
954
            'rendering/style/StyleFlexibleBoxData.h',
954
            'rendering/style/StyleFlexibleBoxData.h',
955
            'rendering/style/StyleGeneratedImage.h',
955
            'rendering/style/StyleGeneratedImage.h',
956
            'rendering/style/StyleGridData.h',
956
            'rendering/style/StyleImage.h',
957
            'rendering/style/StyleImage.h',
957
            'rendering/style/StyleInheritedData.h',
958
            'rendering/style/StyleInheritedData.h',
958
            'rendering/style/StyleMarqueeData.h',
959
            'rendering/style/StyleMarqueeData.h',
Lines 4772-4777 a/Source/WebCore/WebCore.gypi_sec2
4772
            'rendering/style/StyleFilterData.cpp',
4773
            'rendering/style/StyleFilterData.cpp',
4773
            'rendering/style/StyleFlexibleBoxData.cpp',
4774
            'rendering/style/StyleFlexibleBoxData.cpp',
4774
            'rendering/style/StyleGeneratedImage.cpp',
4775
            'rendering/style/StyleGeneratedImage.cpp',
4776
            'rendering/style/StyleGridData.cpp',
4775
            'rendering/style/StyleInheritedData.cpp',
4777
            'rendering/style/StyleInheritedData.cpp',
4776
            'rendering/style/StyleMarqueeData.cpp',
4778
            'rendering/style/StyleMarqueeData.cpp',
4777
            'rendering/style/StyleMultiColData.cpp',
4779
            'rendering/style/StyleMultiColData.cpp',
- a/Source/WebCore/WebCore.vcproj/WebCore.vcproj +56 lines
Lines 40771-40776 a/Source/WebCore/WebCore.vcproj/WebCore.vcproj_sec1
40771
					>
40771
					>
40772
				</File>
40772
				</File>
40773
				<File
40773
				<File
40774
					RelativePath="..\rendering\style\StyleGridData.cpp"
40775
					>
40776
					<FileConfiguration
40777
						Name="Debug|Win32"
40778
						ExcludedFromBuild="true"
40779
						>
40780
						<Tool
40781
							Name="VCCLCompilerTool"
40782
						/>
40783
					</FileConfiguration>
40784
					<FileConfiguration
40785
						Name="Release|Win32"
40786
						ExcludedFromBuild="true"
40787
						>
40788
						<Tool
40789
							Name="VCCLCompilerTool"
40790
						/>
40791
					</FileConfiguration>
40792
					<FileConfiguration
40793
						Name="Debug_Cairo_CFLite|Win32"
40794
						ExcludedFromBuild="true"
40795
						>
40796
						<Tool
40797
							Name="VCCLCompilerTool"
40798
						/>
40799
					</FileConfiguration>
40800
					<FileConfiguration
40801
						Name="Release_Cairo_CFLite|Win32"
40802
						ExcludedFromBuild="true"
40803
						>
40804
						<Tool
40805
							Name="VCCLCompilerTool"
40806
						/>
40807
					</FileConfiguration>
40808
					<FileConfiguration
40809
						Name="Debug_All|Win32"
40810
						ExcludedFromBuild="true"
40811
						>
40812
						<Tool
40813
							Name="VCCLCompilerTool"
40814
						/>
40815
					</FileConfiguration>
40816
					<FileConfiguration
40817
						Name="Production|Win32"
40818
						ExcludedFromBuild="true"
40819
						>
40820
						<Tool
40821
							Name="VCCLCompilerTool"
40822
						/>
40823
					</FileConfiguration>
40824
				</File>
40825
				<File
40826
					RelativePath="..\rendering\style\StyleGridData.h"
40827
					>
40828
				</File>
40829
				<File
40774
					RelativePath="..\rendering\style\StyleImage.h"
40830
					RelativePath="..\rendering\style\StyleImage.h"
40775
					>
40831
					>
40776
				</File>
40832
				</File>
- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj +8 lines
Lines 3398-3403 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec1
3398
		A0EE0DF6144F825500F80B0D /* WebGLDebugRendererInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = A0EE0DF2144F825500F80B0D /* WebGLDebugRendererInfo.h */; };
3398
		A0EE0DF6144F825500F80B0D /* WebGLDebugRendererInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = A0EE0DF2144F825500F80B0D /* WebGLDebugRendererInfo.h */; };
3399
		A0EE0DF7144F825500F80B0D /* WebGLDebugShaders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0EE0DF3144F825500F80B0D /* WebGLDebugShaders.cpp */; };
3399
		A0EE0DF7144F825500F80B0D /* WebGLDebugShaders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0EE0DF3144F825500F80B0D /* WebGLDebugShaders.cpp */; };
3400
		A0EE0DF8144F825500F80B0D /* WebGLDebugShaders.h in Headers */ = {isa = PBXBuildFile; fileRef = A0EE0DF4144F825500F80B0D /* WebGLDebugShaders.h */; };
3400
		A0EE0DF8144F825500F80B0D /* WebGLDebugShaders.h in Headers */ = {isa = PBXBuildFile; fileRef = A0EE0DF4144F825500F80B0D /* WebGLDebugShaders.h */; };
3401
		A10DC76A14747BAB005E2471 /* StyleGridData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A10DC76814747BAB005E2471 /* StyleGridData.cpp */; };
3402
		A10DC76B14747BAB005E2471 /* StyleGridData.h in Headers */ = {isa = PBXBuildFile; fileRef = A10DC76914747BAB005E2471 /* StyleGridData.h */; settings = {ATTRIBUTES = (Private, ); }; };
3401
		A120ACA413F998CA00FE4AC7 /* LayoutRepainter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A120ACA113F9984600FE4AC7 /* LayoutRepainter.cpp */; };
3403
		A120ACA413F998CA00FE4AC7 /* LayoutRepainter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A120ACA113F9984600FE4AC7 /* LayoutRepainter.cpp */; };
3402
		A12538D413F9B60A00024754 /* LayoutRepainter.h in Headers */ = {isa = PBXBuildFile; fileRef = A120ACA013F9983700FE4AC7 /* LayoutRepainter.h */; settings = {ATTRIBUTES = (Private, ); }; };
3404
		A12538D413F9B60A00024754 /* LayoutRepainter.h in Headers */ = {isa = PBXBuildFile; fileRef = A120ACA013F9983700FE4AC7 /* LayoutRepainter.h */; settings = {ATTRIBUTES = (Private, ); }; };
3403
		A136A00C1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A136A00A1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp */; };
3405
		A136A00C1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A136A00A1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp */; };
Lines 10620-10625 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec2
10620
		A0EE0DF2144F825500F80B0D /* WebGLDebugRendererInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLDebugRendererInfo.h; path = canvas/WebGLDebugRendererInfo.h; sourceTree = "<group>"; };
10622
		A0EE0DF2144F825500F80B0D /* WebGLDebugRendererInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLDebugRendererInfo.h; path = canvas/WebGLDebugRendererInfo.h; sourceTree = "<group>"; };
10621
		A0EE0DF3144F825500F80B0D /* WebGLDebugShaders.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLDebugShaders.cpp; path = canvas/WebGLDebugShaders.cpp; sourceTree = "<group>"; };
10623
		A0EE0DF3144F825500F80B0D /* WebGLDebugShaders.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLDebugShaders.cpp; path = canvas/WebGLDebugShaders.cpp; sourceTree = "<group>"; };
10622
		A0EE0DF4144F825500F80B0D /* WebGLDebugShaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLDebugShaders.h; path = canvas/WebGLDebugShaders.h; sourceTree = "<group>"; };
10624
		A0EE0DF4144F825500F80B0D /* WebGLDebugShaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLDebugShaders.h; path = canvas/WebGLDebugShaders.h; sourceTree = "<group>"; };
10625
		A10DC76814747BAB005E2471 /* StyleGridData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StyleGridData.cpp; path = style/StyleGridData.cpp; sourceTree = "<group>"; };
10626
		A10DC76914747BAB005E2471 /* StyleGridData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleGridData.h; path = style/StyleGridData.h; sourceTree = "<group>"; };
10623
		A120ACA013F9983700FE4AC7 /* LayoutRepainter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutRepainter.h; sourceTree = "<group>"; };
10627
		A120ACA013F9983700FE4AC7 /* LayoutRepainter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutRepainter.h; sourceTree = "<group>"; };
10624
		A120ACA113F9984600FE4AC7 /* LayoutRepainter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutRepainter.cpp; sourceTree = "<group>"; };
10628
		A120ACA113F9984600FE4AC7 /* LayoutRepainter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutRepainter.cpp; sourceTree = "<group>"; };
10625
		A136A00A1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLHttpRequestProgressEventThrottle.cpp; sourceTree = "<group>"; };
10629
		A136A00A1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLHttpRequestProgressEventThrottle.cpp; sourceTree = "<group>"; };
Lines 19830-19835 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec3
19830
		BC8C8FAA0DDCD2F200B592F4 /* style */ = {
19834
		BC8C8FAA0DDCD2F200B592F4 /* style */ = {
19831
			isa = PBXGroup;
19835
			isa = PBXGroup;
19832
			children = (
19836
			children = (
19837
				A10DC76814747BAB005E2471 /* StyleGridData.cpp */,
19838
				A10DC76914747BAB005E2471 /* StyleGridData.h */,
19833
				5038BE2D1472AD230095E0D1 /* StyleCachedShader.cpp */,
19839
				5038BE2D1472AD230095E0D1 /* StyleCachedShader.cpp */,
19834
				5038BE2E1472AD230095E0D1 /* StyleCachedShader.h */,
19840
				5038BE2E1472AD230095E0D1 /* StyleCachedShader.h */,
19835
				BC5EB5E00E81BE8700B25965 /* BorderData.h */,
19841
				BC5EB5E00E81BE8700B25965 /* BorderData.h */,
Lines 24794-24799 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec4
24794
				033A6A7C147E07D200509B36 /* HTMLPropertiesCollection.h in Headers */,
24800
				033A6A7C147E07D200509B36 /* HTMLPropertiesCollection.h in Headers */,
24795
				033A6A83147E08A600509B36 /* JSHTMLPropertiesCollection.h in Headers */,
24801
				033A6A83147E08A600509B36 /* JSHTMLPropertiesCollection.h in Headers */,
24796
				7AA51B6E1483B61600AD2752 /* InspectorBaseAgent.h in Headers */,
24802
				7AA51B6E1483B61600AD2752 /* InspectorBaseAgent.h in Headers */,
24803
				A10DC76B14747BAB005E2471 /* StyleGridData.h in Headers */,
24797
			);
24804
			);
24798
			runOnlyForDeploymentPostprocessing = 0;
24805
			runOnlyForDeploymentPostprocessing = 0;
24799
		};
24806
		};
Lines 27676-27681 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec5
27676
				033A6A7E147E07E700509B36 /* HTMLPropertiesCollection.cpp in Sources */,
27683
				033A6A7E147E07E700509B36 /* HTMLPropertiesCollection.cpp in Sources */,
27677
				033A6A81147E088600509B36 /* JSHTMLPropertiesCollection.cpp in Sources */,
27684
				033A6A81147E088600509B36 /* JSHTMLPropertiesCollection.cpp in Sources */,
27678
				7AA51B6F1483B61600AD2752 /* InspectorBaseAgent.cpp in Sources */,
27685
				7AA51B6F1483B61600AD2752 /* InspectorBaseAgent.cpp in Sources */,
27686
				A10DC76A14747BAB005E2471 /* StyleGridData.cpp in Sources */,
27679
			);
27687
			);
27680
			runOnlyForDeploymentPostprocessing = 0;
27688
			runOnlyForDeploymentPostprocessing = 0;
27681
		};
27689
		};
- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp +27 lines
Lines 218-223 static const int computedProperties[] = { a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp_sec1
218
    CSSPropertyWebkitFlexAlign,
218
    CSSPropertyWebkitFlexAlign,
219
    CSSPropertyWebkitFlexFlow,
219
    CSSPropertyWebkitFlexFlow,
220
    CSSPropertyWebkitFontSmoothing,
220
    CSSPropertyWebkitFontSmoothing,
221
#if ENABLE(CSS_GRID_LAYOUT)
222
    CSSPropertyWebkitGridColumns,
223
    CSSPropertyWebkitGridRows,
224
#endif
221
    CSSPropertyWebkitHighlight,
225
    CSSPropertyWebkitHighlight,
222
    CSSPropertyWebkitHyphenateCharacter,
226
    CSSPropertyWebkitHyphenateCharacter,
223
    CSSPropertyWebkitHyphenateLimitAfter,
227
    CSSPropertyWebkitHyphenateLimitAfter,
Lines 787-792 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::valueForFilter(RenderStyle* st a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp_sec2
787
}
791
}
788
#endif
792
#endif
789
793
794
#if ENABLE(CSS_GRID_LAYOUT)
795
static PassRefPtr<CSSValue> valueForGridTrackList(const Length& trackLength, const RenderStyle* style, CSSPrimitiveValueCache* primitiveValueCache)
796
{
797
    if (trackLength.isPercent())
798
        return primitiveValueCache->createValue(trackLength);
799
    if (trackLength.isAuto())
800
        return primitiveValueCache->createIdentifierValue(CSSValueAuto);
801
    if (trackLength.isUndefined())
802
        return primitiveValueCache->createIdentifierValue(CSSValueNone);
803
    return zoomAdjustedPixelValue(trackLength.value(), style, primitiveValueCache);
804
}
805
#endif
806
790
static PassRefPtr<CSSValue> getDelayValue(const AnimationList* animList, CSSPrimitiveValueCache* primitiveValueCache)
807
static PassRefPtr<CSSValue> getDelayValue(const AnimationList* animList, CSSPrimitiveValueCache* primitiveValueCache)
791
{
808
{
792
    RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
809
    RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
Lines 1494-1499 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp_sec3
1494
            }
1511
            }
1495
            return list.release();
1512
            return list.release();
1496
        }
1513
        }
1514
#if ENABLE(CSS_GRID_LAYOUT)
1515
        case CSSPropertyWebkitGridColumns: {
1516
            Length gridColumns = style->gridColumns();
1517
            return valueForGridTrackList(gridColumns, style.get(), primitiveValueCache);
1518
        }
1519
        case CSSPropertyWebkitGridRows: {
1520
            Length gridRows = style->gridRows();
1521
            return valueForGridTrackList(gridRows, style.get(), primitiveValueCache);
1522
        }
1523
#endif
1497
        case CSSPropertyHeight:
1524
        case CSSPropertyHeight:
1498
            if (renderer)
1525
            if (renderer)
1499
                return zoomAdjustedPixelValue(sizingBox(renderer).height(), style.get(), primitiveValueCache);
1526
                return zoomAdjustedPixelValue(sizingBox(renderer).height(), style.get(), primitiveValueCache);
- a/Source/WebCore/css/CSSParser.cpp +22 lines
Lines 1772-1777 bool CSSParser::parseValue(int propId, bool important) a/Source/WebCore/css/CSSParser.cpp_sec1
1772
        }
1772
        }
1773
        return false;
1773
        return false;
1774
    }
1774
    }
1775
#if ENABLE(CSS_GRID_LAYOUT)
1776
    case CSSPropertyWebkitGridColumns:
1777
    case CSSPropertyWebkitGridRows:
1778
        return parseGridTrackList(propId, important);
1779
#endif
1775
    case CSSPropertyWebkitMarginCollapse: {
1780
    case CSSPropertyWebkitMarginCollapse: {
1776
        const int properties[2] = { CSSPropertyWebkitMarginBeforeCollapse,
1781
        const int properties[2] = { CSSPropertyWebkitMarginBeforeCollapse,
1777
            CSSPropertyWebkitMarginAfterCollapse };
1782
            CSSPropertyWebkitMarginAfterCollapse };
Lines 3516-3521 bool CSSParser::parseAnimationProperty(int propId, RefPtr<CSSValue>& result) a/Source/WebCore/css/CSSParser.cpp_sec2
3516
    return false;
3521
    return false;
3517
}
3522
}
3518
3523
3524
#if ENABLE(CSS_GRID_LAYOUT)
3525
bool CSSParser::parseGridTrackList(int propId, bool important)
3526
{
3527
    CSSParserValue* value = m_valueList->current();
3528
    if (value->id == CSSValueNone || value->id == CSSValueAuto) {
3529
        addProperty(propId, primitiveValueCache()->createIdentifierValue(value->id), important);
3530
        return true;
3531
    }
3532
3533
    if (validUnit(value, FLength | FPercent, m_strict)) {
3534
        addProperty(propId, createPrimitiveNumericValue(value), important);
3535
        return true;
3536
    }
3537
    return false;
3538
}
3539
#endif
3540
3519
3541
3520
3542
3521
#if ENABLE(DASHBOARD_SUPPORT)
3543
#if ENABLE(DASHBOARD_SUPPORT)
- a/Source/WebCore/css/CSSParser.h +4 lines
Lines 125-130 public: a/Source/WebCore/css/CSSParser.h_sec1
125
    bool parseTransitionShorthand(bool important);
125
    bool parseTransitionShorthand(bool important);
126
    bool parseAnimationShorthand(bool important);
126
    bool parseAnimationShorthand(bool important);
127
127
128
#if ENABLE(CSS_GRID_LAYOUT)
129
    bool parseGridTrackList(int propId, bool important);
130
#endif
131
128
    bool parseDashboardRegions(int propId, bool important);
132
    bool parseDashboardRegions(int propId, bool important);
129
133
130
    bool parseShape(int propId, bool important);
134
    bool parseShape(int propId, bool important);
- a/Source/WebCore/css/CSSProperty.cpp +4 lines
Lines 561-566 bool CSSProperty::isInheritedProperty(unsigned propertyID) a/Source/WebCore/css/CSSProperty.cpp_sec1
561
    case CSSPropertyWebkitFlexAlign:
561
    case CSSPropertyWebkitFlexAlign:
562
    case CSSPropertyWebkitFlexFlow:
562
    case CSSPropertyWebkitFlexFlow:
563
    case CSSPropertyWebkitFontSizeDelta:
563
    case CSSPropertyWebkitFontSizeDelta:
564
#if ENABLE(CSS_GRID_LAYOUT)
565
    case CSSPropertyWebkitGridColumns:
566
    case CSSPropertyWebkitGridRows:
567
#endif
564
    case CSSPropertyWebkitLineClamp:
568
    case CSSPropertyWebkitLineClamp:
565
    case CSSPropertyWebkitLogicalWidth:
569
    case CSSPropertyWebkitLogicalWidth:
566
    case CSSPropertyWebkitLogicalHeight:
570
    case CSSPropertyWebkitLogicalHeight:
- a/Source/WebCore/css/CSSPropertyNames.in -1 / +4 lines
Lines 367-370 z-index a/Source/WebCore/css/CSSPropertyNames.in_sec1
367
#if defined(ENABLE_TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS
367
#if defined(ENABLE_TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS
368
-webkit-tap-highlight-color
368
-webkit-tap-highlight-color
369
#endif
369
#endif
370
370
#if defined(ENABLE_CSS_GRID_LAYOUT) && ENABLE_CSS_GRID_LAYOUT
371
-webkit-grid-columns
372
-webkit-grid-rows
373
#endif
- a/Source/WebCore/css/CSSStyleApplyProperty.cpp +5 lines
Lines 1135-1140 CSSStyleApplyProperty::CSSStyleApplyProperty() a/Source/WebCore/css/CSSStyleApplyProperty.cpp_sec1
1135
    setPropertyHandler(CSSPropertyBottom, ApplyPropertyLength<&RenderStyle::bottom, &RenderStyle::setBottom, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
1135
    setPropertyHandler(CSSPropertyBottom, ApplyPropertyLength<&RenderStyle::bottom, &RenderStyle::setBottom, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
1136
    setPropertyHandler(CSSPropertyLeft, ApplyPropertyLength<&RenderStyle::left, &RenderStyle::setLeft, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
1136
    setPropertyHandler(CSSPropertyLeft, ApplyPropertyLength<&RenderStyle::left, &RenderStyle::setLeft, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
1137
1137
1138
#if ENABLE(CSS_GRID_LAYOUT)
1139
    setPropertyHandler(CSSPropertyWebkitGridColumns, ApplyPropertyLength<&RenderStyle::gridColumns, &RenderStyle::setGridColumns, &RenderStyle::initialGridColumns, AutoEnabled, IntrinsicDisabled, MinIntrinsicDisabled, NoneEnabled, UndefinedEnabled>::createHandler());
1140
    setPropertyHandler(CSSPropertyWebkitGridRows, ApplyPropertyLength<&RenderStyle::gridRows, &RenderStyle::setGridRows, &RenderStyle::initialGridRows, AutoEnabled, IntrinsicDisabled, MinIntrinsicDisabled, NoneEnabled, UndefinedEnabled>::createHandler());
1141
#endif
1142
1138
    setPropertyHandler(CSSPropertyWidth, ApplyPropertyLength<&RenderStyle::width, &RenderStyle::setWidth, &RenderStyle::initialSize, AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled, NoneDisabled, UndefinedDisabled, FlexWidth>::createHandler());
1143
    setPropertyHandler(CSSPropertyWidth, ApplyPropertyLength<&RenderStyle::width, &RenderStyle::setWidth, &RenderStyle::initialSize, AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled, NoneDisabled, UndefinedDisabled, FlexWidth>::createHandler());
1139
    setPropertyHandler(CSSPropertyHeight, ApplyPropertyLength<&RenderStyle::height, &RenderStyle::setHeight, &RenderStyle::initialSize, AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled, NoneDisabled, UndefinedDisabled, FlexHeight>::createHandler());
1144
    setPropertyHandler(CSSPropertyHeight, ApplyPropertyLength<&RenderStyle::height, &RenderStyle::setHeight, &RenderStyle::initialSize, AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled, NoneDisabled, UndefinedDisabled, FlexHeight>::createHandler());
1140
1145
- a/Source/WebCore/css/CSSStyleSelector.cpp +4 lines
Lines 3846-3851 void CSSStyleSelector::applyProperty(int id, CSSValue *value) a/Source/WebCore/css/CSSStyleSelector.cpp_sec1
3846
    case CSSPropertyWebkitFlexFlow:
3846
    case CSSPropertyWebkitFlexFlow:
3847
    case CSSPropertyFontStyle:
3847
    case CSSPropertyFontStyle:
3848
    case CSSPropertyFontVariant:
3848
    case CSSPropertyFontVariant:
3849
#if ENABLE(CSS_GRID_LAYOUT)
3850
    case CSSPropertyWebkitGridColumns:
3851
    case CSSPropertyWebkitGridRows:
3852
#endif
3849
    case CSSPropertyTextRendering:
3853
    case CSSPropertyTextRendering:
3850
    case CSSPropertyWebkitTextOrientation:
3854
    case CSSPropertyWebkitTextOrientation:
3851
    case CSSPropertyWebkitFontSmoothing:
3855
    case CSSPropertyWebkitFontSmoothing:
- a/Source/WebCore/rendering/style/RenderStyle.cpp +7 lines
Lines 133-138 ALWAYS_INLINE RenderStyle::RenderStyle(bool) a/Source/WebCore/rendering/style/RenderStyle.cpp_sec1
133
#if ENABLE(CSS_FILTERS)
133
#if ENABLE(CSS_FILTERS)
134
    rareNonInheritedData.access()->m_filter.init();
134
    rareNonInheritedData.access()->m_filter.init();
135
#endif
135
#endif
136
#if ENABLE(CSS_GRID_LAYOUT)
137
    rareNonInheritedData.access()->m_grid.init();
138
#endif
136
    rareInheritedData.init();
139
    rareInheritedData.init();
137
    inherited.init();
140
    inherited.init();
138
141
Lines 426-431 StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon a/Source/WebCore/rendering/style/RenderStyle.cpp_sec2
426
            return StyleDifferenceLayout;
429
            return StyleDifferenceLayout;
427
        }
430
        }
428
#endif
431
#endif
432
#if ENABLE(CSS_GRID_LAYOUT)
433
        if (rareNonInheritedData->m_grid.get() != other->rareNonInheritedData->m_grid.get())
434
            return StyleDifferenceLayout;
435
#endif
429
436
430
#if !USE(ACCELERATED_COMPOSITING)
437
#if !USE(ACCELERATED_COMPOSITING)
431
        if (rareNonInheritedData.get() != other->rareNonInheritedData.get()) {
438
        if (rareNonInheritedData.get() != other->rareNonInheritedData.get()) {
- a/Source/WebCore/rendering/style/RenderStyle.h +18 lines
Lines 56-61 a/Source/WebCore/rendering/style/RenderStyle.h_sec1
56
#include "StyleFilterData.h"
56
#include "StyleFilterData.h"
57
#endif
57
#endif
58
#include "StyleFlexibleBoxData.h"
58
#include "StyleFlexibleBoxData.h"
59
#if ENABLE(CSS_GRID_LAYOUT)
60
#include "StyleGridData.h"
61
#endif
59
#include "StyleInheritedData.h"
62
#include "StyleInheritedData.h"
60
#include "StyleMarqueeData.h"
63
#include "StyleMarqueeData.h"
61
#include "StyleMultiColData.h"
64
#include "StyleMultiColData.h"
Lines 724-729 public: a/Source/WebCore/rendering/style/RenderStyle.h_sec2
724
    EFlexAlign flexAlign() const { return static_cast<EFlexAlign>(rareNonInheritedData->m_flexibleBox->m_flexAlign); }
727
    EFlexAlign flexAlign() const { return static_cast<EFlexAlign>(rareNonInheritedData->m_flexibleBox->m_flexAlign); }
725
    EFlexFlow flexFlow() const { return static_cast<EFlexFlow>(rareNonInheritedData->m_flexibleBox->m_flexFlow); }
728
    EFlexFlow flexFlow() const { return static_cast<EFlexFlow>(rareNonInheritedData->m_flexibleBox->m_flexFlow); }
726
729
730
#if ENABLE(CSS_GRID_LAYOUT)
731
    Length gridColumns() const { return rareNonInheritedData->m_grid->m_gridColumns; }
732
    Length gridRows() const { return rareNonInheritedData->m_grid->m_gridRows; }
733
#endif
734
727
    const ShadowData* boxShadow() const { return rareNonInheritedData->m_boxShadow.get(); }
735
    const ShadowData* boxShadow() const { return rareNonInheritedData->m_boxShadow.get(); }
728
    void getBoxShadowExtent(LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const { getShadowExtent(boxShadow(), top, right, bottom, left); }
736
    void getBoxShadowExtent(LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const { getShadowExtent(boxShadow(), top, right, bottom, left); }
729
    void getBoxShadowHorizontalExtent(LayoutUnit& left, LayoutUnit& right) const { getShadowHorizontalExtent(boxShadow(), left, right); }
737
    void getBoxShadowHorizontalExtent(LayoutUnit& left, LayoutUnit& right) const { getShadowHorizontalExtent(boxShadow(), left, right); }
Lines 1136-1141 public: a/Source/WebCore/rendering/style/RenderStyle.h_sec3
1136
    void setFlexPack(EFlexPack p) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexPack, p); }
1144
    void setFlexPack(EFlexPack p) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexPack, p); }
1137
    void setFlexAlign(EFlexAlign a) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexAlign, a); }
1145
    void setFlexAlign(EFlexAlign a) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexAlign, a); }
1138
    void setFlexFlow(EFlexFlow flow) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexFlow, flow); }
1146
    void setFlexFlow(EFlexFlow flow) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexFlow, flow); }
1147
#if ENABLE(CSS_GRID_LAYOUT)
1148
    void setGridColumns(Length length) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridColumns, length); }
1149
    void setGridRows(Length length) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridRows, length); }
1150
#endif
1151
1139
    void setMarqueeIncrement(const Length& f) { SET_VAR(rareNonInheritedData.access()->m_marquee, increment, f); }
1152
    void setMarqueeIncrement(const Length& f) { SET_VAR(rareNonInheritedData.access()->m_marquee, increment, f); }
1140
    void setMarqueeSpeed(int f) { SET_VAR(rareNonInheritedData.access()->m_marquee, speed, f); }
1153
    void setMarqueeSpeed(int f) { SET_VAR(rareNonInheritedData.access()->m_marquee, speed, f); }
1141
    void setMarqueeDirection(EMarqueeDirection d) { SET_VAR(rareNonInheritedData.access()->m_marquee, direction, d); }
1154
    void setMarqueeDirection(EMarqueeDirection d) { SET_VAR(rareNonInheritedData.access()->m_marquee, direction, d); }
Lines 1509-1514 public: a/Source/WebCore/rendering/style/RenderStyle.h_sec4
1509
    static StyleImage* initialMaskBoxImageSource() { return 0; }
1522
    static StyleImage* initialMaskBoxImageSource() { return 0; }
1510
    static PrintColorAdjust initialPrintColorAdjust() { return PrintColorAdjustEconomy; }
1523
    static PrintColorAdjust initialPrintColorAdjust() { return PrintColorAdjustEconomy; }
1511
1524
1525
#if ENABLE(CSS_GRID_LAYOUT)
1526
    static Length initialGridColumns() { return Length(Undefined); }
1527
    static Length initialGridRows() { return Length(Undefined); }
1528
#endif
1529
1512
    static const AtomicString& initialLineGrid() { return nullAtom; }
1530
    static const AtomicString& initialLineGrid() { return nullAtom; }
1513
    static LineGridSnap initialLineGridSnap() { return LineGridSnapNone; }
1531
    static LineGridSnap initialLineGridSnap() { return LineGridSnapNone; }
1514
1532
- a/Source/WebCore/rendering/style/StyleAllInOne.cpp +1 lines
Lines 42-47 a/Source/WebCore/rendering/style/StyleAllInOne.cpp_sec1
42
#include "StyleFilterData.cpp"
42
#include "StyleFilterData.cpp"
43
#include "StyleFlexibleBoxData.cpp"
43
#include "StyleFlexibleBoxData.cpp"
44
#include "StyleGeneratedImage.cpp"
44
#include "StyleGeneratedImage.cpp"
45
#include "StyleGridData.cpp"
45
#include "StyleInheritedData.cpp"
46
#include "StyleInheritedData.cpp"
46
#include "StyleMarqueeData.cpp"
47
#include "StyleMarqueeData.cpp"
47
#include "StyleMultiColData.cpp"
48
#include "StyleMultiColData.cpp"
- a/Source/WebCore/rendering/style/StyleGridData.cpp +51 lines
Line 0 a/Source/WebCore/rendering/style/StyleGridData.cpp_sec1
1
/*
2
 * Copyright (C) 2011 Google Inc. 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
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 *  THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14
 *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15
 *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16
 *  DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17
 *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18
 *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19
 *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20
 *  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21
 *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22
 *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
 *
24
 */
25
26
#include "config.h"
27
#include "StyleGridData.h"
28
29
#if ENABLE(CSS_GRID_LAYOUT)
30
31
#include "RenderStyle.h"
32
33
namespace WebCore {
34
35
StyleGridData::StyleGridData()
36
    : m_gridColumns(RenderStyle::initialGridColumns())
37
    , m_gridRows(RenderStyle::initialGridRows())
38
{
39
}
40
41
StyleGridData::StyleGridData(const StyleGridData& o)
42
    : RefCounted<StyleGridData>()
43
    , m_gridColumns(o.m_gridColumns)
44
    , m_gridRows(o.m_gridRows)
45
{
46
}
47
48
} // namespace WebCore
49
50
#endif // ENABLE(CSS_GRID_LAYOUT)
51
- a/Source/WebCore/rendering/style/StyleGridData.h +66 lines
Line 0 a/Source/WebCore/rendering/style/StyleGridData.h_sec1
1
/*
2
 * Copyright (C) 2011 Google Inc. 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
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 *  THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14
 *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15
 *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16
 *  DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17
 *  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18
 *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19
 *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20
 *  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21
 *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22
 *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
 *
24
 */
25
26
#ifndef StyleGridData_h
27
#define StyleGridData_h
28
29
#if ENABLE(CSS_GRID_LAYOUT)
30
31
#include "Length.h"
32
#include <wtf/PassRefPtr.h>
33
#include <wtf/RefCounted.h>
34
35
namespace WebCore {
36
37
class StyleGridData : public RefCounted<StyleGridData> {
38
public:
39
    static PassRefPtr<StyleGridData> create() { return adoptRef(new StyleGridData); }
40
    PassRefPtr<StyleGridData> copy() const { return adoptRef(new StyleGridData(*this)); }
41
42
    bool operator==(const StyleGridData& o) const
43
    {
44
        return m_gridColumns == o.m_gridColumns && m_gridRows == o.m_gridRows;
45
    }
46
47
    bool operator!=(const StyleGridData& o) const
48
    {
49
        return !(*this == o);
50
    }
51
52
    // FIXME: For the moment, we only support a subset of the grammar which correspond to:
53
    // 'auto' | <length> | <percentage> | 'none'
54
    Length m_gridColumns;
55
    Length m_gridRows;
56
57
private:
58
    StyleGridData();
59
    StyleGridData(const StyleGridData&);
60
};
61
62
} // namespace WebCore
63
64
#endif // ENABLE(CSS_LAYOUT_GRID)
65
66
#endif // StyleGridData_h
- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp +6 lines
Lines 96-101 StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp_sec1
96
#if ENABLE(CSS_FILTERS)
96
#if ENABLE(CSS_FILTERS)
97
    , m_filter(o.m_filter)
97
    , m_filter(o.m_filter)
98
#endif
98
#endif
99
#if ENABLE(CSS_GRID_LAYOUT)
100
    , m_grid(o.m_grid)
101
#endif
99
    , m_content(o.m_content ? o.m_content->clone() : nullptr)
102
    , m_content(o.m_content ? o.m_content->clone() : nullptr)
100
    , m_counterDirectives(o.m_counterDirectives ? clone(*o.m_counterDirectives) : nullptr)
103
    , m_counterDirectives(o.m_counterDirectives ? clone(*o.m_counterDirectives) : nullptr)
101
    , m_boxShadow(o.m_boxShadow ? adoptPtr(new ShadowData(*o.m_boxShadow)) : nullptr)
104
    , m_boxShadow(o.m_boxShadow ? adoptPtr(new ShadowData(*o.m_boxShadow)) : nullptr)
Lines 160-165 bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp_sec2
160
#if ENABLE(CSS_FILTERS)
163
#if ENABLE(CSS_FILTERS)
161
        && m_filter == o.m_filter
164
        && m_filter == o.m_filter
162
#endif
165
#endif
166
#if ENABLE(CSS_GRID_LAYOUT)
167
        && m_grid == o.m_grid
168
#endif
163
        && contentDataEquivalent(o)
169
        && contentDataEquivalent(o)
164
        && counterDataEquivalent(o)
170
        && counterDataEquivalent(o)
165
        && userDrag == o.userDrag
171
        && userDrag == o.userDrag
- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h +7 lines
Lines 46-51 class StyleDeprecatedFlexibleBoxData; a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h_sec1
46
class StyleFilterData;
46
class StyleFilterData;
47
#endif
47
#endif
48
class StyleFlexibleBoxData;
48
class StyleFlexibleBoxData;
49
#if ENABLE(CSS_GRID_LAYOUT)
50
class StyleGridData;
51
#endif
49
class StyleMarqueeData;
52
class StyleMarqueeData;
50
class StyleMultiColData;
53
class StyleMultiColData;
51
class StyleReflection;
54
class StyleReflection;
Lines 114-119 public: a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h_sec2
114
    DataRef<StyleFilterData> m_filter; // Filter operations (url, sepia, blur, etc.)
117
    DataRef<StyleFilterData> m_filter; // Filter operations (url, sepia, blur, etc.)
115
#endif
118
#endif
116
119
120
#if ENABLE(CSS_GRID_LAYOUT)
121
    DataRef<StyleGridData> m_grid;
122
#endif
123
117
    OwnPtr<ContentData> m_content;
124
    OwnPtr<ContentData> m_content;
118
    OwnPtr<CounterDirectiveMap> m_counterDirectives;
125
    OwnPtr<CounterDirectiveMap> m_counterDirectives;
119
126
- a/LayoutTests/ChangeLog +13 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2011-11-28  Julien Chaffraix  <jchaffraix@webkit.org>
2
3
        Add limited parsing support for grid-columns and grid-rows
4
        https://bugs.webkit.org/show_bug.cgi?id=72531
5
6
        Reviewed by Tony Chang.
7
8
        Test our currently supported grammar.
9
10
        * fast/css-grid-layout/grid-columns-rows-get-set.html: Added.
11
        * fast/css-grid-layout/resources/grid-columns-rows-get-set.js: Added.
12
        * fast/css-grid-layout/grid-columns-rows-get-set-expected.txt: Added.
13
1
2011-11-24  Ryosuke Niwa  <rniwa@webkit.org>
14
2011-11-24  Ryosuke Niwa  <rniwa@webkit.org>
2
15
3
        dir=auto should imply unicode-bidi:isolate by default
16
        dir=auto should imply unicode-bidi:isolate by default
- a/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt +32 lines
Line 0 a/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt_sec1
1
Test that setting and getting grid-columns and grid-rows works as expected
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
Test getting |display| set through CSS
7
PASS getComputedStyle(gridElement, '').getPropertyValue('-webkit-grid-columns') is 'none'
8
PASS getComputedStyle(gridElement, '').getPropertyValue('-webkit-grid-rows') is 'none'
9
PASS getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-columns') is '10px'
10
PASS getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-rows') is '15px'
11
PASS getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-columns') is '53%'
12
PASS getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-rows') is '27%'
13
PASS getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-columns') is 'auto'
14
PASS getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-rows') is 'auto'
15
PASS getComputedStyle(gridWithEMElement, '').getPropertyValue('-webkit-grid-columns') is '100px'
16
PASS getComputedStyle(gridWithEMElement, '').getPropertyValue('-webkit-grid-rows') is '150px'
17
18
Test the initial value
19
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-columns') is 'none'
20
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-rows') is 'none'
21
22
Test getting and setting display through JS
23
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-columns') is '18px'
24
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-rows') is '66px'
25
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-columns') is '55%'
26
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-rows') is '40%'
27
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-columns') is 'auto'
28
PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-rows') is 'auto'
29
PASS successfullyParsed is true
30
31
TEST COMPLETE
32
- a/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set.html +43 lines
Line 0 a/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set.html_sec1
1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2
<html>
3
<head>
4
<style>
5
.grid {
6
    display: -webkit-grid;
7
    -webkit-grid-columns: none;
8
    -webkit-grid-rows: none;
9
}
10
.gridWithFixed {
11
    display: -webkit-grid;
12
    -webkit-grid-columns: 10px;
13
    -webkit-grid-rows: 15px;
14
}
15
.gridWithPercent {
16
    display: -webkit-grid;
17
    -webkit-grid-columns: 53%;
18
    -webkit-grid-rows: 27%;
19
}
20
.gridWithAuto {
21
    display: -webkit-grid;
22
    -webkit-grid-columns: auto;
23
    -webkit-grid-rows: auto;
24
}
25
.gridWithEM {
26
    display: -webkit-grid;
27
    -webkit-grid-columns: 10em;
28
    -webkit-grid-rows: 15em;
29
    font: 10px Ahem;
30
}
31
</style>
32
<script src="../js/resources/js-test-pre.js"></script>
33
</head>
34
<body>
35
<div class="grid" id="gridElement"></div>
36
<div class="gridWithFixed" id="gridWithFixedElement"></div>
37
<div class="gridWithPercent" id="gridWithPercentElement"></div>
38
<div class="gridWithAuto" id="gridWithAutoElement"></div>
39
<div class="gridWithEM" id="gridWithEMElement"></div>
40
<script src="resources/grid-columns-rows-get-set.js"></script>
41
<script src="../js/resources/js-test-post.js"></script>
42
</body>
43
</html>
- a/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js +50 lines
Line 0 a/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js_sec1
1
description('Test that setting and getting grid-columns and grid-rows works as expected');
2
3
debug("Test getting |display| set through CSS");
4
var gridElement = document.getElementById("gridElement");
5
shouldBe("getComputedStyle(gridElement, '').getPropertyValue('-webkit-grid-columns')", "'none'");
6
shouldBe("getComputedStyle(gridElement, '').getPropertyValue('-webkit-grid-rows')", "'none'");
7
8
var gridWithFixedElement = document.getElementById("gridWithFixedElement");
9
shouldBe("getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-columns')", "'10px'");
10
shouldBe("getComputedStyle(gridWithFixedElement, '').getPropertyValue('-webkit-grid-rows')", "'15px'");
11
12
var gridWithPercentElement = document.getElementById("gridWithPercentElement");
13
shouldBe("getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-columns')", "'53%'");
14
shouldBe("getComputedStyle(gridWithPercentElement, '').getPropertyValue('-webkit-grid-rows')", "'27%'");
15
16
var gridWithAutoElement = document.getElementById("gridWithAutoElement");
17
shouldBe("getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-columns')", "'auto'");
18
shouldBe("getComputedStyle(gridWithAutoElement, '').getPropertyValue('-webkit-grid-rows')", "'auto'");
19
20
var gridWithEMElement = document.getElementById("gridWithEMElement");
21
shouldBe("getComputedStyle(gridWithEMElement, '').getPropertyValue('-webkit-grid-columns')", "'100px'");
22
shouldBe("getComputedStyle(gridWithEMElement, '').getPropertyValue('-webkit-grid-rows')", "'150px'");
23
24
debug("");
25
debug("Test the initial value");
26
var element = document.createElement("div");
27
document.body.appendChild(element);
28
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-columns')", "'none'");
29
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-rows')", "'none'");
30
31
debug("");
32
debug("Test getting and setting display through JS");
33
element.style.webkitGridColumns = "18px";
34
element.style.webkitGridRows = "66px";
35
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-columns')", "'18px'");
36
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-rows')", "'66px'");
37
38
element = document.createElement("div");
39
document.body.appendChild(element);
40
element.style.webkitGridColumns = "55%";
41
element.style.webkitGridRows = "40%";
42
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-columns')", "'55%'");
43
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-rows')", "'40%'");
44
45
element = document.createElement("div");
46
document.body.appendChild(element);
47
element.style.webkitGridColumns = "auto";
48
element.style.webkitGridRows = "auto";
49
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-columns')", "'auto'");
50
shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-rows')", "'auto'");

Return to Bug 72531