Bug 559284. Make various HTML5 sectioning elements display:block. r=dbaron

This commit is contained in:
Boris Zbarsky 2010-04-26 16:27:01 -04:00
parent d6ac020246
commit 0119433e2d
6 changed files with 161 additions and 5 deletions

View File

@ -158,6 +158,7 @@ _TEST_FILES = test_bug589.html \
test_bug536891.html \
test_bug536895.html \
test_bug458037.xhtml \
test_bug559284.html \
$(NULL)
libs:: $(_TEST_FILES)

View File

@ -0,0 +1,74 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=559284
-->
<head>
<title>Test for Bug 559284</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=559284">Mozilla Bug 559284</a>
<p id="display"></p>
<div id="content" style="display: none">
<section id="section"></section>
<nav id="nav"></nav>
<article id="article"></article>
<aside id="aside"></aside>
<hgroup id="hgroup"></hgroup>
<header id="header"></header>
<footer id="footer"></footer>
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 559284 **/
todo_is($("section").constructor, "[object HTMLElement]",
"Constructor should be section");
todo_is($("section").toString().substring(0, 19), "[object HTMLElement",
"Section should be HTMLElement");
is($("section") instanceof HTMLElement, true,
"Section should be instance of HTMLElement");
todo_is($("nav").constructor, "[object HTMLElement]",
"Constructor should be nav");
todo_is($("nav").toString().substring(0, 19), "[object HTMLElement",
"Nav should be HTMLElement");
is($("nav") instanceof HTMLElement, true,
"Nav should be instance of HTMLElement");
todo_is($("article").constructor, "[object HTMLElement]",
"Constructor should be article");
todo_is($("article").toString().substring(0, 19), "[object HTMLElement",
"Article should be HTMLElement");
is($("article") instanceof HTMLElement, true,
"Article should be instance of HTMLElement");
todo_is($("aside").constructor, "[object HTMLElement]",
"Constructor should be aside");
todo_is($("aside").toString().substring(0, 19), "[object HTMLElement",
"Aside should be HTMLElement");
is($("aside") instanceof HTMLElement, true,
"Aside should be instance of HTMLElement");
todo_is($("hgroup").constructor, "[object HTMLElement]",
"Constructor should be hgroup");
todo_is($("hgroup").toString().substring(0, 19), "[object HTMLElement",
"Hgroup should be HTMLElement");
is($("hgroup") instanceof HTMLElement, true,
"Hgroup should be instance of HTMLElement");
todo_is($("header").constructor, "[object HTMLElement]",
"Constructor should be header");
todo_is($("header").toString().substring(0, 19), "[object HTMLElement",
"Header should be HTMLElement");
is($("header") instanceof HTMLElement, true,
"Header should be instance of HTMLElement");
todo_is($("footer").constructor, "[object HTMLElement]",
"Constructor should be footer");
todo_is($("footer").toString().substring(0, 19), "[object HTMLElement",
"Footer should be HTMLElement");
is($("footer") instanceof HTMLElement, true,
"Footer should be instance of HTMLElement");
</script>
</pre>
</body>
</html>

View File

@ -0,0 +1,12 @@
<!DOCTYPE html>
<body>
-<div>section</div>
-<div>nav</div>
-<div>article</div>
-<div>aside</div>
-<div>hgroup</div>
-<div>header</div>
-<div>footer</div>
-
</body>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<body>
-<section>section</section>
-<nav>nav</nav>
-<article>article</article>
-<aside>aside</aside>
-<hgroup>hgroup</hgroup>
-<header>header</header>
-<footer>footer</footer>
-
</body>

View File

@ -1425,3 +1425,4 @@ random-if(!haveTestPlugin) == 546071-1.html 546071-1-ref.html
== 552334-1.html 552334-1-ref.html
== 556661-1.html 556661-1-ref.html
== 557736-1.html 557736-1-ref.html
== 559284-1.html 559284-1-ref.html

View File

@ -60,17 +60,74 @@ bdo[dir] {
* formatting obtained by explicitly adding a dir attribute (assigned the
* inherited value) to the transformed element." */
address, blockquote, body, caption, center, col, colgroup, dd, dir, div, dl, dt,
fieldset, form, h1, h2, h3, h4, h5, h6, hr, html, isindex, li, listing, map,
marquee, menu, noframes, ol, p, plaintext, pre, table, tbody, td, tfoot, th,
thead, tr, ul, xmp {
address,
article,
aside,
blockquote,
body,
caption,
center,
col,
colgroup,
dd,
dir,
div,
dl,
dt,
fieldset,
footer,
form,
h1,
h2,
h3,
h4,
h5,
h6,
header,
hgroup,
hr,
html,
isindex,
li,
listing,
map,
marquee,
menu,
nav,
noframes,
ol,
p,
plaintext,
pre,
section,
table,
tbody,
td,
tfoot,
th,
thead,
tr,
ul,
xmp {
unicode-bidi: embed;
}
/* blocks */
html, div, map, dt, isindex, form {
article,
aside,
footer,
header,
hgroup,
html,
div,
map,
dt,
isindex,
form,
nav,
section {
display: block;
}