Bug 1302949 - Add a method to serialize a declaration block as a single value; r=heycam

MozReview-Commit-ID: 59CCT0P4CBm

--HG--
extra : rebase_source : 4a44d4265603c982483e5d7ef9460a7ab35c1e1e
This commit is contained in:
Brian Birtles 2016-09-15 16:55:08 +09:00
parent 8de1442b19
commit 0f8222d843
2 changed files with 18 additions and 0 deletions

View File

@ -619,6 +619,19 @@ Gecko_AtomEqualsUTF8IgnoreCase(nsIAtom* aAtom, const char* aString, uint32_t aLe
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();

View File

@ -226,6 +226,11 @@ 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);