[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

mitz at apple.com mitz at apple.com
Thu Apr 8 00:36:03 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 87f376b6b49678473f98a4ae73ba8b33da8d8c92
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 15 03:05:50 2009 +0000

    <rdar://problem/7460655> REGRESSION (r47255): Content shifted down at software.opensuse.org
    https://bugs.webkit.org/show_bug.cgi?id=32382
    
    Reviewed by Darin Adler.
    
    WebCore:
    
    Test: fast/block/float/in-margin.html
    
    * rendering/RenderBlock.cpp:
    (WebCore::RenderBlock::getClearDelta): Floats that do not intrude into the line (because
    they are in the margin) do not need to be cleared.
    
    LayoutTests:
    
    * fast/block/float/in-margin.html: Added.
    * platform/mac/fast/block/float/in-margin-expected.checksum: Added.
    * platform/mac/fast/block/float/in-margin-expected.png: Added.
    * platform/mac/fast/block/float/in-margin-expected.txt: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52127 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 29306fd..fe0effc 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2009-12-14  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Darin Adler.
+
+        <rdar://problem/7460655> REGRESSION (r47255): Content shifted down at software.opensuse.org
+        https://bugs.webkit.org/show_bug.cgi?id=32382
+
+        * fast/block/float/in-margin.html: Added.
+        * platform/mac/fast/block/float/in-margin-expected.checksum: Added.
+        * platform/mac/fast/block/float/in-margin-expected.png: Added.
+        * platform/mac/fast/block/float/in-margin-expected.txt: Added.
+
 2009-12-14  Enrica Casucci  <enrica at apple.com>
 
         Reviewed by John Sullivan.
diff --git a/LayoutTests/fast/block/float/in-margin.html b/LayoutTests/fast/block/float/in-margin.html
new file mode 100644
index 0000000..0a5563f
--- /dev/null
+++ b/LayoutTests/fast/block/float/in-margin.html
@@ -0,0 +1,6 @@
+<div style="width: 400px;">
+    <div style="width: 100px; float: left; height: 100px;"></div>
+     <div style="margin-left: 300px; background-color: red;">
+         <div style="background-color: green; overflow: hidden; width: 110%; height: 110px;"></div>
+     </div>
+</div>
diff --git a/LayoutTests/platform/mac/fast/block/float/in-margin-expected.checksum b/LayoutTests/platform/mac/fast/block/float/in-margin-expected.checksum
new file mode 100644
index 0000000..537490e
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/block/float/in-margin-expected.checksum
@@ -0,0 +1 @@
+86351b92bffcd9b203c46fb9dc7d430c
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/block/float/in-margin-expected.png b/LayoutTests/platform/mac/fast/block/float/in-margin-expected.png
new file mode 100644
index 0000000..1623c24
Binary files /dev/null and b/LayoutTests/platform/mac/fast/block/float/in-margin-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/block/float/in-margin-expected.txt b/LayoutTests/platform/mac/fast/block/float/in-margin-expected.txt
new file mode 100644
index 0000000..54d9c61
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/block/float/in-margin-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {DIV} at (0,0) size 400x110
+        RenderBlock (floating) {DIV} at (0,0) size 100x100
+        RenderBlock {DIV} at (300,0) size 100x110 [bgcolor=#FF0000]
+layer at (308,8) size 110x110
+  RenderBlock {DIV} at (0,0) size 110x110 [bgcolor=#008000]
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 013e0fe..a262b4e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2009-12-14  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Darin Adler.
+
+        <rdar://problem/7460655> REGRESSION (r47255): Content shifted down at software.opensuse.org
+        https://bugs.webkit.org/show_bug.cgi?id=32382
+
+        Test: fast/block/float/in-margin.html
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::getClearDelta): Floats that do not intrude into the line (because
+        they are in the margin) do not need to be cleared.
+
 2009-12-14  Enrica Casucci  <enrica at apple.com>
 
         Reviewed by John Sullivan.
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index 3faac5c..0b2345a 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -3195,14 +3195,18 @@ int RenderBlock::getClearDelta(RenderBox* child, int yPos)
     // to fit) and not all (we should be using nextFloatBottomBelow and looping).
     int result = clearSet ? max(0, bottom - yPos) : 0;
     if (!result && child->avoidsFloats()) {
-        int oldYPos = child->y();
-        int oldWidth = child->width();
-        child->setY(yPos);
-        child->calcWidth();
-        if (child->width() > lineWidth(yPos, false) && child->minPrefWidth() <= availableWidth())
-            result = max(0, floatBottom() - yPos);
-        child->setY(oldYPos);
-        child->setWidth(oldWidth);
+        int widthAtCurrentHeight = lineWidth(yPos, false);
+        int availableWidth = this->availableWidth();
+        if (widthAtCurrentHeight < availableWidth) {
+            int oldYPos = child->y();
+            int oldWidth = child->width();
+            child->setY(yPos);
+            child->calcWidth();
+            if (child->width() > widthAtCurrentHeight && child->minPrefWidth() <= availableWidth)
+                result = max(0, floatBottom() - yPos);
+            child->setY(oldYPos);
+            child->setWidth(oldWidth);
+        }
     }
     return result;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list