[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 08:00:51 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d1d8ea3b68374edaeae935e8c3af79bfcd396b03
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 10 23:22:10 2003 +0000

    	Beginning of work on border collapsing.  This patch makes sure that cell spacing between cells is
    	ignored and that padding on tables is ignored.  This ensures that there is no space between cells
    	or between the edges of cells and the border of the table itself.
    
            Reviewed by john
    
            * khtml/rendering/render_style.h:
            (khtml::RenderStyle::setBitDefaults):
            * khtml/rendering/render_table.cpp:
            (RenderTable::setStyle):
            (RenderTable::layout):
            * khtml/rendering/render_table.h:
            (khtml::RenderTable::collapseBorders):
            (khtml::RenderTable::bordersPaddingAndSpacing):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5171 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index c035c0a..8964bd5 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,19 +1,36 @@
 2003-10-10  David Hyatt  <hyatt at apple.com>
 
+	Beginning of work on border collapsing.  This patch makes sure that cell spacing between cells is
+	ignored and that padding on tables is ignored.  This ensures that there is no space between cells
+	or between the edges of cells and the border of the table itself.  
+
+        Reviewed by john
+
+        * khtml/rendering/render_style.h:
+        (khtml::RenderStyle::setBitDefaults):
+        * khtml/rendering/render_table.cpp:
+        (RenderTable::setStyle):
+        (RenderTable::layout):
+        * khtml/rendering/render_table.h:
+        (khtml::RenderTable::collapseBorders):
+        (khtml::RenderTable::bordersPaddingAndSpacing):
+
+2003-10-10  David Hyatt  <hyatt at apple.com>
+
 	Fix for table regression 3449444, as well as a patch to support padding on tables and to stop
 	honoring borders on row groups (both of which are correct for the "separate" border model).
 	
 	* khtml/rendering/render_table.cpp:
-	        (RenderTable::layout):
-	        (RenderTableSection::calcRowHeight):
-	        (RenderTableSection::layoutRows):
-	        * khtml/rendering/render_table.h:
-	        (khtml::RenderTable::bordersPaddingAndSpacing):
-	        * khtml/rendering/table_layout.cpp:
-	        (FixedTableLayout::calcMinMaxWidth):
-	        (FixedTableLayout::layout):
-	        (AutoTableLayout::calcMinMaxWidth):
-	        (AutoTableLayout::layout):
+        (RenderTable::layout):
+        (RenderTableSection::calcRowHeight):
+        (RenderTableSection::layoutRows):
+        * khtml/rendering/render_table.h:
+        (khtml::RenderTable::bordersPaddingAndSpacing):
+        * khtml/rendering/table_layout.cpp:
+        (FixedTableLayout::calcMinMaxWidth):
+        (FixedTableLayout::layout):
+        (AutoTableLayout::calcMinMaxWidth):
+        (AutoTableLayout::layout):
 
 	Reviewed by darin
 
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index c035c0a..8964bd5 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,19 +1,36 @@
 2003-10-10  David Hyatt  <hyatt at apple.com>
 
+	Beginning of work on border collapsing.  This patch makes sure that cell spacing between cells is
+	ignored and that padding on tables is ignored.  This ensures that there is no space between cells
+	or between the edges of cells and the border of the table itself.  
+
+        Reviewed by john
+
+        * khtml/rendering/render_style.h:
+        (khtml::RenderStyle::setBitDefaults):
+        * khtml/rendering/render_table.cpp:
+        (RenderTable::setStyle):
+        (RenderTable::layout):
+        * khtml/rendering/render_table.h:
+        (khtml::RenderTable::collapseBorders):
+        (khtml::RenderTable::bordersPaddingAndSpacing):
+
+2003-10-10  David Hyatt  <hyatt at apple.com>
+
 	Fix for table regression 3449444, as well as a patch to support padding on tables and to stop
 	honoring borders on row groups (both of which are correct for the "separate" border model).
 	
 	* khtml/rendering/render_table.cpp:
-	        (RenderTable::layout):
-	        (RenderTableSection::calcRowHeight):
-	        (RenderTableSection::layoutRows):
-	        * khtml/rendering/render_table.h:
-	        (khtml::RenderTable::bordersPaddingAndSpacing):
-	        * khtml/rendering/table_layout.cpp:
-	        (FixedTableLayout::calcMinMaxWidth):
-	        (FixedTableLayout::layout):
-	        (AutoTableLayout::calcMinMaxWidth):
-	        (AutoTableLayout::layout):
+        (RenderTable::layout):
+        (RenderTableSection::calcRowHeight):
+        (RenderTableSection::layoutRows):
+        * khtml/rendering/render_table.h:
+        (khtml::RenderTable::bordersPaddingAndSpacing):
+        * khtml/rendering/table_layout.cpp:
+        (FixedTableLayout::calcMinMaxWidth):
+        (FixedTableLayout::layout):
+        (AutoTableLayout::calcMinMaxWidth):
+        (AutoTableLayout::layout):
 
 	Reviewed by darin
 
diff --git a/WebCore/khtml/rendering/render_style.h b/WebCore/khtml/rendering/render_style.h
index fb5aa7d..e5e9ac0 100644
--- a/WebCore/khtml/rendering/render_style.h
+++ b/WebCore/khtml/rendering/render_style.h
@@ -720,7 +720,7 @@ protected:
 	inherited_flags._text_decorations = TDNONE;
 	inherited_flags._cursor_style = CURSOR_AUTO;
 	inherited_flags._direction = LTR;
-	inherited_flags._border_collapse = true;
+	inherited_flags._border_collapse = false;
 	inherited_flags._white_space = NORMAL;
 	inherited_flags._font_variant = FVNORMAL;
 	inherited_flags._visuallyOrdered = false;
diff --git a/WebCore/khtml/rendering/render_table.cpp b/WebCore/khtml/rendering/render_table.cpp
index 24a2c32..283d563 100644
--- a/WebCore/khtml/rendering/render_table.cpp
+++ b/WebCore/khtml/rendering/render_table.cpp
@@ -88,7 +88,8 @@ void RenderTable::setStyle(RenderStyle *_style)
     setInline(style()->display()==INLINE_TABLE && !isPositioned());
     setReplaced(style()->display()==INLINE_TABLE);
 
-    spacing = style()->borderSpacing();
+    // In the collapsed border model, there is no cell spacing.
+    spacing = collapseBorders() ? 0 : style()->borderSpacing();
     columnPos[0] = spacing;
 
     if ( !tableLayout || style()->tableLayout() != oldTableLayout ) {
@@ -271,7 +272,9 @@ void RenderTable::layout()
         m_height += tCaption->height() + tCaption->marginTop() + tCaption->marginBottom();
     }
 
-    m_height += borderTop() + paddingTop();
+    m_height += borderTop();
+    if (!collapseBorders())
+        m_height += paddingTop();
 
     int oldHeight = m_height;
     calcHeight();
@@ -329,7 +332,10 @@ void RenderTable::layout()
             firstBody->layoutRows( th - calculatedHeight );
         }
     }
-    int bl = borderLeft()+paddingLeft();
+    
+    int bl = borderLeft();
+    if (!collapseBorders())
+        bl += paddingLeft();
 
     // position the table sections
     if ( head ) {
@@ -350,7 +356,9 @@ void RenderTable::layout()
     }
 
 
-    m_height += paddingBottom() + borderBottom();
+    m_height += borderBottom();
+    if (!collapseBorders())
+        m_height += paddingBottom();
 
     if(tCaption && tCaption->style()->captionSide()==CAPBOTTOM) {
         tCaption->setPos(tCaption->marginLeft(), m_height);
diff --git a/WebCore/khtml/rendering/render_table.h b/WebCore/khtml/rendering/render_table.h
index 19e0f23..c51a3c8 100644
--- a/WebCore/khtml/rendering/render_table.h
+++ b/WebCore/khtml/rendering/render_table.h
@@ -85,7 +85,9 @@ public:
         { return columnPos[col]; }
 
     int cellSpacing() const { return spacing; }
-
+    
+    bool collapseBorders() const { return style()->borderCollapse(); }
+        
     Rules getRules() const { return rules; }
 
     const QColor &bgColor() const { return style()->backgroundColor(); }
@@ -149,7 +151,8 @@ public:
     }
 
     int bordersPaddingAndSpacing() const {
-	return borderLeft() + borderRight() + paddingLeft() + paddingRight() + (numEffCols()+1) * cellSpacing();
+	return borderLeft() + borderRight() + 
+               (collapseBorders() ? 0 : (paddingLeft() + paddingRight() + (numEffCols()+1) * cellSpacing()));
     }
 
     RenderTableCol *colElement( int col );

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list