mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 945230 - Fixed char16_t/wchar_t mismatch in gfx/thebes/. r=bas.schouten
This commit is contained in:
parent
58736053af
commit
66134a8c07
@ -282,7 +282,7 @@ gfxDWriteFontFamily::LocalizedName(nsAString &aLocalizedName)
|
||||
}
|
||||
UINT32 idx = 0;
|
||||
BOOL exists;
|
||||
hr = names->FindLocaleName(localeName.BeginReading(),
|
||||
hr = names->FindLocaleName(localeName.get(),
|
||||
&idx,
|
||||
&exists);
|
||||
if (FAILED(hr)) {
|
||||
|
@ -44,8 +44,9 @@ gfxDWriteShaper::ShapeText(gfxContext *aContext,
|
||||
* in a single call, so we cannot exceed that limit.
|
||||
*/
|
||||
UINT32 length = aLength;
|
||||
char16ptr_t text = aText;
|
||||
|
||||
TextAnalysis analysis(aText, length, nullptr, readingDirection);
|
||||
TextAnalysis analysis(text, length, nullptr, readingDirection);
|
||||
TextAnalysis::Run *runHead;
|
||||
hr = analysis.GenerateResults(analyzer, &runHead);
|
||||
|
||||
@ -80,7 +81,7 @@ trymoreglyphs:
|
||||
|
||||
UINT32 actualGlyphs;
|
||||
|
||||
hr = analyzer->GetGlyphs(aText, length,
|
||||
hr = analyzer->GetGlyphs(text, length,
|
||||
font->GetFontFace(), FALSE,
|
||||
readingDirection == DWRITE_READING_DIRECTION_RIGHT_TO_LEFT,
|
||||
&runHead->mScript, nullptr, nullptr, nullptr, nullptr, 0,
|
||||
@ -107,7 +108,7 @@ trymoreglyphs:
|
||||
|
||||
if (!static_cast<gfxDWriteFont*>(mFont)->mUseSubpixelPositions) {
|
||||
hr = analyzer->GetGdiCompatibleGlyphPlacements(
|
||||
aText,
|
||||
text,
|
||||
clusters.Elements(),
|
||||
textProperties.Elements(),
|
||||
length,
|
||||
@ -129,7 +130,7 @@ trymoreglyphs:
|
||||
advances.Elements(),
|
||||
glyphOffsets.Elements());
|
||||
} else {
|
||||
hr = analyzer->GetGlyphPlacements(aText,
|
||||
hr = analyzer->GetGlyphPlacements(text,
|
||||
clusters.Elements(),
|
||||
textProperties.Elements(),
|
||||
length,
|
||||
|
@ -90,7 +90,7 @@ gfxGDIFont::CopyWithAntialiasOption(AntialiasOption anAAOption)
|
||||
|
||||
static bool
|
||||
UseUniscribe(gfxShapedText *aShapedText,
|
||||
const PRUnichar *aText,
|
||||
char16ptr_t aText,
|
||||
uint32_t aLength)
|
||||
{
|
||||
uint32_t flags = aShapedText->Flags();
|
||||
|
@ -323,7 +323,7 @@ GDIFontEntry::TestCharacterMap(uint32_t aCh)
|
||||
HFONT hfont = font->GetHFONT();
|
||||
HFONT oldFont = (HFONT)SelectObject(dc, hfont);
|
||||
|
||||
PRUnichar str[1] = { (PRUnichar)aCh };
|
||||
wchar_t str[1] = { aCh };
|
||||
WORD glyph[1];
|
||||
|
||||
bool hasGlyph = false;
|
||||
|
@ -31,7 +31,7 @@ gfxGDIShaper::ShapeText(gfxContext *aContext,
|
||||
}
|
||||
WORD *glyphs = glyphArray.Elements();
|
||||
|
||||
DWORD ret = ::GetGlyphIndicesW(dc, aText, length,
|
||||
DWORD ret = ::GetGlyphIndicesW(dc, char16ptr_t(aText), length,
|
||||
glyphs, GGI_MARK_NONEXISTING_GLYPHS);
|
||||
if (ret == GDI_ERROR) {
|
||||
return false;
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
HRESULT rv;
|
||||
HDC shapeDC = nullptr;
|
||||
|
||||
const PRUnichar *str = mAlternativeString ? mAlternativeString : mItemString;
|
||||
char16ptr_t str = mAlternativeString ? mAlternativeString : mItemString;
|
||||
|
||||
mScriptItem->a.fLogicalOrder = true;
|
||||
SCRIPT_ANALYSIS sa = mScriptItem->a;
|
||||
@ -417,7 +417,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
const PRUnichar *mString;
|
||||
char16ptr_t mString;
|
||||
gfxShapedText *mShapedText;
|
||||
uint32_t mOffset;
|
||||
uint32_t mLength;
|
||||
|
@ -1118,7 +1118,7 @@ gfxWindowsPlatform::UseClearTypeAlways()
|
||||
}
|
||||
|
||||
void
|
||||
gfxWindowsPlatform::GetDLLVersion(const PRUnichar *aDLLPath, nsAString& aVersion)
|
||||
gfxWindowsPlatform::GetDLLVersion(char16ptr_t aDLLPath, nsAString& aVersion)
|
||||
{
|
||||
DWORD versInfoSize, vers[4] = {0};
|
||||
// version info not available case
|
||||
|
@ -238,7 +238,7 @@ public:
|
||||
bool UseClearTypeForDownloadableFonts();
|
||||
bool UseClearTypeAlways();
|
||||
|
||||
static void GetDLLVersion(const PRUnichar *aDLLPath, nsAString& aVersion);
|
||||
static void GetDLLVersion(char16ptr_t aDLLPath, nsAString& aVersion);
|
||||
|
||||
// returns ClearType tuning information for each display
|
||||
static void GetCleartypeParams(nsTArray<ClearTypeParameterInfo>& aParams);
|
||||
|
Loading…
Reference in New Issue
Block a user