r93436 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93435‎ | r93436 | r93437 >
Date:22:00, 28 July 2011
Author:brion
Status:ok
Tags:
Comment:
Provisional revert of r93319 -- change to TOC styles without coordinated cache updates.

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
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)
  • /trunk/phase3/skins/modern/main.css (modified) (history)
  • /trunk/phase3/skins/monobook/main.css (modified) (history)
  • /trunk/phase3/skins/vector/screen.css (modified) (history)
  • /trunk/phase3/tests/parser/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/vector/screen.css
@@ -884,7 +884,8 @@
885885 .toc ul {
886886 list-style-type: none;
887887 list-style-image: none;
888 - padding: 0 .4em;
 888+ margin-left: 0;
 889+ padding-left: 0;
889890 text-align: left;
890891 }
891892 #toc ul ul,
Index: trunk/phase3/skins/monobook/main.css
@@ -348,7 +348,8 @@
349349 .toc ul {
350350 list-style-type: none;
351351 list-style-image: none;
352 - padding: 0 .4em;
 352+ margin-left: 0;
 353+ padding-left: 0;
353354 text-align: left;
354355 }
355356 #toc ul ul,
Index: trunk/phase3/skins/modern/main.css
@@ -556,6 +556,11 @@
557557 border: solid 1px #bbb;
558558 }
559559
 560+#toc tr, #toc td {
 561+ margin: 0;
 562+ padding: 0;
 563+}
 564+
560565 #toctitle {
561566 border-bottom: solid 1px #3c78b5;
562567 background-color: #ddd;
@@ -582,7 +587,7 @@
583588 list-style-type: none;
584589 list-style-image: none;
585590 margin: 0 1em;
586 - padding: 0;
 591+ padding-left: 0;
587592 text-align: left;
588593 }
589594
Index: trunk/phase3/skins/common/shared.css
@@ -784,14 +784,4 @@
785785 }
786786
787787 /* bug 12205 */
788 -#mw-credits a {
789 - unicode-bidi: embed;
790 -}
791 -
792 -/* Standard toc */
793 -#toc {
794 - display: inline-block;
795 - /* IE6+7 workaround */
796 - zoom: 1;
797 - display: inline !ie;
798 -}
\ No newline at end of file
 788+#mw-credits a { unicode-bidi: embed; }
\ No newline at end of file
Index: trunk/phase3/tests/parser/parserTests.txt
@@ -4560,7 +4560,7 @@
45614561 Some text
45624562 ===Another headline===
45634563 !! result
4564 -<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
 4564+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
45654565 <ul>
45664566 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
45674567 <ul>
@@ -4581,7 +4581,7 @@
45824582 </ul>
45834583 </li>
45844584 </ul>
4585 -</div>
 4585+</td></tr></table>
45864586 <h2><span class="editsection">[<a href="https://www.mediawiki.org/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>
45874587 <h3><span class="editsection">[<a href="https://www.mediawiki.org/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>
45884588 <h5><span class="editsection">[<a href="https://www.mediawiki.org/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 @@
46094609 ========= Level 9 Heading=========
46104610 ========== Level 10 Heading==========
46114611 !! result
4612 -<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
 4612+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
46134613 <ul>
46144614 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
46154615 <ul>
@@ -4636,7 +4636,7 @@
46374637 </ul>
46384638 </li>
46394639 </ul>
4640 -</div>
 4640+</td></tr></table>
46414641 <h1><span class="editsection">[<a href="https://www.mediawiki.org/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>
46424642 <h2><span class="editsection">[<a href="https://www.mediawiki.org/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>
46434643 <h3><span class="editsection">[<a href="https://www.mediawiki.org/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 @@
46614661 == title 2 ==
46624662 === title 2.1 ===
46634663 !! result
4664 -<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
 4664+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
46654665 <ul>
46664666 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
46674667 <ul>
@@ -4678,7 +4678,7 @@
46794679 </ul>
46804680 </li>
46814681 </ul>
4682 -</div>
 4682+</td></tr></table>
46834683 <h2><span class="editsection">[<a href="https://www.mediawiki.org/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>
46844684 <h3><span class="editsection">[<a href="https://www.mediawiki.org/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>
46854685 <h4><span class="editsection">[<a href="https://www.mediawiki.org/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 @@
47014701 == title 2 ==
47024702 === title 2.1 ===
47034703 !! result
4704 -<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
 4704+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
47054705 <ul>
47064706 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
47074707 <ul>
@@ -4714,7 +4714,7 @@
47154715 </ul>
47164716 </li>
47174717 </ul>
4718 -</div>
 4718+</td></tr></table>
47194719 <h2><span class="editsection">[<a href="https://www.mediawiki.org/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>
47204720 <h3><span class="editsection">[<a href="https://www.mediawiki.org/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>
47214721 <h4><span class="editsection">[<a href="https://www.mediawiki.org/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 @@
47364736 ====Section 1.1.1.1====
47374737 ==Section 2==
47384738 !! result
4739 -<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
 4739+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
47404740 <ul>
47414741 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
47424742 <ul>
@@ -4744,7 +4744,7 @@
47454745 </li>
47464746 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
47474747 </ul>
4748 -</div>
 4748+</td></tr></table>
47494749 <h2><span class="editsection">[<a href="https://www.mediawiki.org/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>
47504750 <h3><span class="editsection">[<a href="https://www.mediawiki.org/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>
47514751 <h4><span class="editsection">[<a href="https://www.mediawiki.org/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 @@
48284828 === title 1.1 ===
48294829 == title 2 ==
48304830 !! result
4831 -<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
 4831+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
48324832 <ul>
48334833 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
48344834 <ul>
@@ -4836,7 +4836,7 @@
48374837 </li>
48384838 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
48394839 </ul>
4840 -</div>
 4840+</td></tr></table>
48414841 <h2><span class="editsection">[<a href="https://www.mediawiki.org/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>
48424842 <h3><span class="editsection">[<a href="https://www.mediawiki.org/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>
48434843 <h2><span class="editsection">[<a href="https://www.mediawiki.org/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 @@
48924892 !! result
48934893 <p>The tooltips shall not show entities to the user (ie. be double escaped)
48944894 </p>
4895 -<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
 4895+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
48964896 <ul>
48974897 <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>
48984898 <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 @@
49004900 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
49014901 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
49024902 </ul>
4903 -</div>
 4903+</td></tr></table>
49044904 <h2><span class="editsection">[<a href="https://www.mediawiki.org/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>
49054905 <p>section 1
49064906 </p>
@@ -6119,11 +6119,11 @@
61206120 http://__TOC__
61216121 !! result
61226122 <h2><span class="editsection">[<a href="https://www.mediawiki.org/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>
6123 -http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
 6123+http://<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
61246124 <ul>
61256125 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
61266126 </ul>
6127 -</div>
 6127+</td></tr></table>
61286128
61296129 !! end
61306130
@@ -7953,7 +7953,7 @@
79547954 =====5=====
79557955 ==2==
79567956 !! result
7957 -<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
 7957+<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
79587958 <ul>
79597959 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
79607960 <ul>
@@ -7968,7 +7968,7 @@
79697969 </ul>
79707970 </li>
79717971 </ul>
7972 -</div>
 7972+</td></tr></table>
79737973 <h2><span class="editsection">[<a href="https://www.mediawiki.org/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>
79747974 <h6><span class="editsection">[<a href="https://www.mediawiki.org/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>
79757975 <h3><span class="editsection">[<a href="https://www.mediawiki.org/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>
Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -28,7 +28,6 @@
2929 $wgUploadMissingFileUrl is not set. The first was used for this
3030 until the second was introduced in 1.17.
3131 * (bug 25355) Parser generates edit section links for special pages
32 -* (bug 13766) Change table of content syntax to be semantically correct
3332
3433 === API changes in 1.19 ===
3534 * (bug 19838) siprop=interwikimap can now use the interwiki cache.
Index: trunk/phase3/includes/Linker.php
@@ -1456,10 +1456,10 @@
14571457 static function tocList( $toc, $lang = false ) {
14581458 $title = wfMsgExt( 'toc', array( 'language' => $lang, 'escape' ) );
14591459 return
1460 - '<div id="toc" class="toc">'
 1460+ '<table id="toc" class="toc"><tr><td>'
14611461 . '<div id="toctitle"><h2>' . $title . "</h2></div>\n"
14621462 . $toc
1463 - . "</ul>\n</div>\n";
 1463+ . "</ul>\n</td></tr></table>\n";
14641464 }
14651465
14661466 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93319Recommit r93264 ( Remove semantically incorrect wrapper table from toc and re...diebuche21:53, 27 July 2011

Status & tagging log