mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 427985 - "Mozilla stops repainting in this testcase after a while" (leak fix) [p=pavlov@pavlov.net (Stuart Parmenter) r=vlad b1.9+a1.9=damons]
This commit is contained in:
parent
46cc5c4a71
commit
1f95f2294c
@ -1528,7 +1528,7 @@ public:
|
||||
|
||||
HDC dc = GetDC((HWND)nsnull);
|
||||
HFONT hfont = font->GetHFONT();
|
||||
SelectObject(dc, hfont);
|
||||
HFONT oldFont = (HFONT)SelectObject(dc, hfont);
|
||||
|
||||
PRUnichar str[1] = { (PRUnichar)ch };
|
||||
WORD glyph[1];
|
||||
@ -1540,8 +1540,8 @@ public:
|
||||
if (ret != GDI_ERROR && glyph[0] != 0xFFFF)
|
||||
hasGlyph = PR_TRUE;
|
||||
} else {
|
||||
// ScriptGetCMap works better than GetGlyphIndicesW for things like bitmap/vector fonts
|
||||
HRESULT rv = ScriptGetCMap(dc, font->ScriptCache(), str, 1, 0, glyph);
|
||||
// ScriptGetCMap works better than GetGlyphIndicesW for things like bitmap/vector fonts
|
||||
HRESULT rv = ScriptGetCMap(dc, font->ScriptCache(), str, 1, 0, glyph);
|
||||
if (rv == S_OK)
|
||||
hasGlyph = PR_TRUE;
|
||||
}
|
||||
@ -1550,6 +1550,9 @@ public:
|
||||
aFontEntry->mCharacterMap.set(ch);
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
SelectObject(dc, oldFont);
|
||||
ReleaseDC(NULL, dc);
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user