diff --git a/mozilla/content/base/src/nsGenericElement.cpp b/mozilla/content/base/src/nsGenericElement.cpp index f0058a23065..16172999b9d 100644 --- a/mozilla/content/base/src/nsGenericElement.cpp +++ b/mozilla/content/base/src/nsGenericElement.cpp @@ -1315,7 +1315,7 @@ nsGenericElement::SetProperty(JSContext *aContext, JSObject *aObj, jsval aID, js propName.Assign(JS_GetStringChars(JS_ValueToString(aContext, aID))); if (propName.Length() > 2) prefix.Assign(propName.GetUnicode(), 2); - if (prefix.Equals("on")) { + if (prefix.EqualsWithConversion("on")) { nsCOMPtr atom = getter_AddRefs(NS_NewAtom(propName)); nsIEventListenerManager *manager = nsnull; @@ -1932,7 +1932,7 @@ nsGenericElement::TriggerLink(nsIPresContext* aPresContext, if (NS_FAILED(rv)) return rv; } else { - absURLSpec = aURLSpec; + absURLSpec.Assign(aURLSpec); } // Now pass on absolute url to the click handler @@ -2373,8 +2373,8 @@ nsGenericContainerElement::ListAttributes(FILE* out) const nsAutoString buffer; if (kNameSpaceID_None != attr->mNameSpaceID) { // prefix namespace - buffer.Append(attr->mNameSpaceID, 10); - buffer.Append(':'); + buffer.AppendInt(attr->mNameSpaceID, 10); + buffer.AppendWithConversion(':'); } // name @@ -2383,7 +2383,7 @@ nsGenericContainerElement::ListAttributes(FILE* out) const buffer.Append(name); // value - buffer.Append("="); + buffer.AppendWithConversion("="); buffer.Append(attr->mValue); fputs(" ", out); diff --git a/mozilla/content/html/content/src/nsHTMLFormElement.cpp b/mozilla/content/html/content/src/nsHTMLFormElement.cpp index 915f6efc2f7..c1228f2b6ed 100644 --- a/mozilla/content/html/content/src/nsHTMLFormElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLFormElement.cpp @@ -529,7 +529,7 @@ nsHTMLFormElement::NamedItem(JSContext* cx, jsval* argv, PRUint32 argc, jsval* a // a different type of element (IMG, OBJECT, etc.) if ((nsnull == *aReturn) && (nsnull != mInner.mDocument) && (argc > 0)) { char* str = JS_GetStringBytes(JS_ValueToString(cx, argv[0])); - nsAutoString name(str); + nsAutoString name; name.AssignWithConversion(str); nsCOMPtr scriptContext; nsCOMPtr globalObject; mInner.mDocument->GetScriptGlobalObject(getter_AddRefs(globalObject)); @@ -614,7 +614,7 @@ nsHTMLFormElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID) PRBool ret; JSObject* obj; char* str = JS_GetStringBytes(JS_ValueToString(aContext, aID)); - nsAutoString name(str); + nsAutoString name; name.AssignWithConversion(str); nsCOMPtr scriptContext; nsresult result = NS_OK; @@ -858,7 +858,7 @@ nsFormControlList::GetNamedObject(JSContext* aContext, jsval aID, JSObject** aOb nsCOMPtr scriptContext; nsCOMPtr owner; char* str = JS_GetStringBytes(JS_ValueToString(aContext, aID)); - nsAutoString name(str); + nsAutoString name; name.AssignWithConversion(str); nsCOMPtr document; nsCOMPtr form; @@ -905,7 +905,7 @@ nsFormControlList::GetNamedObject(JSContext* aContext, jsval aID, JSObject** aOb } // If it is, then get all radio buttons or checkboxes with the same name - if (document && (type.Equals("Radio") || type.Equals("Checkbox"))) { + if (document && (type.EqualsWithConversion("Radio") || type.EqualsWithConversion("Checkbox"))) { nsCOMPtr htmlDoc = do_QueryInterface(document); if (htmlDoc) { nsCOMPtr list; diff --git a/mozilla/content/html/content/src/nsHTMLImageElement.cpp b/mozilla/content/html/content/src/nsHTMLImageElement.cpp index df045c533c5..ee3fa9f6992 100644 --- a/mozilla/content/html/content/src/nsHTMLImageElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLImageElement.cpp @@ -318,7 +318,7 @@ nsHTMLImageElement::GetHeight(nsString& aValue) if (NS_SUCCEEDED(result)) { nsSize size; imageFrame->GetIntrinsicImageSize(size); - aValue.Append(size.height); + aValue.AppendInt(size.height); } } @@ -343,7 +343,7 @@ nsHTMLImageElement::GetWidth(nsString& aValue) if (NS_SUCCEEDED(result)) { nsSize size; imageFrame->GetIntrinsicImageSize(size); - aValue.Append(size.width); + aValue.AppendInt(size.width); } } @@ -765,11 +765,11 @@ nsHTMLImageElement::SetSrcInner(nsIURI* aBaseURL, const nsString& aSrc) if (nsnull != aBaseURL) { result = NS_MakeAbsoluteURI(url, aSrc, aBaseURL); if (NS_FAILED(result)) { - url = aSrc; + url.Assign(aSrc); } } else { - url = aSrc; + url.Assign(aSrc); } nsSize* specifiedSize = nsnull; diff --git a/mozilla/content/html/content/src/nsHTMLInputElement.cpp b/mozilla/content/html/content/src/nsHTMLInputElement.cpp index de1a107e60c..94cf08ec34d 100644 --- a/mozilla/content/html/content/src/nsHTMLInputElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLInputElement.cpp @@ -378,7 +378,7 @@ nsHTMLInputElement::GetValue(nsString& aValue) // Obtain the value property from the presentation state. if (presState) { nsAutoString value; - presState->GetStateProperty("value", aValue); + presState->GetStateProperty(NS_ConvertASCIItoUCS2("value"), aValue); } } @@ -429,7 +429,7 @@ nsHTMLInputElement::SetValue(const nsString& aValue) // Obtain the value property from the presentation state. if (presState) { - presState->SetStateProperty("value", aValue); + presState->SetStateProperty(NS_ConvertASCIItoUCS2("value"), aValue); } } return NS_OK; @@ -442,7 +442,7 @@ nsHTMLInputElement::SetValue(const nsString& aValue) NS_IMETHODIMP nsHTMLInputElement::GetChecked(PRBool* aValue) { - nsAutoString value("0"); + nsAutoString value; value.AssignWithConversion("0"); nsIFormControlFrame* formControlFrame = nsnull; if (NS_SUCCEEDED(nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame))) { if (nsnull != formControlFrame) { @@ -460,11 +460,11 @@ nsHTMLInputElement::GetChecked(PRBool* aValue) // Obtain the value property from the presentation state. if (presState) { - presState->GetStateProperty("checked", value); + presState->GetStateProperty(NS_ConvertASCIItoUCS2("checked"), value); } } - if (value.Equals("1")) + if (value.EqualsWithConversion("1")) *aValue = PR_TRUE; else *aValue = PR_FALSE; @@ -482,12 +482,8 @@ nsHTMLInputElement::SetPresStateChecked(nsIHTMLContent * aHTMLContent, // Obtain the value property from the presentation state. if (presState) { - nsAutoString value; - if (PR_TRUE == aValue) - value = "1"; - else - value = "0"; - presState->SetStateProperty("checked", value); + nsAutoString value; value.AssignWithConversion( aValue ? "1" : "0" ); + presState->SetStateProperty(NS_ConvertASCIItoUCS2("checked"), value); return NS_OK; } return NS_ERROR_FAILURE; @@ -504,14 +500,14 @@ nsHTMLInputElement::SetChecked(PRBool aValue) // if so, then return nsAutoString checkedStr; formControlFrame->GetProperty(nsHTMLAtoms::checked, checkedStr); - if ((checkedStr.Equals("1") && aValue) || (checkedStr.Equals("0") && !aValue)) { + if ((checkedStr.EqualsWithConversion("1") && aValue) || (checkedStr.EqualsWithConversion("0") && !aValue)) { return NS_OK; } // the value is being toggled nsIPresContext* presContext; nsGenericHTMLElement::GetPresContext(this, &presContext); - formControlFrame->SetProperty(presContext, nsHTMLAtoms::checked, PR_TRUE == aValue?"1":"0"); + formControlFrame->SetProperty(presContext, nsHTMLAtoms::checked, NS_ConvertASCIItoUCS2(PR_TRUE == aValue?"1":"0")); NS_IF_RELEASE(presContext); } else { @@ -671,7 +667,7 @@ nsHTMLInputElement::Select() { nsCOMPtr presContext; nsGenericHTMLElement::GetPresContext(this, getter_AddRefs(presContext)); - formControlFrame->SetProperty(presContext, nsHTMLAtoms::select, ""); + formControlFrame->SetProperty(presContext, nsHTMLAtoms::select, nsAutoString()); return NS_OK; } } diff --git a/mozilla/content/html/content/src/nsHTMLLabelElement.cpp b/mozilla/content/html/content/src/nsHTMLLabelElement.cpp index bde0e774b34..7857ddd0d3a 100644 --- a/mozilla/content/html/content/src/nsHTMLLabelElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLLabelElement.cpp @@ -69,26 +69,26 @@ public: } NS_IMETHOD GetAttribute(const nsString& aName, nsString& aReturn) { if (aName.EqualsIgnoreCase("htmlfor")) { - return mInner.GetAttribute(nsAutoString("for"), aReturn); + return mInner.GetAttribute(NS_ConvertASCIItoUCS2("for"), aReturn); } return mInner.GetAttribute(aName, aReturn); } NS_IMETHOD SetAttribute(const nsString& aName, const nsString& aValue) { if (aName.EqualsIgnoreCase("htmlfor")) { - return mInner.SetAttribute(nsAutoString("for"), aValue); + return mInner.SetAttribute(NS_ConvertASCIItoUCS2("for"), aValue); } return mInner.SetAttribute(aName, aValue); } NS_IMETHOD RemoveAttribute(const nsString& aName) { if (aName.EqualsIgnoreCase("htmlfor")) { - return mInner.RemoveAttribute(nsAutoString("for")); + return mInner.RemoveAttribute(NS_ConvertASCIItoUCS2("for")); } return mInner.RemoveAttribute(aName); } NS_IMETHOD GetAttributeNode(const nsString& aName, nsIDOMAttr** aReturn) { if (aName.EqualsIgnoreCase("htmlfor")) { - return mInner.GetAttributeNode(nsAutoString("for"), aReturn); + return mInner.GetAttributeNode(NS_ConvertASCIItoUCS2("for"), aReturn); } return mInner.GetAttributeNode(aName, aReturn); } diff --git a/mozilla/content/html/content/src/nsHTMLOptionElement.cpp b/mozilla/content/html/content/src/nsHTMLOptionElement.cpp index ff6dc018b9b..47d8bec3a2d 100644 --- a/mozilla/content/html/content/src/nsHTMLOptionElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLOptionElement.cpp @@ -258,12 +258,9 @@ nsHTMLOptionElement::GetSelected(PRBool* aValue) PRInt32 indx; if (NS_OK == GetIndex(&indx)) { nsString value; - value.Append(indx, 10); // Save the index in base 10 + value.AppendInt(indx, 10); // Save the index in base 10 formControlFrame->GetProperty(nsHTMLAtoms::selected, value); - if (value.Equals("1")) - *aValue = PR_TRUE; - else - *aValue = PR_FALSE; + *aValue = value.EqualsWithConversion("1"); } } return rv; diff --git a/mozilla/content/html/content/src/nsHTMLPreElement.cpp b/mozilla/content/html/content/src/nsHTMLPreElement.cpp index 964c9b9f541..82e3cb66003 100644 --- a/mozilla/content/html/content/src/nsHTMLPreElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLPreElement.cpp @@ -177,7 +177,7 @@ MapFontAttributesInto(const nsIHTMLMappedAttributes* aAttributes, if (value.GetUnit() == eHTMLUnit_Empty) { nsStyleFont* font = (nsStyleFont*) aContext->GetMutableStyleData(eStyleStruct_Font); - font->mFont.name = "serif"; + font->mFont.name.AssignWithConversion("serif"); } } } diff --git a/mozilla/content/html/content/src/nsHTMLSelectElement.cpp b/mozilla/content/html/content/src/nsHTMLSelectElement.cpp index 383fd60586e..7bb3bd2c717 100644 --- a/mozilla/content/html/content/src/nsHTMLSelectElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLSelectElement.cpp @@ -437,10 +437,10 @@ nsHTMLSelectElement::GetType(nsString& aType) result = GetMultiple(&isMultiple); if (NS_OK == result) { if (isMultiple) { - aType.Assign("select-multiple"); + aType.AssignWithConversion("select-multiple"); } else { - aType.Assign("select-one"); + aType.AssignWithConversion("select-one"); } } @@ -509,7 +509,7 @@ nsHTMLSelectElement::GetSelectedIndex(PRInt32* aValue) nsresult res = GetPresState(getter_AddRefs(presState), getter_AddRefs(value)); if (NS_SUCCEEDED(res) && presState) { nsCOMPtr supp; - presState->GetStatePropertyAsSupports("selecteditems", getter_AddRefs(supp)); + presState->GetStatePropertyAsSupports(NS_ConvertASCIItoUCS2("selecteditems"), getter_AddRefs(supp)); res = NS_ERROR_NULL_POINTER; if (supp) { @@ -591,7 +591,7 @@ nsHTMLSelectElement::SetSelectedIndex(PRInt32 aIndex) nsIFormControlFrame* formControlFrame = nsnull; if (NS_OK == nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame)) { nsString value; - value.Append(aIndex, 10); + value.AppendInt(aIndex, 10); nsIPresContext* presContext; nsGenericHTMLElement::GetPresContext(this, &presContext); formControlFrame->SetProperty(presContext, nsHTMLAtoms::selectedindex, value); @@ -659,7 +659,7 @@ nsHTMLSelectElement::SetSelectedIndex(PRInt32 aIndex) // If it is a new nsISupportsArray then // set it into the PresState if (!doesExist) { - presState->SetStatePropertyAsSupports("selecteditems", value); + presState->SetStatePropertyAsSupports(NS_ConvertASCIItoUCS2("selecteditems"), value); } } // if } @@ -870,7 +870,7 @@ nsHTMLSelectElement::GetPresState(nsIPresState** aPresState, nsISupportsArray** // check to see if there is already a supports nsISupports * supp; - nsresult res = presState->GetStatePropertyAsSupports("selecteditems", &supp); + nsresult res = presState->GetStatePropertyAsSupports(NS_ConvertASCIItoUCS2("selecteditems"), &supp); if (NS_SUCCEEDED(res) && supp != nsnull) { if (NS_FAILED(supp->QueryInterface(NS_GET_IID(nsISupportsArray), (void**)aValueArray))) { // Be paranoid - make sure it is zeroed out diff --git a/mozilla/content/html/content/src/nsHTMLTableElement.cpp b/mozilla/content/html/content/src/nsHTMLTableElement.cpp index 4972dfb10f3..aad771851bd 100644 --- a/mozilla/content/html/content/src/nsHTMLTableElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableElement.cpp @@ -859,7 +859,7 @@ nsHTMLTableElement::StringToAttribute(nsIAtom* aAttribute, /* attributes that are either empty, or pixels */ else if (aAttribute == nsHTMLAtoms::border) { - PRInt32 min = (aValue.Equals("")) ? 1 : 0; + PRInt32 min = (aValue.IsEmpty()) ? 1 : 0; if (nsGenericHTMLElement::ParseValue(aValue, min, aResult, eHTMLUnit_Pixel)) { return NS_CONTENT_ATTR_HAS_VALUE; } diff --git a/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp b/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp index 20e52938967..bd9edf46653 100644 --- a/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp @@ -340,7 +340,7 @@ nsHTMLTextAreaElement::Select() { nsCOMPtr presContext; nsGenericHTMLElement::GetPresContext(this, getter_AddRefs(presContext)); - formControlFrame->SetProperty(presContext, nsHTMLAtoms::select, ""); + formControlFrame->SetProperty(presContext, nsHTMLAtoms::select, nsAutoString()); return NS_OK; } } @@ -359,7 +359,7 @@ NS_IMPL_INT_ATTR(nsHTMLTextAreaElement, TabIndex, tabindex) NS_IMETHODIMP nsHTMLTextAreaElement::GetType(nsString& aType) { - aType.Assign("textarea"); + aType.AssignWithConversion("textarea"); return NS_OK; } diff --git a/mozilla/content/html/style/src/nsCSSDeclaration.cpp b/mozilla/content/html/style/src/nsCSSDeclaration.cpp index a1dfb4c7884..8b97a6ede95 100644 --- a/mozilla/content/html/style/src/nsCSSDeclaration.cpp +++ b/mozilla/content/html/style/src/nsCSSDeclaration.cpp @@ -3458,7 +3458,7 @@ CSSDeclarationImpl::GetValue(nsCSSProperty aProperty, nsString& aValue) case eCSSProperty_size: if (HAS_VALUE(mPage,mSizeWidth) && HAS_VALUE(mPage,mSizeHeight)) { AppendValueToString(eCSSProperty_size_width, aValue); - aValue.Append(' '); + aValue.AppendWithConversion(' '); AppendValueToString(eCSSProperty_size_height, aValue); } break; diff --git a/mozilla/content/html/style/src/nsCSSStruct.cpp b/mozilla/content/html/style/src/nsCSSStruct.cpp index a1dfb4c7884..8b97a6ede95 100644 --- a/mozilla/content/html/style/src/nsCSSStruct.cpp +++ b/mozilla/content/html/style/src/nsCSSStruct.cpp @@ -3458,7 +3458,7 @@ CSSDeclarationImpl::GetValue(nsCSSProperty aProperty, nsString& aValue) case eCSSProperty_size: if (HAS_VALUE(mPage,mSizeWidth) && HAS_VALUE(mPage,mSizeHeight)) { AppendValueToString(eCSSProperty_size_width, aValue); - aValue.Append(' '); + aValue.AppendWithConversion(' '); AppendValueToString(eCSSProperty_size_height, aValue); } break; diff --git a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp index 464cf03d786..3790b1044e7 100644 --- a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp +++ b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp @@ -2372,12 +2372,12 @@ static PRBool ValueIncludes(const nsString& aValueList, const nsString& aValue, if (start < end) { if (aCaseSensitive) { - if (aValue.Equals(value, start)) { + if (nsCRT::strcmp(value, start)) { return PR_TRUE; } } else { - if (aValue.EqualsIgnoreCase(value, start)) { + if (nsCRT::strcasecmp(value, start)) { return PR_TRUE; } } @@ -2413,12 +2413,12 @@ static PRBool ValueDashMatch(const nsString& aValueList, const nsString& aValue, if (start < end) { if (aCaseSensitive) { - if (aValue.Equals(value, start)) { + if (nsCRT::strcmp(value, start)) { return PR_TRUE; } } else { - if (aValue.EqualsIgnoreCase(value, start)) { + if (nsCRT::strcasecmp(value, start)) { return PR_TRUE; } } diff --git a/mozilla/content/html/style/src/nsCSSValue.cpp b/mozilla/content/html/style/src/nsCSSValue.cpp index 4c26d08c8b1..945e64b1ec2 100644 --- a/mozilla/content/html/style/src/nsCSSValue.cpp +++ b/mozilla/content/html/style/src/nsCSSValue.cpp @@ -283,93 +283,93 @@ void nsCSSValue::AppendToString(nsString& aBuffer, nsCSSProperty aPropID) const } if (-1 < aPropID) { - aBuffer.Append(nsCSSProps::GetStringValue(aPropID)); - aBuffer.Append(": "); + aBuffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID)); + aBuffer.AppendWithConversion(": "); } if ((eCSSUnit_String <= mUnit) && (mUnit <= eCSSUnit_Counters)) { switch (mUnit) { - case eCSSUnit_URL: aBuffer.Append("url("); break; - case eCSSUnit_Attr: aBuffer.Append("attr("); break; - case eCSSUnit_Counter: aBuffer.Append("counter("); break; - case eCSSUnit_Counters: aBuffer.Append("counters("); break; + case eCSSUnit_URL: aBuffer.AppendWithConversion("url("); break; + case eCSSUnit_Attr: aBuffer.AppendWithConversion("attr("); break; + case eCSSUnit_Counter: aBuffer.AppendWithConversion("counter("); break; + case eCSSUnit_Counters: aBuffer.AppendWithConversion("counters("); break; default: break; } if (nsnull != mValue.mString) { - aBuffer.Append('"'); + aBuffer.AppendWithConversion('"'); aBuffer.Append(*(mValue.mString)); - aBuffer.Append('"'); + aBuffer.AppendWithConversion('"'); } else { - aBuffer.Append("null str"); + aBuffer.AppendWithConversion("null str"); } } else if ((eCSSUnit_Integer <= mUnit) && (mUnit <= eCSSUnit_Enumerated)) { - aBuffer.Append(mValue.mInt, 10); - aBuffer.Append("[0x"); - aBuffer.Append(mValue.mInt, 16); - aBuffer.Append(']'); + aBuffer.AppendInt(mValue.mInt, 10); + aBuffer.AppendWithConversion("[0x"); + aBuffer.AppendInt(mValue.mInt, 16); + aBuffer.AppendWithConversion(']'); } else if (eCSSUnit_Color == mUnit){ - aBuffer.Append("(0x"); - aBuffer.Append(NS_GET_R(mValue.mColor), 16); - aBuffer.Append(" 0x"); - aBuffer.Append(NS_GET_G(mValue.mColor), 16); - aBuffer.Append(" 0x"); - aBuffer.Append(NS_GET_B(mValue.mColor), 16); - aBuffer.Append(" 0x"); - aBuffer.Append(NS_GET_A(mValue.mColor), 16); - aBuffer.Append(')'); + aBuffer.AppendWithConversion("(0x"); + aBuffer.AppendInt(NS_GET_R(mValue.mColor), 16); + aBuffer.AppendWithConversion(" 0x"); + aBuffer.AppendInt(NS_GET_G(mValue.mColor), 16); + aBuffer.AppendWithConversion(" 0x"); + aBuffer.AppendInt(NS_GET_B(mValue.mColor), 16); + aBuffer.AppendWithConversion(" 0x"); + aBuffer.AppendInt(NS_GET_A(mValue.mColor), 16); + aBuffer.AppendWithConversion(')'); } else if (eCSSUnit_Percent == mUnit) { - aBuffer.Append(mValue.mFloat * 100.0f); + aBuffer.AppendFloat(mValue.mFloat * 100.0f); } else if (eCSSUnit_Percent < mUnit) { - aBuffer.Append(mValue.mFloat); + aBuffer.AppendFloat(mValue.mFloat); } switch (mUnit) { case eCSSUnit_Null: break; - case eCSSUnit_Auto: aBuffer.Append("auto"); break; - case eCSSUnit_Inherit: aBuffer.Append("inherit"); break; - case eCSSUnit_None: aBuffer.Append("none"); break; - case eCSSUnit_Normal: aBuffer.Append("normal"); break; + case eCSSUnit_Auto: aBuffer.AppendWithConversion("auto"); break; + case eCSSUnit_Inherit: aBuffer.AppendWithConversion("inherit"); break; + case eCSSUnit_None: aBuffer.AppendWithConversion("none"); break; + case eCSSUnit_Normal: aBuffer.AppendWithConversion("normal"); break; case eCSSUnit_String: break; case eCSSUnit_URL: case eCSSUnit_Attr: case eCSSUnit_Counter: - case eCSSUnit_Counters: aBuffer.Append(')'); break; - case eCSSUnit_Integer: aBuffer.Append("int"); break; - case eCSSUnit_Enumerated: aBuffer.Append("enum"); break; - case eCSSUnit_Color: aBuffer.Append("rbga"); break; - case eCSSUnit_Percent: aBuffer.Append("%"); break; - case eCSSUnit_Number: aBuffer.Append("#"); break; - case eCSSUnit_Inch: aBuffer.Append("in"); break; - case eCSSUnit_Foot: aBuffer.Append("ft"); break; - case eCSSUnit_Mile: aBuffer.Append("mi"); break; - case eCSSUnit_Millimeter: aBuffer.Append("mm"); break; - case eCSSUnit_Centimeter: aBuffer.Append("cm"); break; - case eCSSUnit_Meter: aBuffer.Append("m"); break; - case eCSSUnit_Kilometer: aBuffer.Append("km"); break; - case eCSSUnit_Point: aBuffer.Append("pt"); break; - case eCSSUnit_Pica: aBuffer.Append("pc"); break; - case eCSSUnit_Didot: aBuffer.Append("dt"); break; - case eCSSUnit_Cicero: aBuffer.Append("cc"); break; - case eCSSUnit_EM: aBuffer.Append("em"); break; - case eCSSUnit_EN: aBuffer.Append("en"); break; - case eCSSUnit_XHeight: aBuffer.Append("ex"); break; - case eCSSUnit_CapHeight: aBuffer.Append("cap"); break; - case eCSSUnit_Char: aBuffer.Append("ch"); break; - case eCSSUnit_Pixel: aBuffer.Append("px"); break; - case eCSSUnit_Degree: aBuffer.Append("deg"); break; - case eCSSUnit_Grad: aBuffer.Append("grad"); break; - case eCSSUnit_Radian: aBuffer.Append("rad"); break; - case eCSSUnit_Hertz: aBuffer.Append("Hz"); break; - case eCSSUnit_Kilohertz: aBuffer.Append("kHz"); break; - case eCSSUnit_Seconds: aBuffer.Append("s"); break; - case eCSSUnit_Milliseconds: aBuffer.Append("ms"); break; + case eCSSUnit_Counters: aBuffer.AppendWithConversion(')'); break; + case eCSSUnit_Integer: aBuffer.AppendWithConversion("int"); break; + case eCSSUnit_Enumerated: aBuffer.AppendWithConversion("enum"); break; + case eCSSUnit_Color: aBuffer.AppendWithConversion("rbga"); break; + case eCSSUnit_Percent: aBuffer.AppendWithConversion("%"); break; + case eCSSUnit_Number: aBuffer.AppendWithConversion("#"); break; + case eCSSUnit_Inch: aBuffer.AppendWithConversion("in"); break; + case eCSSUnit_Foot: aBuffer.AppendWithConversion("ft"); break; + case eCSSUnit_Mile: aBuffer.AppendWithConversion("mi"); break; + case eCSSUnit_Millimeter: aBuffer.AppendWithConversion("mm"); break; + case eCSSUnit_Centimeter: aBuffer.AppendWithConversion("cm"); break; + case eCSSUnit_Meter: aBuffer.AppendWithConversion("m"); break; + case eCSSUnit_Kilometer: aBuffer.AppendWithConversion("km"); break; + case eCSSUnit_Point: aBuffer.AppendWithConversion("pt"); break; + case eCSSUnit_Pica: aBuffer.AppendWithConversion("pc"); break; + case eCSSUnit_Didot: aBuffer.AppendWithConversion("dt"); break; + case eCSSUnit_Cicero: aBuffer.AppendWithConversion("cc"); break; + case eCSSUnit_EM: aBuffer.AppendWithConversion("em"); break; + case eCSSUnit_EN: aBuffer.AppendWithConversion("en"); break; + case eCSSUnit_XHeight: aBuffer.AppendWithConversion("ex"); break; + case eCSSUnit_CapHeight: aBuffer.AppendWithConversion("cap"); break; + case eCSSUnit_Char: aBuffer.AppendWithConversion("ch"); break; + case eCSSUnit_Pixel: aBuffer.AppendWithConversion("px"); break; + case eCSSUnit_Degree: aBuffer.AppendWithConversion("deg"); break; + case eCSSUnit_Grad: aBuffer.AppendWithConversion("grad"); break; + case eCSSUnit_Radian: aBuffer.AppendWithConversion("rad"); break; + case eCSSUnit_Hertz: aBuffer.AppendWithConversion("Hz"); break; + case eCSSUnit_Kilohertz: aBuffer.AppendWithConversion("kHz"); break; + case eCSSUnit_Seconds: aBuffer.AppendWithConversion("s"); break; + case eCSSUnit_Milliseconds: aBuffer.AppendWithConversion("ms"); break; } - aBuffer.Append(' '); + aBuffer.AppendWithConversion(' '); } void nsCSSValue::ToString(nsString& aBuffer, nsCSSProperty aPropID) const diff --git a/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp b/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp index 30b5f752858..81711ce80c4 100644 --- a/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp +++ b/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp @@ -188,7 +188,7 @@ nsDOMCSSDeclaration::GetPropertyPriority(const nsString& aPropertyName, } if ((NS_OK == result) && isImportant) { - aReturn.Assign("!important"); + aReturn.AssignWithConversion("!important"); } else { aReturn.SetLength(0); @@ -204,8 +204,8 @@ nsDOMCSSDeclaration::SetProperty(const nsString& aPropertyName, { nsAutoString declString; - declString=aPropertyName; - declString.Append(":"); + declString.Assign(aPropertyName); + declString.AppendWithConversion(":"); declString.Append(aValue); declString.Append(aPriority); @@ -215,1488 +215,1488 @@ nsDOMCSSDeclaration::SetProperty(const nsString& aPropertyName, NS_IMETHODIMP nsDOMCSSDeclaration::GetAzimuth(nsString& aAzimuth) { - return GetPropertyValue("azimuth", aAzimuth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("azimuth"), aAzimuth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetAzimuth(const nsString& aAzimuth) { - return SetProperty("azimuth", aAzimuth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("azimuth"), aAzimuth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackground(nsString& aBackground) { - return GetPropertyValue("background", aBackground); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background"), aBackground); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackground(const nsString& aBackground) { - return SetProperty("background", aBackground, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background"), aBackground, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackgroundAttachment(nsString& aBackgroundAttachment) { - return GetPropertyValue("background-attachment", aBackgroundAttachment); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background-attachment"), aBackgroundAttachment); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackgroundAttachment(const nsString& aBackgroundAttachment) { - return SetProperty("background-attachment", aBackgroundAttachment, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background-attachment"), aBackgroundAttachment, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackgroundColor(nsString& aBackgroundColor) { - return GetPropertyValue("background-color", aBackgroundColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background-color"), aBackgroundColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackgroundColor(const nsString& aBackgroundColor) { - return SetProperty("background-color", aBackgroundColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background-color"), aBackgroundColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackgroundImage(nsString& aBackgroundImage) { - return GetPropertyValue("background-image", aBackgroundImage); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background-image"), aBackgroundImage); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackgroundImage(const nsString& aBackgroundImage) { - return SetProperty("background-image", aBackgroundImage, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background-image"), aBackgroundImage, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackgroundPosition(nsString& aBackgroundPosition) { - return GetPropertyValue("background-position", aBackgroundPosition); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background-position"), aBackgroundPosition); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackgroundPosition(const nsString& aBackgroundPosition) { - return SetProperty("background-position", aBackgroundPosition, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background-position"), aBackgroundPosition, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackgroundRepeat(nsString& aBackgroundRepeat) { - return GetPropertyValue("background-repeat", aBackgroundRepeat); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background-repeat"), aBackgroundRepeat); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackgroundRepeat(const nsString& aBackgroundRepeat) { - return SetProperty("background-repeat", aBackgroundRepeat, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background-repeat"), aBackgroundRepeat, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBehavior(nsString& aBehavior) { - return GetPropertyValue("behavior", aBehavior); + return GetPropertyValue(NS_ConvertASCIItoUCS2("behavior"), aBehavior); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBehavior(const nsString& aBehavior) { - return SetProperty("behavior", aBehavior, ""); + return SetProperty(NS_ConvertASCIItoUCS2("behavior"), aBehavior, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorder(nsString& aBorder) { - return GetPropertyValue("border", aBorder); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border"), aBorder); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorder(const nsString& aBorder) { - return SetProperty("border", aBorder, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border"), aBorder, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderCollapse(nsString& aBorderCollapse) { - return GetPropertyValue("border-collapse", aBorderCollapse); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-collapse"), aBorderCollapse); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderCollapse(const nsString& aBorderCollapse) { - return SetProperty("border-collapse", aBorderCollapse, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-collapse"), aBorderCollapse, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderColor(nsString& aBorderColor) { - return GetPropertyValue("border-color", aBorderColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-color"), aBorderColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderColor(const nsString& aBorderColor) { - return SetProperty("border-color", aBorderColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-color"), aBorderColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderSpacing(nsString& aBorderSpacing) { - return GetPropertyValue("border-spacing", aBorderSpacing); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-spacing"), aBorderSpacing); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderSpacing(const nsString& aBorderSpacing) { - return SetProperty("border-spacing", aBorderSpacing, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-spacing"), aBorderSpacing, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderStyle(nsString& aBorderStyle) { - return GetPropertyValue("border-style", aBorderStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-style"), aBorderStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderStyle(const nsString& aBorderStyle) { - return SetProperty("border-style", aBorderStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-style"), aBorderStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderTop(nsString& aBorderTop) { - return GetPropertyValue("border-top", aBorderTop); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-top"), aBorderTop); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderTop(const nsString& aBorderTop) { - return SetProperty("border-top", aBorderTop, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-top"), aBorderTop, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderRight(nsString& aBorderRight) { - return GetPropertyValue("border-right", aBorderRight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-right"), aBorderRight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderRight(const nsString& aBorderRight) { - return SetProperty("border-right", aBorderRight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-right"), aBorderRight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderBottom(nsString& aBorderBottom) { - return GetPropertyValue("border-bottom", aBorderBottom); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-bottom"), aBorderBottom); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderBottom(const nsString& aBorderBottom) { - return SetProperty("border-bottom", aBorderBottom, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-bottom"), aBorderBottom, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderLeft(nsString& aBorderLeft) { - return GetPropertyValue("border-left", aBorderLeft); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-left"), aBorderLeft); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderLeft(const nsString& aBorderLeft) { - return SetProperty("border-left", aBorderLeft, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-left"), aBorderLeft, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderTopColor(nsString& aBorderTopColor) { - return GetPropertyValue("border-top-color", aBorderTopColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-top-color"), aBorderTopColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderTopColor(const nsString& aBorderTopColor) { - return SetProperty("border-top-color", aBorderTopColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-top-color"), aBorderTopColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderRightColor(nsString& aBorderRightColor) { - return GetPropertyValue("border-right-color", aBorderRightColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-right-color"), aBorderRightColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderRightColor(const nsString& aBorderRightColor) { - return SetProperty("border-right-color", aBorderRightColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-right-color"), aBorderRightColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderBottomColor(nsString& aBorderBottomColor) { - return GetPropertyValue("border-bottom-color", aBorderBottomColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-bottom-color"), aBorderBottomColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderBottomColor(const nsString& aBorderBottomColor) { - return SetProperty("border-bottom-color", aBorderBottomColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-bottom-color"), aBorderBottomColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderLeftColor(nsString& aBorderLeftColor) { - return GetPropertyValue("border-left-color", aBorderLeftColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-left-color"), aBorderLeftColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderLeftColor(const nsString& aBorderLeftColor) { - return SetProperty("border-left-color", aBorderLeftColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-left-color"), aBorderLeftColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderTopStyle(nsString& aBorderTopStyle) { - return GetPropertyValue("border-top-style", aBorderTopStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-top-style"), aBorderTopStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderTopStyle(const nsString& aBorderTopStyle) { - return SetProperty("border-top-style", aBorderTopStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-top-style"), aBorderTopStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderRightStyle(nsString& aBorderRightStyle) { - return GetPropertyValue("border-right-style", aBorderRightStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-right-style"), aBorderRightStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderRightStyle(const nsString& aBorderRightStyle) { - return SetProperty("border-right-style", aBorderRightStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-right-style"), aBorderRightStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderBottomStyle(nsString& aBorderBottomStyle) { - return GetPropertyValue("border-bottom-style", aBorderBottomStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-bottom-style"), aBorderBottomStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderBottomStyle(const nsString& aBorderBottomStyle) { - return SetProperty("border-bottom-style", aBorderBottomStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-bottom-style"), aBorderBottomStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderLeftStyle(nsString& aBorderLeftStyle) { - return GetPropertyValue("border-left-style", aBorderLeftStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-left-style"), aBorderLeftStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderLeftStyle(const nsString& aBorderLeftStyle) { - return SetProperty("border-left-style", aBorderLeftStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-left-style"), aBorderLeftStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderTopWidth(nsString& aBorderTopWidth) { - return GetPropertyValue("border-top-width", aBorderTopWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-top-width"), aBorderTopWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderTopWidth(const nsString& aBorderTopWidth) { - return SetProperty("border-top-width", aBorderTopWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-top-width"), aBorderTopWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderRightWidth(nsString& aBorderRightWidth) { - return GetPropertyValue("border-right-width", aBorderRightWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-right-width"), aBorderRightWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderRightWidth(const nsString& aBorderRightWidth) { - return SetProperty("border-right-width", aBorderRightWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-right-width"), aBorderRightWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderBottomWidth(nsString& aBorderBottomWidth) { - return GetPropertyValue("border-bottom-width", aBorderBottomWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-bottom-width"), aBorderBottomWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderBottomWidth(const nsString& aBorderBottomWidth) { - return SetProperty("border-bottom-width", aBorderBottomWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-bottom-width"), aBorderBottomWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderLeftWidth(nsString& aBorderLeftWidth) { - return GetPropertyValue("border-left-width", aBorderLeftWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-left-width"), aBorderLeftWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderLeftWidth(const nsString& aBorderLeftWidth) { - return SetProperty("border-left-width", aBorderLeftWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-left-width"), aBorderLeftWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderWidth(nsString& aBorderWidth) { - return GetPropertyValue("border-width", aBorderWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-width"), aBorderWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderWidth(const nsString& aBorderWidth) { - return SetProperty("border-width", aBorderWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-width"), aBorderWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBottom(nsString& aBottom) { - return GetPropertyValue("bottom", aBottom); + return GetPropertyValue(NS_ConvertASCIItoUCS2("bottom"), aBottom); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBottom(const nsString& aBottom) { - return SetProperty("bottom", aBottom, ""); + return SetProperty(NS_ConvertASCIItoUCS2("bottom"), aBottom, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCaptionSide(nsString& aCaptionSide) { - return GetPropertyValue("caption-side", aCaptionSide); + return GetPropertyValue(NS_ConvertASCIItoUCS2("caption-side"), aCaptionSide); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCaptionSide(const nsString& aCaptionSide) { - return SetProperty("caption-side", aCaptionSide, ""); + return SetProperty(NS_ConvertASCIItoUCS2("caption-side"), aCaptionSide, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetClear(nsString& aClear) { - return GetPropertyValue("clear", aClear); + return GetPropertyValue(NS_ConvertASCIItoUCS2("clear"), aClear); } NS_IMETHODIMP nsDOMCSSDeclaration::SetClear(const nsString& aClear) { - return SetProperty("clear", aClear, ""); + return SetProperty(NS_ConvertASCIItoUCS2("clear"), aClear, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetClip(nsString& aClip) { - return GetPropertyValue("clip", aClip); + return GetPropertyValue(NS_ConvertASCIItoUCS2("clip"), aClip); } NS_IMETHODIMP nsDOMCSSDeclaration::SetClip(const nsString& aClip) { - return SetProperty("clip", aClip, ""); + return SetProperty(NS_ConvertASCIItoUCS2("clip"), aClip, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetColor(nsString& aColor) { - return GetPropertyValue("color", aColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("color"), aColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetColor(const nsString& aColor) { - return SetProperty("color", aColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("color"), aColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetContent(nsString& aContent) { - return GetPropertyValue("content", aContent); + return GetPropertyValue(NS_ConvertASCIItoUCS2("content"), aContent); } NS_IMETHODIMP nsDOMCSSDeclaration::SetContent(const nsString& aContent) { - return SetProperty("content", aContent, ""); + return SetProperty(NS_ConvertASCIItoUCS2("content"), aContent, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCounterIncrement(nsString& aCounterIncrement) { - return GetPropertyValue("counter-increment", aCounterIncrement); + return GetPropertyValue(NS_ConvertASCIItoUCS2("counter-increment"), aCounterIncrement); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCounterIncrement(const nsString& aCounterIncrement) { - return SetProperty("counter-increment", aCounterIncrement, ""); + return SetProperty(NS_ConvertASCIItoUCS2("counter-increment"), aCounterIncrement, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCounterReset(nsString& aCounterReset) { - return GetPropertyValue("counter-reset", aCounterReset); + return GetPropertyValue(NS_ConvertASCIItoUCS2("counter-reset"), aCounterReset); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCounterReset(const nsString& aCounterReset) { - return SetProperty("counter-reset", aCounterReset, ""); + return SetProperty(NS_ConvertASCIItoUCS2("counter-reset"), aCounterReset, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCssFloat(nsString& aCssFloat) { - return GetPropertyValue("float", aCssFloat); + return GetPropertyValue(NS_ConvertASCIItoUCS2("float"), aCssFloat); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCssFloat(const nsString& aCssFloat) { - return SetProperty("float", aCssFloat, ""); + return SetProperty(NS_ConvertASCIItoUCS2("float"), aCssFloat, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCue(nsString& aCue) { - return GetPropertyValue("cue", aCue); + return GetPropertyValue(NS_ConvertASCIItoUCS2("cue"), aCue); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCue(const nsString& aCue) { - return SetProperty("cue", aCue, ""); + return SetProperty(NS_ConvertASCIItoUCS2("cue"), aCue, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCueAfter(nsString& aCueAfter) { - return GetPropertyValue("cue-after", aCueAfter); + return GetPropertyValue(NS_ConvertASCIItoUCS2("cue-after"), aCueAfter); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCueAfter(const nsString& aCueAfter) { - return SetProperty("cue-after", aCueAfter, ""); + return SetProperty(NS_ConvertASCIItoUCS2("cue-after"), aCueAfter, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCueBefore(nsString& aCueBefore) { - return GetPropertyValue("cue-before", aCueBefore); + return GetPropertyValue(NS_ConvertASCIItoUCS2("cue-before"), aCueBefore); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCueBefore(const nsString& aCueBefore) { - return SetProperty("cue-before", aCueBefore, ""); + return SetProperty(NS_ConvertASCIItoUCS2("cue-before"), aCueBefore, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCursor(nsString& aCursor) { - return GetPropertyValue("cursor", aCursor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("cursor"), aCursor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCursor(const nsString& aCursor) { - return SetProperty("cursor", aCursor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("cursor"), aCursor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetDirection(nsString& aDirection) { - return GetPropertyValue("direction", aDirection); + return GetPropertyValue(NS_ConvertASCIItoUCS2("direction"), aDirection); } NS_IMETHODIMP nsDOMCSSDeclaration::SetDirection(const nsString& aDirection) { - return SetProperty("direction", aDirection, ""); + return SetProperty(NS_ConvertASCIItoUCS2("direction"), aDirection, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetDisplay(nsString& aDisplay) { - return GetPropertyValue("display", aDisplay); + return GetPropertyValue(NS_ConvertASCIItoUCS2("display"), aDisplay); } NS_IMETHODIMP nsDOMCSSDeclaration::SetDisplay(const nsString& aDisplay) { - return SetProperty("display", aDisplay, ""); + return SetProperty(NS_ConvertASCIItoUCS2("display"), aDisplay, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetElevation(nsString& aElevation) { - return GetPropertyValue("elevation", aElevation); + return GetPropertyValue(NS_ConvertASCIItoUCS2("elevation"), aElevation); } NS_IMETHODIMP nsDOMCSSDeclaration::SetElevation(const nsString& aElevation) { - return SetProperty("elevation", aElevation, ""); + return SetProperty(NS_ConvertASCIItoUCS2("elevation"), aElevation, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetEmptyCells(nsString& aEmptyCells) { - return GetPropertyValue("empty-cells", aEmptyCells); + return GetPropertyValue(NS_ConvertASCIItoUCS2("empty-cells"), aEmptyCells); } NS_IMETHODIMP nsDOMCSSDeclaration::SetEmptyCells(const nsString& aEmptyCells) { - return SetProperty("empty-cells", aEmptyCells, ""); + return SetProperty(NS_ConvertASCIItoUCS2("empty-cells"), aEmptyCells, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFont(nsString& aFont) { - return GetPropertyValue("font", aFont); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font"), aFont); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFont(const nsString& aFont) { - return SetProperty("font", aFont, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font"), aFont, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontFamily(nsString& aFontFamily) { - return GetPropertyValue("font-family", aFontFamily); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-family"), aFontFamily); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontFamily(const nsString& aFontFamily) { - return SetProperty("font-family", aFontFamily, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-family"), aFontFamily, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontSize(nsString& aFontSize) { - return GetPropertyValue("font-size", aFontSize); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-size"), aFontSize); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontSize(const nsString& aFontSize) { - return SetProperty("font-size", aFontSize, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-size"), aFontSize, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontSizeAdjust(nsString& aFontSizeAdjust) { - return GetPropertyValue("font-size-adjust", aFontSizeAdjust); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-size-adjust"), aFontSizeAdjust); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontSizeAdjust(const nsString& aFontSizeAdjust) { - return SetProperty("font-size-adjust", aFontSizeAdjust, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-size-adjust"), aFontSizeAdjust, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontStretch(nsString& aFontStretch) { - return GetPropertyValue("font-stretch", aFontStretch); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-stretch"), aFontStretch); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontStretch(const nsString& aFontStretch) { - return SetProperty("font-stretch", aFontStretch, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-stretch"), aFontStretch, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontStyle(nsString& aFontStyle) { - return GetPropertyValue("font-style", aFontStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-style"), aFontStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontStyle(const nsString& aFontStyle) { - return SetProperty("font-style", aFontStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-style"), aFontStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontVariant(nsString& aFontVariant) { - return GetPropertyValue("font-variant", aFontVariant); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-variant"), aFontVariant); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontVariant(const nsString& aFontVariant) { - return SetProperty("font-variant", aFontVariant, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-variant"), aFontVariant, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontWeight(nsString& aFontWeight) { - return GetPropertyValue("font-weight", aFontWeight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-weight"), aFontWeight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontWeight(const nsString& aFontWeight) { - return SetProperty("font-weight", aFontWeight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-weight"), aFontWeight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetHeight(nsString& aHeight) { - return GetPropertyValue("height", aHeight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("height"), aHeight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetHeight(const nsString& aHeight) { - return SetProperty("height", aHeight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("height"), aHeight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetLeft(nsString& aLeft) { - return GetPropertyValue("left", aLeft); + return GetPropertyValue(NS_ConvertASCIItoUCS2("left"), aLeft); } NS_IMETHODIMP nsDOMCSSDeclaration::SetLeft(const nsString& aLeft) { - return SetProperty("left", aLeft, ""); + return SetProperty(NS_ConvertASCIItoUCS2("left"), aLeft, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetLetterSpacing(nsString& aLetterSpacing) { - return GetPropertyValue("letter-spacing", aLetterSpacing); + return GetPropertyValue(NS_ConvertASCIItoUCS2("letter-spacing"), aLetterSpacing); } NS_IMETHODIMP nsDOMCSSDeclaration::SetLetterSpacing(const nsString& aLetterSpacing) { - return SetProperty("letter-spacing", aLetterSpacing, ""); + return SetProperty(NS_ConvertASCIItoUCS2("letter-spacing"), aLetterSpacing, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetLineHeight(nsString& aLineHeight) { - return GetPropertyValue("line-height", aLineHeight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("line-height"), aLineHeight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetLineHeight(const nsString& aLineHeight) { - return SetProperty("line-height", aLineHeight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("line-height"), aLineHeight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetListStyle(nsString& aListStyle) { - return GetPropertyValue("list-style", aListStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("list-style"), aListStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetListStyle(const nsString& aListStyle) { - return SetProperty("list-style", aListStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("list-style"), aListStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetListStyleImage(nsString& aListStyleImage) { - return GetPropertyValue("list-style-image", aListStyleImage); + return GetPropertyValue(NS_ConvertASCIItoUCS2("list-style-image"), aListStyleImage); } NS_IMETHODIMP nsDOMCSSDeclaration::SetListStyleImage(const nsString& aListStyleImage) { - return SetProperty("list-style-image", aListStyleImage, ""); + return SetProperty(NS_ConvertASCIItoUCS2("list-style-image"), aListStyleImage, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetListStylePosition(nsString& aListStylePosition) { - return GetPropertyValue("list-style-position", aListStylePosition); + return GetPropertyValue(NS_ConvertASCIItoUCS2("list-style-position"), aListStylePosition); } NS_IMETHODIMP nsDOMCSSDeclaration::SetListStylePosition(const nsString& aListStylePosition) { - return SetProperty("list-style-position", aListStylePosition, ""); + return SetProperty(NS_ConvertASCIItoUCS2("list-style-position"), aListStylePosition, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetListStyleType(nsString& aListStyleType) { - return GetPropertyValue("list-style-type", aListStyleType); + return GetPropertyValue(NS_ConvertASCIItoUCS2("list-style-type"), aListStyleType); } NS_IMETHODIMP nsDOMCSSDeclaration::SetListStyleType(const nsString& aListStyleType) { - return SetProperty("list-style-type", aListStyleType, ""); + return SetProperty(NS_ConvertASCIItoUCS2("list-style-type"), aListStyleType, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMargin(nsString& aMargin) { - return GetPropertyValue("margin", aMargin); + return GetPropertyValue(NS_ConvertASCIItoUCS2("margin"), aMargin); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMargin(const nsString& aMargin) { - return SetProperty("margin", aMargin, ""); + return SetProperty(NS_ConvertASCIItoUCS2("margin"), aMargin, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarginTop(nsString& aMarginTop) { - return GetPropertyValue("margin-top", aMarginTop); + return GetPropertyValue(NS_ConvertASCIItoUCS2("margin-top"), aMarginTop); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarginTop(const nsString& aMarginTop) { - return SetProperty("margin-top", aMarginTop, ""); + return SetProperty(NS_ConvertASCIItoUCS2("margin-top"), aMarginTop, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarginRight(nsString& aMarginRight) { - return GetPropertyValue("margin-right", aMarginRight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("margin-right"), aMarginRight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarginRight(const nsString& aMarginRight) { - return SetProperty("margin-right", aMarginRight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("margin-right"), aMarginRight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarginBottom(nsString& aMarginBottom) { - return GetPropertyValue("margin-bottom", aMarginBottom); + return GetPropertyValue(NS_ConvertASCIItoUCS2("margin-bottom"), aMarginBottom); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarginBottom(const nsString& aMarginBottom) { - return SetProperty("margin-bottom", aMarginBottom, ""); + return SetProperty(NS_ConvertASCIItoUCS2("margin-bottom"), aMarginBottom, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarginLeft(nsString& aMarginLeft) { - return GetPropertyValue("margin-left", aMarginLeft); + return GetPropertyValue(NS_ConvertASCIItoUCS2("margin-left"), aMarginLeft); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarginLeft(const nsString& aMarginLeft) { - return SetProperty("margin-left", aMarginLeft, ""); + return SetProperty(NS_ConvertASCIItoUCS2("margin-left"), aMarginLeft, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarkerOffset(nsString& aMarkerOffset) { - return GetPropertyValue("marker-offset", aMarkerOffset); + return GetPropertyValue(NS_ConvertASCIItoUCS2("marker-offset"), aMarkerOffset); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarkerOffset(const nsString& aMarkerOffset) { - return SetProperty("marker-offset", aMarkerOffset, ""); + return SetProperty(NS_ConvertASCIItoUCS2("marker-offset"), aMarkerOffset, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarks(nsString& aMarks) { - return GetPropertyValue("marks", aMarks); + return GetPropertyValue(NS_ConvertASCIItoUCS2("marks"), aMarks); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarks(const nsString& aMarks) { - return SetProperty("marks", aMarks, ""); + return SetProperty(NS_ConvertASCIItoUCS2("marks"), aMarks, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMaxHeight(nsString& aMaxHeight) { - return GetPropertyValue("max-height", aMaxHeight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("max-height"), aMaxHeight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMaxHeight(const nsString& aMaxHeight) { - return SetProperty("max-height", aMaxHeight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("max-height"), aMaxHeight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMaxWidth(nsString& aMaxWidth) { - return GetPropertyValue("max-width", aMaxWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("max-width"), aMaxWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMaxWidth(const nsString& aMaxWidth) { - return SetProperty("max-width", aMaxWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("max-width"), aMaxWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMinHeight(nsString& aMinHeight) { - return GetPropertyValue("min-height", aMinHeight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("min-height"), aMinHeight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMinHeight(const nsString& aMinHeight) { - return SetProperty("min-height", aMinHeight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("min-height"), aMinHeight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMinWidth(nsString& aMinWidth) { - return GetPropertyValue("min-width", aMinWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("min-width"), aMinWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMinWidth(const nsString& aMinWidth) { - return SetProperty("min-width", aMinWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("min-width"), aMinWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOrphans(nsString& aOrphans) { - return GetPropertyValue("orphans", aOrphans); + return GetPropertyValue(NS_ConvertASCIItoUCS2("orphans"), aOrphans); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOrphans(const nsString& aOrphans) { - return SetProperty("orphans", aOrphans, ""); + return SetProperty(NS_ConvertASCIItoUCS2("orphans"), aOrphans, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutline(nsString& aOutline) { - return GetPropertyValue("outline", aOutline); + return GetPropertyValue(NS_ConvertASCIItoUCS2("outline"), aOutline); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutline(const nsString& aOutline) { - return SetProperty("outline", aOutline, ""); + return SetProperty(NS_ConvertASCIItoUCS2("outline"), aOutline, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineColor(nsString& aOutlineColor) { - return GetPropertyValue("outline-color", aOutlineColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-color"), aOutlineColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineColor(const nsString& aOutlineColor) { - return SetProperty("outline-color", aOutlineColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("outline-color"), aOutlineColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineStyle(nsString& aOutlineStyle) { - return GetPropertyValue("outline-style", aOutlineStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-style"), aOutlineStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineStyle(const nsString& aOutlineStyle) { - return SetProperty("outline-style", aOutlineStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("outline-style"), aOutlineStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineWidth(nsString& aOutlineWidth) { - return GetPropertyValue("outline-width", aOutlineWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-width"), aOutlineWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineWidth(const nsString& aOutlineWidth) { - return SetProperty("outline-width", aOutlineWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("outline-width"), aOutlineWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOverflow(nsString& aOverflow) { - return GetPropertyValue("overflow", aOverflow); + return GetPropertyValue(NS_ConvertASCIItoUCS2("overflow"), aOverflow); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOverflow(const nsString& aOverflow) { - return SetProperty("overflow", aOverflow, ""); + return SetProperty(NS_ConvertASCIItoUCS2("overflow"), aOverflow, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPadding(nsString& aPadding) { - return GetPropertyValue("padding", aPadding); + return GetPropertyValue(NS_ConvertASCIItoUCS2("padding"), aPadding); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPadding(const nsString& aPadding) { - return SetProperty("padding", aPadding, ""); + return SetProperty(NS_ConvertASCIItoUCS2("padding"), aPadding, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPaddingTop(nsString& aPaddingTop) { - return GetPropertyValue("padding-top", aPaddingTop); + return GetPropertyValue(NS_ConvertASCIItoUCS2("padding-top"), aPaddingTop); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPaddingTop(const nsString& aPaddingTop) { - return SetProperty("padding-top", aPaddingTop, ""); + return SetProperty(NS_ConvertASCIItoUCS2("padding-top"), aPaddingTop, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPaddingRight(nsString& aPaddingRight) { - return GetPropertyValue("padding-right", aPaddingRight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("padding-right"), aPaddingRight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPaddingRight(const nsString& aPaddingRight) { - return SetProperty("padding-right", aPaddingRight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("padding-right"), aPaddingRight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPaddingBottom(nsString& aPaddingBottom) { - return GetPropertyValue("padding-bottom", aPaddingBottom); + return GetPropertyValue(NS_ConvertASCIItoUCS2("padding-bottom"), aPaddingBottom); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPaddingBottom(const nsString& aPaddingBottom) { - return SetProperty("padding-bottom", aPaddingBottom, ""); + return SetProperty(NS_ConvertASCIItoUCS2("padding-bottom"), aPaddingBottom, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPaddingLeft(nsString& aPaddingLeft) { - return GetPropertyValue("padding-left", aPaddingLeft); + return GetPropertyValue(NS_ConvertASCIItoUCS2("padding-left"), aPaddingLeft); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPaddingLeft(const nsString& aPaddingLeft) { - return SetProperty("padding-left", aPaddingLeft, ""); + return SetProperty(NS_ConvertASCIItoUCS2("padding-left"), aPaddingLeft, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPage(nsString& aPage) { - return GetPropertyValue("page", aPage); + return GetPropertyValue(NS_ConvertASCIItoUCS2("page"), aPage); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPage(const nsString& aPage) { - return SetProperty("page", aPage, ""); + return SetProperty(NS_ConvertASCIItoUCS2("page"), aPage, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPageBreakAfter(nsString& aPageBreakAfter) { - return GetPropertyValue("page-break-after", aPageBreakAfter); + return GetPropertyValue(NS_ConvertASCIItoUCS2("page-break-after"), aPageBreakAfter); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPageBreakAfter(const nsString& aPageBreakAfter) { - return SetProperty("page-break-after", aPageBreakAfter, ""); + return SetProperty(NS_ConvertASCIItoUCS2("page-break-after"), aPageBreakAfter, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPageBreakBefore(nsString& aPageBreakBefore) { - return GetPropertyValue("page-break-before", aPageBreakBefore); + return GetPropertyValue(NS_ConvertASCIItoUCS2("page-break-before"), aPageBreakBefore); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPageBreakBefore(const nsString& aPageBreakBefore) { - return SetProperty("page-break-before", aPageBreakBefore, ""); + return SetProperty(NS_ConvertASCIItoUCS2("page-break-before"), aPageBreakBefore, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPageBreakInside(nsString& aPageBreakInside) { - return GetPropertyValue("page-break-inside", aPageBreakInside); + return GetPropertyValue(NS_ConvertASCIItoUCS2("page-break-inside"), aPageBreakInside); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPageBreakInside(const nsString& aPageBreakInside) { - return SetProperty("page-break-inside", aPageBreakInside, ""); + return SetProperty(NS_ConvertASCIItoUCS2("page-break-inside"), aPageBreakInside, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPause(nsString& aPause) { - return GetPropertyValue("pause", aPause); + return GetPropertyValue(NS_ConvertASCIItoUCS2("pause"), aPause); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPause(const nsString& aPause) { - return SetProperty("pause", aPause, ""); + return SetProperty(NS_ConvertASCIItoUCS2("pause"), aPause, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPauseAfter(nsString& aPauseAfter) { - return GetPropertyValue("pause-after", aPauseAfter); + return GetPropertyValue(NS_ConvertASCIItoUCS2("pause-after"), aPauseAfter); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPauseAfter(const nsString& aPauseAfter) { - return SetProperty("pause-after", aPauseAfter, ""); + return SetProperty(NS_ConvertASCIItoUCS2("pause-after"), aPauseAfter, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPauseBefore(nsString& aPauseBefore) { - return GetPropertyValue("pause-before", aPauseBefore); + return GetPropertyValue(NS_ConvertASCIItoUCS2("pause-before"), aPauseBefore); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPauseBefore(const nsString& aPauseBefore) { - return SetProperty("pause-before", aPauseBefore, ""); + return SetProperty(NS_ConvertASCIItoUCS2("pause-before"), aPauseBefore, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPitch(nsString& aPitch) { - return GetPropertyValue("pitch", aPitch); + return GetPropertyValue(NS_ConvertASCIItoUCS2("pitch"), aPitch); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPitch(const nsString& aPitch) { - return SetProperty("pitch", aPitch, ""); + return SetProperty(NS_ConvertASCIItoUCS2("pitch"), aPitch, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPitchRange(nsString& aPitchRange) { - return GetPropertyValue("pitch-range", aPitchRange); + return GetPropertyValue(NS_ConvertASCIItoUCS2("pitch-range"), aPitchRange); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPitchRange(const nsString& aPitchRange) { - return SetProperty("pitch-range", aPitchRange, ""); + return SetProperty(NS_ConvertASCIItoUCS2("pitch-range"), aPitchRange, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPlayDuring(nsString& aPlayDuring) { - return GetPropertyValue("play-during", aPlayDuring); + return GetPropertyValue(NS_ConvertASCIItoUCS2("play-during"), aPlayDuring); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPlayDuring(const nsString& aPlayDuring) { - return SetProperty("play-during", aPlayDuring, ""); + return SetProperty(NS_ConvertASCIItoUCS2("play-during"), aPlayDuring, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPosition(nsString& aPosition) { - return GetPropertyValue("position", aPosition); + return GetPropertyValue(NS_ConvertASCIItoUCS2("position"), aPosition); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPosition(const nsString& aPosition) { - return SetProperty("position", aPosition, ""); + return SetProperty(NS_ConvertASCIItoUCS2("position"), aPosition, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetQuotes(nsString& aQuotes) { - return GetPropertyValue("quotes", aQuotes); + return GetPropertyValue(NS_ConvertASCIItoUCS2("quotes"), aQuotes); } NS_IMETHODIMP nsDOMCSSDeclaration::SetQuotes(const nsString& aQuotes) { - return SetProperty("quotes", aQuotes, ""); + return SetProperty(NS_ConvertASCIItoUCS2("quotes"), aQuotes, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetRichness(nsString& aRichness) { - return GetPropertyValue("richness", aRichness); + return GetPropertyValue(NS_ConvertASCIItoUCS2("richness"), aRichness); } NS_IMETHODIMP nsDOMCSSDeclaration::SetRichness(const nsString& aRichness) { - return SetProperty("richness", aRichness, ""); + return SetProperty(NS_ConvertASCIItoUCS2("richness"), aRichness, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetRight(nsString& aRight) { - return GetPropertyValue("right", aRight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("right"), aRight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetRight(const nsString& aRight) { - return SetProperty("right", aRight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("right"), aRight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSize(nsString& aSize) { - return GetPropertyValue("size", aSize); + return GetPropertyValue(NS_ConvertASCIItoUCS2("size"), aSize); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSize(const nsString& aSize) { - return SetProperty("size", aSize, ""); + return SetProperty(NS_ConvertASCIItoUCS2("size"), aSize, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSpeak(nsString& aSpeak) { - return GetPropertyValue("speak", aSpeak); + return GetPropertyValue(NS_ConvertASCIItoUCS2("speak"), aSpeak); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSpeak(const nsString& aSpeak) { - return SetProperty("speak", aSpeak, ""); + return SetProperty(NS_ConvertASCIItoUCS2("speak"), aSpeak, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSpeakHeader(nsString& aSpeakHeader) { - return GetPropertyValue("speak-header", aSpeakHeader); + return GetPropertyValue(NS_ConvertASCIItoUCS2("speak-header"), aSpeakHeader); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSpeakHeader(const nsString& aSpeakHeader) { - return SetProperty("speak-header", aSpeakHeader, ""); + return SetProperty(NS_ConvertASCIItoUCS2("speak-header"), aSpeakHeader, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSpeakNumeral(nsString& aSpeakNumeral) { - return GetPropertyValue("speak-numeral", aSpeakNumeral); + return GetPropertyValue(NS_ConvertASCIItoUCS2("speak-numeral"), aSpeakNumeral); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSpeakNumeral(const nsString& aSpeakNumeral) { - return SetProperty("speak-numeral", aSpeakNumeral, ""); + return SetProperty(NS_ConvertASCIItoUCS2("speak-numeral"), aSpeakNumeral, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSpeakPunctuation(nsString& aSpeakPunctuation) { - return GetPropertyValue("speak-punctuation", aSpeakPunctuation); + return GetPropertyValue(NS_ConvertASCIItoUCS2("speak-punctuation"), aSpeakPunctuation); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSpeakPunctuation(const nsString& aSpeakPunctuation) { - return SetProperty("speak-punctuation", aSpeakPunctuation, ""); + return SetProperty(NS_ConvertASCIItoUCS2("speak-punctuation"), aSpeakPunctuation, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSpeechRate(nsString& aSpeechRate) { - return GetPropertyValue("speech-rate", aSpeechRate); + return GetPropertyValue(NS_ConvertASCIItoUCS2("speech-rate"), aSpeechRate); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSpeechRate(const nsString& aSpeechRate) { - return SetProperty("speech-rate", aSpeechRate, ""); + return SetProperty(NS_ConvertASCIItoUCS2("speech-rate"), aSpeechRate, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetStress(nsString& aStress) { - return GetPropertyValue("stress", aStress); + return GetPropertyValue(NS_ConvertASCIItoUCS2("stress"), aStress); } NS_IMETHODIMP nsDOMCSSDeclaration::SetStress(const nsString& aStress) { - return SetProperty("stress", aStress, ""); + return SetProperty(NS_ConvertASCIItoUCS2("stress"), aStress, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTableLayout(nsString& aTableLayout) { - return GetPropertyValue("table-layout", aTableLayout); + return GetPropertyValue(NS_ConvertASCIItoUCS2("table-layout"), aTableLayout); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTableLayout(const nsString& aTableLayout) { - return SetProperty("table-layout", aTableLayout, ""); + return SetProperty(NS_ConvertASCIItoUCS2("table-layout"), aTableLayout, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTextAlign(nsString& aTextAlign) { - return GetPropertyValue("text-align", aTextAlign); + return GetPropertyValue(NS_ConvertASCIItoUCS2("text-align"), aTextAlign); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTextAlign(const nsString& aTextAlign) { - return SetProperty("text-align", aTextAlign, ""); + return SetProperty(NS_ConvertASCIItoUCS2("text-align"), aTextAlign, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTextDecoration(nsString& aTextDecoration) { - return GetPropertyValue("text-decoration", aTextDecoration); + return GetPropertyValue(NS_ConvertASCIItoUCS2("text-decoration"), aTextDecoration); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTextDecoration(const nsString& aTextDecoration) { - return SetProperty("text-decoration", aTextDecoration, ""); + return SetProperty(NS_ConvertASCIItoUCS2("text-decoration"), aTextDecoration, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTextIndent(nsString& aTextIndent) { - return GetPropertyValue("text-indent", aTextIndent); + return GetPropertyValue(NS_ConvertASCIItoUCS2("text-indent"), aTextIndent); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTextIndent(const nsString& aTextIndent) { - return SetProperty("text-indent", aTextIndent, ""); + return SetProperty(NS_ConvertASCIItoUCS2("text-indent"), aTextIndent, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTextShadow(nsString& aTextShadow) { - return GetPropertyValue("text-shadow", aTextShadow); + return GetPropertyValue(NS_ConvertASCIItoUCS2("text-shadow"), aTextShadow); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTextShadow(const nsString& aTextShadow) { - return SetProperty("text-shadow", aTextShadow, ""); + return SetProperty(NS_ConvertASCIItoUCS2("text-shadow"), aTextShadow, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTextTransform(nsString& aTextTransform) { - return GetPropertyValue("text-transform", aTextTransform); + return GetPropertyValue(NS_ConvertASCIItoUCS2("text-transform"), aTextTransform); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTextTransform(const nsString& aTextTransform) { - return SetProperty("text-transform", aTextTransform, ""); + return SetProperty(NS_ConvertASCIItoUCS2("text-transform"), aTextTransform, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTop(nsString& aTop) { - return GetPropertyValue("top", aTop); + return GetPropertyValue(NS_ConvertASCIItoUCS2("top"), aTop); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTop(const nsString& aTop) { - return SetProperty("top", aTop, ""); + return SetProperty(NS_ConvertASCIItoUCS2("top"), aTop, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetUnicodeBidi(nsString& aUnicodeBidi) { - return GetPropertyValue("unicode-bidi", aUnicodeBidi); + return GetPropertyValue(NS_ConvertASCIItoUCS2("unicode-bidi"), aUnicodeBidi); } NS_IMETHODIMP nsDOMCSSDeclaration::SetUnicodeBidi(const nsString& aUnicodeBidi) { - return SetProperty("unicode-bidi", aUnicodeBidi, ""); + return SetProperty(NS_ConvertASCIItoUCS2("unicode-bidi"), aUnicodeBidi, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetVerticalAlign(nsString& aVerticalAlign) { - return GetPropertyValue("vertical-align", aVerticalAlign); + return GetPropertyValue(NS_ConvertASCIItoUCS2("vertical-align"), aVerticalAlign); } NS_IMETHODIMP nsDOMCSSDeclaration::SetVerticalAlign(const nsString& aVerticalAlign) { - return SetProperty("vertical-align", aVerticalAlign, ""); + return SetProperty(NS_ConvertASCIItoUCS2("vertical-align"), aVerticalAlign, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetVisibility(nsString& aVisibility) { - return GetPropertyValue("visibility", aVisibility); + return GetPropertyValue(NS_ConvertASCIItoUCS2("visibility"), aVisibility); } NS_IMETHODIMP nsDOMCSSDeclaration::SetVisibility(const nsString& aVisibility) { - return SetProperty("visibility", aVisibility, ""); + return SetProperty(NS_ConvertASCIItoUCS2("visibility"), aVisibility, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetVoiceFamily(nsString& aVoiceFamily) { - return GetPropertyValue("voice-family", aVoiceFamily); + return GetPropertyValue(NS_ConvertASCIItoUCS2("voice-family"), aVoiceFamily); } NS_IMETHODIMP nsDOMCSSDeclaration::SetVoiceFamily(const nsString& aVoiceFamily) { - return SetProperty("voice-family", aVoiceFamily, ""); + return SetProperty(NS_ConvertASCIItoUCS2("voice-family"), aVoiceFamily, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetVolume(nsString& aVolume) { - return GetPropertyValue("volume", aVolume); + return GetPropertyValue(NS_ConvertASCIItoUCS2("volume"), aVolume); } NS_IMETHODIMP nsDOMCSSDeclaration::SetVolume(const nsString& aVolume) { - return SetProperty("volume", aVolume, ""); + return SetProperty(NS_ConvertASCIItoUCS2("volume"), aVolume, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetWhiteSpace(nsString& aWhiteSpace) { - return GetPropertyValue("white-space", aWhiteSpace); + return GetPropertyValue(NS_ConvertASCIItoUCS2("white-space"), aWhiteSpace); } NS_IMETHODIMP nsDOMCSSDeclaration::SetWhiteSpace(const nsString& aWhiteSpace) { - return SetProperty("white-space", aWhiteSpace, ""); + return SetProperty(NS_ConvertASCIItoUCS2("white-space"), aWhiteSpace, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetWidows(nsString& aWidows) { - return GetPropertyValue("widows", aWidows); + return GetPropertyValue(NS_ConvertASCIItoUCS2("widows"), aWidows); } NS_IMETHODIMP nsDOMCSSDeclaration::SetWidows(const nsString& aWidows) { - return SetProperty("widows", aWidows, ""); + return SetProperty(NS_ConvertASCIItoUCS2("widows"), aWidows, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetWidth(nsString& aWidth) { - return GetPropertyValue("width", aWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("width"), aWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetWidth(const nsString& aWidth) { - return SetProperty("width", aWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("width"), aWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetWordSpacing(nsString& aWordSpacing) { - return GetPropertyValue("word-spacing", aWordSpacing); + return GetPropertyValue(NS_ConvertASCIItoUCS2("word-spacing"), aWordSpacing); } NS_IMETHODIMP nsDOMCSSDeclaration::SetWordSpacing(const nsString& aWordSpacing) { - return SetProperty("word-spacing", aWordSpacing, ""); + return SetProperty(NS_ConvertASCIItoUCS2("word-spacing"), aWordSpacing, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetZIndex(nsString& aZIndex) { - return GetPropertyValue("z-index", aZIndex); + return GetPropertyValue(NS_ConvertASCIItoUCS2("z-index"), aZIndex); } NS_IMETHODIMP nsDOMCSSDeclaration::SetZIndex(const nsString& aZIndex) { - return SetProperty("z-index", aZIndex, ""); + return SetProperty(NS_ConvertASCIItoUCS2("z-index"), aZIndex, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOpacity(nsString& aOpacity) { - return GetPropertyValue("opacity", aOpacity); + return GetPropertyValue(NS_ConvertASCIItoUCS2("opacity"), aOpacity); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOpacity(const nsString& aOpacity) { - return SetProperty("opacity", aOpacity, ""); + return SetProperty(NS_ConvertASCIItoUCS2("opacity"), aOpacity, nsAutoString()); } diff --git a/mozilla/content/html/style/src/nsHTMLAttributes.cpp b/mozilla/content/html/style/src/nsHTMLAttributes.cpp index 9cc04451b47..8a902412cfb 100644 --- a/mozilla/content/html/style/src/nsHTMLAttributes.cpp +++ b/mozilla/content/html/style/src/nsHTMLAttributes.cpp @@ -132,12 +132,12 @@ struct HTMLAttribute { mAttribute->ToString(temp); aBuffer.Append(temp); if (eHTMLUnit_Null != mValue.GetUnit()) { - aBuffer.Append(" = "); + aBuffer.AppendWithConversion(" = "); mValue.AppendToString(aBuffer); } } else { - aBuffer.Append("null"); + aBuffer.AppendWithConversion("null"); } } @@ -1514,7 +1514,7 @@ HTMLAttributesImpl::List(FILE* out, PRInt32 aIndent) const nsAutoString buffer; mAttrNames[index]->ToString(buffer); if (eHTMLUnit_Null != value.GetUnit()) { - buffer.Append(" = "); + buffer.AppendWithConversion(" = "); value.AppendToString(buffer); } fputs(buffer, out); diff --git a/mozilla/content/xml/content/src/nsXMLElement.cpp b/mozilla/content/xml/content/src/nsXMLElement.cpp index acc5731112f..396f6af0c52 100644 --- a/mozilla/content/xml/content/src/nsXMLElement.cpp +++ b/mozilla/content/xml/content/src/nsXMLElement.cpp @@ -155,7 +155,7 @@ nsXMLElement::GetXMLBaseURI(nsIURI **aURI) break; if (!base.IsEmpty()) { - str = base.GetUnicode(); + str.AssignWithConversion(base.GetUnicode()); rv = (*aURI)->SetRelativePath(str); } break; @@ -167,12 +167,12 @@ nsXMLElement::GetXMLBaseURI(nsIURI **aURI) } else { // We do not want to add double / delimiters (although the user is free to do so) if (value[value_len - 1] != '/') - value += '/'; - base = value + base; + value.AppendWithConversion('/'); + base.Insert(value, 0); } } else { if (value[value_len - 1] != '/') - value += '/'; // Add delimiter/make sure we treat this as dir + value.AppendWithConversion'/'; // Add delimiter/make sure we treat this as dir base = value; } } @@ -212,7 +212,7 @@ nsXMLElement::SetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, // to create an atom. if ((kNameSpaceID_XLink == aNameSpaceID) && (kTypeAtom == aName)) { - if (aValue.Equals(kSimpleAtom, PR_FALSE)) { + if (aValue.EqualsWithConversion(kSimpleAtom, PR_FALSE)) { // NOTE: This really is a link according to the XLink spec, // we do not need to check other attributes. If there // is no href attribute, then this link is simply @@ -272,13 +272,13 @@ nsXMLElement::HandleDOMEvent(nsIPresContext* aPresContext, } GetAttribute(kNameSpaceID_XLink, kShowAtom, show); // XXX Should probably do this using atoms - if (show.Equals("new")) { + if (show.EqualsWithConversion("new")) { verb = eLinkVerb_New; } - else if (show.Equals("replace")) { + else if (show.EqualsWithConversion("replace")) { verb = eLinkVerb_Replace; } - else if (show.Equals("embed")) { + else if (show.EqualsWithConversion("embed")) { verb = eLinkVerb_Embed; } diff --git a/mozilla/content/xml/document/src/nsXMLContentSink.cpp b/mozilla/content/xml/document/src/nsXMLContentSink.cpp index fa623cea1e7..27b95619942 100644 --- a/mozilla/content/xml/document/src/nsXMLContentSink.cpp +++ b/mozilla/content/xml/document/src/nsXMLContentSink.cpp @@ -522,7 +522,7 @@ nsXMLContentSink::GetAttributeValueAt(const nsIParserNode& aNode, } *cp = '\0'; PRInt32 ch; - nsAutoString str(cbuf); + nsAutoString str; str.AssignWithConversion(cbuf); dtd->ConvertEntityToUnicode(str, &ch); if (ch < 0) { continue; @@ -567,7 +567,7 @@ nsXMLContentSink::AddAttributes(const nsIParserNode& aNode, } if ((kNameSpaceID_XMLNS == nameSpaceID) && aIsHTML) { NS_RELEASE(nameAtom); - name.Insert("xmlns:", 0); + name.InsertWithConversion("xmlns:", 0); nameAtom = NS_NewAtom(name); nameSpaceID = kNameSpaceID_HTML; // XXX this is wrong, but necessary until HTML can store other namespaces for attrs } @@ -688,7 +688,7 @@ nsXMLContentSink::OpenContainer(const nsIParserNode& aNode) mState = eXMLContentSinkState_InDocumentElement; - tag = aNode.GetText(); + tag.Assign(aNode.GetText()); nameSpacePrefix = getter_AddRefs(CutNameSpacePrefix(tag)); // We must register namespace declarations found in the attribute list @@ -784,7 +784,7 @@ nsXMLContentSink::CloseContainer(const nsIParserNode& aNode) // no close tags for elements. PR_ASSERT(eXMLContentSinkState_InDocumentElement == mState); - tag = aNode.GetText(); + tag.Assign(aNode.GetText()); nameSpacePrefix = getter_AddRefs(CutNameSpacePrefix(tag)); nameSpaceID = GetNameSpaceId(nameSpacePrefix); isHTML = IsHTMLNameSpace(nameSpaceID); @@ -914,7 +914,7 @@ nsXMLContentSink::AddComment(const nsIParserNode& aNode) nsIDOMComment *domComment; nsresult result = NS_OK; - text = aNode.GetText(); + text.Assign(aNode.GetText()); result = NS_NewCommentNode(&comment); if (NS_OK == result) { result = comment->QueryInterface(kIDOMCommentIID, (void **)&domComment); @@ -941,7 +941,7 @@ nsXMLContentSink::AddCDATASection(const nsIParserNode& aNode) nsIDOMCDATASection *domCDATA; nsresult result = NS_OK; - text = aNode.GetText(); + text.Assign(aNode.GetText()); result = NS_NewXMLCDATASection(&cdata); if (NS_OK == result) { result = cdata->QueryInterface(kIDOMCDATASectionIID, (void **)&domCDATA); @@ -1245,7 +1245,7 @@ nsXMLContentSink::AddProcessingInstruction(const nsIParserNode& aNode) FlushText(); - text = aNode.GetText(); + text.Assign(aNode.GetText()); ParseProcessingInstruction(text, target, data); result = NS_NewXMLProcessingInstruction(&node, target, data); if (NS_OK == result) { @@ -1257,28 +1257,28 @@ nsXMLContentSink::AddProcessingInstruction(const nsIParserNode& aNode) nsAutoString type, href, title, media, alternate; // If it's a stylesheet PI... - if (target.Equals(kStyleSheetPI)) { - result = GetQuotedAttributeValue(text, "href", href); + if (target.EqualsWithConversion(kStyleSheetPI)) { + result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("href"), href); // If there was an error or there's no href, we can't do // anything with this PI if ((NS_OK != result) || (0 == href.Length())) { return result; } - result = GetQuotedAttributeValue(text, "type", type); + result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("type"), type); if (NS_FAILED(result)) { - type="text/css"; // Default the type attribute to the mime type for CSS + type.AssignWithConversion("text/css"); // Default the type attribute to the mime type for CSS } - result = GetQuotedAttributeValue(text, "title", title); + result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("title"), title); if (NS_SUCCEEDED(result)) { title.CompressWhitespace(); } - result = GetQuotedAttributeValue(text, "media", media); + result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("media"), media); if (NS_SUCCEEDED(result)) { media.ToLowerCase(); } - result = GetQuotedAttributeValue(text, "alternate", alternate); + result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("alternate"), alternate); #ifndef XSL - result = ProcessCSSStyleLink(node, href, alternate.Equals("yes"), + result = ProcessCSSStyleLink(node, href, alternate.EqualsWithConversion("yes"), title, type, media); #else result = ProcessStyleLink(node, href, alternate.Equals("yes"), @@ -1679,7 +1679,7 @@ nsXMLContentSink::OnStreamComplete(nsIStreamLoader* aLoader, const char* string) { nsresult rv = NS_OK; - nsString aData(string, stringLen); + nsString aData; aData.AssignWithConversion(string, stringLen); if (NS_OK == aStatus) { rv = EvaluateScript(aData, 0, mScriptLanguageVersion); @@ -1890,7 +1890,7 @@ nsXMLContentSink::GetElementFactory(PRInt32 aNameSpaceID, nsIElementFactory** aR gNameSpaceManager->GetNameSpaceURI(aNameSpaceID, nameSpace); nsCAutoString progID = NS_ELEMENT_FACTORY_PROGID_PREFIX; - progID.Append(nameSpace); + progID.AppendWithConversion(nameSpace); // Retrieve the appropriate factory. NS_WITH_SERVICE(nsIElementFactory, elementFactory, progID, &rv); diff --git a/mozilla/content/xml/document/src/nsXMLDocument.cpp b/mozilla/content/xml/document/src/nsXMLDocument.cpp index 9fec1fe670c..ae7903d8ab7 100644 --- a/mozilla/content/xml/document/src/nsXMLDocument.cpp +++ b/mozilla/content/xml/document/src/nsXMLDocument.cpp @@ -230,7 +230,7 @@ NS_IMETHODIMP nsXMLDocument::GetContentType(nsString& aContentType) const { // XXX Should get document type from incoming stream - aContentType.Assign("text/xml"); + aContentType.AssignWithConversion("text/xml"); return NS_OK; } @@ -249,7 +249,7 @@ nsXMLDocument::StartDocumentLoad(const char* aCommand, return rv; } - nsAutoString charset("UTF-8"); + nsAutoString charset; charset.AssignWithConversion("UTF-8"); PRBool bIsHTML = PR_FALSE; char* aContentType; nsCharsetSource charsetSource = kCharsetFromDocTypeDefault; @@ -276,7 +276,7 @@ nsXMLDocument::StartDocumentLoad(const char* aCommand, NS_RELEASE(contentTypeKey); if (NS_SUCCEEDED(rv)) { nsAutoString contentType; - contentType.Assign(contenttypeheader); + contentType.AssignWithConversion( NS_STATIC_CAST(const char*, contenttypeheader) ); PRInt32 start = contentType.RFind("charset=", PR_TRUE ) ; if(kNotFound != start) { diff --git a/mozilla/layout/base/src/nsGenericElement.cpp b/mozilla/layout/base/src/nsGenericElement.cpp index f0058a23065..16172999b9d 100644 --- a/mozilla/layout/base/src/nsGenericElement.cpp +++ b/mozilla/layout/base/src/nsGenericElement.cpp @@ -1315,7 +1315,7 @@ nsGenericElement::SetProperty(JSContext *aContext, JSObject *aObj, jsval aID, js propName.Assign(JS_GetStringChars(JS_ValueToString(aContext, aID))); if (propName.Length() > 2) prefix.Assign(propName.GetUnicode(), 2); - if (prefix.Equals("on")) { + if (prefix.EqualsWithConversion("on")) { nsCOMPtr atom = getter_AddRefs(NS_NewAtom(propName)); nsIEventListenerManager *manager = nsnull; @@ -1932,7 +1932,7 @@ nsGenericElement::TriggerLink(nsIPresContext* aPresContext, if (NS_FAILED(rv)) return rv; } else { - absURLSpec = aURLSpec; + absURLSpec.Assign(aURLSpec); } // Now pass on absolute url to the click handler @@ -2373,8 +2373,8 @@ nsGenericContainerElement::ListAttributes(FILE* out) const nsAutoString buffer; if (kNameSpaceID_None != attr->mNameSpaceID) { // prefix namespace - buffer.Append(attr->mNameSpaceID, 10); - buffer.Append(':'); + buffer.AppendInt(attr->mNameSpaceID, 10); + buffer.AppendWithConversion(':'); } // name @@ -2383,7 +2383,7 @@ nsGenericContainerElement::ListAttributes(FILE* out) const buffer.Append(name); // value - buffer.Append("="); + buffer.AppendWithConversion("="); buffer.Append(attr->mValue); fputs(" ", out); diff --git a/mozilla/layout/forms/nsFileControlFrame.cpp b/mozilla/layout/forms/nsFileControlFrame.cpp index f80b5c356e0..74319b46ba7 100644 --- a/mozilla/layout/forms/nsFileControlFrame.cpp +++ b/mozilla/layout/forms/nsFileControlFrame.cpp @@ -105,7 +105,7 @@ nsFileControlFrame::CreateAnonymousContent(nsIPresContext* aPresContext, // create text field nsIAtom* tag = NS_NewAtom("input"); if (NS_OK == NS_NewHTMLInputElement(&mTextContent, tag)) { - mTextContent->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, nsAutoString("text"), PR_FALSE); + mTextContent->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, NS_ConvertASCIItoUCS2("text"), PR_FALSE); if (nsFormFrame::GetDisabled(this)) { nsCOMPtr textControl = do_QueryInterface(mTextContent); if (textControl) { @@ -119,7 +119,7 @@ nsFileControlFrame::CreateAnonymousContent(nsIPresContext* aPresContext, nsIHTMLContent* browse = nsnull; tag = NS_NewAtom("input"); if (NS_OK == NS_NewHTMLInputElement(&browse, tag)) { - browse->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, nsAutoString("button"), PR_FALSE); + browse->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, NS_ConvertASCIItoUCS2("button"), PR_FALSE); //browse->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::value, nsAutoString("browse..."), PR_FALSE); aChildList.AppendElement(browse); @@ -245,7 +245,7 @@ nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent) nsIFileWidget *fileWidget = nsnull; - nsString title("File Upload"); + nsString title; title.AssignWithConversion("File Upload"); nsComponentManager::CreateInstance(kCFileWidgetCID, nsnull, kIFileWidgetIID, (void**)&fileWidget); if (fileWidget) { @@ -607,7 +607,7 @@ nsFileControlFrame::SaveState(nsIPresContext* aPresContext, nsIPresState** aStat // This string will hold a single item, whether or not we're checked. nsAutoString stateString; GetProperty(nsHTMLAtoms::value, stateString); - (*aState)->SetStateProperty("checked", stateString); + (*aState)->SetStateProperty(NS_ConvertASCIItoUCS2("checked"), stateString); return NS_OK; } @@ -616,7 +616,7 @@ NS_IMETHODIMP nsFileControlFrame::RestoreState(nsIPresContext* aPresContext, nsIPresState* aState) { nsAutoString string; - aState->GetStateProperty("checked", string); + aState->GetStateProperty(NS_ConvertASCIItoUCS2("checked"), string); SetProperty(aPresContext, nsHTMLAtoms::value, string); return NS_OK; diff --git a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp index c1886869040..92c737376f0 100644 --- a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp @@ -169,13 +169,13 @@ nsHTMLButtonControlFrame::GetDefaultLabel(nsString& aString) PRInt32 type; GetType(&type); if (NS_FORM_BUTTON_BUTTON == type) { - aString = "Button"; + aString.AssignWithConversion("Button"); } else if (NS_FORM_BUTTON_RESET == type) { - aString = "Reset"; + aString.AssignWithConversion("Reset"); } else if (NS_FORM_BUTTON_SUBMIT == type) { - aString = "Submit"; + aString.AssignWithConversion("Submit"); } } diff --git a/mozilla/layout/forms/nsImageControlFrame.cpp b/mozilla/layout/forms/nsImageControlFrame.cpp index 378216ed8bb..521c56beb79 100644 --- a/mozilla/layout/forms/nsImageControlFrame.cpp +++ b/mozilla/layout/forms/nsImageControlFrame.cpp @@ -390,26 +390,24 @@ nsImageControlFrame::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues, char buf[20]; aNumValues = 2; - aValues[0].SetLength(0); sprintf(&buf[0], "%d", mLastClickPoint.x); - aValues[0].Append(&buf[0]); + aValues[0].AssignWithConversion(&buf[0]); - aValues[1].SetLength(0); sprintf(&buf[0], "%d", mLastClickPoint.y); - aValues[1].Append(&buf[0]); + aValues[1].AssignWithConversion(&buf[0]); nsAutoString name; nsresult result = GetName(&name); if (NS_CONTENT_ATTR_HAS_VALUE == result) { aNames[0] = name; - aNames[0].Append(".x"); + aNames[0].AppendWithConversion(".x"); aNames[1] = name; - aNames[1].Append(".y"); + aNames[1].AppendWithConversion(".y"); } else { // If the Image Element has no name, simply return x and y // to Nav and IE compatability. - aNames[0] = "x"; - aNames[1] = "y"; + aNames[0].AssignWithConversion("x"); + aNames[1].AssignWithConversion("y"); } return PR_TRUE; diff --git a/mozilla/layout/generic/nsBulletFrame.cpp b/mozilla/layout/generic/nsBulletFrame.cpp index e3d920843f8..e97c4043a55 100644 --- a/mozilla/layout/generic/nsBulletFrame.cpp +++ b/mozilla/layout/generic/nsBulletFrame.cpp @@ -267,7 +267,7 @@ static void RomanToText(PRInt32 ordinal, nsString& result, const char* achars, c ordinal = 1; } nsAutoString addOn, decStr; - decStr.AppendWithConversion(ordinal, 10); + decStr.AppendInt(ordinal, 10); PRIntn len = decStr.Length(); const PRUnichar* dp = decStr.GetUnicode(); const PRUnichar* end = dp + len; @@ -278,16 +278,16 @@ static void RomanToText(PRInt32 ordinal, nsString& result, const char* achars, c romanPos--; addOn.SetLength(0); switch(*dp) { - case '3': addOn.Append(achars[romanPos]); - case '2': addOn.Append(achars[romanPos]); - case '1': addOn.Append(achars[romanPos]); + case '3': addOn.AppendWithConversion(achars[romanPos]); + case '2': addOn.AppendWithConversion(achars[romanPos]); + case '1': addOn.AppendWithConversion(achars[romanPos]); break; case '4': - addOn.Append(achars[romanPos]); + addOn.AppendWithConversion(achars[romanPos]); // FALLTHROUGH case '5': case '6': case '7': case '8': - addOn.Append(bchars[romanPos]); + addOn.AppendWithConversion(bchars[romanPos]); for(n=0;n<(*dp-'5');n++) { addOn.Append(achars[romanPos]); } diff --git a/mozilla/layout/generic/nsFrameFrame.cpp b/mozilla/layout/generic/nsFrameFrame.cpp index 65a3e8e0300..1fc97f6a0cf 100644 --- a/mozilla/layout/generic/nsFrameFrame.cpp +++ b/mozilla/layout/generic/nsFrameFrame.cpp @@ -758,7 +758,7 @@ nsHTMLFrameInnerFrame::CreateDocShell(nsIPresContext* aPresContext, value.Left(valuePiece, 7); if (valuePiece.EqualsIgnoreCase("content") && (value.Length() == 7 || - value.Mid(valuePiece, 7, 1) == 1 && valuePiece.Equals("-"))) + value.Mid(valuePiece, 7, 1) == 1 && valuePiece.EqualsWithConversion("-"))) isContent = PR_TRUE; } if (isContent) { diff --git a/mozilla/layout/generic/nsFrameSetFrame.cpp b/mozilla/layout/generic/nsFrameSetFrame.cpp index af6ea4160c9..bd3897a31f2 100644 --- a/mozilla/layout/generic/nsFrameSetFrame.cpp +++ b/mozilla/layout/generic/nsFrameSetFrame.cpp @@ -735,7 +735,7 @@ nsHTMLFramesetFrame::ParseRowColSpec(nsString& aSpec, } // Translate value to an integer - nsString token(""); + nsString token; aSpec.Mid(token, start, numberEnd - start); // Treat * as 1* diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index 967a16966bf..3b46283c23a 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -4460,7 +4460,7 @@ nsTextFrame::ToCString(nsString& aBuf, PRInt32* aTotalContentLength) const aBuf.AppendWithConversion("\\t"); } else if ((ch < ' ') || (ch >= 127)) { aBuf.AppendWithConversion("\\0"); - aBuf.AppendWithConversion((PRInt32)ch, 8); + aBuf.AppendInt((PRInt32)ch, 8); } else { aBuf.Append(ch); } diff --git a/mozilla/layout/html/base/src/nsBulletFrame.cpp b/mozilla/layout/html/base/src/nsBulletFrame.cpp index e3d920843f8..e97c4043a55 100644 --- a/mozilla/layout/html/base/src/nsBulletFrame.cpp +++ b/mozilla/layout/html/base/src/nsBulletFrame.cpp @@ -267,7 +267,7 @@ static void RomanToText(PRInt32 ordinal, nsString& result, const char* achars, c ordinal = 1; } nsAutoString addOn, decStr; - decStr.AppendWithConversion(ordinal, 10); + decStr.AppendInt(ordinal, 10); PRIntn len = decStr.Length(); const PRUnichar* dp = decStr.GetUnicode(); const PRUnichar* end = dp + len; @@ -278,16 +278,16 @@ static void RomanToText(PRInt32 ordinal, nsString& result, const char* achars, c romanPos--; addOn.SetLength(0); switch(*dp) { - case '3': addOn.Append(achars[romanPos]); - case '2': addOn.Append(achars[romanPos]); - case '1': addOn.Append(achars[romanPos]); + case '3': addOn.AppendWithConversion(achars[romanPos]); + case '2': addOn.AppendWithConversion(achars[romanPos]); + case '1': addOn.AppendWithConversion(achars[romanPos]); break; case '4': - addOn.Append(achars[romanPos]); + addOn.AppendWithConversion(achars[romanPos]); // FALLTHROUGH case '5': case '6': case '7': case '8': - addOn.Append(bchars[romanPos]); + addOn.AppendWithConversion(bchars[romanPos]); for(n=0;n<(*dp-'5');n++) { addOn.Append(achars[romanPos]); } diff --git a/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp index 967a16966bf..3b46283c23a 100644 --- a/mozilla/layout/html/base/src/nsTextFrame.cpp +++ b/mozilla/layout/html/base/src/nsTextFrame.cpp @@ -4460,7 +4460,7 @@ nsTextFrame::ToCString(nsString& aBuf, PRInt32* aTotalContentLength) const aBuf.AppendWithConversion("\\t"); } else if ((ch < ' ') || (ch >= 127)) { aBuf.AppendWithConversion("\\0"); - aBuf.AppendWithConversion((PRInt32)ch, 8); + aBuf.AppendInt((PRInt32)ch, 8); } else { aBuf.Append(ch); } diff --git a/mozilla/layout/html/content/src/nsHTMLFormElement.cpp b/mozilla/layout/html/content/src/nsHTMLFormElement.cpp index 915f6efc2f7..c1228f2b6ed 100644 --- a/mozilla/layout/html/content/src/nsHTMLFormElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLFormElement.cpp @@ -529,7 +529,7 @@ nsHTMLFormElement::NamedItem(JSContext* cx, jsval* argv, PRUint32 argc, jsval* a // a different type of element (IMG, OBJECT, etc.) if ((nsnull == *aReturn) && (nsnull != mInner.mDocument) && (argc > 0)) { char* str = JS_GetStringBytes(JS_ValueToString(cx, argv[0])); - nsAutoString name(str); + nsAutoString name; name.AssignWithConversion(str); nsCOMPtr scriptContext; nsCOMPtr globalObject; mInner.mDocument->GetScriptGlobalObject(getter_AddRefs(globalObject)); @@ -614,7 +614,7 @@ nsHTMLFormElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID) PRBool ret; JSObject* obj; char* str = JS_GetStringBytes(JS_ValueToString(aContext, aID)); - nsAutoString name(str); + nsAutoString name; name.AssignWithConversion(str); nsCOMPtr scriptContext; nsresult result = NS_OK; @@ -858,7 +858,7 @@ nsFormControlList::GetNamedObject(JSContext* aContext, jsval aID, JSObject** aOb nsCOMPtr scriptContext; nsCOMPtr owner; char* str = JS_GetStringBytes(JS_ValueToString(aContext, aID)); - nsAutoString name(str); + nsAutoString name; name.AssignWithConversion(str); nsCOMPtr document; nsCOMPtr form; @@ -905,7 +905,7 @@ nsFormControlList::GetNamedObject(JSContext* aContext, jsval aID, JSObject** aOb } // If it is, then get all radio buttons or checkboxes with the same name - if (document && (type.Equals("Radio") || type.Equals("Checkbox"))) { + if (document && (type.EqualsWithConversion("Radio") || type.EqualsWithConversion("Checkbox"))) { nsCOMPtr htmlDoc = do_QueryInterface(document); if (htmlDoc) { nsCOMPtr list; diff --git a/mozilla/layout/html/content/src/nsHTMLImageElement.cpp b/mozilla/layout/html/content/src/nsHTMLImageElement.cpp index df045c533c5..ee3fa9f6992 100644 --- a/mozilla/layout/html/content/src/nsHTMLImageElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLImageElement.cpp @@ -318,7 +318,7 @@ nsHTMLImageElement::GetHeight(nsString& aValue) if (NS_SUCCEEDED(result)) { nsSize size; imageFrame->GetIntrinsicImageSize(size); - aValue.Append(size.height); + aValue.AppendInt(size.height); } } @@ -343,7 +343,7 @@ nsHTMLImageElement::GetWidth(nsString& aValue) if (NS_SUCCEEDED(result)) { nsSize size; imageFrame->GetIntrinsicImageSize(size); - aValue.Append(size.width); + aValue.AppendInt(size.width); } } @@ -765,11 +765,11 @@ nsHTMLImageElement::SetSrcInner(nsIURI* aBaseURL, const nsString& aSrc) if (nsnull != aBaseURL) { result = NS_MakeAbsoluteURI(url, aSrc, aBaseURL); if (NS_FAILED(result)) { - url = aSrc; + url.Assign(aSrc); } } else { - url = aSrc; + url.Assign(aSrc); } nsSize* specifiedSize = nsnull; diff --git a/mozilla/layout/html/content/src/nsHTMLInputElement.cpp b/mozilla/layout/html/content/src/nsHTMLInputElement.cpp index de1a107e60c..94cf08ec34d 100644 --- a/mozilla/layout/html/content/src/nsHTMLInputElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLInputElement.cpp @@ -378,7 +378,7 @@ nsHTMLInputElement::GetValue(nsString& aValue) // Obtain the value property from the presentation state. if (presState) { nsAutoString value; - presState->GetStateProperty("value", aValue); + presState->GetStateProperty(NS_ConvertASCIItoUCS2("value"), aValue); } } @@ -429,7 +429,7 @@ nsHTMLInputElement::SetValue(const nsString& aValue) // Obtain the value property from the presentation state. if (presState) { - presState->SetStateProperty("value", aValue); + presState->SetStateProperty(NS_ConvertASCIItoUCS2("value"), aValue); } } return NS_OK; @@ -442,7 +442,7 @@ nsHTMLInputElement::SetValue(const nsString& aValue) NS_IMETHODIMP nsHTMLInputElement::GetChecked(PRBool* aValue) { - nsAutoString value("0"); + nsAutoString value; value.AssignWithConversion("0"); nsIFormControlFrame* formControlFrame = nsnull; if (NS_SUCCEEDED(nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame))) { if (nsnull != formControlFrame) { @@ -460,11 +460,11 @@ nsHTMLInputElement::GetChecked(PRBool* aValue) // Obtain the value property from the presentation state. if (presState) { - presState->GetStateProperty("checked", value); + presState->GetStateProperty(NS_ConvertASCIItoUCS2("checked"), value); } } - if (value.Equals("1")) + if (value.EqualsWithConversion("1")) *aValue = PR_TRUE; else *aValue = PR_FALSE; @@ -482,12 +482,8 @@ nsHTMLInputElement::SetPresStateChecked(nsIHTMLContent * aHTMLContent, // Obtain the value property from the presentation state. if (presState) { - nsAutoString value; - if (PR_TRUE == aValue) - value = "1"; - else - value = "0"; - presState->SetStateProperty("checked", value); + nsAutoString value; value.AssignWithConversion( aValue ? "1" : "0" ); + presState->SetStateProperty(NS_ConvertASCIItoUCS2("checked"), value); return NS_OK; } return NS_ERROR_FAILURE; @@ -504,14 +500,14 @@ nsHTMLInputElement::SetChecked(PRBool aValue) // if so, then return nsAutoString checkedStr; formControlFrame->GetProperty(nsHTMLAtoms::checked, checkedStr); - if ((checkedStr.Equals("1") && aValue) || (checkedStr.Equals("0") && !aValue)) { + if ((checkedStr.EqualsWithConversion("1") && aValue) || (checkedStr.EqualsWithConversion("0") && !aValue)) { return NS_OK; } // the value is being toggled nsIPresContext* presContext; nsGenericHTMLElement::GetPresContext(this, &presContext); - formControlFrame->SetProperty(presContext, nsHTMLAtoms::checked, PR_TRUE == aValue?"1":"0"); + formControlFrame->SetProperty(presContext, nsHTMLAtoms::checked, NS_ConvertASCIItoUCS2(PR_TRUE == aValue?"1":"0")); NS_IF_RELEASE(presContext); } else { @@ -671,7 +667,7 @@ nsHTMLInputElement::Select() { nsCOMPtr presContext; nsGenericHTMLElement::GetPresContext(this, getter_AddRefs(presContext)); - formControlFrame->SetProperty(presContext, nsHTMLAtoms::select, ""); + formControlFrame->SetProperty(presContext, nsHTMLAtoms::select, nsAutoString()); return NS_OK; } } diff --git a/mozilla/layout/html/content/src/nsHTMLLabelElement.cpp b/mozilla/layout/html/content/src/nsHTMLLabelElement.cpp index bde0e774b34..7857ddd0d3a 100644 --- a/mozilla/layout/html/content/src/nsHTMLLabelElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLLabelElement.cpp @@ -69,26 +69,26 @@ public: } NS_IMETHOD GetAttribute(const nsString& aName, nsString& aReturn) { if (aName.EqualsIgnoreCase("htmlfor")) { - return mInner.GetAttribute(nsAutoString("for"), aReturn); + return mInner.GetAttribute(NS_ConvertASCIItoUCS2("for"), aReturn); } return mInner.GetAttribute(aName, aReturn); } NS_IMETHOD SetAttribute(const nsString& aName, const nsString& aValue) { if (aName.EqualsIgnoreCase("htmlfor")) { - return mInner.SetAttribute(nsAutoString("for"), aValue); + return mInner.SetAttribute(NS_ConvertASCIItoUCS2("for"), aValue); } return mInner.SetAttribute(aName, aValue); } NS_IMETHOD RemoveAttribute(const nsString& aName) { if (aName.EqualsIgnoreCase("htmlfor")) { - return mInner.RemoveAttribute(nsAutoString("for")); + return mInner.RemoveAttribute(NS_ConvertASCIItoUCS2("for")); } return mInner.RemoveAttribute(aName); } NS_IMETHOD GetAttributeNode(const nsString& aName, nsIDOMAttr** aReturn) { if (aName.EqualsIgnoreCase("htmlfor")) { - return mInner.GetAttributeNode(nsAutoString("for"), aReturn); + return mInner.GetAttributeNode(NS_ConvertASCIItoUCS2("for"), aReturn); } return mInner.GetAttributeNode(aName, aReturn); } diff --git a/mozilla/layout/html/content/src/nsHTMLOptionElement.cpp b/mozilla/layout/html/content/src/nsHTMLOptionElement.cpp index ff6dc018b9b..47d8bec3a2d 100644 --- a/mozilla/layout/html/content/src/nsHTMLOptionElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLOptionElement.cpp @@ -258,12 +258,9 @@ nsHTMLOptionElement::GetSelected(PRBool* aValue) PRInt32 indx; if (NS_OK == GetIndex(&indx)) { nsString value; - value.Append(indx, 10); // Save the index in base 10 + value.AppendInt(indx, 10); // Save the index in base 10 formControlFrame->GetProperty(nsHTMLAtoms::selected, value); - if (value.Equals("1")) - *aValue = PR_TRUE; - else - *aValue = PR_FALSE; + *aValue = value.EqualsWithConversion("1"); } } return rv; diff --git a/mozilla/layout/html/content/src/nsHTMLPreElement.cpp b/mozilla/layout/html/content/src/nsHTMLPreElement.cpp index 964c9b9f541..82e3cb66003 100644 --- a/mozilla/layout/html/content/src/nsHTMLPreElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLPreElement.cpp @@ -177,7 +177,7 @@ MapFontAttributesInto(const nsIHTMLMappedAttributes* aAttributes, if (value.GetUnit() == eHTMLUnit_Empty) { nsStyleFont* font = (nsStyleFont*) aContext->GetMutableStyleData(eStyleStruct_Font); - font->mFont.name = "serif"; + font->mFont.name.AssignWithConversion("serif"); } } } diff --git a/mozilla/layout/html/content/src/nsHTMLSelectElement.cpp b/mozilla/layout/html/content/src/nsHTMLSelectElement.cpp index 383fd60586e..7bb3bd2c717 100644 --- a/mozilla/layout/html/content/src/nsHTMLSelectElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLSelectElement.cpp @@ -437,10 +437,10 @@ nsHTMLSelectElement::GetType(nsString& aType) result = GetMultiple(&isMultiple); if (NS_OK == result) { if (isMultiple) { - aType.Assign("select-multiple"); + aType.AssignWithConversion("select-multiple"); } else { - aType.Assign("select-one"); + aType.AssignWithConversion("select-one"); } } @@ -509,7 +509,7 @@ nsHTMLSelectElement::GetSelectedIndex(PRInt32* aValue) nsresult res = GetPresState(getter_AddRefs(presState), getter_AddRefs(value)); if (NS_SUCCEEDED(res) && presState) { nsCOMPtr supp; - presState->GetStatePropertyAsSupports("selecteditems", getter_AddRefs(supp)); + presState->GetStatePropertyAsSupports(NS_ConvertASCIItoUCS2("selecteditems"), getter_AddRefs(supp)); res = NS_ERROR_NULL_POINTER; if (supp) { @@ -591,7 +591,7 @@ nsHTMLSelectElement::SetSelectedIndex(PRInt32 aIndex) nsIFormControlFrame* formControlFrame = nsnull; if (NS_OK == nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame)) { nsString value; - value.Append(aIndex, 10); + value.AppendInt(aIndex, 10); nsIPresContext* presContext; nsGenericHTMLElement::GetPresContext(this, &presContext); formControlFrame->SetProperty(presContext, nsHTMLAtoms::selectedindex, value); @@ -659,7 +659,7 @@ nsHTMLSelectElement::SetSelectedIndex(PRInt32 aIndex) // If it is a new nsISupportsArray then // set it into the PresState if (!doesExist) { - presState->SetStatePropertyAsSupports("selecteditems", value); + presState->SetStatePropertyAsSupports(NS_ConvertASCIItoUCS2("selecteditems"), value); } } // if } @@ -870,7 +870,7 @@ nsHTMLSelectElement::GetPresState(nsIPresState** aPresState, nsISupportsArray** // check to see if there is already a supports nsISupports * supp; - nsresult res = presState->GetStatePropertyAsSupports("selecteditems", &supp); + nsresult res = presState->GetStatePropertyAsSupports(NS_ConvertASCIItoUCS2("selecteditems"), &supp); if (NS_SUCCEEDED(res) && supp != nsnull) { if (NS_FAILED(supp->QueryInterface(NS_GET_IID(nsISupportsArray), (void**)aValueArray))) { // Be paranoid - make sure it is zeroed out diff --git a/mozilla/layout/html/content/src/nsHTMLTableElement.cpp b/mozilla/layout/html/content/src/nsHTMLTableElement.cpp index 4972dfb10f3..aad771851bd 100644 --- a/mozilla/layout/html/content/src/nsHTMLTableElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLTableElement.cpp @@ -859,7 +859,7 @@ nsHTMLTableElement::StringToAttribute(nsIAtom* aAttribute, /* attributes that are either empty, or pixels */ else if (aAttribute == nsHTMLAtoms::border) { - PRInt32 min = (aValue.Equals("")) ? 1 : 0; + PRInt32 min = (aValue.IsEmpty()) ? 1 : 0; if (nsGenericHTMLElement::ParseValue(aValue, min, aResult, eHTMLUnit_Pixel)) { return NS_CONTENT_ATTR_HAS_VALUE; } diff --git a/mozilla/layout/html/content/src/nsHTMLTextAreaElement.cpp b/mozilla/layout/html/content/src/nsHTMLTextAreaElement.cpp index 20e52938967..bd9edf46653 100644 --- a/mozilla/layout/html/content/src/nsHTMLTextAreaElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLTextAreaElement.cpp @@ -340,7 +340,7 @@ nsHTMLTextAreaElement::Select() { nsCOMPtr presContext; nsGenericHTMLElement::GetPresContext(this, getter_AddRefs(presContext)); - formControlFrame->SetProperty(presContext, nsHTMLAtoms::select, ""); + formControlFrame->SetProperty(presContext, nsHTMLAtoms::select, nsAutoString()); return NS_OK; } } @@ -359,7 +359,7 @@ NS_IMPL_INT_ATTR(nsHTMLTextAreaElement, TabIndex, tabindex) NS_IMETHODIMP nsHTMLTextAreaElement::GetType(nsString& aType) { - aType.Assign("textarea"); + aType.AssignWithConversion("textarea"); return NS_OK; } diff --git a/mozilla/layout/html/document/src/nsFrameFrame.cpp b/mozilla/layout/html/document/src/nsFrameFrame.cpp index 65a3e8e0300..1fc97f6a0cf 100644 --- a/mozilla/layout/html/document/src/nsFrameFrame.cpp +++ b/mozilla/layout/html/document/src/nsFrameFrame.cpp @@ -758,7 +758,7 @@ nsHTMLFrameInnerFrame::CreateDocShell(nsIPresContext* aPresContext, value.Left(valuePiece, 7); if (valuePiece.EqualsIgnoreCase("content") && (value.Length() == 7 || - value.Mid(valuePiece, 7, 1) == 1 && valuePiece.Equals("-"))) + value.Mid(valuePiece, 7, 1) == 1 && valuePiece.EqualsWithConversion("-"))) isContent = PR_TRUE; } if (isContent) { diff --git a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp index af6ea4160c9..bd3897a31f2 100644 --- a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp +++ b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp @@ -735,7 +735,7 @@ nsHTMLFramesetFrame::ParseRowColSpec(nsString& aSpec, } // Translate value to an integer - nsString token(""); + nsString token; aSpec.Mid(token, start, numberEnd - start); // Treat * as 1* diff --git a/mozilla/layout/html/forms/src/nsFileControlFrame.cpp b/mozilla/layout/html/forms/src/nsFileControlFrame.cpp index f80b5c356e0..74319b46ba7 100644 --- a/mozilla/layout/html/forms/src/nsFileControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFileControlFrame.cpp @@ -105,7 +105,7 @@ nsFileControlFrame::CreateAnonymousContent(nsIPresContext* aPresContext, // create text field nsIAtom* tag = NS_NewAtom("input"); if (NS_OK == NS_NewHTMLInputElement(&mTextContent, tag)) { - mTextContent->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, nsAutoString("text"), PR_FALSE); + mTextContent->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, NS_ConvertASCIItoUCS2("text"), PR_FALSE); if (nsFormFrame::GetDisabled(this)) { nsCOMPtr textControl = do_QueryInterface(mTextContent); if (textControl) { @@ -119,7 +119,7 @@ nsFileControlFrame::CreateAnonymousContent(nsIPresContext* aPresContext, nsIHTMLContent* browse = nsnull; tag = NS_NewAtom("input"); if (NS_OK == NS_NewHTMLInputElement(&browse, tag)) { - browse->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, nsAutoString("button"), PR_FALSE); + browse->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, NS_ConvertASCIItoUCS2("button"), PR_FALSE); //browse->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::value, nsAutoString("browse..."), PR_FALSE); aChildList.AppendElement(browse); @@ -245,7 +245,7 @@ nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent) nsIFileWidget *fileWidget = nsnull; - nsString title("File Upload"); + nsString title; title.AssignWithConversion("File Upload"); nsComponentManager::CreateInstance(kCFileWidgetCID, nsnull, kIFileWidgetIID, (void**)&fileWidget); if (fileWidget) { @@ -607,7 +607,7 @@ nsFileControlFrame::SaveState(nsIPresContext* aPresContext, nsIPresState** aStat // This string will hold a single item, whether or not we're checked. nsAutoString stateString; GetProperty(nsHTMLAtoms::value, stateString); - (*aState)->SetStateProperty("checked", stateString); + (*aState)->SetStateProperty(NS_ConvertASCIItoUCS2("checked"), stateString); return NS_OK; } @@ -616,7 +616,7 @@ NS_IMETHODIMP nsFileControlFrame::RestoreState(nsIPresContext* aPresContext, nsIPresState* aState) { nsAutoString string; - aState->GetStateProperty("checked", string); + aState->GetStateProperty(NS_ConvertASCIItoUCS2("checked"), string); SetProperty(aPresContext, nsHTMLAtoms::value, string); return NS_OK; diff --git a/mozilla/layout/html/forms/src/nsFormFrame.cpp b/mozilla/layout/html/forms/src/nsFormFrame.cpp index ed82f805eb0..6860d93cf7f 100644 --- a/mozilla/layout/html/forms/src/nsFormFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFormFrame.cpp @@ -696,7 +696,7 @@ nsFormFrame::OnSubmit(nsIPresContext* aPresContext, nsIFrame* aFrame) NS_WITH_SERVICE(nsIObserverService, service, NS_OBSERVERSERVICE_PROGID, &result); if (NS_FAILED(result)) return result; - nsString theTopic(NS_FORMSUBMIT_SUBJECT); + nsString theTopic; theTopic.AssignWithConversion(NS_FORMSUBMIT_SUBJECT); nsIEnumerator* theEnum; result = service->EnumerateObserverList(theTopic.GetUnicode(), &theEnum); if (NS_SUCCEEDED(result) && theEnum){ @@ -750,7 +750,7 @@ nsFormFrame::OnSubmit(nsIPresContext* aPresContext, nsIFrame* aFrame) // XUL, do nothing. This prevents undesirable reloading of // a document inside XUL. - if (href.Equals("")) { + if (href.IsEmpty()) { nsCOMPtr htmlDoc; if (PR_FALSE == NS_SUCCEEDED(doc->QueryInterface(kIHTMLDocumentIID, getter_AddRefs(htmlDoc)))) { @@ -765,7 +765,7 @@ nsFormFrame::OnSubmit(nsIPresContext* aPresContext, nsIFrame* aFrame) docURL->GetSpec(&relPath); NS_ASSERTION(relPath, "Rel path couldn't be formed in form submit!\n"); if (relPath) { - href.Append(relPath); + href.AppendWithConversion(relPath); nsCRT::free(relPath); // If re-using the same URL, chop off old query string (bug 25330) @@ -816,15 +816,15 @@ nsFormFrame::OnSubmit(nsIPresContext* aPresContext, nsIFrame* aFrame) if (NS_SUCCEEDED(result = NS_NewURI(getter_AddRefs(actionURL), href, docURL))) { result = actionURL->GetScheme(getter_Copies(scheme)); } - nsAutoString theScheme(scheme); + nsAutoString theScheme; theScheme.AssignWithConversion( NS_STATIC_CAST(const char*, scheme) ); // Append the URI encoded variable/value pairs for GET's if (!theScheme.EqualsIgnoreCase("javascript")) { // Not for JS URIs, see bug 26917 if (!isPost) { if (href.FindChar('?', PR_FALSE, 0) == kNotFound) { // Add a ? if needed - href.Append('?'); + href.AppendWithConversion('?'); } else { // Adding to existing query string if (href.Last() != '&' && href.Last() != '?') { // Add a & if needed - href.Append('&'); + href.AppendWithConversion('&'); } } href.Append(data); @@ -937,7 +937,8 @@ nsFormFrame::URLEncode(const nsString& aString, nsIUnicodeEncoder* encoder) delete [] inBuf; char* outBuf = nsEscape(convertedBuf, url_XPAlphas); - nsString* result = new nsString(outBuf); + nsString* result = new nsString; + result->AssignWithConversion(outBuf); nsCRT::free(outBuf); nsAllocator::Free(convertedBuf); return result; @@ -945,7 +946,7 @@ nsFormFrame::URLEncode(const nsString& aString, nsIUnicodeEncoder* encoder) void nsFormFrame::GetSubmitCharset(nsString& oCharset) { - oCharset = "UTF-8"; // default to utf-8 + oCharset.AssignWithConversion("UTF-8"); // default to utf-8 nsresult rv; // XXX // We may want to get it from the HTML 4 Accept-Charset attribute first @@ -1008,7 +1009,7 @@ NS_IMETHODIMP nsFormFrame::GetPlatformEncoder(nsIUnicodeEncoder** encoder) if (NS_FAILED(rv)) { NS_ASSERTION(0, "error getting locale charset, using ISO-8859-1"); - localeCharset.SetString("ISO-8859-1"); + localeCharset.AssignWithConversion("ISO-8859-1"); rv = NS_OK; } @@ -1058,14 +1059,14 @@ nsresult nsFormFrame::ProcessAsURLEncoded(nsIFormProcessor* aFormProcessor, PRBo if (PR_TRUE == firstTime) { firstTime = PR_FALSE; } else { - buf += "&"; + buf.AppendWithConversion("&"); } nsString* convName = URLEncode(names[valueX], encoder); buf += *convName; delete convName; - buf += "="; + buf.AppendWithConversion("="); nsAutoString newValue; - newValue = values[valueX]; + newValue.Append(values[valueX]); if (aFormProcessor) { ProcessValue(*aFormProcessor, child, names[valueX], newValue); } @@ -1084,23 +1085,23 @@ nsresult nsFormFrame::ProcessAsURLEncoded(nsIFormProcessor* aFormProcessor, PRBo if (isPost) { char size[16]; sprintf(size, "%d", buf.Length()); - aData = "Content-type: application/x-www-form-urlencoded"; + aData.AssignWithConversion("Content-type: application/x-www-form-urlencoded"); #ifdef SPECIFY_CHARSET_IN_CONTENT_TYPE nsString charset; GetSubmitCharset(charset); aData += "; charset="; aData += charset; #endif - aData += CRLF; - aData += "Content-Length: "; - aData += size; - aData += CRLF; - aData += CRLF; + aData.AppendWithConversion(CRLF); + aData.AppendWithConversion("Content-Length: "); + aData.AppendWithConversion(size); + aData.AppendWithConversion(CRLF); + aData.AppendWithConversion(CRLF); } aData += buf; // Need to append CRLF to end of stream for compatability with Nav and IE if (isPost) { - aData += CRLF; + aData.AppendWithConversion(CRLF); } NS_IF_RELEASE(encoder); return rv; diff --git a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp index c1886869040..92c737376f0 100644 --- a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp @@ -169,13 +169,13 @@ nsHTMLButtonControlFrame::GetDefaultLabel(nsString& aString) PRInt32 type; GetType(&type); if (NS_FORM_BUTTON_BUTTON == type) { - aString = "Button"; + aString.AssignWithConversion("Button"); } else if (NS_FORM_BUTTON_RESET == type) { - aString = "Reset"; + aString.AssignWithConversion("Reset"); } else if (NS_FORM_BUTTON_SUBMIT == type) { - aString = "Submit"; + aString.AssignWithConversion("Submit"); } } diff --git a/mozilla/layout/html/forms/src/nsImageControlFrame.cpp b/mozilla/layout/html/forms/src/nsImageControlFrame.cpp index 378216ed8bb..521c56beb79 100644 --- a/mozilla/layout/html/forms/src/nsImageControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsImageControlFrame.cpp @@ -390,26 +390,24 @@ nsImageControlFrame::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues, char buf[20]; aNumValues = 2; - aValues[0].SetLength(0); sprintf(&buf[0], "%d", mLastClickPoint.x); - aValues[0].Append(&buf[0]); + aValues[0].AssignWithConversion(&buf[0]); - aValues[1].SetLength(0); sprintf(&buf[0], "%d", mLastClickPoint.y); - aValues[1].Append(&buf[0]); + aValues[1].AssignWithConversion(&buf[0]); nsAutoString name; nsresult result = GetName(&name); if (NS_CONTENT_ATTR_HAS_VALUE == result) { aNames[0] = name; - aNames[0].Append(".x"); + aNames[0].AppendWithConversion(".x"); aNames[1] = name; - aNames[1].Append(".y"); + aNames[1].AppendWithConversion(".y"); } else { // If the Image Element has no name, simply return x and y // to Nav and IE compatability. - aNames[0] = "x"; - aNames[1] = "y"; + aNames[0].AssignWithConversion("x"); + aNames[1].AssignWithConversion("y"); } return PR_TRUE; diff --git a/mozilla/layout/html/style/src/nsCSSDeclaration.cpp b/mozilla/layout/html/style/src/nsCSSDeclaration.cpp index a1dfb4c7884..8b97a6ede95 100644 --- a/mozilla/layout/html/style/src/nsCSSDeclaration.cpp +++ b/mozilla/layout/html/style/src/nsCSSDeclaration.cpp @@ -3458,7 +3458,7 @@ CSSDeclarationImpl::GetValue(nsCSSProperty aProperty, nsString& aValue) case eCSSProperty_size: if (HAS_VALUE(mPage,mSizeWidth) && HAS_VALUE(mPage,mSizeHeight)) { AppendValueToString(eCSSProperty_size_width, aValue); - aValue.Append(' '); + aValue.AppendWithConversion(' '); AppendValueToString(eCSSProperty_size_height, aValue); } break; diff --git a/mozilla/layout/html/style/src/nsCSSStyleSheet.cpp b/mozilla/layout/html/style/src/nsCSSStyleSheet.cpp index 464cf03d786..3790b1044e7 100644 --- a/mozilla/layout/html/style/src/nsCSSStyleSheet.cpp +++ b/mozilla/layout/html/style/src/nsCSSStyleSheet.cpp @@ -2372,12 +2372,12 @@ static PRBool ValueIncludes(const nsString& aValueList, const nsString& aValue, if (start < end) { if (aCaseSensitive) { - if (aValue.Equals(value, start)) { + if (nsCRT::strcmp(value, start)) { return PR_TRUE; } } else { - if (aValue.EqualsIgnoreCase(value, start)) { + if (nsCRT::strcasecmp(value, start)) { return PR_TRUE; } } @@ -2413,12 +2413,12 @@ static PRBool ValueDashMatch(const nsString& aValueList, const nsString& aValue, if (start < end) { if (aCaseSensitive) { - if (aValue.Equals(value, start)) { + if (nsCRT::strcmp(value, start)) { return PR_TRUE; } } else { - if (aValue.EqualsIgnoreCase(value, start)) { + if (nsCRT::strcasecmp(value, start)) { return PR_TRUE; } } diff --git a/mozilla/layout/html/style/src/nsCSSValue.cpp b/mozilla/layout/html/style/src/nsCSSValue.cpp index 4c26d08c8b1..945e64b1ec2 100644 --- a/mozilla/layout/html/style/src/nsCSSValue.cpp +++ b/mozilla/layout/html/style/src/nsCSSValue.cpp @@ -283,93 +283,93 @@ void nsCSSValue::AppendToString(nsString& aBuffer, nsCSSProperty aPropID) const } if (-1 < aPropID) { - aBuffer.Append(nsCSSProps::GetStringValue(aPropID)); - aBuffer.Append(": "); + aBuffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID)); + aBuffer.AppendWithConversion(": "); } if ((eCSSUnit_String <= mUnit) && (mUnit <= eCSSUnit_Counters)) { switch (mUnit) { - case eCSSUnit_URL: aBuffer.Append("url("); break; - case eCSSUnit_Attr: aBuffer.Append("attr("); break; - case eCSSUnit_Counter: aBuffer.Append("counter("); break; - case eCSSUnit_Counters: aBuffer.Append("counters("); break; + case eCSSUnit_URL: aBuffer.AppendWithConversion("url("); break; + case eCSSUnit_Attr: aBuffer.AppendWithConversion("attr("); break; + case eCSSUnit_Counter: aBuffer.AppendWithConversion("counter("); break; + case eCSSUnit_Counters: aBuffer.AppendWithConversion("counters("); break; default: break; } if (nsnull != mValue.mString) { - aBuffer.Append('"'); + aBuffer.AppendWithConversion('"'); aBuffer.Append(*(mValue.mString)); - aBuffer.Append('"'); + aBuffer.AppendWithConversion('"'); } else { - aBuffer.Append("null str"); + aBuffer.AppendWithConversion("null str"); } } else if ((eCSSUnit_Integer <= mUnit) && (mUnit <= eCSSUnit_Enumerated)) { - aBuffer.Append(mValue.mInt, 10); - aBuffer.Append("[0x"); - aBuffer.Append(mValue.mInt, 16); - aBuffer.Append(']'); + aBuffer.AppendInt(mValue.mInt, 10); + aBuffer.AppendWithConversion("[0x"); + aBuffer.AppendInt(mValue.mInt, 16); + aBuffer.AppendWithConversion(']'); } else if (eCSSUnit_Color == mUnit){ - aBuffer.Append("(0x"); - aBuffer.Append(NS_GET_R(mValue.mColor), 16); - aBuffer.Append(" 0x"); - aBuffer.Append(NS_GET_G(mValue.mColor), 16); - aBuffer.Append(" 0x"); - aBuffer.Append(NS_GET_B(mValue.mColor), 16); - aBuffer.Append(" 0x"); - aBuffer.Append(NS_GET_A(mValue.mColor), 16); - aBuffer.Append(')'); + aBuffer.AppendWithConversion("(0x"); + aBuffer.AppendInt(NS_GET_R(mValue.mColor), 16); + aBuffer.AppendWithConversion(" 0x"); + aBuffer.AppendInt(NS_GET_G(mValue.mColor), 16); + aBuffer.AppendWithConversion(" 0x"); + aBuffer.AppendInt(NS_GET_B(mValue.mColor), 16); + aBuffer.AppendWithConversion(" 0x"); + aBuffer.AppendInt(NS_GET_A(mValue.mColor), 16); + aBuffer.AppendWithConversion(')'); } else if (eCSSUnit_Percent == mUnit) { - aBuffer.Append(mValue.mFloat * 100.0f); + aBuffer.AppendFloat(mValue.mFloat * 100.0f); } else if (eCSSUnit_Percent < mUnit) { - aBuffer.Append(mValue.mFloat); + aBuffer.AppendFloat(mValue.mFloat); } switch (mUnit) { case eCSSUnit_Null: break; - case eCSSUnit_Auto: aBuffer.Append("auto"); break; - case eCSSUnit_Inherit: aBuffer.Append("inherit"); break; - case eCSSUnit_None: aBuffer.Append("none"); break; - case eCSSUnit_Normal: aBuffer.Append("normal"); break; + case eCSSUnit_Auto: aBuffer.AppendWithConversion("auto"); break; + case eCSSUnit_Inherit: aBuffer.AppendWithConversion("inherit"); break; + case eCSSUnit_None: aBuffer.AppendWithConversion("none"); break; + case eCSSUnit_Normal: aBuffer.AppendWithConversion("normal"); break; case eCSSUnit_String: break; case eCSSUnit_URL: case eCSSUnit_Attr: case eCSSUnit_Counter: - case eCSSUnit_Counters: aBuffer.Append(')'); break; - case eCSSUnit_Integer: aBuffer.Append("int"); break; - case eCSSUnit_Enumerated: aBuffer.Append("enum"); break; - case eCSSUnit_Color: aBuffer.Append("rbga"); break; - case eCSSUnit_Percent: aBuffer.Append("%"); break; - case eCSSUnit_Number: aBuffer.Append("#"); break; - case eCSSUnit_Inch: aBuffer.Append("in"); break; - case eCSSUnit_Foot: aBuffer.Append("ft"); break; - case eCSSUnit_Mile: aBuffer.Append("mi"); break; - case eCSSUnit_Millimeter: aBuffer.Append("mm"); break; - case eCSSUnit_Centimeter: aBuffer.Append("cm"); break; - case eCSSUnit_Meter: aBuffer.Append("m"); break; - case eCSSUnit_Kilometer: aBuffer.Append("km"); break; - case eCSSUnit_Point: aBuffer.Append("pt"); break; - case eCSSUnit_Pica: aBuffer.Append("pc"); break; - case eCSSUnit_Didot: aBuffer.Append("dt"); break; - case eCSSUnit_Cicero: aBuffer.Append("cc"); break; - case eCSSUnit_EM: aBuffer.Append("em"); break; - case eCSSUnit_EN: aBuffer.Append("en"); break; - case eCSSUnit_XHeight: aBuffer.Append("ex"); break; - case eCSSUnit_CapHeight: aBuffer.Append("cap"); break; - case eCSSUnit_Char: aBuffer.Append("ch"); break; - case eCSSUnit_Pixel: aBuffer.Append("px"); break; - case eCSSUnit_Degree: aBuffer.Append("deg"); break; - case eCSSUnit_Grad: aBuffer.Append("grad"); break; - case eCSSUnit_Radian: aBuffer.Append("rad"); break; - case eCSSUnit_Hertz: aBuffer.Append("Hz"); break; - case eCSSUnit_Kilohertz: aBuffer.Append("kHz"); break; - case eCSSUnit_Seconds: aBuffer.Append("s"); break; - case eCSSUnit_Milliseconds: aBuffer.Append("ms"); break; + case eCSSUnit_Counters: aBuffer.AppendWithConversion(')'); break; + case eCSSUnit_Integer: aBuffer.AppendWithConversion("int"); break; + case eCSSUnit_Enumerated: aBuffer.AppendWithConversion("enum"); break; + case eCSSUnit_Color: aBuffer.AppendWithConversion("rbga"); break; + case eCSSUnit_Percent: aBuffer.AppendWithConversion("%"); break; + case eCSSUnit_Number: aBuffer.AppendWithConversion("#"); break; + case eCSSUnit_Inch: aBuffer.AppendWithConversion("in"); break; + case eCSSUnit_Foot: aBuffer.AppendWithConversion("ft"); break; + case eCSSUnit_Mile: aBuffer.AppendWithConversion("mi"); break; + case eCSSUnit_Millimeter: aBuffer.AppendWithConversion("mm"); break; + case eCSSUnit_Centimeter: aBuffer.AppendWithConversion("cm"); break; + case eCSSUnit_Meter: aBuffer.AppendWithConversion("m"); break; + case eCSSUnit_Kilometer: aBuffer.AppendWithConversion("km"); break; + case eCSSUnit_Point: aBuffer.AppendWithConversion("pt"); break; + case eCSSUnit_Pica: aBuffer.AppendWithConversion("pc"); break; + case eCSSUnit_Didot: aBuffer.AppendWithConversion("dt"); break; + case eCSSUnit_Cicero: aBuffer.AppendWithConversion("cc"); break; + case eCSSUnit_EM: aBuffer.AppendWithConversion("em"); break; + case eCSSUnit_EN: aBuffer.AppendWithConversion("en"); break; + case eCSSUnit_XHeight: aBuffer.AppendWithConversion("ex"); break; + case eCSSUnit_CapHeight: aBuffer.AppendWithConversion("cap"); break; + case eCSSUnit_Char: aBuffer.AppendWithConversion("ch"); break; + case eCSSUnit_Pixel: aBuffer.AppendWithConversion("px"); break; + case eCSSUnit_Degree: aBuffer.AppendWithConversion("deg"); break; + case eCSSUnit_Grad: aBuffer.AppendWithConversion("grad"); break; + case eCSSUnit_Radian: aBuffer.AppendWithConversion("rad"); break; + case eCSSUnit_Hertz: aBuffer.AppendWithConversion("Hz"); break; + case eCSSUnit_Kilohertz: aBuffer.AppendWithConversion("kHz"); break; + case eCSSUnit_Seconds: aBuffer.AppendWithConversion("s"); break; + case eCSSUnit_Milliseconds: aBuffer.AppendWithConversion("ms"); break; } - aBuffer.Append(' '); + aBuffer.AppendWithConversion(' '); } void nsCSSValue::ToString(nsString& aBuffer, nsCSSProperty aPropID) const diff --git a/mozilla/layout/html/style/src/nsDOMCSSDeclaration.cpp b/mozilla/layout/html/style/src/nsDOMCSSDeclaration.cpp index 30b5f752858..81711ce80c4 100644 --- a/mozilla/layout/html/style/src/nsDOMCSSDeclaration.cpp +++ b/mozilla/layout/html/style/src/nsDOMCSSDeclaration.cpp @@ -188,7 +188,7 @@ nsDOMCSSDeclaration::GetPropertyPriority(const nsString& aPropertyName, } if ((NS_OK == result) && isImportant) { - aReturn.Assign("!important"); + aReturn.AssignWithConversion("!important"); } else { aReturn.SetLength(0); @@ -204,8 +204,8 @@ nsDOMCSSDeclaration::SetProperty(const nsString& aPropertyName, { nsAutoString declString; - declString=aPropertyName; - declString.Append(":"); + declString.Assign(aPropertyName); + declString.AppendWithConversion(":"); declString.Append(aValue); declString.Append(aPriority); @@ -215,1488 +215,1488 @@ nsDOMCSSDeclaration::SetProperty(const nsString& aPropertyName, NS_IMETHODIMP nsDOMCSSDeclaration::GetAzimuth(nsString& aAzimuth) { - return GetPropertyValue("azimuth", aAzimuth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("azimuth"), aAzimuth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetAzimuth(const nsString& aAzimuth) { - return SetProperty("azimuth", aAzimuth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("azimuth"), aAzimuth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackground(nsString& aBackground) { - return GetPropertyValue("background", aBackground); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background"), aBackground); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackground(const nsString& aBackground) { - return SetProperty("background", aBackground, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background"), aBackground, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackgroundAttachment(nsString& aBackgroundAttachment) { - return GetPropertyValue("background-attachment", aBackgroundAttachment); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background-attachment"), aBackgroundAttachment); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackgroundAttachment(const nsString& aBackgroundAttachment) { - return SetProperty("background-attachment", aBackgroundAttachment, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background-attachment"), aBackgroundAttachment, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackgroundColor(nsString& aBackgroundColor) { - return GetPropertyValue("background-color", aBackgroundColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background-color"), aBackgroundColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackgroundColor(const nsString& aBackgroundColor) { - return SetProperty("background-color", aBackgroundColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background-color"), aBackgroundColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackgroundImage(nsString& aBackgroundImage) { - return GetPropertyValue("background-image", aBackgroundImage); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background-image"), aBackgroundImage); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackgroundImage(const nsString& aBackgroundImage) { - return SetProperty("background-image", aBackgroundImage, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background-image"), aBackgroundImage, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackgroundPosition(nsString& aBackgroundPosition) { - return GetPropertyValue("background-position", aBackgroundPosition); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background-position"), aBackgroundPosition); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackgroundPosition(const nsString& aBackgroundPosition) { - return SetProperty("background-position", aBackgroundPosition, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background-position"), aBackgroundPosition, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackgroundRepeat(nsString& aBackgroundRepeat) { - return GetPropertyValue("background-repeat", aBackgroundRepeat); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background-repeat"), aBackgroundRepeat); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackgroundRepeat(const nsString& aBackgroundRepeat) { - return SetProperty("background-repeat", aBackgroundRepeat, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background-repeat"), aBackgroundRepeat, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBehavior(nsString& aBehavior) { - return GetPropertyValue("behavior", aBehavior); + return GetPropertyValue(NS_ConvertASCIItoUCS2("behavior"), aBehavior); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBehavior(const nsString& aBehavior) { - return SetProperty("behavior", aBehavior, ""); + return SetProperty(NS_ConvertASCIItoUCS2("behavior"), aBehavior, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorder(nsString& aBorder) { - return GetPropertyValue("border", aBorder); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border"), aBorder); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorder(const nsString& aBorder) { - return SetProperty("border", aBorder, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border"), aBorder, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderCollapse(nsString& aBorderCollapse) { - return GetPropertyValue("border-collapse", aBorderCollapse); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-collapse"), aBorderCollapse); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderCollapse(const nsString& aBorderCollapse) { - return SetProperty("border-collapse", aBorderCollapse, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-collapse"), aBorderCollapse, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderColor(nsString& aBorderColor) { - return GetPropertyValue("border-color", aBorderColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-color"), aBorderColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderColor(const nsString& aBorderColor) { - return SetProperty("border-color", aBorderColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-color"), aBorderColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderSpacing(nsString& aBorderSpacing) { - return GetPropertyValue("border-spacing", aBorderSpacing); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-spacing"), aBorderSpacing); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderSpacing(const nsString& aBorderSpacing) { - return SetProperty("border-spacing", aBorderSpacing, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-spacing"), aBorderSpacing, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderStyle(nsString& aBorderStyle) { - return GetPropertyValue("border-style", aBorderStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-style"), aBorderStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderStyle(const nsString& aBorderStyle) { - return SetProperty("border-style", aBorderStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-style"), aBorderStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderTop(nsString& aBorderTop) { - return GetPropertyValue("border-top", aBorderTop); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-top"), aBorderTop); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderTop(const nsString& aBorderTop) { - return SetProperty("border-top", aBorderTop, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-top"), aBorderTop, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderRight(nsString& aBorderRight) { - return GetPropertyValue("border-right", aBorderRight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-right"), aBorderRight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderRight(const nsString& aBorderRight) { - return SetProperty("border-right", aBorderRight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-right"), aBorderRight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderBottom(nsString& aBorderBottom) { - return GetPropertyValue("border-bottom", aBorderBottom); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-bottom"), aBorderBottom); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderBottom(const nsString& aBorderBottom) { - return SetProperty("border-bottom", aBorderBottom, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-bottom"), aBorderBottom, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderLeft(nsString& aBorderLeft) { - return GetPropertyValue("border-left", aBorderLeft); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-left"), aBorderLeft); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderLeft(const nsString& aBorderLeft) { - return SetProperty("border-left", aBorderLeft, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-left"), aBorderLeft, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderTopColor(nsString& aBorderTopColor) { - return GetPropertyValue("border-top-color", aBorderTopColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-top-color"), aBorderTopColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderTopColor(const nsString& aBorderTopColor) { - return SetProperty("border-top-color", aBorderTopColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-top-color"), aBorderTopColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderRightColor(nsString& aBorderRightColor) { - return GetPropertyValue("border-right-color", aBorderRightColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-right-color"), aBorderRightColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderRightColor(const nsString& aBorderRightColor) { - return SetProperty("border-right-color", aBorderRightColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-right-color"), aBorderRightColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderBottomColor(nsString& aBorderBottomColor) { - return GetPropertyValue("border-bottom-color", aBorderBottomColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-bottom-color"), aBorderBottomColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderBottomColor(const nsString& aBorderBottomColor) { - return SetProperty("border-bottom-color", aBorderBottomColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-bottom-color"), aBorderBottomColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderLeftColor(nsString& aBorderLeftColor) { - return GetPropertyValue("border-left-color", aBorderLeftColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-left-color"), aBorderLeftColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderLeftColor(const nsString& aBorderLeftColor) { - return SetProperty("border-left-color", aBorderLeftColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-left-color"), aBorderLeftColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderTopStyle(nsString& aBorderTopStyle) { - return GetPropertyValue("border-top-style", aBorderTopStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-top-style"), aBorderTopStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderTopStyle(const nsString& aBorderTopStyle) { - return SetProperty("border-top-style", aBorderTopStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-top-style"), aBorderTopStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderRightStyle(nsString& aBorderRightStyle) { - return GetPropertyValue("border-right-style", aBorderRightStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-right-style"), aBorderRightStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderRightStyle(const nsString& aBorderRightStyle) { - return SetProperty("border-right-style", aBorderRightStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-right-style"), aBorderRightStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderBottomStyle(nsString& aBorderBottomStyle) { - return GetPropertyValue("border-bottom-style", aBorderBottomStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-bottom-style"), aBorderBottomStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderBottomStyle(const nsString& aBorderBottomStyle) { - return SetProperty("border-bottom-style", aBorderBottomStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-bottom-style"), aBorderBottomStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderLeftStyle(nsString& aBorderLeftStyle) { - return GetPropertyValue("border-left-style", aBorderLeftStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-left-style"), aBorderLeftStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderLeftStyle(const nsString& aBorderLeftStyle) { - return SetProperty("border-left-style", aBorderLeftStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-left-style"), aBorderLeftStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderTopWidth(nsString& aBorderTopWidth) { - return GetPropertyValue("border-top-width", aBorderTopWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-top-width"), aBorderTopWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderTopWidth(const nsString& aBorderTopWidth) { - return SetProperty("border-top-width", aBorderTopWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-top-width"), aBorderTopWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderRightWidth(nsString& aBorderRightWidth) { - return GetPropertyValue("border-right-width", aBorderRightWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-right-width"), aBorderRightWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderRightWidth(const nsString& aBorderRightWidth) { - return SetProperty("border-right-width", aBorderRightWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-right-width"), aBorderRightWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderBottomWidth(nsString& aBorderBottomWidth) { - return GetPropertyValue("border-bottom-width", aBorderBottomWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-bottom-width"), aBorderBottomWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderBottomWidth(const nsString& aBorderBottomWidth) { - return SetProperty("border-bottom-width", aBorderBottomWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-bottom-width"), aBorderBottomWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderLeftWidth(nsString& aBorderLeftWidth) { - return GetPropertyValue("border-left-width", aBorderLeftWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-left-width"), aBorderLeftWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderLeftWidth(const nsString& aBorderLeftWidth) { - return SetProperty("border-left-width", aBorderLeftWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-left-width"), aBorderLeftWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderWidth(nsString& aBorderWidth) { - return GetPropertyValue("border-width", aBorderWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-width"), aBorderWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderWidth(const nsString& aBorderWidth) { - return SetProperty("border-width", aBorderWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-width"), aBorderWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBottom(nsString& aBottom) { - return GetPropertyValue("bottom", aBottom); + return GetPropertyValue(NS_ConvertASCIItoUCS2("bottom"), aBottom); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBottom(const nsString& aBottom) { - return SetProperty("bottom", aBottom, ""); + return SetProperty(NS_ConvertASCIItoUCS2("bottom"), aBottom, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCaptionSide(nsString& aCaptionSide) { - return GetPropertyValue("caption-side", aCaptionSide); + return GetPropertyValue(NS_ConvertASCIItoUCS2("caption-side"), aCaptionSide); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCaptionSide(const nsString& aCaptionSide) { - return SetProperty("caption-side", aCaptionSide, ""); + return SetProperty(NS_ConvertASCIItoUCS2("caption-side"), aCaptionSide, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetClear(nsString& aClear) { - return GetPropertyValue("clear", aClear); + return GetPropertyValue(NS_ConvertASCIItoUCS2("clear"), aClear); } NS_IMETHODIMP nsDOMCSSDeclaration::SetClear(const nsString& aClear) { - return SetProperty("clear", aClear, ""); + return SetProperty(NS_ConvertASCIItoUCS2("clear"), aClear, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetClip(nsString& aClip) { - return GetPropertyValue("clip", aClip); + return GetPropertyValue(NS_ConvertASCIItoUCS2("clip"), aClip); } NS_IMETHODIMP nsDOMCSSDeclaration::SetClip(const nsString& aClip) { - return SetProperty("clip", aClip, ""); + return SetProperty(NS_ConvertASCIItoUCS2("clip"), aClip, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetColor(nsString& aColor) { - return GetPropertyValue("color", aColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("color"), aColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetColor(const nsString& aColor) { - return SetProperty("color", aColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("color"), aColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetContent(nsString& aContent) { - return GetPropertyValue("content", aContent); + return GetPropertyValue(NS_ConvertASCIItoUCS2("content"), aContent); } NS_IMETHODIMP nsDOMCSSDeclaration::SetContent(const nsString& aContent) { - return SetProperty("content", aContent, ""); + return SetProperty(NS_ConvertASCIItoUCS2("content"), aContent, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCounterIncrement(nsString& aCounterIncrement) { - return GetPropertyValue("counter-increment", aCounterIncrement); + return GetPropertyValue(NS_ConvertASCIItoUCS2("counter-increment"), aCounterIncrement); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCounterIncrement(const nsString& aCounterIncrement) { - return SetProperty("counter-increment", aCounterIncrement, ""); + return SetProperty(NS_ConvertASCIItoUCS2("counter-increment"), aCounterIncrement, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCounterReset(nsString& aCounterReset) { - return GetPropertyValue("counter-reset", aCounterReset); + return GetPropertyValue(NS_ConvertASCIItoUCS2("counter-reset"), aCounterReset); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCounterReset(const nsString& aCounterReset) { - return SetProperty("counter-reset", aCounterReset, ""); + return SetProperty(NS_ConvertASCIItoUCS2("counter-reset"), aCounterReset, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCssFloat(nsString& aCssFloat) { - return GetPropertyValue("float", aCssFloat); + return GetPropertyValue(NS_ConvertASCIItoUCS2("float"), aCssFloat); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCssFloat(const nsString& aCssFloat) { - return SetProperty("float", aCssFloat, ""); + return SetProperty(NS_ConvertASCIItoUCS2("float"), aCssFloat, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCue(nsString& aCue) { - return GetPropertyValue("cue", aCue); + return GetPropertyValue(NS_ConvertASCIItoUCS2("cue"), aCue); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCue(const nsString& aCue) { - return SetProperty("cue", aCue, ""); + return SetProperty(NS_ConvertASCIItoUCS2("cue"), aCue, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCueAfter(nsString& aCueAfter) { - return GetPropertyValue("cue-after", aCueAfter); + return GetPropertyValue(NS_ConvertASCIItoUCS2("cue-after"), aCueAfter); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCueAfter(const nsString& aCueAfter) { - return SetProperty("cue-after", aCueAfter, ""); + return SetProperty(NS_ConvertASCIItoUCS2("cue-after"), aCueAfter, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCueBefore(nsString& aCueBefore) { - return GetPropertyValue("cue-before", aCueBefore); + return GetPropertyValue(NS_ConvertASCIItoUCS2("cue-before"), aCueBefore); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCueBefore(const nsString& aCueBefore) { - return SetProperty("cue-before", aCueBefore, ""); + return SetProperty(NS_ConvertASCIItoUCS2("cue-before"), aCueBefore, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCursor(nsString& aCursor) { - return GetPropertyValue("cursor", aCursor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("cursor"), aCursor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCursor(const nsString& aCursor) { - return SetProperty("cursor", aCursor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("cursor"), aCursor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetDirection(nsString& aDirection) { - return GetPropertyValue("direction", aDirection); + return GetPropertyValue(NS_ConvertASCIItoUCS2("direction"), aDirection); } NS_IMETHODIMP nsDOMCSSDeclaration::SetDirection(const nsString& aDirection) { - return SetProperty("direction", aDirection, ""); + return SetProperty(NS_ConvertASCIItoUCS2("direction"), aDirection, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetDisplay(nsString& aDisplay) { - return GetPropertyValue("display", aDisplay); + return GetPropertyValue(NS_ConvertASCIItoUCS2("display"), aDisplay); } NS_IMETHODIMP nsDOMCSSDeclaration::SetDisplay(const nsString& aDisplay) { - return SetProperty("display", aDisplay, ""); + return SetProperty(NS_ConvertASCIItoUCS2("display"), aDisplay, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetElevation(nsString& aElevation) { - return GetPropertyValue("elevation", aElevation); + return GetPropertyValue(NS_ConvertASCIItoUCS2("elevation"), aElevation); } NS_IMETHODIMP nsDOMCSSDeclaration::SetElevation(const nsString& aElevation) { - return SetProperty("elevation", aElevation, ""); + return SetProperty(NS_ConvertASCIItoUCS2("elevation"), aElevation, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetEmptyCells(nsString& aEmptyCells) { - return GetPropertyValue("empty-cells", aEmptyCells); + return GetPropertyValue(NS_ConvertASCIItoUCS2("empty-cells"), aEmptyCells); } NS_IMETHODIMP nsDOMCSSDeclaration::SetEmptyCells(const nsString& aEmptyCells) { - return SetProperty("empty-cells", aEmptyCells, ""); + return SetProperty(NS_ConvertASCIItoUCS2("empty-cells"), aEmptyCells, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFont(nsString& aFont) { - return GetPropertyValue("font", aFont); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font"), aFont); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFont(const nsString& aFont) { - return SetProperty("font", aFont, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font"), aFont, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontFamily(nsString& aFontFamily) { - return GetPropertyValue("font-family", aFontFamily); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-family"), aFontFamily); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontFamily(const nsString& aFontFamily) { - return SetProperty("font-family", aFontFamily, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-family"), aFontFamily, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontSize(nsString& aFontSize) { - return GetPropertyValue("font-size", aFontSize); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-size"), aFontSize); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontSize(const nsString& aFontSize) { - return SetProperty("font-size", aFontSize, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-size"), aFontSize, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontSizeAdjust(nsString& aFontSizeAdjust) { - return GetPropertyValue("font-size-adjust", aFontSizeAdjust); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-size-adjust"), aFontSizeAdjust); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontSizeAdjust(const nsString& aFontSizeAdjust) { - return SetProperty("font-size-adjust", aFontSizeAdjust, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-size-adjust"), aFontSizeAdjust, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontStretch(nsString& aFontStretch) { - return GetPropertyValue("font-stretch", aFontStretch); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-stretch"), aFontStretch); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontStretch(const nsString& aFontStretch) { - return SetProperty("font-stretch", aFontStretch, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-stretch"), aFontStretch, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontStyle(nsString& aFontStyle) { - return GetPropertyValue("font-style", aFontStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-style"), aFontStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontStyle(const nsString& aFontStyle) { - return SetProperty("font-style", aFontStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-style"), aFontStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontVariant(nsString& aFontVariant) { - return GetPropertyValue("font-variant", aFontVariant); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-variant"), aFontVariant); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontVariant(const nsString& aFontVariant) { - return SetProperty("font-variant", aFontVariant, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-variant"), aFontVariant, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontWeight(nsString& aFontWeight) { - return GetPropertyValue("font-weight", aFontWeight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-weight"), aFontWeight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontWeight(const nsString& aFontWeight) { - return SetProperty("font-weight", aFontWeight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-weight"), aFontWeight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetHeight(nsString& aHeight) { - return GetPropertyValue("height", aHeight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("height"), aHeight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetHeight(const nsString& aHeight) { - return SetProperty("height", aHeight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("height"), aHeight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetLeft(nsString& aLeft) { - return GetPropertyValue("left", aLeft); + return GetPropertyValue(NS_ConvertASCIItoUCS2("left"), aLeft); } NS_IMETHODIMP nsDOMCSSDeclaration::SetLeft(const nsString& aLeft) { - return SetProperty("left", aLeft, ""); + return SetProperty(NS_ConvertASCIItoUCS2("left"), aLeft, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetLetterSpacing(nsString& aLetterSpacing) { - return GetPropertyValue("letter-spacing", aLetterSpacing); + return GetPropertyValue(NS_ConvertASCIItoUCS2("letter-spacing"), aLetterSpacing); } NS_IMETHODIMP nsDOMCSSDeclaration::SetLetterSpacing(const nsString& aLetterSpacing) { - return SetProperty("letter-spacing", aLetterSpacing, ""); + return SetProperty(NS_ConvertASCIItoUCS2("letter-spacing"), aLetterSpacing, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetLineHeight(nsString& aLineHeight) { - return GetPropertyValue("line-height", aLineHeight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("line-height"), aLineHeight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetLineHeight(const nsString& aLineHeight) { - return SetProperty("line-height", aLineHeight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("line-height"), aLineHeight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetListStyle(nsString& aListStyle) { - return GetPropertyValue("list-style", aListStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("list-style"), aListStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetListStyle(const nsString& aListStyle) { - return SetProperty("list-style", aListStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("list-style"), aListStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetListStyleImage(nsString& aListStyleImage) { - return GetPropertyValue("list-style-image", aListStyleImage); + return GetPropertyValue(NS_ConvertASCIItoUCS2("list-style-image"), aListStyleImage); } NS_IMETHODIMP nsDOMCSSDeclaration::SetListStyleImage(const nsString& aListStyleImage) { - return SetProperty("list-style-image", aListStyleImage, ""); + return SetProperty(NS_ConvertASCIItoUCS2("list-style-image"), aListStyleImage, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetListStylePosition(nsString& aListStylePosition) { - return GetPropertyValue("list-style-position", aListStylePosition); + return GetPropertyValue(NS_ConvertASCIItoUCS2("list-style-position"), aListStylePosition); } NS_IMETHODIMP nsDOMCSSDeclaration::SetListStylePosition(const nsString& aListStylePosition) { - return SetProperty("list-style-position", aListStylePosition, ""); + return SetProperty(NS_ConvertASCIItoUCS2("list-style-position"), aListStylePosition, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetListStyleType(nsString& aListStyleType) { - return GetPropertyValue("list-style-type", aListStyleType); + return GetPropertyValue(NS_ConvertASCIItoUCS2("list-style-type"), aListStyleType); } NS_IMETHODIMP nsDOMCSSDeclaration::SetListStyleType(const nsString& aListStyleType) { - return SetProperty("list-style-type", aListStyleType, ""); + return SetProperty(NS_ConvertASCIItoUCS2("list-style-type"), aListStyleType, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMargin(nsString& aMargin) { - return GetPropertyValue("margin", aMargin); + return GetPropertyValue(NS_ConvertASCIItoUCS2("margin"), aMargin); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMargin(const nsString& aMargin) { - return SetProperty("margin", aMargin, ""); + return SetProperty(NS_ConvertASCIItoUCS2("margin"), aMargin, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarginTop(nsString& aMarginTop) { - return GetPropertyValue("margin-top", aMarginTop); + return GetPropertyValue(NS_ConvertASCIItoUCS2("margin-top"), aMarginTop); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarginTop(const nsString& aMarginTop) { - return SetProperty("margin-top", aMarginTop, ""); + return SetProperty(NS_ConvertASCIItoUCS2("margin-top"), aMarginTop, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarginRight(nsString& aMarginRight) { - return GetPropertyValue("margin-right", aMarginRight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("margin-right"), aMarginRight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarginRight(const nsString& aMarginRight) { - return SetProperty("margin-right", aMarginRight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("margin-right"), aMarginRight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarginBottom(nsString& aMarginBottom) { - return GetPropertyValue("margin-bottom", aMarginBottom); + return GetPropertyValue(NS_ConvertASCIItoUCS2("margin-bottom"), aMarginBottom); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarginBottom(const nsString& aMarginBottom) { - return SetProperty("margin-bottom", aMarginBottom, ""); + return SetProperty(NS_ConvertASCIItoUCS2("margin-bottom"), aMarginBottom, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarginLeft(nsString& aMarginLeft) { - return GetPropertyValue("margin-left", aMarginLeft); + return GetPropertyValue(NS_ConvertASCIItoUCS2("margin-left"), aMarginLeft); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarginLeft(const nsString& aMarginLeft) { - return SetProperty("margin-left", aMarginLeft, ""); + return SetProperty(NS_ConvertASCIItoUCS2("margin-left"), aMarginLeft, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarkerOffset(nsString& aMarkerOffset) { - return GetPropertyValue("marker-offset", aMarkerOffset); + return GetPropertyValue(NS_ConvertASCIItoUCS2("marker-offset"), aMarkerOffset); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarkerOffset(const nsString& aMarkerOffset) { - return SetProperty("marker-offset", aMarkerOffset, ""); + return SetProperty(NS_ConvertASCIItoUCS2("marker-offset"), aMarkerOffset, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarks(nsString& aMarks) { - return GetPropertyValue("marks", aMarks); + return GetPropertyValue(NS_ConvertASCIItoUCS2("marks"), aMarks); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarks(const nsString& aMarks) { - return SetProperty("marks", aMarks, ""); + return SetProperty(NS_ConvertASCIItoUCS2("marks"), aMarks, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMaxHeight(nsString& aMaxHeight) { - return GetPropertyValue("max-height", aMaxHeight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("max-height"), aMaxHeight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMaxHeight(const nsString& aMaxHeight) { - return SetProperty("max-height", aMaxHeight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("max-height"), aMaxHeight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMaxWidth(nsString& aMaxWidth) { - return GetPropertyValue("max-width", aMaxWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("max-width"), aMaxWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMaxWidth(const nsString& aMaxWidth) { - return SetProperty("max-width", aMaxWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("max-width"), aMaxWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMinHeight(nsString& aMinHeight) { - return GetPropertyValue("min-height", aMinHeight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("min-height"), aMinHeight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMinHeight(const nsString& aMinHeight) { - return SetProperty("min-height", aMinHeight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("min-height"), aMinHeight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMinWidth(nsString& aMinWidth) { - return GetPropertyValue("min-width", aMinWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("min-width"), aMinWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMinWidth(const nsString& aMinWidth) { - return SetProperty("min-width", aMinWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("min-width"), aMinWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOrphans(nsString& aOrphans) { - return GetPropertyValue("orphans", aOrphans); + return GetPropertyValue(NS_ConvertASCIItoUCS2("orphans"), aOrphans); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOrphans(const nsString& aOrphans) { - return SetProperty("orphans", aOrphans, ""); + return SetProperty(NS_ConvertASCIItoUCS2("orphans"), aOrphans, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutline(nsString& aOutline) { - return GetPropertyValue("outline", aOutline); + return GetPropertyValue(NS_ConvertASCIItoUCS2("outline"), aOutline); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutline(const nsString& aOutline) { - return SetProperty("outline", aOutline, ""); + return SetProperty(NS_ConvertASCIItoUCS2("outline"), aOutline, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineColor(nsString& aOutlineColor) { - return GetPropertyValue("outline-color", aOutlineColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-color"), aOutlineColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineColor(const nsString& aOutlineColor) { - return SetProperty("outline-color", aOutlineColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("outline-color"), aOutlineColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineStyle(nsString& aOutlineStyle) { - return GetPropertyValue("outline-style", aOutlineStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-style"), aOutlineStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineStyle(const nsString& aOutlineStyle) { - return SetProperty("outline-style", aOutlineStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("outline-style"), aOutlineStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineWidth(nsString& aOutlineWidth) { - return GetPropertyValue("outline-width", aOutlineWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-width"), aOutlineWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineWidth(const nsString& aOutlineWidth) { - return SetProperty("outline-width", aOutlineWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("outline-width"), aOutlineWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOverflow(nsString& aOverflow) { - return GetPropertyValue("overflow", aOverflow); + return GetPropertyValue(NS_ConvertASCIItoUCS2("overflow"), aOverflow); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOverflow(const nsString& aOverflow) { - return SetProperty("overflow", aOverflow, ""); + return SetProperty(NS_ConvertASCIItoUCS2("overflow"), aOverflow, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPadding(nsString& aPadding) { - return GetPropertyValue("padding", aPadding); + return GetPropertyValue(NS_ConvertASCIItoUCS2("padding"), aPadding); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPadding(const nsString& aPadding) { - return SetProperty("padding", aPadding, ""); + return SetProperty(NS_ConvertASCIItoUCS2("padding"), aPadding, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPaddingTop(nsString& aPaddingTop) { - return GetPropertyValue("padding-top", aPaddingTop); + return GetPropertyValue(NS_ConvertASCIItoUCS2("padding-top"), aPaddingTop); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPaddingTop(const nsString& aPaddingTop) { - return SetProperty("padding-top", aPaddingTop, ""); + return SetProperty(NS_ConvertASCIItoUCS2("padding-top"), aPaddingTop, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPaddingRight(nsString& aPaddingRight) { - return GetPropertyValue("padding-right", aPaddingRight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("padding-right"), aPaddingRight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPaddingRight(const nsString& aPaddingRight) { - return SetProperty("padding-right", aPaddingRight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("padding-right"), aPaddingRight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPaddingBottom(nsString& aPaddingBottom) { - return GetPropertyValue("padding-bottom", aPaddingBottom); + return GetPropertyValue(NS_ConvertASCIItoUCS2("padding-bottom"), aPaddingBottom); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPaddingBottom(const nsString& aPaddingBottom) { - return SetProperty("padding-bottom", aPaddingBottom, ""); + return SetProperty(NS_ConvertASCIItoUCS2("padding-bottom"), aPaddingBottom, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPaddingLeft(nsString& aPaddingLeft) { - return GetPropertyValue("padding-left", aPaddingLeft); + return GetPropertyValue(NS_ConvertASCIItoUCS2("padding-left"), aPaddingLeft); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPaddingLeft(const nsString& aPaddingLeft) { - return SetProperty("padding-left", aPaddingLeft, ""); + return SetProperty(NS_ConvertASCIItoUCS2("padding-left"), aPaddingLeft, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPage(nsString& aPage) { - return GetPropertyValue("page", aPage); + return GetPropertyValue(NS_ConvertASCIItoUCS2("page"), aPage); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPage(const nsString& aPage) { - return SetProperty("page", aPage, ""); + return SetProperty(NS_ConvertASCIItoUCS2("page"), aPage, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPageBreakAfter(nsString& aPageBreakAfter) { - return GetPropertyValue("page-break-after", aPageBreakAfter); + return GetPropertyValue(NS_ConvertASCIItoUCS2("page-break-after"), aPageBreakAfter); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPageBreakAfter(const nsString& aPageBreakAfter) { - return SetProperty("page-break-after", aPageBreakAfter, ""); + return SetProperty(NS_ConvertASCIItoUCS2("page-break-after"), aPageBreakAfter, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPageBreakBefore(nsString& aPageBreakBefore) { - return GetPropertyValue("page-break-before", aPageBreakBefore); + return GetPropertyValue(NS_ConvertASCIItoUCS2("page-break-before"), aPageBreakBefore); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPageBreakBefore(const nsString& aPageBreakBefore) { - return SetProperty("page-break-before", aPageBreakBefore, ""); + return SetProperty(NS_ConvertASCIItoUCS2("page-break-before"), aPageBreakBefore, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPageBreakInside(nsString& aPageBreakInside) { - return GetPropertyValue("page-break-inside", aPageBreakInside); + return GetPropertyValue(NS_ConvertASCIItoUCS2("page-break-inside"), aPageBreakInside); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPageBreakInside(const nsString& aPageBreakInside) { - return SetProperty("page-break-inside", aPageBreakInside, ""); + return SetProperty(NS_ConvertASCIItoUCS2("page-break-inside"), aPageBreakInside, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPause(nsString& aPause) { - return GetPropertyValue("pause", aPause); + return GetPropertyValue(NS_ConvertASCIItoUCS2("pause"), aPause); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPause(const nsString& aPause) { - return SetProperty("pause", aPause, ""); + return SetProperty(NS_ConvertASCIItoUCS2("pause"), aPause, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPauseAfter(nsString& aPauseAfter) { - return GetPropertyValue("pause-after", aPauseAfter); + return GetPropertyValue(NS_ConvertASCIItoUCS2("pause-after"), aPauseAfter); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPauseAfter(const nsString& aPauseAfter) { - return SetProperty("pause-after", aPauseAfter, ""); + return SetProperty(NS_ConvertASCIItoUCS2("pause-after"), aPauseAfter, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPauseBefore(nsString& aPauseBefore) { - return GetPropertyValue("pause-before", aPauseBefore); + return GetPropertyValue(NS_ConvertASCIItoUCS2("pause-before"), aPauseBefore); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPauseBefore(const nsString& aPauseBefore) { - return SetProperty("pause-before", aPauseBefore, ""); + return SetProperty(NS_ConvertASCIItoUCS2("pause-before"), aPauseBefore, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPitch(nsString& aPitch) { - return GetPropertyValue("pitch", aPitch); + return GetPropertyValue(NS_ConvertASCIItoUCS2("pitch"), aPitch); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPitch(const nsString& aPitch) { - return SetProperty("pitch", aPitch, ""); + return SetProperty(NS_ConvertASCIItoUCS2("pitch"), aPitch, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPitchRange(nsString& aPitchRange) { - return GetPropertyValue("pitch-range", aPitchRange); + return GetPropertyValue(NS_ConvertASCIItoUCS2("pitch-range"), aPitchRange); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPitchRange(const nsString& aPitchRange) { - return SetProperty("pitch-range", aPitchRange, ""); + return SetProperty(NS_ConvertASCIItoUCS2("pitch-range"), aPitchRange, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPlayDuring(nsString& aPlayDuring) { - return GetPropertyValue("play-during", aPlayDuring); + return GetPropertyValue(NS_ConvertASCIItoUCS2("play-during"), aPlayDuring); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPlayDuring(const nsString& aPlayDuring) { - return SetProperty("play-during", aPlayDuring, ""); + return SetProperty(NS_ConvertASCIItoUCS2("play-during"), aPlayDuring, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPosition(nsString& aPosition) { - return GetPropertyValue("position", aPosition); + return GetPropertyValue(NS_ConvertASCIItoUCS2("position"), aPosition); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPosition(const nsString& aPosition) { - return SetProperty("position", aPosition, ""); + return SetProperty(NS_ConvertASCIItoUCS2("position"), aPosition, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetQuotes(nsString& aQuotes) { - return GetPropertyValue("quotes", aQuotes); + return GetPropertyValue(NS_ConvertASCIItoUCS2("quotes"), aQuotes); } NS_IMETHODIMP nsDOMCSSDeclaration::SetQuotes(const nsString& aQuotes) { - return SetProperty("quotes", aQuotes, ""); + return SetProperty(NS_ConvertASCIItoUCS2("quotes"), aQuotes, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetRichness(nsString& aRichness) { - return GetPropertyValue("richness", aRichness); + return GetPropertyValue(NS_ConvertASCIItoUCS2("richness"), aRichness); } NS_IMETHODIMP nsDOMCSSDeclaration::SetRichness(const nsString& aRichness) { - return SetProperty("richness", aRichness, ""); + return SetProperty(NS_ConvertASCIItoUCS2("richness"), aRichness, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetRight(nsString& aRight) { - return GetPropertyValue("right", aRight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("right"), aRight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetRight(const nsString& aRight) { - return SetProperty("right", aRight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("right"), aRight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSize(nsString& aSize) { - return GetPropertyValue("size", aSize); + return GetPropertyValue(NS_ConvertASCIItoUCS2("size"), aSize); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSize(const nsString& aSize) { - return SetProperty("size", aSize, ""); + return SetProperty(NS_ConvertASCIItoUCS2("size"), aSize, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSpeak(nsString& aSpeak) { - return GetPropertyValue("speak", aSpeak); + return GetPropertyValue(NS_ConvertASCIItoUCS2("speak"), aSpeak); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSpeak(const nsString& aSpeak) { - return SetProperty("speak", aSpeak, ""); + return SetProperty(NS_ConvertASCIItoUCS2("speak"), aSpeak, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSpeakHeader(nsString& aSpeakHeader) { - return GetPropertyValue("speak-header", aSpeakHeader); + return GetPropertyValue(NS_ConvertASCIItoUCS2("speak-header"), aSpeakHeader); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSpeakHeader(const nsString& aSpeakHeader) { - return SetProperty("speak-header", aSpeakHeader, ""); + return SetProperty(NS_ConvertASCIItoUCS2("speak-header"), aSpeakHeader, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSpeakNumeral(nsString& aSpeakNumeral) { - return GetPropertyValue("speak-numeral", aSpeakNumeral); + return GetPropertyValue(NS_ConvertASCIItoUCS2("speak-numeral"), aSpeakNumeral); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSpeakNumeral(const nsString& aSpeakNumeral) { - return SetProperty("speak-numeral", aSpeakNumeral, ""); + return SetProperty(NS_ConvertASCIItoUCS2("speak-numeral"), aSpeakNumeral, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSpeakPunctuation(nsString& aSpeakPunctuation) { - return GetPropertyValue("speak-punctuation", aSpeakPunctuation); + return GetPropertyValue(NS_ConvertASCIItoUCS2("speak-punctuation"), aSpeakPunctuation); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSpeakPunctuation(const nsString& aSpeakPunctuation) { - return SetProperty("speak-punctuation", aSpeakPunctuation, ""); + return SetProperty(NS_ConvertASCIItoUCS2("speak-punctuation"), aSpeakPunctuation, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSpeechRate(nsString& aSpeechRate) { - return GetPropertyValue("speech-rate", aSpeechRate); + return GetPropertyValue(NS_ConvertASCIItoUCS2("speech-rate"), aSpeechRate); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSpeechRate(const nsString& aSpeechRate) { - return SetProperty("speech-rate", aSpeechRate, ""); + return SetProperty(NS_ConvertASCIItoUCS2("speech-rate"), aSpeechRate, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetStress(nsString& aStress) { - return GetPropertyValue("stress", aStress); + return GetPropertyValue(NS_ConvertASCIItoUCS2("stress"), aStress); } NS_IMETHODIMP nsDOMCSSDeclaration::SetStress(const nsString& aStress) { - return SetProperty("stress", aStress, ""); + return SetProperty(NS_ConvertASCIItoUCS2("stress"), aStress, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTableLayout(nsString& aTableLayout) { - return GetPropertyValue("table-layout", aTableLayout); + return GetPropertyValue(NS_ConvertASCIItoUCS2("table-layout"), aTableLayout); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTableLayout(const nsString& aTableLayout) { - return SetProperty("table-layout", aTableLayout, ""); + return SetProperty(NS_ConvertASCIItoUCS2("table-layout"), aTableLayout, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTextAlign(nsString& aTextAlign) { - return GetPropertyValue("text-align", aTextAlign); + return GetPropertyValue(NS_ConvertASCIItoUCS2("text-align"), aTextAlign); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTextAlign(const nsString& aTextAlign) { - return SetProperty("text-align", aTextAlign, ""); + return SetProperty(NS_ConvertASCIItoUCS2("text-align"), aTextAlign, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTextDecoration(nsString& aTextDecoration) { - return GetPropertyValue("text-decoration", aTextDecoration); + return GetPropertyValue(NS_ConvertASCIItoUCS2("text-decoration"), aTextDecoration); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTextDecoration(const nsString& aTextDecoration) { - return SetProperty("text-decoration", aTextDecoration, ""); + return SetProperty(NS_ConvertASCIItoUCS2("text-decoration"), aTextDecoration, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTextIndent(nsString& aTextIndent) { - return GetPropertyValue("text-indent", aTextIndent); + return GetPropertyValue(NS_ConvertASCIItoUCS2("text-indent"), aTextIndent); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTextIndent(const nsString& aTextIndent) { - return SetProperty("text-indent", aTextIndent, ""); + return SetProperty(NS_ConvertASCIItoUCS2("text-indent"), aTextIndent, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTextShadow(nsString& aTextShadow) { - return GetPropertyValue("text-shadow", aTextShadow); + return GetPropertyValue(NS_ConvertASCIItoUCS2("text-shadow"), aTextShadow); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTextShadow(const nsString& aTextShadow) { - return SetProperty("text-shadow", aTextShadow, ""); + return SetProperty(NS_ConvertASCIItoUCS2("text-shadow"), aTextShadow, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTextTransform(nsString& aTextTransform) { - return GetPropertyValue("text-transform", aTextTransform); + return GetPropertyValue(NS_ConvertASCIItoUCS2("text-transform"), aTextTransform); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTextTransform(const nsString& aTextTransform) { - return SetProperty("text-transform", aTextTransform, ""); + return SetProperty(NS_ConvertASCIItoUCS2("text-transform"), aTextTransform, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTop(nsString& aTop) { - return GetPropertyValue("top", aTop); + return GetPropertyValue(NS_ConvertASCIItoUCS2("top"), aTop); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTop(const nsString& aTop) { - return SetProperty("top", aTop, ""); + return SetProperty(NS_ConvertASCIItoUCS2("top"), aTop, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetUnicodeBidi(nsString& aUnicodeBidi) { - return GetPropertyValue("unicode-bidi", aUnicodeBidi); + return GetPropertyValue(NS_ConvertASCIItoUCS2("unicode-bidi"), aUnicodeBidi); } NS_IMETHODIMP nsDOMCSSDeclaration::SetUnicodeBidi(const nsString& aUnicodeBidi) { - return SetProperty("unicode-bidi", aUnicodeBidi, ""); + return SetProperty(NS_ConvertASCIItoUCS2("unicode-bidi"), aUnicodeBidi, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetVerticalAlign(nsString& aVerticalAlign) { - return GetPropertyValue("vertical-align", aVerticalAlign); + return GetPropertyValue(NS_ConvertASCIItoUCS2("vertical-align"), aVerticalAlign); } NS_IMETHODIMP nsDOMCSSDeclaration::SetVerticalAlign(const nsString& aVerticalAlign) { - return SetProperty("vertical-align", aVerticalAlign, ""); + return SetProperty(NS_ConvertASCIItoUCS2("vertical-align"), aVerticalAlign, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetVisibility(nsString& aVisibility) { - return GetPropertyValue("visibility", aVisibility); + return GetPropertyValue(NS_ConvertASCIItoUCS2("visibility"), aVisibility); } NS_IMETHODIMP nsDOMCSSDeclaration::SetVisibility(const nsString& aVisibility) { - return SetProperty("visibility", aVisibility, ""); + return SetProperty(NS_ConvertASCIItoUCS2("visibility"), aVisibility, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetVoiceFamily(nsString& aVoiceFamily) { - return GetPropertyValue("voice-family", aVoiceFamily); + return GetPropertyValue(NS_ConvertASCIItoUCS2("voice-family"), aVoiceFamily); } NS_IMETHODIMP nsDOMCSSDeclaration::SetVoiceFamily(const nsString& aVoiceFamily) { - return SetProperty("voice-family", aVoiceFamily, ""); + return SetProperty(NS_ConvertASCIItoUCS2("voice-family"), aVoiceFamily, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetVolume(nsString& aVolume) { - return GetPropertyValue("volume", aVolume); + return GetPropertyValue(NS_ConvertASCIItoUCS2("volume"), aVolume); } NS_IMETHODIMP nsDOMCSSDeclaration::SetVolume(const nsString& aVolume) { - return SetProperty("volume", aVolume, ""); + return SetProperty(NS_ConvertASCIItoUCS2("volume"), aVolume, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetWhiteSpace(nsString& aWhiteSpace) { - return GetPropertyValue("white-space", aWhiteSpace); + return GetPropertyValue(NS_ConvertASCIItoUCS2("white-space"), aWhiteSpace); } NS_IMETHODIMP nsDOMCSSDeclaration::SetWhiteSpace(const nsString& aWhiteSpace) { - return SetProperty("white-space", aWhiteSpace, ""); + return SetProperty(NS_ConvertASCIItoUCS2("white-space"), aWhiteSpace, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetWidows(nsString& aWidows) { - return GetPropertyValue("widows", aWidows); + return GetPropertyValue(NS_ConvertASCIItoUCS2("widows"), aWidows); } NS_IMETHODIMP nsDOMCSSDeclaration::SetWidows(const nsString& aWidows) { - return SetProperty("widows", aWidows, ""); + return SetProperty(NS_ConvertASCIItoUCS2("widows"), aWidows, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetWidth(nsString& aWidth) { - return GetPropertyValue("width", aWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("width"), aWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetWidth(const nsString& aWidth) { - return SetProperty("width", aWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("width"), aWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetWordSpacing(nsString& aWordSpacing) { - return GetPropertyValue("word-spacing", aWordSpacing); + return GetPropertyValue(NS_ConvertASCIItoUCS2("word-spacing"), aWordSpacing); } NS_IMETHODIMP nsDOMCSSDeclaration::SetWordSpacing(const nsString& aWordSpacing) { - return SetProperty("word-spacing", aWordSpacing, ""); + return SetProperty(NS_ConvertASCIItoUCS2("word-spacing"), aWordSpacing, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetZIndex(nsString& aZIndex) { - return GetPropertyValue("z-index", aZIndex); + return GetPropertyValue(NS_ConvertASCIItoUCS2("z-index"), aZIndex); } NS_IMETHODIMP nsDOMCSSDeclaration::SetZIndex(const nsString& aZIndex) { - return SetProperty("z-index", aZIndex, ""); + return SetProperty(NS_ConvertASCIItoUCS2("z-index"), aZIndex, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOpacity(nsString& aOpacity) { - return GetPropertyValue("opacity", aOpacity); + return GetPropertyValue(NS_ConvertASCIItoUCS2("opacity"), aOpacity); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOpacity(const nsString& aOpacity) { - return SetProperty("opacity", aOpacity, ""); + return SetProperty(NS_ConvertASCIItoUCS2("opacity"), aOpacity, nsAutoString()); } diff --git a/mozilla/layout/html/style/src/nsHTMLAttributes.cpp b/mozilla/layout/html/style/src/nsHTMLAttributes.cpp index 9cc04451b47..8a902412cfb 100644 --- a/mozilla/layout/html/style/src/nsHTMLAttributes.cpp +++ b/mozilla/layout/html/style/src/nsHTMLAttributes.cpp @@ -132,12 +132,12 @@ struct HTMLAttribute { mAttribute->ToString(temp); aBuffer.Append(temp); if (eHTMLUnit_Null != mValue.GetUnit()) { - aBuffer.Append(" = "); + aBuffer.AppendWithConversion(" = "); mValue.AppendToString(aBuffer); } } else { - aBuffer.Append("null"); + aBuffer.AppendWithConversion("null"); } } @@ -1514,7 +1514,7 @@ HTMLAttributesImpl::List(FILE* out, PRInt32 aIndent) const nsAutoString buffer; mAttrNames[index]->ToString(buffer); if (eHTMLUnit_Null != value.GetUnit()) { - buffer.Append(" = "); + buffer.AppendWithConversion(" = "); value.AppendToString(buffer); } fputs(buffer, out); diff --git a/mozilla/layout/style/nsCSSDeclaration.cpp b/mozilla/layout/style/nsCSSDeclaration.cpp index a1dfb4c7884..8b97a6ede95 100644 --- a/mozilla/layout/style/nsCSSDeclaration.cpp +++ b/mozilla/layout/style/nsCSSDeclaration.cpp @@ -3458,7 +3458,7 @@ CSSDeclarationImpl::GetValue(nsCSSProperty aProperty, nsString& aValue) case eCSSProperty_size: if (HAS_VALUE(mPage,mSizeWidth) && HAS_VALUE(mPage,mSizeHeight)) { AppendValueToString(eCSSProperty_size_width, aValue); - aValue.Append(' '); + aValue.AppendWithConversion(' '); AppendValueToString(eCSSProperty_size_height, aValue); } break; diff --git a/mozilla/layout/style/nsCSSStruct.cpp b/mozilla/layout/style/nsCSSStruct.cpp index a1dfb4c7884..8b97a6ede95 100644 --- a/mozilla/layout/style/nsCSSStruct.cpp +++ b/mozilla/layout/style/nsCSSStruct.cpp @@ -3458,7 +3458,7 @@ CSSDeclarationImpl::GetValue(nsCSSProperty aProperty, nsString& aValue) case eCSSProperty_size: if (HAS_VALUE(mPage,mSizeWidth) && HAS_VALUE(mPage,mSizeHeight)) { AppendValueToString(eCSSProperty_size_width, aValue); - aValue.Append(' '); + aValue.AppendWithConversion(' '); AppendValueToString(eCSSProperty_size_height, aValue); } break; diff --git a/mozilla/layout/style/nsCSSStyleSheet.cpp b/mozilla/layout/style/nsCSSStyleSheet.cpp index 464cf03d786..3790b1044e7 100644 --- a/mozilla/layout/style/nsCSSStyleSheet.cpp +++ b/mozilla/layout/style/nsCSSStyleSheet.cpp @@ -2372,12 +2372,12 @@ static PRBool ValueIncludes(const nsString& aValueList, const nsString& aValue, if (start < end) { if (aCaseSensitive) { - if (aValue.Equals(value, start)) { + if (nsCRT::strcmp(value, start)) { return PR_TRUE; } } else { - if (aValue.EqualsIgnoreCase(value, start)) { + if (nsCRT::strcasecmp(value, start)) { return PR_TRUE; } } @@ -2413,12 +2413,12 @@ static PRBool ValueDashMatch(const nsString& aValueList, const nsString& aValue, if (start < end) { if (aCaseSensitive) { - if (aValue.Equals(value, start)) { + if (nsCRT::strcmp(value, start)) { return PR_TRUE; } } else { - if (aValue.EqualsIgnoreCase(value, start)) { + if (nsCRT::strcasecmp(value, start)) { return PR_TRUE; } } diff --git a/mozilla/layout/style/nsCSSValue.cpp b/mozilla/layout/style/nsCSSValue.cpp index 4c26d08c8b1..945e64b1ec2 100644 --- a/mozilla/layout/style/nsCSSValue.cpp +++ b/mozilla/layout/style/nsCSSValue.cpp @@ -283,93 +283,93 @@ void nsCSSValue::AppendToString(nsString& aBuffer, nsCSSProperty aPropID) const } if (-1 < aPropID) { - aBuffer.Append(nsCSSProps::GetStringValue(aPropID)); - aBuffer.Append(": "); + aBuffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID)); + aBuffer.AppendWithConversion(": "); } if ((eCSSUnit_String <= mUnit) && (mUnit <= eCSSUnit_Counters)) { switch (mUnit) { - case eCSSUnit_URL: aBuffer.Append("url("); break; - case eCSSUnit_Attr: aBuffer.Append("attr("); break; - case eCSSUnit_Counter: aBuffer.Append("counter("); break; - case eCSSUnit_Counters: aBuffer.Append("counters("); break; + case eCSSUnit_URL: aBuffer.AppendWithConversion("url("); break; + case eCSSUnit_Attr: aBuffer.AppendWithConversion("attr("); break; + case eCSSUnit_Counter: aBuffer.AppendWithConversion("counter("); break; + case eCSSUnit_Counters: aBuffer.AppendWithConversion("counters("); break; default: break; } if (nsnull != mValue.mString) { - aBuffer.Append('"'); + aBuffer.AppendWithConversion('"'); aBuffer.Append(*(mValue.mString)); - aBuffer.Append('"'); + aBuffer.AppendWithConversion('"'); } else { - aBuffer.Append("null str"); + aBuffer.AppendWithConversion("null str"); } } else if ((eCSSUnit_Integer <= mUnit) && (mUnit <= eCSSUnit_Enumerated)) { - aBuffer.Append(mValue.mInt, 10); - aBuffer.Append("[0x"); - aBuffer.Append(mValue.mInt, 16); - aBuffer.Append(']'); + aBuffer.AppendInt(mValue.mInt, 10); + aBuffer.AppendWithConversion("[0x"); + aBuffer.AppendInt(mValue.mInt, 16); + aBuffer.AppendWithConversion(']'); } else if (eCSSUnit_Color == mUnit){ - aBuffer.Append("(0x"); - aBuffer.Append(NS_GET_R(mValue.mColor), 16); - aBuffer.Append(" 0x"); - aBuffer.Append(NS_GET_G(mValue.mColor), 16); - aBuffer.Append(" 0x"); - aBuffer.Append(NS_GET_B(mValue.mColor), 16); - aBuffer.Append(" 0x"); - aBuffer.Append(NS_GET_A(mValue.mColor), 16); - aBuffer.Append(')'); + aBuffer.AppendWithConversion("(0x"); + aBuffer.AppendInt(NS_GET_R(mValue.mColor), 16); + aBuffer.AppendWithConversion(" 0x"); + aBuffer.AppendInt(NS_GET_G(mValue.mColor), 16); + aBuffer.AppendWithConversion(" 0x"); + aBuffer.AppendInt(NS_GET_B(mValue.mColor), 16); + aBuffer.AppendWithConversion(" 0x"); + aBuffer.AppendInt(NS_GET_A(mValue.mColor), 16); + aBuffer.AppendWithConversion(')'); } else if (eCSSUnit_Percent == mUnit) { - aBuffer.Append(mValue.mFloat * 100.0f); + aBuffer.AppendFloat(mValue.mFloat * 100.0f); } else if (eCSSUnit_Percent < mUnit) { - aBuffer.Append(mValue.mFloat); + aBuffer.AppendFloat(mValue.mFloat); } switch (mUnit) { case eCSSUnit_Null: break; - case eCSSUnit_Auto: aBuffer.Append("auto"); break; - case eCSSUnit_Inherit: aBuffer.Append("inherit"); break; - case eCSSUnit_None: aBuffer.Append("none"); break; - case eCSSUnit_Normal: aBuffer.Append("normal"); break; + case eCSSUnit_Auto: aBuffer.AppendWithConversion("auto"); break; + case eCSSUnit_Inherit: aBuffer.AppendWithConversion("inherit"); break; + case eCSSUnit_None: aBuffer.AppendWithConversion("none"); break; + case eCSSUnit_Normal: aBuffer.AppendWithConversion("normal"); break; case eCSSUnit_String: break; case eCSSUnit_URL: case eCSSUnit_Attr: case eCSSUnit_Counter: - case eCSSUnit_Counters: aBuffer.Append(')'); break; - case eCSSUnit_Integer: aBuffer.Append("int"); break; - case eCSSUnit_Enumerated: aBuffer.Append("enum"); break; - case eCSSUnit_Color: aBuffer.Append("rbga"); break; - case eCSSUnit_Percent: aBuffer.Append("%"); break; - case eCSSUnit_Number: aBuffer.Append("#"); break; - case eCSSUnit_Inch: aBuffer.Append("in"); break; - case eCSSUnit_Foot: aBuffer.Append("ft"); break; - case eCSSUnit_Mile: aBuffer.Append("mi"); break; - case eCSSUnit_Millimeter: aBuffer.Append("mm"); break; - case eCSSUnit_Centimeter: aBuffer.Append("cm"); break; - case eCSSUnit_Meter: aBuffer.Append("m"); break; - case eCSSUnit_Kilometer: aBuffer.Append("km"); break; - case eCSSUnit_Point: aBuffer.Append("pt"); break; - case eCSSUnit_Pica: aBuffer.Append("pc"); break; - case eCSSUnit_Didot: aBuffer.Append("dt"); break; - case eCSSUnit_Cicero: aBuffer.Append("cc"); break; - case eCSSUnit_EM: aBuffer.Append("em"); break; - case eCSSUnit_EN: aBuffer.Append("en"); break; - case eCSSUnit_XHeight: aBuffer.Append("ex"); break; - case eCSSUnit_CapHeight: aBuffer.Append("cap"); break; - case eCSSUnit_Char: aBuffer.Append("ch"); break; - case eCSSUnit_Pixel: aBuffer.Append("px"); break; - case eCSSUnit_Degree: aBuffer.Append("deg"); break; - case eCSSUnit_Grad: aBuffer.Append("grad"); break; - case eCSSUnit_Radian: aBuffer.Append("rad"); break; - case eCSSUnit_Hertz: aBuffer.Append("Hz"); break; - case eCSSUnit_Kilohertz: aBuffer.Append("kHz"); break; - case eCSSUnit_Seconds: aBuffer.Append("s"); break; - case eCSSUnit_Milliseconds: aBuffer.Append("ms"); break; + case eCSSUnit_Counters: aBuffer.AppendWithConversion(')'); break; + case eCSSUnit_Integer: aBuffer.AppendWithConversion("int"); break; + case eCSSUnit_Enumerated: aBuffer.AppendWithConversion("enum"); break; + case eCSSUnit_Color: aBuffer.AppendWithConversion("rbga"); break; + case eCSSUnit_Percent: aBuffer.AppendWithConversion("%"); break; + case eCSSUnit_Number: aBuffer.AppendWithConversion("#"); break; + case eCSSUnit_Inch: aBuffer.AppendWithConversion("in"); break; + case eCSSUnit_Foot: aBuffer.AppendWithConversion("ft"); break; + case eCSSUnit_Mile: aBuffer.AppendWithConversion("mi"); break; + case eCSSUnit_Millimeter: aBuffer.AppendWithConversion("mm"); break; + case eCSSUnit_Centimeter: aBuffer.AppendWithConversion("cm"); break; + case eCSSUnit_Meter: aBuffer.AppendWithConversion("m"); break; + case eCSSUnit_Kilometer: aBuffer.AppendWithConversion("km"); break; + case eCSSUnit_Point: aBuffer.AppendWithConversion("pt"); break; + case eCSSUnit_Pica: aBuffer.AppendWithConversion("pc"); break; + case eCSSUnit_Didot: aBuffer.AppendWithConversion("dt"); break; + case eCSSUnit_Cicero: aBuffer.AppendWithConversion("cc"); break; + case eCSSUnit_EM: aBuffer.AppendWithConversion("em"); break; + case eCSSUnit_EN: aBuffer.AppendWithConversion("en"); break; + case eCSSUnit_XHeight: aBuffer.AppendWithConversion("ex"); break; + case eCSSUnit_CapHeight: aBuffer.AppendWithConversion("cap"); break; + case eCSSUnit_Char: aBuffer.AppendWithConversion("ch"); break; + case eCSSUnit_Pixel: aBuffer.AppendWithConversion("px"); break; + case eCSSUnit_Degree: aBuffer.AppendWithConversion("deg"); break; + case eCSSUnit_Grad: aBuffer.AppendWithConversion("grad"); break; + case eCSSUnit_Radian: aBuffer.AppendWithConversion("rad"); break; + case eCSSUnit_Hertz: aBuffer.AppendWithConversion("Hz"); break; + case eCSSUnit_Kilohertz: aBuffer.AppendWithConversion("kHz"); break; + case eCSSUnit_Seconds: aBuffer.AppendWithConversion("s"); break; + case eCSSUnit_Milliseconds: aBuffer.AppendWithConversion("ms"); break; } - aBuffer.Append(' '); + aBuffer.AppendWithConversion(' '); } void nsCSSValue::ToString(nsString& aBuffer, nsCSSProperty aPropID) const diff --git a/mozilla/layout/style/nsDOMCSSDeclaration.cpp b/mozilla/layout/style/nsDOMCSSDeclaration.cpp index 30b5f752858..81711ce80c4 100644 --- a/mozilla/layout/style/nsDOMCSSDeclaration.cpp +++ b/mozilla/layout/style/nsDOMCSSDeclaration.cpp @@ -188,7 +188,7 @@ nsDOMCSSDeclaration::GetPropertyPriority(const nsString& aPropertyName, } if ((NS_OK == result) && isImportant) { - aReturn.Assign("!important"); + aReturn.AssignWithConversion("!important"); } else { aReturn.SetLength(0); @@ -204,8 +204,8 @@ nsDOMCSSDeclaration::SetProperty(const nsString& aPropertyName, { nsAutoString declString; - declString=aPropertyName; - declString.Append(":"); + declString.Assign(aPropertyName); + declString.AppendWithConversion(":"); declString.Append(aValue); declString.Append(aPriority); @@ -215,1488 +215,1488 @@ nsDOMCSSDeclaration::SetProperty(const nsString& aPropertyName, NS_IMETHODIMP nsDOMCSSDeclaration::GetAzimuth(nsString& aAzimuth) { - return GetPropertyValue("azimuth", aAzimuth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("azimuth"), aAzimuth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetAzimuth(const nsString& aAzimuth) { - return SetProperty("azimuth", aAzimuth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("azimuth"), aAzimuth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackground(nsString& aBackground) { - return GetPropertyValue("background", aBackground); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background"), aBackground); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackground(const nsString& aBackground) { - return SetProperty("background", aBackground, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background"), aBackground, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackgroundAttachment(nsString& aBackgroundAttachment) { - return GetPropertyValue("background-attachment", aBackgroundAttachment); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background-attachment"), aBackgroundAttachment); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackgroundAttachment(const nsString& aBackgroundAttachment) { - return SetProperty("background-attachment", aBackgroundAttachment, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background-attachment"), aBackgroundAttachment, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackgroundColor(nsString& aBackgroundColor) { - return GetPropertyValue("background-color", aBackgroundColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background-color"), aBackgroundColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackgroundColor(const nsString& aBackgroundColor) { - return SetProperty("background-color", aBackgroundColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background-color"), aBackgroundColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackgroundImage(nsString& aBackgroundImage) { - return GetPropertyValue("background-image", aBackgroundImage); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background-image"), aBackgroundImage); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackgroundImage(const nsString& aBackgroundImage) { - return SetProperty("background-image", aBackgroundImage, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background-image"), aBackgroundImage, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackgroundPosition(nsString& aBackgroundPosition) { - return GetPropertyValue("background-position", aBackgroundPosition); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background-position"), aBackgroundPosition); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackgroundPosition(const nsString& aBackgroundPosition) { - return SetProperty("background-position", aBackgroundPosition, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background-position"), aBackgroundPosition, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBackgroundRepeat(nsString& aBackgroundRepeat) { - return GetPropertyValue("background-repeat", aBackgroundRepeat); + return GetPropertyValue(NS_ConvertASCIItoUCS2("background-repeat"), aBackgroundRepeat); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBackgroundRepeat(const nsString& aBackgroundRepeat) { - return SetProperty("background-repeat", aBackgroundRepeat, ""); + return SetProperty(NS_ConvertASCIItoUCS2("background-repeat"), aBackgroundRepeat, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBehavior(nsString& aBehavior) { - return GetPropertyValue("behavior", aBehavior); + return GetPropertyValue(NS_ConvertASCIItoUCS2("behavior"), aBehavior); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBehavior(const nsString& aBehavior) { - return SetProperty("behavior", aBehavior, ""); + return SetProperty(NS_ConvertASCIItoUCS2("behavior"), aBehavior, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorder(nsString& aBorder) { - return GetPropertyValue("border", aBorder); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border"), aBorder); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorder(const nsString& aBorder) { - return SetProperty("border", aBorder, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border"), aBorder, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderCollapse(nsString& aBorderCollapse) { - return GetPropertyValue("border-collapse", aBorderCollapse); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-collapse"), aBorderCollapse); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderCollapse(const nsString& aBorderCollapse) { - return SetProperty("border-collapse", aBorderCollapse, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-collapse"), aBorderCollapse, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderColor(nsString& aBorderColor) { - return GetPropertyValue("border-color", aBorderColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-color"), aBorderColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderColor(const nsString& aBorderColor) { - return SetProperty("border-color", aBorderColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-color"), aBorderColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderSpacing(nsString& aBorderSpacing) { - return GetPropertyValue("border-spacing", aBorderSpacing); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-spacing"), aBorderSpacing); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderSpacing(const nsString& aBorderSpacing) { - return SetProperty("border-spacing", aBorderSpacing, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-spacing"), aBorderSpacing, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderStyle(nsString& aBorderStyle) { - return GetPropertyValue("border-style", aBorderStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-style"), aBorderStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderStyle(const nsString& aBorderStyle) { - return SetProperty("border-style", aBorderStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-style"), aBorderStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderTop(nsString& aBorderTop) { - return GetPropertyValue("border-top", aBorderTop); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-top"), aBorderTop); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderTop(const nsString& aBorderTop) { - return SetProperty("border-top", aBorderTop, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-top"), aBorderTop, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderRight(nsString& aBorderRight) { - return GetPropertyValue("border-right", aBorderRight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-right"), aBorderRight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderRight(const nsString& aBorderRight) { - return SetProperty("border-right", aBorderRight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-right"), aBorderRight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderBottom(nsString& aBorderBottom) { - return GetPropertyValue("border-bottom", aBorderBottom); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-bottom"), aBorderBottom); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderBottom(const nsString& aBorderBottom) { - return SetProperty("border-bottom", aBorderBottom, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-bottom"), aBorderBottom, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderLeft(nsString& aBorderLeft) { - return GetPropertyValue("border-left", aBorderLeft); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-left"), aBorderLeft); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderLeft(const nsString& aBorderLeft) { - return SetProperty("border-left", aBorderLeft, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-left"), aBorderLeft, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderTopColor(nsString& aBorderTopColor) { - return GetPropertyValue("border-top-color", aBorderTopColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-top-color"), aBorderTopColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderTopColor(const nsString& aBorderTopColor) { - return SetProperty("border-top-color", aBorderTopColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-top-color"), aBorderTopColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderRightColor(nsString& aBorderRightColor) { - return GetPropertyValue("border-right-color", aBorderRightColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-right-color"), aBorderRightColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderRightColor(const nsString& aBorderRightColor) { - return SetProperty("border-right-color", aBorderRightColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-right-color"), aBorderRightColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderBottomColor(nsString& aBorderBottomColor) { - return GetPropertyValue("border-bottom-color", aBorderBottomColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-bottom-color"), aBorderBottomColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderBottomColor(const nsString& aBorderBottomColor) { - return SetProperty("border-bottom-color", aBorderBottomColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-bottom-color"), aBorderBottomColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderLeftColor(nsString& aBorderLeftColor) { - return GetPropertyValue("border-left-color", aBorderLeftColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-left-color"), aBorderLeftColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderLeftColor(const nsString& aBorderLeftColor) { - return SetProperty("border-left-color", aBorderLeftColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-left-color"), aBorderLeftColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderTopStyle(nsString& aBorderTopStyle) { - return GetPropertyValue("border-top-style", aBorderTopStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-top-style"), aBorderTopStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderTopStyle(const nsString& aBorderTopStyle) { - return SetProperty("border-top-style", aBorderTopStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-top-style"), aBorderTopStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderRightStyle(nsString& aBorderRightStyle) { - return GetPropertyValue("border-right-style", aBorderRightStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-right-style"), aBorderRightStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderRightStyle(const nsString& aBorderRightStyle) { - return SetProperty("border-right-style", aBorderRightStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-right-style"), aBorderRightStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderBottomStyle(nsString& aBorderBottomStyle) { - return GetPropertyValue("border-bottom-style", aBorderBottomStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-bottom-style"), aBorderBottomStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderBottomStyle(const nsString& aBorderBottomStyle) { - return SetProperty("border-bottom-style", aBorderBottomStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-bottom-style"), aBorderBottomStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderLeftStyle(nsString& aBorderLeftStyle) { - return GetPropertyValue("border-left-style", aBorderLeftStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-left-style"), aBorderLeftStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderLeftStyle(const nsString& aBorderLeftStyle) { - return SetProperty("border-left-style", aBorderLeftStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-left-style"), aBorderLeftStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderTopWidth(nsString& aBorderTopWidth) { - return GetPropertyValue("border-top-width", aBorderTopWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-top-width"), aBorderTopWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderTopWidth(const nsString& aBorderTopWidth) { - return SetProperty("border-top-width", aBorderTopWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-top-width"), aBorderTopWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderRightWidth(nsString& aBorderRightWidth) { - return GetPropertyValue("border-right-width", aBorderRightWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-right-width"), aBorderRightWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderRightWidth(const nsString& aBorderRightWidth) { - return SetProperty("border-right-width", aBorderRightWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-right-width"), aBorderRightWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderBottomWidth(nsString& aBorderBottomWidth) { - return GetPropertyValue("border-bottom-width", aBorderBottomWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-bottom-width"), aBorderBottomWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderBottomWidth(const nsString& aBorderBottomWidth) { - return SetProperty("border-bottom-width", aBorderBottomWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-bottom-width"), aBorderBottomWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderLeftWidth(nsString& aBorderLeftWidth) { - return GetPropertyValue("border-left-width", aBorderLeftWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-left-width"), aBorderLeftWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderLeftWidth(const nsString& aBorderLeftWidth) { - return SetProperty("border-left-width", aBorderLeftWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-left-width"), aBorderLeftWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBorderWidth(nsString& aBorderWidth) { - return GetPropertyValue("border-width", aBorderWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("border-width"), aBorderWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBorderWidth(const nsString& aBorderWidth) { - return SetProperty("border-width", aBorderWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("border-width"), aBorderWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetBottom(nsString& aBottom) { - return GetPropertyValue("bottom", aBottom); + return GetPropertyValue(NS_ConvertASCIItoUCS2("bottom"), aBottom); } NS_IMETHODIMP nsDOMCSSDeclaration::SetBottom(const nsString& aBottom) { - return SetProperty("bottom", aBottom, ""); + return SetProperty(NS_ConvertASCIItoUCS2("bottom"), aBottom, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCaptionSide(nsString& aCaptionSide) { - return GetPropertyValue("caption-side", aCaptionSide); + return GetPropertyValue(NS_ConvertASCIItoUCS2("caption-side"), aCaptionSide); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCaptionSide(const nsString& aCaptionSide) { - return SetProperty("caption-side", aCaptionSide, ""); + return SetProperty(NS_ConvertASCIItoUCS2("caption-side"), aCaptionSide, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetClear(nsString& aClear) { - return GetPropertyValue("clear", aClear); + return GetPropertyValue(NS_ConvertASCIItoUCS2("clear"), aClear); } NS_IMETHODIMP nsDOMCSSDeclaration::SetClear(const nsString& aClear) { - return SetProperty("clear", aClear, ""); + return SetProperty(NS_ConvertASCIItoUCS2("clear"), aClear, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetClip(nsString& aClip) { - return GetPropertyValue("clip", aClip); + return GetPropertyValue(NS_ConvertASCIItoUCS2("clip"), aClip); } NS_IMETHODIMP nsDOMCSSDeclaration::SetClip(const nsString& aClip) { - return SetProperty("clip", aClip, ""); + return SetProperty(NS_ConvertASCIItoUCS2("clip"), aClip, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetColor(nsString& aColor) { - return GetPropertyValue("color", aColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("color"), aColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetColor(const nsString& aColor) { - return SetProperty("color", aColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("color"), aColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetContent(nsString& aContent) { - return GetPropertyValue("content", aContent); + return GetPropertyValue(NS_ConvertASCIItoUCS2("content"), aContent); } NS_IMETHODIMP nsDOMCSSDeclaration::SetContent(const nsString& aContent) { - return SetProperty("content", aContent, ""); + return SetProperty(NS_ConvertASCIItoUCS2("content"), aContent, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCounterIncrement(nsString& aCounterIncrement) { - return GetPropertyValue("counter-increment", aCounterIncrement); + return GetPropertyValue(NS_ConvertASCIItoUCS2("counter-increment"), aCounterIncrement); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCounterIncrement(const nsString& aCounterIncrement) { - return SetProperty("counter-increment", aCounterIncrement, ""); + return SetProperty(NS_ConvertASCIItoUCS2("counter-increment"), aCounterIncrement, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCounterReset(nsString& aCounterReset) { - return GetPropertyValue("counter-reset", aCounterReset); + return GetPropertyValue(NS_ConvertASCIItoUCS2("counter-reset"), aCounterReset); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCounterReset(const nsString& aCounterReset) { - return SetProperty("counter-reset", aCounterReset, ""); + return SetProperty(NS_ConvertASCIItoUCS2("counter-reset"), aCounterReset, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCssFloat(nsString& aCssFloat) { - return GetPropertyValue("float", aCssFloat); + return GetPropertyValue(NS_ConvertASCIItoUCS2("float"), aCssFloat); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCssFloat(const nsString& aCssFloat) { - return SetProperty("float", aCssFloat, ""); + return SetProperty(NS_ConvertASCIItoUCS2("float"), aCssFloat, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCue(nsString& aCue) { - return GetPropertyValue("cue", aCue); + return GetPropertyValue(NS_ConvertASCIItoUCS2("cue"), aCue); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCue(const nsString& aCue) { - return SetProperty("cue", aCue, ""); + return SetProperty(NS_ConvertASCIItoUCS2("cue"), aCue, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCueAfter(nsString& aCueAfter) { - return GetPropertyValue("cue-after", aCueAfter); + return GetPropertyValue(NS_ConvertASCIItoUCS2("cue-after"), aCueAfter); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCueAfter(const nsString& aCueAfter) { - return SetProperty("cue-after", aCueAfter, ""); + return SetProperty(NS_ConvertASCIItoUCS2("cue-after"), aCueAfter, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCueBefore(nsString& aCueBefore) { - return GetPropertyValue("cue-before", aCueBefore); + return GetPropertyValue(NS_ConvertASCIItoUCS2("cue-before"), aCueBefore); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCueBefore(const nsString& aCueBefore) { - return SetProperty("cue-before", aCueBefore, ""); + return SetProperty(NS_ConvertASCIItoUCS2("cue-before"), aCueBefore, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetCursor(nsString& aCursor) { - return GetPropertyValue("cursor", aCursor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("cursor"), aCursor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetCursor(const nsString& aCursor) { - return SetProperty("cursor", aCursor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("cursor"), aCursor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetDirection(nsString& aDirection) { - return GetPropertyValue("direction", aDirection); + return GetPropertyValue(NS_ConvertASCIItoUCS2("direction"), aDirection); } NS_IMETHODIMP nsDOMCSSDeclaration::SetDirection(const nsString& aDirection) { - return SetProperty("direction", aDirection, ""); + return SetProperty(NS_ConvertASCIItoUCS2("direction"), aDirection, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetDisplay(nsString& aDisplay) { - return GetPropertyValue("display", aDisplay); + return GetPropertyValue(NS_ConvertASCIItoUCS2("display"), aDisplay); } NS_IMETHODIMP nsDOMCSSDeclaration::SetDisplay(const nsString& aDisplay) { - return SetProperty("display", aDisplay, ""); + return SetProperty(NS_ConvertASCIItoUCS2("display"), aDisplay, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetElevation(nsString& aElevation) { - return GetPropertyValue("elevation", aElevation); + return GetPropertyValue(NS_ConvertASCIItoUCS2("elevation"), aElevation); } NS_IMETHODIMP nsDOMCSSDeclaration::SetElevation(const nsString& aElevation) { - return SetProperty("elevation", aElevation, ""); + return SetProperty(NS_ConvertASCIItoUCS2("elevation"), aElevation, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetEmptyCells(nsString& aEmptyCells) { - return GetPropertyValue("empty-cells", aEmptyCells); + return GetPropertyValue(NS_ConvertASCIItoUCS2("empty-cells"), aEmptyCells); } NS_IMETHODIMP nsDOMCSSDeclaration::SetEmptyCells(const nsString& aEmptyCells) { - return SetProperty("empty-cells", aEmptyCells, ""); + return SetProperty(NS_ConvertASCIItoUCS2("empty-cells"), aEmptyCells, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFont(nsString& aFont) { - return GetPropertyValue("font", aFont); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font"), aFont); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFont(const nsString& aFont) { - return SetProperty("font", aFont, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font"), aFont, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontFamily(nsString& aFontFamily) { - return GetPropertyValue("font-family", aFontFamily); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-family"), aFontFamily); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontFamily(const nsString& aFontFamily) { - return SetProperty("font-family", aFontFamily, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-family"), aFontFamily, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontSize(nsString& aFontSize) { - return GetPropertyValue("font-size", aFontSize); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-size"), aFontSize); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontSize(const nsString& aFontSize) { - return SetProperty("font-size", aFontSize, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-size"), aFontSize, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontSizeAdjust(nsString& aFontSizeAdjust) { - return GetPropertyValue("font-size-adjust", aFontSizeAdjust); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-size-adjust"), aFontSizeAdjust); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontSizeAdjust(const nsString& aFontSizeAdjust) { - return SetProperty("font-size-adjust", aFontSizeAdjust, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-size-adjust"), aFontSizeAdjust, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontStretch(nsString& aFontStretch) { - return GetPropertyValue("font-stretch", aFontStretch); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-stretch"), aFontStretch); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontStretch(const nsString& aFontStretch) { - return SetProperty("font-stretch", aFontStretch, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-stretch"), aFontStretch, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontStyle(nsString& aFontStyle) { - return GetPropertyValue("font-style", aFontStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-style"), aFontStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontStyle(const nsString& aFontStyle) { - return SetProperty("font-style", aFontStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-style"), aFontStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontVariant(nsString& aFontVariant) { - return GetPropertyValue("font-variant", aFontVariant); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-variant"), aFontVariant); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontVariant(const nsString& aFontVariant) { - return SetProperty("font-variant", aFontVariant, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-variant"), aFontVariant, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetFontWeight(nsString& aFontWeight) { - return GetPropertyValue("font-weight", aFontWeight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("font-weight"), aFontWeight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetFontWeight(const nsString& aFontWeight) { - return SetProperty("font-weight", aFontWeight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("font-weight"), aFontWeight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetHeight(nsString& aHeight) { - return GetPropertyValue("height", aHeight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("height"), aHeight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetHeight(const nsString& aHeight) { - return SetProperty("height", aHeight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("height"), aHeight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetLeft(nsString& aLeft) { - return GetPropertyValue("left", aLeft); + return GetPropertyValue(NS_ConvertASCIItoUCS2("left"), aLeft); } NS_IMETHODIMP nsDOMCSSDeclaration::SetLeft(const nsString& aLeft) { - return SetProperty("left", aLeft, ""); + return SetProperty(NS_ConvertASCIItoUCS2("left"), aLeft, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetLetterSpacing(nsString& aLetterSpacing) { - return GetPropertyValue("letter-spacing", aLetterSpacing); + return GetPropertyValue(NS_ConvertASCIItoUCS2("letter-spacing"), aLetterSpacing); } NS_IMETHODIMP nsDOMCSSDeclaration::SetLetterSpacing(const nsString& aLetterSpacing) { - return SetProperty("letter-spacing", aLetterSpacing, ""); + return SetProperty(NS_ConvertASCIItoUCS2("letter-spacing"), aLetterSpacing, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetLineHeight(nsString& aLineHeight) { - return GetPropertyValue("line-height", aLineHeight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("line-height"), aLineHeight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetLineHeight(const nsString& aLineHeight) { - return SetProperty("line-height", aLineHeight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("line-height"), aLineHeight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetListStyle(nsString& aListStyle) { - return GetPropertyValue("list-style", aListStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("list-style"), aListStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetListStyle(const nsString& aListStyle) { - return SetProperty("list-style", aListStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("list-style"), aListStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetListStyleImage(nsString& aListStyleImage) { - return GetPropertyValue("list-style-image", aListStyleImage); + return GetPropertyValue(NS_ConvertASCIItoUCS2("list-style-image"), aListStyleImage); } NS_IMETHODIMP nsDOMCSSDeclaration::SetListStyleImage(const nsString& aListStyleImage) { - return SetProperty("list-style-image", aListStyleImage, ""); + return SetProperty(NS_ConvertASCIItoUCS2("list-style-image"), aListStyleImage, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetListStylePosition(nsString& aListStylePosition) { - return GetPropertyValue("list-style-position", aListStylePosition); + return GetPropertyValue(NS_ConvertASCIItoUCS2("list-style-position"), aListStylePosition); } NS_IMETHODIMP nsDOMCSSDeclaration::SetListStylePosition(const nsString& aListStylePosition) { - return SetProperty("list-style-position", aListStylePosition, ""); + return SetProperty(NS_ConvertASCIItoUCS2("list-style-position"), aListStylePosition, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetListStyleType(nsString& aListStyleType) { - return GetPropertyValue("list-style-type", aListStyleType); + return GetPropertyValue(NS_ConvertASCIItoUCS2("list-style-type"), aListStyleType); } NS_IMETHODIMP nsDOMCSSDeclaration::SetListStyleType(const nsString& aListStyleType) { - return SetProperty("list-style-type", aListStyleType, ""); + return SetProperty(NS_ConvertASCIItoUCS2("list-style-type"), aListStyleType, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMargin(nsString& aMargin) { - return GetPropertyValue("margin", aMargin); + return GetPropertyValue(NS_ConvertASCIItoUCS2("margin"), aMargin); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMargin(const nsString& aMargin) { - return SetProperty("margin", aMargin, ""); + return SetProperty(NS_ConvertASCIItoUCS2("margin"), aMargin, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarginTop(nsString& aMarginTop) { - return GetPropertyValue("margin-top", aMarginTop); + return GetPropertyValue(NS_ConvertASCIItoUCS2("margin-top"), aMarginTop); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarginTop(const nsString& aMarginTop) { - return SetProperty("margin-top", aMarginTop, ""); + return SetProperty(NS_ConvertASCIItoUCS2("margin-top"), aMarginTop, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarginRight(nsString& aMarginRight) { - return GetPropertyValue("margin-right", aMarginRight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("margin-right"), aMarginRight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarginRight(const nsString& aMarginRight) { - return SetProperty("margin-right", aMarginRight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("margin-right"), aMarginRight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarginBottom(nsString& aMarginBottom) { - return GetPropertyValue("margin-bottom", aMarginBottom); + return GetPropertyValue(NS_ConvertASCIItoUCS2("margin-bottom"), aMarginBottom); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarginBottom(const nsString& aMarginBottom) { - return SetProperty("margin-bottom", aMarginBottom, ""); + return SetProperty(NS_ConvertASCIItoUCS2("margin-bottom"), aMarginBottom, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarginLeft(nsString& aMarginLeft) { - return GetPropertyValue("margin-left", aMarginLeft); + return GetPropertyValue(NS_ConvertASCIItoUCS2("margin-left"), aMarginLeft); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarginLeft(const nsString& aMarginLeft) { - return SetProperty("margin-left", aMarginLeft, ""); + return SetProperty(NS_ConvertASCIItoUCS2("margin-left"), aMarginLeft, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarkerOffset(nsString& aMarkerOffset) { - return GetPropertyValue("marker-offset", aMarkerOffset); + return GetPropertyValue(NS_ConvertASCIItoUCS2("marker-offset"), aMarkerOffset); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarkerOffset(const nsString& aMarkerOffset) { - return SetProperty("marker-offset", aMarkerOffset, ""); + return SetProperty(NS_ConvertASCIItoUCS2("marker-offset"), aMarkerOffset, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMarks(nsString& aMarks) { - return GetPropertyValue("marks", aMarks); + return GetPropertyValue(NS_ConvertASCIItoUCS2("marks"), aMarks); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMarks(const nsString& aMarks) { - return SetProperty("marks", aMarks, ""); + return SetProperty(NS_ConvertASCIItoUCS2("marks"), aMarks, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMaxHeight(nsString& aMaxHeight) { - return GetPropertyValue("max-height", aMaxHeight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("max-height"), aMaxHeight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMaxHeight(const nsString& aMaxHeight) { - return SetProperty("max-height", aMaxHeight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("max-height"), aMaxHeight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMaxWidth(nsString& aMaxWidth) { - return GetPropertyValue("max-width", aMaxWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("max-width"), aMaxWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMaxWidth(const nsString& aMaxWidth) { - return SetProperty("max-width", aMaxWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("max-width"), aMaxWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMinHeight(nsString& aMinHeight) { - return GetPropertyValue("min-height", aMinHeight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("min-height"), aMinHeight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMinHeight(const nsString& aMinHeight) { - return SetProperty("min-height", aMinHeight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("min-height"), aMinHeight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetMinWidth(nsString& aMinWidth) { - return GetPropertyValue("min-width", aMinWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("min-width"), aMinWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetMinWidth(const nsString& aMinWidth) { - return SetProperty("min-width", aMinWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("min-width"), aMinWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOrphans(nsString& aOrphans) { - return GetPropertyValue("orphans", aOrphans); + return GetPropertyValue(NS_ConvertASCIItoUCS2("orphans"), aOrphans); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOrphans(const nsString& aOrphans) { - return SetProperty("orphans", aOrphans, ""); + return SetProperty(NS_ConvertASCIItoUCS2("orphans"), aOrphans, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutline(nsString& aOutline) { - return GetPropertyValue("outline", aOutline); + return GetPropertyValue(NS_ConvertASCIItoUCS2("outline"), aOutline); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutline(const nsString& aOutline) { - return SetProperty("outline", aOutline, ""); + return SetProperty(NS_ConvertASCIItoUCS2("outline"), aOutline, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineColor(nsString& aOutlineColor) { - return GetPropertyValue("outline-color", aOutlineColor); + return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-color"), aOutlineColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineColor(const nsString& aOutlineColor) { - return SetProperty("outline-color", aOutlineColor, ""); + return SetProperty(NS_ConvertASCIItoUCS2("outline-color"), aOutlineColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineStyle(nsString& aOutlineStyle) { - return GetPropertyValue("outline-style", aOutlineStyle); + return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-style"), aOutlineStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineStyle(const nsString& aOutlineStyle) { - return SetProperty("outline-style", aOutlineStyle, ""); + return SetProperty(NS_ConvertASCIItoUCS2("outline-style"), aOutlineStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineWidth(nsString& aOutlineWidth) { - return GetPropertyValue("outline-width", aOutlineWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-width"), aOutlineWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineWidth(const nsString& aOutlineWidth) { - return SetProperty("outline-width", aOutlineWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("outline-width"), aOutlineWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOverflow(nsString& aOverflow) { - return GetPropertyValue("overflow", aOverflow); + return GetPropertyValue(NS_ConvertASCIItoUCS2("overflow"), aOverflow); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOverflow(const nsString& aOverflow) { - return SetProperty("overflow", aOverflow, ""); + return SetProperty(NS_ConvertASCIItoUCS2("overflow"), aOverflow, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPadding(nsString& aPadding) { - return GetPropertyValue("padding", aPadding); + return GetPropertyValue(NS_ConvertASCIItoUCS2("padding"), aPadding); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPadding(const nsString& aPadding) { - return SetProperty("padding", aPadding, ""); + return SetProperty(NS_ConvertASCIItoUCS2("padding"), aPadding, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPaddingTop(nsString& aPaddingTop) { - return GetPropertyValue("padding-top", aPaddingTop); + return GetPropertyValue(NS_ConvertASCIItoUCS2("padding-top"), aPaddingTop); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPaddingTop(const nsString& aPaddingTop) { - return SetProperty("padding-top", aPaddingTop, ""); + return SetProperty(NS_ConvertASCIItoUCS2("padding-top"), aPaddingTop, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPaddingRight(nsString& aPaddingRight) { - return GetPropertyValue("padding-right", aPaddingRight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("padding-right"), aPaddingRight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPaddingRight(const nsString& aPaddingRight) { - return SetProperty("padding-right", aPaddingRight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("padding-right"), aPaddingRight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPaddingBottom(nsString& aPaddingBottom) { - return GetPropertyValue("padding-bottom", aPaddingBottom); + return GetPropertyValue(NS_ConvertASCIItoUCS2("padding-bottom"), aPaddingBottom); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPaddingBottom(const nsString& aPaddingBottom) { - return SetProperty("padding-bottom", aPaddingBottom, ""); + return SetProperty(NS_ConvertASCIItoUCS2("padding-bottom"), aPaddingBottom, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPaddingLeft(nsString& aPaddingLeft) { - return GetPropertyValue("padding-left", aPaddingLeft); + return GetPropertyValue(NS_ConvertASCIItoUCS2("padding-left"), aPaddingLeft); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPaddingLeft(const nsString& aPaddingLeft) { - return SetProperty("padding-left", aPaddingLeft, ""); + return SetProperty(NS_ConvertASCIItoUCS2("padding-left"), aPaddingLeft, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPage(nsString& aPage) { - return GetPropertyValue("page", aPage); + return GetPropertyValue(NS_ConvertASCIItoUCS2("page"), aPage); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPage(const nsString& aPage) { - return SetProperty("page", aPage, ""); + return SetProperty(NS_ConvertASCIItoUCS2("page"), aPage, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPageBreakAfter(nsString& aPageBreakAfter) { - return GetPropertyValue("page-break-after", aPageBreakAfter); + return GetPropertyValue(NS_ConvertASCIItoUCS2("page-break-after"), aPageBreakAfter); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPageBreakAfter(const nsString& aPageBreakAfter) { - return SetProperty("page-break-after", aPageBreakAfter, ""); + return SetProperty(NS_ConvertASCIItoUCS2("page-break-after"), aPageBreakAfter, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPageBreakBefore(nsString& aPageBreakBefore) { - return GetPropertyValue("page-break-before", aPageBreakBefore); + return GetPropertyValue(NS_ConvertASCIItoUCS2("page-break-before"), aPageBreakBefore); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPageBreakBefore(const nsString& aPageBreakBefore) { - return SetProperty("page-break-before", aPageBreakBefore, ""); + return SetProperty(NS_ConvertASCIItoUCS2("page-break-before"), aPageBreakBefore, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPageBreakInside(nsString& aPageBreakInside) { - return GetPropertyValue("page-break-inside", aPageBreakInside); + return GetPropertyValue(NS_ConvertASCIItoUCS2("page-break-inside"), aPageBreakInside); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPageBreakInside(const nsString& aPageBreakInside) { - return SetProperty("page-break-inside", aPageBreakInside, ""); + return SetProperty(NS_ConvertASCIItoUCS2("page-break-inside"), aPageBreakInside, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPause(nsString& aPause) { - return GetPropertyValue("pause", aPause); + return GetPropertyValue(NS_ConvertASCIItoUCS2("pause"), aPause); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPause(const nsString& aPause) { - return SetProperty("pause", aPause, ""); + return SetProperty(NS_ConvertASCIItoUCS2("pause"), aPause, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPauseAfter(nsString& aPauseAfter) { - return GetPropertyValue("pause-after", aPauseAfter); + return GetPropertyValue(NS_ConvertASCIItoUCS2("pause-after"), aPauseAfter); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPauseAfter(const nsString& aPauseAfter) { - return SetProperty("pause-after", aPauseAfter, ""); + return SetProperty(NS_ConvertASCIItoUCS2("pause-after"), aPauseAfter, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPauseBefore(nsString& aPauseBefore) { - return GetPropertyValue("pause-before", aPauseBefore); + return GetPropertyValue(NS_ConvertASCIItoUCS2("pause-before"), aPauseBefore); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPauseBefore(const nsString& aPauseBefore) { - return SetProperty("pause-before", aPauseBefore, ""); + return SetProperty(NS_ConvertASCIItoUCS2("pause-before"), aPauseBefore, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPitch(nsString& aPitch) { - return GetPropertyValue("pitch", aPitch); + return GetPropertyValue(NS_ConvertASCIItoUCS2("pitch"), aPitch); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPitch(const nsString& aPitch) { - return SetProperty("pitch", aPitch, ""); + return SetProperty(NS_ConvertASCIItoUCS2("pitch"), aPitch, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPitchRange(nsString& aPitchRange) { - return GetPropertyValue("pitch-range", aPitchRange); + return GetPropertyValue(NS_ConvertASCIItoUCS2("pitch-range"), aPitchRange); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPitchRange(const nsString& aPitchRange) { - return SetProperty("pitch-range", aPitchRange, ""); + return SetProperty(NS_ConvertASCIItoUCS2("pitch-range"), aPitchRange, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPlayDuring(nsString& aPlayDuring) { - return GetPropertyValue("play-during", aPlayDuring); + return GetPropertyValue(NS_ConvertASCIItoUCS2("play-during"), aPlayDuring); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPlayDuring(const nsString& aPlayDuring) { - return SetProperty("play-during", aPlayDuring, ""); + return SetProperty(NS_ConvertASCIItoUCS2("play-during"), aPlayDuring, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetPosition(nsString& aPosition) { - return GetPropertyValue("position", aPosition); + return GetPropertyValue(NS_ConvertASCIItoUCS2("position"), aPosition); } NS_IMETHODIMP nsDOMCSSDeclaration::SetPosition(const nsString& aPosition) { - return SetProperty("position", aPosition, ""); + return SetProperty(NS_ConvertASCIItoUCS2("position"), aPosition, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetQuotes(nsString& aQuotes) { - return GetPropertyValue("quotes", aQuotes); + return GetPropertyValue(NS_ConvertASCIItoUCS2("quotes"), aQuotes); } NS_IMETHODIMP nsDOMCSSDeclaration::SetQuotes(const nsString& aQuotes) { - return SetProperty("quotes", aQuotes, ""); + return SetProperty(NS_ConvertASCIItoUCS2("quotes"), aQuotes, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetRichness(nsString& aRichness) { - return GetPropertyValue("richness", aRichness); + return GetPropertyValue(NS_ConvertASCIItoUCS2("richness"), aRichness); } NS_IMETHODIMP nsDOMCSSDeclaration::SetRichness(const nsString& aRichness) { - return SetProperty("richness", aRichness, ""); + return SetProperty(NS_ConvertASCIItoUCS2("richness"), aRichness, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetRight(nsString& aRight) { - return GetPropertyValue("right", aRight); + return GetPropertyValue(NS_ConvertASCIItoUCS2("right"), aRight); } NS_IMETHODIMP nsDOMCSSDeclaration::SetRight(const nsString& aRight) { - return SetProperty("right", aRight, ""); + return SetProperty(NS_ConvertASCIItoUCS2("right"), aRight, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSize(nsString& aSize) { - return GetPropertyValue("size", aSize); + return GetPropertyValue(NS_ConvertASCIItoUCS2("size"), aSize); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSize(const nsString& aSize) { - return SetProperty("size", aSize, ""); + return SetProperty(NS_ConvertASCIItoUCS2("size"), aSize, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSpeak(nsString& aSpeak) { - return GetPropertyValue("speak", aSpeak); + return GetPropertyValue(NS_ConvertASCIItoUCS2("speak"), aSpeak); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSpeak(const nsString& aSpeak) { - return SetProperty("speak", aSpeak, ""); + return SetProperty(NS_ConvertASCIItoUCS2("speak"), aSpeak, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSpeakHeader(nsString& aSpeakHeader) { - return GetPropertyValue("speak-header", aSpeakHeader); + return GetPropertyValue(NS_ConvertASCIItoUCS2("speak-header"), aSpeakHeader); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSpeakHeader(const nsString& aSpeakHeader) { - return SetProperty("speak-header", aSpeakHeader, ""); + return SetProperty(NS_ConvertASCIItoUCS2("speak-header"), aSpeakHeader, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSpeakNumeral(nsString& aSpeakNumeral) { - return GetPropertyValue("speak-numeral", aSpeakNumeral); + return GetPropertyValue(NS_ConvertASCIItoUCS2("speak-numeral"), aSpeakNumeral); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSpeakNumeral(const nsString& aSpeakNumeral) { - return SetProperty("speak-numeral", aSpeakNumeral, ""); + return SetProperty(NS_ConvertASCIItoUCS2("speak-numeral"), aSpeakNumeral, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSpeakPunctuation(nsString& aSpeakPunctuation) { - return GetPropertyValue("speak-punctuation", aSpeakPunctuation); + return GetPropertyValue(NS_ConvertASCIItoUCS2("speak-punctuation"), aSpeakPunctuation); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSpeakPunctuation(const nsString& aSpeakPunctuation) { - return SetProperty("speak-punctuation", aSpeakPunctuation, ""); + return SetProperty(NS_ConvertASCIItoUCS2("speak-punctuation"), aSpeakPunctuation, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetSpeechRate(nsString& aSpeechRate) { - return GetPropertyValue("speech-rate", aSpeechRate); + return GetPropertyValue(NS_ConvertASCIItoUCS2("speech-rate"), aSpeechRate); } NS_IMETHODIMP nsDOMCSSDeclaration::SetSpeechRate(const nsString& aSpeechRate) { - return SetProperty("speech-rate", aSpeechRate, ""); + return SetProperty(NS_ConvertASCIItoUCS2("speech-rate"), aSpeechRate, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetStress(nsString& aStress) { - return GetPropertyValue("stress", aStress); + return GetPropertyValue(NS_ConvertASCIItoUCS2("stress"), aStress); } NS_IMETHODIMP nsDOMCSSDeclaration::SetStress(const nsString& aStress) { - return SetProperty("stress", aStress, ""); + return SetProperty(NS_ConvertASCIItoUCS2("stress"), aStress, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTableLayout(nsString& aTableLayout) { - return GetPropertyValue("table-layout", aTableLayout); + return GetPropertyValue(NS_ConvertASCIItoUCS2("table-layout"), aTableLayout); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTableLayout(const nsString& aTableLayout) { - return SetProperty("table-layout", aTableLayout, ""); + return SetProperty(NS_ConvertASCIItoUCS2("table-layout"), aTableLayout, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTextAlign(nsString& aTextAlign) { - return GetPropertyValue("text-align", aTextAlign); + return GetPropertyValue(NS_ConvertASCIItoUCS2("text-align"), aTextAlign); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTextAlign(const nsString& aTextAlign) { - return SetProperty("text-align", aTextAlign, ""); + return SetProperty(NS_ConvertASCIItoUCS2("text-align"), aTextAlign, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTextDecoration(nsString& aTextDecoration) { - return GetPropertyValue("text-decoration", aTextDecoration); + return GetPropertyValue(NS_ConvertASCIItoUCS2("text-decoration"), aTextDecoration); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTextDecoration(const nsString& aTextDecoration) { - return SetProperty("text-decoration", aTextDecoration, ""); + return SetProperty(NS_ConvertASCIItoUCS2("text-decoration"), aTextDecoration, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTextIndent(nsString& aTextIndent) { - return GetPropertyValue("text-indent", aTextIndent); + return GetPropertyValue(NS_ConvertASCIItoUCS2("text-indent"), aTextIndent); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTextIndent(const nsString& aTextIndent) { - return SetProperty("text-indent", aTextIndent, ""); + return SetProperty(NS_ConvertASCIItoUCS2("text-indent"), aTextIndent, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTextShadow(nsString& aTextShadow) { - return GetPropertyValue("text-shadow", aTextShadow); + return GetPropertyValue(NS_ConvertASCIItoUCS2("text-shadow"), aTextShadow); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTextShadow(const nsString& aTextShadow) { - return SetProperty("text-shadow", aTextShadow, ""); + return SetProperty(NS_ConvertASCIItoUCS2("text-shadow"), aTextShadow, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTextTransform(nsString& aTextTransform) { - return GetPropertyValue("text-transform", aTextTransform); + return GetPropertyValue(NS_ConvertASCIItoUCS2("text-transform"), aTextTransform); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTextTransform(const nsString& aTextTransform) { - return SetProperty("text-transform", aTextTransform, ""); + return SetProperty(NS_ConvertASCIItoUCS2("text-transform"), aTextTransform, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetTop(nsString& aTop) { - return GetPropertyValue("top", aTop); + return GetPropertyValue(NS_ConvertASCIItoUCS2("top"), aTop); } NS_IMETHODIMP nsDOMCSSDeclaration::SetTop(const nsString& aTop) { - return SetProperty("top", aTop, ""); + return SetProperty(NS_ConvertASCIItoUCS2("top"), aTop, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetUnicodeBidi(nsString& aUnicodeBidi) { - return GetPropertyValue("unicode-bidi", aUnicodeBidi); + return GetPropertyValue(NS_ConvertASCIItoUCS2("unicode-bidi"), aUnicodeBidi); } NS_IMETHODIMP nsDOMCSSDeclaration::SetUnicodeBidi(const nsString& aUnicodeBidi) { - return SetProperty("unicode-bidi", aUnicodeBidi, ""); + return SetProperty(NS_ConvertASCIItoUCS2("unicode-bidi"), aUnicodeBidi, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetVerticalAlign(nsString& aVerticalAlign) { - return GetPropertyValue("vertical-align", aVerticalAlign); + return GetPropertyValue(NS_ConvertASCIItoUCS2("vertical-align"), aVerticalAlign); } NS_IMETHODIMP nsDOMCSSDeclaration::SetVerticalAlign(const nsString& aVerticalAlign) { - return SetProperty("vertical-align", aVerticalAlign, ""); + return SetProperty(NS_ConvertASCIItoUCS2("vertical-align"), aVerticalAlign, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetVisibility(nsString& aVisibility) { - return GetPropertyValue("visibility", aVisibility); + return GetPropertyValue(NS_ConvertASCIItoUCS2("visibility"), aVisibility); } NS_IMETHODIMP nsDOMCSSDeclaration::SetVisibility(const nsString& aVisibility) { - return SetProperty("visibility", aVisibility, ""); + return SetProperty(NS_ConvertASCIItoUCS2("visibility"), aVisibility, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetVoiceFamily(nsString& aVoiceFamily) { - return GetPropertyValue("voice-family", aVoiceFamily); + return GetPropertyValue(NS_ConvertASCIItoUCS2("voice-family"), aVoiceFamily); } NS_IMETHODIMP nsDOMCSSDeclaration::SetVoiceFamily(const nsString& aVoiceFamily) { - return SetProperty("voice-family", aVoiceFamily, ""); + return SetProperty(NS_ConvertASCIItoUCS2("voice-family"), aVoiceFamily, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetVolume(nsString& aVolume) { - return GetPropertyValue("volume", aVolume); + return GetPropertyValue(NS_ConvertASCIItoUCS2("volume"), aVolume); } NS_IMETHODIMP nsDOMCSSDeclaration::SetVolume(const nsString& aVolume) { - return SetProperty("volume", aVolume, ""); + return SetProperty(NS_ConvertASCIItoUCS2("volume"), aVolume, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetWhiteSpace(nsString& aWhiteSpace) { - return GetPropertyValue("white-space", aWhiteSpace); + return GetPropertyValue(NS_ConvertASCIItoUCS2("white-space"), aWhiteSpace); } NS_IMETHODIMP nsDOMCSSDeclaration::SetWhiteSpace(const nsString& aWhiteSpace) { - return SetProperty("white-space", aWhiteSpace, ""); + return SetProperty(NS_ConvertASCIItoUCS2("white-space"), aWhiteSpace, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetWidows(nsString& aWidows) { - return GetPropertyValue("widows", aWidows); + return GetPropertyValue(NS_ConvertASCIItoUCS2("widows"), aWidows); } NS_IMETHODIMP nsDOMCSSDeclaration::SetWidows(const nsString& aWidows) { - return SetProperty("widows", aWidows, ""); + return SetProperty(NS_ConvertASCIItoUCS2("widows"), aWidows, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetWidth(nsString& aWidth) { - return GetPropertyValue("width", aWidth); + return GetPropertyValue(NS_ConvertASCIItoUCS2("width"), aWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetWidth(const nsString& aWidth) { - return SetProperty("width", aWidth, ""); + return SetProperty(NS_ConvertASCIItoUCS2("width"), aWidth, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetWordSpacing(nsString& aWordSpacing) { - return GetPropertyValue("word-spacing", aWordSpacing); + return GetPropertyValue(NS_ConvertASCIItoUCS2("word-spacing"), aWordSpacing); } NS_IMETHODIMP nsDOMCSSDeclaration::SetWordSpacing(const nsString& aWordSpacing) { - return SetProperty("word-spacing", aWordSpacing, ""); + return SetProperty(NS_ConvertASCIItoUCS2("word-spacing"), aWordSpacing, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetZIndex(nsString& aZIndex) { - return GetPropertyValue("z-index", aZIndex); + return GetPropertyValue(NS_ConvertASCIItoUCS2("z-index"), aZIndex); } NS_IMETHODIMP nsDOMCSSDeclaration::SetZIndex(const nsString& aZIndex) { - return SetProperty("z-index", aZIndex, ""); + return SetProperty(NS_ConvertASCIItoUCS2("z-index"), aZIndex, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOpacity(nsString& aOpacity) { - return GetPropertyValue("opacity", aOpacity); + return GetPropertyValue(NS_ConvertASCIItoUCS2("opacity"), aOpacity); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOpacity(const nsString& aOpacity) { - return SetProperty("opacity", aOpacity, ""); + return SetProperty(NS_ConvertASCIItoUCS2("opacity"), aOpacity, nsAutoString()); } diff --git a/mozilla/layout/xml/content/src/nsXMLElement.cpp b/mozilla/layout/xml/content/src/nsXMLElement.cpp index acc5731112f..396f6af0c52 100644 --- a/mozilla/layout/xml/content/src/nsXMLElement.cpp +++ b/mozilla/layout/xml/content/src/nsXMLElement.cpp @@ -155,7 +155,7 @@ nsXMLElement::GetXMLBaseURI(nsIURI **aURI) break; if (!base.IsEmpty()) { - str = base.GetUnicode(); + str.AssignWithConversion(base.GetUnicode()); rv = (*aURI)->SetRelativePath(str); } break; @@ -167,12 +167,12 @@ nsXMLElement::GetXMLBaseURI(nsIURI **aURI) } else { // We do not want to add double / delimiters (although the user is free to do so) if (value[value_len - 1] != '/') - value += '/'; - base = value + base; + value.AppendWithConversion('/'); + base.Insert(value, 0); } } else { if (value[value_len - 1] != '/') - value += '/'; // Add delimiter/make sure we treat this as dir + value.AppendWithConversion'/'; // Add delimiter/make sure we treat this as dir base = value; } } @@ -212,7 +212,7 @@ nsXMLElement::SetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, // to create an atom. if ((kNameSpaceID_XLink == aNameSpaceID) && (kTypeAtom == aName)) { - if (aValue.Equals(kSimpleAtom, PR_FALSE)) { + if (aValue.EqualsWithConversion(kSimpleAtom, PR_FALSE)) { // NOTE: This really is a link according to the XLink spec, // we do not need to check other attributes. If there // is no href attribute, then this link is simply @@ -272,13 +272,13 @@ nsXMLElement::HandleDOMEvent(nsIPresContext* aPresContext, } GetAttribute(kNameSpaceID_XLink, kShowAtom, show); // XXX Should probably do this using atoms - if (show.Equals("new")) { + if (show.EqualsWithConversion("new")) { verb = eLinkVerb_New; } - else if (show.Equals("replace")) { + else if (show.EqualsWithConversion("replace")) { verb = eLinkVerb_Replace; } - else if (show.Equals("embed")) { + else if (show.EqualsWithConversion("embed")) { verb = eLinkVerb_Embed; } diff --git a/mozilla/layout/xml/document/src/nsXMLContentSink.cpp b/mozilla/layout/xml/document/src/nsXMLContentSink.cpp index fa623cea1e7..27b95619942 100644 --- a/mozilla/layout/xml/document/src/nsXMLContentSink.cpp +++ b/mozilla/layout/xml/document/src/nsXMLContentSink.cpp @@ -522,7 +522,7 @@ nsXMLContentSink::GetAttributeValueAt(const nsIParserNode& aNode, } *cp = '\0'; PRInt32 ch; - nsAutoString str(cbuf); + nsAutoString str; str.AssignWithConversion(cbuf); dtd->ConvertEntityToUnicode(str, &ch); if (ch < 0) { continue; @@ -567,7 +567,7 @@ nsXMLContentSink::AddAttributes(const nsIParserNode& aNode, } if ((kNameSpaceID_XMLNS == nameSpaceID) && aIsHTML) { NS_RELEASE(nameAtom); - name.Insert("xmlns:", 0); + name.InsertWithConversion("xmlns:", 0); nameAtom = NS_NewAtom(name); nameSpaceID = kNameSpaceID_HTML; // XXX this is wrong, but necessary until HTML can store other namespaces for attrs } @@ -688,7 +688,7 @@ nsXMLContentSink::OpenContainer(const nsIParserNode& aNode) mState = eXMLContentSinkState_InDocumentElement; - tag = aNode.GetText(); + tag.Assign(aNode.GetText()); nameSpacePrefix = getter_AddRefs(CutNameSpacePrefix(tag)); // We must register namespace declarations found in the attribute list @@ -784,7 +784,7 @@ nsXMLContentSink::CloseContainer(const nsIParserNode& aNode) // no close tags for elements. PR_ASSERT(eXMLContentSinkState_InDocumentElement == mState); - tag = aNode.GetText(); + tag.Assign(aNode.GetText()); nameSpacePrefix = getter_AddRefs(CutNameSpacePrefix(tag)); nameSpaceID = GetNameSpaceId(nameSpacePrefix); isHTML = IsHTMLNameSpace(nameSpaceID); @@ -914,7 +914,7 @@ nsXMLContentSink::AddComment(const nsIParserNode& aNode) nsIDOMComment *domComment; nsresult result = NS_OK; - text = aNode.GetText(); + text.Assign(aNode.GetText()); result = NS_NewCommentNode(&comment); if (NS_OK == result) { result = comment->QueryInterface(kIDOMCommentIID, (void **)&domComment); @@ -941,7 +941,7 @@ nsXMLContentSink::AddCDATASection(const nsIParserNode& aNode) nsIDOMCDATASection *domCDATA; nsresult result = NS_OK; - text = aNode.GetText(); + text.Assign(aNode.GetText()); result = NS_NewXMLCDATASection(&cdata); if (NS_OK == result) { result = cdata->QueryInterface(kIDOMCDATASectionIID, (void **)&domCDATA); @@ -1245,7 +1245,7 @@ nsXMLContentSink::AddProcessingInstruction(const nsIParserNode& aNode) FlushText(); - text = aNode.GetText(); + text.Assign(aNode.GetText()); ParseProcessingInstruction(text, target, data); result = NS_NewXMLProcessingInstruction(&node, target, data); if (NS_OK == result) { @@ -1257,28 +1257,28 @@ nsXMLContentSink::AddProcessingInstruction(const nsIParserNode& aNode) nsAutoString type, href, title, media, alternate; // If it's a stylesheet PI... - if (target.Equals(kStyleSheetPI)) { - result = GetQuotedAttributeValue(text, "href", href); + if (target.EqualsWithConversion(kStyleSheetPI)) { + result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("href"), href); // If there was an error or there's no href, we can't do // anything with this PI if ((NS_OK != result) || (0 == href.Length())) { return result; } - result = GetQuotedAttributeValue(text, "type", type); + result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("type"), type); if (NS_FAILED(result)) { - type="text/css"; // Default the type attribute to the mime type for CSS + type.AssignWithConversion("text/css"); // Default the type attribute to the mime type for CSS } - result = GetQuotedAttributeValue(text, "title", title); + result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("title"), title); if (NS_SUCCEEDED(result)) { title.CompressWhitespace(); } - result = GetQuotedAttributeValue(text, "media", media); + result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("media"), media); if (NS_SUCCEEDED(result)) { media.ToLowerCase(); } - result = GetQuotedAttributeValue(text, "alternate", alternate); + result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("alternate"), alternate); #ifndef XSL - result = ProcessCSSStyleLink(node, href, alternate.Equals("yes"), + result = ProcessCSSStyleLink(node, href, alternate.EqualsWithConversion("yes"), title, type, media); #else result = ProcessStyleLink(node, href, alternate.Equals("yes"), @@ -1679,7 +1679,7 @@ nsXMLContentSink::OnStreamComplete(nsIStreamLoader* aLoader, const char* string) { nsresult rv = NS_OK; - nsString aData(string, stringLen); + nsString aData; aData.AssignWithConversion(string, stringLen); if (NS_OK == aStatus) { rv = EvaluateScript(aData, 0, mScriptLanguageVersion); @@ -1890,7 +1890,7 @@ nsXMLContentSink::GetElementFactory(PRInt32 aNameSpaceID, nsIElementFactory** aR gNameSpaceManager->GetNameSpaceURI(aNameSpaceID, nameSpace); nsCAutoString progID = NS_ELEMENT_FACTORY_PROGID_PREFIX; - progID.Append(nameSpace); + progID.AppendWithConversion(nameSpace); // Retrieve the appropriate factory. NS_WITH_SERVICE(nsIElementFactory, elementFactory, progID, &rv); diff --git a/mozilla/layout/xml/document/src/nsXMLDocument.cpp b/mozilla/layout/xml/document/src/nsXMLDocument.cpp index 9fec1fe670c..ae7903d8ab7 100644 --- a/mozilla/layout/xml/document/src/nsXMLDocument.cpp +++ b/mozilla/layout/xml/document/src/nsXMLDocument.cpp @@ -230,7 +230,7 @@ NS_IMETHODIMP nsXMLDocument::GetContentType(nsString& aContentType) const { // XXX Should get document type from incoming stream - aContentType.Assign("text/xml"); + aContentType.AssignWithConversion("text/xml"); return NS_OK; } @@ -249,7 +249,7 @@ nsXMLDocument::StartDocumentLoad(const char* aCommand, return rv; } - nsAutoString charset("UTF-8"); + nsAutoString charset; charset.AssignWithConversion("UTF-8"); PRBool bIsHTML = PR_FALSE; char* aContentType; nsCharsetSource charsetSource = kCharsetFromDocTypeDefault; @@ -276,7 +276,7 @@ nsXMLDocument::StartDocumentLoad(const char* aCommand, NS_RELEASE(contentTypeKey); if (NS_SUCCEEDED(rv)) { nsAutoString contentType; - contentType.Assign(contenttypeheader); + contentType.AssignWithConversion( NS_STATIC_CAST(const char*, contenttypeheader) ); PRInt32 start = contentType.RFind("charset=", PR_TRUE ) ; if(kNotFound != start) {