Changeset 228095 in webkit
- Timestamp:
- Feb 5, 2018 5:51:24 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 34 added
- 1 deleted
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r228092 r228095 1 2018-02-05 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] Rename gutter properties to remove "grid-" prefix 4 https://bugs.webkit.org/show_bug.cgi?id=180290 5 6 Reviewed by Javier Fernandez. 7 8 * TestExpectations: We're now passing some gutters tests, 9 so removing them from TestExpectations. 10 * fast/css-grid-layout/grid-gutters-get-set.html: Removed. This is now covered by WPT tests. 11 * fast/css-grid-layout/grid-shorthand-get-set-expected.txt: Update results for gutter properties 12 as default value is now "normal". 13 * fast/css-grid-layout/grid-shorthand-get-set.html: Update checks for gutter properties 14 as default value is now "normal". 15 1 16 2018-02-05 Ms2ger <Ms2ger@igalia.com> 2 17 -
trunk/LayoutTests/TestExpectations
r227978 r228095 493 493 webkit.org/b/165062 fast/css-grid-layout/grid-baseline-margins.html [ ImageOnlyFailure ] 494 494 webkit.org/b/169271 imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-sizing-alignment-001.html [ ImageOnlyFailure ] 495 webkit.org/b/180290 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-001.html [ ImageOnlyFailure ]496 webkit.org/b/180290 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-002.html [ ImageOnlyFailure ]497 webkit.org/b/180290 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-003.html [ ImageOnlyFailure ]498 webkit.org/b/180290 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-004.html [ ImageOnlyFailure ]499 webkit.org/b/180290 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-005.html [ ImageOnlyFailure ]500 webkit.org/b/180290 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-006.html [ ImageOnlyFailure ]501 webkit.org/b/180290 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-007.html [ ImageOnlyFailure ]502 webkit.org/b/180290 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-008.html [ ImageOnlyFailure ]503 webkit.org/b/180290 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-009.html [ ImageOnlyFailure ]504 webkit.org/b/180290 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-010.html [ ImageOnlyFailure ]505 495 imported/w3c/web-platform-tests/css/css-grid/abspos/absolute-positioning-changing-containing-block-001.html [ ImageOnlyFailure ] 506 496 imported/w3c/web-platform-tests/css/css-grid/abspos/grid-item-absolute-positioning-dynamic-001.html [ ImageOnlyFailure ] -
trunk/LayoutTests/fast/css-grid-layout/grid-shorthand-get-set-expected.txt
r221668 r228095 333 333 334 334 Test the inherit value does not affect gutter properties (grid-*-gap) 335 PASS getComputedStyle(anotherElement, '').getPropertyValue('grid-column-gap') is " 0px"336 PASS getComputedStyle(anotherElement, '').getPropertyValue('grid-row-gap') is " 0px"337 PASS getComputedStyle(anotherElement, '').getPropertyValue('grid-column-gap') is " 0px"338 PASS getComputedStyle(anotherElement, '').getPropertyValue('grid-row-gap') is " 0px"335 PASS getComputedStyle(anotherElement, '').getPropertyValue('grid-column-gap') is "normal" 336 PASS getComputedStyle(anotherElement, '').getPropertyValue('grid-row-gap') is "normal" 337 PASS getComputedStyle(anotherElement, '').getPropertyValue('grid-column-gap') is "normal" 338 PASS getComputedStyle(anotherElement, '').getPropertyValue('grid-row-gap') is "normal" 339 339 PASS successfullyParsed is true 340 340 -
trunk/LayoutTests/fast/css-grid-layout/grid-shorthand-get-set.html
r221668 r228095 211 211 var anotherElement = document.createElement("div"); 212 212 document.body.appendChild(anotherElement); 213 shouldBeEqualToString("getComputedStyle(anotherElement, '').getPropertyValue('grid-column-gap')", " 0px");214 shouldBeEqualToString("getComputedStyle(anotherElement, '').getPropertyValue('grid-row-gap')", " 0px");213 shouldBeEqualToString("getComputedStyle(anotherElement, '').getPropertyValue('grid-column-gap')", "normal"); 214 shouldBeEqualToString("getComputedStyle(anotherElement, '').getPropertyValue('grid-row-gap')", "normal"); 215 215 anotherElement.style.grid = "inherit"; 216 shouldBeEqualToString("getComputedStyle(anotherElement, '').getPropertyValue('grid-column-gap')", " 0px");217 shouldBeEqualToString("getComputedStyle(anotherElement, '').getPropertyValue('grid-row-gap')", " 0px");216 shouldBeEqualToString("getComputedStyle(anotherElement, '').getPropertyValue('grid-column-gap')", "normal"); 217 shouldBeEqualToString("getComputedStyle(anotherElement, '').getPropertyValue('grid-row-gap')", "normal"); 218 218 </script> 219 219 </body> -
trunk/LayoutTests/imported/w3c/ChangeLog
r228092 r228095 1 2018-02-05 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] Rename gutter properties to remove "grid-" prefix 4 https://bugs.webkit.org/show_bug.cgi?id=180290 5 6 Reviewed by Javier Fernandez. 7 8 Imported WPT tests from css/css-align/gaps/. 9 And also update the tests on css/css-grid/alignment/ gutter tests. 10 11 * web-platform-tests/css/css-align/gaps/column-gap-animation-001-expected.txt: Added. 12 * web-platform-tests/css/css-align/gaps/column-gap-animation-001.html: Added. 13 * web-platform-tests/css/css-align/gaps/column-gap-animation-002-expected.txt: Added. 14 * web-platform-tests/css/css-align/gaps/column-gap-animation-002.html: Added. 15 * web-platform-tests/css/css-align/gaps/column-gap-animation-003-expected.txt: Added. 16 * web-platform-tests/css/css-align/gaps/column-gap-animation-003.html: Added. 17 * web-platform-tests/css/css-align/gaps/column-gap-parsing-001-expected.txt: Added. 18 * web-platform-tests/css/css-align/gaps/column-gap-parsing-001.html: Added. 19 * web-platform-tests/css/css-align/gaps/gap-animation-001-expected.txt: Added. 20 * web-platform-tests/css/css-align/gaps/gap-animation-001.html: Added. 21 * web-platform-tests/css/css-align/gaps/gap-animation-002-expected.txt: Added. 22 * web-platform-tests/css/css-align/gaps/gap-animation-002.html: Added. 23 * web-platform-tests/css/css-align/gaps/gap-animation-003-expected.txt: Added. 24 * web-platform-tests/css/css-align/gaps/gap-animation-003.html: Added. 25 * web-platform-tests/css/css-align/gaps/gap-animation-004-expected.txt: Added. 26 * web-platform-tests/css/css-align/gaps/gap-animation-004.html: Added. 27 * web-platform-tests/css/css-align/gaps/gap-parsing-001-expected.txt: Added. 28 * web-platform-tests/css/css-align/gaps/gap-parsing-001.html: Added. 29 * web-platform-tests/css/css-align/gaps/grid-column-gap-parsing-001-expected.txt: Added. 30 * web-platform-tests/css/css-align/gaps/grid-column-gap-parsing-001.html: Added. 31 * web-platform-tests/css/css-align/gaps/grid-gap-parsing-001-expected.txt: Added. 32 * web-platform-tests/css/css-align/gaps/grid-gap-parsing-001.html: Added. 33 * web-platform-tests/css/css-align/gaps/grid-row-gap-parsing-001-expected.txt: Added. 34 * web-platform-tests/css/css-align/gaps/grid-row-gap-parsing-001.html: Added. 35 * web-platform-tests/css/css-align/gaps/row-gap-animation-001-expected.txt: Added. 36 * web-platform-tests/css/css-align/gaps/row-gap-animation-001.html: Added. 37 * web-platform-tests/css/css-align/gaps/row-gap-animation-002-expected.txt: Added. 38 * web-platform-tests/css/css-align/gaps/row-gap-animation-002.html: Added. 39 * web-platform-tests/css/css-align/gaps/row-gap-animation-003-expected.txt: Added. 40 * web-platform-tests/css/css-align/gaps/row-gap-animation-003.html: Added. 41 * web-platform-tests/css/css-align/gaps/row-gap-parsing-001-expected.txt: Added. 42 * web-platform-tests/css/css-align/gaps/row-gap-parsing-001.html: Added. 43 * web-platform-tests/css/css-align/gaps/w3c-import.log: Added. 44 * web-platform-tests/css/css-grid/alignment/grid-gutters-001-expected.html: 45 * web-platform-tests/css/css-grid/alignment/grid-gutters-002-expected.html: 46 * web-platform-tests/css/css-grid/alignment/grid-gutters-003-expected.html: 47 * web-platform-tests/css/css-grid/alignment/grid-gutters-004-expected.html: 48 * web-platform-tests/css/css-grid/alignment/grid-gutters-005-expected.html: 49 * web-platform-tests/css/css-grid/alignment/grid-gutters-006-expected.html: 50 * web-platform-tests/css/css-grid/alignment/grid-gutters-007-expected.html: 51 * web-platform-tests/css/css-grid/alignment/grid-gutters-008-expected.html: 52 * web-platform-tests/css/css-grid/alignment/grid-gutters-009-expected.html: 53 * web-platform-tests/css/css-grid/alignment/grid-gutters-010-expected.html: 54 1 55 2018-02-05 Ms2ger <Ms2ger@igalia.com> 2 56 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-001-expected.html
r225561 r228095 39 39 </style> 40 40 41 <p>The test passes if it has the same visual effect as reference.</p> 41 42 <div id="grid"> 42 43 <div></div> -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-002-expected.html
r225561 r228095 39 39 </style> 40 40 41 <p>The test passes if it has the same visual effect as reference.</p> 41 42 <div id="grid"> 42 43 <div></div> -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-003-expected.html
r225561 r228095 39 39 </style> 40 40 41 <p>The test passes if it has the same visual effect as reference.</p> 41 42 <div id="grid"> 42 43 <div></div> -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-004-expected.html
r225561 r228095 39 39 </style> 40 40 41 <p>The test passes if it has the same visual effect as reference.</p> 41 42 <div id="grid"> 42 43 <div></div> -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-005-expected.html
r225561 r228095 39 39 </style> 40 40 41 <p>The test passes if it has the same visual effect as reference.</p> 41 42 <div id="grid"> 42 43 <div></div> -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-006-expected.html
r225561 r228095 39 39 </style> 40 40 41 <p>The test passes if it has the same visual effect as reference.</p> 41 42 <div id="grid"> 42 43 <div></div> -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-007-expected.html
r225561 r228095 39 39 </style> 40 40 41 <p>The test passes if it has the same visual effect as reference.</p> 41 42 <div id="grid"> 42 43 <div></div> -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-008-expected.html
r225561 r228095 39 39 </style> 40 40 41 <p>The test passes if it has the same visual effect as reference.</p> 41 42 <div id="grid"> 42 43 <div></div> -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-009-expected.html
r225561 r228095 39 39 </style> 40 40 41 <p>The test passes if it has the same visual effect as reference. Column gap should be percentage of width. Row gap should resolve to auto, and therefore collapse to 0 height.</p> 41 42 <div id="grid"> 42 43 <div></div> -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-010-expected.html
r225561 r228095 39 39 </style> 40 40 41 <p>The test passes if it has the same visual effect as reference. Column gap should be percentage of width. Row gap should resolve to auto, and therefore collapse to 0 height.</p> 41 42 <div id="grid"> 42 43 <div></div> -
trunk/Source/WebCore/ChangeLog
r228092 r228095 1 2018-02-05 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] Rename gutter properties to remove "grid-" prefix 4 https://bugs.webkit.org/show_bug.cgi?id=180290 5 6 Reviewed by Javier Fernandez. 7 8 This patch applies the resoultion of the CSS WG to unprefix 9 the CSS Grid Layout gutter properties: 10 https://github.com/w3c/csswg-drafts/issues/1696 11 12 column-gap already existed before, as it's part of Multicol. 13 The patch adds the new properties row-gap and gap, and keep the legacy ones 14 as aliases: 15 - grid-column-gap => column-gap 16 - grid-row-gap => row-gap 17 - grid-gap => gap 18 19 As column-gap was already animatable, this change takes advantage 20 to make animatable row-gap too. 21 22 Tests: imported/w3c/web-platform-tests/css/css-align/gaps/ 23 24 * css/CSSComputedStyleDeclaration.cpp: 25 (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): 26 * css/CSSProperties.json: 27 * css/StyleProperties.cpp: 28 * css/parser/CSSParserFastPaths.cpp: 29 (WebCore::isSimpleLengthPropertyID): 30 * css/parser/CSSPropertyParser.cpp: 31 (WebCore::CSSPropertyParser::parseSingleValue): 32 (WebCore::CSSPropertyParser::parseShorthand): 33 * page/animation/CSSPropertyAnimation.cpp: 34 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): 35 * rendering/RenderGrid.cpp: 36 (WebCore::RenderGrid::availableSpaceForGutters const): 37 (WebCore::RenderGrid::gridGap const): 38 * rendering/style/RenderStyle.h: 39 (WebCore::RenderStyle::gridAutoRows const): 40 (WebCore::RenderStyle::columnGap const): 41 (WebCore::RenderStyle::rowGap const): 42 (WebCore::RenderStyle::setGridItemRowEnd): 43 (WebCore::RenderStyle::setColumnGap): 44 (WebCore::RenderStyle::setRowGap): 45 (WebCore::RenderStyle::initialRowGap): 46 * rendering/style/StyleGridData.cpp: 47 (WebCore::StyleGridData::StyleGridData): 48 * rendering/style/StyleGridData.h: 49 (WebCore::StyleGridData::operator== const): 50 * rendering/style/StyleMultiColData.cpp: 51 (WebCore::StyleMultiColData::StyleMultiColData): 52 (WebCore::StyleMultiColData::operator== const): 53 * rendering/style/StyleMultiColData.h: 54 * rendering/style/StyleRareNonInheritedData.cpp: 55 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): 56 (WebCore::StyleRareNonInheritedData::operator== const): 57 * rendering/style/StyleRareNonInheritedData.h: 58 1 59 2018-02-05 Ms2ger <Ms2ger@igalia.com> 2 60 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r227676 r228095 298 298 CSSPropertyColumnFill, 299 299 CSSPropertyColumnGap, 300 CSSPropertyRowGap, 300 301 CSSPropertyWebkitColumnProgression, 301 302 CSSPropertyColumnRuleColor, … … 350 351 CSSPropertyGridRowEnd, 351 352 CSSPropertyGridRowStart, 352 CSSPropertyGridColumnGap,353 CSSPropertyGridRowGap,354 353 CSSPropertyWebkitHyphenateCharacter, 355 354 CSSPropertyWebkitHyphenateLimitAfter, … … 2930 2929 return cssValuePool.createIdentifierValue(CSSValueNormal); 2931 2930 return zoomAdjustedPixelValueForLength(style.columnGap().length(), style); 2931 case CSSPropertyRowGap: 2932 if (style.rowGap().isNormal()) 2933 return cssValuePool.createIdentifierValue(CSSValueNormal); 2934 return zoomAdjustedPixelValueForLength(style.rowGap().length(), style); 2932 2935 case CSSPropertyWebkitColumnProgression: 2933 2936 return cssValuePool.createValue(style.columnProgression()); … … 3112 3115 } 3113 3116 return CSSGridTemplateAreasValue::create(style.namedGridArea(), style.namedGridAreaRowCount(), style.namedGridAreaColumnCount()); 3114 case CSSPropertyGridColumnGap: 3115 return zoomAdjustedPixelValueForLength(style.gridColumnGap(), style); 3116 case CSSPropertyGridRowGap: 3117 return zoomAdjustedPixelValueForLength(style.gridRowGap(), style); 3118 case CSSPropertyGridGap: 3119 return getCSSPropertyValuesForGridShorthand(gridGapShorthand()); 3117 case CSSPropertyGap: 3118 return getCSSPropertyValuesForShorthandProperties(gapShorthand()); 3120 3119 case CSSPropertyHeight: 3121 3120 if (renderer && !renderer->isRenderSVGModelObject()) { -
trunk/Source/WebCore/css/CSSProperties.json
r227676 r228095 4305 4305 "codegen-properties": { 4306 4306 "aliases": [ 4307 "grid-column-gap", 4307 4308 "-webkit-column-gap" 4308 4309 ], … … 4310 4311 }, 4311 4312 "specification": { 4312 "category": "css-multicol", 4313 "url": "https://drafts.csswg.org/css-multicol/#column-gap" 4313 "category": "css-align", 4314 "url": "https://drafts.csswg.org/css-align/#column-row-gap" 4315 } 4316 }, 4317 "row-gap": { 4318 "codegen-properties": { 4319 "aliases": [ 4320 "grid-row-gap" 4321 ], 4322 "converter": "GapLength" 4323 }, 4324 "specification": { 4325 "category": "css-align", 4326 "url": "https://drafts.csswg.org/css-align/#column-row-gap" 4327 } 4328 }, 4329 "gap": { 4330 "codegen-properties": { 4331 "aliases": [ 4332 "grid-gap" 4333 ], 4334 "longhands": [ 4335 "row-gap", 4336 "column-gap" 4337 ] 4338 }, 4339 "specification": { 4340 "category": "css-align", 4341 "url": "https://drafts.csswg.org/css-align/#gap-shorthand" 4314 4342 } 4315 4343 }, … … 4813 4841 } 4814 4842 }, 4815 "grid-column-gap": {4816 "codegen-properties": {4817 "initial": "initialZeroLength",4818 "converter": "Length"4819 },4820 "specification": {4821 "category": "css-grid",4822 "url": "https://www.w3.org/TR/css-grid-1/#propdef-grid-column-gap"4823 }4824 },4825 4843 "grid-column-start": { 4826 4844 "codegen-properties": { … … 4874 4892 } 4875 4893 }, 4876 "grid-row-gap": {4877 "codegen-properties": {4878 "initial": "initialZeroLength",4879 "converter": "Length"4880 },4881 "specification": {4882 "category": "css-grid",4883 "url": "https://www.w3.org/TR/css-grid-1/#propdef-grid-row-gap"4884 }4885 },4886 4894 "grid-row-start": { 4887 4895 "codegen-properties": { … … 4904 4912 "category": "css-grid", 4905 4913 "url": "https://www.w3.org/TR/css-grid-1/#propdef-grid-column" 4906 }4907 },4908 "grid-gap": {4909 "codegen-properties": {4910 "longhands": [4911 "grid-row-gap",4912 "grid-column-gap"4913 ]4914 },4915 "specification": {4916 "category": "css-grid",4917 "url": "https://www.w3.org/TR/css-grid-1/#propdef-grid-gap"4918 4914 } 4919 4915 }, -
trunk/Source/WebCore/css/StyleProperties.cpp
r224320 r228095 1180 1180 CSSPropertyColumnCount, 1181 1181 CSSPropertyColumnGap, 1182 CSSPropertyRowGap, 1182 1183 CSSPropertyColumnRuleColor, 1183 1184 CSSPropertyColumnRuleStyle, -
trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp
r226432 r228095 48 48 switch (propertyId) { 49 49 case CSSPropertyFontSize: 50 case CSSPropertyGridColumnGap:51 case CSSPropertyGridRowGap:52 50 case CSSPropertyHeight: 53 51 case CSSPropertyWidth: -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r227786 r228095 4036 4036 case CSSPropertyColumnGap: 4037 4037 return consumeGapLength(m_range, m_context.mode); 4038 case CSSPropertyRowGap: 4039 return consumeGapLength(m_range, m_context.mode); 4038 4040 case CSSPropertyColumnSpan: 4039 4041 return consumeColumnSpan(m_range); … … 4056 4058 #endif 4057 4059 return consumeAnimationPropertyList(property, m_range, m_context); 4058 case CSSPropertyGridColumnGap:4059 case CSSPropertyGridRowGap:4060 return consumeLengthOrPercent(m_range, m_context.mode, ValueRangeNonNegative);4061 4060 case CSSPropertyShapeMargin: 4062 4061 return consumeLengthOrPercent(m_range, m_context.mode, ValueRangeNonNegative); … … 5786 5785 case CSSPropertyPerspectiveOrigin: 5787 5786 return consumePerspectiveOrigin(important); 5788 case CSSPropertyG ridGap: {5789 RefPtr<CSSValue> rowGap = consume LengthOrPercent(m_range, m_context.mode, ValueRangeNonNegative);5790 RefPtr<CSSValue> columnGap = consume LengthOrPercent(m_range, m_context.mode, ValueRangeNonNegative);5787 case CSSPropertyGap: { 5788 RefPtr<CSSValue> rowGap = consumeGapLength(m_range, m_context.mode); 5789 RefPtr<CSSValue> columnGap = consumeGapLength(m_range, m_context.mode); 5791 5790 if (!rowGap || !m_range.atEnd()) 5792 5791 return false; 5793 5792 if (!columnGap) 5794 5793 columnGap = rowGap; 5795 addProperty(CSSProperty GridRowGap, CSSPropertyGridGap, rowGap.releaseNonNull(), important);5796 addProperty(CSSProperty GridColumnGap, CSSPropertyGridGap, columnGap.releaseNonNull(), important);5794 addProperty(CSSPropertyRowGap, CSSPropertyGap, rowGap.releaseNonNull(), important); 5795 addProperty(CSSPropertyColumnGap, CSSPropertyGap, columnGap.releaseNonNull(), important); 5797 5796 return true; 5798 5797 } -
trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp
r227676 r228095 1527 1527 new PropertyWrapper<unsigned short>(CSSPropertyColumnRuleWidth, &RenderStyle::columnRuleWidth, &RenderStyle::setColumnRuleWidth), 1528 1528 new LengthPropertyWrapper<GapLength>(CSSPropertyColumnGap, &RenderStyle::columnGap, &RenderStyle::setColumnGap), 1529 new LengthPropertyWrapper<GapLength>(CSSPropertyRowGap, &RenderStyle::rowGap, &RenderStyle::setRowGap), 1529 1530 new PropertyWrapper<unsigned short>(CSSPropertyColumnCount, &RenderStyle::columnCount, &RenderStyle::setColumnCount), 1530 1531 new PropertyWrapper<float>(CSSPropertyColumnWidth, &RenderStyle::columnWidth, &RenderStyle::setColumnWidth), -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r227977 r228095 171 171 { 172 172 bool isRowAxis = direction == ForColumns; 173 const Length& gap = isRowAxis ? style().gridColumnGap() : style().gridRowGap();174 if ( !gap.isPercent())173 const GapLength& gapLength = isRowAxis ? style().columnGap() : style().rowGap(); 174 if (gapLength.isNormal() || !gapLength.length().isPercent()) 175 175 return std::nullopt; 176 176 … … 340 340 LayoutUnit RenderGrid::gridGap(GridTrackSizingDirection direction, std::optional<LayoutUnit> availableSize) const 341 341 { 342 const Length& gap = direction == ForColumns ? style().gridColumnGap() : style().gridRowGap(); 343 return valueForLength(gap, availableSize.value_or(0)); 342 const GapLength& gapLength = direction == ForColumns? style().columnGap() : style().rowGap(); 343 if (gapLength.isNormal()) 344 return LayoutUnit(); 345 346 return valueForLength(gapLength.length(), availableSize.value_or(0)); 344 347 } 345 348 -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r227676 r228095 552 552 const Vector<GridTrackSize>& gridAutoColumns() const { return m_rareNonInheritedData->grid->gridAutoColumns; } 553 553 const Vector<GridTrackSize>& gridAutoRows() const { return m_rareNonInheritedData->grid->gridAutoRows; } 554 const Length& gridColumnGap() const { return m_rareNonInheritedData->grid->gridColumnGap; }555 const Length& gridRowGap() const { return m_rareNonInheritedData->grid->gridRowGap; }556 554 557 555 const GridPosition& gridItemColumnStart() const { return m_rareNonInheritedData->gridItem->gridColumnStart; } … … 606 604 bool specifiesColumns() const { return !hasAutoColumnCount() || !hasAutoColumnWidth() || !hasInlineColumnAxis(); } 607 605 ColumnFill columnFill() const { return static_cast<ColumnFill>(m_rareNonInheritedData->multiCol->fill); } 608 const GapLength& columnGap() const { return m_rareNonInheritedData->multiCol->columnGap; } 606 const GapLength& columnGap() const { return m_rareNonInheritedData->columnGap; } 607 const GapLength& rowGap() const { return m_rareNonInheritedData->rowGap; } 609 608 EBorderStyle columnRuleStyle() const { return m_rareNonInheritedData->multiCol->rule.style(); } 610 609 unsigned short columnRuleWidth() const { return m_rareNonInheritedData->multiCol->ruleWidth(); } … … 1098 1097 void setGridItemRowStart(const GridPosition& rowStartPosition) { SET_NESTED_VAR(m_rareNonInheritedData, gridItem, gridRowStart, rowStartPosition); } 1099 1098 void setGridItemRowEnd(const GridPosition& rowEndPosition) { SET_NESTED_VAR(m_rareNonInheritedData, gridItem, gridRowEnd, rowEndPosition); } 1100 void setGridColumnGap(Length&& length) { SET_NESTED_VAR(m_rareNonInheritedData, grid, gridColumnGap, WTFMove(length)); }1101 void setGridRowGap(Length&& length) { SET_NESTED_VAR(m_rareNonInheritedData, grid, gridRowGap, WTFMove(length)); }1102 1099 1103 1100 void setMarqueeIncrement(Length&& length) { SET_NESTED_VAR(m_rareNonInheritedData, marquee, increment, WTFMove(length)); } … … 1130 1127 void setHasAutoColumnCount() { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, autoCount, true); SET_NESTED_VAR(m_rareNonInheritedData, multiCol, count, 0); } 1131 1128 void setColumnFill(ColumnFill columnFill) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, fill, columnFill); } 1132 void setColumnGap(GapLength&& gapLength) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, columnGap, WTFMove(gapLength)); } 1129 void setColumnGap(GapLength&& gapLength) { SET_VAR(m_rareNonInheritedData, columnGap, WTFMove(gapLength)); } 1130 void setRowGap(GapLength&& gapLength) { SET_VAR(m_rareNonInheritedData, rowGap, WTFMove(gapLength)); } 1133 1131 void setColumnRuleColor(const Color& c) { SET_BORDERVALUE_COLOR(m_rareNonInheritedData.access().multiCol, rule, c); } 1134 1132 void setColumnRuleStyle(EBorderStyle b) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, rule.m_style, b); } … … 1534 1532 static ColumnSpan initialColumnSpan() { return ColumnSpanNone; } 1535 1533 static GapLength initialColumnGap() { return GapLength(); } 1534 static GapLength initialRowGap() { return GapLength(); } 1536 1535 static const TransformOperations& initialTransform() { static NeverDestroyed<TransformOperations> ops; return ops; } 1537 1536 static Length initialTransformOriginX() { return Length(50.0f, Percent); } … … 1626 1625 static OrderedNamedGridLinesMap initialOrderedNamedGridRowLines() { return OrderedNamedGridLinesMap(); } 1627 1626 1628 static Length initialGridColumnGap() { return Length(Fixed); }1629 static Length initialGridRowGap() { return Length(Fixed); }1630 1631 1627 // 'auto' is the default. 1632 1628 static GridPosition initialGridItemColumnStart() { return GridPosition(); } -
trunk/Source/WebCore/rendering/style/StyleGridData.cpp
r212629 r228095 48 48 , namedGridAreaRowCount(RenderStyle::initialNamedGridAreaCount()) 49 49 , namedGridAreaColumnCount(RenderStyle::initialNamedGridAreaCount()) 50 , gridColumnGap(RenderStyle::initialGridColumnGap())51 , gridRowGap(RenderStyle::initialGridRowGap())52 50 , gridAutoRepeatColumns(RenderStyle::initialGridAutoRepeatTracks()) 53 51 , gridAutoRepeatRows(RenderStyle::initialGridAutoRepeatTracks()) … … 77 75 , namedGridAreaRowCount(o.namedGridAreaRowCount) 78 76 , namedGridAreaColumnCount(o.namedGridAreaColumnCount) 79 , gridColumnGap(o.gridColumnGap)80 , gridRowGap(o.gridRowGap)81 77 , gridAutoRepeatColumns(o.gridAutoRepeatColumns) 82 78 , gridAutoRepeatRows(o.gridAutoRepeatRows) -
trunk/Source/WebCore/rendering/style/StyleGridData.h
r212629 r228095 55 55 && namedGridAreaRowCount == o.namedGridAreaRowCount && namedGridAreaColumnCount == o.namedGridAreaColumnCount 56 56 && orderedNamedGridRowLines == o.orderedNamedGridRowLines && orderedNamedGridColumnLines == o.orderedNamedGridColumnLines 57 && gridColumnGap == o.gridColumnGap && gridRowGap == o.gridRowGap58 57 && gridAutoRepeatColumns == o.gridAutoRepeatColumns && gridAutoRepeatRows == o.gridAutoRepeatRows 59 58 && autoRepeatColumnsInsertionPoint == o.autoRepeatColumnsInsertionPoint && autoRepeatRowsInsertionPoint == o.autoRepeatRowsInsertionPoint … … 91 90 unsigned namedGridAreaColumnCount; 92 91 93 Length gridColumnGap;94 Length gridRowGap;95 96 92 Vector<GridTrackSize> gridAutoRepeatColumns; 97 93 Vector<GridTrackSize> gridAutoRepeatRows; -
trunk/Source/WebCore/rendering/style/StyleMultiColData.cpp
r227676 r228095 42 42 , width(other.width) 43 43 , count(other.count) 44 , columnGap(other.columnGap)45 44 , rule(other.rule) 46 45 , visitedLinkColumnRuleColor(other.visitedLinkColumnRuleColor) … … 61 60 bool StyleMultiColData::operator==(const StyleMultiColData& other) const 62 61 { 63 return width == other.width && count == other.count && columnGap == other.columnGap62 return width == other.width && count == other.count 64 63 && rule == other.rule && visitedLinkColumnRuleColor == other.visitedLinkColumnRuleColor 65 64 && autoWidth == other.autoWidth && autoCount == other.autoCount -
trunk/Source/WebCore/rendering/style/StyleMultiColData.h
r227676 r228095 51 51 float width { 0 }; 52 52 unsigned short count; 53 GapLength columnGap;54 53 BorderValue rule; 55 54 Color visitedLinkColumnRuleColor; -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
r227577 r228095 107 107 , hasAttrContent(false) 108 108 , isNotFinal(false) 109 , columnGap(RenderStyle::initialColumnGap()) 110 , rowGap(RenderStyle::initialRowGap()) 109 111 { 110 112 maskBoxImage.setMaskDefaults(); … … 198 200 , hasAttrContent(o.hasAttrContent) 199 201 , isNotFinal(o.isNotFinal) 202 , columnGap(o.columnGap) 203 , rowGap(o.rowGap) 200 204 { 201 205 } … … 297 301 && resize == o.resize 298 302 && hasAttrContent == o.hasAttrContent 299 && isNotFinal == o.isNotFinal; 303 && isNotFinal == o.isNotFinal 304 && columnGap == o.columnGap 305 && rowGap == o.rowGap; 300 306 } 301 307 -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h
r227577 r228095 214 214 unsigned isNotFinal : 1; 215 215 216 GapLength columnGap; 217 GapLength rowGap; 218 216 219 private: 217 220 StyleRareNonInheritedData();
Note: See TracChangeset
for help on using the changeset viewer.