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


The following commit has been merged in the debian/unstable branch:
commit 83a7df497b903172d7a1164a9464eb07a38dc186
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu May 8 21:59:28 2003 +0000

    	Fix for a problem where positioned/floating children with
    	percentage width tables inside them  don't expand to fill
    	the width of their containing block.
    
    	The way to solve this is to detect this
    	case and treat the block as though it has an infinite maxwidth.
    
    	Note that this is a quirk only, since doing this for real would
    	be crazy.  We're basically just matching broken WinIE behavior.
    
            Reviewed by kocienda
    
            * khtml/rendering/render_block.cpp:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4316 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 6417fd2..5543dc1 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,19 @@
+2003-05-08  David Hyatt  <hyatt at apple.com>
+
+	Fix for a problem where positioned/floating children with
+	percentage width tables inside them  don't expand to fill 
+	the width of their containing block.  
+
+	The way to solve this is to detect this
+	case and treat the block as though it has an infinite maxwidth.
+
+	Note that this is a quirk only, since doing this for real would
+	be crazy.  We're basically just matching broken WinIE behavior.
+	
+        Reviewed by kocienda
+
+        * khtml/rendering/render_block.cpp:
+
 === Safari-78 ===
 
 2003-05-08  Darin Adler  <darin at apple.com>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 6417fd2..5543dc1 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,19 @@
+2003-05-08  David Hyatt  <hyatt at apple.com>
+
+	Fix for a problem where positioned/floating children with
+	percentage width tables inside them  don't expand to fill 
+	the width of their containing block.  
+
+	The way to solve this is to detect this
+	case and treat the block as though it has an infinite maxwidth.
+
+	Note that this is a quirk only, since doing this for real would
+	be crazy.  We're basically just matching broken WinIE behavior.
+	
+        Reviewed by kocienda
+
+        * khtml/rendering/render_block.cpp:
+
 === Safari-78 ===
 
 2003-05-08  Darin Adler  <darin at apple.com>
diff --git a/WebCore/khtml/rendering/render_block.cpp b/WebCore/khtml/rendering/render_block.cpp
index 680b1fe..f311c50 100644
--- a/WebCore/khtml/rendering/render_block.cpp
+++ b/WebCore/khtml/rendering/render_block.cpp
@@ -2190,6 +2190,9 @@ void RenderBlock::calcInlineMinMaxWidth()
     // 			<< " m_maxWidth=" << m_maxWidth << endl;
 }
 
+// Use a very large value (in effect infinite).
+#define BLOCK_MAX_WIDTH 15000
+
 void RenderBlock::calcBlockMinMaxWidth()
 {
     bool nowrap = style()->whiteSpace() == NOWRAP;
@@ -2250,7 +2253,31 @@ void RenderBlock::calcBlockMinMaxWidth()
             m_maxWidth = w;
 
         w = child->maxWidth() + margin;
+
         if(m_maxWidth < w) m_maxWidth = w;
+
+        // A very specific WinIE quirk.
+        // Example:
+        /*
+           <div style="position:absolute; width:100px; top:50px;">
+              <div style="position:absolute;left:0px;top:50px;height:50px;background-color:green">
+                <table style="width:100%"><tr><td></table>
+              </div>
+           </div>
+        */
+        // In the above example, the inner absolute positioned block should have a computed width
+        // of 100px because of the table.
+        // We can achieve this effect by making the maxwidth of blocks that contain tables
+        // with percentage widths be infinite (as long as they are not inside a table cell).
+        if (style()->htmlHacks() && child->style()->width().type == Percent &&
+            !isTableCell() && child->isTable() && m_maxWidth < BLOCK_MAX_WIDTH) {
+            RenderBlock* cb = containingBlock();
+            while (!cb->isCanvas() && !cb->isTableCell())
+                cb = cb->containingBlock();
+            if (!cb->isTableCell())
+                m_maxWidth = BLOCK_MAX_WIDTH;
+        }
+        
         child = child->nextSibling();
     }
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list