haikuwebkit/LayoutTests/fast/css-grid-layout/grid-template-columns-rows-...

96 lines
5.5 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE HTML>
<link href="resources/grid.css" rel="stylesheet">
<link href="resources/grid-alignment.css" rel="stylesheet">
<style>
.grid {
[css-grid] Unprefix CSS Grid Layout properties https://bugs.webkit.org/show_bug.cgi?id=157137 Reviewed by Simon Fraser. Remove "-webkit" prefix from all the grid layout properties, including the display value. Update the source code to remove the prefix where it was used too. .: * ManualTests/css-grid-layout-item-with-huge-span-crash.html: PerformanceTests: * Layout/auto-grid-lots-of-data.html: * Layout/fixed-grid-lots-of-data.html: * Layout/fixed-grid-lots-of-stretched-data.html: Source/WebCore: * css/CSSComputedStyleDeclaration.cpp: (WebCore::isLayoutDependent): (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): (WebCore::isValidKeywordPropertyAndValue): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseGridGapShorthand): (WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns): (WebCore::CSSParser::parseGridTemplateShorthand): (WebCore::CSSParser::parseGridShorthand): (WebCore::CSSParser::parseGridAreaShorthand): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInitialGridTemplateAreas): (WebCore::StyleBuilderCustom::applyInheritGridTemplateAreas): (WebCore::StyleBuilderCustom::applyValueGridTemplateAreas): (WebCore::StyleBuilderCustom::applyInitialGridTemplateColumns): (WebCore::StyleBuilderCustom::applyInheritGridTemplateColumns): (WebCore::StyleBuilderCustom::applyValueGridTemplateColumns): (WebCore::StyleBuilderCustom::applyInitialGridTemplateRows): (WebCore::StyleBuilderCustom::applyInheritGridTemplateRows): (WebCore::StyleBuilderCustom::applyValueGridTemplateRows): * css/StyleProperties.cpp: (WebCore::StyleProperties::getPropertyValue): Source/WebInspectorUI: * UserInterface/Models/CSSKeywordCompletions.js: Tools: * TestWebKitAPI/Tests/WebCore/CSSParser.cpp: (TestWebKitAPI::TEST): LayoutTests: * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * fast/css-grid-layout/absolute-positioning-definite-sizes.html: * fast/css-grid-layout/absolute-positioning-grid-container-containing-block.html: * fast/css-grid-layout/absolute-positioning-grid-container-parent.html: * fast/css-grid-layout/anonymous-grid-items-expected.html: * fast/css-grid-layout/anonymous-grid-items.html: * fast/css-grid-layout/auto-content-resolution-columns.html: * fast/css-grid-layout/auto-content-resolution-rows.html: * fast/css-grid-layout/breadth-size-resolution-grid.html: * fast/css-grid-layout/calc-resolution-grid-item.html: * fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html: * fast/css-grid-layout/display-grid-set-get-expected.txt: * fast/css-grid-layout/explicit-grid-size.html: * fast/css-grid-layout/flex-and-content-sized-resolution-columns-expected.txt: * fast/css-grid-layout/flex-and-content-sized-resolution-columns.html: * fast/css-grid-layout/flex-and-intrinsic-sizes.html: * fast/css-grid-layout/flex-and-minmax-content-resolution-columns.html: * fast/css-grid-layout/flex-and-minmax-content-resolution-rows.html: * fast/css-grid-layout/flex-content-distribution.html: * fast/css-grid-layout/flex-content-resolution-columns.html: * fast/css-grid-layout/flex-content-resolution-rows.html: * fast/css-grid-layout/flex-content-sized-column-use-available-width.html: * fast/css-grid-layout/flex-content-sized-columns-resize.html: * fast/css-grid-layout/flex-factor-sum-less-than-1.html: * fast/css-grid-layout/float-not-protruding-into-next-grid-item.html: * fast/css-grid-layout/floating-empty-grids.html: * fast/css-grid-layout/grid-align-content-distribution-vertical-lr.html: * fast/css-grid-layout/grid-align-content-distribution-vertical-rl.html: * fast/css-grid-layout/grid-align-content-distribution.html: * fast/css-grid-layout/grid-align-content-vertical-lr.html: * fast/css-grid-layout/grid-align-content-vertical-rl.html: * fast/css-grid-layout/grid-align-content.html: * fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-lr.html: * fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-rl.html: * fast/css-grid-layout/grid-align-justify-margin-border-padding.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css-grid-layout/grid-align-justify-stretch.html: * fast/css-grid-layout/grid-align-stretching-replaced-items.html: * fast/css-grid-layout/grid-align.html: * fast/css-grid-layout/grid-auto-columns-rows-auto-flow-resolution.html: * fast/css-grid-layout/grid-auto-columns-rows-get-set-expected.txt: * fast/css-grid-layout/grid-auto-columns-rows-get-set.html: * fast/css-grid-layout/grid-auto-columns-rows-resolution.html: * fast/css-grid-layout/grid-auto-columns-rows-update.html: * fast/css-grid-layout/grid-auto-flow-get-set-expected.txt: * fast/css-grid-layout/grid-auto-flow-get-set.html: * fast/css-grid-layout/grid-auto-flow-resolution.html: * fast/css-grid-layout/grid-auto-flow-sparse.html: * fast/css-grid-layout/grid-auto-flow-update.html: * fast/css-grid-layout/grid-automatic-minimum-for-auto-columns-expected.txt: * fast/css-grid-layout/grid-automatic-minimum-for-auto-columns.html: * fast/css-grid-layout/grid-automatic-minimum-for-auto-rows-expected.txt: * fast/css-grid-layout/grid-automatic-minimum-for-auto-rows.html: * fast/css-grid-layout/grid-columns-rows-get-set-expected.txt: * fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt: * fast/css-grid-layout/grid-columns-rows-get-set-multiple.html: * fast/css-grid-layout/grid-columns-rows-get-set.html: * fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html: * fast/css-grid-layout/grid-container-ignore-first-letter.html: * fast/css-grid-layout/grid-content-alignment-and-self-alignment-spanning.html: * fast/css-grid-layout/grid-content-alignment-and-self-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-content-alignment-stretch-only-valid-for-auto-sized-tracks.html: * fast/css-grid-layout/grid-content-alignment-stretch-with-different-sized-tracks.html: * fast/css-grid-layout/grid-content-alignment-with-span-vertical-lr.html: * fast/css-grid-layout/grid-content-alignment-with-span-vertical-rl.html: * fast/css-grid-layout/grid-content-alignment-with-span.html: * fast/css-grid-layout/grid-content-sized-columns-resolution-expected.txt: * fast/css-grid-layout/grid-content-sized-columns-resolution.html: * fast/css-grid-layout/grid-disable.html: * fast/css-grid-layout/grid-dynamic-updates-relayout.html: * fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt: * fast/css-grid-layout/grid-element-auto-repeat-get-set.html: * fast/css-grid-layout/grid-element-border-grid-item.html: * fast/css-grid-layout/grid-element-border-padding-grid-item.html: * fast/css-grid-layout/grid-element-change-columns-repaint.html: * fast/css-grid-layout/grid-element-change-rows-repaint.html: * fast/css-grid-layout/grid-element-empty-row-column.html: * fast/css-grid-layout/grid-element-min-max-height.html: * fast/css-grid-layout/grid-element-min-max-width.html: * fast/css-grid-layout/grid-element-padding-grid-item.html: * fast/css-grid-layout/grid-element-padding-margin.html: * fast/css-grid-layout/grid-element-repeat-get-set-expected.txt: * fast/css-grid-layout/grid-element-repeat-get-set.html: * fast/css-grid-layout/grid-element-shrink-to-fit.html: * fast/css-grid-layout/grid-grow-tracks-to-their-max-expected.txt: * fast/css-grid-layout/grid-grow-tracks-to-their-max.html: * fast/css-grid-layout/grid-gutters-and-alignment.html: * fast/css-grid-layout/grid-gutters-and-flex-content.html: * fast/css-grid-layout/grid-gutters-and-tracks.html: * fast/css-grid-layout/grid-gutters-get-set-expected.txt: * fast/css-grid-layout/grid-gutters-get-set.html: * fast/css-grid-layout/grid-indefinite-calculated-height-crash-expected.txt: * fast/css-grid-layout/grid-indefinite-calculated-height-crash.html: * fast/css-grid-layout/grid-initialize-span-one-items-expected.txt: * fast/css-grid-layout/grid-initialize-span-one-items.html: * fast/css-grid-layout/grid-item-addition-auto-placement-update.html: * fast/css-grid-layout/grid-item-addition-track-breadth-update.html: * fast/css-grid-layout/grid-item-area-get-set-expected.txt: * fast/css-grid-layout/grid-item-area-get-set.html: * fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-lr.html: * fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-rl.html: * fast/css-grid-layout/grid-item-auto-margins-alignment.html: * fast/css-grid-layout/grid-item-auto-margins-and-stretch.html: * fast/css-grid-layout/grid-item-auto-margins-must-respect-specified-margins.html: * fast/css-grid-layout/grid-item-auto-placement-automatic-span.html: * fast/css-grid-layout/grid-item-auto-placement-definite-span.html: * fast/css-grid-layout/grid-item-auto-placement-fixed-row-column.html: * fast/css-grid-layout/grid-item-auto-sized-align-justify-margin-border-padding.html: * fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html: * fast/css-grid-layout/grid-item-bad-resolution-double-span.html: * fast/css-grid-layout/grid-item-change-column-repaint.html: * fast/css-grid-layout/grid-item-change-row-repaint.html: * fast/css-grid-layout/grid-item-column-row-get-set-expected.txt: * fast/css-grid-layout/grid-item-column-row-get-set.html: * fast/css-grid-layout/grid-item-display.html: * fast/css-grid-layout/grid-item-end-after-get-set-expected.txt: * fast/css-grid-layout/grid-item-end-after-get-set.html: * fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-ltr.html: * fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-rtl.html: * fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-ltr.html: * fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-rtl.html: * fast/css-grid-layout/grid-item-margin-resolution.html: * fast/css-grid-layout/grid-item-margins-not-collapse.html: * fast/css-grid-layout/grid-item-multiple-minmax-content-resolution.html: * fast/css-grid-layout/grid-item-named-grid-area-resolution.html: * fast/css-grid-layout/grid-item-named-grid-line-resolution.html: * fast/css-grid-layout/grid-item-negative-indexes.html: * fast/css-grid-layout/grid-item-negative-integer-explicit-grid-resolution.html: * fast/css-grid-layout/grid-item-negative-position-resolution.html: * fast/css-grid-layout/grid-item-order-auto-flow-resolution.html: * fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution.html: * fast/css-grid-layout/grid-item-order-paint-order.html: * fast/css-grid-layout/grid-item-position-changed-dynamic.html: * fast/css-grid-layout/grid-item-removal-auto-placement-update.html: * fast/css-grid-layout/grid-item-removal-track-breadth-update.html: * fast/css-grid-layout/grid-item-spanning-resolution.html: * fast/css-grid-layout/grid-item-start-before-get-set-expected.txt: * fast/css-grid-layout/grid-item-start-before-get-set.html: * fast/css-grid-layout/grid-item-stretch-with-margins-borders-padding-vertical-lr.html: * fast/css-grid-layout/grid-item-stretch-with-margins-borders-padding-vertical-rl.html: * fast/css-grid-layout/grid-item-stretch-with-margins-borders-padding.html: * fast/css-grid-layout/grid-item-text-background-not-interleaved.html: * fast/css-grid-layout/grid-item-unknown-named-grid-line-resolution.html: * fast/css-grid-layout/grid-item-with-border-in-fr.html: * fast/css-grid-layout/grid-item-with-border-in-intrinsic.html: * fast/css-grid-layout/grid-item-with-percent-height-in-auto-height-grid-resolution.html: * fast/css-grid-layout/grid-item-with-percent-min-max-height-dynamic.html: * fast/css-grid-layout/grid-item-z-index-change-repaint-expected.html: * fast/css-grid-layout/grid-item-z-index-change-repaint.html: * fast/css-grid-layout/grid-item-z-index-stacking-context-expected.html: * fast/css-grid-layout/grid-item-z-index-stacking-context.html: * fast/css-grid-layout/grid-item-z-index-support.html: * fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-width-or-margin-change.html: * fast/css-grid-layout/grid-justify-content-distribution-vertical-lr.html: * fast/css-grid-layout/grid-justify-content-distribution-vertical-rl.html: * fast/css-grid-layout/grid-justify-content-distribution.html: * fast/css-grid-layout/grid-justify-content-vertical-lr.html: * fast/css-grid-layout/grid-justify-content-vertical-rl.html: * fast/css-grid-layout/grid-justify-content.html: * fast/css-grid-layout/grid-percent-track-margin-border-padding.html: * fast/css-grid-layout/grid-percent-track-scrollbar.html: * fast/css-grid-layout/grid-positioned-children-writing-modes.html: * fast/css-grid-layout/grid-positioned-items-background-rtl.html: * fast/css-grid-layout/grid-positioned-items-background.html: * fast/css-grid-layout/grid-positioned-items-content-alignment-rtl.html: * fast/css-grid-layout/grid-positioned-items-content-alignment.html: * fast/css-grid-layout/grid-positioned-items-gaps-rtl.html: * fast/css-grid-layout/grid-positioned-items-gaps.html: * fast/css-grid-layout/grid-positioned-items-implicit-grid-line.html: * fast/css-grid-layout/grid-positioned-items-implicit-grid.html: * fast/css-grid-layout/grid-positioned-items-padding.html: * fast/css-grid-layout/grid-positioned-items-unknown-named-grid-line.html: * fast/css-grid-layout/grid-positioned-items-within-grid-implicit-track.html: * fast/css-grid-layout/grid-preferred-logical-widths.html: * fast/css-grid-layout/grid-repeat-calc-expected.txt: * fast/css-grid-layout/grid-repeat-calc.html: * fast/css-grid-layout/grid-shorthand-computed-style-crash.html: * fast/css-grid-layout/grid-shorthand-get-set-expected.txt: * fast/css-grid-layout/grid-shorthand-get-set.html: * fast/css-grid-layout/grid-sizing-positioned-items.html: * fast/css-grid-layout/grid-strict-ordering-crash.html: * fast/css-grid-layout/grid-template-areas-empty-string-crash.html: * fast/css-grid-layout/grid-template-areas-get-set-expected.txt: * fast/css-grid-layout/grid-template-areas-get-set.html: * fast/css-grid-layout/grid-template-areas-infinite-loop.html: * fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment-expected.txt: * fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment.html: * fast/css-grid-layout/grid-template-shorthand-computed-style-crash.html: * fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt: * fast/css-grid-layout/grid-template-shorthand-get-set.html: * fast/css-grid-layout/grid-update-sizes-after-distributing-all-expected.txt: * fast/css-grid-layout/grid-update-sizes-after-distributing-all.html: * fast/css-grid-layout/grid-was-populated-assert.html: * fast/css-grid-layout/grid-with-relative-font-length-crash.html: * fast/css-grid-layout/implicit-columns-auto-resolution.html: * fast/css-grid-layout/implicit-position-dynamic-change-expected.txt: * fast/css-grid-layout/implicit-position-dynamic-change.html: * fast/css-grid-layout/implicit-rows-auto-resolution.html: * fast/css-grid-layout/implicit-tracks-before-explicit.html: * fast/css-grid-layout/justify-self-cell.html: * fast/css-grid-layout/mark-as-infinitely-growable-expected.txt: * fast/css-grid-layout/mark-as-infinitely-growable.html: * fast/css-grid-layout/maximize-tracks-definite-indefinite-height.html: * fast/css-grid-layout/min-content-row-must-shrink-when-column-grows.html: * fast/css-grid-layout/min-height-border-box.html: * fast/css-grid-layout/min-width-height-auto-and-margins.html: * fast/css-grid-layout/min-width-height-auto-overflow.html: * fast/css-grid-layout/min-width-height-auto.html: * fast/css-grid-layout/min-width-margin-box.html: * fast/css-grid-layout/minmax-fixed-logical-height-only.html: * fast/css-grid-layout/minmax-fixed-logical-width-only.html: * fast/css-grid-layout/minmax-max-content-resolution-columns.html: * fast/css-grid-layout/minmax-max-content-resolution-rows.html: * fast/css-grid-layout/minmax-min-content-column-resolution-columns.html: * fast/css-grid-layout/minmax-min-content-column-resolution-rows.html: * fast/css-grid-layout/minmax-spanning-resolution-columns.html: * fast/css-grid-layout/minmax-spanning-resolution-rows.html: * fast/css-grid-layout/named-grid-line-get-set-expected.txt: * fast/css-grid-layout/named-grid-line-get-set.html: * fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks-expected.txt: * fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html: * fast/css-grid-layout/named-grid-lines-with-named-grid-areas-dynamic-get-set.html: * fast/css-grid-layout/named-grid-lines-with-named-grid-areas-get-set-expected.txt: * fast/css-grid-layout/named-grid-lines-with-named-grid-areas-get-set.html: * fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html: * fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt: * fast/css-grid-layout/non-grid-columns-rows-get-set-multiple-expected.txt: * fast/css-grid-layout/non-grid-columns-rows-get-set-multiple.html: * fast/css-grid-layout/non-grid-columns-rows-get-set.html: * fast/css-grid-layout/non-grid-element-repeat-get-set-expected.txt: * fast/css-grid-layout/non-grid-element-repeat-get-set.html: * fast/css-grid-layout/non-named-grid-line-get-set-expected.txt: * fast/css-grid-layout/non-named-grid-line-get-set.html: * fast/css-grid-layout/percent-grid-item-in-percent-grid-track-in-percent-grid.html: * fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update.html: * fast/css-grid-layout/percent-grid-item-in-percent-grid-track.html: * fast/css-grid-layout/percent-intrinsic-track-breadth.html: * fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html: * fast/css-grid-layout/percent-of-indefinite-track-size-in-minmax-crash.html: * fast/css-grid-layout/percent-of-indefinite-track-size.html: * fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update.html: * fast/css-grid-layout/percent-padding-margin-resolution-grid-item.html: * fast/css-grid-layout/percent-resolution-grid-item.html: * fast/css-grid-layout/percent-track-breadths-regarding-container-size.html: * fast/css-grid-layout/place-cell-by-index.html: * fast/css-grid-layout/positioned-grid-items-should-not-create-implicit-tracks.html: * fast/css-grid-layout/positioned-grid-items-should-not-take-up-space.html: * fast/css-grid-layout/relayout-align-items-changed.html: * fast/css-grid-layout/relayout-align-self-changed.html: * fast/css-grid-layout/relayout-indefinite-heights.html: * fast/css-grid-layout/relayout-justify-items-changed.html: * fast/css-grid-layout/relayout-justify-self-changed.html: * fast/css-grid-layout/resources/display-grid-set-get.js: * fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js: (testInherit): (testInitial): * fast/css-grid-layout/resources/grid-columns-rows-get-set.js: (testInherit): (testInitial): * fast/css-grid-layout/resources/grid-definitions-parsing-utils.js: (testGridTemplatesValues): (checkGridTemplatesSetJSValues): (testGridTemplatesSetBadJSValues): (checkGridAutoFlowSetCSSValue): (checkGridAutoFlowSetJSValue): (testGridAutoDefinitionsValues): (testGridGapDefinitionsValues): * fast/css-grid-layout/resources/grid-item-column-row-parsing-utils.js: (checkColumnRowValues): (window.testColumnRowJSParsing): (window.testColumnRowInvalidJSParsing): (window.testColumnStartRowStartJSParsing): (window.testColumnEndRowEndJSParsing): (setupInheritTest): (setupInitialTest): (window.testColumnRowInheritJSParsing): (window.testStartBeforeInheritJSParsing): (window.testEndAfterInheritJSParsing): (window.testColumnRowInitialJSParsing): (window.testStartBeforeInitialJSParsing): (window.testEndAfterInitialJSParsing): * fast/css-grid-layout/resources/grid-shorthand-parsing-utils.js: (testGridDefinitionsValues): (checkGridDefinitionsSetJSValues): (testGridDefinitionsSetBadJSValues): * fast/css-grid-layout/resources/grid-template-shorthand-parsing-utils.js: (testGridDefinitionsValues): (checkGridDefinitionsSetJSValues): (testGridDefinitionsSetBadJSValues): * fast/css-grid-layout/resources/grid.css: (.grid): (.inline-grid): (.firstRowFirstColumn): (.onlyFirstRowOnlyFirstColumn): (.firstRowSecondColumn): (.onlyFirstRowOnlySecondColumn): (.firstRowThirdColumn): (.firstRowFourthColumn): (.secondRowFirstColumn): (.onlySecondRowOnlyFirstColumn): (.secondRowSecondColumn): (.onlySecondRowOnlySecondColumn): (.endSecondRowEndSecondColumn): (.secondRowThirdColumn): (.secondRowFourthColumn): (.thirdRowFirstColumn): (.thirdRowSecondColumn): (.thirdRowThirdColumn): (.fourthRowFirstColumn): (.fourthRowSecondColumn): (.firstAutoRowSecondAutoColumn): (.autoLastRowAutoLastColumn): (.autoSecondRowAutoFirstColumn): (.firstRowBothColumn): (.secondRowBothColumn): (.bothRowFirstColumn): (.bothRowSecondColumn): (.bothRowBothColumn): (.autoRowAutoColumn): (.firstRowAutoColumn): (.secondRowAutoColumn): (.thirdRowAutoColumn): (.autoRowFirstColumn): (.autoRowSecondColumn): (.autoRowThirdColumn): (.autoRowAutoColumnSpanning2): (.autoRowSpanning2AutoColumn): (.autoRowSpanning2AutoColumnSpanning3): (.autoRowSpanning3AutoColumnSpanning2): (.autoRowFirstColumnSpanning2): (.autoRowSecondColumnSpanning2): (.firstRowSpanning2AutoColumn): (.secondRowSpanning2AutoColumn): (.gridAutoFlowColumnSparse): (.gridAutoFlowColumnDense): (.gridAutoFlowRowSparse): (.gridAutoFlowRowDense): * fast/css-grid-layout/resources/non-grid-columns-rows-get-set-multiple.js: (testInherit): (testInitial): * fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js: (testInherit): (testInitial): * fast/css-grid-layout/should-not-collapse-anonymous-blocks.html: * fast/css-grid-layout/swap-lines-if-start-is-further-endward-than-end-line-expected.html: * fast/css-grid-layout/swap-lines-if-start-is-further-endward-than-end-line.html: * fast/css-grid-layout/tracks-number-greatly-exceeding-available-size-crash.html: * fast/css/auto-min-size.html: * fast/css/first-letter-ignores-display-property.html: * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-items.html: * fast/events/key-events-in-editable-gridbox.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-change.html: * fast/repaint/justify-items-legacy-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-change.html: * fast/repaint/justify-self-overflow-change.html: * fast/text-autosizing/cluster-inline-grid-flex-box-expected.html: * fast/text-autosizing/cluster-inline-grid-flex-box.html: * ietestcenter/css3/grid/display-grid-001-expected.htm: * ietestcenter/css3/grid/display-grid-001.htm: * ietestcenter/css3/grid/display-grid-002-expected.htm: * ietestcenter/css3/grid/display-grid-002.htm: * ietestcenter/css3/grid/grid-column-001-expected.htm: * ietestcenter/css3/grid/grid-column-001.htm: * ietestcenter/css3/grid/grid-column-002-expected.htm: * ietestcenter/css3/grid/grid-column-002.htm: * ietestcenter/css3/grid/grid-column-003-expected.htm: * ietestcenter/css3/grid/grid-column-003.htm: * ietestcenter/css3/grid/grid-columns-001-expected.htm: * ietestcenter/css3/grid/grid-columns-001.htm: * ietestcenter/css3/grid/grid-items-001-expected.htm: * ietestcenter/css3/grid/grid-items-001.htm: * ietestcenter/css3/grid/grid-items-002-expected.htm: * ietestcenter/css3/grid/grid-items-002.htm: * ietestcenter/css3/grid/grid-items-003-expected.htm: * ietestcenter/css3/grid/grid-items-003.htm: * ietestcenter/css3/grid/grid-items-004-expected.htm: * ietestcenter/css3/grid/grid-items-004.htm: * ietestcenter/css3/grid/grid-items-005-expected.htm: * ietestcenter/css3/grid/grid-items-005.htm: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/175541@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200510 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-06 08:17:12 +00:00
grid-template-columns: 300px 200px 100px;
grid-template-rows: 150px 100px 50px;
width: 800px;
height: 500px;
}
.gaps {
[css-grid] Unprefix CSS Grid Layout properties https://bugs.webkit.org/show_bug.cgi?id=157137 Reviewed by Simon Fraser. Remove "-webkit" prefix from all the grid layout properties, including the display value. Update the source code to remove the prefix where it was used too. .: * ManualTests/css-grid-layout-item-with-huge-span-crash.html: PerformanceTests: * Layout/auto-grid-lots-of-data.html: * Layout/fixed-grid-lots-of-data.html: * Layout/fixed-grid-lots-of-stretched-data.html: Source/WebCore: * css/CSSComputedStyleDeclaration.cpp: (WebCore::isLayoutDependent): (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): (WebCore::isValidKeywordPropertyAndValue): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseGridGapShorthand): (WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns): (WebCore::CSSParser::parseGridTemplateShorthand): (WebCore::CSSParser::parseGridShorthand): (WebCore::CSSParser::parseGridAreaShorthand): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInitialGridTemplateAreas): (WebCore::StyleBuilderCustom::applyInheritGridTemplateAreas): (WebCore::StyleBuilderCustom::applyValueGridTemplateAreas): (WebCore::StyleBuilderCustom::applyInitialGridTemplateColumns): (WebCore::StyleBuilderCustom::applyInheritGridTemplateColumns): (WebCore::StyleBuilderCustom::applyValueGridTemplateColumns): (WebCore::StyleBuilderCustom::applyInitialGridTemplateRows): (WebCore::StyleBuilderCustom::applyInheritGridTemplateRows): (WebCore::StyleBuilderCustom::applyValueGridTemplateRows): * css/StyleProperties.cpp: (WebCore::StyleProperties::getPropertyValue): Source/WebInspectorUI: * UserInterface/Models/CSSKeywordCompletions.js: Tools: * TestWebKitAPI/Tests/WebCore/CSSParser.cpp: (TestWebKitAPI::TEST): LayoutTests: * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * fast/css-grid-layout/absolute-positioning-definite-sizes.html: * fast/css-grid-layout/absolute-positioning-grid-container-containing-block.html: * fast/css-grid-layout/absolute-positioning-grid-container-parent.html: * fast/css-grid-layout/anonymous-grid-items-expected.html: * fast/css-grid-layout/anonymous-grid-items.html: * fast/css-grid-layout/auto-content-resolution-columns.html: * fast/css-grid-layout/auto-content-resolution-rows.html: * fast/css-grid-layout/breadth-size-resolution-grid.html: * fast/css-grid-layout/calc-resolution-grid-item.html: * fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html: * fast/css-grid-layout/display-grid-set-get-expected.txt: * fast/css-grid-layout/explicit-grid-size.html: * fast/css-grid-layout/flex-and-content-sized-resolution-columns-expected.txt: * fast/css-grid-layout/flex-and-content-sized-resolution-columns.html: * fast/css-grid-layout/flex-and-intrinsic-sizes.html: * fast/css-grid-layout/flex-and-minmax-content-resolution-columns.html: * fast/css-grid-layout/flex-and-minmax-content-resolution-rows.html: * fast/css-grid-layout/flex-content-distribution.html: * fast/css-grid-layout/flex-content-resolution-columns.html: * fast/css-grid-layout/flex-content-resolution-rows.html: * fast/css-grid-layout/flex-content-sized-column-use-available-width.html: * fast/css-grid-layout/flex-content-sized-columns-resize.html: * fast/css-grid-layout/flex-factor-sum-less-than-1.html: * fast/css-grid-layout/float-not-protruding-into-next-grid-item.html: * fast/css-grid-layout/floating-empty-grids.html: * fast/css-grid-layout/grid-align-content-distribution-vertical-lr.html: * fast/css-grid-layout/grid-align-content-distribution-vertical-rl.html: * fast/css-grid-layout/grid-align-content-distribution.html: * fast/css-grid-layout/grid-align-content-vertical-lr.html: * fast/css-grid-layout/grid-align-content-vertical-rl.html: * fast/css-grid-layout/grid-align-content.html: * fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-lr.html: * fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-rl.html: * fast/css-grid-layout/grid-align-justify-margin-border-padding.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css-grid-layout/grid-align-justify-stretch.html: * fast/css-grid-layout/grid-align-stretching-replaced-items.html: * fast/css-grid-layout/grid-align.html: * fast/css-grid-layout/grid-auto-columns-rows-auto-flow-resolution.html: * fast/css-grid-layout/grid-auto-columns-rows-get-set-expected.txt: * fast/css-grid-layout/grid-auto-columns-rows-get-set.html: * fast/css-grid-layout/grid-auto-columns-rows-resolution.html: * fast/css-grid-layout/grid-auto-columns-rows-update.html: * fast/css-grid-layout/grid-auto-flow-get-set-expected.txt: * fast/css-grid-layout/grid-auto-flow-get-set.html: * fast/css-grid-layout/grid-auto-flow-resolution.html: * fast/css-grid-layout/grid-auto-flow-sparse.html: * fast/css-grid-layout/grid-auto-flow-update.html: * fast/css-grid-layout/grid-automatic-minimum-for-auto-columns-expected.txt: * fast/css-grid-layout/grid-automatic-minimum-for-auto-columns.html: * fast/css-grid-layout/grid-automatic-minimum-for-auto-rows-expected.txt: * fast/css-grid-layout/grid-automatic-minimum-for-auto-rows.html: * fast/css-grid-layout/grid-columns-rows-get-set-expected.txt: * fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt: * fast/css-grid-layout/grid-columns-rows-get-set-multiple.html: * fast/css-grid-layout/grid-columns-rows-get-set.html: * fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html: * fast/css-grid-layout/grid-container-ignore-first-letter.html: * fast/css-grid-layout/grid-content-alignment-and-self-alignment-spanning.html: * fast/css-grid-layout/grid-content-alignment-and-self-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-content-alignment-stretch-only-valid-for-auto-sized-tracks.html: * fast/css-grid-layout/grid-content-alignment-stretch-with-different-sized-tracks.html: * fast/css-grid-layout/grid-content-alignment-with-span-vertical-lr.html: * fast/css-grid-layout/grid-content-alignment-with-span-vertical-rl.html: * fast/css-grid-layout/grid-content-alignment-with-span.html: * fast/css-grid-layout/grid-content-sized-columns-resolution-expected.txt: * fast/css-grid-layout/grid-content-sized-columns-resolution.html: * fast/css-grid-layout/grid-disable.html: * fast/css-grid-layout/grid-dynamic-updates-relayout.html: * fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt: * fast/css-grid-layout/grid-element-auto-repeat-get-set.html: * fast/css-grid-layout/grid-element-border-grid-item.html: * fast/css-grid-layout/grid-element-border-padding-grid-item.html: * fast/css-grid-layout/grid-element-change-columns-repaint.html: * fast/css-grid-layout/grid-element-change-rows-repaint.html: * fast/css-grid-layout/grid-element-empty-row-column.html: * fast/css-grid-layout/grid-element-min-max-height.html: * fast/css-grid-layout/grid-element-min-max-width.html: * fast/css-grid-layout/grid-element-padding-grid-item.html: * fast/css-grid-layout/grid-element-padding-margin.html: * fast/css-grid-layout/grid-element-repeat-get-set-expected.txt: * fast/css-grid-layout/grid-element-repeat-get-set.html: * fast/css-grid-layout/grid-element-shrink-to-fit.html: * fast/css-grid-layout/grid-grow-tracks-to-their-max-expected.txt: * fast/css-grid-layout/grid-grow-tracks-to-their-max.html: * fast/css-grid-layout/grid-gutters-and-alignment.html: * fast/css-grid-layout/grid-gutters-and-flex-content.html: * fast/css-grid-layout/grid-gutters-and-tracks.html: * fast/css-grid-layout/grid-gutters-get-set-expected.txt: * fast/css-grid-layout/grid-gutters-get-set.html: * fast/css-grid-layout/grid-indefinite-calculated-height-crash-expected.txt: * fast/css-grid-layout/grid-indefinite-calculated-height-crash.html: * fast/css-grid-layout/grid-initialize-span-one-items-expected.txt: * fast/css-grid-layout/grid-initialize-span-one-items.html: * fast/css-grid-layout/grid-item-addition-auto-placement-update.html: * fast/css-grid-layout/grid-item-addition-track-breadth-update.html: * fast/css-grid-layout/grid-item-area-get-set-expected.txt: * fast/css-grid-layout/grid-item-area-get-set.html: * fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-lr.html: * fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-rl.html: * fast/css-grid-layout/grid-item-auto-margins-alignment.html: * fast/css-grid-layout/grid-item-auto-margins-and-stretch.html: * fast/css-grid-layout/grid-item-auto-margins-must-respect-specified-margins.html: * fast/css-grid-layout/grid-item-auto-placement-automatic-span.html: * fast/css-grid-layout/grid-item-auto-placement-definite-span.html: * fast/css-grid-layout/grid-item-auto-placement-fixed-row-column.html: * fast/css-grid-layout/grid-item-auto-sized-align-justify-margin-border-padding.html: * fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html: * fast/css-grid-layout/grid-item-bad-resolution-double-span.html: * fast/css-grid-layout/grid-item-change-column-repaint.html: * fast/css-grid-layout/grid-item-change-row-repaint.html: * fast/css-grid-layout/grid-item-column-row-get-set-expected.txt: * fast/css-grid-layout/grid-item-column-row-get-set.html: * fast/css-grid-layout/grid-item-display.html: * fast/css-grid-layout/grid-item-end-after-get-set-expected.txt: * fast/css-grid-layout/grid-item-end-after-get-set.html: * fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-ltr.html: * fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-rtl.html: * fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-ltr.html: * fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-rtl.html: * fast/css-grid-layout/grid-item-margin-resolution.html: * fast/css-grid-layout/grid-item-margins-not-collapse.html: * fast/css-grid-layout/grid-item-multiple-minmax-content-resolution.html: * fast/css-grid-layout/grid-item-named-grid-area-resolution.html: * fast/css-grid-layout/grid-item-named-grid-line-resolution.html: * fast/css-grid-layout/grid-item-negative-indexes.html: * fast/css-grid-layout/grid-item-negative-integer-explicit-grid-resolution.html: * fast/css-grid-layout/grid-item-negative-position-resolution.html: * fast/css-grid-layout/grid-item-order-auto-flow-resolution.html: * fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution.html: * fast/css-grid-layout/grid-item-order-paint-order.html: * fast/css-grid-layout/grid-item-position-changed-dynamic.html: * fast/css-grid-layout/grid-item-removal-auto-placement-update.html: * fast/css-grid-layout/grid-item-removal-track-breadth-update.html: * fast/css-grid-layout/grid-item-spanning-resolution.html: * fast/css-grid-layout/grid-item-start-before-get-set-expected.txt: * fast/css-grid-layout/grid-item-start-before-get-set.html: * fast/css-grid-layout/grid-item-stretch-with-margins-borders-padding-vertical-lr.html: * fast/css-grid-layout/grid-item-stretch-with-margins-borders-padding-vertical-rl.html: * fast/css-grid-layout/grid-item-stretch-with-margins-borders-padding.html: * fast/css-grid-layout/grid-item-text-background-not-interleaved.html: * fast/css-grid-layout/grid-item-unknown-named-grid-line-resolution.html: * fast/css-grid-layout/grid-item-with-border-in-fr.html: * fast/css-grid-layout/grid-item-with-border-in-intrinsic.html: * fast/css-grid-layout/grid-item-with-percent-height-in-auto-height-grid-resolution.html: * fast/css-grid-layout/grid-item-with-percent-min-max-height-dynamic.html: * fast/css-grid-layout/grid-item-z-index-change-repaint-expected.html: * fast/css-grid-layout/grid-item-z-index-change-repaint.html: * fast/css-grid-layout/grid-item-z-index-stacking-context-expected.html: * fast/css-grid-layout/grid-item-z-index-stacking-context.html: * fast/css-grid-layout/grid-item-z-index-support.html: * fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-width-or-margin-change.html: * fast/css-grid-layout/grid-justify-content-distribution-vertical-lr.html: * fast/css-grid-layout/grid-justify-content-distribution-vertical-rl.html: * fast/css-grid-layout/grid-justify-content-distribution.html: * fast/css-grid-layout/grid-justify-content-vertical-lr.html: * fast/css-grid-layout/grid-justify-content-vertical-rl.html: * fast/css-grid-layout/grid-justify-content.html: * fast/css-grid-layout/grid-percent-track-margin-border-padding.html: * fast/css-grid-layout/grid-percent-track-scrollbar.html: * fast/css-grid-layout/grid-positioned-children-writing-modes.html: * fast/css-grid-layout/grid-positioned-items-background-rtl.html: * fast/css-grid-layout/grid-positioned-items-background.html: * fast/css-grid-layout/grid-positioned-items-content-alignment-rtl.html: * fast/css-grid-layout/grid-positioned-items-content-alignment.html: * fast/css-grid-layout/grid-positioned-items-gaps-rtl.html: * fast/css-grid-layout/grid-positioned-items-gaps.html: * fast/css-grid-layout/grid-positioned-items-implicit-grid-line.html: * fast/css-grid-layout/grid-positioned-items-implicit-grid.html: * fast/css-grid-layout/grid-positioned-items-padding.html: * fast/css-grid-layout/grid-positioned-items-unknown-named-grid-line.html: * fast/css-grid-layout/grid-positioned-items-within-grid-implicit-track.html: * fast/css-grid-layout/grid-preferred-logical-widths.html: * fast/css-grid-layout/grid-repeat-calc-expected.txt: * fast/css-grid-layout/grid-repeat-calc.html: * fast/css-grid-layout/grid-shorthand-computed-style-crash.html: * fast/css-grid-layout/grid-shorthand-get-set-expected.txt: * fast/css-grid-layout/grid-shorthand-get-set.html: * fast/css-grid-layout/grid-sizing-positioned-items.html: * fast/css-grid-layout/grid-strict-ordering-crash.html: * fast/css-grid-layout/grid-template-areas-empty-string-crash.html: * fast/css-grid-layout/grid-template-areas-get-set-expected.txt: * fast/css-grid-layout/grid-template-areas-get-set.html: * fast/css-grid-layout/grid-template-areas-infinite-loop.html: * fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment-expected.txt: * fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment.html: * fast/css-grid-layout/grid-template-shorthand-computed-style-crash.html: * fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt: * fast/css-grid-layout/grid-template-shorthand-get-set.html: * fast/css-grid-layout/grid-update-sizes-after-distributing-all-expected.txt: * fast/css-grid-layout/grid-update-sizes-after-distributing-all.html: * fast/css-grid-layout/grid-was-populated-assert.html: * fast/css-grid-layout/grid-with-relative-font-length-crash.html: * fast/css-grid-layout/implicit-columns-auto-resolution.html: * fast/css-grid-layout/implicit-position-dynamic-change-expected.txt: * fast/css-grid-layout/implicit-position-dynamic-change.html: * fast/css-grid-layout/implicit-rows-auto-resolution.html: * fast/css-grid-layout/implicit-tracks-before-explicit.html: * fast/css-grid-layout/justify-self-cell.html: * fast/css-grid-layout/mark-as-infinitely-growable-expected.txt: * fast/css-grid-layout/mark-as-infinitely-growable.html: * fast/css-grid-layout/maximize-tracks-definite-indefinite-height.html: * fast/css-grid-layout/min-content-row-must-shrink-when-column-grows.html: * fast/css-grid-layout/min-height-border-box.html: * fast/css-grid-layout/min-width-height-auto-and-margins.html: * fast/css-grid-layout/min-width-height-auto-overflow.html: * fast/css-grid-layout/min-width-height-auto.html: * fast/css-grid-layout/min-width-margin-box.html: * fast/css-grid-layout/minmax-fixed-logical-height-only.html: * fast/css-grid-layout/minmax-fixed-logical-width-only.html: * fast/css-grid-layout/minmax-max-content-resolution-columns.html: * fast/css-grid-layout/minmax-max-content-resolution-rows.html: * fast/css-grid-layout/minmax-min-content-column-resolution-columns.html: * fast/css-grid-layout/minmax-min-content-column-resolution-rows.html: * fast/css-grid-layout/minmax-spanning-resolution-columns.html: * fast/css-grid-layout/minmax-spanning-resolution-rows.html: * fast/css-grid-layout/named-grid-line-get-set-expected.txt: * fast/css-grid-layout/named-grid-line-get-set.html: * fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks-expected.txt: * fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html: * fast/css-grid-layout/named-grid-lines-with-named-grid-areas-dynamic-get-set.html: * fast/css-grid-layout/named-grid-lines-with-named-grid-areas-get-set-expected.txt: * fast/css-grid-layout/named-grid-lines-with-named-grid-areas-get-set.html: * fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html: * fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt: * fast/css-grid-layout/non-grid-columns-rows-get-set-multiple-expected.txt: * fast/css-grid-layout/non-grid-columns-rows-get-set-multiple.html: * fast/css-grid-layout/non-grid-columns-rows-get-set.html: * fast/css-grid-layout/non-grid-element-repeat-get-set-expected.txt: * fast/css-grid-layout/non-grid-element-repeat-get-set.html: * fast/css-grid-layout/non-named-grid-line-get-set-expected.txt: * fast/css-grid-layout/non-named-grid-line-get-set.html: * fast/css-grid-layout/percent-grid-item-in-percent-grid-track-in-percent-grid.html: * fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update.html: * fast/css-grid-layout/percent-grid-item-in-percent-grid-track.html: * fast/css-grid-layout/percent-intrinsic-track-breadth.html: * fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html: * fast/css-grid-layout/percent-of-indefinite-track-size-in-minmax-crash.html: * fast/css-grid-layout/percent-of-indefinite-track-size.html: * fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update.html: * fast/css-grid-layout/percent-padding-margin-resolution-grid-item.html: * fast/css-grid-layout/percent-resolution-grid-item.html: * fast/css-grid-layout/percent-track-breadths-regarding-container-size.html: * fast/css-grid-layout/place-cell-by-index.html: * fast/css-grid-layout/positioned-grid-items-should-not-create-implicit-tracks.html: * fast/css-grid-layout/positioned-grid-items-should-not-take-up-space.html: * fast/css-grid-layout/relayout-align-items-changed.html: * fast/css-grid-layout/relayout-align-self-changed.html: * fast/css-grid-layout/relayout-indefinite-heights.html: * fast/css-grid-layout/relayout-justify-items-changed.html: * fast/css-grid-layout/relayout-justify-self-changed.html: * fast/css-grid-layout/resources/display-grid-set-get.js: * fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js: (testInherit): (testInitial): * fast/css-grid-layout/resources/grid-columns-rows-get-set.js: (testInherit): (testInitial): * fast/css-grid-layout/resources/grid-definitions-parsing-utils.js: (testGridTemplatesValues): (checkGridTemplatesSetJSValues): (testGridTemplatesSetBadJSValues): (checkGridAutoFlowSetCSSValue): (checkGridAutoFlowSetJSValue): (testGridAutoDefinitionsValues): (testGridGapDefinitionsValues): * fast/css-grid-layout/resources/grid-item-column-row-parsing-utils.js: (checkColumnRowValues): (window.testColumnRowJSParsing): (window.testColumnRowInvalidJSParsing): (window.testColumnStartRowStartJSParsing): (window.testColumnEndRowEndJSParsing): (setupInheritTest): (setupInitialTest): (window.testColumnRowInheritJSParsing): (window.testStartBeforeInheritJSParsing): (window.testEndAfterInheritJSParsing): (window.testColumnRowInitialJSParsing): (window.testStartBeforeInitialJSParsing): (window.testEndAfterInitialJSParsing): * fast/css-grid-layout/resources/grid-shorthand-parsing-utils.js: (testGridDefinitionsValues): (checkGridDefinitionsSetJSValues): (testGridDefinitionsSetBadJSValues): * fast/css-grid-layout/resources/grid-template-shorthand-parsing-utils.js: (testGridDefinitionsValues): (checkGridDefinitionsSetJSValues): (testGridDefinitionsSetBadJSValues): * fast/css-grid-layout/resources/grid.css: (.grid): (.inline-grid): (.firstRowFirstColumn): (.onlyFirstRowOnlyFirstColumn): (.firstRowSecondColumn): (.onlyFirstRowOnlySecondColumn): (.firstRowThirdColumn): (.firstRowFourthColumn): (.secondRowFirstColumn): (.onlySecondRowOnlyFirstColumn): (.secondRowSecondColumn): (.onlySecondRowOnlySecondColumn): (.endSecondRowEndSecondColumn): (.secondRowThirdColumn): (.secondRowFourthColumn): (.thirdRowFirstColumn): (.thirdRowSecondColumn): (.thirdRowThirdColumn): (.fourthRowFirstColumn): (.fourthRowSecondColumn): (.firstAutoRowSecondAutoColumn): (.autoLastRowAutoLastColumn): (.autoSecondRowAutoFirstColumn): (.firstRowBothColumn): (.secondRowBothColumn): (.bothRowFirstColumn): (.bothRowSecondColumn): (.bothRowBothColumn): (.autoRowAutoColumn): (.firstRowAutoColumn): (.secondRowAutoColumn): (.thirdRowAutoColumn): (.autoRowFirstColumn): (.autoRowSecondColumn): (.autoRowThirdColumn): (.autoRowAutoColumnSpanning2): (.autoRowSpanning2AutoColumn): (.autoRowSpanning2AutoColumnSpanning3): (.autoRowSpanning3AutoColumnSpanning2): (.autoRowFirstColumnSpanning2): (.autoRowSecondColumnSpanning2): (.firstRowSpanning2AutoColumn): (.secondRowSpanning2AutoColumn): (.gridAutoFlowColumnSparse): (.gridAutoFlowColumnDense): (.gridAutoFlowRowSparse): (.gridAutoFlowRowDense): * fast/css-grid-layout/resources/non-grid-columns-rows-get-set-multiple.js: (testInherit): (testInitial): * fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js: (testInherit): (testInitial): * fast/css-grid-layout/should-not-collapse-anonymous-blocks.html: * fast/css-grid-layout/swap-lines-if-start-is-further-endward-than-end-line-expected.html: * fast/css-grid-layout/swap-lines-if-start-is-further-endward-than-end-line.html: * fast/css-grid-layout/tracks-number-greatly-exceeding-available-size-crash.html: * fast/css/auto-min-size.html: * fast/css/first-letter-ignores-display-property.html: * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-items.html: * fast/events/key-events-in-editable-gridbox.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-change.html: * fast/repaint/justify-items-legacy-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-change.html: * fast/repaint/justify-self-overflow-change.html: * fast/text-autosizing/cluster-inline-grid-flex-box-expected.html: * fast/text-autosizing/cluster-inline-grid-flex-box.html: * ietestcenter/css3/grid/display-grid-001-expected.htm: * ietestcenter/css3/grid/display-grid-001.htm: * ietestcenter/css3/grid/display-grid-002-expected.htm: * ietestcenter/css3/grid/display-grid-002.htm: * ietestcenter/css3/grid/grid-column-001-expected.htm: * ietestcenter/css3/grid/grid-column-001.htm: * ietestcenter/css3/grid/grid-column-002-expected.htm: * ietestcenter/css3/grid/grid-column-002.htm: * ietestcenter/css3/grid/grid-column-003-expected.htm: * ietestcenter/css3/grid/grid-column-003.htm: * ietestcenter/css3/grid/grid-columns-001-expected.htm: * ietestcenter/css3/grid/grid-columns-001.htm: * ietestcenter/css3/grid/grid-items-001-expected.htm: * ietestcenter/css3/grid/grid-items-001.htm: * ietestcenter/css3/grid/grid-items-002-expected.htm: * ietestcenter/css3/grid/grid-items-002.htm: * ietestcenter/css3/grid/grid-items-003-expected.htm: * ietestcenter/css3/grid/grid-items-003.htm: * ietestcenter/css3/grid/grid-items-004-expected.htm: * ietestcenter/css3/grid/grid-items-004.htm: * ietestcenter/css3/grid/grid-items-005-expected.htm: * ietestcenter/css3/grid/grid-items-005.htm: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/175541@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200510 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-06 08:17:12 +00:00
grid-gap: 10px 20px;
}
[css-grid] Implement repeat(auto-fit) https://bugs.webkit.org/show_bug.cgi?id=159771 Reviewed by Darin Adler. Source/WebCore: The auto-fit keyword works exactly as the already implemented auto-fill except that all empty tracks collapse (became 0px). Absolutely positioned items do not participate on the layout of the grid so they are not considered (a grid with only absolutely positioned items is considered an empty grid). Whenever a track collapses the gutters on either side do also collapse. When a collapsed track's gutters collapse, they coincide exactly. If one side of a collapsed track does not have a gutter then collapsing its gutters results in no gutter on either "side" of the collapsed track. In practice this means that is not possible to know the gap between 2 consecutive auto repeat tracks without examining some others whenever there are collapsed tracks. Uncommented the auto-fit cases from Mozilla tests. They have to be adapted as the reftest machinery requires all the content to be rendered in the original 800x600 viewport. Tests: fast/css-grid-layout/grid-auto-fit-columns.html fast/css-grid-layout/grid-auto-fit-rows.html fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-1.html fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-2.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForGridTrackList): Use the newly added trackSizesForComputedStyle(). * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeTrackBasedLogicalHeight): (WebCore::RenderGrid::computeTrackSizesForDirection): (WebCore::RenderGrid::isEmptyAutoRepeatTrack): (WebCore::RenderGrid::gridGapForDirection): Returns the gap directly from the style. (WebCore::RenderGrid::guttersSize): Computes the gap between a startLine and an endLine. This method may need to inspect some other surrounding tracks to compute the gap. (WebCore::RenderGrid::computeIntrinsicLogicalWidths): (WebCore::RenderGrid::computeIntrinsicLogicalHeight): (WebCore::RenderGrid::computeUsedBreadthOfGridTracks): (WebCore::RenderGrid::gridTrackSize): (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems): (WebCore::RenderGrid::computeAutoRepeatTracksCount): (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat): Returns a Vector with the auto repeat tracks that are going to be collapsed because they're empty. (WebCore::RenderGrid::placeItemsOnGrid): (WebCore::RenderGrid::trackSizesForComputedStyle): Used by ComputedStyle logic to print the size of tracks. Added in order to hide the actual contents of m_columnPositions and m_rowPositions to the outter world. (WebCore::RenderGrid::offsetAndBreadthForPositionedChild): (WebCore::RenderGrid::gridAreaBreadthForChild): (WebCore::RenderGrid::populateGridPositionsForDirection): Added some extra code to compute gaps as they cannot be directly added between tracks in case of having collapsed tracks. (WebCore::RenderGrid::columnAxisOffsetForChild): (WebCore::RenderGrid::rowAxisOffsetForChild): (WebCore::RenderGrid::offsetBetweenTracks): Deleted. * rendering/RenderGrid.h: Made some API private. Added new required methods/attributes. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForGridTrackList): * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeTrackBasedLogicalHeight): (WebCore::RenderGrid::computeTrackSizesForDirection): (WebCore::RenderGrid::hasAutoRepeatEmptyTracks): (WebCore::RenderGrid::isEmptyAutoRepeatTrack): (WebCore::RenderGrid::gridGapForDirection): (WebCore::RenderGrid::guttersSize): (WebCore::RenderGrid::computeIntrinsicLogicalWidths): (WebCore::RenderGrid::computeIntrinsicLogicalHeight): (WebCore::RenderGrid::computeUsedBreadthOfGridTracks): (WebCore::RenderGrid::gridTrackSize): (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems): (WebCore::RenderGrid::computeAutoRepeatTracksCount): (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat): (WebCore::RenderGrid::placeItemsOnGrid): (WebCore::RenderGrid::trackSizesForComputedStyle): (WebCore::RenderGrid::offsetAndBreadthForPositionedChild): (WebCore::RenderGrid::assumedRowsSizeForOrthogonalChild): (WebCore::RenderGrid::gridAreaBreadthForChild): (WebCore::RenderGrid::populateGridPositionsForDirection): (WebCore::RenderGrid::columnAxisOffsetForChild): (WebCore::RenderGrid::rowAxisOffsetForChild): (WebCore::RenderGrid::offsetBetweenTracks): Deleted. * rendering/RenderGrid.h: LayoutTests: Uncommented the auto-fit cases. Split the Mozilla's 005 test in two because it was not possible to fit all the content in a viewport without scrollbars. * fast/css-grid-layout/grid-auto-fit-columns-expected.txt: Added. * fast/css-grid-layout/grid-auto-fit-columns.html: Added. * fast/css-grid-layout/grid-auto-fit-rows-expected.txt: Added. * fast/css-grid-layout/grid-auto-fit-rows.html: Added. * fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt: * fast/css-grid-layout/grid-element-auto-repeat-get-set.html: * fast/css-grid-layout/grid-only-abspos-item-computed-style-crash-expected.txt: * fast/css-grid-layout/grid-only-abspos-item-computed-style-crash.html: * fast/css-grid-layout/grid-positioned-items-padding-expected.txt: * fast/css-grid-layout/grid-positioned-items-padding.html: * fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment-expected.txt: * fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-001-expected.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-001.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-002-expected.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-002.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-003-expected.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-003.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-004-expected.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-004.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-1-expected.html: Renamed from LayoutTests/fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-expected.html. * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-1.html: Copied from LayoutTests/fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005.html. * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-2-expected.html: Added. * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-2.html: Renamed from LayoutTests/fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005.html. Canonical link: https://commits.webkit.org/178310@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-07-25 08:57:06 +00:00
.autoFit {
grid-template-columns: repeat(auto-fit, 75px);
grid-template-rows: 25px;
}
.width300 { width: 300px; }
.item:first-child { background: lime; }
.item:last-child { background: blue; }
</style>
<div class="grid contentStart" id="gridContentStart"></div>
<div class="grid contentCenter" id="gridContentCenter"></div>
<div class="grid contentEnd" id="gridContentEnd"></div>
<div class="grid contentSpaceBetween" id="gridContentSpaceBetween"></div>
<div class="grid contentSpaceAround" id="gridContentSpaceAround"></div>
<div class="grid contentSpaceEvenly" id="gridContentSpaceEvenly"></div>
<div class="grid contentStretch" id="gridContentStretch"></div>
<div class="grid gaps contentStart" id="gridGapsContentStart"></div>
<div class="grid gaps contentCenter" id="gridGapsContentCenter"></div>
<div class="grid gaps contentEnd" id="gridGapsContentEnd"></div>
<div class="grid gaps contentSpaceBetween" id="gridGapsContentSpaceBetween"></div>
<div class="grid gaps contentSpaceAround" id="gridGapsContentSpaceAround"></div>
<div class="grid gaps contentSpaceEvenly" id="gridGapsContentSpaceEvenly"></div>
<div class="grid gaps contentStretch" id="gridGapsContentStretch"></div>
[css-grid] Implement repeat(auto-fit) https://bugs.webkit.org/show_bug.cgi?id=159771 Reviewed by Darin Adler. Source/WebCore: The auto-fit keyword works exactly as the already implemented auto-fill except that all empty tracks collapse (became 0px). Absolutely positioned items do not participate on the layout of the grid so they are not considered (a grid with only absolutely positioned items is considered an empty grid). Whenever a track collapses the gutters on either side do also collapse. When a collapsed track's gutters collapse, they coincide exactly. If one side of a collapsed track does not have a gutter then collapsing its gutters results in no gutter on either "side" of the collapsed track. In practice this means that is not possible to know the gap between 2 consecutive auto repeat tracks without examining some others whenever there are collapsed tracks. Uncommented the auto-fit cases from Mozilla tests. They have to be adapted as the reftest machinery requires all the content to be rendered in the original 800x600 viewport. Tests: fast/css-grid-layout/grid-auto-fit-columns.html fast/css-grid-layout/grid-auto-fit-rows.html fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-1.html fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-2.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForGridTrackList): Use the newly added trackSizesForComputedStyle(). * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeTrackBasedLogicalHeight): (WebCore::RenderGrid::computeTrackSizesForDirection): (WebCore::RenderGrid::isEmptyAutoRepeatTrack): (WebCore::RenderGrid::gridGapForDirection): Returns the gap directly from the style. (WebCore::RenderGrid::guttersSize): Computes the gap between a startLine and an endLine. This method may need to inspect some other surrounding tracks to compute the gap. (WebCore::RenderGrid::computeIntrinsicLogicalWidths): (WebCore::RenderGrid::computeIntrinsicLogicalHeight): (WebCore::RenderGrid::computeUsedBreadthOfGridTracks): (WebCore::RenderGrid::gridTrackSize): (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems): (WebCore::RenderGrid::computeAutoRepeatTracksCount): (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat): Returns a Vector with the auto repeat tracks that are going to be collapsed because they're empty. (WebCore::RenderGrid::placeItemsOnGrid): (WebCore::RenderGrid::trackSizesForComputedStyle): Used by ComputedStyle logic to print the size of tracks. Added in order to hide the actual contents of m_columnPositions and m_rowPositions to the outter world. (WebCore::RenderGrid::offsetAndBreadthForPositionedChild): (WebCore::RenderGrid::gridAreaBreadthForChild): (WebCore::RenderGrid::populateGridPositionsForDirection): Added some extra code to compute gaps as they cannot be directly added between tracks in case of having collapsed tracks. (WebCore::RenderGrid::columnAxisOffsetForChild): (WebCore::RenderGrid::rowAxisOffsetForChild): (WebCore::RenderGrid::offsetBetweenTracks): Deleted. * rendering/RenderGrid.h: Made some API private. Added new required methods/attributes. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForGridTrackList): * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeTrackBasedLogicalHeight): (WebCore::RenderGrid::computeTrackSizesForDirection): (WebCore::RenderGrid::hasAutoRepeatEmptyTracks): (WebCore::RenderGrid::isEmptyAutoRepeatTrack): (WebCore::RenderGrid::gridGapForDirection): (WebCore::RenderGrid::guttersSize): (WebCore::RenderGrid::computeIntrinsicLogicalWidths): (WebCore::RenderGrid::computeIntrinsicLogicalHeight): (WebCore::RenderGrid::computeUsedBreadthOfGridTracks): (WebCore::RenderGrid::gridTrackSize): (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems): (WebCore::RenderGrid::computeAutoRepeatTracksCount): (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat): (WebCore::RenderGrid::placeItemsOnGrid): (WebCore::RenderGrid::trackSizesForComputedStyle): (WebCore::RenderGrid::offsetAndBreadthForPositionedChild): (WebCore::RenderGrid::assumedRowsSizeForOrthogonalChild): (WebCore::RenderGrid::gridAreaBreadthForChild): (WebCore::RenderGrid::populateGridPositionsForDirection): (WebCore::RenderGrid::columnAxisOffsetForChild): (WebCore::RenderGrid::rowAxisOffsetForChild): (WebCore::RenderGrid::offsetBetweenTracks): Deleted. * rendering/RenderGrid.h: LayoutTests: Uncommented the auto-fit cases. Split the Mozilla's 005 test in two because it was not possible to fit all the content in a viewport without scrollbars. * fast/css-grid-layout/grid-auto-fit-columns-expected.txt: Added. * fast/css-grid-layout/grid-auto-fit-columns.html: Added. * fast/css-grid-layout/grid-auto-fit-rows-expected.txt: Added. * fast/css-grid-layout/grid-auto-fit-rows.html: Added. * fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt: * fast/css-grid-layout/grid-element-auto-repeat-get-set.html: * fast/css-grid-layout/grid-only-abspos-item-computed-style-crash-expected.txt: * fast/css-grid-layout/grid-only-abspos-item-computed-style-crash.html: * fast/css-grid-layout/grid-positioned-items-padding-expected.txt: * fast/css-grid-layout/grid-positioned-items-padding.html: * fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment-expected.txt: * fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-001-expected.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-001.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-002-expected.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-002.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-003-expected.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-003.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-004-expected.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-004.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-1-expected.html: Renamed from LayoutTests/fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-expected.html. * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-1.html: Copied from LayoutTests/fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005.html. * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-2-expected.html: Added. * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-2.html: Renamed from LayoutTests/fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005.html. Canonical link: https://commits.webkit.org/178310@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-07-25 08:57:06 +00:00
<div class="grid gaps width300 autoFit" id="gridAutoFitEmpty"></div>
<div class="grid gaps width300 autoFit" id="gridAutoFitFirstColumnChild"><div class="item"></div></div>
<div class="grid gaps width300 autoFit" id="gridAutoFitSecondColumnChild"><div class="item" style="grid-column: 2"></div></div>
<div class="grid gaps width300 autoFit" id="gridAutoFitThirdColumnChild"><div class="item" style="grid-column: 3"></div></div>
<div class="grid gaps width300 autoFit" id="gridAutoFitTwoConsecutiveChildren"><div class="item"></div><div class="item"></div></div>
<div class="grid gaps width300 autoFit" id="gridAutoFitTwoConsecutiveChildrenTwo">
<div class="item" style="grid-column: 2"></div><div class="item"></div>
</div>
<div class="grid gaps width300 autoFit" id="gridAutoFitTwoAlternatingChildren">
<div class="item"></div><div class="item" style="grid-column: 3"></div>
</div>
<script src="../../resources/js-test.js"></script>
<script src="resources/grid-definitions-parsing-utils.js"></script>
<script>
description("Test that computed style for grid-template-columns and grid-template-rows works as expected with content alignment and gaps.");
testGridTemplatesValues(document.getElementById("gridContentStart"), "300px 200px 100px", "150px 100px 50px");
testGridTemplatesValues(document.getElementById("gridContentCenter"), "300px 200px 100px", "150px 100px 50px");
testGridTemplatesValues(document.getElementById("gridContentEnd"), "300px 200px 100px", "150px 100px 50px");
testGridTemplatesValues(document.getElementById("gridContentSpaceBetween"), "300px 200px 100px", "150px 100px 50px");
testGridTemplatesValues(document.getElementById("gridContentSpaceAround"), "300px 200px 100px", "150px 100px 50px");
testGridTemplatesValues(document.getElementById("gridContentSpaceEvenly"), "300px 200px 100px", "150px 100px 50px");
testGridTemplatesValues(document.getElementById("gridContentStretch"), "300px 200px 100px", "150px 100px 50px");
testGridTemplatesValues(document.getElementById("gridGapsContentStart"), "300px 200px 100px", "150px 100px 50px");
testGridTemplatesValues(document.getElementById("gridGapsContentCenter"), "300px 200px 100px", "150px 100px 50px");
testGridTemplatesValues(document.getElementById("gridGapsContentEnd"), "300px 200px 100px", "150px 100px 50px");
testGridTemplatesValues(document.getElementById("gridGapsContentSpaceBetween"), "300px 200px 100px", "150px 100px 50px");
testGridTemplatesValues(document.getElementById("gridGapsContentSpaceAround"), "300px 200px 100px", "150px 100px 50px");
testGridTemplatesValues(document.getElementById("gridGapsContentSpaceEvenly"), "300px 200px 100px", "150px 100px 50px");
testGridTemplatesValues(document.getElementById("gridGapsContentStretch"), "300px 200px 100px", "150px 100px 50px");
[css-grid] Implement repeat(auto-fit) https://bugs.webkit.org/show_bug.cgi?id=159771 Reviewed by Darin Adler. Source/WebCore: The auto-fit keyword works exactly as the already implemented auto-fill except that all empty tracks collapse (became 0px). Absolutely positioned items do not participate on the layout of the grid so they are not considered (a grid with only absolutely positioned items is considered an empty grid). Whenever a track collapses the gutters on either side do also collapse. When a collapsed track's gutters collapse, they coincide exactly. If one side of a collapsed track does not have a gutter then collapsing its gutters results in no gutter on either "side" of the collapsed track. In practice this means that is not possible to know the gap between 2 consecutive auto repeat tracks without examining some others whenever there are collapsed tracks. Uncommented the auto-fit cases from Mozilla tests. They have to be adapted as the reftest machinery requires all the content to be rendered in the original 800x600 viewport. Tests: fast/css-grid-layout/grid-auto-fit-columns.html fast/css-grid-layout/grid-auto-fit-rows.html fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-1.html fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-2.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForGridTrackList): Use the newly added trackSizesForComputedStyle(). * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeTrackBasedLogicalHeight): (WebCore::RenderGrid::computeTrackSizesForDirection): (WebCore::RenderGrid::isEmptyAutoRepeatTrack): (WebCore::RenderGrid::gridGapForDirection): Returns the gap directly from the style. (WebCore::RenderGrid::guttersSize): Computes the gap between a startLine and an endLine. This method may need to inspect some other surrounding tracks to compute the gap. (WebCore::RenderGrid::computeIntrinsicLogicalWidths): (WebCore::RenderGrid::computeIntrinsicLogicalHeight): (WebCore::RenderGrid::computeUsedBreadthOfGridTracks): (WebCore::RenderGrid::gridTrackSize): (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems): (WebCore::RenderGrid::computeAutoRepeatTracksCount): (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat): Returns a Vector with the auto repeat tracks that are going to be collapsed because they're empty. (WebCore::RenderGrid::placeItemsOnGrid): (WebCore::RenderGrid::trackSizesForComputedStyle): Used by ComputedStyle logic to print the size of tracks. Added in order to hide the actual contents of m_columnPositions and m_rowPositions to the outter world. (WebCore::RenderGrid::offsetAndBreadthForPositionedChild): (WebCore::RenderGrid::gridAreaBreadthForChild): (WebCore::RenderGrid::populateGridPositionsForDirection): Added some extra code to compute gaps as they cannot be directly added between tracks in case of having collapsed tracks. (WebCore::RenderGrid::columnAxisOffsetForChild): (WebCore::RenderGrid::rowAxisOffsetForChild): (WebCore::RenderGrid::offsetBetweenTracks): Deleted. * rendering/RenderGrid.h: Made some API private. Added new required methods/attributes. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForGridTrackList): * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeTrackBasedLogicalHeight): (WebCore::RenderGrid::computeTrackSizesForDirection): (WebCore::RenderGrid::hasAutoRepeatEmptyTracks): (WebCore::RenderGrid::isEmptyAutoRepeatTrack): (WebCore::RenderGrid::gridGapForDirection): (WebCore::RenderGrid::guttersSize): (WebCore::RenderGrid::computeIntrinsicLogicalWidths): (WebCore::RenderGrid::computeIntrinsicLogicalHeight): (WebCore::RenderGrid::computeUsedBreadthOfGridTracks): (WebCore::RenderGrid::gridTrackSize): (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems): (WebCore::RenderGrid::computeAutoRepeatTracksCount): (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat): (WebCore::RenderGrid::placeItemsOnGrid): (WebCore::RenderGrid::trackSizesForComputedStyle): (WebCore::RenderGrid::offsetAndBreadthForPositionedChild): (WebCore::RenderGrid::assumedRowsSizeForOrthogonalChild): (WebCore::RenderGrid::gridAreaBreadthForChild): (WebCore::RenderGrid::populateGridPositionsForDirection): (WebCore::RenderGrid::columnAxisOffsetForChild): (WebCore::RenderGrid::rowAxisOffsetForChild): (WebCore::RenderGrid::offsetBetweenTracks): Deleted. * rendering/RenderGrid.h: LayoutTests: Uncommented the auto-fit cases. Split the Mozilla's 005 test in two because it was not possible to fit all the content in a viewport without scrollbars. * fast/css-grid-layout/grid-auto-fit-columns-expected.txt: Added. * fast/css-grid-layout/grid-auto-fit-columns.html: Added. * fast/css-grid-layout/grid-auto-fit-rows-expected.txt: Added. * fast/css-grid-layout/grid-auto-fit-rows.html: Added. * fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt: * fast/css-grid-layout/grid-element-auto-repeat-get-set.html: * fast/css-grid-layout/grid-only-abspos-item-computed-style-crash-expected.txt: * fast/css-grid-layout/grid-only-abspos-item-computed-style-crash.html: * fast/css-grid-layout/grid-positioned-items-padding-expected.txt: * fast/css-grid-layout/grid-positioned-items-padding.html: * fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment-expected.txt: * fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-001-expected.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-001.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-002-expected.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-002.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-003-expected.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-003.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-004-expected.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-004.html: * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-1-expected.html: Renamed from LayoutTests/fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-expected.html. * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-1.html: Copied from LayoutTests/fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005.html. * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-2-expected.html: Added. * fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-2.html: Renamed from LayoutTests/fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005.html. Canonical link: https://commits.webkit.org/178310@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-07-25 08:57:06 +00:00
function testGapsAlignmentWithAutoFit(id, expectedColumns, expectedRows) {
var element = document.getElementById(id);
var alignmentClasses = [ '', 'contentStart', 'contentCenter', 'contentEnd', 'contentSpaceAround', 'contentSpaceBetween', 'contentSpaceEvenly', 'contentStretch'];
for (alignmentClass in alignmentClasses) {
var originalClassName = element.className;
element.className += " " + alignmentClass;
testGridTemplatesValues(element, expectedColumns, expectedRows);
element.className = originalClassName;
}
}
testGapsAlignmentWithAutoFit('gridAutoFitEmpty', "0px 0px 0px", "25px");
testGapsAlignmentWithAutoFit("gridAutoFitFirstColumnChild", "75px 0px 0px", "25px");
testGapsAlignmentWithAutoFit("gridAutoFitSecondColumnChild", "0px 75px 0px", "25px");
testGapsAlignmentWithAutoFit("gridAutoFitThirdColumnChild", "0px 0px 75px", "25px");
testGapsAlignmentWithAutoFit("gridAutoFitTwoConsecutiveChildren", "75px 75px 0px", "25px");
testGapsAlignmentWithAutoFit("gridAutoFitTwoConsecutiveChildrenTwo", "0px 75px 75px", "25px");
testGapsAlignmentWithAutoFit("gridAutoFitTwoAlternatingChildren", "75px 0px 75px", "25px");
</script>