r40856 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40855‎ | r40856 | r40857 >
Date:15:26, 15 September 2008
Author:simetrical
Status:old
Tags:
Comment:
[ImageMap] No position: relative if unneeded

This helps work around bug 9126 a little. Suggested by Splarka.
Modified paths:
  • /trunk/extensions/ImageMap/ImageMap_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ImageMap/ImageMap_body.php
@@ -256,7 +256,6 @@
257257 $anchor = $imageNode->parentNode;
258258 $parent = $anchor->parentNode;
259259 $div = $parent->insertBefore( new DOMElement( 'div' ), $anchor );
260 - $div->setAttribute( 'style', 'position: relative;' );
261260 if ( $defaultLinkAttribs ) {
262261 $defaultAnchor = $div->appendChild( new DOMElement( 'a' ) );
263262 foreach ( $defaultLinkAttribs as $name => $value ) {
@@ -274,6 +273,8 @@
275274 $xpath = new DOMXPath( $domDoc );
276275 $magnify = $xpath->query( '//div[@class="magnify"]' );
277276 if ( !$magnify->length && $descType != self::NONE ) {
 277+ $div->setAttribute( 'style', 'position: relative;' );
 278+
278279 # Add image description link
279280 if ( $descType == self::TOP_LEFT || $descType == self::BOTTOM_LEFT ) {
280281 $descLeft = 0;

Follow-up revisions

RevisionCommit summaryAuthorDate
r41720Proposed fix for bug 9126: use negative top margin. Like YouTube QuickList ic...tstarling03:10, 6 October 2008