[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

hyatt at apple.com hyatt at apple.com
Sun Feb 20 23:12:31 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 6f7d9fb7de5c61daa069a2b8e42a934f4f394ae0
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 18 23:24:28 2011 +0000

    <rdar://problem/8479998> REGRESSION (r67660): broken button layout at devforums.apple.com
    
    Reviewed by Dan Bernstein.
    
    Exclude floating objects from shrinking to avoid floats.  They should never do this.  Timing-related bugs could
    occur as a result of this mistake, and the change to rewrite pagination to defer layout of floats until they
    got encountered on the correct line exposed this issue.
    
    Source/WebCore:
    
    Added /fast/block/float/float-overflow-hidden-containing-block-width.html.
    
    * rendering/RenderBox.cpp:
    (WebCore::RenderBox::shrinkToAvoidFloats):
    
    LayoutTests:
    
    Added /fast/block/float/float-overflow-hidden-containing-block-width.html.
    * fast/block/float/float-overflow-hidden-containing-block-width.html: Added.
    * platform/mac/fast/block/float/float-overflow-hidden-containing-block-width-expected.checksum: Added.
    * platform/mac/fast/block/float/float-overflow-hidden-containing-block-width-expected.png: Added.
    * platform/mac/fast/block/float/float-overflow-hidden-containing-block-width-expected.txt: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76074 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b0d1ce2..64f751e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2011-01-18  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        <rdar://problem/8479998> REGRESSION (r67660): broken button layout at devforums.apple.com
+        
+        Exclude floating objects from shrinking to avoid floats.  They should never do this.  Timing-related bugs could
+        occur as a result of this mistake, and the change to rewrite pagination to defer layout of floats until they
+        got encountered on the correct line exposed this issue.
+
+        Added /fast/block/float/float-overflow-hidden-containing-block-width.html.
+        * fast/block/float/float-overflow-hidden-containing-block-width.html: Added.
+        * platform/mac/fast/block/float/float-overflow-hidden-containing-block-width-expected.checksum: Added.
+        * platform/mac/fast/block/float/float-overflow-hidden-containing-block-width-expected.png: Added.
+        * platform/mac/fast/block/float/float-overflow-hidden-containing-block-width-expected.txt: Added.
+
 2011-01-18  Dmitry Titov  <dimich at chromium.org>
 
         [Chromium] Not reviewed, updated expectations for tests
diff --git a/LayoutTests/fast/block/float/float-overflow-hidden-containing-block-width.html b/LayoutTests/fast/block/float/float-overflow-hidden-containing-block-width.html
new file mode 100644
index 0000000..f92f58e
--- /dev/null
+++ b/LayoutTests/fast/block/float/float-overflow-hidden-containing-block-width.html
@@ -0,0 +1,21 @@
+<html>
+<head>
+<style>
+.topfloat { float:right;height:22px;width:126px;overflow:hidden; background-color:orange }
+.clearingfloat { clear:both;float:right; overflow:hidden }
+span { float:left;overflow:hidden;height:26px;width:22px;background-color:purple }
+</style>
+</head>
+<body>
+<div style="position:absolute;">
+<div class="topfloat"></div>
+<div class="clearingfloat">
+  <span></span>
+  <span></span>
+</div>
+</div>
+<script type="text/javascript">
+document.body.offsetLeft;
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/fast/block/float/float-overflow-hidden-containing-block-width-expected.checksum b/LayoutTests/platform/mac/fast/block/float/float-overflow-hidden-containing-block-width-expected.checksum
new file mode 100644
index 0000000..8eda47a
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/block/float/float-overflow-hidden-containing-block-width-expected.checksum
@@ -0,0 +1 @@
+5b310a7f9177aa4007c99debc4390c6c
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/block/float/float-overflow-hidden-containing-block-width-expected.png b/LayoutTests/platform/mac/fast/block/float/float-overflow-hidden-containing-block-width-expected.png
new file mode 100644
index 0000000..6f5a564
Binary files /dev/null and b/LayoutTests/platform/mac/fast/block/float/float-overflow-hidden-containing-block-width-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/block/float/float-overflow-hidden-containing-block-width-expected.txt b/LayoutTests/platform/mac/fast/block/float/float-overflow-hidden-containing-block-width-expected.txt
new file mode 100644
index 0000000..f514f0e
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/block/float/float-overflow-hidden-containing-block-width-expected.txt
@@ -0,0 +1,15 @@
+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
+layer at (8,8) size 126x48
+  RenderBlock (positioned) {DIV} at (8,8) size 126x48
+layer at (8,8) size 126x22
+  RenderBlock (floating) {DIV} at (0,0) size 126x22 [bgcolor=#FFA500]
+layer at (90,30) size 44x26
+  RenderBlock (floating) {DIV} at (82,22) size 44x26
+layer at (90,30) size 22x26
+  RenderBlock (floating) {SPAN} at (0,0) size 22x26 [bgcolor=#800080]
+layer at (112,30) size 22x26
+  RenderBlock (floating) {SPAN} at (22,0) size 22x26 [bgcolor=#800080]
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 368936c..08ba35e 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2011-01-18  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        <rdar://problem/8479998> REGRESSION (r67660): broken button layout at devforums.apple.com
+        
+        Exclude floating objects from shrinking to avoid floats.  They should never do this.  Timing-related bugs could
+        occur as a result of this mistake, and the change to rewrite pagination to defer layout of floats until they
+        got encountered on the correct line exposed this issue.
+
+        Added /fast/block/float/float-overflow-hidden-containing-block-width.html.
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::shrinkToAvoidFloats):
+
 2011-01-18  Zhenyao Mo  <zmo at google.com>
 
         Reviewed by Kenneth Russell.
diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp
index 3d367aa..4d0a0ba 100644
--- a/Source/WebCore/rendering/RenderBox.cpp
+++ b/Source/WebCore/rendering/RenderBox.cpp
@@ -3073,14 +3073,12 @@ VisiblePosition RenderBox::positionForPoint(const IntPoint& point)
 
 bool RenderBox::shrinkToAvoidFloats() const
 {
-    // FIXME: Technically we should be able to shrink replaced elements on a line, but this is difficult to accomplish, since this
-    // involves doing a relayout during findNextLineBreak and somehow overriding the containingBlockWidth method to return the
-    // current remaining width on a line.
-    if ((isInline() && !isHTMLMarquee()) || !avoidsFloats())
+    // Floating objects don't shrink.  Objects that don't avoid floats don't shrink.  Marquees don't shrink.
+    if ((isInline() && !isHTMLMarquee()) || !avoidsFloats() || isFloating())
         return false;
 
     // All auto-width objects that avoid floats should always use lineWidth.
-    return style()->width().isAuto();
+    return style()->width().isAuto(); 
 }
 
 bool RenderBox::avoidsFloats() const

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list