Issue #12421: tidy should also check .html files

This commit is contained in:
Simon Martin 2016-07-23 15:29:46 +02:00
parent 5e83b3f83b
commit 1e60c915f9
85 changed files with 696 additions and 691 deletions

View file

@ -27,7 +27,7 @@ MAX_LICENSE_LINESPAN = max(len(license.splitlines()) for license in licenses)
# File patterns to include in the non-WPT tidy check.
FILE_PATTERNS_TO_CHECK = ["*.rs", "*.rc", "*.cpp", "*.c",
"*.h", "Cargo.lock", "*.py", "*.sh",
"*.toml", "*.webidl", "*.json"]
"*.toml", "*.webidl", "*.json", "*.html"]
# File patterns that are ignored for all tidy and lint checks.
FILE_PATTERNS_TO_IGNORE = ["*.#*", "*.pyc"]
@ -44,6 +44,11 @@ IGNORED_FILES = [
os.path.join(".", "tests", "wpt", "metadata-css", "MANIFEST.json"),
os.path.join(".", "components", "script", "dom", "webidls", "ForceTouchEvent.webidl"),
os.path.join(".", "support", "android", "openssl.sh"),
# Ignore those files since the issues reported are on purpose
os.path.join(".", "tests", "html", "bad-line-ends.html"),
os.path.join(".", "tests", "unit", "net", "parsable_mime", "text"),
os.path.join(".", "tests", "wpt", "mozilla", "tests", "css", "fonts"),
os.path.join(".", "tests", "wpt", "mozilla", "tests", "css", "pre_with_tab.html"),
# FIXME(pcwalton, #11679): This is a workaround for a tidy error on the quoted string
# `"__TEXT,_info_plist"` inside an attribute.
os.path.join(".", "components", "servo", "platform", "macos", "mod.rs"),
@ -148,7 +153,7 @@ def filter_files(start_dir, only_changed_files, progress):
def check_license(file_name, lines):
if any(file_name.endswith(ext) for ext in (".toml", ".lock", ".json")):
if any(file_name.endswith(ext) for ext in (".toml", ".lock", ".json", ".html")):
raise StopIteration
while lines and (lines[0].startswith(EMACS_HEADER) or lines[0].startswith(VIM_HEADER)):
lines = lines[1:]
@ -168,7 +173,7 @@ def check_modeline(file_name, lines):
def check_length(file_name, idx, line):
if file_name.endswith(".lock") or file_name.endswith(".json"):
if file_name.endswith(".lock") or file_name.endswith(".json") or file_name.endswith(".html"):
raise StopIteration
# Prefer shorter lines when shell scripting.
if file_name.endswith(".sh"):
@ -672,7 +677,7 @@ def collect_errors_for_files(files_to_check, checking_functions, line_checking_f
def get_wpt_files(only_changed_files, progress):
wpt_dir = os.path.join(".", "tests", "wpt", "web-platform-tests" + os.sep)
wpt_dir = os.path.join(".", "tests", "wpt" + os.sep)
file_iter = get_file_list(os.path.join(wpt_dir), only_changed_files)
(has_element, file_iter) = is_iter_empty(file_iter)
if not has_element:

View file

@ -1,10 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>
display/box/float/clear test
</title>
<style type="text/css">
<title>
display/box/float/clear test
</title>
<style type="text/css">
/* last modified: 1 Dec 98 */
html {
@ -125,59 +125,59 @@ font-weight: normal;
font-size: 1em;
}
</style>
</head>
<body>
<dl>
<dt>
toggle
</dt>
<dd>
<ul>
<li>
the way
</li>
<li id="bar">
<p>
the world ends
</p>
<form action="./" method="get">
<p>
bang
<input name="foo" value="off" type="radio">
</p>
<p>
whimper
<input name="foo2" value="on" type="radio">
</p>
</form>
</li>
<li>
i grow old
</li>
<li id="baz">
pluot?
</li>
</ul>
<blockquote>
<address>
bar maids,
</address>
</blockquote>
<h1>
sing to me, erbarme dich
</h1>
</dd>
</dl>
<p style="color: black; font-size: 1em; line-height: 1.3em; clear: both">
This is a nonsensical document, but syntactically valid HTML 4.0. All
</head>
<body>
<dl>
<dt>
toggle
</dt>
<dd>
<ul>
<li>
the way
</li>
<li id="bar">
<p>
the world ends
</p>
<form action="./" method="get">
<p>
bang
<input name="foo" value="off" type="radio">
</p>
<p>
whimper
<input name="foo2" value="on" type="radio">
</p>
</form>
</li>
<li>
i grow old
</li>
<li id="baz">
pluot?
</li>
</ul>
<blockquote>
<address>
bar maids,
</address>
</blockquote>
<h1>
sing to me, erbarme dich
</h1>
</dd>
</dl>
<p style="color: black; font-size: 1em; line-height: 1.3em; clear: both">
This is a nonsensical document, but syntactically valid HTML 4.0. All
100%-conformant CSS1 agents should be able to render the document
elements above this paragraph indistinguishably (to the pixel) from this
<a href="http://www.w3.org/Style/CSS/Test/CSS1/current/sec5526c.gif">reference rendering,</a>
(except font rasterization and form widgets). All discrepancies
<a href="http://www.w3.org/Style/CSS/Test/CSS1/current/sec5526c.gif">reference rendering,</a>
(except font rasterization and form widgets). All discrepancies
should be traceable to CSS1 implementation shortcomings. Once you have
finished evaluating this test, you can return to the <a href="http://www.w3.org/Style/CSS/Test/CSS1/current/sec5526c.htm">parent page</a>.
</p>
</p>
</body></html>

View file

@ -4,15 +4,15 @@
:active {border:1px solid #A61D61; background-color:#DC2F85; color:#333232;}
</style>
<body>
<fieldset>
<a href="https://servo.org/">
Link
</a>
<button>Click Me!</button>
<button disabled>You can't activate me</button>
<a>Anchor with no href</a>
<link href="www.mozilla.com">Link</link>
<link>Link with no href</link>
</fieldset>
<fieldset>
<a href="https://servo.org/">
Link
</a>
<button>Click Me!</button>
<button disabled>You can't activate me</button>
<a>Anchor with no href</a>
<link href="www.mozilla.com">Link</link>
<link>Link with no href</link>
</fieldset>
</body>
</html>

View file

@ -1,20 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<style>
.test { background: url(rust-0.png) gray; }
</style>
<body>
<div class="test" style="width:200px; height:200px; color:red;">
background: url(rust-0.png) gray; width:200px; height:200px;
</div>
<div class="test" style="background-image: url(rust-45.png); width:200px; height:200px; color:red;">
background-image: url(rust-45.png); width:200px; height:200px;
</div>
<div style="background: url(rust-90.png) yellow; width:200px; height:200px; border: 5px solid #000; color:blue;">
background: url(rust-90.png) yellow; width:200px; height:200px; border: 5px solid #000;
</div>
</body>
<head>
<title></title>
</head>
<style>
.test { background: url(rust-0.png) gray; }
</style>
<body>
<div class="test" style="width:200px; height:200px; color:red;">
background: url(rust-0.png) gray; width:200px; height:200px;
</div>
<div class="test" style="background-image: url(rust-45.png); width:200px; height:200px; color:red;">
background-image: url(rust-45.png); width:200px; height:200px;
</div>
<div style="background: url(rust-90.png) yellow; width:200px; height:200px; border: 5px solid #000; color:blue;">
background: url(rust-90.png) yellow; width:200px; height:200px; border: 5px solid #000;
</div>
</body>
</html>

View file

@ -15,23 +15,23 @@ var longcat_mid = longcats[1];
var longcat_bot = longcats[2];
function wait_for_img_load(f) {
if (longcat_top.width != 0 && longcat_mid.width != 0 && longcat_bot.width != 0) {
f();
} else {
window.setTimeout(function() { wait_for_img_load(f) }, 1);
}
if (longcat_top.width != 0 && longcat_mid.width != 0 && longcat_bot.width != 0) {
f();
} else {
window.setTimeout(function() { wait_for_img_load(f) }, 1);
}
}
wait_for_img_load(function() {
var count = 0;
function elongate() {
var height = Math.round((Math.cos(count + Math.PI) + 1) * 100 + 20);
count += 0.2;
longcat_mid.height = height;
longcat_mid.width = 600;
window.setTimeout(function() { elongate() }, 50);
}
elongate();
var count = 0;
function elongate() {
var height = Math.round((Math.cos(count + Math.PI) + 1) * 100 + 20);
count += 0.2;
longcat_mid.height = height;
longcat_mid.width = 600;
window.setTimeout(function() { elongate() }, 50);
}
elongate();
});
</script>
</body>

View file

@ -1,8 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dashboard Page</title>
<meta charset="UTF-8">
<title>Dashboard Page</title>
</head>
<body>
<div>

View file

@ -1,8 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Servo Browser Engine</title>
<meta charset="UTF-8">
<title>Servo Browser Engine</title>
</head>
<body>
<div>

View file

@ -1,8 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Profile Page</title>
<meta charset="UTF-8">
<title>Profile Page</title>
</head>
<body>
<div>

View file

@ -10,54 +10,54 @@ var wsUri = "ws://echo.websocket.org/";
var output;
function init() {
output = document.getElementById("output");
testWebSocket();
output = document.getElementById("output");
testWebSocket();
}
function testWebSocket() {
websocket = new WebSocket(wsUri);
websocket.onopen = function(evt) {
onOpen(evt)
};
websocket.onclose = function(evt) {
onClose(evt)
};
websocket.onmessage = function(evt) {
onMessage(evt)
};
websocket.onerror = function(evt) {
onError(evt)
};
websocket = new WebSocket(wsUri);
websocket.onopen = function(evt) {
onOpen(evt)
};
websocket.onclose = function(evt) {
onClose(evt)
};
websocket.onmessage = function(evt) {
onMessage(evt)
};
websocket.onerror = function(evt) {
onError(evt)
};
}
function onOpen(evt) {
writeToScreen("CONNECTED");
doSend("WebSocket rocks");
writeToScreen("CONNECTED");
doSend("WebSocket rocks");
}
function onClose(evt) {
writeToScreen("DISCONNECTED");
writeToScreen("DISCONNECTED");
}
function onMessage(evt) {
writeToScreen('<span style="color: blue;">RESPONSE: ' + evt.data+'</span>');
websocket.close();
writeToScreen('<span style="color: blue;">RESPONSE: ' + evt.data+'</span>');
websocket.close();
}
function onError(evt) {
writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data);
writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data);
}
function doSend(message) {
writeToScreen("SENT: " + message);
websocket.send(message);
writeToScreen("SENT: " + message);
websocket.send(message);
}
function writeToScreen(message) {
var pre = document.createElement("p");
pre.style.wordWrap = "break-word";
pre.innerHTML = message;
output.appendChild(pre);
var pre = document.createElement("p");
pre.style.wordWrap = "break-word";
pre.innerHTML = message;
output.appendChild(pre);
}
window.addEventListener("load", init, false);

View file

@ -6,7 +6,7 @@
<div class="darkblue">
<img class="maroon"></img>
<div class="darkgreen">
<img class="gray"></img>
<img class="gray"></img>
</div>
</div>
<img class="black"></img>

View file

@ -1,17 +1,17 @@
<html>
<head>
<style type="text/css">
.c1 { color: red; }
.c2 { background: blue; }
#i1 { color: green; }
</style>
</head>
<body>
<div>
<div id='i1'>Hello</div>
<div class='c1'>World</div>
<div class='c2'>Hello</div>
<div class='c1 c2'>World</div>
</div>
</body>
<head>
<style type="text/css">
.c1 { color: red; }
.c2 { background: blue; }
#i1 { color: green; }
</style>
</head>
<body>
<div>
<div id='i1'>Hello</div>
<div class='c1'>World</div>
<div class='c2'>Hello</div>
<div class='c1 c2'>World</div>
</div>
</body>
</html>

View file

@ -2,13 +2,13 @@
<input id="clicked">
<script>
document.getElementById("clicked").addEventListener("mousedown", function () {
window.alert("mousedown"); },
false);
window.alert("mousedown"); },
false);
document.getElementById("clicked").addEventListener('mouseup', function() {
window.alert("mouseup"); },
false);
window.alert("mouseup"); },
false);
document.getElementById("clicked").addEventListener("click", function() {
window.alert("clicked"); },
false);
window.alert("clicked"); },
false);
</script>
</body>

View file

@ -14,8 +14,8 @@
</div>
<div>
<button id="findme">Check for element with :target selector</button>
<span id="result"></span>
<button id="findme">Check for element with :target selector</button>
<span id="result"></span>
</div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sodales leo in orci pulvinar, ut tincidunt ipsum vestibulum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Duis et vestibulum metus. Maecenas erat elit, ultrices eu gravida et, sollicitudin ac est. Sed in tellus ut tortor euismod aliquet non egestas metus. Sed pellentesque arcu ut lectus feugiat molestie. Fusce et justo non dui fermentum fermentum. Nunc nec ullamcorper urna. Morbi ultricies ornare arcu nec tincidunt. In sit amet risus lectus. Nam ac lacus urna. Phasellus semper eu enim quis rutrum. Suspendisse convallis orci vel nunc blandit, ut venenatis urna elementum. Curabitur a elit elementum sapien hendrerit laoreet eget in nunc. In vitae tempus neque.

View file

@ -3,13 +3,13 @@
<head>
</head>
<body>
<textarea id="textarea">
</textarea>
<textarea id="textarea">
</textarea>
</body>
<script>
var area = document.getElementById('textarea');
area.addEventListener('input', function() {
alert('input detected');
});
var area = document.getElementById('textarea');
area.addEventListener('input', function() {
alert('input detected');
});
</script>
</html>

View file

@ -2,10 +2,10 @@
<html><head>
<link rel='match' href='acid1_b.html'>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>
display/box/float/clear test
</title>
<style type="text/css">
<title>
display/box/float/clear test
</title>
<style type="text/css">
/* last modified: 1 Dec 98 */
html {
@ -127,49 +127,49 @@ font-weight: normal;
font-size: 1em;
}
</style>
</head>
<body>
<dl>
<dt>
</head>
<body>
<dl>
<dt>
</dt>
<dd>
<ul>
<li>
</dt>
<dd>
<ul>
<li>
</li>
<li id="bar">
<p>
</li>
<li id="bar">
<p>
</p>
<form action="./" method="get">
<p>
</p>
<form action="./" method="get">
<p>
</p>
<p>
</p>
<p>
</p>
</form>
</li>
<li>
</p>
</form>
</li>
<li>
</li>
<li id="baz">
</li>
<li id="baz">
</li>
</ul>
<blockquote>
<address>
</li>
</ul>
<blockquote>
<address>
</address>
</blockquote>
<h1>
</address>
</blockquote>
<h1>
</h1>
</dd>
</dl>
<p style="color: black; font-size: 1em; line-height: 1.3em; clear: both">
</p>
</h1>
</dd>
</dl>
<p style="color: black; font-size: 1em; line-height: 1.3em; clear: both">
</p>
</body></html>

View file

@ -4,26 +4,26 @@
<link rel=match href=block_formatting_context_float_placement_ref.html>
<style>
#nav-searchbar {
overflow: hidden;
overflow: hidden;
}
.nav-submit-button {
float: right;
float: right;
}
#nav-search-in {
float: left;
float: left;
}
.nav-searchfield-width {
height: 35px;
overflow: hidden;
border: solid black 1px;
height: 35px;
overflow: hidden;
border: solid black 1px;
}
</style>
</head>
<body>
<form id="nav-searchbar">
<div class="nav-submit-button">Foo</div><span id="nav-search-in">Bar</span>
<div class="nav-searchfield-width"></div>
</form>
<form id="nav-searchbar">
<div class="nav-submit-button">Foo</div><span id="nav-search-in">Bar</span>
<div class="nav-searchfield-width"></div>
</form>
</body>
</html>

View file

@ -3,23 +3,23 @@
<head>
<style>
.nav-submit-button {
float: right;
float: right;
}
#nav-search-in {
float: left;
float: left;
}
.nav-searchfield-width {
height: 35px;
overflow: hidden;
border: solid black 1px;
height: 35px;
overflow: hidden;
border: solid black 1px;
}
</style>
</head>
<body>
<form id="nav-searchbar">
<div class="nav-submit-button">Foo</div><span id="nav-search-in">Bar</span>
<div class="nav-searchfield-width"></div>
</form>
<form id="nav-searchbar">
<div class="nav-submit-button">Foo</div><span id="nav-search-in">Bar</span>
<div class="nav-searchfield-width"></div>
</form>
</body>
</html>

View file

@ -4,23 +4,23 @@
<link rel='match' href='float_clearance_intrinsic_width_ref.html'>
<style>
#nav-your-account {
background: lightblue;
display: inline-block;
background: lightblue;
display: inline-block;
}
.nav-button-title {
float: left;
clear: both;
float: left;
clear: both;
}
</style>
</head>
<body>
<a id="nav-your-account">
<div class="nav-button-title">Hello.</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
</a>
<a id="nav-your-account">
<div class="nav-button-title">Hello.</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
</a>
</body>
</html>

View file

@ -3,19 +3,19 @@
<head>
<style>
#nav-your-account {
background: lightblue;
display: inline-block;
background: lightblue;
display: inline-block;
}
</style>
</head>
<body>
<a id="nav-your-account">
<div class="nav-button-title">Hello.</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
</a>
<a id="nav-your-account">
<div class="nav-button-title">Hello.</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
<div class="nav-button-title">Account</div>
</a>
</body>
</html>

View file

@ -1,25 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<head>
<link rel='match' href='float_intrinsic_height_ref.html'>
<style type="text/css">
.otherprojects {
background-color: red;
float: left;
width: 200px;
}
.otherprojects-item {
background-color: yellow;
float: left;
width: 100px;
height: 100px;
}
</style>
</head>
<body>
<div class="otherprojects">
<div class="otherprojects-item">
</div>
</div>&nbsp;
</body>
<style type="text/css">
.otherprojects {
background-color: red;
float: left;
width: 200px;
}
.otherprojects-item {
background-color: yellow;
float: left;
width: 100px;
height: 100px;
}
</style>
</head>
<body>
<div class="otherprojects">
<div class="otherprojects-item">
</div>
</div>&nbsp;
</body>
</html>

View file

@ -1,22 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.otherprojects {
background-color: red;
width: 200px;
}
.otherprojects-item {
background-color: yellow;
width: 100px;
height: 100px;
}
</style>
</head>
<body>
<div class="otherprojects">
<div class="otherprojects-item">
</div>
</div>
</body>
<head>
<style type="text/css">
.otherprojects {
background-color: red;
width: 200px;
}
.otherprojects-item {
background-color: yellow;
width: 100px;
height: 100px;
}
</style>
</head>
<body>
<div class="otherprojects">
<div class="otherprojects-item">
</div>
</div>
</body>
</html>

View file

@ -12,11 +12,11 @@ body {margin : 0px}
</head>
<body>
<div class="start">
<div class="half"></div>
<div class="quarter"></div>
<div class="eighth"></div>
<div class="sixteenth"></div>
<div class="thirtysecond"></div>
<div class="sixtyfourth"></div>
<div class="half"></div>
<div class="quarter"></div>
<div class="eighth"></div>
<div class="sixteenth"></div>
<div class="thirtysecond"></div>
<div class="sixtyfourth"></div>
</div>
</body>

View file

@ -13,11 +13,11 @@
</head>
<body>
<div class="start">
<div class="half"></div>
<div class="quarter"></div>
<div class="eighth"></div>
<div class="sixteenth"></div>
<div class="thirtysecond"></div>
<div class="sixtyfourth"></div>
<div class="half"></div>
<div class="quarter"></div>
<div class="eighth"></div>
<div class="sixteenth"></div>
<div class="thirtysecond"></div>
<div class="sixtyfourth"></div>
</div>
</body>

View file

@ -1,25 +1,25 @@
<!DOCTYPE html>
<html class="reftest-wait">
<link rel='match' href='hide_after_create_ref.html'>
<style type="text/css">
.hidden {
display: none;
}
body {
background-color: green;
}
iframe {
background-color: red;
border: 0;
}
</style>
<style type="text/css">
.hidden {
display: none;
}
body {
background-color: green;
}
iframe {
background-color: red;
border: 0;
}
</style>
<body>
<iframe id="iframe" src="about:blank"></iframe>
<iframe id="iframe" src="about:blank"></iframe>
</body>
<script type="text/javascript">
window.onload = function() {
document.getElementById("iframe").classList.add("hidden");
window.onload = function() {
document.getElementById("iframe").classList.add("hidden");
document.documentElement.classList.remove("reftest-wait");
}
}
</script>
</html>

View file

@ -1,10 +1,10 @@
<!DOCTYPE html>
<html>
<style type="text/css">
body {
background-color: green;
}
</style>
<style type="text/css">
body {
background-color: green;
}
</style>
<body>
</body>
</html>

View file

@ -1,21 +1,21 @@
<!DOCTYPE html>
<html class="reftest-wait">
<link rel=match href=hide_and_show_ref.html>
<style type="text/css">
.hidden {
display: none;
}
iframe {
border: 0;
}
</style>
<link rel=match href=hide_and_show_ref.html>
<style type="text/css">
.hidden {
display: none;
}
iframe {
border: 0;
}
</style>
<body id="container">
<iframe id="iframe" class="hidden" src="data:text/html,%3Cbody%20style%3D%22background%3Agreen%3B%20%22%3E"></iframe>
<iframe id="iframe" class="hidden" src="data:text/html,%3Cbody%20style%3D%22background%3Agreen%3B%20%22%3E"></iframe>
</body>
<script type="text/javascript">
window.onload = function() {
document.getElementById("iframe").classList.remove("hidden");
document.documentElement.classList.remove("reftest-wait");
}
window.onload = function() {
document.getElementById("iframe").classList.remove("hidden");
document.documentElement.classList.remove("reftest-wait");
}
</script>
</html>

View file

@ -1,13 +1,13 @@
<!DOCTYPE html>
<html>
<style type="text/css">
div {
width: 300px;
height: 150px;
background-color: green;
}
</style>
<style type="text/css">
div {
width: 300px;
height: 150px;
background-color: green;
}
</style>
<body>
<div></div>
<div></div>
</body>
</html>

View file

@ -9,19 +9,19 @@ html, body {
line-height: 0;
}
.nav-button-outer {
background: red;
display: inline-block;
background: red;
display: inline-block;
}
.nav-down-arrow {
display: inline-block;
border-style: solid;
border-color: black;
border-width: 10px 200px 0 0;
display: inline-block;
border-style: solid;
border-color: black;
border-width: 10px 200px 0 0;
}
</style>
</head>
<body>
<a class="nav-button-outer"><span class="nav-down-arrow"></span></a>
<a class="nav-button-outer"><span class="nav-down-arrow"></span></a>
</body>
</html>

View file

@ -8,18 +8,18 @@ html, body {
line-height: 0;
}
.nav-button-outer {
display: inline-block;
display: inline-block;
}
.nav-down-arrow {
display: inline-block;
border-style: solid;
border-color: black;
border-width: 10px 200px 0 0;
display: inline-block;
border-style: solid;
border-color: black;
border-width: 10px 200px 0 0;
}
</style>
</head>
<body>
<a class="nav-button-outer"><span class="nav-down-arrow"></span></a>
<a class="nav-button-outer"><span class="nav-down-arrow"></span></a>
</body>
</html>

View file

@ -1,15 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/ahem.css">
<link rel=match href=inline_whitespace_ref.html>
<style type="text/css">
body {
background-color: #f6f6f6;
}
</style>
</head>
<body>
<span>A</span> <span>B</span>
</body>
<head>
<link rel="stylesheet" type="text/css" href="css/ahem.css">
<link rel=match href=inline_whitespace_ref.html>
<style type="text/css">
body {
background-color: #f6f6f6;
}
</style>
</head>
<body>
<span>A</span> <span>B</span>
</body>
</html>

View file

@ -1,16 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/ahem.css">
<link rel=match href=inline_whitespace_ref.html>
<style type="text/css">
body {
background-color: #f6f6f6;
}
</style>
</head>
<body>
<span>A</span>
<span>B</span>
</body>
<head>
<link rel="stylesheet" type="text/css" href="css/ahem.css">
<link rel=match href=inline_whitespace_ref.html>
<style type="text/css">
body {
background-color: #f6f6f6;
}
</style>
</head>
<body>
<span>A</span>
<span>B</span>
</body>
</html>

View file

@ -1,14 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/ahem.css">
<style type="text/css">
body {
background-color: #f6f6f6;
}
</style>
</head>
<body>
<span>A B</span>
</body>
<head>
<link rel="stylesheet" type="text/css" href="css/ahem.css">
<style type="text/css">
body {
background-color: #f6f6f6;
}
</style>
</head>
<body>
<span>A B</span>
</body>
</html>

View file

@ -3,8 +3,8 @@
<link rel='match' href='linebreak_inline_span_b.html'>
<style type="text/css">
* {
margin: 0px;
padding: 0px;
margin: 0px;
padding: 0px;
}
</style>
</head>

View file

@ -2,8 +2,8 @@
<head>
<style type="text/css">
* {
margin: 0px;
padding: 0px;
margin: 0px;
padding: 0px;
}
</style>
</head>

View file

@ -25,8 +25,8 @@
<body>
<div id="first">
<div id="second">
<div id="abs">
</div>
<div id="abs">
</div>
</div>
</div>
</body>

View file

@ -29,10 +29,10 @@
<div id="abs">
</div>
<div id="non-cb-2">
<div id="second">
</div>
<div id="abs">
</div>
<div id="second">
</div>
<div id="abs">
</div>
</div>
</div>
</body>

View file

@ -27,8 +27,8 @@
<body>
<div id="first">
<div id="abs">
<div id="abs2">
</div>
<div id="abs2">
</div>
</div>
</div>
</body>

View file

@ -27,8 +27,8 @@
<div id="first">
<div class="row"></div>
<div class="center">
<div class="little-box">
</div>
<div class="little-box">
</div>
</div>
<div class="row"></div>
</div>

View file

@ -2,18 +2,18 @@
<html>
<head>
<link rel='match' href='position_abs_pseudo_b.html'>
<style>
<style>
body {
margin: 0;
}
div:before {
div:before {
position: absolute;
width: 100px;
height: 100px;
background-color: red;
content: "";
}
</style>
</style>
</head>
<body>
<div>

View file

@ -1,16 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<style>
<style>
body {
margin: 0;
}
.before {
.before {
width: 100px;
height: 100px;
background-color: red;
}
</style>
</style>
</head>
<body>
<div class="before">

View file

@ -23,7 +23,7 @@
<div class="row">
</div>
<div class="center">
<img src="rust_logo.png" width="30" id="abs" alt="Rust Logo" />
<img src="rust_logo.png" width="30" id="abs" alt="Rust Logo" />
</div>
<div class="row">
</div>

View file

@ -1,17 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<head>
<link rel='match' href='table_auto_width_ref.html'>
</head>
<body>
<table>
<tbody>
<tr>
<td style="padding: 0">
<span>12345<span>67890</span></span>
</td>
</tr>
</tbody>
</table>
</body>
</head>
<body>
<table>
<tbody>
<tr>
<td style="padding: 0">
<span>12345<span>67890</span></span>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View file

@ -1,16 +1,16 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<table>
<tbody>
<tr>
<td style="padding: 0">
<span>1234567890</span>
</td>
</tr>
</tbody>
</table>
</body>
<head>
</head>
<body>
<table>
<tbody>
<tr>
<td style="padding: 0">
<span>1234567890</span>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View file

@ -5,35 +5,35 @@
<link rel="stylesheet" type="text/css" href="css/ahem.css">
<style>
* { margin: 0px !important; padding: 0px !important; }
* { margin: 0px !important; padding: 0px !important; }
div {
width: 100px;
font-size: 10px;
font-family: Ahem;
padding: 10px !important;
}
div {
width: 100px;
font-size: 10px;
font-family: Ahem;
padding: 10px !important;
}
</style>
</head>
<body>
<section style="text-align: right; color: #f00;">
<div style="background: #fdd;"> xx xx xx xxxx</div>
<div style="background: #fdd;"> xx xx xx xxxxxxxxxxxxx</div>
<div style="background: #fdd;">xxxxxxxxxxxxx xx xx xx xxxx</div>
<div style="background: #fdd;"> xx xx xx xxxx</div>
<div style="background: #fdd;"> xx xx xx xxxxxxxxxxxxx</div>
<div style="background: #fdd;">xxxxxxxxxxxxx xx xx xx xxxx</div>
</section>
<section style="text-align: center; color: #0f0;">
<div style="background: #dfd;"> xx xx xx xxxx </div>
<div style="background: #dfd;"> xx xx xx xxxxxxxxxxxxx</div>
<div style="background: #dfd;">xxxxxxxxxxxxx xx xx xx xxxx </div>
<div style="background: #dfd;"> xx xx xx xxxx </div>
<div style="background: #dfd;"> xx xx xx xxxxxxxxxxxxx</div>
<div style="background: #dfd;">xxxxxxxxxxxxx xx xx xx xxxx </div>
</section>
<section style="text-align: justify; color: #00f;">
<div style="background: #ddf;">xx xx xx xxxx</div>
<div style="background: #ddf;">xx xx xx xxxxxxxxxxxxx</div>
<div style="background: #ddf;">xxxxxxxxxxxxx xx xx xx xxxx </div>
<div style="background: #ddf;">xx xx xx xxxx</div>
<div style="background: #ddf;">xx xx xx xxxxxxxxxxxxx</div>
<div style="background: #ddf;">xxxxxxxxxxxxx xx xx xx xxxx </div>
</section>
</body>
</html>

View file

@ -4,38 +4,38 @@
<link rel="stylesheet" type="text/css" href="css/ahem.css">
<style>
* { margin: 0px !important; padding: 0px !important; }
* { margin: 0px !important; padding: 0px !important; }
div {
width: 100px;
font-size: 10px;
font-family: Ahem;
padding: 10px !important;
}
div {
width: 100px;
font-size: 10px;
font-family: Ahem;
padding: 10px !important;
}
section.reference { text-align: left !important; }
section.reference > div { white-space: pre; }
section.reference { text-align: left !important; }
section.reference > div { white-space: pre; }
</style>
</head>
<body>
<section class="reference" style="text-align: right; color: #f00;">
<div style="background: #fdd;"> xx xx xx<br /> xxxx</div>
<div style="background: #fdd;"> xx xx xx<br />xxxxxxxxxxxxx</div>
<div style="background: #fdd;">xxxxxxxxxxxxx<br /> xx xx xx<br /> xxxx</div>
<div style="background: #fdd;"> xx xx xx<br /> xxxx</div>
<div style="background: #fdd;"> xx xx xx<br />xxxxxxxxxxxxx</div>
<div style="background: #fdd;">xxxxxxxxxxxxx<br /> xx xx xx<br /> xxxx</div>
</section>
<section class="reference" style="text-align: center; color: #0f0;">
<div style="background: #dfd;"> xx xx xx <br /> xxxx </div>
<div style="background: #dfd;"> xx xx xx <br />xxxxxxxxxxxxx</div>
<div style="background: #dfd;">xxxxxxxxxxxxx<br /> xx xx xx <br /> xxxx </div>
<div style="background: #dfd;"> xx xx xx <br /> xxxx </div>
<div style="background: #dfd;"> xx xx xx <br />xxxxxxxxxxxxx</div>
<div style="background: #dfd;">xxxxxxxxxxxxx<br /> xx xx xx <br /> xxxx </div>
</section>
<section class="reference" style="text-align: justify; color: #00f;">
<div style="background: #ddf;">xx xx xx<br />xxxx</div>
<div style="background: #ddf;">xx xx xx<br />xxxxxxxxxxxxx</div>
<div style="background: #ddf;">xxxxxxxxxxxxx<br />xx xx xx<br />xxxx </div>
<div style="background: #ddf;">xx xx xx<br />xxxx</div>
<div style="background: #ddf;">xx xx xx<br />xxxxxxxxxxxxx</div>
<div style="background: #ddf;">xxxxxxxxxxxxx<br />xx xx xx<br />xxxx </div>
</section>
</body>
</html>

View file

@ -1,30 +1,30 @@
<!DOCTYPE html>
<html>
<head>
<link rel='match' href='transform_optimization_ref.html'>
<style type="text/css">
body {
margin: 0;
}
#outer {
position: absolute;
background-color: transparent;
width: 100%;
height: 100px;
transform: translateX(300px);
}
#inner {
position: absolute;
width: 400px;
height: 100px;
background-color: red;
}
</style>
</head>
<body>
<div id="outer">
<div id="inner">
</div>
</div>
</body>
<head>
<link rel='match' href='transform_optimization_ref.html'>
<style type="text/css">
body {
margin: 0;
}
#outer {
position: absolute;
background-color: transparent;
width: 100%;
height: 100px;
transform: translateX(300px);
}
#inner {
position: absolute;
width: 400px;
height: 100px;
background-color: red;
}
</style>
</head>
<body>
<div id="outer">
<div id="inner">
</div>
</div>
</body>
</html>

View file

@ -1,23 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body {
margin: 0;
}
#inner {
position: absolute;
left: 300px;
width: 400px;
height: 100px;
background-color: red;
}
</style>
</head>
<body>
<div id="outer">
<div id="inner">
</div>
</div>
</body>
<head>
<style type="text/css">
body {
margin: 0;
}
#inner {
position: absolute;
left: 300px;
width: 400px;
height: 100px;
background-color: red;
}
</style>
</head>
<body>
<div id="outer">
<div id="inner">
</div>
</div>
</body>
</html>

View file

@ -25,7 +25,7 @@ destCtx.imageSmoothingEnabled = smoothingEnabled;
// The source Image doesn't have a src url defined
// It should throw an exception because the HTMLImageElement is
// in the broken state
// https://html.spec.whatwg.org/multipage/scripting.html#check-the-usability-of-the-image-argument
// https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument
try {
destCtx.drawImage(sourceImg, 0, 0);
// It makes the test fail if the exception is not thrown

View file

@ -1,8 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
#outer {
position: absolute;
@ -25,16 +25,16 @@
background-color: blue;
}
</style>
</head>
<body>
</head>
<body>
<div id="outer">
<div id="inner">
<div id="div"></div>
</div>
</div>
<script>
test(function() {
<script>
test(function() {
var div = document.getElementById("div");
var outer = document.getElementById("outer");
@ -45,7 +45,7 @@
assert_equals(div.offsetTop, 25);
assert_equals(div.offsetWidth, 80);
assert_equals(div.offsetHeight, 130);
});
</script>
</body>
});
</script>
</body>
</html>

View file

@ -10,20 +10,20 @@
</body>
<script>
async_test(function(t) {
setTimeout(t.step_func(function() {
var frame = document.createElement('iframe');
frame.src = "data:text/html,<p>test</p>";
document.body.appendChild(frame);
setTimeout(t.step_func(function() {
document.body.removeChild(frame);
frame = document.createElement('iframe');
frame.src = "data:text/html,<p>test</p>";
document.body.appendChild(frame);
setTimeout(t.step_func(function() {
t.done();
}), 100);
}), 100);
}), 100);
setTimeout(t.step_func(function() {
var frame = document.createElement('iframe');
frame.src = "data:text/html,<p>test</p>";
document.body.appendChild(frame);
setTimeout(t.step_func(function() {
document.body.removeChild(frame);
frame = document.createElement('iframe');
frame.src = "data:text/html,<p>test</p>";
document.body.appendChild(frame);
setTimeout(t.step_func(function() {
t.done();
}), 100);
}), 100);
}), 100);
});
</script>
</html>

View file

@ -12,12 +12,12 @@ async_test(function() {
var img = window.document.getElementsByTagName("img")[0];
img.onload = this.step_func_done(function() {
assert_equals(img.width, 500);
assert_equals(img.height, 378);
img.width = 200;
img.height = 100;
assert_equals(img.width, 200);
assert_equals(img.height, 100);
assert_equals(img.width, 500);
assert_equals(img.height, 378);
img.width = 200;
img.height = 100;
assert_equals(img.width, 200);
assert_equals(img.height, 100);
});
});
</script>

View file

@ -5,18 +5,18 @@
<script src="/resources/testharnessreport.js"></script>
<script>
test(function() {
var testBinding = new TestBinding();
assert_equals(typeof testBinding.BooleanMozPreference, "function");
assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.falsy"), false);
assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.truthy"), true);
assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.string_test"), false);
assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.string_empty"), false);
assert_equals(typeof testBinding.StringMozPreference, "function");
assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.string_test"), "test");
assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.string_empty"), "");
assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.falsy"), "");
assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.truthy"), "");
assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.space_string_test"), "test1 test2");
assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.space_string_test"), "test1 test2");
var testBinding = new TestBinding();
assert_equals(typeof testBinding.BooleanMozPreference, "function");
assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.falsy"), false);
assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.truthy"), true);
assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.string_test"), false);
assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.string_empty"), false);
assert_equals(typeof testBinding.StringMozPreference, "function");
assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.string_test"), "test");
assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.string_empty"), "");
assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.falsy"), "");
assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.truthy"), "");
assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.space_string_test"), "test1 test2");
assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.space_string_test"), "test1 test2");
}, "prefs");
</script>