2015-03-30 18:33:39 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<style>
|
|
|
|
#alignSelfBaseline {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-self: baseline;
|
|
|
|
}
|
|
|
|
|
|
|
|
#alignSelfFirstBaseline {
|
|
|
|
align-self: first baseline;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignSelfLastBaseline {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-self: last baseline;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignSelfStretch {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-self: stretch;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
2017-07-10 23:56:21 +00:00
|
|
|
#alignSelfNormal {
|
|
|
|
align-self: normal;
|
|
|
|
}
|
|
|
|
|
2015-03-30 18:33:39 +00:00
|
|
|
#alignSelfStart {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-self: start;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignSelfEnd {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-self: end;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignSelfCenter {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-self: center;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignSelfSelfStart {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-self: self-start;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignSelfSelfEnd {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-self: self-end;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignSelfFlexStart {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-self: flex-start;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#alignSelfFlexEnd {
|
2017-03-29 22:01:11 +00:00
|
|
|
align-self: flex-end;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignSelfUnsafeEnd {
|
|
|
|
align-self: unsafe end ;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignSelfUnsafeCenter {
|
|
|
|
align-self: unsafe center ;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignSelfSafeSelfEnd {
|
|
|
|
align-self: safe self-end;
|
2017-03-29 22:01:11 +00:00
|
|
|
}
|
2015-03-30 18:33:39 +00:00
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignSelfSafeSelfStart {
|
|
|
|
align-self: safe self-start;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignSelfUnsafeFlexStart {
|
|
|
|
align-self: unsafe flex-start;
|
2015-03-30 18:33:39 +00:00
|
|
|
}
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
#alignSelfSafeFlexEnd {
|
|
|
|
align-self: 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-self works as expected</p>
|
2015-03-30 18:33:39 +00:00
|
|
|
<div id="alignSelfBaseline"></div>
|
2017-03-29 22:01:11 +00:00
|
|
|
<div id="alignSelfFirstBaseline"></div>
|
2015-03-30 18:33:39 +00:00
|
|
|
<div id="alignSelfLastBaseline"></div>
|
|
|
|
<div id="alignSelfStretch"></div>
|
2017-07-10 23:56:21 +00:00
|
|
|
<div id="alignSelfNormal"></div>
|
2015-03-30 18:33:39 +00:00
|
|
|
<div id="alignSelfStart"></div>
|
|
|
|
<div id="alignSelfEnd"></div>
|
|
|
|
<div id="alignSelfCenter"></div>
|
|
|
|
<div id="alignSelfSelfStart"></div>
|
|
|
|
<div id="alignSelfSelfEnd"></div>
|
|
|
|
<div id="alignSelfFlexStart"></div>
|
|
|
|
<div id="alignSelfFlexEnd"></div>
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
<div id="alignSelfUnsafeEnd"></div>
|
|
|
|
<div id="alignSelfUnsafeCenter"></div>
|
|
|
|
<div id="alignSelfSafeSelfEnd"></div>
|
|
|
|
<div id="alignSelfSafeSelfStart"></div>
|
|
|
|
<div id="alignSelfUnsafeFlexStart"></div>
|
|
|
|
<div id="alignSelfSafeFlexEnd"></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 alignSelfBaseline = document.getElementById("alignSelfBaseline");
|
|
|
|
checkValues(alignSelfBaseline, "alignSelf", "align-self", "", "baseline");
|
|
|
|
var alignSelfFirstBaseline = document.getElementById("alignSelfFirstBaseline");
|
|
|
|
checkValues(alignSelfFirstBaseline, "alignSelf", "align-self", "", "baseline");
|
|
|
|
var alignSelfLastBaseline = document.getElementById("alignSelfLastBaseline");
|
|
|
|
checkValues(alignSelfLastBaseline, "alignSelf", "align-self", "", "last baseline");
|
|
|
|
var alignSelfStretch = document.getElementById("alignSelfStretch");
|
|
|
|
checkValues(alignSelfStretch, "alignSelf", "align-self", "", "stretch");
|
2017-07-10 23:56:21 +00:00
|
|
|
var alignSelfNormal = document.getElementById("alignSelfNormal");
|
|
|
|
checkValues(alignSelfNormal, "alignSelf", "align-self", "", "normal");
|
2017-03-29 22:01:11 +00:00
|
|
|
var alignSelfStart = document.getElementById("alignSelfStart");
|
|
|
|
checkValues(alignSelfStart, "alignSelf", "align-self", "", "start");
|
|
|
|
var alignSelfEnd = document.getElementById("alignSelfEnd");
|
|
|
|
checkValues(alignSelfEnd, "alignSelf", "align-self", "", "end");
|
|
|
|
var alignSelfCenter = document.getElementById("alignSelfCenter");
|
|
|
|
checkValues(alignSelfCenter, "alignSelf", "align-self", "", "center");
|
|
|
|
var alignSelfSelfEnd = document.getElementById("alignSelfSelfEnd");
|
|
|
|
checkValues(alignSelfSelfEnd, "alignSelf", "align-self", "", "self-end");
|
|
|
|
var alignSelfSelfStart = document.getElementById("alignSelfSelfStart");
|
|
|
|
checkValues(alignSelfSelfStart, "alignSelf", "align-self", "", "self-start");
|
|
|
|
var alignSelfFlexStart = document.getElementById("alignSelfFlexStart");
|
|
|
|
checkValues(alignSelfFlexStart, "alignSelf", "align-self", "", "flex-start");
|
|
|
|
var alignSelfFlexEnd = document.getElementById("alignSelfFlexEnd");
|
|
|
|
checkValues(alignSelfFlexEnd, "alignSelf", "align-self", "", "flex-end");
|
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
var alignSelfUnsafeEnd = document.getElementById("alignSelfUnsafeEnd");
|
|
|
|
checkValues(alignSelfUnsafeEnd, "alignSelf", "align-self", "", "unsafe end");
|
|
|
|
var alignSelfUnsafeCenter = document.getElementById("alignSelfUnsafeCenter");
|
|
|
|
checkValues(alignSelfUnsafeCenter, "alignSelf", "align-self", "", "unsafe center");
|
|
|
|
var alignSelfSafeSelfEnd = document.getElementById("alignSelfSafeSelfEnd");
|
|
|
|
checkValues(alignSelfSafeSelfEnd, "alignSelf", "align-self", "", "safe self-end");
|
|
|
|
var alignSelfSafeSelfStart = document.getElementById("alignSelfSafeSelfStart");
|
|
|
|
checkValues(alignSelfSafeSelfStart, "alignSelf", "align-self", "", "safe self-start");
|
|
|
|
var alignSelfUnsafeFlexStart = document.getElementById("alignSelfUnsafeFlexStart");
|
|
|
|
checkValues(alignSelfUnsafeFlexStart, "alignSelf", "align-self", "", "unsafe flex-start");
|
|
|
|
var alignSelfSafeFlexEnd = document.getElementById("alignSelfSafeFlexEnd");
|
|
|
|
checkValues(alignSelfSafeFlexEnd, "alignSelf", "align-self", "", "safe flex-end");
|
2017-03-29 22:01:11 +00:00
|
|
|
}, "Test getting align-self set through CSS.");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
element = document.createElement("div");
|
|
|
|
document.body.appendChild(element);
|
2017-07-10 23:56:21 +00:00
|
|
|
checkValues(element, "alignSelf", "align-self", "", "auto");
|
2017-03-29 22:01:11 +00:00
|
|
|
}, "Test initial value of align-self through JS");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
container = document.createElement("div");
|
|
|
|
element = document.createElement("div");
|
|
|
|
container.appendChild(element);
|
|
|
|
document.body.appendChild(container);
|
|
|
|
element.style.alignSelf = "center";
|
|
|
|
checkValues(element, "alignSelf", "align-self", "center", "center");
|
|
|
|
|
|
|
|
element.style.alignSelf = "unsafe start";
|
2018-01-22 17:01:51 +00:00
|
|
|
checkValues(element, "alignSelf", "align-self", "unsafe start", "unsafe start");
|
2017-03-29 22:01:11 +00:00
|
|
|
|
2018-01-22 17:01:51 +00:00
|
|
|
element.style.alignSelf = "safe flex-end";
|
|
|
|
checkValues(element, "alignSelf", "align-self", "safe flex-end", "safe flex-end");
|
2017-03-29 22:01:11 +00:00
|
|
|
|
|
|
|
element.style.alignSelf = "center";
|
|
|
|
checkValues(element, "alignSelf", "align-self", "center", "center");
|
|
|
|
|
|
|
|
element.style.alignSelf = "self-start";
|
|
|
|
checkValues(element, "alignSelf", "align-self", "self-start", "self-start");
|
|
|
|
|
2017-07-10 23:56:21 +00:00
|
|
|
element.style.alignSelf = "normal";
|
|
|
|
checkValues(element, "alignSelf", "align-self", "normal", "normal");
|
|
|
|
|
2017-03-29 22:01:11 +00:00
|
|
|
element.style.alignSelf = "auto";
|
2017-07-10 23:56:21 +00:00
|
|
|
checkValues(element, "alignSelf", "align-self", "auto", "auto");
|
2017-03-29 22:01:11 +00:00
|
|
|
|
|
|
|
container.style.display = "flex";
|
|
|
|
element.style.alignSelf = "auto";
|
2017-07-10 23:56:21 +00:00
|
|
|
checkValues(element, "alignSelf", "align-self", "auto", "auto");
|
2017-03-29 22:01:11 +00:00
|
|
|
|
|
|
|
container.style.display = "grid";
|
|
|
|
element.style.alignSelf = "auto";
|
2017-07-10 23:56:21 +00:00
|
|
|
checkValues(element, "alignSelf", "align-self", "auto", "auto");
|
2017-03-29 22:01:11 +00:00
|
|
|
|
|
|
|
element.style.alignSelf = "self-end";
|
|
|
|
checkValues(element, "alignSelf", "align-self", "self-end", "self-end");
|
|
|
|
}, "Test getting and setting align-self through JS");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
document.documentElement.style.alignSelf = "auto";
|
2017-07-10 23:56:21 +00:00
|
|
|
checkValues(document.documentElement, "alignSelf", "align-self", "auto", "auto");
|
2017-03-29 22:01:11 +00:00
|
|
|
}, "Test 'auto' value resolution for the root node");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
container = document.createElement("div");
|
|
|
|
element = document.createElement("div");
|
|
|
|
container.appendChild(element);
|
|
|
|
document.body.appendChild(container);
|
|
|
|
|
[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, "alignSelf", "align-self", "left");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "right");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "safe auto");
|
2017-03-29 22:01:11 +00:00
|
|
|
checkBadValues(element, "alignSelf", "align-self", "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, "alignSelf", "align-self", "safe right");
|
2017-07-10 23:56:21 +00:00
|
|
|
checkBadValues(element, "alignSelf", "align-self", "normal unsafe");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "normal stretch");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "baseline normal");
|
2017-03-29 22:01:11 +00:00
|
|
|
checkBadValues(element, "alignSelf", "align-self", "baseline safe");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "baseline center");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkBadValues(element, "alignSelf", "align-self", "first baseline center");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "last baseline center");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "baseline last");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "baseline first");
|
2017-03-29 22:01:11 +00:00
|
|
|
checkBadValues(element, "alignSelf", "align-self", "stretch unsafe");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "stretch right");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "unsafe unsafe");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "unsafe safe");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "center start");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "stretch unsafe");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "safe stretch");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "baseline safe");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "unsafe baseline");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "unsafe safe left");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "unsafe left safe");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "left safe unsafe safe");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "legacy start");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "legacy end");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "legacy right unsafe");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "legacy auto");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "legacy stretch");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "legacy");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "legacy left right");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkBadValues(element, "alignSelf", "align-self", "start safe");
|
|
|
|
checkBadValues(element, "alignSelf", "align-self", "end unsafe");
|
2017-03-29 22:01:11 +00:00
|
|
|
}, "Test bad combinations of align-self");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
container.style.display = "";
|
2017-07-10 23:56:21 +00:00
|
|
|
checkInitialValues(element, "alignSelf", "align-self", "center", "auto");
|
2017-03-29 22:01:11 +00:00
|
|
|
}, "Test the value 'initial'");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
container.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, "alignSelf", "align-self", "safe start", "auto");
|
2017-03-29 22:01:11 +00:00
|
|
|
}, "Test the value 'initial' for grid containers");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
container.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, "alignSelf", "align-self", "unsafe end", "auto");
|
2017-03-29 22:01:11 +00:00
|
|
|
}, "Test the value 'initial' for flex containers");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
container.style.display = "";
|
|
|
|
element.style.position = "absolute";
|
[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, "alignSelf", "align-self", "start", "auto");
|
2017-03-29 22:01:11 +00:00
|
|
|
}, "Test the value 'initial' for positioned elements");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
container.style.display = "grid";
|
|
|
|
element.style.position = "absolute";
|
[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, "alignSelf", "align-self", "end", "auto");
|
2017-03-29 22:01:11 +00:00
|
|
|
}, "Test the value 'initial' for positioned elements in grid containers");
|
|
|
|
|
|
|
|
test(function() {
|
|
|
|
container.style.display = "flex";
|
|
|
|
element.style.position = "absolute";
|
2017-07-10 23:56:21 +00:00
|
|
|
checkInitialValues(element, "alignSelf", "align-self", "end", "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
|
|
|
}, "Test the value 'initial' for positioned elements in flex containers");
|
2017-03-29 22:01:11 +00:00
|
|
|
|
|
|
|
test(function() {
|
|
|
|
checkInheritValues("alignSelf", "align-self", "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("alignSelf", "align-self", "safe start");
|
2018-01-22 17:01:51 +00:00
|
|
|
checkInheritValues("alignSelf", "align-self", "unsafe center");
|
2017-03-29 22:01:11 +00:00
|
|
|
}, "Test the value 'inherit'");
|
2015-03-30 18:33:39 +00:00
|
|
|
</script>
|