Bug 1328337 - fix implicit conversion of glyph size from float to uint32_t in NativeFontResource::CreateScaledFont. r=bobowen

MozReview-Commit-ID: 9JcrfRYJ3ca
This commit is contained in:
Lee Salzman 2017-01-03 14:20:16 -05:00
parent 93fd0a00c1
commit 37e1e73a58
7 changed files with 7 additions and 7 deletions

View File

@ -741,7 +741,7 @@ public:
* @return an already_addrefed ScaledFont, containing nullptr if failed.
*/
virtual already_AddRefed<ScaledFont>
CreateScaledFont(uint32_t aIndex, uint32_t aGlyphSize) = 0;
CreateScaledFont(uint32_t aIndex, Float aGlyphSize) = 0;
virtual ~NativeFontResource() {};
};

View File

@ -259,7 +259,7 @@ NativeFontResourceDWrite::Create(uint8_t *aFontData, uint32_t aDataLength,
}
already_AddRefed<ScaledFont>
NativeFontResourceDWrite::CreateScaledFont(uint32_t aIndex, uint32_t aGlyphSize)
NativeFontResourceDWrite::CreateScaledFont(uint32_t aIndex, Float aGlyphSize)
{
if (aIndex >= mNumberOfFaces) {
gfxWarning() << "Font face index is too high for font resource.";

View File

@ -32,7 +32,7 @@ public:
Create(uint8_t *aFontData, uint32_t aDataLength, bool aNeedsCairo);
already_AddRefed<ScaledFont>
CreateScaledFont(uint32_t aIndex, uint32_t aGlyphSize) final;
CreateScaledFont(uint32_t aIndex, Float aGlyphSize) final;
private:
NativeFontResourceDWrite(IDWriteFactory *aFactory,

View File

@ -65,7 +65,7 @@ NativeFontResourceGDI::~NativeFontResourceGDI()
}
already_AddRefed<ScaledFont>
NativeFontResourceGDI::CreateScaledFont(uint32_t aIndex, uint32_t aGlyphSize)
NativeFontResourceGDI::CreateScaledFont(uint32_t aIndex, Float aGlyphSize)
{
if (aIndex >= mFontNames.length()) {
gfxWarning() << "Font index is too high for font resource.";

View File

@ -36,7 +36,7 @@ public:
~NativeFontResourceGDI();
already_AddRefed<ScaledFont>
CreateScaledFont(uint32_t aIndex, uint32_t aGlyphSize) final;
CreateScaledFont(uint32_t aIndex, Float aGlyphSize) final;
private:
NativeFontResourceGDI(HANDLE aFontResourceHandle,

View File

@ -50,7 +50,7 @@ NativeFontResourceMac::Create(uint8_t *aFontData, uint32_t aDataLength)
}
already_AddRefed<ScaledFont>
NativeFontResourceMac::CreateScaledFont(uint32_t aIndex, uint32_t aGlyphSize)
NativeFontResourceMac::CreateScaledFont(uint32_t aIndex, Float aGlyphSize)
{
RefPtr<ScaledFontBase> scaledFont = new ScaledFontMac(mFontRef, aGlyphSize);

View File

@ -23,7 +23,7 @@ public:
Create(uint8_t *aFontData, uint32_t aDataLength);
already_AddRefed<ScaledFont>
CreateScaledFont(uint32_t aIndex, uint32_t aGlyphSize);
CreateScaledFont(uint32_t aIndex, Float aGlyphSize);
~NativeFontResourceMac()
{