Bug 793013 - Remove unnecessary whitespace.

This commit is contained in:
Anthony Jones 2012-11-06 18:23:13 -05:00
Родитель 6f5946f59f
Коммит e4c4f98a12
1 изменённых файлов: 28 добавлений и 28 удалений

Просмотреть файл

@ -258,16 +258,16 @@ gfxPlatform::Init()
bool useOffMainThreadCompositing = false;
#ifdef MOZ_X11
// On X11 platforms only use OMTC if firefox was initalized with thread-safe
// On X11 platforms only use OMTC if firefox was initalized with thread-safe
// X11 (else it would crash).
useOffMainThreadCompositing = (PR_GetEnv("MOZ_USE_OMTC") != NULL);
#else
useOffMainThreadCompositing = Preferences::GetBool(
"layers.offmainthreadcomposition.enabled",
"layers.offmainthreadcomposition.enabled",
false);
#endif
if (useOffMainThreadCompositing && (XRE_GetProcessType() ==
if (useOffMainThreadCompositing && (XRE_GetProcessType() ==
GeckoProcessType_Default)) {
CompositorParent::StartUp();
if (Preferences::GetBool("layers.async-video.enabled",false)) {
@ -442,7 +442,7 @@ gfxPlatform::~gfxPlatform()
already_AddRefed<gfxASurface>
gfxPlatform::CreateOffscreenImageSurface(const gfxIntSize& aSize,
gfxASurface::gfxContentType aContentType)
{
{
nsRefPtr<gfxASurface> newSurface;
newSurface = new gfxImageSurface(aSize, OptimalFormatForContent(aContentType));
@ -456,7 +456,7 @@ gfxPlatform::OptimizeImage(gfxImageSurface *aSurface,
const gfxIntSize& surfaceSize = aSurface->GetSize();
#ifdef XP_WIN
if (gfxWindowsPlatform::GetPlatform()->GetRenderMode() ==
if (gfxWindowsPlatform::GetPlatform()->GetRenderMode() ==
gfxWindowsPlatform::RENDER_DIRECT2D) {
return nullptr;
}
@ -873,7 +873,7 @@ AppendGenericFontFromPref(nsString& aFonts, nsIAtom *aLangGroup, const char *aGe
genericDotLang.AppendLiteral(".");
genericDotLang.Append(langGroupString);
// fetch font.name.xxx value
// fetch font.name.xxx value
prefName.AssignLiteral("font.name.");
prefName.Append(genericDotLang);
nsAdoptingString nameValue = Preferences::GetString(prefName.get());
@ -883,7 +883,7 @@ AppendGenericFontFromPref(nsString& aFonts, nsIAtom *aLangGroup, const char *aGe
aFonts += nameValue;
}
// fetch font.name-list.xxx value
// fetch font.name-list.xxx value
prefName.AssignLiteral("font.name-list.");
prefName.Append(genericDotLang);
nsAdoptingString nameListValue = Preferences::GetString(prefName.get());
@ -913,17 +913,17 @@ bool gfxPlatform::ForEachPrefFont(eFontPrefLang aLangArray[], uint32_t aLangArra
for (i = 0; i < aLangArrayLen; i++) {
eFontPrefLang prefLang = aLangArray[i];
const char *langGroup = GetPrefLangName(prefLang);
nsAutoCString prefName;
prefName.AssignLiteral("font.default.");
prefName.Append(langGroup);
nsAdoptingCString genericDotLang = Preferences::GetCString(prefName.get());
genericDotLang.AppendLiteral(".");
genericDotLang.Append(langGroup);
// fetch font.name.xxx value
// fetch font.name.xxx value
prefName.AssignLiteral("font.name.");
prefName.Append(genericDotLang);
nsAdoptingCString nameValue = Preferences::GetCString(prefName.get());
@ -931,8 +931,8 @@ bool gfxPlatform::ForEachPrefFont(eFontPrefLang aLangArray[], uint32_t aLangArra
if (!aCallback(prefLang, NS_ConvertUTF8toUTF16(nameValue), aClosure))
return false;
}
// fetch font.name-list.xxx value
// fetch font.name-list.xxx value
prefName.AssignLiteral("font.name-list.");
prefName.Append(genericDotLang);
nsAdoptingCString nameListValue = Preferences::GetCString(prefName.get());
@ -1031,7 +1031,7 @@ gfxPlatform::GetFontPrefLangFor(uint8_t aUnicodeRange)
}
}
bool
bool
gfxPlatform::IsLangCJK(eFontPrefLang aLang)
{
switch (aLang) {
@ -1047,7 +1047,7 @@ gfxPlatform::IsLangCJK(eFontPrefLang aLang)
}
}
void
void
gfxPlatform::GetLangPrefs(eFontPrefLang aPrefLangs[], uint32_t &aLen, eFontPrefLang aCharLang, eFontPrefLang aPageLang)
{
if (IsLangCJK(aCharLang)) {
@ -1066,14 +1066,14 @@ gfxPlatform::AppendCJKPrefLangs(eFontPrefLang aPrefLangs[], uint32_t &aLen, eFon
if (IsLangCJK(aPageLang)) {
AppendPrefLang(aPrefLangs, aLen, aPageLang);
}
// if not set up, set up the default CJK order, based on accept lang settings and locale
if (mCJKPrefLangs.Length() == 0) {
// temp array
eFontPrefLang tempPrefLangs[kMaxLenPrefLangList];
uint32_t tempLen = 0;
// Add the CJK pref fonts from accept languages, the order should be same order
nsAdoptingCString list = Preferences::GetLocalizedCString("intl.accept_languages");
if (!list.IsEmpty()) {
@ -1150,34 +1150,34 @@ gfxPlatform::AppendCJKPrefLangs(eFontPrefLang aPrefLangs[], uint32_t &aLen, eFon
AppendPrefLang(tempPrefLangs, tempLen, eFontPrefLang_ChineseCN);
AppendPrefLang(tempPrefLangs, tempLen, eFontPrefLang_ChineseHK);
AppendPrefLang(tempPrefLangs, tempLen, eFontPrefLang_ChineseTW);
// copy into the cached array
uint32_t j;
for (j = 0; j < tempLen; j++) {
mCJKPrefLangs.AppendElement(tempPrefLangs[j]);
}
}
// append in cached CJK langs
uint32_t i, numCJKlangs = mCJKPrefLangs.Length();
for (i = 0; i < numCJKlangs; i++) {
AppendPrefLang(aPrefLangs, aLen, (eFontPrefLang) (mCJKPrefLangs[i]));
}
}
void
void
gfxPlatform::AppendPrefLang(eFontPrefLang aPrefLangs[], uint32_t& aLen, eFontPrefLang aAddLang)
{
if (aLen >= kMaxLenPrefLangList) return;
// make sure
uint32_t i = 0;
while (i < aLen && aPrefLangs[i] != aAddLang) {
i++;
}
if (i == aLen) {
aPrefLangs[aLen] = aAddLang;
aLen++;
@ -1308,7 +1308,7 @@ gfxPlatform::GetRenderingIntent()
return gCMSIntent;
}
void
void
gfxPlatform::TransformPixel(const gfxRGBA& in, gfxRGBA& out, qcms_transform *transform)
{
@ -1383,7 +1383,7 @@ gfxPlatform::GetCMSOutputProfile()
if (!gCMSOutputProfile) {
gCMSOutputProfile = GetCMSsRGBProfile();
}
/* Precache the LUT16 Interpolations for the output profile. See
/* Precache the LUT16 Interpolations for the output profile. See
bug 444661 for details. */
qcms_profile_precache_output_transform(gCMSOutputProfile);
}