r91427 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91426‎ | r91427 | r91428 >
Date:21:30, 4 July 2011
Author:kaldari
Status:reverted
Tags:
Comment:
better fix for bug 27338 - doesnt rely on line-height
Modified paths:
  • /trunk/phase3/includes/ImageGallery.php (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/shared.css
@@ -561,6 +561,11 @@
562562 margin: 2px;
563563 }
564564
 565+li.gallerybox div.thumb img {
 566+ display: block;
 567+ margin: 0 auto;
 568+}
 569+
565570 div.gallerytext {
566571 overflow: hidden;
567572 font-size: 94%;
Index: trunk/phase3/includes/ImageGallery.php
@@ -281,10 +281,7 @@
282282 $thumbhtml = "\n\t\t\t" . '<div style="height: ' . ( self::THUMB_PADDING + $this->mHeights ) . 'px;">'
283283 . htmlspecialchars( $img->getLastError() ) . '</div>';
284284 } else {
285 - # We get layout problems with the margin, if the image is smaller
286 - # than the line-height (17), so we add less margin in these cases.
287 - $minThumbHeight = $thumb->height > 17 ? $thumb->height : 17;
288 - $vpad = ( self::THUMB_PADDING + $this->mHeights - $minThumbHeight ) /2;
 285+ $vpad = ( self::THUMB_PADDING + $this->mHeights - $thumb->height ) /2;
289286
290287 $imageParameters = array(
291288 'desc-link' => true,

Follow-up revisions

RevisionCommit summaryAuthorDate
r91430using proper margin heights: 14 + 68 * 2 = 150kaldari23:43, 4 July 2011
r91557Revert r91426 and followups r91427, r91430: Breaks Gallery-related parser testsdemon16:23, 6 July 2011
r91573refixing bug 27338 with all parser test fixes, reverts r91557kaldari18:07, 6 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82181* (bug 27338) Gallery in 1.17 breaks for audio/video + ogghandler...mah19:39, 15 February 2011
r82309followup r82181 and r82215 to fix the FIXME and botched fix for FIXME....mah23:21, 16 February 2011
r91426fixing rounding problem, per comment at r82309kaldari21:05, 4 July 2011

Status & tagging log