diff --git a/config/rules.mk b/config/rules.mk index 327d13a18e4..43fc7632ffe 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -342,8 +342,8 @@ XPIDL_GEN_DIR = _xpidlgen ifdef MOZ_UPDATE_XTERM # Its good not to have a newline at the end of the titlebar string because it # makes the make -s output easier to read. Echo -n does not work on all -# platforms, but we can trick sed into doing it. -UPDATE_TITLE = sed -e "s!Y!$(1) in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$(2)!" $(MOZILLA_DIR)/config/xterm.str; +# platforms, but we can trick printf into doing it. +UPDATE_TITLE = printf "\033]0;%s in %s\007" $(1) $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$(2) ; endif define SUBMAKE # $(call SUBMAKE,target,directory) diff --git a/config/xterm.str b/config/xterm.str deleted file mode 100644 index 07e5905ed7c..00000000000 --- a/config/xterm.str +++ /dev/null @@ -1 +0,0 @@ -]0;gmake: Y \ No newline at end of file diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk index 327d13a18e4..43fc7632ffe 100644 --- a/js/src/config/rules.mk +++ b/js/src/config/rules.mk @@ -342,8 +342,8 @@ XPIDL_GEN_DIR = _xpidlgen ifdef MOZ_UPDATE_XTERM # Its good not to have a newline at the end of the titlebar string because it # makes the make -s output easier to read. Echo -n does not work on all -# platforms, but we can trick sed into doing it. -UPDATE_TITLE = sed -e "s!Y!$(1) in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$(2)!" $(MOZILLA_DIR)/config/xterm.str; +# platforms, but we can trick printf into doing it. +UPDATE_TITLE = printf "\033]0;%s in %s\007" $(1) $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$(2) ; endif define SUBMAKE # $(call SUBMAKE,target,directory) diff --git a/layout/base/nsStyleConsts.h b/layout/base/nsStyleConsts.h index 67a92d3b090..31bbe4bac17 100644 --- a/layout/base/nsStyleConsts.h +++ b/layout/base/nsStyleConsts.h @@ -742,6 +742,7 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) { #define NS_STYLE_UNICODE_BIDI_EMBED 0x1 #define NS_STYLE_UNICODE_BIDI_ISOLATE 0x2 #define NS_STYLE_UNICODE_BIDI_OVERRIDE 0x4 +#define NS_STYLE_UNICODE_BIDI_ISOLATE_OVERRIDE 0x6 #define NS_STYLE_UNICODE_BIDI_PLAINTEXT 0x8 // See nsStyleTable (here for HTML 4.0 for now, should probably change to side flags) diff --git a/layout/reftests/bidi/613149-1b.html b/layout/reftests/bidi/613149-1b.html index b639b0d5d4d..67f259eb849 100644 --- a/layout/reftests/bidi/613149-1b.html +++ b/layout/reftests/bidi/613149-1b.html @@ -6,7 +6,7 @@ diff --git a/layout/style/html.css b/layout/style/html.css index ee9e58a797a..42bd05def8a 100644 --- a/layout/style/html.css +++ b/layout/style/html.css @@ -88,7 +88,7 @@ bdo, bdo[dir] { unicode-bidi: bidi-override; } bdo[dir="auto"] { - unicode-bidi: bidi-override -moz-isolate; + unicode-bidi: -moz-isolate-override; } textarea[dir="auto"], pre[dir="auto"] { unicode-bidi: -moz-plaintext; } diff --git a/layout/style/nsCSSKeywordList.h b/layout/style/nsCSSKeywordList.h index f87c366dc8c..d9b9df3d6a2 100644 --- a/layout/style/nsCSSKeywordList.h +++ b/layout/style/nsCSSKeywordList.h @@ -101,6 +101,7 @@ CSS_KEY(-moz-inline-flex, _moz_inline_flex) CSS_KEY(-moz-inline-grid, _moz_inline_grid) CSS_KEY(-moz-inline-stack, _moz_inline_stack) CSS_KEY(-moz-isolate, _moz_isolate) +CSS_KEY(-moz-isolate-override, _moz_isolate_override) CSS_KEY(-moz-japanese-formal, _moz_japanese_formal) CSS_KEY(-moz-japanese-informal, _moz_japanese_informal) CSS_KEY(-moz-kannada, _moz_kannada) diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index e15ecbc3f51..7d3f5a28a8e 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -519,7 +519,6 @@ protected: bool ParseTextDecoration(); bool ParseTextDecorationLine(nsCSSValue& aValue); bool ParseTextOverflow(nsCSSValue& aValue); - bool ParseUnicodeBidi(nsCSSValue& aValue); bool ParseShadowItem(nsCSSValue& aValue, bool aIsBoxShadow); bool ParseShadowList(nsCSSProperty aProperty); @@ -6171,8 +6170,6 @@ CSSParserImpl::ParseSingleValueProperty(nsCSSValue& aValue, return ParseTextDecorationLine(aValue); case eCSSProperty_text_overflow: return ParseTextOverflow(aValue); - case eCSSProperty_unicode_bidi: - return ParseUnicodeBidi(aValue); default: NS_ABORT_IF_FALSE(false, "should not reach here"); return false; @@ -9291,33 +9288,6 @@ CSSParserImpl::ParseTextOverflow(nsCSSValue& aValue) } return true; } - -bool -CSSParserImpl::ParseUnicodeBidi(nsCSSValue& aValue) -{ - if (ParseVariant(aValue, VARIANT_HK, nsCSSProps::kUnicodeBidiKTable)) { - if (eCSSUnit_Enumerated == aValue.GetUnit()) { - PRInt32 intValue = aValue.GetIntValue(); - // unicode-bidi can have either one or two values, but the only legal - // combination of two values is 'isolate bidi-override' - if (intValue == NS_STYLE_UNICODE_BIDI_ISOLATE || - intValue == NS_STYLE_UNICODE_BIDI_OVERRIDE) { - // look for more keywords - nsCSSValue second; - if (ParseEnum(second, nsCSSProps::kUnicodeBidiKTable)) { - intValue |= second.GetIntValue(); - if (intValue != (NS_STYLE_UNICODE_BIDI_ISOLATE | - NS_STYLE_UNICODE_BIDI_OVERRIDE)) { - return false; - } - } - aValue.SetIntValue(intValue, eCSSUnit_Enumerated); - } - } - return true; - } - return false; -} bool CSSParserImpl::ParseTransitionProperty() diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index 851cf56203d..4350652bf31 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -2758,10 +2758,9 @@ CSS_PROP_TEXTRESET( unicode-bidi, unicode_bidi, UnicodeBidi, - CSS_PROPERTY_PARSE_VALUE | - CSS_PROPERTY_VALUE_PARSER_FUNCTION, + CSS_PROPERTY_PARSE_VALUE, "", - 0, + VARIANT_HK, kUnicodeBidiKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index 9cc3ee150dd..b0ea193eb87 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -1370,6 +1370,7 @@ const PRInt32 nsCSSProps::kUnicodeBidiKTable[] = { eCSSKeyword_embed, NS_STYLE_UNICODE_BIDI_EMBED, eCSSKeyword_bidi_override, NS_STYLE_UNICODE_BIDI_OVERRIDE, eCSSKeyword__moz_isolate, NS_STYLE_UNICODE_BIDI_ISOLATE, + eCSSKeyword__moz_isolate_override, NS_STYLE_UNICODE_BIDI_ISOLATE_OVERRIDE, eCSSKeyword__moz_plaintext, NS_STYLE_UNICODE_BIDI_PLAINTEXT, eCSSKeyword_UNKNOWN,-1 }; diff --git a/layout/style/nsCSSValue.cpp b/layout/style/nsCSSValue.cpp index 3dad12a6f24..915513c466a 100644 --- a/layout/style/nsCSSValue.cpp +++ b/layout/style/nsCSSValue.cpp @@ -828,21 +828,6 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult) const aResult); } } - else if (eCSSProperty_unicode_bidi == aProperty) { - MOZ_STATIC_ASSERT(NS_STYLE_UNICODE_BIDI_NORMAL == 0, - "unicode-bidi style constants not as expected"); - PRInt32 intValue = GetIntValue(); - if (NS_STYLE_UNICODE_BIDI_NORMAL == intValue) { - AppendASCIItoUTF16(nsCSSProps::LookupPropertyValue(aProperty, intValue), - aResult); - } else { - nsStyleUtil::AppendBitmaskCSSValue( - aProperty, intValue, - NS_STYLE_UNICODE_BIDI_EMBED, - NS_STYLE_UNICODE_BIDI_PLAINTEXT, - aResult); - } - } else { const nsAFlatCString& name = nsCSSProps::LookupPropertyValue(aProperty, GetIntValue()); AppendASCIItoUTF16(name, aResult); diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index 639e202dc09..4ffef5f1dcb 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -2725,19 +2725,9 @@ nsIDOMCSSValue* nsComputedDOMStyle::DoGetUnicodeBidi() { nsROCSSPrimitiveValue *val = GetROCSSPrimitiveValue(); - PRInt32 intValue = GetStyleTextReset()->mUnicodeBidi; - - if (NS_STYLE_UNICODE_BIDI_NORMAL == intValue) { - val->SetIdent(eCSSKeyword_normal); - } else { - nsAutoString unicodeBidiString; - nsStyleUtil::AppendBitmaskCSSValue(eCSSProperty_unicode_bidi, intValue, - NS_STYLE_UNICODE_BIDI_EMBED, - NS_STYLE_UNICODE_BIDI_PLAINTEXT, - unicodeBidiString); - val->SetString(unicodeBidiString); - } - + val->SetIdent( + nsCSSProps::ValueToKeywordEnum(GetStyleTextReset()->mUnicodeBidi, + nsCSSProps::kUnicodeBidiKTable)); return val; } diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 1650a78ba89..b328d4d3bd1 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -3387,8 +3387,8 @@ var gCSSProperties = { inherited: false, type: CSS_TYPE_LONGHAND, initial_values: [ "normal" ], - other_values: [ "embed", "bidi-override", "-moz-isolate", "-moz-plaintext", "-moz-isolate bidi-override", "bidi-override -moz-isolate" ], - invalid_values: [ "auto", "none", "normal embed", "normal bidi-override", "normal -moz-isolate", "normal -moz-plaintext", "embed normal", "embed -moz-isolate", "embed bidi-override", "embed -moz-plaintext", "bidi-override normal", "bidi-override embed", "bidi-override -moz-plaintext", "-moz-isolate normal", "-moz-isolate embed", "-moz-isolate -moz-plaintext", "-moz-plaintext normal", "-moz-plaintext embed", "-moz-plaintext bidi-override", "-moz-plaintext -moz-isolate" ] + other_values: [ "embed", "bidi-override", "-moz-isolate", "-moz-plaintext", "-moz-isolate-override" ], + invalid_values: [ "auto", "none" ] }, "vertical-align": { domProp: "verticalAlign", diff --git a/layout/style/test/test_default_bidi_css.html b/layout/style/test/test_default_bidi_css.html index 7ffcbb6fb35..3386a075ea5 100644 --- a/layout/style/test/test_default_bidi_css.html +++ b/layout/style/test/test_default_bidi_css.html @@ -52,7 +52,7 @@ var tests = [ ['bdo', {}, 'ltr', 'bidi-override'], ['bdo', {'dir': 'ltr'}, 'ltr', 'bidi-override'], ['bdo', {'dir': 'rtl'}, 'rtl', 'bidi-override'], - ['bdo', {'dir': 'auto'}, 'ltr', '-moz-isolate bidi-override'], + ['bdo', {'dir': 'auto'}, 'ltr', '-moz-isolate-override'], ['bdo', {'dir': ''}, 'ltr', 'bidi-override'], ['textarea', {}, 'ltr', 'normal'], diff --git a/security/manager/pki/src/nsPKIParamBlock.cpp b/security/manager/pki/src/nsPKIParamBlock.cpp index 220f216f18d..6fff5021cb0 100644 --- a/security/manager/pki/src/nsPKIParamBlock.cpp +++ b/security/manager/pki/src/nsPKIParamBlock.cpp @@ -83,7 +83,9 @@ nsPKIParamBlock::SetISupportAtIndex(PRInt32 index, nsISupports *object) return NS_ERROR_OUT_OF_MEMORY; } } - return mSupports->InsertElementAt(object, index-1); + // Ignore any InsertElementAt error, because this function always did that + mSupports->InsertElementAt(object, index-1); + return NS_OK; } /* nsISupports getISupportAtIndex (in PRInt32 index); */ diff --git a/security/manager/ssl/src/nsCertOverrideService.cpp b/security/manager/ssl/src/nsCertOverrideService.cpp index 5fb94621bd3..b6968930b00 100644 --- a/security/manager/ssl/src/nsCertOverrideService.cpp +++ b/security/manager/ssl/src/nsCertOverrideService.cpp @@ -297,7 +297,7 @@ WriteEntryCallback(nsCertOverrideEntry *aEntry, nsIOutputStream *rawStreamPtr = (nsIOutputStream *)aArg; - nsresult rv; + PRUint32 unused; if (rawStreamPtr && aEntry) { @@ -309,19 +309,19 @@ WriteEntryCallback(nsCertOverrideEntry *aEntry, nsCertOverride::convertBitsToString(settings.mOverrideBits, bits_string); - rawStreamPtr->Write(aEntry->mHostWithPort.get(), aEntry->mHostWithPort.Length(), &rv); - rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &rv); + rawStreamPtr->Write(aEntry->mHostWithPort.get(), aEntry->mHostWithPort.Length(), &unused); + rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &unused); rawStreamPtr->Write(settings.mFingerprintAlgOID.get(), - settings.mFingerprintAlgOID.Length(), &rv); - rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &rv); + settings.mFingerprintAlgOID.Length(), &unused); + rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &unused); rawStreamPtr->Write(settings.mFingerprint.get(), - settings.mFingerprint.Length(), &rv); - rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &rv); + settings.mFingerprint.Length(), &unused); + rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &unused); rawStreamPtr->Write(bits_string.get(), - bits_string.Length(), &rv); - rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &rv); - rawStreamPtr->Write(settings.mDBKey.get(), settings.mDBKey.Length(), &rv); - rawStreamPtr->Write(NS_LINEBREAK, NS_LINEBREAK_LEN, &rv); + bits_string.Length(), &unused); + rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &unused); + rawStreamPtr->Write(settings.mDBKey.get(), settings.mDBKey.Length(), &unused); + rawStreamPtr->Write(NS_LINEBREAK, NS_LINEBREAK_LEN, &unused); } return PL_DHASH_NEXT; @@ -361,7 +361,8 @@ nsCertOverrideService::Write() /* see ::Read for file format */ - bufferedOutputStream->Write(kHeader, sizeof(kHeader) - 1, &rv); + PRUint32 unused; + bufferedOutputStream->Write(kHeader, sizeof(kHeader) - 1, &unused); nsIOutputStream *rawStreamPtr = bufferedOutputStream; mSettingsTable.EnumerateEntries(WriteEntryCallback, rawStreamPtr);