Title: [144903] releases/WebKitGTK/webkit-2.0
Revision
144903
Author
carlo...@webkit.org
Date
2013-03-06 02:47:16 -0800 (Wed, 06 Mar 2013)

Log Message

Merge r144706 - REGRESSION (r143643): Buttons containing floats render differently
https://bugs.webkit.org/show_bug.cgi?id=110933

Patch by Christian Biesinger <cbiesin...@chromium.org> on 2013-03-04
Reviewed by Ojan Vafai.

Source/WebCore:

Test: fast/forms/button-with-float.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
Also include new flexbox as a renderer that needs to enclose
overhanging floats. Flex boxes establish a block formatting context,
so they need to contain floats:
http://dev.w3.org/csswg/css3-flexbox/#flex-items

LayoutTests:

* css3/flexbox/float-inside-flexitem-expected.html: Added.
* css3/flexbox/float-inside-flexitem.html: Added.
* fast/forms/button-with-float-expected.html: Added.
* fast/forms/button-with-float.html: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.0/LayoutTests/ChangeLog (144902 => 144903)


--- releases/WebKitGTK/webkit-2.0/LayoutTests/ChangeLog	2013-03-06 10:36:17 UTC (rev 144902)
+++ releases/WebKitGTK/webkit-2.0/LayoutTests/ChangeLog	2013-03-06 10:47:16 UTC (rev 144903)
@@ -1,3 +1,15 @@
+2013-03-04  Christian Biesinger  <cbiesin...@chromium.org>
+
+        REGRESSION (r143643): Buttons containing floats render differently
+        https://bugs.webkit.org/show_bug.cgi?id=110933
+
+        Reviewed by Ojan Vafai.
+
+        * css3/flexbox/float-inside-flexitem-expected.html: Added.
+        * css3/flexbox/float-inside-flexitem.html: Added.
+        * fast/forms/button-with-float-expected.html: Added.
+        * fast/forms/button-with-float.html: Added.
+
 2013-02-26  Sergio Villar Senin  <svil...@igalia.com>
 
         REGRESSION (r143931): set-cookie-on-redirect.html breaks subsequent tests

Added: releases/WebKitGTK/webkit-2.0/LayoutTests/css3/flexbox/float-inside-flexitem-expected.html (0 => 144903)


--- releases/WebKitGTK/webkit-2.0/LayoutTests/css3/flexbox/float-inside-flexitem-expected.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.0/LayoutTests/css3/flexbox/float-inside-flexitem-expected.html	2013-03-06 10:47:16 UTC (rev 144903)
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<head>
+<style>
+    .container {
+        position: relative;
+        -webkit-appearance: none;
+        -moz-appearance: none;
+        border: 1px solid black;
+        padding: 0;
+        background-color: buttonface;
+        float: left;
+        margin: 2px;
+    }
+
+    .margin {
+        margin: 5px 10px 5px 5px;
+    }
+    .sized {
+        width: 50px;
+        height: 50px;
+    }
+    .pink {
+        background-color: pink;
+    }
+    .float {
+        float: left;
+    }
+    .line {
+        height: 2px;
+        border-top: solid 1px #fff;
+        background: #00f;
+
+        position: absolute;
+        width: 50px;
+        bottom: 5px;
+        left: 5px;
+    }
+</style>
+</head>
+<body>
+    You should see an almost-square grey rectangle containing a pink square with a blue line below it.
+    There should be no pink below the blue line.
+<hr>
+<div class="container">
+    <div class="margin sized float">
+        <div class="sized">
+            <div class="sized pink">
+            <div class="line"></div>
+        </div>
+    </div>
+</div>

Added: releases/WebKitGTK/webkit-2.0/LayoutTests/css3/flexbox/float-inside-flexitem.html (0 => 144903)


--- releases/WebKitGTK/webkit-2.0/LayoutTests/css3/flexbox/float-inside-flexitem.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.0/LayoutTests/css3/flexbox/float-inside-flexitem.html	2013-03-06 10:47:16 UTC (rev 144903)
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<head>
+<link href="" rel="stylesheet">
+<style>
+    .container {
+        position: relative;
+        -webkit-appearance: none;
+        -moz-appearance: none;
+        border: 1px solid black;
+        padding: 0;
+        background-color: buttonface;
+        float: left;
+        margin: 2px;
+    }
+
+    .margin {
+        margin: 5px 10px 5px 5px;
+    }
+    .sized {
+        width: 50px;
+        height: 50px;
+    }
+    .pink {
+        background-color: pink;
+    }
+    .float {
+        float: left;
+    }
+    .line {
+        height: 2px;
+        border-top: solid 1px #fff;
+        background: #00f;
+
+        position: absolute;
+        width: 50px;
+        bottom: 5px;
+        left: 5px;
+    }
+</style>
+</head>
+<body>
+    You should see an almost-square grey rectangle containing a pink square with a blue line below it.
+    There should be no pink below the blue line.
+<hr>
+<div class="container flexbox">
+    <div>
+    <div class="margin sized float">
+        <div class="sized">
+            <div class="sized pink">
+            <div class="line"></div>
+        </div>
+    </div>
+    </div>
+</div>

Added: releases/WebKitGTK/webkit-2.0/LayoutTests/fast/forms/button-with-float-expected.html (0 => 144903)


--- releases/WebKitGTK/webkit-2.0/LayoutTests/fast/forms/button-with-float-expected.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.0/LayoutTests/fast/forms/button-with-float-expected.html	2013-03-06 10:47:16 UTC (rev 144903)
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<head>
+<style>
+    .container {
+        position: relative;
+        -webkit-appearance: none;
+        border: 1px solid black;
+        padding: 0;
+        background-color: buttonface;
+        float: left;
+        margin: 2px;
+    }
+
+    .margin {
+        margin: 5px 10px 5px 5px;
+    }
+    .sized {
+        width: 50px;
+        height: 50px;
+    }
+    .pink {
+        background-color: pink;
+    }
+    .float {
+        float: left;
+    }
+    .line {
+        height: 2px;
+        border-top: solid 1px #fff;
+        background: #00f;
+
+        position: absolute;
+        width: 50px;
+        bottom: 5px;
+        left: 5px;
+    }
+</style>
+</head>
+<body>
+    You should see an almost-square grey rectangle containing a pink square with a blue line below it.
+    There should be no pink below the blue line.
+<hr>
+<div class="container">
+    <div class="margin sized float">
+        <div class="sized">
+            <div class="sized pink">
+            <div class="line"></div>
+        </div>
+    </div>
+</div>

Added: releases/WebKitGTK/webkit-2.0/LayoutTests/fast/forms/button-with-float.html (0 => 144903)


--- releases/WebKitGTK/webkit-2.0/LayoutTests/fast/forms/button-with-float.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.0/LayoutTests/fast/forms/button-with-float.html	2013-03-06 10:47:16 UTC (rev 144903)
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<head>
+<style>
+    button {
+        position: relative;
+        -webkit-appearance: none;
+        border: 1px solid black;
+        padding: 0;
+    }
+
+    .margin {
+        margin: 5px 10px 5px 5px;
+    }
+    .sized {
+        width: 50px;
+        height: 50px;
+    }
+    .pink {
+        background-color: pink;
+    }
+    .float {
+        float: left;
+    }
+    .line {
+        height: 2px;
+        border-top: solid 1px #fff;
+        background: #00f;
+
+        position: absolute;
+        width: 50px;
+        bottom: 5px;
+        left: 5px;
+    }
+</style>
+</head>
+<body>
+    You should see an almost-square grey rectangle containing a pink square with a blue line below it.
+    There should be no pink below the blue line.
+<hr>
+<button>
+    <div class="margin sized float">
+        <div class="sized">
+            <div class="sized pink">
+            <div class="line"></div>
+        </div>
+    </div>
+</button>

Modified: releases/WebKitGTK/webkit-2.0/Source/WebCore/ChangeLog (144902 => 144903)


--- releases/WebKitGTK/webkit-2.0/Source/WebCore/ChangeLog	2013-03-06 10:36:17 UTC (rev 144902)
+++ releases/WebKitGTK/webkit-2.0/Source/WebCore/ChangeLog	2013-03-06 10:47:16 UTC (rev 144903)
@@ -1,3 +1,19 @@
+2013-03-04  Christian Biesinger  <cbiesin...@chromium.org>
+
+        REGRESSION (r143643): Buttons containing floats render differently
+        https://bugs.webkit.org/show_bug.cgi?id=110933
+
+        Reviewed by Ojan Vafai.
+
+        Test: fast/forms/button-with-float.html
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
+        Also include new flexbox as a renderer that needs to enclose
+        overhanging floats. Flex boxes establish a block formatting context,
+        so they need to contain floats:
+        http://dev.w3.org/csswg/css3-flexbox/#flex-items
+
 2013-02-25  Gustavo Noronha Silva  <g...@gnome.org>
 
         Build fix for gtk2-based library.

Modified: releases/WebKitGTK/webkit-2.0/Source/WebCore/rendering/RenderBlock.cpp (144902 => 144903)


--- releases/WebKitGTK/webkit-2.0/Source/WebCore/rendering/RenderBlock.cpp	2013-03-06 10:36:17 UTC (rev 144902)
+++ releases/WebKitGTK/webkit-2.0/Source/WebCore/rendering/RenderBlock.cpp	2013-03-06 10:47:16 UTC (rev 144903)
@@ -1801,7 +1801,7 @@
 
 bool RenderBlock::expandsToEncloseOverhangingFloats() const
 {
-    return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || (parent() && parent()->isDeprecatedFlexibleBox())
+    return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || (parent() && parent()->isFlexibleBoxIncludingDeprecated())
            || hasColumns() || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || isRoot();
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to