[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:26:04 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit efb435f47708262ac7694114fb4cc6592d98bb90
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 11 03:33:50 2004 +0000

    	Merged patch that fixes clear:both for floats.  This patch comes from the KHTML tree.
    
            * khtml/rendering/render_block.cpp:
            (khtml::RenderBlock::positionNewFloats):
            * layout-tests/fast/block/float/029-expected.txt: Added.
            * layout-tests/fast/block/float/029.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6063 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/fast/block/float/029-expected.txt b/LayoutTests/fast/block/float/029-expected.txt
new file mode 100644
index 0000000..cb8a663
--- /dev/null
+++ b/LayoutTests/fast/block/float/029-expected.txt
@@ -0,0 +1,36 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x54
+  RenderBlock {HTML} at (0,0) size 800x54
+    RenderBody {BODY} at (8,8) size 784x38
+      RenderBlock (floating) {DIV} at (532,0) size 252x102 [border: (1px solid #FF0000)]
+        RenderText {TEXT} at (1,1) size 86x18
+          text run at (1,1) width 86: "TOP-RIGHT"
+        RenderBR {BR} at (0,0) size 0x0
+        RenderText {TEXT} at (1,19) size 65x18
+          text run at (1,19) width 65: "float:right;"
+        RenderBR {BR} at (0,0) size 0x0
+        RenderText {TEXT} at (1,37) size 88x18
+          text run at (1,37) width 68: "width: 250"
+          text run at (69,37) width 20: "px;"
+        RenderBR {BR} at (0,0) size 0x0
+        RenderText {TEXT} at (1,55) size 87x18
+          text run at (1,55) width 67: "height:100"
+          text run at (68,55) width 20: "px;"
+      RenderBlock (anonymous) at (0,0) size 784x0
+        RenderText {TEXT} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,0) size 394x38 [border: (1px solid #FF0000)]
+        RenderText {TEXT} at (1,1) size 31x18
+          text run at (1,1) width 31: "TOP"
+        RenderBR {BR} at (0,0) size 0x0
+        RenderText {TEXT} at (1,19) size 73x18
+          text run at (1,19) width 73: "width:50%;"
+      RenderBlock (floating) {DIV} at (0,102) size 115x56 [border: (1px solid #FF0000)]
+        RenderText {TEXT} at (1,1) size 113x18
+          text run at (1,1) width 113: "BOTTOM-LEFT"
+        RenderBR {BR} at (0,0) size 0x0
+        RenderText {TEXT} at (1,19) size 60x18
+          text run at (1,19) width 60: "float: left;"
+        RenderBR {BR} at (0,0) size 0x0
+        RenderText {TEXT} at (1,37) size 70x18
+          text run at (1,37) width 70: "clear: both;"
diff --git a/LayoutTests/fast/block/float/029.html b/LayoutTests/fast/block/float/029.html
new file mode 100644
index 0000000..45139b4
--- /dev/null
+++ b/LayoutTests/fast/block/float/029.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
+	<head>
+		<title>CSS Test</title>
+
+		<style type="text/css">
+
+			div {
+				border: solid 1px red;
+			}
+			
+			#topRight {
+				float:right;
+				width: 250px;
+				height:100px;
+			}
+			
+			#top {	
+				width:50%;
+			}
+			
+			#bottomLeft {
+				float: left;
+				clear: both;
+			}
+		</style>	
+
+	</head>
+
+	<body>
+
+		<div id="topRight">
+			TOP-RIGHT<br />
+			float:right;<br />
+			width: 250px;<br />
+			height:100px;
+		</div>
+
+		<div id="top">
+			TOP<br />
+			width:50%;
+		</div>
+
+
+		<div id="bottomLeft">
+			BOTTOM-LEFT<br />
+			float: left;<br />
+			clear: both;
+		</div>
+		
+	</body>
+</html>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index e709b30..8235c43 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,14 @@
 2004-02-10  David Hyatt  <hyatt at apple.com>
 
+	Merged patch that fixes clear:both for floats.  This patch comes from the KHTML tree.
+	
+        * khtml/rendering/render_block.cpp:
+        (khtml::RenderBlock::positionNewFloats):
+        * layout-tests/fast/block/float/029-expected.txt: Added.
+        * layout-tests/fast/block/float/029.html: Added.
+
+2004-02-10  David Hyatt  <hyatt at apple.com>
+
 	Fix crasher in list code caused by incorrect style deallocation.  Regression from the
 	arena changes for RenderStyles.
 	
diff --git a/WebCore/khtml/rendering/render_block.cpp b/WebCore/khtml/rendering/render_block.cpp
index 3bf002a..2cf12a2 100644
--- a/WebCore/khtml/rendering/render_block.cpp
+++ b/WebCore/khtml/rendering/render_block.cpp
@@ -1445,16 +1445,19 @@ void RenderBlock::positionNewFloats()
         int oldChildX = o->xPos();
         int oldChildY = o->yPos();
         
+        if ( o->style()->clear() & CLEFT )
+            y = kMax( leftBottom(), y );
+        if ( o->style()->clear() & CRIGHT )
+            y = kMax( rightBottom(), y );
+
         if (o->style()->floating() == FLEFT)
         {
-            if ( o->style()->clear() & CLEFT )
-                y = QMAX( leftBottom(), y );
             int heightRemainingLeft = 1;
             int heightRemainingRight = 1;
             int fx = leftRelOffset(y,lo, false, &heightRemainingLeft);
             while (rightRelOffset(y,ro, false, &heightRemainingRight)-fx < fwidth)
             {
-                y += QMIN( heightRemainingLeft, heightRemainingRight );
+                y += kMin( heightRemainingLeft, heightRemainingRight );
                 fx = leftRelOffset(y,lo, false, &heightRemainingLeft);
             }
             if (fx<0) fx=0;
@@ -1464,14 +1467,12 @@ void RenderBlock::positionNewFloats()
         }
         else
         {
-            if ( o->style()->clear() & CRIGHT )
-                y = QMAX( rightBottom(), y );
             int heightRemainingLeft = 1;
             int heightRemainingRight = 1;
             int fx = rightRelOffset(y,ro, false, &heightRemainingRight);
             while (fx - leftRelOffset(y,lo, false, &heightRemainingLeft) < fwidth)
             {
-                y += QMIN(heightRemainingLeft, heightRemainingRight);
+                y += kMin(heightRemainingLeft, heightRemainingRight);
                 fx = rightRelOffset(y,ro, false, &heightRemainingRight);
             }
             if (fx<f->width) fx=f->width;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list