Reviewed by kocienda.
authorvicki <vicki@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Jan 2005 00:35:19 +0000 (00:35 +0000)
committervicki <vicki@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Jan 2005 00:35:19 +0000 (00:35 +0000)
- fix <rdar://problem/3810661> computed style not handled for Apple extensions

        * khtml/css/css_computedstyle.cpp: (DOM::):
        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): add -apple-line-clamp and -apple-text-size-adjust

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

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

index bd1e55b9c3d30e9df40581d89cca3415bd9705d5..f7db8becabfdfb7321c9fa354a8ded20c836b152 100644 (file)
@@ -1,3 +1,12 @@
+2005-01-24  Vicki Murley <vicki@apple.com>
+
+        Reviewed by kocienda.
+
+       - fix <rdar://problem/3810661> computed style not handled for Apple extensions
+        * khtml/css/css_computedstyle.cpp: (DOM::):
+        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): add -apple-line-clamp and -apple-text-size-adjust
+
 2005-01-24  Darin Adler  <darin@apple.com>
 
         Reviewed by Kevin.
index 935085c975b7f7f4386662c8900cbb7b3cf72a97..9c82c07325810add0e3ad5bd02a7b1c64504167f 100644 (file)
@@ -104,6 +104,7 @@ static const int computedProperties[] = {
     CSS_PROP_LEFT,
     CSS_PROP_LETTER_SPACING,
     CSS_PROP__KHTML_LINE_BREAK,
+    CSS_PROP__APPLE_LINE_CLAMP,
     CSS_PROP_LINE_HEIGHT,
     CSS_PROP_LIST_STYLE_IMAGE,
     CSS_PROP_LIST_STYLE_POSITION,
@@ -172,6 +173,7 @@ static const int inheritableProperties[] = {
     CSS_PROP_TEXT_ALIGN,
     CSS_PROP_TEXT_DECORATION, // this is not inheritable, yet we do want to consider it for typing style (name change needed? redesign?)
     CSS_PROP_TEXT_INDENT,
+    CSS_PROP__APPLE_TEXT_SIZE_ADJUST,
     CSS_PROP_TEXT_TRANSFORM,
     CSS_PROP_ORPHANS,
     CSS_PROP_WHITE_SPACE,
@@ -706,6 +708,8 @@ CSSValueImpl *CSSComputedStyleDeclarationImpl::getPropertyCSSValue(int propertyI
         if (style->letterSpacing() == 0)
             return new CSSPrimitiveValueImpl(CSS_VAL_NORMAL);
         return new CSSPrimitiveValueImpl(style->letterSpacing(), CSSPrimitiveValue::CSS_PX);
+    case CSS_PROP__APPLE_LINE_CLAMP:
+        return new CSSPrimitiveValueImpl(style->lineClamp(), CSSPrimitiveValue::CSS_PERCENTAGE);
     case CSS_PROP_LINE_HEIGHT: {
         Length length(style->lineHeight());
        if (length.value < 0)
@@ -987,6 +991,11 @@ CSSValueImpl *CSSComputedStyleDeclarationImpl::getPropertyCSSValue(int propertyI
         return valueForLength(style->textIndent());
     case CSS_PROP_TEXT_SHADOW:
         return valueForShadow(style->textShadow());
+    case CSS_PROP__APPLE_TEXT_SIZE_ADJUST:
+        if (style->textSizeAdjust()) 
+            return new CSSPrimitiveValueImpl(CSS_VAL_AUTO);
+        else
+            return new CSSPrimitiveValueImpl(CSS_VAL_NONE);
     case CSS_PROP_TEXT_TRANSFORM:
         switch (style->textTransform()) {
             case khtml::CAPITALIZE: