зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
1a24d24370
Коммит
bfe351c214
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче