Bug 1308137 - Remove code around IBMBIDI_SUPPORTMODE_*. r?xidorn
MozReview-Commit-ID: 96g2DBfpfX9
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -1302,16 +1302,17 @@ nsIDocument::nsIDocument()
// unless we get a window, and in that case the docshell value will get
// &&-ed in, this is safe.
mAllowDNSPrefetch(true),
mIsBeingUsedAsImage(false),
mHasLinksToUpdate(false),
mFontFaceSetDirty(true),
mGetUserFontSetCalled(false),
mPostedFlushUserFontSet(false),
+ mBidiOptions(IBMBIDI_DEFAULT_BIDI_OPTIONS),
mPartID(0),
mDidFireDOMContentLoaded(true),
mHasScrollLinkedEffect(false),
mUserHasInteracted(false)
{
SetIsInDocument();
PR_INIT_CLIST(&mDOMMediaQueryLists);
--- a/intl/unicharutil/util/nsBidiUtils.h
+++ b/intl/unicharutil/util/nsBidiUtils.h
@@ -157,22 +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_SUPPORTMODE_STR "bidi.support"
-
-#define IBMBIDI_TEXTDIRECTION 1
-#define IBMBIDI_TEXTTYPE 2
-#define IBMBIDI_NUMERAL 4
-#define IBMBIDI_SUPPORTMODE 5
// ------------------
// Text Direction
// ------------------
// bidi.direction
#define IBMBIDI_TEXTDIRECTION_LTR 1 // 1 = directionLTRBidi *
#define IBMBIDI_TEXTDIRECTION_RTL 2 // 2 = directionRTLBidi
// ------------------
@@ -188,39 +182,29 @@ 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_SUPPORTMODE_MOZILLA 1 // 1 = mozillaBidisupport *
-#define IBMBIDI_SUPPORTMODE_OSBIDI 2 // 2 = OsBidisupport
-#define IBMBIDI_SUPPORTMODE_DISABLE 3 // 3 = disableBidisupport
#define IBMBIDI_DEFAULT_BIDI_OPTIONS \
((IBMBIDI_TEXTDIRECTION_LTR<<0) | \
(IBMBIDI_TEXTTYPE_CHARSET<<4) | \
- (IBMBIDI_NUMERAL_NOMINAL<<8) | \
- (IBMBIDI_SUPPORTMODE_MOZILLA<<12))
+ (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 GET_BIDI_OPTION_SUPPORT(bo) (((bo)>>12) & 0x0000000F) /* 4 bits for SUPPORT */
#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);}
/* 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/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -598,21 +598,16 @@ nsPresContext::GetUserPreferences()
GET_BIDI_OPTION_TEXTTYPE(bidiOptions));
SET_BIDI_OPTION_TEXTTYPE(bidiOptions, prefInt);
prefInt =
Preferences::GetInt(IBMBIDI_NUMERAL_STR,
GET_BIDI_OPTION_NUMERAL(bidiOptions));
SET_BIDI_OPTION_NUMERAL(bidiOptions, prefInt);
- prefInt =
- Preferences::GetInt(IBMBIDI_SUPPORTMODE_STR,
- GET_BIDI_OPTION_SUPPORT(bidiOptions));
- SET_BIDI_OPTION_SUPPORT(bidiOptions, prefInt);
-
// We don't need to force reflow: either we are initializing a new
// prescontext or we are being called from UpdateAfterPreferencesChanged()
// which triggers a reflow anyway.
SetBidi(bidiOptions, false);
}
void
nsPresContext::InvalidatePaintedLayers()
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -2411,23 +2411,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