[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:49:33 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit e062a61bc77b6575dbca69df80aa8c809c99af9e
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 15 02:04:25 2002 +0000

    	Adding helper functions for handling of collapsing margins.
    	Not used yet.
    
            * khtml/rendering/render_object.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2321 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index e91ee88..ab29d7d 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,10 @@
+2002-10-14  David Hyatt  <hyatt at apple.com>
+
+	Adding helper functions for handling of collapsing margins.
+	Not used yet.
+	
+        * khtml/rendering/render_object.h:
+
 2002-10-14  Darin Adler  <darin at apple.com>
 
 	Fixed problems with named colors.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index e91ee88..ab29d7d 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,10 @@
+2002-10-14  David Hyatt  <hyatt at apple.com>
+
+	Adding helper functions for handling of collapsing margins.
+	Not used yet.
+	
+        * khtml/rendering/render_object.h:
+
 2002-10-14  Darin Adler  <darin at apple.com>
 
 	Fixed problems with named colors.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index e91ee88..ab29d7d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,10 @@
+2002-10-14  David Hyatt  <hyatt at apple.com>
+
+	Adding helper functions for handling of collapsing margins.
+	Not used yet.
+	
+        * khtml/rendering/render_object.h:
+
 2002-10-14  Darin Adler  <darin at apple.com>
 
 	Fixed problems with named colors.
diff --git a/WebCore/khtml/rendering/render_object.h b/WebCore/khtml/rendering/render_object.h
index a6caab3..17a6ab8 100644
--- a/WebCore/khtml/rendering/render_object.h
+++ b/WebCore/khtml/rendering/render_object.h
@@ -359,7 +359,42 @@ public:
     virtual int offsetLeft() const;
     virtual int offsetTop() const;
     virtual RenderObject* offsetParent() const;
-     
+    
+    // The following four functions are used to implement collapsing margins.
+    // All objects know their maximal positive and negative margins.  The
+    // formula for computing a collapsed margin is |maxPosMargin|-|maxNegmargin|.
+    // For a non-collapsing, e.g., a leaf element, this formula will simply return
+    // the margin of the element.  Blocks override the maxTopMargin and maxBottomMargin
+    // methods.
+    virtual short collapsedMarginTop() const 
+        { return maxTopMargin(true)-maxTopMargin(false); }
+    virtual short collapsedMarginBottom() const 
+        { return maxBottomMargin(true)-maxBottomMargin(false); }
+    virtual short maxTopMargin(bool positive) const {
+        if (positive)
+            if (marginTop() > 0)
+                return marginTop();
+            else
+                return 0;
+        else
+            if (marginTop() < 0)
+                return 0 - marginTop();
+            else
+                return 0;
+    }
+    virtual short maxBottomMargin(bool positive) const {
+        if (positive)
+            if (marginBottom() > 0)
+                return marginBottom();
+            else
+                return 0;
+        else
+            if (marginBottom() < 0)
+                return 0 - marginBottom();
+            else
+                return 0;
+    }
+
     virtual short marginTop() const { return 0; }
     virtual short marginBottom() const { return 0; }
     virtual short marginLeft() const { return 0; }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list