Update web-platform-tests to revision d8b8e0b8efe993a37404d6c6fc75e16fdc16b7d8

This commit is contained in:
WPT Sync Bot 2018-10-25 21:32:39 -04:00
parent abc0f50d20
commit e07315e6af
221 changed files with 7334 additions and 774 deletions

View file

@ -35,6 +35,12 @@ main() {
exit 1
fi
# The maximum Unicode code point is U+10FFFF = 1114111
if [ `$PYTHON -c 'import sys; print(sys.maxunicode)'` != "1114111" ]; then
echo "UCS-4 support for Python is required"
exit 1
fi
virtualenv -p $PYTHON $VENV || { echo "Please ensure virtualenv is installed"; exit 2; }
fi

View file

@ -2,3 +2,4 @@ spec: https://drafts.csswg.org/css-align/
suggested_reviewers:
- dholbert
- emilio
- javifernandez

View file

@ -22,13 +22,13 @@
}
.flexbox > div {
background: red;
background: teal;
flex-grow: 1;
}
span {
.flexbox span {
height: 100%;
background: green;
background: orange;
display: block;
}
</style>
@ -38,19 +38,20 @@ span {
<body onload="checkLayout('.flexbox')">
<div id=log></div>
<p>You should see no red</p>
<!-- The wrapper divs are here to give the flexbox something to fill -->
<!-- This wrapper div is solely here to setup the max height so it can be computed consistently since body at 100% won't be consistent across devices -->
<!-- definite unwrapped column flexbox -->
<div style="height: 100px;">
<div class="flexbox column">
<div class="flexbox column" style="height: 0">
<div>
<span data-expected-height="100"></span>
</div>
</div>
</div>
<!-- definite wrapped column flexbox -->
<div style="height: 100px;">
<div class="flexbox column-wrap">
<div class="flexbox column-wrap" style="height: 0">
<div>
<span data-expected-height="50"></span>
</div>
@ -60,5 +61,26 @@ span {
</div>
</div>
<!-- indefinite unwrapped column flexbox -->
<div style="height: 100px;">
<div class="flexbox column">
<div>
<span data-expected-height="0"></span>
</div>
</div>
</div>
<!-- indefinite wrapped column flexbox -->
<div style="height: 100px;">
<div class="flexbox column-wrap">
<div>
<span data-expected-height="0"></span>
</div>
<div>
<span data-expected-height="0"></span>
</div>
</div>
</div>
</body>
</html>

View file

@ -9,8 +9,8 @@
<desc class="assert">Style properties on content elements of clipPath
must be ignored. A green square should be visible.</desc>
</g>
<clipPath id="clip1" clip-path="url(#clip1)">
<rect x="50" y="50" width="100" height="100" stroke="black" stroke-wdith="10" stroke-dasharray="10 10" fill="none"/>
<clipPath id="clip1">
<rect x="50" y="50" width="100" height="100" stroke="black" stroke-width="10" stroke-dasharray="10 10" fill="none"/>
</clipPath>
<rect width="200" height="200" fill="green" clip-path="url(#clip1)"/>
</svg>
</svg>

Before

Width:  |  Height:  |  Size: 907 B

After

Width:  |  Height:  |  Size: 884 B

Before After
Before After

View file

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Inheritance of CSS Multi-column Layout properties</title>
<link rel="help" href="https://drafts.csswg.org/css-multicol/#property-index">
<meta name="assert" content="Properties should not inherit.">
<meta name="assert" content="Properties have initial values according to the spec.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/inheritance-testcommon.js"></script>
</head>
<body>
<div id="reference"></div>
<div id="container">
<div id="target"></div>
</div>
<style>
#reference {
border-style: dotted; /* Avoid border-top-width computed style 0 */
border-top-width: medium;
}
#container {
color: rgba(42, 53, 64, 0.75);
column-rule-style: dotted; /* Avoid column-rule-width computed style 0 */
}
#target {
column-rule-style: dotted;
}
</style>
<script>
const mediumWidth = getComputedStyle(reference).borderTopWidth; // e.g. 3px
reference.style.display = 'none';
assert_not_inherited('column-count', 'auto', '2');
assert_not_inherited('column-fill', 'balance', 'auto');
assert_not_inherited('column-gap', 'normal', '10px');
assert_not_inherited('column-rule-color', 'rgba(42, 53, 64, 0.75)', 'rgba(2, 3, 5, 0.5)');
assert_not_inherited('column-rule-style', 'none', 'dashed');
assert_not_inherited('column-rule-width', mediumWidth, '10px');
assert_not_inherited('column-span', 'none', 'all');
assert_not_inherited('column-width', 'auto', '10px');
</script>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#filling-columns">
<link rel="help" href="https://www.w3.org/TR/css-break-3/#widows-orphans">
<meta name="assert" content="Make sure that orphans and widows handling inside an inner balanced multicol container doesn't get messed up by the constraining height of an outer multicol container">
<p>There should be three columns below. The text in each column should match the
column number that the text actually ends up in.</p>
<div style="columns:2; height:250px; line-height:50px; column-fill:auto;">
<div style="columns:3; column-rule:solid;" id="inner">
1<br>1<br>2<br>2<br>3<br>3<br>
</div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(()=> {
assert_equals(inner.offsetHeight, 100);
}, "Check that orphans and widows don't make a multicol container taller than necessary");
</script>

View file

@ -25,12 +25,12 @@ assert_not_inherited('scroll-margin-right', '0px', '10px');
assert_not_inherited('scroll-margin-top', '0px', '10px');
assert_not_inherited('scroll-padding-block-end', 'auto', '10px');
assert_not_inherited('scroll-padding-block-start', 'auto', '10px');
assert_not_inherited('scroll-padding-bottom', '0px', '10px');
assert_not_inherited('scroll-padding-bottom', 'auto', '10px');
assert_not_inherited('scroll-padding-inline-end', 'auto', '10px');
assert_not_inherited('scroll-padding-inline-start', 'auto', '10px');
assert_not_inherited('scroll-padding-left', '0px', '10px');
assert_not_inherited('scroll-padding-right', '0px', '10px');
assert_not_inherited('scroll-padding-top', '0px', '10px');
assert_not_inherited('scroll-padding-left', 'auto', '10px');
assert_not_inherited('scroll-padding-right', 'auto', '10px');
assert_not_inherited('scroll-padding-top', 'auto', '10px');
assert_not_inherited('scroll-snap-align', 'none', 'start end');
assert_not_inherited('scroll-snap-stop', 'normal', 'always');
assert_not_inherited('scroll-snap-type', 'none', 'inline proximity');

View file

@ -458,15 +458,18 @@ function setupFonts(func) {
savedValues[key] = document.body.style.getPropertyValue(key);
document.body.style.setProperty(key, value);
});
func.apply(this, arguments);
each(fontProperties, function (key, value) {
if (value) {
document.body.style.setProperty(key, value);
}
else {
document.body.style.removeProperty(key);
}
});
try {
func.apply(this, arguments);
} finally {
each(savedValues, function (key, value) {
if (value) {
document.body.style.setProperty(key, value);
}
else {
document.body.style.removeProperty(key);
}
});
}
};
}

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Inheritance of CSS Text properties</title>
<link rel="help" href="https://drafts.csswg.org/css-text/#property-index">
<meta name="assert" content="Properties inherit according to the spec.">
<meta name="assert" content="Properties have initial values according to the spec.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/inheritance-testcommon.js"></script>
</head>
<body>
<div id="container">
<div id="target"></div>
</div>
<script>
assert_inherited('hanging-punctuation', 'none', 'first last');
assert_inherited('hyphens', 'manual', 'none');
assert_inherited('letter-spacing', 'normal', '10px');
assert_inherited('line-break', 'auto', 'strict');
assert_inherited('overflow-wrap', 'normal', 'break-word');
assert_inherited('tab-size', '8', '10px');
assert_inherited('text-align-all', 'start', 'right');
assert_inherited('text-align-last', 'auto', 'right');
assert_inherited('text-indent', '0px', '10px');
assert_inherited('text-justify', 'auto', 'inter-character');
assert_inherited('text-transform', 'none', 'uppercase');
assert_inherited('white-space', 'normal', 'pre-wrap');
assert_inherited('word-break', 'normal', 'break-all');
assert_inherited('word-spacing', '0px', '10px');
assert_inherited('word-wrap', 'normal', 'break-word');
</script>
</body>
</html>

View file

@ -0,0 +1,36 @@
<!doctype html>
<meta charset="utf-8">
<title>Matrix interpolation</title>
<link rel="help" href="https://drafts.csswg.org/css-transforms-2/#interpolation-of-3d-matrices">
<meta name="assert" content="When interpolating between two matrices, each matrix is decomposed into the corresponding translation, rotation, scale, skew and (for a 3D matrix) perspective values">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/interpolation-testcommon.js"></script>
<body>
<script>
// Test interpolation of quaternions when the dot product is -1.
//
// We need to be particularly careful not to use a rotate function with a zero
// angle since the handling of zero angle rotations may change in future as per:
//
// https://github.com/w3c/csswg-drafts/issues/3236
//
// For rotateY(360deg) we should get a quaternion of:
// [ 0, sin(2 * PI / 2), 0, cos(2 * PI / 2) ]
// = [ 0, 0, 0, -1 ]
//
// For rotateX(720deg) we should get a quaternion of:
// [ 0, 0, sin(4 * PI / 2), cos(4 * PI / 2) ]
// = [ 0, 0, 0, 1 ]
//
// Dot product = 0 * 0 + 0 * 0 + 0 * 0 + 1 * -1 = -1
test_interpolation(
{
property: 'transform',
from: 'rotateY(360deg)',
to: 'rotateX(720deg)',
},
[{ at: 0.5, expect: 'matrix(1, 0, 0, 1, 0, 0)' }]
);
</script>
</body>

View file

@ -0,0 +1,47 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Inheritance of CSS Basic User Interface properties</title>
<link rel="help" href="https://drafts.csswg.org/css-ui/#property-index">
<meta name="assert" content="Properties inherit or not according to the spec.">
<meta name="assert" content="Properties have initial values according to the spec.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/inheritance-testcommon.js"></script>
</head>
<body>
<div id="reference"></div>
<div id="container">
<div id="target"></div>
</div>
<style>
#reference {
border-style: dotted; /* Avoid border-top-width computed style 0 */
border-top-width: medium;
}
#container, #target {
outline-style: dotted; /* Avoid outline-width computed style 0 */
}
</style>
<script>
const mediumWidth = getComputedStyle(reference).borderTopWidth; // e.g. 3px
assert_not_inherited('appearance', 'auto', 'none');
assert_inherited('caret-color', 'auto', 'rgba(42, 53, 64, 0.75)');
assert_inherited('caret-shape', 'auto', 'bar');
assert_inherited('cursor', 'auto', 'pointer');
assert_not_inherited('nav-down', 'auto', '#foo');
assert_not_inherited('nav-left', 'auto', '#foo');
assert_not_inherited('nav-right', 'auto', '#foo');
assert_not_inherited('nav-up', 'auto', '#foo');
assert_not_inherited('outline-color', 'invert', 'rgba(42, 53, 64, 0.75)');
assert_not_inherited('outline-offset', '0px', '10px');
assert_not_inherited('outline-style', 'none', 'auto');
assert_not_inherited('outline-width', mediumWidth, '10px');
assert_not_inherited('resize', 'none', 'vertical');
assert_not_inherited('user-select', 'auto', 'none');
</script>
</body>
</html>

View file

@ -0,0 +1,36 @@
<!doctype html>
<title>CSS Test Reference.</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<style>
* {
margin: 0;
padding: 0;
}
:root, #outer {
width: 100vw;
height: 100vh;
overflow: hidden;
}
#outer {
transform-origin: 0 0;
transform: scale(5);
}
#pad {
/* So that scaling by five it takes half of the viewport */
height: 10vh;
}
#filtered {
width: 100%;
height: 10vh;
background: green;
}
</style>
<div id="outer">
<div id="pad"></div>
<div id="filtered"></div>
</div>

View file

@ -0,0 +1,47 @@
<!doctype html>
<title>CSS Test: Blur filter scaling.</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://drafts.fxtf.org/filter-effects/#FilterProperty">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1224207">
<link rel="match" href="filter-scaling-001-ref.html">
<style>
* {
margin: 0;
padding: 0;
}
:root, #outer {
width: 100vw;
height: 100vh;
overflow: hidden;
}
#outer {
transform-origin: 0 0;
transform: scale(5);
}
#pad {
/* So that scaling by five it takes half of the viewport */
height: 10vh;
}
#filtered {
filter: url(#blur);
width: 100%;
height: 10vh;
background: green;
}
</style>
<div id="outer">
<div id="pad"></div>
<div id="filtered"></div>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs>
<filter id="blur">
<feGaussianBlur in="SourceGraphic" stdDeviation="0,0"></feGaussianBlur>
</filter>
</defs>
</svg>
</div>

View file

@ -10,6 +10,14 @@ function assert_initial(property, initial) {
}, 'Property ' + property + ' has initial value ' + initial);
}
/**
* Create tests that a CSS property inherits and has the given initial value.
*
* @param {string} property The name of the CSS property being tested.
* @param {string} initial The computed value for 'initial'.
* @param {string} other An arbitrary value for the property that round
* trips and is distinct from the initial value.
*/
function assert_inherited(property, initial, other) {
assert_initial(property, initial);
@ -33,6 +41,15 @@ function assert_inherited(property, initial, other) {
}, 'Property ' + property + ' inherits');
}
/**
* Create tests that a CSS property does not inherit, and that it has the
* given initial value.
*
* @param {string} property The name of the CSS property being tested.
* @param {string} initial The computed value for 'initial'.
* @param {string} other An arbitrary value for the property that round
* trips and is distinct from the initial value.
*/
function assert_not_inherited(property, initial, other) {
assert_initial(property, initial);