r96760 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96759‎ | r96760 | r96761 >
Date:23:51, 10 September 2011
Author:robin
Status:ok (Comments)
Tags:
Comment:
* Per Aaron on r96261, use string 'flip' instead of boolean
* Apparently @noflip should only be set once, otherwise it behaves differently
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/skins/CologneBlue.php (modified) (history)
  • /trunk/phase3/skins/Simple.php (modified) (history)
  • /trunk/phase3/skins/Standard.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/Simple.php
@@ -44,7 +44,7 @@
4545 $rules[] = "a.stub:after { $underline; }";
4646 }
4747 $style = implode( "\n", $rules );
48 - $out->addInlineStyle( $style, /* flip css if RTL */true );
 48+ $out->addInlineStyle( $style, 'flip' );
4949
5050 }
5151 }
Index: trunk/phase3/skins/CologneBlue.php
@@ -47,7 +47,7 @@
4848 $rules[] = "/* @noflip */body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto; bottom:4px;}"; # Hides from IE
4949 }
5050 $style = implode( "\n", $rules );
51 - $out->addInlineStyle( $style, /* flip css if RTL */true );
 51+ $out->addInlineStyle( $style, 'flip' );
5252 }
5353
5454 }
Index: trunk/phase3/skins/Standard.php
@@ -30,20 +30,20 @@
3131
3232 if ( 2 == $qb ) { # Right
3333 $rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; right: 4px; border-left: 2px solid #000000; }";
34 - $rules[] = "/* @noflip */#article, /* @noflip */#mw-data-after-content { margin-left: 4px; margin-right: 152px; }";
 34+ $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }";
3535 } elseif ( 1 == $qb || 3 == $qb ) {
3636 $rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; left: 4px; border-right: 1px solid gray; }";
37 - $rules[] = "/* @noflip */#article, /* @noflip */#mw-data-after-content { margin-left: 152px; margin-right: 4px; }";
 37+ $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }";
3838 if( 3 == $qb ) {
3939 $rules[] = "/* @noflip */#quickbar { position: fixed; padding: 4px; }";
4040 }
4141 } elseif ( 4 == $qb ) {
4242 $rules[] = "/* @noflip */#quickbar { position: fixed; right: 0px; top: 0px; padding: 4px;}";
4343 $rules[] = "/* @noflip */#quickbar { border-right: 1px solid gray; }";
44 - $rules[] = "/* @noflip */#article, /* @noflip */#mw-data-after-content { margin-right: 152px; margin-left: 4px; }";
 44+ $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }";
4545 }
4646 $style = implode( "\n", $rules );
47 - $out->addInlineStyle( $style, /* flip css if RTL */true );
 47+ $out->addInlineStyle( $style, 'flip' );
4848 }
4949
5050 }
Index: trunk/phase3/includes/OutputPage.php
@@ -2955,10 +2955,10 @@
29562956 /**
29572957 * Adds inline CSS styles
29582958 * @param $style_css Mixed: inline CSS
2959 - * @param $flip Boolean: Whether to flip the CSS if needed
 2959+ * @param $flip False or String: Set to 'flip' to flip the CSS if needed
29602960 */
29612961 public function addInlineStyle( $style_css, $flip = false ) {
2962 - if( $flip && $this->getLang()->isRTL() ) {
 2962+ if( $flip === 'flip' && $this->getLang()->isRTL() ) {
29632963 # If wanted, and the interface is right-to-left, flip the CSS
29642964 $style_css = CSSJanus::transform( $style_css, true, false );
29652965 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r96812* r96737: set OutputPage->addWikiText() as an interface message by default...robin21:07, 11 September 2011
r976351.18wmf1: MFT r96760, r96765, r97551, r97552, r97622catrope15:54, 20 September 2011
r97673REL1_18 MFT r96760, r76765, r96810, r97551, r97552, r97575, r97607, r97608, r...reedy22:36, 20 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96261* Mark underline css as !important. It should override other css (such as the...robin21:50, 4 September 2011

Comments

#Comment by Nikerabbit (talk | contribs)   09:59, 11 September 2011

The default could be 'noflip' instead of false to keep it always a string. The rest looks very nice.

#Comment by SPQRobin (talk | contribs)   21:07, 11 September 2011

Done in r96812

Status & tagging log