r53490 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53489‎ | r53490 | r53491 >
Date:19:59, 19 July 2009
Author:brion
Status:ok
Tags:
Comment:
* (bug 19287) Workaround for lag on history page in Firefox 3.5
Added id attributes to diff radios and show/hide check boxes; this is to work around a bug in Firefox 3.5 where form session saving hangs for a while after each change when a page contains hundreds of anonymous radio and checkboxes.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/PageHistory.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/PageHistory.php
@@ -301,9 +301,12 @@
302302 '(' . $this->message['rev-delundel'] . ')' );
303303 // Otherwise, show the link...
304304 } else {
305 - $jsCall = 'updateShowHideForm('.$rev->getId().',this.checked)';
 305+ $id = $rev->getId();
 306+ $jsCall = "updateShowHideForm($id,this.checked)";
306307 $del = Xml::check( 'showhiderevisions', false,
307 - $hidden + array('onchange' => $jsCall) );
 308+ $hidden + array(
 309+ 'onchange' => $jsCall,
 310+ 'id' => "mw-revdel-$id" ) );
308311 $query = array(
309312 'type' => 'revision',
310313 'target' => $this->mTitle->getPrefixedDbkey(),
@@ -473,11 +476,15 @@
474477 */
475478 function diffButtons( $rev, $firstInList, $counter ) {
476479 if( $this->linesonpage > 1 ) {
477 - $radio = array( 'type' => 'radio', 'value' => $rev->getId() );
 480+ $id = $rev->getId();
 481+ $radio = array( 'type' => 'radio', 'value' => $id );
478482 /** @todo: move title texts to javascript */
479483 if( $firstInList ) {
480484 $first = Xml::element( 'input',
481 - array_merge( $radio, array( 'style' => 'visibility:hidden', 'name' => 'oldid' ) )
 485+ array_merge( $radio, array(
 486+ 'style' => 'visibility:hidden',
 487+ 'name' => 'oldid',
 488+ 'id' => 'mw-oldid-null' ) )
482489 );
483490 $checkmark = array( 'checked' => 'checked' );
484491 } else {
@@ -487,14 +494,20 @@
488495 $checkmark = array(); // We will check the next possible one
489496 } else if( $counter == 2 || !$this->mOldIdChecked ) {
490497 $checkmark = array( 'checked' => 'checked' );
491 - $this->mOldIdChecked = $rev->getId();
 498+ $this->mOldIdChecked = $id;
492499 } else {
493500 $checkmark = array();
494501 }
495 - $first = Xml::element( 'input', array_merge( $radio, $checkmark, array( 'name' => 'oldid' ) ) );
 502+ $first = Xml::element( 'input',
 503+ array_merge( $radio, $checkmark, array(
 504+ 'name' => 'oldid',
 505+ 'id' => "mw-oldid-$id" ) ) );
496506 $checkmark = array();
497507 }
498 - $second = Xml::element( 'input', array_merge( $radio, $checkmark, array( 'name' => 'diff' ) ) );
 508+ $second = Xml::element( 'input',
 509+ array_merge( $radio, $checkmark, array(
 510+ 'name' => 'diff',
 511+ 'id' => "mw-diff-$id" ) ) );
499512 return $first . $second;
500513 } else {
501514 return '';
Index: trunk/phase3/RELEASE-NOTES
@@ -294,6 +294,7 @@
295295 Keyword set was not useful, and is ignored by modern search engines anway.
296296 * (bug 19827) Special:SpecialPages title is "Upload file
297297 * (bug 19355) Added .xhtml, .xht to upload file extension blacklist
 298+* (bug 19287) Workaround for lag on history page in Firefox 3.5
298299
299300 == API changes in 1.16 ==
300301

Status & tagging log