[Bug 60556] [PATCH] Konqueror doesn't parse font-family CSS correctly if first font doesn't exist [testcase]

Jason jglane at btopenworld.com
Tue Aug 5 09:28:47 BST 2003


Thanks Bradd for your detective work and clear description of the problem!

The following patch against current KDE_3_1_BRANCH fixes the problem for me:
If anyone with CVS privileges could apply the patch, or something very similar
this bug can be closed. I don't know if it the problem exists in HEAD as I'm not running it, 
and the code seems to have changed quite a bit.

Jason


Index: cssstyleselector.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/css/cssstyleselector.cpp,v
retrieving revision 1.242.2.4
diff -u -3 -p -r1.242.2.4 cssstyleselector.cpp
--- cssstyleselector.cpp        30 Apr 2003 21:41:07 -0000      1.242.2.4
+++ cssstyleselector.cpp        5 Aug 2003 08:13:00 -0000
@@ -2451,7 +2451,8 @@ void CSSStyleSelector::applyRule( DOM::C
             CSSPrimitiveValueImpl *val = static_cast<CSSPrimitiveValueImpl *>(item);
             if(!val->primitiveType() == CSSPrimitiveValue::CSS_STRING) return;
             QString face = static_cast<FontFamilyValueImpl *>(val)->fontName();
-           if ( !face.isNull() || face.isEmpty() ) {
+
+           if ( !face.isEmpty() ) {
                if(face == "serif") {
                    face = settings->serifFontName();
                }







More information about the kfm-devel mailing list