Bug 1317179 - Use nsAString as the parameter type and drop Gecko_Utf8SliceToString.
MozReview-Commit-ID: TtA9P8FIAZ
--- a/layout/style/ServoBindingList.h
+++ b/layout/style/ServoBindingList.h
@@ -103,17 +103,17 @@ SERVO_BINDING_FUNC(Servo_DeclarationBloc
SERVO_BINDING_FUNC(Servo_DeclarationBlock_Equals, bool,
RawServoDeclarationBlockBorrowed a,
RawServoDeclarationBlockBorrowed b)
SERVO_BINDING_FUNC(Servo_DeclarationBlock_GetCssText, void,
RawServoDeclarationBlockBorrowed declarations,
nsAString* result)
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SerializeOneValue, void,
RawServoDeclarationBlockBorrowed declarations,
- const nsIAtom* property, bool is_custom, nsString* buffer)
+ const nsIAtom* property, bool is_custom, nsAString* buffer)
SERVO_BINDING_FUNC(Servo_DeclarationBlock_Count, uint32_t,
RawServoDeclarationBlockBorrowed declarations)
SERVO_BINDING_FUNC(Servo_DeclarationBlock_GetNthProperty, bool,
RawServoDeclarationBlockBorrowed declarations,
uint32_t index, nsAString* result)
SERVO_BINDING_FUNC(Servo_DeclarationBlock_GetPropertyValue, void,
RawServoDeclarationBlockBorrowed declarations,
nsIAtom* property, bool is_custom, nsAString* value)
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -603,29 +603,16 @@ Gecko_AtomEqualsUTF8IgnoreCase(nsIAtom*
// XXXbholley: We should be able to do this without converting, I just can't
// find the right thing to call.
nsDependentAtomString atomStr(aAtom);
NS_ConvertUTF8toUTF16 inStr(nsDependentCSubstring(aString, aLength));
return nsContentUtils::EqualsIgnoreASCIICase(atomStr, inStr);
}
void
-Gecko_Utf8SliceToString(nsString* aString,
- const uint8_t* aBuffer,
- size_t aBufferLen)
-{
- MOZ_ASSERT(aString);
- MOZ_ASSERT(aBuffer);
-
- aString->Truncate();
- AppendUTF8toUTF16(Substring(reinterpret_cast<const char*>(aBuffer),
- aBufferLen), *aString);
-}
-
-void
Gecko_FontFamilyList_Clear(FontFamilyList* aList) {
aList->Clear();
}
void
Gecko_FontFamilyList_AppendNamed(FontFamilyList* aList, nsIAtom* aName)
{
// Servo doesn't record whether the name was quoted or unquoted, so just
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -149,21 +149,16 @@ Gecko_GetServoDeclarationBlock(RawGeckoE
// Atoms.
nsIAtom* Gecko_Atomize(const char* aString, uint32_t aLength);
void Gecko_AddRefAtom(nsIAtom* aAtom);
void Gecko_ReleaseAtom(nsIAtom* aAtom);
const uint16_t* Gecko_GetAtomAsUTF16(nsIAtom* aAtom, uint32_t* aLength);
bool Gecko_AtomEqualsUTF8(nsIAtom* aAtom, const char* aString, uint32_t aLength);
bool Gecko_AtomEqualsUTF8IgnoreCase(nsIAtom* aAtom, const char* aString, uint32_t aLength);
-// Strings (temporary until bug 1294742)
-void Gecko_Utf8SliceToString(nsString* aString,
- const uint8_t* aBuffer,
- size_t aBufferLen);
-
// Font style
void Gecko_FontFamilyList_Clear(FontFamilyList* aList);
void Gecko_FontFamilyList_AppendNamed(FontFamilyList* aList, nsIAtom* aName);
void Gecko_FontFamilyList_AppendGeneric(FontFamilyList* list, FontFamilyType familyType);
void Gecko_CopyFontFamilyFrom(nsFont* dst, const nsFont* src);
// Counter style.
void Gecko_SetListStyleType(nsStyleList* style_struct, uint32_t type);