haikuwebkit/LayoutTests/fast/css-grid-layout/min-height-border-box.html

122 lines
4.3 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 {
border: 5px solid magenta;
margin-bottom: 25px;
[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-rows: minmax(auto, 0px);
}
.item {
font: 25px/1 Ahem;
}
.container { width: 150px; }
[css-grid] Use the margin box for non-auto minimum sizes https://bugs.webkit.org/show_bug.cgi?id=156711 Reviewed by Darin Adler. Source/WebCore: When computing the min-size of items with non-auto minimum height/width we are incorrectly returning the size of the border box, and thus incorrectly ignoring the margins of the item. This is a follow up patch of r199153 were we added the missing border and paddings for heights. Contrary to that, we were not including margins for both axis. This CL requires 3 different interrelated changes: - Add the margins to the min-size returned by minSizeForChild (might require a layout). - Refactor and extract width computations from logicalHeightForChild(); not totally mandatory but pretty logical and helpful. - Use a new update function to isolate the computation of the override width. Test: fast/css-grid-layout/min-width-margin-box.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeInlineDirectionMargins): Added const to a parameter. * rendering/RenderBox.h: * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeTrackSizesForDirection): Initialize the sizingOperation. (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Ditto. (WebCore::RenderGrid::computeIntrinsicLogicalHeight): Ditto. (WebCore::RenderGrid::logicalHeightForChild): Renamed from logicalContentHeightForChild as it no longer returns the content size but the outer size. (WebCore::RenderGrid::minSizeForChild): (WebCore::RenderGrid::updateOverrideContainingBlockContentLogicalWidthForChild): Extracted from logicalHeightForChild(). (WebCore::RenderGrid::minContentForChild): Update override width if needed. (WebCore::RenderGrid::maxContentForChild): Ditto. (WebCore::RenderGrid::computeMarginLogicalSizeForChild): Generalized from computeMarginLogicalHeightForChild(), it can now compute also margins for the inline direction. (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): (WebCore::RenderGrid::logicalContentHeightForChild): Deleted. (WebCore::RenderGrid::computeMarginLogicalHeightForChild): Deleted. * rendering/RenderGrid.h: LayoutTests: * fast/css-grid-layout/min-height-border-box.html: * fast/css-grid-layout/min-width-margin-box-expected.txt: Added. * fast/css-grid-layout/min-width-margin-box.html: Added. Canonical link: https://commits.webkit.org/174863@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-19 15:48:00 +00:00
.borderPaddingMargin {
border-width: 2px 3px 5px 9px;
border-color: blue;
border-style: solid;
padding: 4px 9px 12px 20px;
[css-grid] Use the margin box for non-auto minimum sizes https://bugs.webkit.org/show_bug.cgi?id=156711 Reviewed by Darin Adler. Source/WebCore: When computing the min-size of items with non-auto minimum height/width we are incorrectly returning the size of the border box, and thus incorrectly ignoring the margins of the item. This is a follow up patch of r199153 were we added the missing border and paddings for heights. Contrary to that, we were not including margins for both axis. This CL requires 3 different interrelated changes: - Add the margins to the min-size returned by minSizeForChild (might require a layout). - Refactor and extract width computations from logicalHeightForChild(); not totally mandatory but pretty logical and helpful. - Use a new update function to isolate the computation of the override width. Test: fast/css-grid-layout/min-width-margin-box.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeInlineDirectionMargins): Added const to a parameter. * rendering/RenderBox.h: * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeTrackSizesForDirection): Initialize the sizingOperation. (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Ditto. (WebCore::RenderGrid::computeIntrinsicLogicalHeight): Ditto. (WebCore::RenderGrid::logicalHeightForChild): Renamed from logicalContentHeightForChild as it no longer returns the content size but the outer size. (WebCore::RenderGrid::minSizeForChild): (WebCore::RenderGrid::updateOverrideContainingBlockContentLogicalWidthForChild): Extracted from logicalHeightForChild(). (WebCore::RenderGrid::minContentForChild): Update override width if needed. (WebCore::RenderGrid::maxContentForChild): Ditto. (WebCore::RenderGrid::computeMarginLogicalSizeForChild): Generalized from computeMarginLogicalHeightForChild(), it can now compute also margins for the inline direction. (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): (WebCore::RenderGrid::logicalContentHeightForChild): Deleted. (WebCore::RenderGrid::computeMarginLogicalHeightForChild): Deleted. * rendering/RenderGrid.h: LayoutTests: * fast/css-grid-layout/min-height-border-box.html: * fast/css-grid-layout/min-width-margin-box-expected.txt: Added. * fast/css-grid-layout/min-width-margin-box.html: Added. Canonical link: https://commits.webkit.org/174863@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-19 15:48:00 +00:00
margin: 7px 10px 12px 14px;
}
</style>
<script src="../../resources/check-layout.js"></script>
<body onload="checkLayout('.grid')">
<h3>min-height: auto. grid height: auto</h3>
<div class="container">
[css-grid] Automatic minimum size is not clamped if min track sizing function is auto https://bugs.webkit.org/show_bug.cgi?id=180283 Reviewed by Darin Adler. LayoutTests/imported/w3c: Update expected result in the following WPT tests, as now everything is passing there. * web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-022-expected.txt: * web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-023-expected.txt: Source/WebCore: We were not clamping the automatic minimum size when the min track sizing function was intrinsic (e.g. minmax(auto, 0px)). However the spec (https://drafts.csswg.org/css-grid/#min-size-auto) is very clear regarding that. This patch modifies GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem(), so in the case of a fixed max track sizing function it clamps the automatic minimum size of the item to the stretch fit of the grid area's size. It needs to take into account if the item has fixed size, margin, border and/or padding as those cannot be clamped. Using WPT tests to verify this behavior, and corrected a bunch of other tests that were wrong. Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-017.html imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-022.html imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-023.html * rendering/GridTrackSizingAlgorithm.cpp: (WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem): * rendering/GridTrackSizingAlgorithm.h: (WebCore::GridTrack::growthLimitIsInfinite const): * rendering/style/GridTrackSize.h: (WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes): (WebCore::GridTrackSize::hasFixedMaxTrackBreadth const): LayoutTests: This patch updates a bunch of tests that were wrong to follow the new behavior. * TestExpectations: Now we're passing one WPT test more. * fast/css-grid-layout/min-height-border-box.html: * fast/css-grid-layout/min-width-margin-box.html: * fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html: * fast/css-grid-layout/percent-of-indefinite-track-size.html: Canonical link: https://commits.webkit.org/196591@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-12 07:11:04 +00:00
<div class="grid" data-expected-width="150" data-expected-height="10">
<div class="item" data-expected-width="140" data-expected-height="0">XXXX</div>
</div>
</div>
<div class="container">
[css-grid] Automatic minimum size is not clamped if min track sizing function is auto https://bugs.webkit.org/show_bug.cgi?id=180283 Reviewed by Darin Adler. LayoutTests/imported/w3c: Update expected result in the following WPT tests, as now everything is passing there. * web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-022-expected.txt: * web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-023-expected.txt: Source/WebCore: We were not clamping the automatic minimum size when the min track sizing function was intrinsic (e.g. minmax(auto, 0px)). However the spec (https://drafts.csswg.org/css-grid/#min-size-auto) is very clear regarding that. This patch modifies GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem(), so in the case of a fixed max track sizing function it clamps the automatic minimum size of the item to the stretch fit of the grid area's size. It needs to take into account if the item has fixed size, margin, border and/or padding as those cannot be clamped. Using WPT tests to verify this behavior, and corrected a bunch of other tests that were wrong. Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-017.html imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-022.html imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-023.html * rendering/GridTrackSizingAlgorithm.cpp: (WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem): * rendering/GridTrackSizingAlgorithm.h: (WebCore::GridTrack::growthLimitIsInfinite const): * rendering/style/GridTrackSize.h: (WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes): (WebCore::GridTrackSize::hasFixedMaxTrackBreadth const): LayoutTests: This patch updates a bunch of tests that were wrong to follow the new behavior. * TestExpectations: Now we're passing one WPT test more. * fast/css-grid-layout/min-height-border-box.html: * fast/css-grid-layout/min-width-margin-box.html: * fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html: * fast/css-grid-layout/percent-of-indefinite-track-size.html: Canonical link: https://commits.webkit.org/196591@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-12 07:11:04 +00:00
<div class="grid" data-expected-width="150" data-expected-height="52">
<div class="item borderPaddingMargin" data-expected-width="116" data-expected-height="23">XXX</div>
</div>
</div>
<h3>min-height: 0px. grid height: auto</h3>
<div class="container">
<div class="grid" data-expected-width="150" data-expected-height="10">
<div class="item" style="min-height: 0px;" data-expected-width="140" data-expected-height="0">XXXX</div>
</div>
</div>
<div class="container">
[css-grid] Use the margin box for non-auto minimum sizes https://bugs.webkit.org/show_bug.cgi?id=156711 Reviewed by Darin Adler. Source/WebCore: When computing the min-size of items with non-auto minimum height/width we are incorrectly returning the size of the border box, and thus incorrectly ignoring the margins of the item. This is a follow up patch of r199153 were we added the missing border and paddings for heights. Contrary to that, we were not including margins for both axis. This CL requires 3 different interrelated changes: - Add the margins to the min-size returned by minSizeForChild (might require a layout). - Refactor and extract width computations from logicalHeightForChild(); not totally mandatory but pretty logical and helpful. - Use a new update function to isolate the computation of the override width. Test: fast/css-grid-layout/min-width-margin-box.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeInlineDirectionMargins): Added const to a parameter. * rendering/RenderBox.h: * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeTrackSizesForDirection): Initialize the sizingOperation. (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Ditto. (WebCore::RenderGrid::computeIntrinsicLogicalHeight): Ditto. (WebCore::RenderGrid::logicalHeightForChild): Renamed from logicalContentHeightForChild as it no longer returns the content size but the outer size. (WebCore::RenderGrid::minSizeForChild): (WebCore::RenderGrid::updateOverrideContainingBlockContentLogicalWidthForChild): Extracted from logicalHeightForChild(). (WebCore::RenderGrid::minContentForChild): Update override width if needed. (WebCore::RenderGrid::maxContentForChild): Ditto. (WebCore::RenderGrid::computeMarginLogicalSizeForChild): Generalized from computeMarginLogicalHeightForChild(), it can now compute also margins for the inline direction. (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): (WebCore::RenderGrid::logicalContentHeightForChild): Deleted. (WebCore::RenderGrid::computeMarginLogicalHeightForChild): Deleted. * rendering/RenderGrid.h: LayoutTests: * fast/css-grid-layout/min-height-border-box.html: * fast/css-grid-layout/min-width-margin-box-expected.txt: Added. * fast/css-grid-layout/min-width-margin-box.html: Added. Canonical link: https://commits.webkit.org/174863@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-19 15:48:00 +00:00
<div class="grid" data-expected-width="150" data-expected-height="52">
<div class="item borderPaddingMargin" style="min-height: 0px;" data-expected-width="116" data-expected-height="23">XXX</div>
</div>
</div>
<h3>NO STRETCH min-height: 0px. grid height: auto</h3>
<div class="container">
<div class="grid" data-expected-width="150" data-expected-height="10">
<div class="item alignSelfStart" style="min-height: 0px;" data-expected-width="140" data-expected-height="25">XXXX</div>
</div>
</div>
<div class="container">
[css-grid] Use the margin box for non-auto minimum sizes https://bugs.webkit.org/show_bug.cgi?id=156711 Reviewed by Darin Adler. Source/WebCore: When computing the min-size of items with non-auto minimum height/width we are incorrectly returning the size of the border box, and thus incorrectly ignoring the margins of the item. This is a follow up patch of r199153 were we added the missing border and paddings for heights. Contrary to that, we were not including margins for both axis. This CL requires 3 different interrelated changes: - Add the margins to the min-size returned by minSizeForChild (might require a layout). - Refactor and extract width computations from logicalHeightForChild(); not totally mandatory but pretty logical and helpful. - Use a new update function to isolate the computation of the override width. Test: fast/css-grid-layout/min-width-margin-box.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeInlineDirectionMargins): Added const to a parameter. * rendering/RenderBox.h: * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeTrackSizesForDirection): Initialize the sizingOperation. (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Ditto. (WebCore::RenderGrid::computeIntrinsicLogicalHeight): Ditto. (WebCore::RenderGrid::logicalHeightForChild): Renamed from logicalContentHeightForChild as it no longer returns the content size but the outer size. (WebCore::RenderGrid::minSizeForChild): (WebCore::RenderGrid::updateOverrideContainingBlockContentLogicalWidthForChild): Extracted from logicalHeightForChild(). (WebCore::RenderGrid::minContentForChild): Update override width if needed. (WebCore::RenderGrid::maxContentForChild): Ditto. (WebCore::RenderGrid::computeMarginLogicalSizeForChild): Generalized from computeMarginLogicalHeightForChild(), it can now compute also margins for the inline direction. (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): (WebCore::RenderGrid::logicalContentHeightForChild): Deleted. (WebCore::RenderGrid::computeMarginLogicalHeightForChild): Deleted. * rendering/RenderGrid.h: LayoutTests: * fast/css-grid-layout/min-height-border-box.html: * fast/css-grid-layout/min-width-margin-box-expected.txt: Added. * fast/css-grid-layout/min-width-margin-box.html: Added. Canonical link: https://commits.webkit.org/174863@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-19 15:48:00 +00:00
<div class="grid" data-expected-width="150" data-expected-height="52">
<div class="item alignSelfStart borderPaddingMargin" style="min-height: 0px;" data-expected-width="116" data-expected-height="48">XXX</div>
</div>
</div>
<h3>min-height: 0px. grid height: 15px</h3>
<div class="container">
<div class="grid" style="height: 15px;" data-expected-width="150" data-expected-height="25">
<div class="item" style="min-height: 0px;" data-expected-width="140" data-expected-height="0">XXXX</div>
</div>
</div>
<div class="container">
<div class="grid" style="height: 15px;" data-expected-width="150" data-expected-height="25">
[css-grid] Use the margin box for non-auto minimum sizes https://bugs.webkit.org/show_bug.cgi?id=156711 Reviewed by Darin Adler. Source/WebCore: When computing the min-size of items with non-auto minimum height/width we are incorrectly returning the size of the border box, and thus incorrectly ignoring the margins of the item. This is a follow up patch of r199153 were we added the missing border and paddings for heights. Contrary to that, we were not including margins for both axis. This CL requires 3 different interrelated changes: - Add the margins to the min-size returned by minSizeForChild (might require a layout). - Refactor and extract width computations from logicalHeightForChild(); not totally mandatory but pretty logical and helpful. - Use a new update function to isolate the computation of the override width. Test: fast/css-grid-layout/min-width-margin-box.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeInlineDirectionMargins): Added const to a parameter. * rendering/RenderBox.h: * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeTrackSizesForDirection): Initialize the sizingOperation. (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Ditto. (WebCore::RenderGrid::computeIntrinsicLogicalHeight): Ditto. (WebCore::RenderGrid::logicalHeightForChild): Renamed from logicalContentHeightForChild as it no longer returns the content size but the outer size. (WebCore::RenderGrid::minSizeForChild): (WebCore::RenderGrid::updateOverrideContainingBlockContentLogicalWidthForChild): Extracted from logicalHeightForChild(). (WebCore::RenderGrid::minContentForChild): Update override width if needed. (WebCore::RenderGrid::maxContentForChild): Ditto. (WebCore::RenderGrid::computeMarginLogicalSizeForChild): Generalized from computeMarginLogicalHeightForChild(), it can now compute also margins for the inline direction. (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): (WebCore::RenderGrid::logicalContentHeightForChild): Deleted. (WebCore::RenderGrid::computeMarginLogicalHeightForChild): Deleted. * rendering/RenderGrid.h: LayoutTests: * fast/css-grid-layout/min-height-border-box.html: * fast/css-grid-layout/min-width-margin-box-expected.txt: Added. * fast/css-grid-layout/min-width-margin-box.html: Added. Canonical link: https://commits.webkit.org/174863@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-19 15:48:00 +00:00
<div class="item borderPaddingMargin" style="min-height: 0px;" data-expected-width="116" data-expected-height="23">XXX</div>
</div>
</div>
<h3>NO STRETCH min-height: 0px. grid height: 15px</h3>
<div class="container">
<div class="grid" style="height: 15px;" data-expected-width="150" data-expected-height="25">
<div class="item alignSelfStart" style="min-height: 0px;" data-expected-width="140" data-expected-height="25">XXXX</div>
</div>
</div>
<div class="container">
<div class="grid" style="height: 15px;" data-expected-width="150" data-expected-height="25">
[css-grid] Use the margin box for non-auto minimum sizes https://bugs.webkit.org/show_bug.cgi?id=156711 Reviewed by Darin Adler. Source/WebCore: When computing the min-size of items with non-auto minimum height/width we are incorrectly returning the size of the border box, and thus incorrectly ignoring the margins of the item. This is a follow up patch of r199153 were we added the missing border and paddings for heights. Contrary to that, we were not including margins for both axis. This CL requires 3 different interrelated changes: - Add the margins to the min-size returned by minSizeForChild (might require a layout). - Refactor and extract width computations from logicalHeightForChild(); not totally mandatory but pretty logical and helpful. - Use a new update function to isolate the computation of the override width. Test: fast/css-grid-layout/min-width-margin-box.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeInlineDirectionMargins): Added const to a parameter. * rendering/RenderBox.h: * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeTrackSizesForDirection): Initialize the sizingOperation. (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Ditto. (WebCore::RenderGrid::computeIntrinsicLogicalHeight): Ditto. (WebCore::RenderGrid::logicalHeightForChild): Renamed from logicalContentHeightForChild as it no longer returns the content size but the outer size. (WebCore::RenderGrid::minSizeForChild): (WebCore::RenderGrid::updateOverrideContainingBlockContentLogicalWidthForChild): Extracted from logicalHeightForChild(). (WebCore::RenderGrid::minContentForChild): Update override width if needed. (WebCore::RenderGrid::maxContentForChild): Ditto. (WebCore::RenderGrid::computeMarginLogicalSizeForChild): Generalized from computeMarginLogicalHeightForChild(), it can now compute also margins for the inline direction. (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): (WebCore::RenderGrid::logicalContentHeightForChild): Deleted. (WebCore::RenderGrid::computeMarginLogicalHeightForChild): Deleted. * rendering/RenderGrid.h: LayoutTests: * fast/css-grid-layout/min-height-border-box.html: * fast/css-grid-layout/min-width-margin-box-expected.txt: Added. * fast/css-grid-layout/min-width-margin-box.html: Added. Canonical link: https://commits.webkit.org/174863@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-19 15:48:00 +00:00
<div class="item alignSelfStart borderPaddingMargin" style="min-height: 0px;" data-expected-width="116" data-expected-height="48">XXX</div>
</div>
</div>
<h3>min-height: 30px. grid height: auto</h3>
<div class="container">
<div class="grid" data-expected-width="150" data-expected-height="40">
<div class="item" style="min-height: 30px;" data-expected-width="140" data-expected-height="30">XXXX</div>
</div>
</div>
<div class="container">
[css-grid] Use the margin box for non-auto minimum sizes https://bugs.webkit.org/show_bug.cgi?id=156711 Reviewed by Darin Adler. Source/WebCore: When computing the min-size of items with non-auto minimum height/width we are incorrectly returning the size of the border box, and thus incorrectly ignoring the margins of the item. This is a follow up patch of r199153 were we added the missing border and paddings for heights. Contrary to that, we were not including margins for both axis. This CL requires 3 different interrelated changes: - Add the margins to the min-size returned by minSizeForChild (might require a layout). - Refactor and extract width computations from logicalHeightForChild(); not totally mandatory but pretty logical and helpful. - Use a new update function to isolate the computation of the override width. Test: fast/css-grid-layout/min-width-margin-box.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeInlineDirectionMargins): Added const to a parameter. * rendering/RenderBox.h: * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeTrackSizesForDirection): Initialize the sizingOperation. (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Ditto. (WebCore::RenderGrid::computeIntrinsicLogicalHeight): Ditto. (WebCore::RenderGrid::logicalHeightForChild): Renamed from logicalContentHeightForChild as it no longer returns the content size but the outer size. (WebCore::RenderGrid::minSizeForChild): (WebCore::RenderGrid::updateOverrideContainingBlockContentLogicalWidthForChild): Extracted from logicalHeightForChild(). (WebCore::RenderGrid::minContentForChild): Update override width if needed. (WebCore::RenderGrid::maxContentForChild): Ditto. (WebCore::RenderGrid::computeMarginLogicalSizeForChild): Generalized from computeMarginLogicalHeightForChild(), it can now compute also margins for the inline direction. (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): (WebCore::RenderGrid::logicalContentHeightForChild): Deleted. (WebCore::RenderGrid::computeMarginLogicalHeightForChild): Deleted. * rendering/RenderGrid.h: LayoutTests: * fast/css-grid-layout/min-height-border-box.html: * fast/css-grid-layout/min-width-margin-box-expected.txt: Added. * fast/css-grid-layout/min-width-margin-box.html: Added. Canonical link: https://commits.webkit.org/174863@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-19 15:48:00 +00:00
<div class="grid" data-expected-width="150" data-expected-height="82">
<div class="item borderPaddingMargin" style="min-height: 30px;" data-expected-width="116" data-expected-height="53">XXX</div>
</div>
</div>
<h3>NO STRETCH min-height: 30px. grid height: auto</h3>
<div class="container">
<div class="grid" data-expected-width="150" data-expected-height="40">
<div class="item alignSelfStart" style="min-height: 30px;" data-expected-width="140" data-expected-height="30">XXXX</div>
</div>
</div>
<div class="container">
[css-grid] Use the margin box for non-auto minimum sizes https://bugs.webkit.org/show_bug.cgi?id=156711 Reviewed by Darin Adler. Source/WebCore: When computing the min-size of items with non-auto minimum height/width we are incorrectly returning the size of the border box, and thus incorrectly ignoring the margins of the item. This is a follow up patch of r199153 were we added the missing border and paddings for heights. Contrary to that, we were not including margins for both axis. This CL requires 3 different interrelated changes: - Add the margins to the min-size returned by minSizeForChild (might require a layout). - Refactor and extract width computations from logicalHeightForChild(); not totally mandatory but pretty logical and helpful. - Use a new update function to isolate the computation of the override width. Test: fast/css-grid-layout/min-width-margin-box.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeInlineDirectionMargins): Added const to a parameter. * rendering/RenderBox.h: * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeTrackSizesForDirection): Initialize the sizingOperation. (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Ditto. (WebCore::RenderGrid::computeIntrinsicLogicalHeight): Ditto. (WebCore::RenderGrid::logicalHeightForChild): Renamed from logicalContentHeightForChild as it no longer returns the content size but the outer size. (WebCore::RenderGrid::minSizeForChild): (WebCore::RenderGrid::updateOverrideContainingBlockContentLogicalWidthForChild): Extracted from logicalHeightForChild(). (WebCore::RenderGrid::minContentForChild): Update override width if needed. (WebCore::RenderGrid::maxContentForChild): Ditto. (WebCore::RenderGrid::computeMarginLogicalSizeForChild): Generalized from computeMarginLogicalHeightForChild(), it can now compute also margins for the inline direction. (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): (WebCore::RenderGrid::logicalContentHeightForChild): Deleted. (WebCore::RenderGrid::computeMarginLogicalHeightForChild): Deleted. * rendering/RenderGrid.h: LayoutTests: * fast/css-grid-layout/min-height-border-box.html: * fast/css-grid-layout/min-width-margin-box-expected.txt: Added. * fast/css-grid-layout/min-width-margin-box.html: Added. Canonical link: https://commits.webkit.org/174863@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-19 15:48:00 +00:00
<div class="grid" data-expected-width="150" data-expected-height="82">
<div class="item alignSelfStart borderPaddingMargin" style="min-height: 30px;" data-expected-width="116" data-expected-height="53">XXX</div>
</div>
</div>
</body>