Bug 375506 - Fix for bug 372629 breaks Mingw - build error in gfxWindowsFonts.cpp, r=roc
authormartijn.martijn@gmail.com
Wed, 04 Apr 2007 11:42:21 -0700
changeset 341 0fefaac9aaa72d5462d63192e7ceac7fbf9f2d78
parent 340 19b68ee8bec3491a1434b7cf5506605655298415
child 342 4218503d8f358e6a0b292c11b8e72a3d991c2ba5
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs375506, 372629
milestone1.9a4pre
Bug 375506 - Fix for bug 372629 breaks Mingw - build error in gfxWindowsFonts.cpp, r=roc
gfx/thebes/src/gfxWindowsFonts.cpp
--- a/gfx/thebes/src/gfxWindowsFonts.cpp
+++ b/gfx/thebes/src/gfxWindowsFonts.cpp
@@ -672,17 +672,17 @@ SetupTextRunFromGlyphs(gfxTextRun *aRun,
     if (IsAnyGlyphMissing(aGlyphs, length))
         return PR_FALSE;
        
     SIZE size;
     nsAutoTArray<int,500> partialWidthArray;
     if (!partialWidthArray.AppendElements(length))
         return PR_FALSE;
     BOOL success = GetTextExtentExPointI(aDC,
-                                         aGlyphs,
+                                         (WORD*) aGlyphs,
                                          length,
                                          INT_MAX,
                                          NULL,
                                          partialWidthArray.Elements(),
                                          &size);
     if (!success)
         return PR_FALSE;
 
@@ -720,17 +720,17 @@ gfxWindowsFontGroup::InitTextRunGDI(gfxC
 {
     gfxWindowsFont *font = GetFontAt(0);
     HDC dc = SetupContextFont(aContext, font);
     if (dc) {
         nsAutoTArray<WCHAR,500> glyphArray;
         if (!glyphArray.AppendElements(aLength))
             return;
 
-        DWORD ret = GetGlyphIndicesA(dc, aString, aLength, glyphArray.Elements(),
+        DWORD ret = GetGlyphIndicesA(dc, aString, aLength, (WORD*) glyphArray.Elements(),
                                      GGI_MARK_NONEXISTING_GLYPHS);
         if (ret != GDI_ERROR &&
             SetupTextRunFromGlyphs(aRun, glyphArray.Elements(), dc, font))
             return;
     }
 
     nsDependentCSubstring cString(aString, aString + aLength);
     nsAutoString utf16;
@@ -744,17 +744,17 @@ gfxWindowsFontGroup::InitTextRunGDI(gfxC
 {
     gfxWindowsFont *font = GetFontAt(0);
     HDC dc = SetupContextFont(aContext, font);
     if (dc) {
         nsAutoTArray<WCHAR,500> glyphArray;
         if (!glyphArray.AppendElements(aLength))
             return;
 
-        DWORD ret = GetGlyphIndicesW(dc, aString, aLength, glyphArray.Elements(),
+        DWORD ret = GetGlyphIndicesW(dc, aString, aLength, (WORD*) glyphArray.Elements(),
                                      GGI_MARK_NONEXISTING_GLYPHS);
         if (ret != GDI_ERROR &&
             SetupTextRunFromGlyphs(aRun, glyphArray.Elements(), dc, font))
             return;
     }
 
     InitTextRunUniscribe(aContext, aRun, aString, aLength);
 }