Jkroll has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/380952 )

Change subject: Moved lines: Allow for styling of RTL languages
......................................................................

Moved lines: Allow for styling of RTL languages

From test results in T176217 with RTL languages we decided on changing
the arrow symbols in the C++ library to something neutral and do the
arrow like styling in a later step with CSS so that it can address the
RTL layout.

 * arrows are replaced with ⚫ ( MEDIUM BLACK CIRLCE U+26AB )
 * a tags get classes mw-diff-movedpara-rhs and mw-diff-movedpara-lhs

Bug: T176485
Change-Id: I8db73076d1e8925b8e020544739a37d5d53f67d2
---
M TableDiff.cpp
M tests/001.phpt
M tests/007.phpt
3 files changed, 12 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/php/wikidiff2 
refs/changes/52/380952/1

diff --git a/TableDiff.cpp b/TableDiff.cpp
index 7d85f32..eb79f08 100644
--- a/TableDiff.cpp
+++ b/TableDiff.cpp
@@ -39,7 +39,7 @@
        if (printLeft) {
                result += "  <td class=\"diff-marker\">";
                if(dstAnchor != "")
-                       result += "<a href=\"#" + dstAnchor + 
"\">&hookrightarrow;</a>";
+                       result += "<a class=\"mw-diff-movedpara-lhs\" href=\"#" 
+ dstAnchor + "\">&#x26AB;</a>";
                else
                        result += "−";
                result += "</td>\n";
@@ -56,7 +56,7 @@
        if (printRight) {
                result += "  <td class=\"diff-marker\">";
                if(dstAnchor != "")
-                       result += "<a href=\"#" + dstAnchor + 
"\">&hookleftarrow;</a>";
+                       result += "<a class=\"mw-diff-movedpara-rhs\" href=\"#" 
+ dstAnchor + "\">&#x26AB;</a>";
                else
                        result += "+";
                result += "</td>\n";
diff --git a/tests/001.phpt b/tests/001.phpt
index 6a60b5d..ffed4e7 100644
--- a/tests/001.phpt
+++ b/tests/001.phpt
@@ -171,7 +171,7 @@
   <td class="diff-context"><div>a</div></td>
 </tr>
 <tr>
-  <td class="diff-marker"><a 
href="#movedpara_7_0_rhs">&hookrightarrow;</a></td>
+  <td class="diff-marker"><a class="mw-diff-movedpara-lhs" 
href="#movedpara_7_0_rhs">&#x26AB;</a></td>
   <td class="diff-deletedline"><div><a 
name="movedpara_5_0_lhs"></a>---line---</div></td>
   <td colspan="2" class="diff-empty">&#160;</td>
 </tr>
@@ -205,7 +205,7 @@
 </tr>
 <tr>
   <td colspan="2" class="diff-empty">&#160;</td>
-  <td class="diff-marker"><a href="#movedpara_5_0_lhs">&hookleftarrow;</a></td>
+  <td class="diff-marker"><a class="mw-diff-movedpara-rhs" 
href="#movedpara_5_0_lhs">&#x26AB;</a></td>
   <td class="diff-addedline"><div><a 
name="movedpara_7_0_rhs"></a>---line---</div></td>
 </tr>
 <tr>
@@ -237,12 +237,12 @@
   <td class="diff-context"><div>a</div></td>
 </tr>
 <tr>
-  <td class="diff-marker"><a 
href="#movedpara_11_0_rhs">&hookrightarrow;</a></td>
+  <td class="diff-marker"><a class="mw-diff-movedpara-lhs" 
href="#movedpara_11_0_rhs">&#x26AB;</a></td>
   <td class="diff-deletedline"><div><a 
name="movedpara_9_0_lhs"></a>--line1--</div></td>
   <td colspan="2" class="diff-empty">&#160;</td>
 </tr>
 <tr>
-  <td class="diff-marker"><a 
href="#movedpara_11_1_rhs">&hookrightarrow;</a></td>
+  <td class="diff-marker"><a class="mw-diff-movedpara-lhs" 
href="#movedpara_11_1_rhs">&#x26AB;</a></td>
   <td class="diff-deletedline"><div><a 
name="movedpara_9_1_lhs"></a>--line2--</div></td>
   <td colspan="2" class="diff-empty">&#160;</td>
 </tr>
@@ -276,12 +276,12 @@
 </tr>
 <tr>
   <td colspan="2" class="diff-empty">&#160;</td>
-  <td class="diff-marker"><a href="#movedpara_9_0_lhs">&hookleftarrow;</a></td>
+  <td class="diff-marker"><a class="mw-diff-movedpara-rhs" 
href="#movedpara_9_0_lhs">&#x26AB;</a></td>
   <td class="diff-addedline"><div><a 
name="movedpara_11_0_rhs"></a>--line1--</div></td>
 </tr>
 <tr>
   <td colspan="2" class="diff-empty">&#160;</td>
-  <td class="diff-marker"><a href="#movedpara_9_1_lhs">&hookleftarrow;</a></td>
+  <td class="diff-marker"><a class="mw-diff-movedpara-rhs" 
href="#movedpara_9_1_lhs">&#x26AB;</a></td>
   <td class="diff-addedline"><div><a 
name="movedpara_11_1_rhs"></a>--line2--</div></td>
 </tr>
 <tr>
diff --git a/tests/007.phpt b/tests/007.phpt
index 1ff150c..6de2bbb 100644
--- a/tests/007.phpt
+++ b/tests/007.phpt
@@ -43,7 +43,7 @@
   <td colspan="2" class="diff-lineno"><!--LINE 1--></td>
 </tr>
 <tr>
-  <td class="diff-marker"><a 
href="#movedpara_6_1_rhs">&hookrightarrow;</a></td>
+  <td class="diff-marker"><a class="mw-diff-movedpara-lhs" 
href="#movedpara_6_1_rhs">&#x26AB;</a></td>
   <td class="diff-deletedline"><div><a name="movedpara_0_0_lhs"></a>Substance, 
in the truest<del class="diffchange diffchange-inline"> and primary</del> and 
most definite sense of the word, is that which is neither predicable of a 
subject nor present in a subject; for instance, the individual man or horse. 
But in a secondary sense those things are called substances within which, as 
species, the primary substances are included; also those which, as genera, 
include the species. For instance, the individual man is included in the 
species 'man', and the genus to which the species belongs is 'animal'; these, 
therefore—that is to say, the species 'man' and the genus 'animal,-are termed 
secondary substances.</div></td>
   <td colspan="2" class="diff-empty">&#160;</td>
 </tr>
@@ -65,7 +65,7 @@
 </tr>
 <tr>
   <td colspan="2" class="diff-empty">&#160;</td>
-  <td class="diff-marker"><a href="#movedpara_4_1_lhs">&hookleftarrow;</a></td>
+  <td class="diff-marker"><a class="mw-diff-movedpara-rhs" 
href="#movedpara_4_1_lhs">&#x26AB;</a></td>
   <td class="diff-addedline"><div><a name="movedpara_2_1_rhs"></a>Everything 
except primary substances is either predicable of a primary substance or 
present in a primary substance. This becomes evident by reference to particular 
instances which occur. 'Animal' is predicated of the species 'man', therefore 
of the individual man, for if there were no individual man of whom it could be 
predicated, it could not be predicated of the species 'man' at all. Again, 
colour is present in body, therefore in individual bodies, for if there were no 
individual body in which it was present, it could not be present in body at 
all. Thus everything except primary substances is either predicated of primary 
substances, or is present in them, and if these last did not exist, it would be 
impossible for anything else to exist<ins class="diffchange 
diffchange-inline">. Never underestimate lawns</ins>.</div></td>
 </tr>
 <tr>
@@ -86,7 +86,7 @@
   <td colspan="2" class="diff-empty">&#160;</td>
 </tr>
 <tr>
-  <td class="diff-marker"><a 
href="#movedpara_2_1_rhs">&hookrightarrow;</a></td>
+  <td class="diff-marker"><a class="mw-diff-movedpara-lhs" 
href="#movedpara_2_1_rhs">&#x26AB;</a></td>
   <td class="diff-deletedline"><div><a name="movedpara_4_1_lhs"></a>Everything 
except primary substances is either predicable of a primary substance or 
present in a primary substance. This becomes evident by reference to particular 
instances which occur. 'Animal' is predicated of the species 'man', therefore 
of the individual man, for if there were no individual man of whom it could be 
predicated, it could not be predicated of the species 'man' at all. Again, 
colour is present in body, therefore in individual bodies, for if there were no 
individual body in which it was present, it could not be present in body at 
all. Thus everything except primary substances is either predicated of primary 
substances, or is present in them, and if these last did not exist, it would be 
impossible for anything else to exist.</div></td>
   <td colspan="2" class="diff-empty">&#160;</td>
 </tr>
@@ -109,6 +109,6 @@
 </tr>
 <tr>
   <td colspan="2" class="diff-empty">&#160;</td>
-  <td class="diff-marker"><a href="#movedpara_0_0_lhs">&hookleftarrow;</a></td>
+  <td class="diff-marker"><a class="mw-diff-movedpara-rhs" 
href="#movedpara_0_0_lhs">&#x26AB;</a></td>
   <td class="diff-addedline"><div><a name="movedpara_6_1_rhs"></a>Substance, 
in the truest and most definite sense of the word, is that which is neither 
predicable of a subject nor present in a subject; for instance, the individual 
man or horse. But in a secondary sense those things are called substances 
within which, as species, the primary substances are included; also those 
which, as genera, include the species. For instance, the individual man is 
included in the species 'man', and the genus to which the species belongs is 
'animal'; these, therefore—that is to say, the species 'man' and the genus 
'animal,-are termed secondary substances.</div></td>
 </tr>
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/380952
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8db73076d1e8925b8e020544739a37d5d53f67d2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/php/wikidiff2
Gerrit-Branch: master
Gerrit-Owner: Jkroll <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to