Merge Bug 366774
authorPhilip Chee <philip.chee@gmail.com>
Mon, 25 Apr 2011 02:19:44 +0800
changeset 68488 8db1df84708ca997c2d1ba1851324405a3f3d6c3
parent 68486 e49949eeaef3052429a3309548b8e9778f1bbb51 (diff)
parent 68487 2928c63ffb5bedba9cecbf3c01e49aca5d4e439b (current diff)
child 68490 54b9f7d8db85cafbde935402b6429530ba459366
push id19661
push userphilip.chee@gmail.com
push dateSun, 24 Apr 2011 18:25:41 +0000
treeherdermozilla-central@8302f5191d92 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs366774
milestone6.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge Bug 366774
--- a/docshell/base/nsIMarkupDocumentViewer.idl
+++ b/docshell/base/nsIMarkupDocumentViewer.idl
@@ -138,16 +138,23 @@ interface nsIMarkupDocumentViewer : nsIS
    * bidiSupport: whether to use platform bidi support or Mozilla's bidi support
    *              1 - Use Mozilla's bidi support
    *              2 - Use the platform bidi support
    *              3 - Disable bidi support
    */
   attribute octet bidiSupport;
 
   /**
+   * bidiCharacterSet: whether to force the user's character set
+   *                   1 - use the document character set
+   *                   2 - use the character set chosen by the user
+   */
+  attribute octet bidiCharacterSet;  
+  
+  /**
    * Use this attribute to access all the Bidi options in one operation
    */
   attribute PRUint32 bidiOptions;
 };
 
 [scriptable, uuid(cadfcad1-5570-4dac-b5a2-cd1ea751fe29)]
 interface nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH : nsIMarkupDocumentViewer
 {
--- a/intl/unicharutil/util/nsBidiUtils.h
+++ b/intl/unicharutil/util/nsBidiUtils.h
@@ -169,23 +169,21 @@ typedef enum nsCharType nsCharType;
 //  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_SUPPORTMODE_STR         "bidi.support"
-#define IBMBIDI_CHARSET_STR             "bidi.characterset"
 
 #define IBMBIDI_TEXTDIRECTION       1
 #define IBMBIDI_TEXTTYPE            2
 #define IBMBIDI_NUMERAL             4
 #define IBMBIDI_SUPPORTMODE         5
-#define IBMBIDI_CHARSET             6
 
 //  ------------------
 //  Text Direction
 //  ------------------
 //  bidi.direction
 #define IBMBIDI_TEXTDIRECTION_LTR     1 //  1 = directionLTRBidi *
 #define IBMBIDI_TEXTDIRECTION_RTL     2 //  2 = directionRTLBidi
 //  ------------------
@@ -208,42 +206,32 @@ typedef enum nsCharType nsCharType;
 #define IBMBIDI_NUMERAL_PERSIAN       6 //  6 = persiannumeralBidi
 //  ------------------
 //  Support Mode
 //  ------------------
 //  bidi.support
 #define IBMBIDI_SUPPORTMODE_MOZILLA     1 //  1 = mozillaBidisupport *
 #define IBMBIDI_SUPPORTMODE_OSBIDI      2 //  2 = OsBidisupport
 #define IBMBIDI_SUPPORTMODE_DISABLE     3 //  3 = disableBidisupport
-//  ------------------
-//  Charset Mode
-//  ------------------
-//  bidi.characterset
-#define IBMBIDI_CHARSET_BIDI        1 //  1 = doccharactersetBidi *
-#define IBMBIDI_CHARSET_DEFAULT     2 //  2 = defaultcharactersetBidi
 
 #define IBMBIDI_DEFAULT_BIDI_OPTIONS              \
         ((IBMBIDI_TEXTDIRECTION_LTR<<0)         | \
          (IBMBIDI_TEXTTYPE_CHARSET<<4)          | \
          (IBMBIDI_NUMERAL_NOMINAL<<8)          | \
-         (IBMBIDI_SUPPORTMODE_MOZILLA<<12)      | \
-         (IBMBIDI_CHARSET_BIDI<<16))
-
+         (IBMBIDI_SUPPORTMODE_MOZILLA<<12)
 
 #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 GET_BIDI_OPTION_SUPPORT(bo) (((bo)>>12) & 0x0000000F) /* 4 bits for SUPPORT */
-#define GET_BIDI_OPTION_CHARACTERSET(bo) (((bo)>>16) & 0x0000000F) /* 4 bits for CHARACTERSET */
 
 #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);}
 #define SET_BIDI_OPTION_SUPPORT(bo, sup) {(bo)=((bo) & 0xFFFF0FFF)|(((sup)& 0x0000000F)<<12);}
-#define SET_BIDI_OPTION_CHARACTERSET(bo, cs) {(bo)=((bo) & 0xFFF0FFFF)|(((cs)& 0x0000000F)<<16);}
 
 /* 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
 #define END_ARABIC_DIGITS               0x0039
 #define START_FARSI_DIGITS              0x06f0
 #define END_FARSI_DIGITS                0x06f9
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -1212,22 +1212,16 @@ pref("bidi.texttype", 1);
 pref("bidi.numeral", 0);
 // ------------------
 //  Support Mode
 // ------------------
 // 1 = mozillaBidisupport *
 // 2 = OsBidisupport
 // 3 = disableBidisupport
 pref("bidi.support", 1);
-// ------------------
-//  Charset Mode
-// ------------------
-// 1 = doccharactersetBidi *
-// 2 = defaultcharactersetBidi
-pref("bidi.characterset", 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", false);
 
 // Bidi caret movement style:
 // 0 = logical
 // 1 = visual