Make sure line-height returns the correct value for normal.
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Nov 2004 00:30:34 +0000 (00:30 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Nov 2004 00:30:34 +0000 (00:30 +0000)
        Reviewed by darin

        * khtml/css/css_computedstyle.cpp:
        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):

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

WebCore/ChangeLog-2005-08-23
WebCore/khtml/css/css_computedstyle.cpp

index 7f846d6458ad51b6d6a55bb5d51a136bc291a1e6..65e73ff6e852f12b64d694fd05a64aebe9e113bc 100644 (file)
@@ -1,3 +1,12 @@
+2004-11-04  David Hyatt  <hyatt@apple.com>
+
+       Make sure line-height returns the correct value for normal.
+       
+        Reviewed by darin
+
+        * khtml/css/css_computedstyle.cpp:
+        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
+
 2004-11-04  David Harrison  <harrison@apple.com>
 
         Reviewed by Ken Kocienda.
index 9342d66a2972c1084b8efb789098b14f3fe45d86..5b9183faa24b87b8ff13b117014d276b3c7e9141 100644 (file)
@@ -490,6 +490,8 @@ CSSValueImpl *CSSComputedStyleDeclarationImpl::getPropertyCSSValue(int propertyI
         return new CSSPrimitiveValueImpl(style->letterSpacing(), CSSPrimitiveValue::CSS_PX);
     case CSS_PROP_LINE_HEIGHT: {
         Length length(style->lineHeight());
+       if (length.value < 0)
+            return new CSSPrimitiveValueImpl(CSS_VAL_NORMAL);
         if (length.isPercent()) {
             float computedSize = style->htmlFont().getFontDef().computedSize;
             return new CSSPrimitiveValueImpl((int)(length.length() * computedSize) / 100, CSSPrimitiveValue::CSS_PX);