Fix for bugzilla bug 4129, font size wrong for <tt> elements that
[WebKit-https.git] / WebCore / css / cssstyleselector.cpp
index 8105cd8ed3083c53da1eb2397114985bbd4a268a..a4f1c86f3e3d844789a092af720c8c82540b3cfc 100644 (file)
@@ -3198,6 +3198,9 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
         FontFamily& firstFamily = fontDescription.firstFamily();
         FontFamily *currFamily = 0;
         
+        // Before mapping in a new font-family property, we should reset the generic family.
+        fontDescription.setGenericFamily(FontDescription::NoFamily);
+
         for(int i = 0; i < len; i++) {
             CSSValue *item = list->item(i);
             if(!item->isPrimitiveValue()) continue;