Bug 1308137 - Remove code around IBMBIDI_SUPPORTMODE_*r?xidorn draft
authorDhanesh B. Sabane <dhaneshsabane95@gmail.com>
Sun, 09 Oct 2016 16:42:15 +0530
changeset 422988 55cc2495e6b6a97b823f10447d2ff53649dbe26d
parent 422908 4dc6ead7ebe5c1a20fbcffb26e21f0e8bdc53333
child 533351 87f8ffdcd9ce071ce92f9451be7ff19451c69288
push id31788
push userbmo:dhaneshsabane95@gmail.com
push dateSun, 09 Oct 2016 11:13:37 +0000
bugs1308137
milestone52.0a1
Bug 1308137 - Remove code around IBMBIDI_SUPPORTMODE_*r?xidorn MozReview-Commit-ID: GBtO7aas9RF
dom/base/nsIDocument.h
intl/unicharutil/util/nsBidiUtils.h
modules/libpref/init/all.js
--- a/dom/base/nsIDocument.h
+++ b/dom/base/nsIDocument.h
@@ -206,17 +206,20 @@ public:
   typedef mozilla::net::ReferrerPolicy ReferrerPolicyEnum;
   typedef mozilla::dom::Element Element;
   typedef mozilla::dom::FullscreenRequest FullscreenRequest;
 
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_IID)
   NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
 
 #ifdef MOZILLA_INTERNAL_API
-  nsIDocument();
+  nsIDocument()
+  {
+    mBidiOptions = IBMBIDI_DEFAULT_BIDI_OPTIONS;
+  }
 #endif
 
   /**
    * Let the document know that we're starting to load data into it.
    * @param aCommand The parser command. Must not be null.
    *                 XXXbz It's odd to have that here.
    * @param aChannel The channel the data will come from. The channel must be
    *                 able to report its Content-Type.
--- a/intl/unicharutil/util/nsBidiUtils.h
+++ b/intl/unicharutil/util/nsBidiUtils.h
@@ -157,19 +157,16 @@ typedef enum nsCharType nsCharType;
 //  If Pref values are to be changed
 //  in the XUL file of Prefs. the values
 //  Must be changed here too..
 //  ------------------
 //
 #define IBMBIDI_TEXTDIRECTION_STR       "bidi.direction"
 #define IBMBIDI_TEXTTYPE_STR            "bidi.texttype"
 #define IBMBIDI_NUMERAL_STR             "bidi.numeral"
-#define IBMBIDI_TEXTDIRECTION       1
-#define IBMBIDI_TEXTTYPE            2
-#define IBMBIDI_NUMERAL             4
 
 //  ------------------
 //  Text Direction
 //  ------------------
 //  bidi.direction
 #define IBMBIDI_TEXTDIRECTION_LTR     1 //  1 = directionLTRBidi *
 #define IBMBIDI_TEXTDIRECTION_RTL     2 //  2 = directionRTLBidi
 //  ------------------
@@ -185,29 +182,26 @@ typedef enum nsCharType nsCharType;
 //  bidi.numeral
 #define IBMBIDI_NUMERAL_NOMINAL       0 //  0 = nominalnumeralBidi *
 #define IBMBIDI_NUMERAL_REGULAR       1 //  1 = regularcontextnumeralBidi
 #define IBMBIDI_NUMERAL_HINDICONTEXT  2 //  2 = hindicontextnumeralBidi
 #define IBMBIDI_NUMERAL_ARABIC        3 //  3 = arabicnumeralBidi
 #define IBMBIDI_NUMERAL_HINDI         4 //  4 = hindinumeralBidi
 #define IBMBIDI_NUMERAL_PERSIANCONTEXT 5 // 5 = persiancontextnumeralBidi
 #define IBMBIDI_NUMERAL_PERSIAN       6 //  6 = persiannumeralBidi
-//  ------------------
-//  Support Mode
-//  ------------------
-//  bidi.support
 
 #define IBMBIDI_DEFAULT_BIDI_OPTIONS              \
         ((IBMBIDI_TEXTDIRECTION_LTR<<0)         | \
          (IBMBIDI_TEXTTYPE_CHARSET<<4)          | \
-         (IBMBIDI_NUMERAL_NOMINAL<<8)          | \
+         (IBMBIDI_NUMERAL_NOMINAL<<8))         
 
 #define GET_BIDI_OPTION_DIRECTION(bo) (((bo)>>0) & 0x0000000F) /* 4 bits for DIRECTION */
 #define GET_BIDI_OPTION_TEXTTYPE(bo) (((bo)>>4) & 0x0000000F) /* 4 bits for TEXTTYPE */
 #define GET_BIDI_OPTION_NUMERAL(bo) (((bo)>>8) & 0x0000000F) /* 4 bits for NUMERAL */
+
 #define SET_BIDI_OPTION_DIRECTION(bo, dir) {(bo)=((bo) & 0xFFFFFFF0)|(((dir)& 0x0000000F)<<0);}
 #define SET_BIDI_OPTION_TEXTTYPE(bo, tt) {(bo)=((bo) & 0xFFFFFF0F)|(((tt)& 0x0000000F)<<4);}
 #define SET_BIDI_OPTION_NUMERAL(bo, num) {(bo)=((bo) & 0xFFFFF0FF)|(((num)& 0x0000000F)<<8);}
 
 /* Constants related to the position of numerics in the codepage */
 #define START_HINDI_DIGITS              0x0660
 #define END_HINDI_DIGITS                0x0669
 #define START_ARABIC_DIGITS             0x0030
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -2404,23 +2404,16 @@ pref("bidi.texttype", 1);
 // 0 = nominalnumeralBidi *
 // 1 = regularcontextnumeralBidi
 // 2 = hindicontextnumeralBidi
 // 3 = arabicnumeralBidi
 // 4 = hindinumeralBidi
 // 5 = persiancontextnumeralBidi
 // 6 = persiannumeralBidi
 pref("bidi.numeral", 0);
-// ------------------
-//  Support Mode
-// ------------------
-// 1 = mozillaBidisupport *
-// 2 = OsBidisupport
-// 3 = disableBidisupport
-pref("bidi.support", 1);
 // Whether delete and backspace should immediately delete characters not
 // visually adjacent to the caret, or adjust the visual position of the caret
 // on the first keypress and delete the character on a second keypress
 pref("bidi.edit.delete_immediately", true);
 
 // Bidi caret movement style:
 // 0 = logical
 // 1 = visual