Fix for bugzilla bug 4129, font size wrong for <tt> elements that
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 17 Sep 2006 07:39:12 +0000 (07:39 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 17 Sep 2006 07:39:12 +0000 (07:39 +0000)
        specify their own new font-family list.  Make sure to always
        reset the generic family along with the family list when mapping in
        new font-family values.

        Reviewed by bradee-oh

        fast/text/basic/generic-family-reset.html

        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16396 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/css/cssstyleselector.cpp

index 5f6644ddee63fc4221e617298a0b0cdf972584ad..94e1aec2ecd156648ea29ea84a791ef96a9c95be 100644 (file)
@@ -1,3 +1,17 @@
+2006-09-17  David Hyatt  <hyatt@apple.com>
+
+        Fix for bugzilla bug 4129, font size wrong for <tt> elements that
+        specify their own new font-family list.  Make sure to always
+        reset the generic family along with the family list when mapping in
+        new font-family values.
+
+        Reviewed by bradee-oh
+
+        fast/text/basic/generic-family-reset.html
+
+        * css/cssstyleselector.cpp:
+        (WebCore::CSSStyleSelector::applyProperty):
+
 2006-09-16  Brady Eidson <beidson@apple.com>
 
         Reviewed by Hyatt
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;