[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 07:06:13 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit eb6ee89e77d01d5a2d00ae7655c27f279cb77a0e
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 22 01:17:36 2002 +0000

    	Fixed for tables.  Make the percentage height calculation
    	more robust.  Also add a hack for replaced elements to
    	subtract out their margins when computing percentage widths.
    	This keeps them from spilling out of table cells.
    
            * khtml/rendering/render_box.cpp:
            (RenderBox::calcReplacedWidth):
            (RenderBox::calcReplacedHeight):
            * khtml/rendering/render_table.cpp:
            (RenderTable::layoutRows):
            * khtml/xml/dom_nodeimpl.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2812 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 5760d15..80403a0 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,17 @@
+2002-11-21  David Hyatt  <hyatt at apple.com>
+
+	Fixed for tables.  Make the percentage height calculation
+	more robust.  Also add a hack for replaced elements to
+	subtract out their margins when computing percentage widths.
+	This keeps them from spilling out of table cells.
+	
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::calcReplacedWidth):
+        (RenderBox::calcReplacedHeight):
+        * khtml/rendering/render_table.cpp:
+        (RenderTable::layoutRows):
+        * khtml/xml/dom_nodeimpl.h:
+
 === Alexander-33 ===
 
 2002-11-21  Richard Williamson   <rjw at apple.com>
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 5760d15..80403a0 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,17 @@
+2002-11-21  David Hyatt  <hyatt at apple.com>
+
+	Fixed for tables.  Make the percentage height calculation
+	more robust.  Also add a hack for replaced elements to
+	subtract out their margins when computing percentage widths.
+	This keeps them from spilling out of table cells.
+	
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::calcReplacedWidth):
+        (RenderBox::calcReplacedHeight):
+        * khtml/rendering/render_table.cpp:
+        (RenderTable::layoutRows):
+        * khtml/xml/dom_nodeimpl.h:
+
 === Alexander-33 ===
 
 2002-11-21  Richard Williamson   <rjw at apple.com>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5760d15..80403a0 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,17 @@
+2002-11-21  David Hyatt  <hyatt at apple.com>
+
+	Fixed for tables.  Make the percentage height calculation
+	more robust.  Also add a hack for replaced elements to
+	subtract out their margins when computing percentage widths.
+	This keeps them from spilling out of table cells.
+	
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::calcReplacedWidth):
+        (RenderBox::calcReplacedHeight):
+        * khtml/rendering/render_table.cpp:
+        (RenderTable::layoutRows):
+        * khtml/xml/dom_nodeimpl.h:
+
 === Alexander-33 ===
 
 2002-11-21  Richard Williamson   <rjw at apple.com>
diff --git a/WebCore/khtml/rendering/render_box.cpp b/WebCore/khtml/rendering/render_box.cpp
index 2f52820..af9a659 100644
--- a/WebCore/khtml/rendering/render_box.cpp
+++ b/WebCore/khtml/rendering/render_box.cpp
@@ -644,8 +644,15 @@ short RenderBox::calcReplacedWidth(bool* ieHack) const
     {
         //RenderObject* p = parent();
         int cw = containingBlockWidth();
-        if ( cw )
+        if ( cw ) {
             width = w.minWidth( cw );
+#if APPLE_CHANGES
+            // Aqua form controls have margins.  In order to make this work out well,
+            // subtract our margins out.
+            if (isFormElement())
+                width -= (marginLeft() + marginRight());
+#endif
+        }
         else
             width = intrinsicWidth();
         break;
@@ -688,7 +695,13 @@ int RenderBox::calcReplacedHeight() const
 	    if (cb->isTableCell()) {
 	        RenderTableCell* tableCell = static_cast<RenderTableCell*>(cb);
 	        if (tableCell->style()->height().isPercent() && tableCell->getCellPercentageHeight()) {
-                    height = h.minWidth(tableCell->getCellPercentageHeight());
+                height = h.minWidth(tableCell->getCellPercentageHeight());
+#if APPLE_CHANGES
+                // Aqua form controls have margins.  In order to make this work out well,
+                // subtract our margins out.
+                if (isFormElement())
+                    height -= (marginTop() + marginBottom());
+#endif
                     break;
                 }
             }
diff --git a/WebCore/khtml/rendering/render_table.cpp b/WebCore/khtml/rendering/render_table.cpp
index 213e5b9..516c4de 100644
--- a/WebCore/khtml/rendering/render_table.cpp
+++ b/WebCore/khtml/rendering/render_table.cpp
@@ -1424,7 +1424,6 @@ void RenderTable::layoutRows(int yoff)
         calcRowHeight(r);
     }
 
-
     // html tables with percent height are relative to view
     Length h = style()->height();
     int th=0;
@@ -1432,26 +1431,26 @@ void RenderTable::layoutRows(int yoff)
         th = h.value;
     else if (h.isPercent())
     {
-        Length ch = containingBlock()->style()->height();
-        if (ch.isFixed())
-            th = h.width(ch.value);
-        else
-        {
-            // check we or not inside a table
-            RenderObject* ro = parent();
-            for (; ro && !ro->isTableCell(); ro=ro->parent());
-            if (!ro)
-            {
-		// we need to substract the bodys margins
-		// The cb is the <body>. Subtract out its margins. -dwh
-                th = h.width(viewRect().height() 
-			     - containingBlock()->marginBottom()
-			     - containingBlock()->marginTop());
-                // not really, but this way the view height change
-                // gets propagated correctly
-                setOverhangingContents();
+        RenderObject* c = containingBlock();
+        for ( ; 
+             !c->isBody() && !c->isTableCell() && !c->isPositioned() && !c->isFloating(); 
+             c = c->containingBlock()) {
+            Length ch = c->style()->height();
+            if (ch.isFixed()) {
+                th = h.width(ch.value);
+                break;
             }
         }
+        
+        if (!c->isTableCell()) {
+            // we need to substract out the margins of this block. -dwh
+            th = h.width(viewRect().height() 
+                - c->marginBottom()
+                - c->marginTop());
+            // not really, but this way the view height change
+            // gets propagated correctly
+            setOverhangingContents();
+        }
     }
     
     bool tableGrew = false;
@@ -1462,11 +1461,11 @@ void RenderTable::layoutRows(int yoff)
         if (dh>0)
         {
             // There is room to grow.  Distribute the space among the rows
-	    // by weighting according to their calculated heights,
-	    // unless there are rows that have percentage
+            // by weighting according to their calculated heights,
+            // unless there are rows that have percentage
             // heights.  In that case, only the rows with percentage heights
             // get the space, and the weight is distributed after computing
-	    // a normalized flex. -dwh
+            // a normalized flex. -dwh
             tableGrew = true;
             int totalPercentage = 0;
             for ( unsigned int r = 0; r < totalRows; r++ )
@@ -1533,11 +1532,11 @@ void RenderTable::layoutRows(int yoff)
                     cell->layout();
                 }
             }
-
+    
             if (cellChildrenFlex) {
-	        // Alignment within a cell is based off the calculated
-	        // height, which becomes irrelevant once the cell has
-	        // been resized based off its percentage. -dwh
+                // Alignment within a cell is based off the calculated
+                // height, which becomes irrelevant once the cell has
+                // been resized based off its percentage. -dwh
                 cell->setCellTopExtra(0);
                 cell->setCellBottomExtra(0);
             }
diff --git a/WebCore/khtml/xml/dom_nodeimpl.h b/WebCore/khtml/xml/dom_nodeimpl.h
index f031142..4cf8e54 100644
--- a/WebCore/khtml/xml/dom_nodeimpl.h
+++ b/WebCore/khtml/xml/dom_nodeimpl.h
@@ -105,7 +105,11 @@ public:
     virtual bool isDocumentNode() const { return false; }
     virtual bool isXMLElementNode() const { return false; }
     
+    // Used by <form> elements to indicate a malformed state of some kind, typically
+    // used to keep from applying the bottom margin of the form.
     virtual bool isMalformed() { return false; }
+    virtual void setMalformed(bool malformed) {};
+    
     virtual bool containsOnlyWhitespace() const { return false; }
     
     // helper functions not being part of the DOM

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list