Reviewed by Hyatt.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Aug 2006 04:14:20 +0000 (04:14 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Aug 2006 04:14:20 +0000 (04:14 +0000)
        - removed obsolete cell margin hack

        * rendering/RenderBox.cpp: (WebCore::RenderBox::calcVerticalMargins):
        Set top and bottom margins to 0 for table cells instead of -16384.
        No effect on layout (including layout tests).

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
        Added a few comments about differences between this class and the
        what the CSS specification says about computed style.

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

WebCore/ChangeLog
WebCore/css/CSSComputedStyleDeclaration.cpp
WebCore/rendering/RenderBox.cpp

index 824c06bb5cb26e3950effe020451e4c0c4b4787b..beb9e9e950436e91cf3ba4a2137e0cd236368bf3 100644 (file)
@@ -1,3 +1,18 @@
+2006-07-31  Darin Adler  <darin@apple.com>
+
+        Reviewed by Hyatt.
+
+        - removed obsolete cell margin hack
+
+        * rendering/RenderBox.cpp: (WebCore::RenderBox::calcVerticalMargins):
+        Set top and bottom margins to 0 for table cells instead of -16384.
+        No effect on layout (including layout tests).
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+        Added a few comments about differences between this class and the
+        what the CSS specification says about computed style.
+
 2006-07-31  Mark Rowe  <opendarwin.org@bdash.net.nz>
 
         Reviewed by Maciej.
index 2021fddb48dd0f474ecb63c296086369f8e9fa2e..2ecba0f7000890e3bd260952b7cad24377c342ae 100644 (file)
@@ -859,12 +859,16 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
         ASSERT_NOT_REACHED();
         return 0;
     case CSS_PROP_MARGIN_TOP:
+        // FIXME: Supposed to return the percentage if percentage was specified.
         return new CSSPrimitiveValue(renderer->marginTop(), CSSPrimitiveValue::CSS_PX);
     case CSS_PROP_MARGIN_RIGHT:
+        // FIXME: Supposed to return the percentage if percentage was specified.
         return new CSSPrimitiveValue(renderer->marginRight(), CSSPrimitiveValue::CSS_PX);
     case CSS_PROP_MARGIN_BOTTOM:
+        // FIXME: Supposed to return the percentage if percentage was specified.
         return new CSSPrimitiveValue(renderer->marginBottom(), CSSPrimitiveValue::CSS_PX);
     case CSS_PROP_MARGIN_LEFT:
+        // FIXME: Supposed to return the percentage if percentage was specified.
         return new CSSPrimitiveValue(renderer->marginLeft(), CSSPrimitiveValue::CSS_PX);
     case CSS_PROP__WEBKIT_MARQUEE:
         // FIXME: unimplemented
index bc6bed4e8655b7b9c789e1d28ef442992a3b4649..057aa3b22fe838df52880205de764203b4ef83cd 100644 (file)
@@ -52,8 +52,6 @@ namespace WebCore {
 
 using namespace HTMLNames;
 
-#define TABLECELLMARGIN -0x4000
-
 RenderBox::RenderBox(Node* node)
     : RenderObject(node)
 {
@@ -1430,10 +1428,9 @@ int RenderBox::availableHeightUsing(const Length& h) const
 
 void RenderBox::calcVerticalMargins()
 {
-    if( isTableCell() ) {
-        // table margins are basically infinite
-        m_marginTop = TABLECELLMARGIN;
-        m_marginBottom = TABLECELLMARGIN;
+    if (isTableCell()) {
+        m_marginTop = 0;
+        m_marginBottom = 0;
         return;
     }