Fix an issue with CSS2 system fonts where they did not respect text
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Aug 2006 22:07:16 +0000 (22:07 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Aug 2006 22:07:16 +0000 (22:07 +0000)
        zoom.  This was most visible with the new control fonts used for form
        controls (they stopped swapping between small/mini/regular as you zoomed).

        Reviewed by beth

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

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

WebCore/ChangeLog
WebCore/css/cssstyleselector.cpp

index cfa73f9ba22c08148aac25476f1319828b6ac9b3..1de6aec67a3f0d1e8504b346f4e35cb0bf88309d 100644 (file)
@@ -1,3 +1,14 @@
+2006-08-16  David Hyatt  <hyatt@apple.com>
+
+        Fix an issue with CSS2 system fonts where they did not respect text
+        zoom.  This was most visible with the new control fonts used for form
+        controls (they stopped swapping between small/mini/regular as you zoomed).
+
+        Reviewed by beth
+
+        * css/cssstyleselector.cpp:
+        (WebCore::CSSStyleSelector::applyProperty):
+
 2006-08-15  Justin Garcia  <justin.garcia@apple.com>
 
         Reviewed by thatcher
index ae67e813f0b7507dcf5b8ca2d7cb0c9123b97cf5..690143f68fe2083f57a17e5682d433ebe8ef28b3 100644 (file)
@@ -3399,8 +3399,12 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
             FontDescription fontDescription;
             theme()->systemFont(primitiveValue->getIdent(), fontDescription);
             // Double-check and see if the theme did anything.  If not, don't bother updating the font.
-            if (fontDescription.isAbsoluteSize() && style->setFontDescription(fontDescription))
-                fontDirty = true;
+            if (fontDescription.isAbsoluteSize()) {
+                // Handle the zoom factor.
+                fontDescription.setComputedSize(getComputedSizeFromSpecifiedSize(fontDescription.isAbsoluteSize(), fontDescription.specifiedSize()));
+                if (style->setFontDescription(fontDescription))
+                    fontDirty = true;
+            }
         } else if (value->isFontValue()) {
             FontValue *font = static_cast<FontValue*>(value);
             if (!font->style || !font->variant || !font->weight ||