Fix #6844: Semantically correct tags for diffchanges (<ins> && <del>)
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 3 Feb 2007 21:47:53 +0000 (21:47 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 3 Feb 2007 21:47:53 +0000 (21:47 +0000)
Bumps wgStyleVersion to 55.
Patch by Messi <messias+spam@gmail.com>

RELEASE-NOTES
includes/DefaultSettings.php
includes/DifferenceEngine.php
includes/normal/RandomTest.php
skins/chick/main.css
skins/common/common.css
skins/common/commonPrint.css
skins/monobook/main.css
skins/simple/main.css

index 81d87ed..97d3ff5 100644 (file)
@@ -168,6 +168,7 @@ lighter making things easier to read.
   edit in a batch group. Isolated and patched by Travis Derouin.
 * Fix for paths in 1.4->1.5 special-case updater script
 * (bug 8789) AJAX search: IE users can now use the return key
+* (bug 6844) Use <ins> and <del> tags to emphase the differences
 
 
 == Languages updated ==
index fc99c0a..df57c77 100644 (file)
@@ -1110,7 +1110,7 @@ $wgCacheEpoch = '20030516000000';
  * to ensure that client-side caches don't keep obsolete copies of global
  * styles.
  */
-$wgStyleVersion = '54';
+$wgStyleVersion = '55';
 
 
 # Server-side caching:
index 1d3e413..d218917 100644 (file)
@@ -1558,9 +1558,12 @@ class _HWLDF_WordAccumulator {
 
        function _flushGroup ($new_tag) {
                if ($this->_group !== '') {
-                       if ($this->_tag == 'mark')
-                               $this->_line .= '<span class="diffchange">' .
-                                       htmlspecialchars ( $this->_group ) . '</span>';
+                       if ($this->_tag == 'ins')
+                               $this->_line .= '<ins class="diffchange">' .
+                                       htmlspecialchars ( $this->_group ) . '</ins>';
+                       elseif ($this->_tag == 'del')
+                               $this->_line .= '<del class="diffchange">' .
+                                       htmlspecialchars ( $this->_group ) . '</del>';
                        else
                                $this->_line .= htmlspecialchars ( $this->_group );
                }
@@ -1664,7 +1667,7 @@ class WordLevelDiff extends MappedDiff
                        if ($edit->type == 'copy')
                                $orig->addWords($edit->orig);
                        elseif ($edit->orig)
-                               $orig->addWords($edit->orig, 'mark');
+                               $orig->addWords($edit->orig, 'del');
                }
                $lines = $orig->getLines();
                wfProfileOut( $fname );
@@ -1680,7 +1683,7 @@ class WordLevelDiff extends MappedDiff
                        if ($edit->type == 'copy')
                                $closing->addWords($edit->closing);
                        elseif ($edit->closing)
-                               $closing->addWords($edit->closing, 'mark');
+                               $closing->addWords($edit->closing, 'ins');
                }
                $lines = $closing->getLines();
                wfProfileOut( $fname );
index d6a6e86..de61b6f 100644 (file)
@@ -69,7 +69,7 @@ function showDiffs( $a, $b ) {
        $formatter = new TableDiffFormatter();
        $funky = $formatter->format( $diffs );
        $matches = array();
-       preg_match_all( '/<span class="diffchange">(.*?)<\/span>/', $funky, $matches );
+       preg_match_all( '/<(?:ins|del) class="diffchange">(.*?)<\/span>/', $funky, $matches );
        foreach( $matches[1] as $bit ) {
                $hex = bin2hex( $bit );
                echo "\t$hex\n";
index af4a6fa..4e92b98 100644 (file)
@@ -415,7 +415,8 @@ td.diff-context {
     background:#eeeeee;
     font-size: smaller;
 }
-span.diffchange { color: red; }
+ins.diffchange { color: red; text-decoration: none; }
+del.diffchange { color: red; text-decoration: none; }
 
 a.external { color: #3366bb; }
 
index f05a4a5..85d8129 100644 (file)
@@ -125,7 +125,16 @@ td.diff-context {
     background:#eeeeee;
     font-size: 94%;
 }
-span.diffchange { color: red; font-weight: bold; }
+ins.diffchange {
+       color: red;
+       font-weight: bold;
+       text-decoration: none;
+}
+del.diffchange {
+       color: red;
+       font-weight: bold;
+       text-decoration: none;
+}
 
 img { border: none; }
 img.tex { vertical-align: middle; }
index 48673c0..2bd7e98 100644 (file)
@@ -283,5 +283,13 @@ td.diff-context {
     background:#eeeeee;
     font-size: smaller;
 }
-span.diffchange { color: silver; font-weight: bold; text-decoration: underline; }
-
+ins.diffchange {
+    color: silver;
+    font-weight: bold;
+    text-decoration: underline;
+}
+del.diffchange {
+    color: silver;
+    font-weight: bold;
+    text-decoration: underline;
+}
index 8b6a39f..83e296a 100644 (file)
@@ -591,9 +591,15 @@ td.diff-context {
        background: #eee;
        font-size: smaller;
 }
-span.diffchange {
+ins.diffchange {
        color: red;
        font-weight: bold;
+       text-decoration: none;
+}
+del.diffchange {
+       color: red;
+       font-weight: bold;
+       text-decoration: none;
 }
 
 /*
index 03b0da9..8e9f413 100644 (file)
@@ -268,7 +268,8 @@ td.diff-deletedline {
     background-color: #f8ffaa;
 }
 
-span.diffchange { background-color: #FFCDF3; }
+ins.diffchange { background-color: #FFCDF3; text-decoration: none; }
+del.diffchange { background-color: #FFCDF3; text-decoration: none; }
 .autocomment { color:  grey; }
 #pagehistory span.user {
     margin-left: 1.4em;