bug 243966 getPropertyValue truncates values for computed system font value

patch by Karsten D��sterloh <mnyromyr@tprac.de> r=ere,timeless,mkaply,amardare sr=dbaron
This commit is contained in:
cbiesinger%web.de 2004-06-03 21:19:08 +00:00
Родитель 1a24d24370
Коммит bfe351c214
8 изменённых файлов: 14 добавлений и 7 удалений

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

@ -517,7 +517,7 @@ nsComputedDOMStyle::GetFontFamily(nsIFrame *aFrame,
const nsString& fontName = font->mFont.name;
PRUint8 generic = font->mFlags & NS_STYLE_FONT_FACE_MASK;
if (generic == kGenericFont_NONE) {
if (generic == kGenericFont_NONE && !font->mFont.systemFont) {
const nsFont* defaultFont =
presContext->GetDefaultFont(kPresContext_DefaultVariableFont_ID);

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

@ -474,7 +474,9 @@ nsDeviceContextBeOS::GetSystemFontInfo(const BFont *theFont, nsSystemFontID anID
// no style
// no decoration
aFont->systemFont = PR_TRUE;
status = NS_OK;
}
return (status);

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

@ -977,10 +977,6 @@ nsSystemFontsGTK::GetSystemFontInfo(GtkWidget *aWidget, nsFont* aFont,
PangoFontDescription *desc;
desc = pango_font_description_from_string(fontname);
// Even if this font family happens to have the same name as a CSS
// generic font family, we don't want to use the user's pref for that
// CSS family.
aFont->systemFont = PR_TRUE;
g_free(fontname);

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

@ -394,6 +394,8 @@ NS_IMETHODIMP nsDeviceContextMac :: GetSystemFont(nsSystemFontID aID, nsFont *aF
}
aFont->systemFont = PR_TRUE;
return status;
}

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

@ -489,6 +489,9 @@ nsresult GetSysFontInfo(nsSystemFontID aID, nsFont* aFont)
// Do Size
aFont->size = NSIntPointsToTwips(pointSize);
aFont->systemFont = PR_TRUE;
return NS_OK;
}

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

@ -420,6 +420,8 @@ NS_IMETHODIMP nsDeviceContextPh :: GetSystemFont( nsSystemFontID aID, nsFont *aF
break;
}
aFont->systemFont = PR_TRUE;
return NS_OK;
}

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

@ -518,6 +518,8 @@ nsresult nsDeviceContextWin :: GetSysFontInfo(HDC aHDC, nsSystemFontID anID, nsF
return NS_ERROR_FAILURE;
}
aFont->systemFont = PR_TRUE;
return CopyLogFontToNSFont(&aHDC, ptrLogFont, aFont);
}

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

@ -517,7 +517,7 @@ nsComputedDOMStyle::GetFontFamily(nsIFrame *aFrame,
const nsString& fontName = font->mFont.name;
PRUint8 generic = font->mFlags & NS_STYLE_FONT_FACE_MASK;
if (generic == kGenericFont_NONE) {
if (generic == kGenericFont_NONE && !font->mFont.systemFont) {
const nsFont* defaultFont =
presContext->GetDefaultFont(kPresContext_DefaultVariableFont_ID);