Unprefix -webkit-min-content, -webkit-max-content and -webkit-fit-content
authorrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Mar 2017 11:44:45 +0000 (11:44 +0000)
committerrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Mar 2017 11:44:45 +0000 (11:44 +0000)
commitc0046a7f560c4e86fc98153920954c3e731b4c61
tree3e8fe8cb5df64e61a1b910446e2256ecd2535920
parent64593512bc01cb659f7a8bbd547bdd90097efb5d
Unprefix -webkit-min-content, -webkit-max-content and -webkit-fit-content
https://bugs.webkit.org/show_bug.cgi?id=169195

Reviewed by Sergio Villar Senin.

Based on Blink r200846 by <cbiesinger@chromium.org>.
https://src.chromium.org/viewvc/blink?revision=200846&view=revision

Source/WebCore:

This patch adds support for the unprefixed version of these properties,
while it keeps the prefixed ones working too.
-webkit-fill-available is left out of this change, as the CSS WG
is still defining the final keyword and behavior.

With this patch WebKit will be in the same situation than Blink
regarding these intrinsic sizing keywords (see http://crbug.com/245157).

Test: fast/css-intrinsic-dimensions/height-property-value.html
      fast/css-intrinsic-dimensions/width-property-value.html

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::init):
* css/CSSValueKeywords.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertLengthSizing):
(WebCore::StyleBuilderConverter::createGridTrackBreadth):
* css/html.css:
(fieldset):
* css/parser/CSSPropertyParser.cpp:
(WebCore::validWidthOrHeightKeyword):
(WebCore::isGridTrackFixedSized):
(WebCore::consumeGridBreadth):
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):

LayoutTests:

For most of the tests the only change is that we remove the prefix in these properties.
Additionally we're checking the behavior of both the prefixed and unprefixed versions in:
- fast/css-intrinsic-dimensions/height-property-value.html
- fast/css-intrinsic-dimensions/width-property-value.html

On top of that, a few tests from the CSS Grid Layout W3C test suite are now passing.

* TestExpectations:
* css3/flexbox/flexitem.html:
* css3/flexbox/orthogonal-writing-modes-and-intrinsic-sizing-expected.txt: Update results
as tests is now passing (it was using "min-content" already and thus failing on WebKit).
* css3/flexbox/overflow-auto-resizes-correctly.html:
* fast/css-grid-layout/fit-content-columns-expected.html:
* fast/css-grid-layout/fit-content-columns.html:
* fast/css-grid-layout/fit-content-rows-expected.html:
* fast/css-grid-layout/fit-content-rows.html:
* fast/css-grid-layout/flex-and-content-sized-resolution-columns.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/float-not-protruding-into-next-grid-item.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-fill-columns.html:
* fast/css-grid-layout/grid-auto-fill-rows.html:
* fast/css-grid-layout/grid-auto-fit-columns.html:
* fast/css-grid-layout/grid-auto-fit-rows.html:
* fast/css-grid-layout/grid-auto-repeat-intrinsic.html:
* fast/css-grid-layout/grid-automatic-minimum-for-auto-columns.html:
* fast/css-grid-layout/grid-automatic-minimum-for-auto-rows.html:
* fast/css-grid-layout/grid-change-intrinsic-size-with-auto-repeat-tracks.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-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-sized-columns-resolution.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-repeat-get-set.html:
* fast/css-grid-layout/grid-grow-tracks-to-their-max.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.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.html:
* fast/css-grid-layout/grid-intrinsic-maximums.html:
* fast/css-grid-layout/grid-item-addition-track-breadth-update.html:
* fast/css-grid-layout/grid-item-auto-margins-must-respect-specified-margins.html:
* fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution.html:
* fast/css-grid-layout/grid-item-removal-track-breadth-update.html:
* fast/css-grid-layout/grid-item-sizing-with-orthogonal-flows.html:
* fast/css-grid-layout/grid-item-spanning-and-orthogonal-flows.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-preferred-logical-widths.html:
* fast/css-grid-layout/grid-template-shorthand-get-set.html:
* fast/css-grid-layout/grid-update-sizes-after-distributing-all.html:
* fast/css-grid-layout/implicit-position-dynamic-change.html:
* fast/css-grid-layout/mark-as-infinitely-growable.html:
* fast/css-grid-layout/min-content-row-must-shrink-when-column-grows.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/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-named-grid-line-get-set-expected.txt:
* fast/css-grid-layout/non-named-grid-line-get-set.html:
* fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js:
* fast/css-grid-layout/resources/grid-columns-rows-get-set.js:
* fast/css-grid-layout/resources/non-grid-columns-rows-get-set-multiple.js:
* fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js:
* fast/css-intrinsic-dimensions/css-tables.html:
* fast/css-intrinsic-dimensions/height-property-value-expected.txt:
* fast/css-intrinsic-dimensions/height-property-value.html:
* fast/css-intrinsic-dimensions/intrinsic-sized-absolutes.html:
* fast/css-intrinsic-dimensions/intrinsic-sized-blocks.html:
* fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes.html:
* fast/css-intrinsic-dimensions/tables.html:
* fast/css-intrinsic-dimensions/width-property-value-expected.txt:
* fast/css-intrinsic-dimensions/width-property-value.html:
* fast/events/key-events-in-editable-gridbox.html:
* fast/regions/intrinsic-sized-regions.html:
* fast/regions/overflow/overflow-scrollable-fit-complex-expected.html:
* fast/replaced/before-content-intrinsic-crash.html:
* fast/table/assert-on-min-max-content-values.html:
* imported/blink/svg/css/replaced-intrinsic-ratio-min-width-min-content.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
100 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/css3/flexbox/flexitem.html
LayoutTests/css3/flexbox/orthogonal-writing-modes-and-intrinsic-sizing-expected.txt
LayoutTests/css3/flexbox/overflow-auto-resizes-correctly.html
LayoutTests/fast/css-grid-layout/fit-content-columns-expected.html
LayoutTests/fast/css-grid-layout/fit-content-columns.html
LayoutTests/fast/css-grid-layout/fit-content-rows-expected.html
LayoutTests/fast/css-grid-layout/fit-content-rows.html
LayoutTests/fast/css-grid-layout/flex-and-content-sized-resolution-columns.html
LayoutTests/fast/css-grid-layout/flex-and-minmax-content-resolution-columns.html
LayoutTests/fast/css-grid-layout/flex-and-minmax-content-resolution-rows.html
LayoutTests/fast/css-grid-layout/float-not-protruding-into-next-grid-item.html
LayoutTests/fast/css-grid-layout/grid-auto-columns-rows-auto-flow-resolution.html
LayoutTests/fast/css-grid-layout/grid-auto-columns-rows-get-set-expected.txt
LayoutTests/fast/css-grid-layout/grid-auto-columns-rows-get-set.html
LayoutTests/fast/css-grid-layout/grid-auto-columns-rows-resolution.html
LayoutTests/fast/css-grid-layout/grid-auto-columns-rows-update.html
LayoutTests/fast/css-grid-layout/grid-auto-fill-columns.html
LayoutTests/fast/css-grid-layout/grid-auto-fill-rows.html
LayoutTests/fast/css-grid-layout/grid-auto-fit-columns.html
LayoutTests/fast/css-grid-layout/grid-auto-fit-rows.html
LayoutTests/fast/css-grid-layout/grid-auto-repeat-intrinsic.html
LayoutTests/fast/css-grid-layout/grid-automatic-minimum-for-auto-columns.html
LayoutTests/fast/css-grid-layout/grid-automatic-minimum-for-auto-rows.html
LayoutTests/fast/css-grid-layout/grid-change-intrinsic-size-with-auto-repeat-tracks.html
LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt
LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt
LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-multiple.html
LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set.html
LayoutTests/fast/css-grid-layout/grid-content-alignment-overflow.html
LayoutTests/fast/css-grid-layout/grid-content-alignment-stretch-only-valid-for-auto-sized-tracks.html
LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution.html
LayoutTests/fast/css-grid-layout/grid-dynamic-updates-relayout.html
LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt
LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set.html
LayoutTests/fast/css-grid-layout/grid-element-repeat-get-set.html
LayoutTests/fast/css-grid-layout/grid-grow-tracks-to-their-max.html
LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content.html
LayoutTests/fast/css-grid-layout/grid-gutters-and-tracks.html
LayoutTests/fast/css-grid-layout/grid-gutters-get-set.html
LayoutTests/fast/css-grid-layout/grid-indefinite-calculated-height-crash-expected.txt
LayoutTests/fast/css-grid-layout/grid-indefinite-calculated-height-crash.html
LayoutTests/fast/css-grid-layout/grid-initialize-span-one-items.html
LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums.html
LayoutTests/fast/css-grid-layout/grid-item-addition-track-breadth-update.html
LayoutTests/fast/css-grid-layout/grid-item-auto-margins-must-respect-specified-margins.html
LayoutTests/fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution.html
LayoutTests/fast/css-grid-layout/grid-item-removal-track-breadth-update.html
LayoutTests/fast/css-grid-layout/grid-item-sizing-with-orthogonal-flows.html
LayoutTests/fast/css-grid-layout/grid-item-spanning-and-orthogonal-flows.html
LayoutTests/fast/css-grid-layout/grid-item-with-border-in-intrinsic.html
LayoutTests/fast/css-grid-layout/grid-item-with-percent-height-in-auto-height-grid-resolution.html
LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html
LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html
LayoutTests/fast/css-grid-layout/grid-update-sizes-after-distributing-all.html
LayoutTests/fast/css-grid-layout/implicit-position-dynamic-change.html
LayoutTests/fast/css-grid-layout/mark-as-infinitely-growable.html
LayoutTests/fast/css-grid-layout/min-content-row-must-shrink-when-column-grows.html
LayoutTests/fast/css-grid-layout/minmax-max-content-resolution-columns.html
LayoutTests/fast/css-grid-layout/minmax-max-content-resolution-rows.html
LayoutTests/fast/css-grid-layout/minmax-min-content-column-resolution-columns.html
LayoutTests/fast/css-grid-layout/minmax-min-content-column-resolution-rows.html
LayoutTests/fast/css-grid-layout/minmax-spanning-resolution-columns.html
LayoutTests/fast/css-grid-layout/minmax-spanning-resolution-rows.html
LayoutTests/fast/css-grid-layout/named-grid-line-get-set-expected.txt
LayoutTests/fast/css-grid-layout/named-grid-line-get-set.html
LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt
LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-multiple-expected.txt
LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-multiple.html
LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set.html
LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set-expected.txt
LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set.html
LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js
LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js
LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set-multiple.js
LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js
LayoutTests/fast/css-intrinsic-dimensions/css-tables.html
LayoutTests/fast/css-intrinsic-dimensions/height-property-value-expected.txt
LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html
LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-absolutes.html
LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-blocks.html
LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes.html
LayoutTests/fast/css-intrinsic-dimensions/tables.html
LayoutTests/fast/css-intrinsic-dimensions/width-property-value-expected.txt
LayoutTests/fast/css-intrinsic-dimensions/width-property-value.html
LayoutTests/fast/events/key-events-in-editable-gridbox.html
LayoutTests/fast/regions/intrinsic-sized-regions.html
LayoutTests/fast/regions/overflow/overflow-scrollable-fit-complex-expected.html
LayoutTests/fast/replaced/before-content-intrinsic-crash.html
LayoutTests/fast/table/assert-on-min-max-content-values.html
LayoutTests/imported/blink/svg/css/replaced-intrinsic-ratio-min-width-min-content.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/css/StyleBuilderConverter.h
Source/WebCore/css/html.css
Source/WebCore/css/parser/CSSPropertyParser.cpp
Source/WebCore/html/track/TextTrackCueGeneric.cpp
Source/WebCore/html/track/VTTCue.cpp