2015-03-30 18:33:39 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<style>
|
|
|
|
#alignItemsBaseline {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-items: baseline;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignItemsFirstBaseline {
|
|
|
|
align-items: first baseline;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignItemsLastBaseline {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-items: last baseline;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignItemsStretch {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-items: stretch;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignItemsNormal {
|
|
|
|
align-items: normal;
|
|
|
|
}
|
|
|
|
|
2015-03-30 18:33:39 +00:00
|
|
|
#alignItemsStart {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-items: start;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignItemsEnd {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-items: end;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignItemsCenter {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-items: center;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignItemsSelfStart {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-items: self-start;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignItemsSelfEnd {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-items: self-end;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignItemsFlexStart {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-items: flex-start;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignItemsFlexEnd {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-items: flex-end;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignItemsUnsafeEnd {
|
|
|
|
align-items: unsafe end ;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignItemsUnsafeCenter {
|
|
|
|
align-items: unsafe center ;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignItemsSafeSelfEnd {
|
|
|
|
align-items: safe self-end;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignItemsSafeSelfStart {
|
|
|
|
align-items: safe self-start;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignItemsUnsafeFlexStart {
|
|
|
|
align-items: unsafe flex-start;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignItemsSafeFlexEnd {
|
|
|
|
align-items: safe flex-end;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
</style>
|
2017-03-29 22:01:11 +00:00
|
|
|
<p>Test that setting and getting align-items works as expected</p>
|
2015-03-30 18:33:39 +00:00
|
|
|
<div id="alignItemsBaseline"></div>
|
2017-03-29 22:01:11 +00:00
|
|
|
<div id="alignItemsFirstBaseline"></div>
|
2015-03-30 18:33:39 +00:00
|
|
|
<div id="alignItemsLastBaseline"></div>
|
|
|
|
<div id="alignItemsStretch"></div>
|
2018-01-22 17:01:51 +00:00
|
|
|
<div id="alignItemsNormal"></div>
|
2015-03-30 18:33:39 +00:00
|
|
|
<div id="alignItemsStart"></div>
|
|
|
|
<div id="alignItemsEnd"></div>
|
|
|
|
<div id="alignItemsCenter"></div>
|
|
|
|
<div id="alignItemsSelfStart"></div>
|
|
|
|
<div id="alignItemsSelfEnd"></div>
|
|
|
|
<div id="alignItemsFlexStart"></div>
|
|
|
|
<div id="alignItemsFlexEnd"></div>
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
<div id="alignItemsUnsafeEnd"></div>
|
|
|
|
<div id="alignItemsUnsafeCenter"></div>
|
|
|
|
<div id="alignItemsSafeSelfEnd"></div>
|
|
|
|
<div id="alignItemsSafeSelfStart"></div>
|
|
|
|
<div id="alignItemsUnsafeFlexStart"></div>
|
|
|
|
<div id="alignItemsSafeFlexEnd"></div>
|
2017-03-29 22:01:11 +00:00
|
|
|
<script src="../resources/testharness.js"></script>
|
|
|
|
<script src="../resources/testharnessreport.js"></script>
|
|
|
|
<script src="resources/alignment-parsing-utils-th.js"></script>
|
2015-03-30 18:33:39 +00:00
|
|
|
<script>
|
2017-03-29 22:01:11 +00:00
|
|
|
test(function() {
|
|
|
|
var alignItemsBaseline = document.getElementById("alignItemsBaseline");
|
|
|
|
checkValues(alignItemsBaseline, "alignItems", "align-items", "", "baseline");
|
|
|
|
var alignItemsFirstBaseline = document.getElementById("alignItemsFirstBaseline");
|
|
|
|
checkValues(alignItemsFirstBaseline, "alignItems", "align-items", "", "baseline");
|
|
|
|
var alignItemsLastBaseline = document.getElementById("alignItemsLastBaseline");
|
|
|
|
checkValues(alignItemsLastBaseline, "alignItems", "align-items", "", "last baseline");
|
|
|
|
var alignItemsStretch = document.getElementById("alignItemsStretch");
|
|
|
|
checkValues(alignItemsStretch, "alignItems", "align-items", "", "stretch");
|
2018-01-22 17:01:51 +00:00
|
|
|
var alignItemsNormal = document.getElementById("alignItemsNormal");
|
|
|
|
checkValues(alignItemsNormal, "alignItems", "align-items", "", "normal");
|
2017-03-29 22:01:11 +00:00
|
|
|
var alignItemsStart = document.getElementById("alignItemsStart");
|
|
|
|
checkValues(alignItemsStart, "alignItems", "align-items", "", "start");
|
|
|
|
var alignItemsEnd = document.getElementById("alignItemsEnd");
|
|
|
|
checkValues(alignItemsEnd, "alignItems", "align-items", "", "end");
|
|
|
|
var alignItemsCenter = document.getElementById("alignItemsCenter");
|
|
|
|
checkValues(alignItemsCenter, "alignItems", "align-items", "", "center");
|
|
|
|
var alignItemsSelfEnd = document.getElementById("alignItemsSelfEnd");
|
|
|
|
checkValues(alignItemsSelfEnd, "alignItems", "align-items", "", "self-end");
|
|
|
|
var alignItemsSelfStart = document.getElementById("alignItemsSelfStart");
|
|
|
|
checkValues(alignItemsSelfStart, "alignItems", "align-items", "", "self-start");
|
|
|
|
var alignItemsFlexStart = document.getElementById("alignItemsFlexStart");
|
|
|
|
checkValues(alignItemsFlexStart, "alignItems", "align-items", "", "flex-start");
|
|
|
|
var alignItemsFlexEnd = document.getElementById("alignItemsFlexEnd");
|
|
|
|
checkValues(alignItemsFlexEnd, "alignItems", "align-items", "", "flex-end");
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
var alignItemsUnsafeEnd = document.getElementById("alignItemsUnsafeEnd");
|
|
|
|
checkValues(alignItemsUnsafeEnd, "alignItems", "align-items", "", "unsafe end");
|
|
|
|
var alignItemsUnsafeCenter = document.getElementById("alignItemsUnsafeCenter");
|
|
|
|
checkValues(alignItemsUnsafeCenter, "alignItems", "align-items", "", "unsafe center");
|
|
|
|
var alignItemsSafeSelfEnd = document.getElementById("alignItemsSafeSelfEnd");
|
|
|
|
checkValues(alignItemsSafeSelfEnd, "alignItems", "align-items", "", "safe self-end");
|
|
|
|
var alignItemsSafeSelfStart = document.getElementById("alignItemsSafeSelfStart");
|
|
|
|
checkValues(alignItemsSafeSelfStart, "alignItems", "align-items", "", "safe self-start");
|
|
|
|
var alignItemsUnsafeFlexStart = document.getElementById("alignItemsUnsafeFlexStart");
|
|
|
|
checkValues(alignItemsUnsafeFlexStart, "alignItems", "align-items", "", "unsafe flex-start");
|
|
|
|
var alignItemsSafeFlexEnd = document.getElementById("alignItemsSafeFlexEnd");
|
|
|
|
checkValues(alignItemsSafeFlexEnd, "alignItems", "align-items", "", "safe flex-end");
|
2017-03-29 22:01:11 +00:00
|
|
|
}, "Test getting align-items set through CSS.");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
element = document.createElement("div");
|
|
|
|
document.body.appendChild(element);
|
|
|
|
checkValues(element, "alignItems", "align-items", "", "normal");
|
|
|
|
}, "Test initial value of align-items through JS");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
element = document.createElement("div");
|
|
|
|
document.body.appendChild(element);
|
|
|
|
element.style.alignItems = "center";
|
|
|
|
checkValues(element, "alignItems", "align-items", "center", "center");
|
|
|
|
|
|
|
|
element.style.alignItems = "unsafe start";
|
2018-01-22 17:01:51 +00:00
|
|
|
checkValues(element, "alignItems", "align-items", "unsafe start", "unsafe start");
|
2017-03-29 22:01:11 +00:00
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
element.style.alignItems = "safe flex-end";
|
|
|
|
checkValues(element, "alignItems", "align-items", "safe flex-end", "safe flex-end");
|
2017-03-29 22:01:11 +00:00
|
|
|
|
|
|
|
element.style.alignItems = "center";
|
|
|
|
checkValues(element, "alignItems", "align-items", "center", "center");
|
|
|
|
|
|
|
|
element.style.alignItems = "self-start";
|
|
|
|
checkValues(element, "alignItems", "align-items", "self-start", "self-start");
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
element.style.alignItems = "normal";
|
|
|
|
checkValues(element, "alignItems", "align-items", "normal", "normal");
|
|
|
|
|
2017-03-29 22:01:11 +00:00
|
|
|
// The 'auto' value is not valid for the align-items property.
|
|
|
|
element.style.alignItems = "";
|
|
|
|
element.style.alignItems = "auto";
|
|
|
|
checkValues(element, "alignItems", "align-items", "", "normal");
|
|
|
|
|
|
|
|
element.style.display = "flex";
|
|
|
|
element.style.alignItems = "auto";
|
|
|
|
checkValues(element, "alignItems", "align-items", "", "normal");
|
|
|
|
|
|
|
|
element.style.display = "grid";
|
|
|
|
element.style.alignItems = "auto";
|
|
|
|
checkValues(element, "alignItems", "align-items", "", "normal");
|
|
|
|
|
|
|
|
element.style.alignItems = "self-end";
|
|
|
|
checkValues(element, "alignItems", "align-items", "self-end", "self-end");
|
|
|
|
}, "Test getting and setting align-items through JS");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
element = document.createElement("div");
|
|
|
|
document.body.appendChild(element);
|
|
|
|
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "auto");
|
[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, "alignItems", "align-items", "left");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "right");
|
2017-03-29 22:01:11 +00:00
|
|
|
checkBadValues(element, "alignItems", "align-items", "unsafe auto");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "auto safe");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "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, "alignItems", "align-items", "safe left");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "unsafe right");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "unsafe normal");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkBadValues(element, "alignItems", "align-items", "normal stretch");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "baseline normal");
|
2017-03-29 22:01:11 +00:00
|
|
|
checkBadValues(element, "alignItems", "align-items", "baseline safe");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "baseline center");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "first baseline center");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "last baseline center");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "baseline last");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "baseline first");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "stretch unsafe");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "stretch right");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "unsafe unsafe");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "unsafe safe");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "center start");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "stretch unsafe");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "safe stretch");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "baseline safe");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "unsafe baseline");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "unsafe safe left");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "unsafe left safe");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "left safe unsafe safe");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "legacy start");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "legacy end");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "legacy right unsafe");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "legacy auto");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "legacy stretch");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "legacy");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "legacy left right");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkBadValues(element, "alignItems", "align-items", "start safe");
|
|
|
|
checkBadValues(element, "alignItems", "align-items", "end unsafe");
|
2017-03-29 22:01:11 +00:00
|
|
|
}, "Test bad combinations of align-items");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
element.style.display = "";
|
|
|
|
checkInitialValues(element, "alignItems", "align-items", "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, "alignItems", "align-items", "safe start", "normal");
|
2017-03-29 22:01:11 +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, "alignItems", "align-items", "unsafe end", "normal");
|
2017-03-29 22:01:11 +00:00
|
|
|
}, "Test the value 'initial' for flex containers");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
checkInheritValues("alignItems", "align-items", "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("alignItems", "align-items", "safe start");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkInheritValues("alignItems", "align-items", "unsafe center");
|
2017-03-29 22:01:11 +00:00
|
|
|
}, "Test the value 'inherit'");
|
2015-03-30 18:33:39 +00:00
|
|
|
</script>
|