Bug 1489127. Properly namespace FontVariation to avoid generated bindings. r=lsalzman

We will generate a FontVariation type from the the bindings. This has the same name
as the type from 'gfx'. They're structurally the same but having them both around
confuses the compiler.
This commit is contained in:
Jeff Muizelaar 2018-09-07 10:00:04 -04:00
Родитель 22d325deab
Коммит ea679c5b6d
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -71,7 +71,7 @@ struct FontInstanceData {
float mSize;
Maybe<FontInstanceOptions> mOptions;
Maybe<FontInstancePlatformOptions> mPlatformOptions;
UniquePtr<FontVariation[]> mVariations;
UniquePtr<gfx::FontVariation[]> mVariations;
size_t mNumVariations;
RefPtr<ScaledFont> mScaledFont;
@ -223,8 +223,8 @@ AddBlobFont(WrFontInstanceKey aInstanceKey,
font.mPlatformOptions = Some(*aPlatformOptions);
}
if (aNumVariations) {
font.mVariations.reset(new FontVariation[aNumVariations]);
PodCopy(font.mVariations.get(), aVariations, aNumVariations);
font.mVariations.reset(new gfx::FontVariation[aNumVariations]);
PodCopy(font.mVariations.get(), reinterpret_cast<const gfx::FontVariation*>(aVariations), aNumVariations);
}
}
}