From 33de22fd077108ea2817ce5f5025f7076787fafa Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Wed, 6 Sep 2000 14:02:44 +0000 Subject: [PATCH] For NavQuirks we need to set the appropriate font for buttons/selects or for text and textarea If these fonts are set in the html.css or quirk.css they cannot be overriden We now use the CSS3 font names and for NavQuirks we adjust the fonts to match Nav 4.x The change is to give field fonts monospace instead of sans-serif Bug 44656 r=dcone git-svn-id: svn://10.0.0.236/trunk@78262 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/style/src/nsCSSStyleRule.cpp | 7 ++++--- mozilla/layout/html/style/src/nsCSSStyleRule.cpp | 7 ++++--- mozilla/layout/style/nsCSSStyleRule.cpp | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/mozilla/content/html/style/src/nsCSSStyleRule.cpp b/mozilla/content/html/style/src/nsCSSStyleRule.cpp index 45dfc60e256..2b1dafe23c5 100644 --- a/mozilla/content/html/style/src/nsCSSStyleRule.cpp +++ b/mozilla/content/html/style/src/nsCSSStyleRule.cpp @@ -1654,9 +1654,10 @@ MapDeclarationFontInto(nsICSSDeclaration* aDeclaration, // NavQuirks uses sans-serif instead of whatever the native font is if (eCompatibility_NavQuirks == mode) { - if (sysID == eSystemAttr_Font_Button || - sysID == eSystemAttr_Font_Caption || - sysID == eSystemAttr_Font_Field) { + if (sysID == eSystemAttr_Font_Field) { + font->mFont.name.AssignWithConversion("monospace"); + } else if (sysID == eSystemAttr_Font_Button || + sysID == eSystemAttr_Font_Caption) { font->mFont.name.AssignWithConversion("sans-serif"); } } diff --git a/mozilla/layout/html/style/src/nsCSSStyleRule.cpp b/mozilla/layout/html/style/src/nsCSSStyleRule.cpp index 45dfc60e256..2b1dafe23c5 100644 --- a/mozilla/layout/html/style/src/nsCSSStyleRule.cpp +++ b/mozilla/layout/html/style/src/nsCSSStyleRule.cpp @@ -1654,9 +1654,10 @@ MapDeclarationFontInto(nsICSSDeclaration* aDeclaration, // NavQuirks uses sans-serif instead of whatever the native font is if (eCompatibility_NavQuirks == mode) { - if (sysID == eSystemAttr_Font_Button || - sysID == eSystemAttr_Font_Caption || - sysID == eSystemAttr_Font_Field) { + if (sysID == eSystemAttr_Font_Field) { + font->mFont.name.AssignWithConversion("monospace"); + } else if (sysID == eSystemAttr_Font_Button || + sysID == eSystemAttr_Font_Caption) { font->mFont.name.AssignWithConversion("sans-serif"); } } diff --git a/mozilla/layout/style/nsCSSStyleRule.cpp b/mozilla/layout/style/nsCSSStyleRule.cpp index 45dfc60e256..2b1dafe23c5 100644 --- a/mozilla/layout/style/nsCSSStyleRule.cpp +++ b/mozilla/layout/style/nsCSSStyleRule.cpp @@ -1654,9 +1654,10 @@ MapDeclarationFontInto(nsICSSDeclaration* aDeclaration, // NavQuirks uses sans-serif instead of whatever the native font is if (eCompatibility_NavQuirks == mode) { - if (sysID == eSystemAttr_Font_Button || - sysID == eSystemAttr_Font_Caption || - sysID == eSystemAttr_Font_Field) { + if (sysID == eSystemAttr_Font_Field) { + font->mFont.name.AssignWithConversion("monospace"); + } else if (sysID == eSystemAttr_Font_Button || + sysID == eSystemAttr_Font_Caption) { font->mFont.name.AssignWithConversion("sans-serif"); } }