mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 1499281 - Remove column-span pref in mochitests and property databases. r=dbaron
Move the content of bug1503420.html to test_frame_reconstruction_for_column_span.html because we don't need to flip the pref and load the test in an iframe. The modification to devtools's properties-db.js is generated via `./mach devtools-css-db`. Differential Revision: https://phabricator.services.mozilla.com/D58402 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
349e6afe6b
commit
bc3ffa5195
@ -10877,10 +10877,6 @@ exports.PSEUDO_ELEMENTS = [
|
||||
* exposed for testing purposes.
|
||||
*/
|
||||
exports.PREFERENCES = [
|
||||
[
|
||||
"column-span",
|
||||
"layout.css.column-span.enabled"
|
||||
],
|
||||
[
|
||||
"contain",
|
||||
"layout.css.contain.enabled"
|
||||
@ -11101,10 +11097,6 @@ exports.PREFERENCES = [
|
||||
"-webkit-appearance",
|
||||
"layout.css.webkit-appearance.enabled"
|
||||
],
|
||||
[
|
||||
"-moz-column-span",
|
||||
"layout.css.column-span.enabled"
|
||||
],
|
||||
[
|
||||
"-moz-font-feature-settings",
|
||||
"layout.css.prefixes.font-features"
|
||||
|
@ -1,77 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<title>
|
||||
Test for Bug 1503420: Test we don't reframe multi-column containing block
|
||||
when appending a block containing a spanner kid.
|
||||
</title>
|
||||
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
|
||||
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<script>
|
||||
const utils = SpecialPowers.getDOMWindowUtils(window);
|
||||
|
||||
function appendBlock() {
|
||||
// Create a subtree like the following, and append it to columns.
|
||||
// <div>
|
||||
// <h3>spanner</h3>
|
||||
// block2
|
||||
// </div>
|
||||
var spanner = document.createElement("h3");
|
||||
var spannerText = document.createTextNode("spanner");
|
||||
spanner.appendChild(spannerText);
|
||||
|
||||
var block2 = document.createElement("div");
|
||||
var block2Text = document.createTextNode("block2");
|
||||
block2.appendChild(spanner);
|
||||
block2.appendChild(block2Text)
|
||||
|
||||
var column = document.getElementById("column");
|
||||
column.appendChild(block2);
|
||||
}
|
||||
|
||||
function runTest() {
|
||||
document.documentElement.offsetTop;
|
||||
// We expected to construct 6 more frames.
|
||||
// 1) Block frame for <div>
|
||||
// 2) Block frame for <h3>
|
||||
// 3) Text frame for "spanner"
|
||||
// 4) Text frame for "block2"
|
||||
// 5) Column-span wrapper for <h3>, which is a sibling of <div>
|
||||
// 6) Column-span wrapper for 5), which is a sibling of <article>
|
||||
// Note: creating a continuation frame doesn't increase the count.
|
||||
const expectedFrameConstructCount = utils.framesConstructed + 6;
|
||||
|
||||
appendBlock();
|
||||
document.documentElement.offsetTop;
|
||||
|
||||
window.parent.postMessage({
|
||||
"actualResult": utils.framesConstructed,
|
||||
"expectedResult": expectedFrameConstructCount,
|
||||
"message": "We shouldn't construct unexpected frames.",
|
||||
}, "*");
|
||||
|
||||
window.parent.postMessage({"done": true}, "*");
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#column {
|
||||
column-count: 3;
|
||||
column-rule: 6px solid;
|
||||
width: 400px;
|
||||
outline: 1px solid black;
|
||||
}
|
||||
h3 {
|
||||
column-span: all;
|
||||
outline: 1px solid blue;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body onload="runTest();">
|
||||
<article id="column">
|
||||
<div>block1</div>
|
||||
</article>
|
||||
</body>
|
||||
</html>
|
@ -151,8 +151,6 @@ skip-if = toolkit == 'android' # Bug 1355836
|
||||
[test_flush_on_paint.html]
|
||||
skip-if = true # Bug 688128
|
||||
[test_frame_reconstruction_for_column_span.html]
|
||||
support-files =
|
||||
bug1503420.html
|
||||
[test_frame_reconstruction_for_pseudo_elements.html]
|
||||
[test_frame_reconstruction_for_svg_transforms.html]
|
||||
[test_frame_reconstruction_scroll_restore.html]
|
||||
|
@ -2,9 +2,10 @@
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<title>
|
||||
Loader to test frame construction for column span.
|
||||
Test for Bug 1503420: Test we don't reframe multi-column containing block
|
||||
when appending a block containing a spanner kid.
|
||||
</title>
|
||||
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
|
||||
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
|
||||
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
@ -12,34 +13,65 @@
|
||||
<script>
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function receiveMessage(event)
|
||||
{
|
||||
console.log(event);
|
||||
if (event.data.done) {
|
||||
window.removeEventListener("message", receiveMessage);
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
const utils = SpecialPowers.getDOMWindowUtils(window);
|
||||
|
||||
is(event.data.actualResult, event.data.expectedResult,
|
||||
event.data.message);
|
||||
function appendBlock() {
|
||||
// Create a subtree like the following, and append it to columns.
|
||||
// <div>
|
||||
// <h3>spanner</h3>
|
||||
// block2
|
||||
// </div>
|
||||
var spanner = document.createElement("h3");
|
||||
var spannerText = document.createTextNode("spanner");
|
||||
spanner.appendChild(spannerText);
|
||||
|
||||
var block2 = document.createElement("div");
|
||||
var block2Text = document.createTextNode("block2");
|
||||
block2.appendChild(spanner);
|
||||
block2.appendChild(block2Text)
|
||||
|
||||
var column = document.getElementById("column");
|
||||
column.appendChild(block2);
|
||||
}
|
||||
|
||||
function prepareTest() {
|
||||
window.addEventListener("message", receiveMessage);
|
||||
function runTest() {
|
||||
document.documentElement.offsetTop;
|
||||
// We expected to construct 6 more frames.
|
||||
// 1) Block frame for <div>
|
||||
// 2) Block frame for <h3>
|
||||
// 3) Text frame for "spanner"
|
||||
// 4) Text frame for "block2"
|
||||
// 5) Column-span wrapper for <h3>, which is a sibling of <div>
|
||||
// 6) Column-span wrapper for 5), which is a sibling of <article>
|
||||
// Note: creating a continuation frame doesn't increase the count.
|
||||
const expectedFrameConstructCount = utils.framesConstructed + 6;
|
||||
|
||||
SpecialPowers.pushPrefEnv({
|
||||
"set": [
|
||||
["layout.css.column-span.enabled", true]
|
||||
]
|
||||
}, function () {
|
||||
let iframe = document.getElementById("testFrame");
|
||||
iframe.src = "bug1503420.html";
|
||||
});
|
||||
appendBlock();
|
||||
document.documentElement.offsetTop;
|
||||
|
||||
is(utils.framesConstructed, expectedFrameConstructCount,
|
||||
"We shouldn't construct unexpected frames.");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
</script>
|
||||
|
||||
<body onload="prepareTest()">
|
||||
<iframe id="testFrame" height="500" width="500"></iframe>
|
||||
<style>
|
||||
#column {
|
||||
column-count: 3;
|
||||
column-rule: 6px solid;
|
||||
width: 400px;
|
||||
outline: 1px solid black;
|
||||
}
|
||||
h3 {
|
||||
column-span: all;
|
||||
outline: 1px solid blue;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body onload="runTest();">
|
||||
<article id="column">
|
||||
<div>block1</div>
|
||||
</article>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -2668,6 +2668,21 @@ var gCSSProperties = {
|
||||
alias_for: "column-rule-color",
|
||||
subproperties: ["column-rule-color"],
|
||||
},
|
||||
"column-span": {
|
||||
domProp: "columnSpan",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: ["none"],
|
||||
other_values: ["all"],
|
||||
invalid_values: ["-1", "0", "auto", "2px"],
|
||||
},
|
||||
"-moz-column-span": {
|
||||
domProp: "MozColumnSpan",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
alias_for: "column-span",
|
||||
subproperties: ["column-span"],
|
||||
},
|
||||
"column-width": {
|
||||
domProp: "columnWidth",
|
||||
inherited: false,
|
||||
@ -12558,24 +12573,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.offset-logical-properties.enabled")) {
|
||||
|
||||
gCSSProperties["display"].other_values.push("flow-root");
|
||||
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.column-span.enabled")) {
|
||||
gCSSProperties["column-span"] = {
|
||||
domProp: "columnSpan",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: ["none"],
|
||||
other_values: ["all"],
|
||||
invalid_values: ["-1", "0", "auto", "2px"],
|
||||
};
|
||||
gCSSProperties["-moz-column-span"] = {
|
||||
domProp: "MozColumnSpan",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
alias_for: "column-span",
|
||||
subproperties: ["column-span"],
|
||||
};
|
||||
}
|
||||
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.webkit-line-clamp.enabled")) {
|
||||
gCSSProperties["-webkit-line-clamp"] = {
|
||||
domProp: "webkitLineClamp",
|
||||
|
Loading…
Reference in New Issue
Block a user