mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision 132d12daea699ce266324e79eecbe59b10e56502
This commit is contained in:
parent
527d874bc1
commit
fe00a63040
1004 changed files with 18598 additions and 92770 deletions
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text Test: overflow-wrap: break-word and intrinsic sizing</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property">
|
||||
<meta name="flags" content="">
|
||||
<link rel="match" href="reference/overflow-wrap-min-content-size-001-ref.html">
|
||||
<meta name="assert" content="Soft wrap opportunities introduced by overflow-wrap:break-word **are** considered when calculating min-content intrinsic sizes.">
|
||||
<style>
|
||||
table {
|
||||
overflow-wrap: break-word;
|
||||
max-width: 0;
|
||||
border: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
td {
|
||||
padding: 0;
|
||||
background: green;
|
||||
color: transparent;
|
||||
}
|
||||
#red {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
background: red;
|
||||
color: transparent;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a green box below and no red.
|
||||
<div id=red>X<br>X<br>X<br>X</div>
|
||||
<table><tr><td>XXXX</table>
|
||||
|
||||
<!--
|
||||
width:min-content on the div directly without using a table
|
||||
would achieve the goal of this test, and be a lot simpler.
|
||||
|
||||
However, width:min-content is not yet widely supported.
|
||||
|
||||
Using a table, and forcing it to be as small as possible
|
||||
will achieve min-content sizing of the div in all browsers.
|
||||
-->
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text Test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<style>
|
||||
div {
|
||||
position: absolute;
|
||||
background: green;
|
||||
color: transparent;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a green box below and no red.
|
||||
<div>X<br>X<br>X<br>X</div>
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#propdef-word-wrap">
|
||||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/866">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="test" style="word-wrap: break-word; overflow-wrap: break-word;"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
const div = document.getElementById("test");
|
||||
assert_equals(div.style.cssText, "overflow-wrap: break-word;", "Only overflow-wrap should appear when serializing the declaration.");
|
||||
assert_equals(div.style.wordWrap, "break-word");
|
||||
assert_equals(div.style.overflowWrap, "break-word");
|
||||
assert_equals(getComputedStyle(div).wordWrap, "break-word");
|
||||
assert_equals(getComputedStyle(div).overflowWrap, "break-word");
|
||||
}, "word-wrap should be defined as an alias of overflow-wrap");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue