[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
aestes at apple.com
aestes at apple.com
Wed Dec 22 14:59:58 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 4c2db34f076c31d14de9e4df01572f23ab8946a5
Author: aestes at apple.com <aestes at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 27 08:18:48 2010 +0000
2010-10-27 Andy Estes <aestes at apple.com>
Reviewed by David Hyatt.
Siblings of floated elements should be cleared below the float if they
are too wide to fit in the containing block.
https://bugs.webkit.org/show_bug.cgi?id=48396
Test: fast/block/float/clear-element-too-wide-for-containing-block.html
WebKit did not clear elements adjacent to floats if they were wider than
the containing block, instead keeping them on the same line and allowing
them to spill out the right side of the containing block. We should
match the spec in this regard and clear the element below the float even
if it is too wide for the containing block. Doing this seems to also
match IE's and Firefox's behavior.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::getClearDelta): Continue to compute the clear
delta even if the child's minimum preferred width is greater than the
containing block's available width.
2010-10-27 Andy Estes <aestes at apple.com>
Reviewed by David Hyatt.
Siblings of floated elements should be cleared below the float if they
are too wide to fit in the containing block.
https://bugs.webkit.org/show_bug.cgi?id=48396
* fast/block/float/clear-element-too-wide-for-containing-block.html: Copied from LayoutTests/fast/block/float/tableshifting.html.
* fast/block/float/tableshifting.html: Removed.
* platform/mac/fast/block/float/clear-element-too-wide-for-containing-block-expected.checksum: Added.
* platform/mac/fast/block/float/clear-element-too-wide-for-containing-block-expected.png: Added.
* platform/mac/fast/block/float/clear-element-too-wide-for-containing-block-expected.txt: Added.
* platform/mac/fast/block/float/tableshifting-expected.checksum: Removed.
* platform/mac/fast/block/float/tableshifting-expected.png: Removed.
* platform/mac/fast/block/float/tableshifting-expected.txt: Removed.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 06f399a..84866e5 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,20 @@
+2010-10-27 Andy Estes <aestes at apple.com>
+
+ Reviewed by David Hyatt.
+
+ Siblings of floated elements should be cleared below the float if they
+ are too wide to fit in the containing block.
+ https://bugs.webkit.org/show_bug.cgi?id=48396
+
+ * fast/block/float/clear-element-too-wide-for-containing-block.html: Copied from LayoutTests/fast/block/float/tableshifting.html.
+ * fast/block/float/tableshifting.html: Removed.
+ * platform/mac/fast/block/float/clear-element-too-wide-for-containing-block-expected.checksum: Added.
+ * platform/mac/fast/block/float/clear-element-too-wide-for-containing-block-expected.png: Added.
+ * platform/mac/fast/block/float/clear-element-too-wide-for-containing-block-expected.txt: Added.
+ * platform/mac/fast/block/float/tableshifting-expected.checksum: Removed.
+ * platform/mac/fast/block/float/tableshifting-expected.png: Removed.
+ * platform/mac/fast/block/float/tableshifting-expected.txt: Removed.
+
2010-10-27 Csaba Osztrogonác <ossy at webkit.org>
[Qt] Add some tests to the Skipeed list, because of unimplemented
diff --git a/LayoutTests/fast/block/float/clear-element-too-wide-for-containing-block.html b/LayoutTests/fast/block/float/clear-element-too-wide-for-containing-block.html
new file mode 100644
index 0000000..27144da
--- /dev/null
+++ b/LayoutTests/fast/block/float/clear-element-too-wide-for-containing-block.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<style>
+
+#container {
+ width: 385px;
+}
+
+img {
+ margin-top:1em;
+ display: block;
+ background-color:yellow;
+}
+
+.foo { float:left;width:100px; height:100px;background-color:green }
+
+</style>
+</head>
+
+<body>
+<div id="container">
+<div>The yellow block should be below the green block.</div>
+<div class="foo"></div><img width="395" height="275" border="0">
+</div>
+</body>
+</html>
+
diff --git a/LayoutTests/fast/block/float/tableshifting.html b/LayoutTests/fast/block/float/tableshifting.html
deleted file mode 100644
index b03e784..0000000
--- a/LayoutTests/fast/block/float/tableshifting.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
-
- <title>Jeffrey Zeldman Presents: The Daily Report</title>
-
-<style>
-
-#bravefourhundred {
- width: 385px;
-}
-
-img {
- margin-top:1em;
- display: block;
- background-color:yellow;
-}
-
-.foo { float:left;width:100px; height:100px;background-color:green }
-
-</style>
-
-
-
- </head>
-
-<body>
-<div id="bravefourhundred">
-<div>The yellow block should be to the right of the green block.</div>
-<div class="foo"></div><img width="395" height="275" border="0">
-</div>
-</body>
-</html>
diff --git a/LayoutTests/platform/mac/fast/block/float/clear-element-too-wide-for-containing-block-expected.checksum b/LayoutTests/platform/mac/fast/block/float/clear-element-too-wide-for-containing-block-expected.checksum
new file mode 100644
index 0000000..2b21c4b
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/block/float/clear-element-too-wide-for-containing-block-expected.checksum
@@ -0,0 +1 @@
+d75342db185345a6c1e758f78f692369
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/block/float/clear-element-too-wide-for-containing-block-expected.png b/LayoutTests/platform/mac/fast/block/float/clear-element-too-wide-for-containing-block-expected.png
new file mode 100644
index 0000000..f113a09
Binary files /dev/null and b/LayoutTests/platform/mac/fast/block/float/clear-element-too-wide-for-containing-block-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/block/float/clear-element-too-wide-for-containing-block-expected.txt b/LayoutTests/platform/mac/fast/block/float/clear-element-too-wide-for-containing-block-expected.txt
new file mode 100644
index 0000000..47b8a75
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/block/float/clear-element-too-wide-for-containing-block-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x409
+ RenderBlock {HTML} at (0,0) size 800x409
+ RenderBody {BODY} at (8,8) size 784x393
+ RenderBlock {DIV} at (0,0) size 385x393
+ RenderBlock {DIV} at (0,0) size 385x18
+ RenderText {#text} at (0,0) size 324x18
+ text run at (0,0) width 324: "The yellow block should be below the green block."
+ RenderBlock (floating) {DIV} at (0,18) size 100x100 [bgcolor=#008000]
+ RenderImage {IMG} at (0,118) size 395x275 [bgcolor=#FFFF00]
diff --git a/LayoutTests/platform/mac/fast/block/float/tableshifting-expected.checksum b/LayoutTests/platform/mac/fast/block/float/tableshifting-expected.checksum
deleted file mode 100644
index c5afeef..0000000
--- a/LayoutTests/platform/mac/fast/block/float/tableshifting-expected.checksum
+++ /dev/null
@@ -1 +0,0 @@
-d0b2f4361d58d42842f468c1dcee3fe1
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/block/float/tableshifting-expected.png b/LayoutTests/platform/mac/fast/block/float/tableshifting-expected.png
deleted file mode 100644
index 3b9524d..0000000
Binary files a/LayoutTests/platform/mac/fast/block/float/tableshifting-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/fast/block/float/tableshifting-expected.txt b/LayoutTests/platform/mac/fast/block/float/tableshifting-expected.txt
deleted file mode 100644
index bb09abb..0000000
--- a/LayoutTests/platform/mac/fast/block/float/tableshifting-expected.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x325
- RenderBlock {HTML} at (0,0) size 800x325
- RenderBody {BODY} at (8,8) size 784x309
- RenderBlock {DIV} at (0,0) size 385x309
- RenderBlock {DIV} at (0,0) size 385x18
- RenderText {#text} at (0,0) size 370x18
- text run at (0,0) width 370: "The yellow block should be to the right of the green block."
- RenderBlock (floating) {DIV} at (0,18) size 100x100 [bgcolor=#008000]
- RenderImage {IMG} at (100,34) size 395x275 [bgcolor=#FFFF00]
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 04951d6..8c6bf65 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2010-10-27 Andy Estes <aestes at apple.com>
+
+ Reviewed by David Hyatt.
+
+ Siblings of floated elements should be cleared below the float if they
+ are too wide to fit in the containing block.
+ https://bugs.webkit.org/show_bug.cgi?id=48396
+
+ Test: fast/block/float/clear-element-too-wide-for-containing-block.html
+
+ WebKit did not clear elements adjacent to floats if they were wider than
+ the containing block, instead keeping them on the same line and allowing
+ them to spill out the right side of the containing block. We should
+ match the spec in this regard and clear the element below the float even
+ if it is too wide for the containing block. Doing this seems to also
+ match IE's and Firefox's behavior.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::getClearDelta): Continue to compute the clear
+ delta even if the child's minimum preferred width is greater than the
+ containing block's available width.
+
2010-10-26 Rob Buis <rwlbuis at gmail.com>
Reviewed by Nikolas Zimmermann.
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index 56099aa..8fd9768 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -4040,14 +4040,10 @@ int RenderBlock::getClearDelta(RenderBox* child, int yPos)
// We also clear floats if we are too big to sit on the same line as a float (and wish to avoid floats by default).
int result = clearSet ? max(0, bottom - yPos) : 0;
if (!result && child->avoidsFloats()) {
- int availableWidth = availableLogicalWidth();
- if (child->minPreferredLogicalWidth() > availableWidth)
- return 0;
-
int y = yPos;
while (true) {
int widthAtY = availableLogicalWidthForLine(y, false);
- if (widthAtY == availableWidth)
+ if (widthAtY == availableLogicalWidth())
return y - yPos;
int oldChildY = child->y();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list