2015-05-05 15:15:38 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<style>
|
|
|
|
#alignContentAuto {
|
|
|
|
align-content: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentBaseline {
|
|
|
|
align-content: baseline;
|
|
|
|
}
|
|
|
|
|
2017-03-30 21:27:09 +00:00
|
|
|
#alignContentFirstBaseline {
|
|
|
|
align-content: first baseline;
|
|
|
|
}
|
|
|
|
|
2015-05-05 15:15:38 +00:00
|
|
|
#alignContentLastBaseline {
|
2017-03-30 21:27:09 +00:00
|
|
|
align-content: last baseline;
|
2015-05-05 15:15:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentSpaceBetween {
|
|
|
|
align-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentSpaceAround {
|
|
|
|
align-content: space-around;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentSpaceEvenly {
|
|
|
|
align-content: space-evenly;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentStretch {
|
|
|
|
align-content: stretch;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentStart {
|
|
|
|
align-content: start;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentEnd {
|
|
|
|
align-content: end;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentCenter {
|
|
|
|
align-content: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#alignContentFlexStart {
|
|
|
|
align-content: flex-start;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentFlexEnd {
|
|
|
|
align-content: flex-end;
|
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignContentUnsafeEnd {
|
|
|
|
align-content: unsafe end ;
|
2015-05-05 15:15:38 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignContentUnsafeCenter {
|
|
|
|
align-content: unsafe center ;
|
2015-05-05 15:15:38 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignContentUnsafeFlexStart {
|
|
|
|
align-content: unsafe flex-start;
|
2015-05-05 15:15:38 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignContentSafeFlexEnd {
|
|
|
|
align-content: safe flex-end;
|
2015-05-05 15:15:38 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
<!-- Invalid CSS cases -->
|
2015-05-05 15:15:38 +00:00
|
|
|
#alignContentSpaceBetweenLeft {
|
|
|
|
align-content: space-between left;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentSpaceAroundCenter {
|
|
|
|
align-content: space-around center;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentSpaceEvenlyRight {
|
|
|
|
align-content: space-evenly right;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentStretchStartSafe {
|
|
|
|
align-content: stretch start safe;
|
|
|
|
}
|
|
|
|
|
2015-12-15 12:11:56 +00:00
|
|
|
#alignContentSpaceAroundEndUnsafe {
|
|
|
|
align-content: space-around end unsafe;
|
2015-05-05 15:15:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentSpaceEvenlyFlexStartSafe {
|
|
|
|
align-content: space-evenly flex-start safe;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentSpaceBetweenSafe {
|
|
|
|
align-content: space-between safe;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentSpaceBetweenStretch {
|
|
|
|
align-content: space-between stretch;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentSafe {
|
|
|
|
align-content: safe;
|
|
|
|
}
|
|
|
|
|
2015-12-15 12:11:56 +00:00
|
|
|
#alignContentRightSafeUnsafe {
|
|
|
|
align-content: right safe unsafe;
|
2015-05-05 15:15:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignContentCenterLeft {
|
|
|
|
align-content: center left;
|
|
|
|
}
|
|
|
|
</style>
|
2017-03-30 21:27:09 +00:00
|
|
|
<p>Test that setting and getting align-content works as expected</p>
|
2015-05-05 15:15:38 +00:00
|
|
|
<div id="alignContentAuto"></div>
|
|
|
|
<div id="alignContentBaseline"></div>
|
2017-03-30 21:27:09 +00:00
|
|
|
<div id="alignContentFirstBaseline"></div>
|
2015-05-05 15:15:38 +00:00
|
|
|
<div id="alignContentLastBaseline"></div>
|
|
|
|
<div id="alignContentSpaceBetween"></div>
|
|
|
|
<div id="alignContentSpaceAround"></div>
|
|
|
|
<div id="alignContentSpaceEvenly"></div>
|
|
|
|
<div id="alignContentStretch"></div>
|
|
|
|
<div id="alignContentStart"></div>
|
|
|
|
<div id="alignContentEnd"></div>
|
|
|
|
<div id="alignContentCenter"></div>
|
|
|
|
<div id="alignContentFlexStart"></div>
|
|
|
|
<div id="alignContentFlexEnd"></div>
|
2018-01-22 17:01:51 +00:00
|
|
|
<div id="alignContentUnsafeEnd"></div>
|
|
|
|
<div id="alignContentUnsafeCenter"></div>
|
|
|
|
<div id="alignContentSafeSelfEnd"></div>
|
|
|
|
<div id="alignContentSafeSelfStart"></div>
|
|
|
|
<div id="alignContentUnsafeFlexStart"></div>
|
|
|
|
<div id="alignContentSafeFlexEnd"></div>
|
2015-12-15 12:11:56 +00:00
|
|
|
<div id="alignContentEndUnsafe"></div>
|
|
|
|
<div id="alignContentCenterUnsafe"></div>
|
|
|
|
<div id="alignContentFlexStartUnsafe"></div>
|
2015-05-05 15:15:38 +00:00
|
|
|
<div id="alignContentFlexEndSafe"></div>
|
2018-01-22 17:01:51 +00:00
|
|
|
|
2015-05-05 15:15:38 +00:00
|
|
|
<div id="alignContentSpaceBetweenLeft"></div>
|
|
|
|
<div id="alignContentSpaceAroundCenter"></div>
|
|
|
|
<div id="alignContentSpaceEvenlyRight"></div>
|
|
|
|
<div id="alignContentStretchStartSafe"></div>
|
2015-12-15 12:11:56 +00:00
|
|
|
<div id="alignContentSpaceAroundEndUnsafe"></div>
|
2015-05-05 15:15:38 +00:00
|
|
|
<div id="alignContentSpaceEvenlyFlexStartSafe"></div>
|
|
|
|
<div id="alignContentSpaceBetweenSafe"></div>
|
|
|
|
<div id="alignContentSpaceBetweenStretch"></div>
|
|
|
|
<div id="alignContentSafe"></div>
|
2015-12-15 12:11:56 +00:00
|
|
|
<div id="alignContentRightSafeUnsafe"></div>
|
2015-05-05 15:15:38 +00:00
|
|
|
<div id="alignContentCenterLeft"></div>
|
|
|
|
|
2017-03-30 21:27:09 +00:00
|
|
|
<script src="../resources/testharness.js"></script>
|
|
|
|
<script src="../resources/testharnessreport.js"></script>
|
|
|
|
<script src="resources/alignment-parsing-utils-th.js"></script>
|
2015-05-05 15:15:38 +00:00
|
|
|
<script>
|
2017-03-30 21:27:09 +00:00
|
|
|
test(function() {
|
|
|
|
var alignContentAuto = document.getElementById("alignContentAuto");
|
|
|
|
checkValues(alignContentAuto, "alignContent", "align-content", "", "normal");
|
|
|
|
var alignContentBaseline = document.getElementById("alignContentBaseline");
|
|
|
|
checkValues(alignContentBaseline, "alignContent", "align-content", "", "baseline");
|
|
|
|
var alignContentLastBaseline = document.getElementById("alignContentFirstBaseline");
|
|
|
|
checkValues(alignContentLastBaseline, "alignContent", "align-content", "", "baseline");
|
|
|
|
var alignContentLastBaseline = document.getElementById("alignContentLastBaseline");
|
|
|
|
checkValues(alignContentLastBaseline, "alignContent", "align-content", "", "last baseline");
|
|
|
|
var alignContentSpaceBetween = document.getElementById("alignContentSpaceBetween");
|
|
|
|
checkValues(alignContentSpaceBetween, "alignContent", "align-content", "", "space-between");
|
|
|
|
var alignContentSpaceAround = document.getElementById("alignContentSpaceAround");
|
|
|
|
checkValues(alignContentSpaceAround, "alignContent", "align-content", "", "space-around");
|
|
|
|
var alignContentSpaceEvenly = document.getElementById("alignContentSpaceEvenly");
|
|
|
|
checkValues(alignContentSpaceEvenly, "alignContent", "align-content", "", "space-evenly");
|
|
|
|
var alignContentStretch = document.getElementById("alignContentStretch");
|
|
|
|
checkValues(alignContentStretch, "alignContent", "align-content", "", "stretch");
|
|
|
|
var alignContentStart = document.getElementById("alignContentStart");
|
|
|
|
checkValues(alignContentStart, "alignContent", "align-content", "", "start");
|
|
|
|
var alignContentEnd = document.getElementById("alignContentEnd");
|
|
|
|
checkValues(alignContentEnd, "alignContent", "align-content", "", "end");
|
|
|
|
var alignContentCenter = document.getElementById("alignContentCenter");
|
|
|
|
checkValues(alignContentCenter, "alignContent", "align-content", "", "center");
|
|
|
|
var alignContentFlexStart = document.getElementById("alignContentFlexStart");
|
|
|
|
checkValues(alignContentFlexStart, "alignContent", "align-content", "", "flex-start");
|
|
|
|
var alignContentFlexEnd = document.getElementById("alignContentFlexEnd");
|
|
|
|
checkValues(alignContentFlexEnd, "alignContent", "align-content", "", "flex-end");
|
2018-01-22 17:01:51 +00:00
|
|
|
var alignContentUnsafeEnd = document.getElementById("alignContentUnsafeEnd");
|
|
|
|
checkValues(alignContentUnsafeEnd, "alignContent", "align-content", "", "unsafe end");
|
|
|
|
var alignContentUnsafeCenter = document.getElementById("alignContentUnsafeCenter");
|
|
|
|
checkValues(alignContentUnsafeCenter, "alignContent", "align-content", "", "unsafe center");
|
|
|
|
var alignContentUnsafeFlexStart = document.getElementById("alignContentUnsafeFlexStart");
|
|
|
|
checkValues(alignContentUnsafeFlexStart, "alignContent", "align-content", "", "unsafe flex-start");
|
|
|
|
var alignContentSafeFlexEnd = document.getElementById("alignContentSafeFlexEnd");
|
|
|
|
checkValues(alignContentSafeFlexEnd, "alignContent", "align-content", "", "safe flex-end");
|
|
|
|
}, "Test getting align-content values previously set through CSS.");
|
|
|
|
|
|
|
|
test(function() {
|
2017-03-30 21:27:09 +00:00
|
|
|
var alignContentEndUnsafe = document.getElementById("alignContentEndUnsafe");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkValues(alignContentEndUnsafe, "alignContent", "align-content", "", "normal");
|
2017-03-30 21:27:09 +00:00
|
|
|
var alignContentCenterUnsafe = document.getElementById("alignContentCenterUnsafe");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkValues(alignContentCenterUnsafe, "alignContent", "align-content", "", "normal");
|
2017-03-30 21:27:09 +00:00
|
|
|
var alignContentFlexStartUnsafe = document.getElementById("alignContentFlexStartUnsafe");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkValues(alignContentFlexStartUnsafe, "alignContent", "align-content", "", "normal");
|
2017-03-30 21:27:09 +00:00
|
|
|
var alignContentFlexEndSafe = document.getElementById("alignContentFlexEndSafe");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkValues(alignContentFlexEndSafe, "alignContent", "align-content", "", "normal");
|
2017-03-30 21:27:09 +00:00
|
|
|
var alignContentSpaceBetweenLeft = document.getElementById("alignContentSpaceBetweenLeft");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkValues(alignContentSpaceBetweenLeft, "alignContent", "align-content", "", "normal");
|
2017-03-30 21:27:09 +00:00
|
|
|
var alignContentSpaceAroundCenter = document.getElementById("alignContentSpaceAroundCenter");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkValues(alignContentSpaceAroundCenter, "alignContent", "align-content", "", "normal");
|
2017-03-30 21:27:09 +00:00
|
|
|
var alignContentSpaceEvenlyRight = document.getElementById("alignContentSpaceEvenlyRight");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkValues(alignContentSpaceEvenlyRight, "alignContent", "align-content", "", "normal");
|
2017-03-30 21:27:09 +00:00
|
|
|
var alignContentStretchStartSafe = document.getElementById("alignContentStretchStartSafe");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkValues(alignContentStretchStartSafe, "alignContent", "align-content", "", "normal");
|
2017-03-30 21:27:09 +00:00
|
|
|
var alignContentSpaceAroundEndUnsafe = document.getElementById("alignContentSpaceAroundEndUnsafe");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkValues(alignContentSpaceAroundEndUnsafe, "alignContent", "align-content", "", "normal");
|
2017-03-30 21:27:09 +00:00
|
|
|
var alignContentSpaceEvenlyFlexStartSafe = document.getElementById("alignContentSpaceEvenlyFlexStartSafe");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkValues(alignContentSpaceEvenlyFlexStartSafe, "alignContent", "align-content", "", "normal");
|
2017-03-30 21:27:09 +00:00
|
|
|
var alignContentSpaceBetweenSafe = document.getElementById("alignContentSpaceBetweenSafe");
|
|
|
|
checkValues(alignContentSpaceBetweenSafe, "alignContent", "align-content", "", "normal");
|
|
|
|
var alignContentSpaceBetweenStretch = document.getElementById("alignContentSpaceBetweenStretch");
|
|
|
|
checkValues(alignContentSpaceBetweenStretch, "alignContent", "align-content", "", "normal");
|
|
|
|
var alignContentSafe = document.getElementById("alignContentSafe");
|
|
|
|
checkValues(alignContentSafe, "alignContent", "align-content", "", "normal");
|
|
|
|
var alignContentRightSafeUnsafe = document.getElementById("alignContentRightSafeUnsafe");
|
|
|
|
checkValues(alignContentRightSafeUnsafe, "alignContent", "align-content", "", "normal");
|
|
|
|
var alignContentCenterLeft = document.getElementById("alignContentCenterLeft");
|
|
|
|
checkValues(alignContentCenterLeft, "alignContent", "align-content", "", "normal");
|
|
|
|
}, "Test setting invalid values to align-content through CSS.");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
element = document.createElement("div");
|
|
|
|
document.body.appendChild(element);
|
|
|
|
checkValues(element, "alignContent", "align-content", "", "normal");
|
|
|
|
}, "Test initial value of align-content through JS");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
element = document.createElement("div");
|
|
|
|
document.body.appendChild(element);
|
|
|
|
element.style.alignContent = "center";
|
|
|
|
checkValues(element, "alignContent", "align-content", "center", "center");
|
|
|
|
|
|
|
|
element.style.alignContent = "unsafe start";
|
2018-01-22 17:01:51 +00:00
|
|
|
checkValues(element, "alignContent", "align-content", "unsafe start", "unsafe start");
|
2017-03-30 21:27:09 +00:00
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
element.style.alignContent = "safe flex-end";
|
|
|
|
checkValues(element, "alignContent", "align-content", "safe flex-end", "safe flex-end");
|
2017-03-30 21:27:09 +00:00
|
|
|
|
[css-align] 'left' and 'right' should parse as invalid in block/cross-axis alignment
https://bugs.webkit.org/show_bug.cgi?id=181792
Reviewed by Antti Koivisto.
LayoutTests/imported/w3c:
Imported new Web Platform Tests for the css-align module.
* resources/import-expectations.json:
* web-platform-tests/css/css-align-3/content-distribution/w3c-import.log: Removed.
* web-platform-tests/css/css-align-3/default-alignment/w3c-import.log: Removed.
* web-platform-tests/css/css-align-3/resources/alignment-parsing-utils.js: Removed.
* web-platform-tests/css/css-align-3/self-alignment/w3c-import.log: Removed.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-001-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-002-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-003-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-004-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-005-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-001-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-002-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-003-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-004-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-005-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html: Added.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006.html.
* web-platform-tests/css/css-align/content-distribution/w3c-import.log: Added.
* web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001-expected.txt.
* web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001.html.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-001-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-002-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-003-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-004-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-005-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-001-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-003-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-005-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-006-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html: Added.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006.html.
* web-platform-tests/css/css-align/default-alignment/w3c-import.log: Added.
* web-platform-tests/css/css-align/distribution-values/space-evenly-001-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001-expected.xht.
* web-platform-tests/css/css-align/distribution-values/space-evenly-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001.html.
* web-platform-tests/css/css-align/distribution-values/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/w3c-import.log.
* web-platform-tests/css/css-align/resources/alignment-parsing-utils.js: Added.
(checkPlaceShorhand):
(checkPlaceShorhandLonghands):
(checkPlaceShorthandInvalidValues):
(checkValues):
(checkBadValues):
(checkInitialValues):
(checkInheritValues):
(checkLegacyValues):
(checkSupportedValues):
* web-platform-tests/css/css-align/resources/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/resources/w3c-import.log.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-001-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-002-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-003-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-004-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-005-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-001-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-002-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-003-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-004-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-005-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html: Added.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006.html.
* web-platform-tests/css/css-align/self-alignment/w3c-import.log: Added.
Source/WebCore:
The CSS WG resolved to remove the 'left' and 'right' values from the
block/cross axis alignment properties.
https://github.com/w3c/csswg-drafts/issues/1403
This patch changes the CSS parsing logic of all the CSS Box Alignment
properties, both block-axis (align-{self, items, content} and
inline-axis (justify-{self, items, content}).
Additionally, the alignment shorthands (place-{self, items, content})
have been also changed to respect the new syntax.
Despite the number of layout tests changed, I don't think this
change will break any content in current sites. The CSS values
'left' and 'right' were introduced by the new CSS Box Alignment
spec and only implemented by the CSS Grid Layout feature, shipped
last year. Additionally, the removed values have no effect on the
layout result when they are applied to the block/cross-axis CSS
Alignment properties.
Tests: imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html
imported/w3c/web-platform-tests/css/css-align/distribution-values/space-evenly-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html
* css/parser/CSSPropertyParser.cpp:
(WebCore::isLeftOrRightKeyword):
(WebCore::isContentPositionKeyword):
(WebCore::isContentPositionOrLeftOrRightKeyword):
(WebCore::consumeContentDistributionOverflowPosition):
(WebCore::isSelfPositionKeyword):
(WebCore::isSelfPositionOrLeftOrRightKeyword):
(WebCore::consumeSelfPositionOverflowPosition):
(WebCore::consumeAlignItems):
(WebCore::consumeJustifyItems):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::consumeSimplifiedContentPosition):
(WebCore::CSSPropertyParser::consumePlaceContentShorthand):
(WebCore::consumeSimplifiedItemPosition):
(WebCore::CSSPropertyParser::consumePlaceItemsShorthand):
(WebCore::CSSPropertyParser::consumePlaceSelfShorthand):
LayoutTests:
Rebaseline tests because of the removal of the 'left' and right' CSS values.
* css3/parse-align-content.html:
* css3/parse-align-items.html:
* css3/parse-align-self-expected.txt:
* css3/parse-align-self.html:
* css3/parse-alignment-of-root-elements-expected.txt:
Canonical link: https://commits.webkit.org/197832@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-23 20:30:21 +00:00
|
|
|
element.style.alignContent = "unsafe end";
|
|
|
|
checkValues(element, "alignContent", "align-content", "unsafe end", "unsafe end");
|
2017-03-30 21:27:09 +00:00
|
|
|
|
2018-01-30 16:03:14 +00:00
|
|
|
element.style.alignContent = "first baseline";
|
|
|
|
checkValues(element, "alignContent", "align-content", "baseline", "baseline");
|
2017-03-30 21:27:09 +00:00
|
|
|
|
2018-01-30 16:03:14 +00:00
|
|
|
element.style.alignContent = "last baseline";
|
|
|
|
checkValues(element, "alignContent", "align-content", "last baseline", "last baseline");
|
2017-03-30 21:27:09 +00:00
|
|
|
|
|
|
|
element.style.alignContent = "normal";
|
|
|
|
checkValues(element, "alignContent", "align-content", "normal", "normal");
|
|
|
|
|
|
|
|
element.style.display = "flex";
|
|
|
|
element.style.alignContent = "normal";
|
|
|
|
checkValues(element, "alignContent", "align-content", "normal", "normal");
|
|
|
|
|
|
|
|
element.style.display = "grid";
|
|
|
|
element.style.alignContent = "normal";
|
|
|
|
checkValues(element, "alignContent", "align-content", "normal", "normal");
|
|
|
|
|
|
|
|
element.style.alignContent = "flex-end";
|
|
|
|
checkValues(element, "alignContent", "align-content", "flex-end", "flex-end");
|
|
|
|
}, "Test getting and setting align-content through JS");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
element = document.createElement("div");
|
|
|
|
document.body.appendChild(element);
|
|
|
|
|
[css-align] 'left' and 'right' should parse as invalid in block/cross-axis alignment
https://bugs.webkit.org/show_bug.cgi?id=181792
Reviewed by Antti Koivisto.
LayoutTests/imported/w3c:
Imported new Web Platform Tests for the css-align module.
* resources/import-expectations.json:
* web-platform-tests/css/css-align-3/content-distribution/w3c-import.log: Removed.
* web-platform-tests/css/css-align-3/default-alignment/w3c-import.log: Removed.
* web-platform-tests/css/css-align-3/resources/alignment-parsing-utils.js: Removed.
* web-platform-tests/css/css-align-3/self-alignment/w3c-import.log: Removed.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-001-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-002-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-003-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-004-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-005-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-001-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-002-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-003-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-004-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-005-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html: Added.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006.html.
* web-platform-tests/css/css-align/content-distribution/w3c-import.log: Added.
* web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001-expected.txt.
* web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001.html.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-001-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-002-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-003-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-004-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-005-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-001-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-003-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-005-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-006-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html: Added.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006.html.
* web-platform-tests/css/css-align/default-alignment/w3c-import.log: Added.
* web-platform-tests/css/css-align/distribution-values/space-evenly-001-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001-expected.xht.
* web-platform-tests/css/css-align/distribution-values/space-evenly-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001.html.
* web-platform-tests/css/css-align/distribution-values/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/w3c-import.log.
* web-platform-tests/css/css-align/resources/alignment-parsing-utils.js: Added.
(checkPlaceShorhand):
(checkPlaceShorhandLonghands):
(checkPlaceShorthandInvalidValues):
(checkValues):
(checkBadValues):
(checkInitialValues):
(checkInheritValues):
(checkLegacyValues):
(checkSupportedValues):
* web-platform-tests/css/css-align/resources/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/resources/w3c-import.log.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-001-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-002-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-003-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-004-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-005-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-001-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-002-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-003-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-004-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-005-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html: Added.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006.html.
* web-platform-tests/css/css-align/self-alignment/w3c-import.log: Added.
Source/WebCore:
The CSS WG resolved to remove the 'left' and 'right' values from the
block/cross axis alignment properties.
https://github.com/w3c/csswg-drafts/issues/1403
This patch changes the CSS parsing logic of all the CSS Box Alignment
properties, both block-axis (align-{self, items, content} and
inline-axis (justify-{self, items, content}).
Additionally, the alignment shorthands (place-{self, items, content})
have been also changed to respect the new syntax.
Despite the number of layout tests changed, I don't think this
change will break any content in current sites. The CSS values
'left' and 'right' were introduced by the new CSS Box Alignment
spec and only implemented by the CSS Grid Layout feature, shipped
last year. Additionally, the removed values have no effect on the
layout result when they are applied to the block/cross-axis CSS
Alignment properties.
Tests: imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html
imported/w3c/web-platform-tests/css/css-align/distribution-values/space-evenly-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html
* css/parser/CSSPropertyParser.cpp:
(WebCore::isLeftOrRightKeyword):
(WebCore::isContentPositionKeyword):
(WebCore::isContentPositionOrLeftOrRightKeyword):
(WebCore::consumeContentDistributionOverflowPosition):
(WebCore::isSelfPositionKeyword):
(WebCore::isSelfPositionOrLeftOrRightKeyword):
(WebCore::consumeSelfPositionOverflowPosition):
(WebCore::consumeAlignItems):
(WebCore::consumeJustifyItems):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::consumeSimplifiedContentPosition):
(WebCore::CSSPropertyParser::consumePlaceContentShorthand):
(WebCore::consumeSimplifiedItemPosition):
(WebCore::CSSPropertyParser::consumePlaceItemsShorthand):
(WebCore::CSSPropertyParser::consumePlaceSelfShorthand):
LayoutTests:
Rebaseline tests because of the removal of the 'left' and right' CSS values.
* css3/parse-align-content.html:
* css3/parse-align-items.html:
* css3/parse-align-self-expected.txt:
* css3/parse-align-self.html:
* css3/parse-alignment-of-root-elements-expected.txt:
Canonical link: https://commits.webkit.org/197832@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-23 20:30:21 +00:00
|
|
|
checkBadValues(element, "alignContent", "align-content", "left");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "right");
|
2017-03-30 21:27:09 +00:00
|
|
|
checkBadValues(element, "alignContent", "align-content", "auto");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "unsafe auto");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "auto safe");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "auto left");
|
[css-align] 'left' and 'right' should parse as invalid in block/cross-axis alignment
https://bugs.webkit.org/show_bug.cgi?id=181792
Reviewed by Antti Koivisto.
LayoutTests/imported/w3c:
Imported new Web Platform Tests for the css-align module.
* resources/import-expectations.json:
* web-platform-tests/css/css-align-3/content-distribution/w3c-import.log: Removed.
* web-platform-tests/css/css-align-3/default-alignment/w3c-import.log: Removed.
* web-platform-tests/css/css-align-3/resources/alignment-parsing-utils.js: Removed.
* web-platform-tests/css/css-align-3/self-alignment/w3c-import.log: Removed.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-001-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-002-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-003-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-004-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-005-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-001-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-002-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-003-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-004-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-005-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html: Added.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006.html.
* web-platform-tests/css/css-align/content-distribution/w3c-import.log: Added.
* web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001-expected.txt.
* web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001.html.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-001-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-002-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-003-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-004-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-005-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-001-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-003-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-005-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-006-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html: Added.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006.html.
* web-platform-tests/css/css-align/default-alignment/w3c-import.log: Added.
* web-platform-tests/css/css-align/distribution-values/space-evenly-001-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001-expected.xht.
* web-platform-tests/css/css-align/distribution-values/space-evenly-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001.html.
* web-platform-tests/css/css-align/distribution-values/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/w3c-import.log.
* web-platform-tests/css/css-align/resources/alignment-parsing-utils.js: Added.
(checkPlaceShorhand):
(checkPlaceShorhandLonghands):
(checkPlaceShorthandInvalidValues):
(checkValues):
(checkBadValues):
(checkInitialValues):
(checkInheritValues):
(checkLegacyValues):
(checkSupportedValues):
* web-platform-tests/css/css-align/resources/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/resources/w3c-import.log.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-001-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-002-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-003-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-004-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-005-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-001-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-002-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-003-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-004-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-005-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html: Added.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006.html.
* web-platform-tests/css/css-align/self-alignment/w3c-import.log: Added.
Source/WebCore:
The CSS WG resolved to remove the 'left' and 'right' values from the
block/cross axis alignment properties.
https://github.com/w3c/csswg-drafts/issues/1403
This patch changes the CSS parsing logic of all the CSS Box Alignment
properties, both block-axis (align-{self, items, content} and
inline-axis (justify-{self, items, content}).
Additionally, the alignment shorthands (place-{self, items, content})
have been also changed to respect the new syntax.
Despite the number of layout tests changed, I don't think this
change will break any content in current sites. The CSS values
'left' and 'right' were introduced by the new CSS Box Alignment
spec and only implemented by the CSS Grid Layout feature, shipped
last year. Additionally, the removed values have no effect on the
layout result when they are applied to the block/cross-axis CSS
Alignment properties.
Tests: imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html
imported/w3c/web-platform-tests/css/css-align/distribution-values/space-evenly-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html
* css/parser/CSSPropertyParser.cpp:
(WebCore::isLeftOrRightKeyword):
(WebCore::isContentPositionKeyword):
(WebCore::isContentPositionOrLeftOrRightKeyword):
(WebCore::consumeContentDistributionOverflowPosition):
(WebCore::isSelfPositionKeyword):
(WebCore::isSelfPositionOrLeftOrRightKeyword):
(WebCore::consumeSelfPositionOverflowPosition):
(WebCore::consumeAlignItems):
(WebCore::consumeJustifyItems):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::consumeSimplifiedContentPosition):
(WebCore::CSSPropertyParser::consumePlaceContentShorthand):
(WebCore::consumeSimplifiedItemPosition):
(WebCore::CSSPropertyParser::consumePlaceItemsShorthand):
(WebCore::CSSPropertyParser::consumePlaceSelfShorthand):
LayoutTests:
Rebaseline tests because of the removal of the 'left' and right' CSS values.
* css3/parse-align-content.html:
* css3/parse-align-items.html:
* css3/parse-align-self-expected.txt:
* css3/parse-align-self.html:
* css3/parse-alignment-of-root-elements-expected.txt:
Canonical link: https://commits.webkit.org/197832@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-23 20:30:21 +00:00
|
|
|
checkBadValues(element, "alignContent", "align-content", "safe left");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "unsafe right");
|
2017-03-30 21:27:09 +00:00
|
|
|
checkBadValues(element, "alignContent", "align-content", "baseline safe");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "last-baseline center");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "unsafe unsafe");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "unsafe safe");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "center start");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "baseline safe");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "unsafe baseline");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "unsafe safe left");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "unsafe left safe");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "left safe unsafe safe");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "start right space-between");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "safe stretch");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "normal space-between");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "stretch normal");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkBadValues(element, "alignContent", "align-content", "stretch center");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "space-between right safe");
|
2017-03-30 21:27:09 +00:00
|
|
|
checkBadValues(element, "alignContent", "align-content", "normal safe");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "space-around stretch");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "end space-between start");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "right safe left");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "unsafe");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "safe");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkBadValues(element, "alignContent", "align-content", "start safe");
|
|
|
|
checkBadValues(element, "alignContent", "align-content", "end unsafe");
|
2017-03-30 21:27:09 +00:00
|
|
|
}, "Test bad combinations of align-content");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
element.style.display = "";
|
|
|
|
checkInitialValues(element, "alignContent", "align-content", "center", "normal");
|
|
|
|
}, "Test the value 'initial'");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
element.style.display = "grid";
|
[css-align] 'left' and 'right' should parse as invalid in block/cross-axis alignment
https://bugs.webkit.org/show_bug.cgi?id=181792
Reviewed by Antti Koivisto.
LayoutTests/imported/w3c:
Imported new Web Platform Tests for the css-align module.
* resources/import-expectations.json:
* web-platform-tests/css/css-align-3/content-distribution/w3c-import.log: Removed.
* web-platform-tests/css/css-align-3/default-alignment/w3c-import.log: Removed.
* web-platform-tests/css/css-align-3/resources/alignment-parsing-utils.js: Removed.
* web-platform-tests/css/css-align-3/self-alignment/w3c-import.log: Removed.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-001-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-002-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-003-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-004-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-005-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-001-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-002-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-003-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-004-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-005-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html: Added.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006.html.
* web-platform-tests/css/css-align/content-distribution/w3c-import.log: Added.
* web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001-expected.txt.
* web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001.html.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-001-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-002-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-003-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-004-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-005-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-001-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-003-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-005-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-006-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html: Added.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006.html.
* web-platform-tests/css/css-align/default-alignment/w3c-import.log: Added.
* web-platform-tests/css/css-align/distribution-values/space-evenly-001-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001-expected.xht.
* web-platform-tests/css/css-align/distribution-values/space-evenly-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001.html.
* web-platform-tests/css/css-align/distribution-values/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/w3c-import.log.
* web-platform-tests/css/css-align/resources/alignment-parsing-utils.js: Added.
(checkPlaceShorhand):
(checkPlaceShorhandLonghands):
(checkPlaceShorthandInvalidValues):
(checkValues):
(checkBadValues):
(checkInitialValues):
(checkInheritValues):
(checkLegacyValues):
(checkSupportedValues):
* web-platform-tests/css/css-align/resources/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/resources/w3c-import.log.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-001-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-002-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-003-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-004-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-005-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-001-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-002-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-003-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-004-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-005-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html: Added.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006.html.
* web-platform-tests/css/css-align/self-alignment/w3c-import.log: Added.
Source/WebCore:
The CSS WG resolved to remove the 'left' and 'right' values from the
block/cross axis alignment properties.
https://github.com/w3c/csswg-drafts/issues/1403
This patch changes the CSS parsing logic of all the CSS Box Alignment
properties, both block-axis (align-{self, items, content} and
inline-axis (justify-{self, items, content}).
Additionally, the alignment shorthands (place-{self, items, content})
have been also changed to respect the new syntax.
Despite the number of layout tests changed, I don't think this
change will break any content in current sites. The CSS values
'left' and 'right' were introduced by the new CSS Box Alignment
spec and only implemented by the CSS Grid Layout feature, shipped
last year. Additionally, the removed values have no effect on the
layout result when they are applied to the block/cross-axis CSS
Alignment properties.
Tests: imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html
imported/w3c/web-platform-tests/css/css-align/distribution-values/space-evenly-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html
* css/parser/CSSPropertyParser.cpp:
(WebCore::isLeftOrRightKeyword):
(WebCore::isContentPositionKeyword):
(WebCore::isContentPositionOrLeftOrRightKeyword):
(WebCore::consumeContentDistributionOverflowPosition):
(WebCore::isSelfPositionKeyword):
(WebCore::isSelfPositionOrLeftOrRightKeyword):
(WebCore::consumeSelfPositionOverflowPosition):
(WebCore::consumeAlignItems):
(WebCore::consumeJustifyItems):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::consumeSimplifiedContentPosition):
(WebCore::CSSPropertyParser::consumePlaceContentShorthand):
(WebCore::consumeSimplifiedItemPosition):
(WebCore::CSSPropertyParser::consumePlaceItemsShorthand):
(WebCore::CSSPropertyParser::consumePlaceSelfShorthand):
LayoutTests:
Rebaseline tests because of the removal of the 'left' and right' CSS values.
* css3/parse-align-content.html:
* css3/parse-align-items.html:
* css3/parse-align-self-expected.txt:
* css3/parse-align-self.html:
* css3/parse-alignment-of-root-elements-expected.txt:
Canonical link: https://commits.webkit.org/197832@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-23 20:30:21 +00:00
|
|
|
checkInitialValues(element, "alignContent", "align-content", "safe start", "normal");
|
2017-03-30 21:27:09 +00:00
|
|
|
}, "Test the value 'initial' for grid containers");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
element.style.display = "flex";
|
[css-align] 'left' and 'right' should parse as invalid in block/cross-axis alignment
https://bugs.webkit.org/show_bug.cgi?id=181792
Reviewed by Antti Koivisto.
LayoutTests/imported/w3c:
Imported new Web Platform Tests for the css-align module.
* resources/import-expectations.json:
* web-platform-tests/css/css-align-3/content-distribution/w3c-import.log: Removed.
* web-platform-tests/css/css-align-3/default-alignment/w3c-import.log: Removed.
* web-platform-tests/css/css-align-3/resources/alignment-parsing-utils.js: Removed.
* web-platform-tests/css/css-align-3/self-alignment/w3c-import.log: Removed.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-001-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-002-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-003-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-004-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-005-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-001-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-002-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-003-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-004-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-005-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html: Added.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006.html.
* web-platform-tests/css/css-align/content-distribution/w3c-import.log: Added.
* web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001-expected.txt.
* web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001.html.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-001-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-002-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-003-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-004-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-005-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-001-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-003-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-005-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-006-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html: Added.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006.html.
* web-platform-tests/css/css-align/default-alignment/w3c-import.log: Added.
* web-platform-tests/css/css-align/distribution-values/space-evenly-001-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001-expected.xht.
* web-platform-tests/css/css-align/distribution-values/space-evenly-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001.html.
* web-platform-tests/css/css-align/distribution-values/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/w3c-import.log.
* web-platform-tests/css/css-align/resources/alignment-parsing-utils.js: Added.
(checkPlaceShorhand):
(checkPlaceShorhandLonghands):
(checkPlaceShorthandInvalidValues):
(checkValues):
(checkBadValues):
(checkInitialValues):
(checkInheritValues):
(checkLegacyValues):
(checkSupportedValues):
* web-platform-tests/css/css-align/resources/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/resources/w3c-import.log.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-001-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-002-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-003-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-004-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-005-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-001-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-002-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-003-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-004-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-005-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html: Added.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006.html.
* web-platform-tests/css/css-align/self-alignment/w3c-import.log: Added.
Source/WebCore:
The CSS WG resolved to remove the 'left' and 'right' values from the
block/cross axis alignment properties.
https://github.com/w3c/csswg-drafts/issues/1403
This patch changes the CSS parsing logic of all the CSS Box Alignment
properties, both block-axis (align-{self, items, content} and
inline-axis (justify-{self, items, content}).
Additionally, the alignment shorthands (place-{self, items, content})
have been also changed to respect the new syntax.
Despite the number of layout tests changed, I don't think this
change will break any content in current sites. The CSS values
'left' and 'right' were introduced by the new CSS Box Alignment
spec and only implemented by the CSS Grid Layout feature, shipped
last year. Additionally, the removed values have no effect on the
layout result when they are applied to the block/cross-axis CSS
Alignment properties.
Tests: imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html
imported/w3c/web-platform-tests/css/css-align/distribution-values/space-evenly-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html
* css/parser/CSSPropertyParser.cpp:
(WebCore::isLeftOrRightKeyword):
(WebCore::isContentPositionKeyword):
(WebCore::isContentPositionOrLeftOrRightKeyword):
(WebCore::consumeContentDistributionOverflowPosition):
(WebCore::isSelfPositionKeyword):
(WebCore::isSelfPositionOrLeftOrRightKeyword):
(WebCore::consumeSelfPositionOverflowPosition):
(WebCore::consumeAlignItems):
(WebCore::consumeJustifyItems):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::consumeSimplifiedContentPosition):
(WebCore::CSSPropertyParser::consumePlaceContentShorthand):
(WebCore::consumeSimplifiedItemPosition):
(WebCore::CSSPropertyParser::consumePlaceItemsShorthand):
(WebCore::CSSPropertyParser::consumePlaceSelfShorthand):
LayoutTests:
Rebaseline tests because of the removal of the 'left' and right' CSS values.
* css3/parse-align-content.html:
* css3/parse-align-items.html:
* css3/parse-align-self-expected.txt:
* css3/parse-align-self.html:
* css3/parse-alignment-of-root-elements-expected.txt:
Canonical link: https://commits.webkit.org/197832@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-23 20:30:21 +00:00
|
|
|
checkInitialValues(element, "alignContent", "align-content", "unsafe end", "normal");
|
2017-03-30 21:27:09 +00:00
|
|
|
}, "Test the value 'initial' for flex containers");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
checkInheritValues("alignContent", "align-content", "end");
|
[css-align] 'left' and 'right' should parse as invalid in block/cross-axis alignment
https://bugs.webkit.org/show_bug.cgi?id=181792
Reviewed by Antti Koivisto.
LayoutTests/imported/w3c:
Imported new Web Platform Tests for the css-align module.
* resources/import-expectations.json:
* web-platform-tests/css/css-align-3/content-distribution/w3c-import.log: Removed.
* web-platform-tests/css/css-align-3/default-alignment/w3c-import.log: Removed.
* web-platform-tests/css/css-align-3/resources/alignment-parsing-utils.js: Removed.
* web-platform-tests/css/css-align-3/self-alignment/w3c-import.log: Removed.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-001-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-002-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-003-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-004-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-005-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-001-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-002-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-003-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-004-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-005-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html: Added.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006.html.
* web-platform-tests/css/css-align/content-distribution/w3c-import.log: Added.
* web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001-expected.txt.
* web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001.html.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-001-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-002-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-003-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-004-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-005-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-001-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-003-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-005-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-006-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html: Added.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006.html.
* web-platform-tests/css/css-align/default-alignment/w3c-import.log: Added.
* web-platform-tests/css/css-align/distribution-values/space-evenly-001-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001-expected.xht.
* web-platform-tests/css/css-align/distribution-values/space-evenly-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001.html.
* web-platform-tests/css/css-align/distribution-values/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/w3c-import.log.
* web-platform-tests/css/css-align/resources/alignment-parsing-utils.js: Added.
(checkPlaceShorhand):
(checkPlaceShorhandLonghands):
(checkPlaceShorthandInvalidValues):
(checkValues):
(checkBadValues):
(checkInitialValues):
(checkInheritValues):
(checkLegacyValues):
(checkSupportedValues):
* web-platform-tests/css/css-align/resources/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/resources/w3c-import.log.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-001-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-002-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-003-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-004-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-005-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-001-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-002-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-003-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-004-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-005-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html: Added.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006.html.
* web-platform-tests/css/css-align/self-alignment/w3c-import.log: Added.
Source/WebCore:
The CSS WG resolved to remove the 'left' and 'right' values from the
block/cross axis alignment properties.
https://github.com/w3c/csswg-drafts/issues/1403
This patch changes the CSS parsing logic of all the CSS Box Alignment
properties, both block-axis (align-{self, items, content} and
inline-axis (justify-{self, items, content}).
Additionally, the alignment shorthands (place-{self, items, content})
have been also changed to respect the new syntax.
Despite the number of layout tests changed, I don't think this
change will break any content in current sites. The CSS values
'left' and 'right' were introduced by the new CSS Box Alignment
spec and only implemented by the CSS Grid Layout feature, shipped
last year. Additionally, the removed values have no effect on the
layout result when they are applied to the block/cross-axis CSS
Alignment properties.
Tests: imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html
imported/w3c/web-platform-tests/css/css-align/distribution-values/space-evenly-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html
imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html
* css/parser/CSSPropertyParser.cpp:
(WebCore::isLeftOrRightKeyword):
(WebCore::isContentPositionKeyword):
(WebCore::isContentPositionOrLeftOrRightKeyword):
(WebCore::consumeContentDistributionOverflowPosition):
(WebCore::isSelfPositionKeyword):
(WebCore::isSelfPositionOrLeftOrRightKeyword):
(WebCore::consumeSelfPositionOverflowPosition):
(WebCore::consumeAlignItems):
(WebCore::consumeJustifyItems):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::consumeSimplifiedContentPosition):
(WebCore::CSSPropertyParser::consumePlaceContentShorthand):
(WebCore::consumeSimplifiedItemPosition):
(WebCore::CSSPropertyParser::consumePlaceItemsShorthand):
(WebCore::CSSPropertyParser::consumePlaceSelfShorthand):
LayoutTests:
Rebaseline tests because of the removal of the 'left' and right' CSS values.
* css3/parse-align-content.html:
* css3/parse-align-items.html:
* css3/parse-align-self-expected.txt:
* css3/parse-align-self.html:
* css3/parse-alignment-of-root-elements-expected.txt:
Canonical link: https://commits.webkit.org/197832@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-23 20:30:21 +00:00
|
|
|
checkInheritValues("alignContent", "align-content", "safe start");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkInheritValues("alignContent", "align-content", "unsafe center");
|
2017-03-30 21:27:09 +00:00
|
|
|
}, "Test the value 'inherit'");
|
2015-05-05 15:15:38 +00:00
|
|
|
</script>
|