Provisional revert of r93319 -- change to TOC styles without coordinated cache updates.
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 28 Jul 2011 22:00:09 +0000 (22:00 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 28 Jul 2011 22:00:09 +0000 (22:00 +0000)
Definitely shows different padding with the old cached markup and new styles in FF 5 though it's not a huge difference. Haven't tested in other browsers; IE needs testing in particular as it has funky special style bits.

Recommend:
* old markup should work uncahnged with the new styles -- this avoids any transition problems
* secondarily, consider updating parser cache version to force updates .... but you'd still want to do the above for pages that have been HTTP-cached!
* test all these renderings in all supported browsers and confirm that all is well with old & new markup

RELEASE-NOTES-1.19
includes/Linker.php
skins/common/shared.css
skins/modern/main.css
skins/monobook/main.css
skins/vector/screen.css
tests/parser/parserTests.txt

index c2f47fc..818d982 100644 (file)
@@ -28,7 +28,6 @@ production.
   $wgUploadMissingFileUrl is not set. The first was used for this
   until the second was introduced in 1.17.
 * (bug 25355) Parser generates edit section links for special pages
-* (bug 13766) Change table of content syntax to be semantically correct
 
 === API changes in 1.19 ===
 * (bug 19838) siprop=interwikimap can now use the interwiki cache.
index 525a6fa..f724ca6 100644 (file)
@@ -1456,10 +1456,10 @@ class Linker {
        static function tocList( $toc, $lang = false ) {
                $title = wfMsgExt( 'toc', array( 'language' => $lang, 'escape' ) );
                return
-                  '<div id="toc" class="toc">'
+                  '<table id="toc" class="toc"><tr><td>'
                 . '<div id="toctitle"><h2>' . $title . "</h2></div>\n"
                 . $toc
-                . "</ul>\n</div>\n";
+                . "</ul>\n</td></tr></table>\n";
        }
 
        /**
index 73ac775..a70b41d 100644 (file)
@@ -784,14 +784,4 @@ div.floatright, table.floatright, div.floatleft, table.floatleft {
 }
 
 /* bug 12205 */
-#mw-credits a { 
-       unicode-bidi: embed;
-}
-
-/* Standard toc */
-#toc {
-       display: inline-block;
-       /* IE6+7 workaround */
-       zoom: 1;
-       display: inline !ie;
-}
\ No newline at end of file
+#mw-credits a { unicode-bidi: embed; }
\ No newline at end of file
index 860de36..d1fa902 100644 (file)
@@ -556,6 +556,11 @@ img.thumbborder {
        border: solid 1px #bbb;
 }
 
+#toc tr, #toc td {
+       margin: 0;
+       padding: 0;
+}
+
 #toctitle {
        border-bottom: solid 1px #3c78b5;
        background-color: #ddd;
@@ -582,7 +587,7 @@ img.thumbborder {
        list-style-type: none;
        list-style-image: none;
        margin: 0 1em;
-       padding: 0;
+       padding-left: 0;
        text-align: left;
 }
 
index 0fcb478..75b57e3 100644 (file)
@@ -348,7 +348,8 @@ table.small {
 .toc ul {
        list-style-type: none;
        list-style-image: none;
-       padding: 0 .4em;
+       margin-left: 0;
+       padding-left: 0;
        text-align: left;
 }
 #toc ul ul,
index ba604b4..8f611b7 100644 (file)
@@ -884,7 +884,8 @@ select {
 .toc ul {
        list-style-type: none;
        list-style-image: none;
-       padding: 0 .4em;
+       margin-left: 0;
+       padding-left: 0;
        text-align: left;
 }
 #toc ul ul,
index c4a0015..ef5a663 100644 (file)
@@ -4560,7 +4560,7 @@ Section headings with TOC
 Some text
 ===Another headline===
 !! result
-<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 <ul>
 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
 <ul>
@@ -4581,7 +4581,7 @@ Some text
 </ul>
 </li>
 </ul>
-</div>
+</td></tr></table>
 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Headline 1">edit</a>]</span> <span class="mw-headline" id="Headline_1"> Headline 1 </span></h2>
 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Subheadline 1">edit</a>]</span> <span class="mw-headline" id="Subheadline_1"> Subheadline 1 </span></h3>
 <h5><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Skipping a level">edit</a>]</span> <span class="mw-headline" id="Skipping_a_level"> Skipping a level </span></h5>
@@ -4608,7 +4608,7 @@ Handling of sections up to level 6 and beyond
 ========= Level 9 Heading=========
 ========== Level 10 Heading==========
 !! result
-<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 <ul>
 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
 <ul>
@@ -4636,7 +4636,7 @@ Handling of sections up to level 6 and beyond
 </ul>
 </li>
 </ul>
-</div>
+</td></tr></table>
 <h1><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Level 1 Heading">edit</a>]</span> <span class="mw-headline" id="Level_1_Heading"> Level 1 Heading</span></h1>
 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Level 2 Heading">edit</a>]</span> <span class="mw-headline" id="Level_2_Heading"> Level 2 Heading</span></h2>
 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Level 3 Heading">edit</a>]</span> <span class="mw-headline" id="Level_3_Heading"> Level 3 Heading</span></h3>
@@ -4660,7 +4660,7 @@ TOC regression (bug 9764)
 == title 2 ==
 === title 2.1 ===
 !! result
-<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 <ul>
 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
 <ul>
@@ -4678,7 +4678,7 @@ TOC regression (bug 9764)
 </ul>
 </li>
 </ul>
-</div>
+</td></tr></table>
 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: title 1">edit</a>]</span> <span class="mw-headline" id="title_1"> title 1 </span></h2>
 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: title 1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1"> title 1.1 </span></h3>
 <h4><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: title 1.1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1.1"> title 1.1.1 </span></h4>
@@ -4700,7 +4700,7 @@ wgMaxTocLevel=3
 == title 2 ==
 === title 2.1 ===
 !! result
-<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 <ul>
 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
 <ul>
@@ -4714,7 +4714,7 @@ wgMaxTocLevel=3
 </ul>
 </li>
 </ul>
-</div>
+</td></tr></table>
 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: title 1">edit</a>]</span> <span class="mw-headline" id="title_1"> title 1 </span></h2>
 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: title 1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1"> title 1.1 </span></h3>
 <h4><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: title 1.1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1.1"> title 1.1.1 </span></h4>
@@ -4735,7 +4735,7 @@ wgMaxTocLevel=3
 ====Section 1.1.1.1====
 ==Section 2==
 !! result
-<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 <ul>
 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
 <ul>
@@ -4744,7 +4744,7 @@ wgMaxTocLevel=3
 </li>
 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
 </ul>
-</div>
+</td></tr></table>
 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Section 1">edit</a>]</span> <span class="mw-headline" id="Section_1">Section 1</span></h2>
 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Section 1.1">edit</a>]</span> <span class="mw-headline" id="Section_1.1">Section 1.1</span></h3>
 <h4><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Section 1.1.1">edit</a>]</span> <span class="mw-headline" id="Section_1.1.1">Section 1.1.1</span></h4>
@@ -4827,7 +4827,7 @@ __TOC__
 === title 1.1 ===
 == title 2 ==
 !! result
-<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 <ul>
 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
 <ul>
@@ -4836,7 +4836,7 @@ __TOC__
 </li>
 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
 </ul>
-</div>
+</td></tr></table>
 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: title 1">edit</a>]</span> <span class="mw-headline" id="title_1"> title 1 </span></h2>
 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: title 1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1"> title 1.1 </span></h3>
 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: title 2">edit</a>]</span> <span class="mw-headline" id="title_2"> title 2 </span></h2>
@@ -4891,7 +4891,7 @@ section 5
 !! result
 <p>The tooltips shall not show entities to the user (ie. be double escaped)
 </p>
-<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 <ul>
 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text &gt; text</span></a></li>
 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text &lt; text</span></a></li>
@@ -4899,7 +4899,7 @@ section 5
 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
 </ul>
-</div>
+</td></tr></table>
 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: text > text">edit</a>]</span> <span class="mw-headline" id="text_.3E_text"> text &gt; text </span></h2>
 <p>section 1
 </p>
@@ -6119,11 +6119,11 @@ Fuzz testing: Parser14
 http://__TOC__
 !! result
 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: onmouseover=">edit</a>]</span> <span class="mw-headline" id="onmouseover.3D"> onmouseover= </span></h2>
-http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
+http://<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 <ul>
 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
 </ul>
-</div>
+</td></tr></table>
 
 !! end
 
@@ -7953,7 +7953,7 @@ Out-of-order TOC heading levels
 =====5=====
 ==2==
 !! result
-<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 <ul>
 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
 <ul>
@@ -7968,7 +7968,7 @@ Out-of-order TOC heading levels
 </ul>
 </li>
 </ul>
-</div>
+</td></tr></table>
 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: 2">edit</a>]</span> <span class="mw-headline" id="2">2</span></h2>
 <h6><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: 6">edit</a>]</span> <span class="mw-headline" id="6">6</span></h6>
 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: 3">edit</a>]</span> <span class="mw-headline" id="3">3</span></h3>