r93299 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93298‎ | r93299 | r93300 >
Date:19:24, 27 July 2011
Author:hashar
Status:ok
Tags:
Comment:
revert r93284 and follow up r93285

breaks parser tests. Please update the parser tests and reapply.
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js (modified) (history)
  • /trunk/phase3/skins/MonoBook.php (modified) (history)
  • /trunk/phase3/skins/Vector.php (modified) (history)
  • /trunk/phase3/skins/chick/IE60Fixes.css (modified) (history)
  • /trunk/phase3/skins/chick/main.css (modified) (history)
  • /trunk/phase3/skins/cologneblue/screen.css (modified) (history)
  • /trunk/phase3/skins/common/oldshared.css (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)
  • /trunk/phase3/skins/common/wikistandard.css (modified) (history)
  • /trunk/phase3/skins/modern/main.css (modified) (history)
  • /trunk/phase3/skins/monobook/main.css (modified) (history)
  • /trunk/phase3/skins/simple/main.css (modified) (history)
  • /trunk/phase3/skins/vector/screen.css (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js
@@ -3,12 +3,12 @@
44 */
55 jQuery( function( $ ) {
66 // Select all h1-h6 elements that contain editsection links
7 - $( '.mw-h1:has(.editsection a), ' +
8 - '.mw-h2:has(.editsection a), ' +
9 - '.mw-h3:has(.editsection a), ' +
10 - '.mw-h4:has(.editsection a), ' +
11 - '.mw-h5:has(.editsection a), ' +
12 - '.mw-h6:has(.editsection a)'
 7+ $( 'h1:has(.editsection a), ' +
 8+ 'h2:has(.editsection a), ' +
 9+ 'h3:has(.editsection a), ' +
 10+ 'h4:has(.editsection a), ' +
 11+ 'h5:has(.editsection a), ' +
 12+ 'h6:has(.editsection a)'
1313 ).live( 'contextmenu', function( e ) {
1414 // Get href of the [edit] link
1515 var href = $(this).find( '.editsection a' ).attr( 'href' );
Index: trunk/phase3/skins/MonoBook.php
@@ -78,7 +78,7 @@
7979 <a id="top"></a>
8080 <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
8181
82 - <div class="mw-h1 firstHeading"><h1><?php $this->html('title') ?></h1></div>
 82+ <h1 id="firstHeading" class="firstHeading"><?php $this->html('title') ?></h1>
8383 <div id="bodyContent">
8484 <div id="siteSub"><?php $this->msg('tagline') ?></div>
8585 <div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
Index: trunk/phase3/skins/chick/IE60Fixes.css
@@ -70,6 +70,7 @@
7171 width: 96%;
7272 }
7373
 74+div.editsection,
7475 #catlinks,
7576 div.tright,
7677 div.tleft {
Index: trunk/phase3/skins/chick/main.css
@@ -42,37 +42,35 @@
4343 margin: 0.2em 0 0.2em 0;
4444 }
4545
46 -/* Headers */
47 -.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 {
 46+h1, h2, h3, h4, h5, h6 {
4847 color: black;
4948 background: none;
 49+ font-weight: normal;
5050 margin: 0;
51 - border-bottom: 1px solid #aaa;
 51+ overflow: hidden;
 52+ padding-top: 0.5em;
 53+ padding-bottom: 0.17em;
 54+ border-bottom: 1px solid #aaaaaa;
5255 }
53 -.mw-h3, .mw-h4, .mw-h5, .mw-h6 {
54 - border-bottom: none;
55 -}
56 -h1, h2 {
 56+.editsection {
5757 font-weight: normal;
5858 }
5959 h1 { font-size: 188%; }
 60+h1 .editsection { font-size: 53.2%; }
6061 h2 { font-size: 150%; }
 62+h2 .editsection { font-size: 66.7%; }
 63+h3, h4, h5, h6 {
 64+ border-bottom: none;
 65+ font-weight: bold;
 66+}
6167 h3 { font-size: 132%; }
 68+h3 .editsection { font-size: 75.8%; }
6269 h4 { font-size: 116%; }
 70+h4 .editsection { font-size: 86.2%; }
6371 h5 { font-size: 100%; }
6472 h6 { font-size: 80%; }
 73+h6 .editsection { font-size: 125%; }
6574
66 -/* To replicate the old padding, where h# were block-level elements and edit
67 - * links were floated, we need to multiply .5em top padding and .17em bottom
68 - * padding by the header text sizes. */
69 -.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */
70 -.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */
71 -.mw-h3 { padding: .66em 0 .22em; } /* etc. */
72 -.mw-h4 { padding: .58em 0 .20em; }
73 -.mw-h5 { padding: .50em 0 .17em; }
74 -.mw-h6 { padding: .40em 0 .14em; }
75 -
76 -
7775 ul {
7876 line-height: 1.5em;
7977 margin: 0.3em 0 0 1.5em;
Index: trunk/phase3/skins/monobook/main.css
@@ -107,41 +107,33 @@
108108 margin: .2em 0 .2em 0;
109109 }
110110
111 -/* Headers */
112 -.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 {
 111+h1, h2, h3, h4, h5, h6 {
113112 color: black;
114113 background: none;
 114+ font-weight: normal;
115115 margin: 0;
116116 overflow: hidden;
 117+ padding-top: .5em;
 118+ padding-bottom: .17em;
117119 border-bottom: 1px solid #aaa;
118120 }
119 -.mw-h3, .mw-h4, .mw-h5, .mw-h6 {
120 - border-bottom: none;
121 -}
122 -h1, h2 { font-weight: normal; }
123 -
124121 h1 { font-size: 188%; }
 122+h1 .editsection { font-size: 53%; }
125123 h2 { font-size: 150%; }
 124+h2 .editsection { font-size: 67%; }
126125 h3, h4, h5, h6 {
127126 border-bottom: none;
128127 font-weight: bold;
129128 }
130129 h3 { font-size: 132%; }
 130+h3 .editsection { font-size: 76%; font-weight: normal; }
131131 h4 { font-size: 116%; }
 132+h4 .editsection { font-size: 86%; font-weight: normal; }
132133 h5 { font-size: 100%; }
 134+h5 .editsection { font-weight: normal; }
133135 h6 { font-size: 80%; }
 136+h6 .editsection { font-size: 125%; font-weight: normal; }
134137
135 -/* To replicate the old padding, where h# were block-level elements and edit
136 - * links were floated, we need to multiply .5em top padding and .17em bottom
137 - * padding by the header text sizes. */
138 -.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */
139 -.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */
140 -.mw-h3 { padding: .66em 0 .22em; } /* etc. */
141 -.mw-h4 { padding: .58em 0 .20em; }
142 -.mw-h5 { padding: .50em 0 .17em; }
143 -.mw-h6 { padding: .40em 0 .14em; }
144 -
145 -
146138 ul {
147139 line-height: 1.5em;
148140 list-style-type: square;
Index: trunk/phase3/skins/modern/main.css
@@ -334,17 +334,12 @@
335335 font-size: small;
336336 }
337337
338 -.mw-h1,
339 -.mw-h2,
340 -.mw-h3,
341 -.mw-h4,
342 -.mw-h5,
343 -.mw-h6 {
344 - overflow: hidden;
 338+h1, h2 {
345339 border-bottom: solid 1px #036;
346340 }
347 -.mw-h3, .mw-h4, .mw-h5, .mw-h6 {
348 - border-bottom: none;
 341+
 342+h1, h2, h3, h4, h5, h6 {
 343+ overflow: hidden;
349344 }
350345
351346 #preftoc {
Index: trunk/phase3/skins/common/wikistandard.css
@@ -96,10 +96,18 @@
9797 font-size: 150%;
9898 }
9999
 100+h1.pagetitle .editsection {
 101+ font-size: 66.7%;
 102+}
 103+
100104 h2 {
101105 font-size: 120%;
102106 }
103107
 108+h2 .editsection {
 109+ font-size: 83.3%;
 110+}
 111+
104112 h2, h3, h4, h5, h6 {
105113 margin-bottom: 0;
106114 }
@@ -108,18 +116,34 @@
109117 font-size: 106.25%;
110118 }
111119
 120+h3 .editsection {
 121+ font-size: 94.1%;
 122+}
 123+
112124 h4 {
113125 font-size: 103.125%;
114126 }
115127
 128+h4 .editsection {
 129+ font-size: 97.0%;
 130+}
 131+
116132 h5 {
117133 font-size: 100%;
118134 }
119135
 136+h5 .editsection {
 137+ font-size: 100%;
 138+}
 139+
120140 h6 {
121141 font-size: 95%;
122142 }
123143
 144+h6 .editsection {
 145+ font-size: 105.3%;
 146+}
 147+
124148 hr.sep {
125149 color: gray;
126150 height: 1px;
Index: trunk/phase3/skins/common/oldshared.css
@@ -4,6 +4,30 @@
55 * CologneBlue, the old pre-Monobook skins
66 */
77
 8+/* For clarity, explicitly state some recommendations from <http://www.w3.org/
 9+ TR/CSS21/sample.html> to make sure the editsection links scale right */
 10+
 11+h1 { font-size: 2em; }
 12+h2 { font-size: 1.5em; }
 13+h3 { font-size: 1.17em; }
 14+h5 { font-size: .83em; }
 15+h6 { font-size: .75em; }
 16+h1, h2, h3, h4, h5, h6 {
 17+ font-weight: bolder;
 18+}
 19+
 20+/* Now the custom parts */
 21+
 22+/* Make edit sections (which are inside h# tags) normal-sized */
 23+.editsection {
 24+ font-weight: normal;
 25+}
 26+h1 .editsection { font-size: 50%; }
 27+h2 .editsection { font-size: 66.7%; }
 28+h3 .editsection { font-size: 85.5%; }
 29+h5 .editsection { font-size: 120%; }
 30+h6 .editsection { font-size: 133%; }
 31+
832 #footer { clear: both }
933 /* images */
1034 /* @noflip */
Index: trunk/phase3/skins/common/shared.css
@@ -82,22 +82,14 @@
8383 background-color: #fcfcfc;
8484 }
8585
86 -/* Display headings on the same line as edit link */
87 -h1, h2, h3, h4, h5, h6 { display: inline; margin: 0; }
88 -/* But then we have to reintroduce the margin. We use the W3 recommended mar-
89 - * gins <http://www.w3.org/TR/CSS21/sample.html>, multiplying by the recom-
90 - * mended font-size. */
91 -.mw-h1 { margin: 1.34em 0; }
92 -.mw-h2 { margin: 1.13em 0; }
93 -.mw-h3 { margin: 0.97em 0; }
94 -.mw-h4 { margin: 1.12em 0; }
95 -.mw-h5 { margin: 1.25em 0; }
96 -.mw-h6 { margin: 1.25em 0; }
97 -
98 -/* Give edi section link some space */
 86+/* Edit section links */
9987 .editsection {
100 - margin: 0 .8em;
 88+ float: right;
 89+ margin-left: 5px;
10190 }
 91+/* Correct directionality when page dir is different from site/user dir */
 92+/* @noflip */.mw-content-ltr .editsection, .mw-content-rtl .mw-content-ltr .editsection { float: right; }
 93+/* @noflip */.mw-content-rtl .editsection, .mw-content-ltr .mw-content-rtl .editsection { float: left; }
10294 /**
10395 * File histories
10496 */
Index: trunk/phase3/skins/Vector.php
@@ -144,7 +144,7 @@
145145 <!-- /sitenotice -->
146146 <?php endif; ?>
147147 <!-- firstHeading -->
148 - <div class="mw-h1 firstHeading"><h1><?php $this->html( 'title' ) ?></h1></div>
 148+ <h1 id="firstHeading" class="firstHeading"><?php $this->html( 'title' ) ?></h1>
149149 <!-- /firstHeading -->
150150 <!-- bodyContent -->
151151 <div id="bodyContent">
Index: trunk/phase3/skins/simple/main.css
@@ -1,3 +1,26 @@
 2+/* For clarity, explicitly state some recommendations from <http://www.w3.org/
 3+ TR/CSS21/sample.html> to make sure the editsection links scale right */
 4+
 5+h1 { font-size: 2em; }
 6+h2 { font-size: 1.5em; }
 7+h3 { font-size: 1.17em; }
 8+h5 { font-size: .83em; }
 9+h6 { font-size: .75em; }
 10+h1, h2, h3, h4, h5, h6 { font-weight: bolder }
 11+
 12+/* Now the custom parts */
 13+
 14+/* Make edit sections (which are inside h# tags) normal-sized */
 15+.editsection {
 16+ font-weight: normal;
 17+}
 18+h1 .editsection { font-size: 50% }
 19+h2 .editsection { font-size: 66.7% }
 20+h3 .editsection { font-size: 85.5% }
 21+h5 .editsection { font-size: 120% }
 22+h6 .editsection { font-size: 133% }
 23+
 24+
225 #toolbar {
326 display: none;
427 }
@@ -63,22 +86,11 @@
6487 }
6588 p img { margin: 0; }
6689
67 -.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 {
68 - margin: 0;
 90+h1, h2, h3, h4, h5, h6 {
 91+ margin: 0;
 92+ padding-top: 0.5em;
 93+ padding-bottom: 0.17em;
6994 }
70 -/* To replicate the old padding, where h# were block-level elements and edit
71 - * links were floated, we need to multiply .5em top padding and .17em bottom
72 - * padding by the header text sizes. We assume the W3 recommendations are
73 - * used: 200%, 150%, 117%, 100%, 83%, 75% size in that order
74 - * <http://www.w3.org/TR/CSS21/sample.html>. If not the padding may be margin-
75 - * ally off. */
76 -.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */
77 -.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */
78 -.mw-h3 { padding: .66em 0 .22em; } /* etc. */
79 -.mw-h4 { padding: .58em 0 .20em; }
80 -.mw-h5 { padding: .50em 0 .17em; }
81 -.mw-h6 { padding: .40em 0 .14em; }
82 -
8395 fieldset {
8496 margin: 1em 0em 1em 0em;
8597 padding: 0em 1em 1em 1em;
@@ -183,7 +195,7 @@
184196 border: solid 1px black;
185197 }
186198
187 -.firstHeading, .mw-h2 {
 199+h1.firstHeading, h2 {
188200 border-bottom: solid 1px black;
189201 }
190202 #bodyContent a[href ^="http://"],
Index: trunk/phase3/skins/cologneblue/screen.css
@@ -164,6 +164,10 @@
165165 line-height: 21pt;
166166 }
167167
 168+h1 .editsection {
 169+ font-size: 55.6%;
 170+}
 171+
168172 h1.pagetitle {
169173 padding-bottom: 0;
170174 margin-bottom: 0;
@@ -203,7 +207,7 @@
204208 color: #CC2200;
205209 }
206210
207 -.mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 {
 211+h2, h3, h4, h5, h6 {
208212 margin-bottom: 0;
209213 }
210214
Index: trunk/phase3/skins/vector/screen.css
@@ -727,41 +727,42 @@
728728 }
729729
730730 /* Structural Elements */
731 -.mw-h1,
732 -.mw-h2,
733 -.mw-h3,
734 -.mw-h4,
735 -.mw-h5,
736 -.mw-h6 {
 731+h1,
 732+h2,
 733+h3,
 734+h4,
 735+h5,
 736+h6 {
737737 color: black;
738738 background: none;
 739+ font-weight: normal;
739740 margin: 0;
740741 overflow: hidden;
 742+ padding-top: .5em;
 743+ padding-bottom: .17em;
741744 border-bottom: 1px solid #aaa;
742745 width: auto;
743746 }
744 -.mw-h3, .mw-h4, .mw-h5, .mw-h6 {
 747+h1 { font-size: 188%; }
 748+h1 .editsection { font-size: 53%; }
 749+h2 { font-size: 150%; }
 750+h2 .editsection { font-size: 67%; }
 751+h3,
 752+h4,
 753+h5,
 754+h6 {
745755 border-bottom: none;
 756+ font-weight: bold;
746757 }
747 -h1, h2 { font-weight: normal; }
748 -h1 { font-size: 188%; }
749 -h2 { font-size: 150%; }
750758 h3 { font-size: 132%; }
 759+h3 .editsection { font-size: 76%; font-weight: normal; }
751760 h4 { font-size: 116%; }
 761+h4 .editsection { font-size: 86%; font-weight: normal; }
752762 h5 { font-size: 100%; }
 763+h5 .editsection { font-weight: normal; }
753764 h6 { font-size: 80%; }
754 -
755 -/* To replicate the old padding, where h# were block-level elements and edit
756 - * links were floated, we need to multiply .5em top padding and .17em bottom
757 - * padding by the header text sizes. */
758 -.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */
759 -.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */
760 -.mw-h3 { padding: .66em 0 .22em; } /* etc. */
761 -.mw-h4 { padding: .58em 0 .20em; }
762 -.mw-h5 { padding: .50em 0 .17em; }
763 -.mw-h6 { padding: .40em 0 .14em; }
764 -
765 -
 765+h6 .editsection { font-size: 125%; font-weight: normal; }
 766+.editsection { float: right; }
766767 p {
767768 margin: .4em 0 .5em 0;
768769 line-height: 1.5em;
Index: trunk/phase3/includes/Linker.php
@@ -1506,11 +1506,10 @@
15071507 * @return String: HTML headline
15081508 */
15091509 public static function makeHeadline( $level, $attribs, $anchor, $text, $link, $legacyAnchor = false ) {
1510 - $ret = "<div class=\"mw-h$level\">"
1511 - . "<h$level$attribs"
 1510+ $ret = "<h$level$attribs"
 1511+ . $link
15121512 . " <span class=\"mw-headline\" id=\"$anchor\">$text</span>"
1513 - . "</h$level>"
1514 - . "$link </div>";
 1513+ . "</h$level>";
15151514 if ( $legacyAnchor !== false ) {
15161515 $ret = "<div id=\"$legacyAnchor\"></div>$ret";
15171516 }
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1617,7 +1617,7 @@
16181618 * to ensure that client-side caches do not keep obsolete copies of global
16191619 * styles.
16201620 */
1621 -$wgStyleVersion = '304';
 1621+$wgStyleVersion = '303';
16221622
16231623 /**
16241624 * This will cache static pages for non-logged-in users to reduce

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93284Fix Bug 11270 & Bug 11555 : Make editsection link more understandable by posi...diebuche16:43, 27 July 2011
r93285r93284 : Update rightClickEdit.jsdiebuche16:56, 27 July 2011

Status & tagging log