mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
3a02ab4d4d
- Bug 1131308 (part 0) - Fix minor problems with RemovingIterator. r=froydnj. (5c232c9ca)
- Bug 1176163 - Remove remaining uses of PL_DHashTableEnumerate() from xpcom/. r=froydnj. (bd2478b3a)
- Bug 1179657 - Remove PL_DHASHMETER. r=froydnj. (30f581478)
- Bug 1131308 (part 1) - Improve PLDHashTable's internal checking. r=froydnj. (faba4a3b9)
- Bug 1180084 - Convert TestPLDHash.cpp to a gtest. r=froydnj. (de6ee3c5c)
- Bug 1171578 - Avoid crashing if indexedDB is used at a particular point in the worker shutdown sequence, r=baku. (f325c218e)
- Bug 804975 - Part 1: Expose WritingMode bits. r=dbaron (0635d01dd)
- Bug 1072101 - Part 1: Implement FontFaceSet.size. r=peterv (7e0b4848a)
- Bug 1144977 - Part 1: Don't include FontFace objects in more than one loadingdone/loadingerror event. r=jdaggett (4d10b3269)
- Bug 1072101 - Part 2: Implement FontFaceSet.{entries,values}. r=peterv (1c636f4f1)
- Bug 1072101 - Part 3: Implement FontFaceSet.forEach. r=peterv (842a5cdbe)
- Bug 1072101 - Part 4: Implement FontFaceSet.{keys,@@iterator}. r=peterv (4dfb3afe9)
- Bug 1072101 - Part 5: Remove indexed property access on FontFaceSet. r=peterv (edef47d70)
- Bug 1072101 - Unified build fix; no review. (7c1538f6c)
- Bug 861449 - Incremental css::Rule destroyer. r=dbaron (5e60f4394)
- Bug 1175800 - Remove typedefs from nsComputedDOMStyle.cpp as they interfere with others under unified compilation. r=bzbarsky (2bd45e7ed)
- Bug 1147766 - Part 1: Add a mozilla::RangedArray class, for fixed length arrays with a non-zero base index. r=waldo (42be428bc)
- Bug 1147766 - Part 2: Replace FixedStyleStructArray with mozilla::RangedArray. r=dbaron (4d28a0a5e)
- Bug 1171282 - Avoid some unnecessary |operator new| null-checks in layout/. r=dholbert. (60e1690c1)
- Bug 1168664 - Stop mistakenly using the transform reference box's width to calculate the Z component in ProcessMatrix3D. r=mattwoodrow (18f9021b1)
- Bug 1171842 - Use jump table instead of nested if statements for peeking compute function of style struct. r=dbaron (a5160b962)
- Bug 1170173 - Parse CSS 'contain' property. r=dholbert (3d8a37dee)
- Bug 1144607 part 1 - Remove CounterStyleManager::BuildCounterStyle for anonymous counter styles. r=dbaron (331397d01)
- Bug 1144607 part 2 - Support string value for list-style-tyle. r=dbaron (0b4bca0c7)
- Bug 1144607 part 3 - Reftests for string value on list-style-type. r=dbaron (2a483f621)
- Bug 1144607 followup - Fix submitted reftest for string value of list-style-type. DONTBUILD (ad23ac443)
- Bug 1151220 - [css-grid] Fix a couple of typos in InitializeTrackSize. r=dholbert (840f3b8a4)
- Bug 1151201 - [css-grid] Update parsing of 'auto' in track-sizing functions to latest version of the spec. r=simon.sapin (abdb0c0ea)
241 lines
6.9 KiB
HTML
241 lines
6.9 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset=utf-8>
|
|
<title>Test parsing of grid container shorthands (grid-template, grid)</title>
|
|
<link rel="author" title="Simon Sapin" href="mailto:simon.sapin@exyr.org">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<link rel='stylesheet' href='/resources/testharness.css'>
|
|
</head>
|
|
<body>
|
|
|
|
<script>
|
|
|
|
var initial_values = {
|
|
gridTemplateAreas: "none",
|
|
gridTemplateColumns: "none",
|
|
gridTemplateRows: "none",
|
|
gridAutoFlow: "row",
|
|
// Computed value for 'auto'
|
|
gridAutoColumns: "auto",
|
|
gridAutoRows: "auto",
|
|
};
|
|
|
|
// For various specified values of the grid-template shorthand,
|
|
// test the computed values of the corresponding longhands.
|
|
var grid_template_test_cases = [
|
|
{
|
|
specified: "none",
|
|
},
|
|
{
|
|
specified: "40px / 100px",
|
|
gridTemplateColumns: "40px",
|
|
gridTemplateRows: "100px",
|
|
},
|
|
{
|
|
specified: "(foo) 40px (bar) / (baz) 100px (fizz)",
|
|
gridTemplateColumns: "(foo) 40px (bar)",
|
|
gridTemplateRows: "(baz) 100px (fizz)",
|
|
},
|
|
{
|
|
specified: " none/100px",
|
|
gridTemplateColumns: "none",
|
|
gridTemplateRows: "100px",
|
|
},
|
|
{
|
|
specified: "40px/none",
|
|
gridTemplateColumns: "40px",
|
|
gridTemplateRows: "none",
|
|
},
|
|
{
|
|
specified: "40px/repeat(1, 20px)",
|
|
gridTemplateColumns: "40px",
|
|
gridTemplateRows: "20px",
|
|
},
|
|
{
|
|
specified: "40px/(a)repeat(1, 20px)",
|
|
gridTemplateColumns: "40px",
|
|
gridTemplateRows: "(a) 20px",
|
|
},
|
|
{
|
|
specified: "40px/repeat(1, (a) 20px)",
|
|
gridTemplateColumns: "40px",
|
|
gridTemplateRows: "(a) 20px",
|
|
},
|
|
{
|
|
specified: "40px/(a)repeat(2, (b)20px)",
|
|
gridTemplateColumns: "40px",
|
|
gridTemplateRows: "(a b) 20px (b) 20px",
|
|
},
|
|
{
|
|
specified: "40px/(a)repeat(2, 20px)",
|
|
gridTemplateColumns: "40px",
|
|
gridTemplateRows: "(a) 20px 20px",
|
|
},
|
|
{
|
|
specified: "40px/repeat(2, (a) 20px)",
|
|
gridTemplateColumns: "40px",
|
|
gridTemplateRows: "(a) 20px (a) 20px",
|
|
},
|
|
{
|
|
specified: "40px/(a)repeat(2, (b)20px)",
|
|
gridTemplateColumns: "40px",
|
|
gridTemplateRows: "(a b) 20px (b) 20px",
|
|
},
|
|
{
|
|
specified: "40px/repeat(2, 20px(a))",
|
|
gridTemplateColumns: "40px",
|
|
gridTemplateRows: "20px (a) 20px (a)",
|
|
},
|
|
{
|
|
specified: "40px/repeat(2, 20px(a)) (b)",
|
|
gridTemplateColumns: "40px",
|
|
gridTemplateRows: "20px (a) 20px (a b)",
|
|
},
|
|
{
|
|
specified: "40px/repeat(2, (a) 20px(b)) (c)",
|
|
gridTemplateColumns: "40px",
|
|
gridTemplateRows: "(a) 20px (b a) 20px (b c)",
|
|
},
|
|
{
|
|
specified: "40px/(a) repeat(3, (b c) 20px (d) 100px (e f)) (g)",
|
|
gridTemplateColumns: "40px",
|
|
gridTemplateRows: "(a b c) 20px (d) 100px (e f b c) 20px (d) 100px (e f b c) 20px (d) 100px (e f g)",
|
|
},
|
|
{
|
|
specified: "'fizz'",
|
|
gridTemplateAreas: "\"fizz\"",
|
|
gridTemplateRows: "auto",
|
|
},
|
|
{
|
|
specified: "(bar) 'fizz'",
|
|
gridTemplateAreas: "\"fizz\"",
|
|
gridTemplateRows: "(bar) auto",
|
|
},
|
|
{
|
|
specified: "(foo) 40px / 'fizz'",
|
|
gridTemplateAreas: "\"fizz\"",
|
|
gridTemplateColumns: "(foo) 40px",
|
|
gridTemplateRows: "auto",
|
|
},
|
|
{
|
|
specified: "(foo) 40px / (bar) 'fizz'",
|
|
gridTemplateAreas: "\"fizz\"",
|
|
gridTemplateColumns: "(foo) 40px",
|
|
gridTemplateRows: "(bar) auto",
|
|
},
|
|
{
|
|
specified: "(foo) 40px / 'fizz' 100px",
|
|
gridTemplateAreas: "\"fizz\"",
|
|
gridTemplateColumns: "(foo) 40px",
|
|
gridTemplateRows: "100px",
|
|
},
|
|
{
|
|
specified: "(foo) 40px / (bar) 'fizz' 100px (buzz) \n (a) '.' 200px (b)",
|
|
gridTemplateAreas: "\"fizz\" \".\"",
|
|
gridTemplateColumns: "(foo) 40px",
|
|
gridTemplateRows: "(bar) 100px (buzz a) 200px (b)",
|
|
},
|
|
{
|
|
specified: "subgrid",
|
|
gridTemplateColumns: "subgrid",
|
|
gridTemplateRows: "subgrid",
|
|
},
|
|
{
|
|
specified: "subgrid / subgrid",
|
|
gridTemplateColumns: "subgrid",
|
|
gridTemplateRows: "subgrid",
|
|
},
|
|
{
|
|
specified: "subgrid / subgrid (foo)",
|
|
gridTemplateColumns: "subgrid",
|
|
gridTemplateRows: "subgrid (foo)",
|
|
},
|
|
{
|
|
specified: "subgrid / subgrid (foo) repeat(3, () (a b) (c))",
|
|
gridTemplateColumns: "subgrid",
|
|
gridTemplateRows: "subgrid (foo) () (a b) (c) () (a b) (c) () (a b) (c)",
|
|
},
|
|
{
|
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=978478#c1
|
|
// The number of repetitions is clamped to
|
|
// #define GRID_TEMPLATE_MAX_REPETITIONS 10000
|
|
specified: "subgrid / subgrid (foo) repeat(999999999, (a))",
|
|
gridTemplateColumns: "subgrid",
|
|
// Array(n + 1).join(s) is a hack for the non-standard s.repeat(n)
|
|
gridTemplateRows: "subgrid (foo)" + Array(10000 + 1).join(" (a)"),
|
|
},
|
|
{
|
|
specified: "subgrid () (foo)/ subgrid (bar",
|
|
gridTemplateColumns: "subgrid () (foo)",
|
|
gridTemplateRows: "subgrid (bar)",
|
|
},
|
|
];
|
|
|
|
grid_test_cases = grid_template_test_cases.concat([
|
|
{
|
|
specified: "row",
|
|
gridAutoFlow: "row",
|
|
},
|
|
{
|
|
specified: "dense",
|
|
gridAutoFlow: "row dense",
|
|
},
|
|
{
|
|
specified: "row 40px",
|
|
gridAutoFlow: "row",
|
|
gridAutoColumns: "40px",
|
|
},
|
|
{
|
|
specified: "column 40px",
|
|
gridAutoFlow: "column",
|
|
gridAutoColumns: "40px",
|
|
},
|
|
{
|
|
specified: "column dense auto",
|
|
gridAutoFlow: "column dense",
|
|
gridAutoColumns: "auto",
|
|
},
|
|
{
|
|
specified: "dense row minmax(min-content, 2fr)",
|
|
gridAutoFlow: "row dense",
|
|
gridAutoColumns: "minmax(min-content, 2fr)",
|
|
},
|
|
{
|
|
specified: "row 40px / 100px",
|
|
gridAutoFlow: "row",
|
|
gridAutoColumns: "40px",
|
|
gridAutoRows: "100px",
|
|
},
|
|
]);
|
|
|
|
function run_tests(test_cases, shorthand, subproperties) {
|
|
test_cases.forEach(function(test_case) {
|
|
test(function() {
|
|
var element = document.createElement('div');
|
|
document.body.appendChild(element);
|
|
element.style[shorthand] = test_case.specified;
|
|
var computed = window.getComputedStyle(element);
|
|
subproperties.forEach(function(longhand) {
|
|
assert_equals(
|
|
computed[longhand],
|
|
test_case[longhand] || initial_values[longhand],
|
|
longhand
|
|
);
|
|
});
|
|
}, "test parsing of 'grid-template: " + test_case.specified + "'");
|
|
});
|
|
}
|
|
|
|
run_tests(grid_template_test_cases, "gridTemplate", [
|
|
"gridTemplateAreas", "gridTemplateColumns", "gridTemplateRows"]);
|
|
|
|
run_tests(grid_test_cases, "grid", [
|
|
"gridTemplateAreas", "gridTemplateColumns", "gridTemplateRows",
|
|
"gridAutoFlow", "gridAutoColumns", "gridAutoRows"]);
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|