Title: [155244] trunk
Revision
155244
Author
[email protected]
Date
2013-09-06 23:05:23 -0700 (Fri, 06 Sep 2013)

Log Message

[CSS Shapes] Floats with shape-outside aren't painting in the correct order
https://bugs.webkit.org/show_bug.cgi?id=118492

Reviewed by Darin Adler.

Source/WebCore:

When removing the old positioning behavior, the code that makes a
float with shape-outside gain a layer was left behind. This patch
removes that, so now floats with shape-outside are painted just like
floats without shape-outside.

Also remove the isFloatingWithShapeOutside helper method because its
use is now somewhat redundant, and the check it does is now only
needed in one place.

Test: fast/shapes/shape-outside-floats/shape-outside-floats-not-a-layer.html

* rendering/RenderBox.h:
(WebCore::RenderBox::shapeOutsideInfo):
* rendering/RenderObject.h:
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::isEnabledFor):

LayoutTests:

Update tests to reflect correct painting order. Add a new test for the
correct painting behavior.

* csswg/submitted/shapes/shape-outside/shape-outside-floats-circle-000-expected.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-circle-000.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-ellipse-000-expected.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-ellipse-000.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-001-expected.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-001.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-001-expected.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-001.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-002-expected.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-002.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-003-expected.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-003.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-004-expected.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-004.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-stacked-000.html:
* fast/shapes/shape-outside-floats/shape-outside-floats-not-a-layer-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-not-a-layer.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (155243 => 155244)


--- trunk/LayoutTests/ChangeLog	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/ChangeLog	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,3 +1,31 @@
+2013-09-06  Bem Jones-Bey  <[email protected]>
+
+        [CSS Shapes] Floats with shape-outside aren't painting in the correct order
+        https://bugs.webkit.org/show_bug.cgi?id=118492
+
+        Reviewed by Darin Adler.
+
+        Update tests to reflect correct painting order. Add a new test for the
+        correct painting behavior.
+
+        * csswg/submitted/shapes/shape-outside/shape-outside-floats-circle-000-expected.html:
+        * csswg/submitted/shapes/shape-outside/shape-outside-floats-circle-000.html:
+        * csswg/submitted/shapes/shape-outside/shape-outside-floats-ellipse-000-expected.html:
+        * csswg/submitted/shapes/shape-outside/shape-outside-floats-ellipse-000.html:
+        * csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-001-expected.html:
+        * csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-001.html:
+        * csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-001-expected.html:
+        * csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-001.html:
+        * csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-002-expected.html:
+        * csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-002.html:
+        * csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-003-expected.html:
+        * csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-003.html:
+        * csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-004-expected.html:
+        * csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-004.html:
+        * csswg/submitted/shapes/shape-outside/shape-outside-floats-stacked-000.html:
+        * fast/shapes/shape-outside-floats/shape-outside-floats-not-a-layer-expected.html: Added.
+        * fast/shapes/shape-outside-floats/shape-outside-floats-not-a-layer.html: Added.
+
 2013-09-06  Dirk Schulze  <[email protected]>
 
         Interpolate between CSS filter() and cached images

Modified: trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-circle-000-expected.html (155243 => 155244)


--- trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-circle-000-expected.html	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-circle-000-expected.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,5 +1,6 @@
 <!DOCTYPE html>
 <title>shape-outside-floats-circle-000-reference.html</title>
+<link rel="author" title="Adobe" href=""
 <link rel="author" title="Bem Jones-Bey" href=""
 <meta name="flags" content="ahem dom">
 <style>
@@ -20,12 +21,14 @@
 
 #left-circle-outline {
     position: absolute;
+    z-index: -1;
     top: 20px;
     left: 0px;
 }
 
 #right-circle-outline {
     position: absolute;
+    z-index: -1;
     top: 20px;
     right: 0px;
 }

Modified: trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-circle-000.html (155243 => 155244)


--- trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-circle-000.html	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-circle-000.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,5 +1,6 @@
 <!DOCTYPE html>
 <title>CSS Test: circle shape-outside on floats</title>
+<link rel="author" title="Adobe" href=""
 <link rel="author" title="Bem Jones-Bey" href=""
 <link rel="help" href=""
 <link rel="match" href=""

Modified: trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-ellipse-000-expected.html (155243 => 155244)


--- trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-ellipse-000-expected.html	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-ellipse-000-expected.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,5 +1,6 @@
 <!DOCTYPE html>
 <title>shape-outside-floats-ellipse-000-reference.html</title>
+<link rel="author" title="Adobe" href=""
 <link rel="author" title="Bem Jones-Bey" href=""
 <meta name="flags" content="ahem dom">
 <style>
@@ -20,12 +21,14 @@
 
 #left-ellipse-outline {
     position: absolute;
+    z-index: -1;
     top: 20px;
     left: 0px;
 }
 
 #right-ellipse-outline {
     position: absolute;
+    z-index: -1;
     top: 20px;
     right: 0px;
 }

Modified: trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-ellipse-000.html (155243 => 155244)


--- trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-ellipse-000.html	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-ellipse-000.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,8 +1,9 @@
 <!DOCTYPE html>
 <title>CSS Test: circle shape-outside on floats</title>
+<link rel="author" title="Adobe" href=""
 <link rel="author" title="Bem Jones-Bey" href=""
 <link rel="help" href=""
-<link rel="match" href=""
+<link rel="match" href=""
 <meta name="flags" content="ahem">
 <style>
 .container {

Modified: trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-001-expected.html (155243 => 155244)


--- trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-001-expected.html	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-001-expected.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,5 +1,6 @@
 <!DOCTYPE html>
 <title>shape-outside-floats-inset-rectangle-001-reference.html</title>
+<link rel="author" title="Adobe" href=""
 <link rel="author" title="Bem Jones-Bey" href=""
 <meta name="flags" content="ahem dom">
 <style>
@@ -20,12 +21,14 @@
 
 #left-rounded-rect-outline {
     position: absolute;
+    z-index: -1;
     top: 20px;
     left: 0px;
 }
 
 #right-rounded-rect-outline {
     position: absolute;
+    z-index: -1;
     top: 20px;
     right: 0px;
 }

Modified: trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-001.html (155243 => 155244)


--- trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-001.html	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-001.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,5 +1,6 @@
 <!DOCTYPE html>
 <title>CSS Test: inset rectangle shape-outside on floats</title>
+<link rel="author" title="Adobe" href=""
 <link rel="author" title="Bem Jones-Bey" href=""
 <link rel="help" href=""
 <link rel="match" href=""

Modified: trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-001-expected.html (155243 => 155244)


--- trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-001-expected.html	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-001-expected.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,5 +1,6 @@
 <!DOCTYPE html>
 <title>shape-outside-floats-rounded-rectangle-001-reference.html</title>
+<link rel="author" title="Adobe" href=""
 <link rel="author" title="Bem Jones-Bey" href=""
 <meta name="flags" content="ahem dom">
 <style>
@@ -21,12 +22,14 @@
 
 #left-rounded-rect-outline {
     position: absolute;
+    z-index: -1;
     top: 20px;
     left: 0px;
 }
 
 #right-rounded-rect-outline {
     position: absolute;
+    z-index: -1;
     top: 20px;
     right: 0px;
 }

Modified: trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-001.html (155243 => 155244)


--- trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-001.html	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-001.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,5 +1,6 @@
 <!DOCTYPE html>
 <title>shape-outside-floats-rounded-rectangle-001.html</title>
+<link rel="author" title="Adobe" href=""
 <link rel="author" title="Bem Jones-Bey" href=""
 <link rel="help" href=""
 <link rel="match" href=""

Modified: trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-002-expected.html (155243 => 155244)


--- trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-002-expected.html	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-002-expected.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,5 +1,6 @@
 <!DOCTYPE html>
 <title>shape-outside-floats-rounded-rectangle-002-reference.html</title>
+<link rel="author" title="Adobe" href=""
 <link rel="author" title="Bem Jones-Bey" href=""
 <meta name="flags" content="ahem dom">
 <style>
@@ -21,12 +22,14 @@
 
 #left-rounded-rect-circle-outline {
     position: absolute;
+    z-index: -1;
     top: 20px;
     left: 0px;
 }
 
 #right-rounded-rect-circle-outline {
     position: absolute;
+    z-index: -1;
     top: 20px;
     right: 0px;
 }

Modified: trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-002.html (155243 => 155244)


--- trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-002.html	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-002.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,5 +1,6 @@
 <!DOCTYPE html>
 <title>shape-outside-floats-rounded-rectangle-002.html</title>
+<link rel="author" title="Adobe" href=""
 <link rel="author" title="Bem Jones-Bey" href=""
 <link rel="help" href=""
 <link rel="match" href=""

Modified: trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-003-expected.html (155243 => 155244)


--- trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-003-expected.html	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-003-expected.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,5 +1,6 @@
 <!DOCTYPE html>
 <title>shape-outside-floats-rounded-rectangle-003-reference.html</title>
+<link rel="author" title="Adobe" href=""
 <link rel="author" title="Bem Jones-Bey" href=""
 <meta name="flags" content="ahem dom">
 <style>
@@ -21,12 +22,14 @@
 
 #left-rounded-rect-ellipse-outline {
     position: absolute;
+    z-index: -1;
     top: 20px;
     left: 0px;
 }
 
 #right-rounded-rect-ellipse-outline {
     position: absolute;
+    z-index: -1;
     top: 20px;
     right: 0px;
 }

Modified: trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-003.html (155243 => 155244)


--- trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-003.html	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-003.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,5 +1,6 @@
 <!DOCTYPE html>
 <title>shape-outside-floats-rounded-rectangle-003.html</title>
+<link rel="author" title="Adobe" href=""
 <link rel="author" title="Bem Jones-Bey" href=""
 <link rel="help" href=""
 <link rel="match" href=""

Modified: trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-004-expected.html (155243 => 155244)


--- trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-004-expected.html	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-004-expected.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,29 +1,31 @@
 <!DOCTYPE html>
 <title>shape-outside-floats-rounded-rectangle-004-reference.html</title>
+<link rel="author" title="Adobe" href=""
 <link rel="author" title="Bem Jones-Bey" href=""
 <meta name="flags" content="ahem dom">
 <style>
 .container {
     position: relative;
-    font: 10px/1 Ahem, sans-serif;
-    width: 80px;
-    height: 40px;
-    border: 1px solid black;
+    font: 20px/1 Ahem, sans-serif;
+    line-height: 20px;
+    width: 160px;
+    height: 80px;
     margin: 5px;
 }
 .rounded-rect {
     position: absolute;
+    z-index: -1;
     top: 0px;
     left: 0px;
-    width: 40px;
-    height: 40px;
+    width: 80px;
+    height: 80px;
     border: 1px solid blue;
     border-radius: 50%;
 }
 .left-rounded-rect-float-line {
     float: left;
     clear: left;
-    height: 10px;
+    height: 20px;
 }
 </style>
 <body>
@@ -58,37 +60,35 @@
     <script src=""
     <script src=""
     <script>
-    // Note that the border must be added into the width to account for its
-    // affect on float positioning.
     genLeftRoundedRectFloatShapeOutsideRefTest({
-        roundedRect: {x: 0, y: 0, width: 41, height: 40, rx: 20, ry: 20},
-        containerWidth: 80, 
-        containerHeight: 40,
-        lineHeight: 10,
+        roundedRect: {x: 0, y: 0, width: 81, height: 80, rx: 40, ry: 40},
+        containerWidth: 160,
+        containerHeight: 80,
+        lineHeight: 20,
         floatElementClassSuffix: "rounded-rect-float-line",
         insertElementIdSuffix: "fixed-units"
     });
     genLeftRoundedRectFloatShapeOutsideRefTest({
-        roundedRect: {x: 0, y: 0, width: 41, height: 40, rx: 20, ry: 20},
-        containerWidth: 80, 
-        containerHeight: 40,
-        lineHeight: 10,
+        roundedRect: {x: 0, y: 0, width: 81, height: 80, rx: 40, ry: 40},
+        containerWidth: 160,
+        containerHeight: 80,
+        lineHeight: 20,
         floatElementClassSuffix: "rounded-rect-float-line",
         insertElementIdSuffix: "relative-units"
     });
     genLeftRoundedRectFloatShapeOutsideRefTest({
-        roundedRect: {x: 0, y: 0, width: 41, height: 40, rx: 20, ry: 20},
-        containerWidth: 80, 
-        containerHeight: 40,
-        lineHeight: 10,
+        roundedRect: {x: 0, y: 0, width: 81, height: 80, rx: 40, ry: 40},
+        containerWidth: 160,
+        containerHeight: 80,
+        lineHeight: 20,
         floatElementClassSuffix: "rounded-rect-float-line",
         insertElementIdSuffix: "different-units"
     });
     genLeftRoundedRectFloatShapeOutsideRefTest({
-        roundedRect: {x: 0, y: 0, width: 41, height: 40, rx: 20, ry: 20},
-        containerWidth: 80, 
-        containerHeight: 40,
-        lineHeight: 10,
+        roundedRect: {x: 0, y: 0, width: 81, height: 80, rx: 40, ry: 40},
+        containerWidth: 160,
+        containerHeight: 80,
+        lineHeight: 20,
         floatElementClassSuffix: "rounded-rect-float-line",
         insertElementIdSuffix: "edge-case"
     });

Modified: trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-004.html (155243 => 155244)


--- trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-004.html	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-004.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,29 +1,30 @@
 <!DOCTYPE html>
 <title>CSS Test: rounded rectangle shape-outside on floats with clamped radii values</title>
+<link rel="author" title="Adobe" href=""
 <link rel="author" title="Bem Jones-Bey" href=""
 <link rel="help" href=""
 <link rel="match" href=""
 <meta name="flags" content="ahem">
 <style>
 .container {
-    font: 10px/1 Ahem, sans-serif;
-    width: 80px;
-    height: 40px;
-    border: 1px solid black;
+    font: 20px/1 Ahem, sans-serif;
+    line-height: 20px;
+    width: 160px;
+    height: 80px;
     margin: 5px;
 }
 .float {
     float: left;
-    width: 40px;
-    height: 40px;
+    width: 80px;
+    height: 80px;
     border: 1px solid blue;
     border-radius: 50%;
 }
 .fixed-units {
-    -webkit-shape-outside: rectangle(0px, 0px, 40px, 40px, 40px, 40px);
+    -webkit-shape-outside: rectangle(0px, 0px, 80px, 80px, 80px, 80px);
 }
 .different-units {
-    -webkit-shape-outside: rectangle(0px, 0px, 40px, 40px, 100%, 100%);
+    -webkit-shape-outside: rectangle(0px, 0px, 80px, 80px, 100%, 100%);
 }
 .relative-units {
     -webkit-shape-outside: rectangle(0px, 0px, 100%, 100%, 700em, 700em);

Modified: trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-stacked-000.html (155243 => 155244)


--- trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-stacked-000.html	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/LayoutTests/csswg/submitted/shapes/shape-outside/shape-outside-floats-stacked-000.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -13,6 +13,7 @@
     background-color: red;
     margin-bottom: 50px;
     overflow: hidden;
+    color: green;
 }
 .float-left {
     width: 100px;

Added: trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-not-a-layer-expected.html (0 => 155244)


--- trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-not-a-layer-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-not-a-layer-expected.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<style>
+    .container {
+        position: relative;
+        height: 10px;
+        width: 50px;
+        background-color: red;
+    }
+    .left {
+        position: absolute;
+        left: 0;
+        top: 0;
+        font: 10px/1 Ahem;
+        color: green;
+    }
+</style>
+<body>
+    You should see a green rectangle. You shouldn't see any red.
+    <div class="container">
+        <div class="left">
+            XXXXX
+        </div>
+    </div>
+</body>

Added: trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-not-a-layer.html (0 => 155244)


--- trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-not-a-layer.html	                        (rev 0)
+++ trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-not-a-layer.html	2013-09-07 06:05:23 UTC (rev 155244)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<style>
+    .container {
+        font: 10px/1 Ahem;
+        color: green;
+    }
+    .left {
+        float: left;
+        height: 10px;
+        width: 50px;
+        background-color: red;
+        -webkit-shape-outside: rectangle(0, 0, 0, 100%);
+    }
+</style>
+<body>
+    You should see a green rectangle. You shouldn't see any red.
+    <div class="container">
+        <div class="left"></div>
+        XXXXX
+    </div>
+</body>

Modified: trunk/Source/WebCore/ChangeLog (155243 => 155244)


--- trunk/Source/WebCore/ChangeLog	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/Source/WebCore/ChangeLog	2013-09-07 06:05:23 UTC (rev 155244)
@@ -1,3 +1,27 @@
+2013-09-06  Bem Jones-Bey  <[email protected]>
+
+        [CSS Shapes] Floats with shape-outside aren't painting in the correct order
+        https://bugs.webkit.org/show_bug.cgi?id=118492
+
+        Reviewed by Darin Adler.
+
+        When removing the old positioning behavior, the code that makes a
+        float with shape-outside gain a layer was left behind. This patch
+        removes that, so now floats with shape-outside are painted just like
+        floats without shape-outside.
+
+        Also remove the isFloatingWithShapeOutside helper method because its
+        use is now somewhat redundant, and the check it does is now only
+        needed in one place.
+
+        Test: fast/shapes/shape-outside-floats/shape-outside-floats-not-a-layer.html
+
+        * rendering/RenderBox.h:
+        (WebCore::RenderBox::shapeOutsideInfo):
+        * rendering/RenderObject.h:
+        * rendering/shapes/ShapeOutsideInfo.cpp:
+        (WebCore::ShapeOutsideInfo::isEnabledFor): 
+
 2013-09-06  Anders Carlsson  <[email protected]>
 
         Add a new smart pointer type for fastMalloc'ed memory

Modified: trunk/Source/WebCore/rendering/RenderBox.h (155243 => 155244)


--- trunk/Source/WebCore/rendering/RenderBox.h	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/Source/WebCore/rendering/RenderBox.h	2013-09-07 06:05:23 UTC (rev 155244)
@@ -53,9 +53,6 @@
     {
         return isRoot() || isPositioned() || createsGroup() || hasClipPath() || hasOverflowClip()
             || hasTransform() || hasHiddenBackface() || hasReflection() || style()->specifiesColumns()
-#if ENABLE(CSS_SHAPES)
-            || isFloatingWithShapeOutside()
-#endif
             || !style()->hasAutoZIndex();
     }
 
@@ -596,7 +593,7 @@
 #if ENABLE(CSS_SHAPES)
     ShapeOutsideInfo* shapeOutsideInfo() const
     {
-        return isFloatingWithShapeOutside() && ShapeOutsideInfo::isEnabledFor(this) ? ShapeOutsideInfo::info(this) : 0;
+        return ShapeOutsideInfo::isEnabledFor(this) ? ShapeOutsideInfo::info(this) : 0;
     }
 #endif
 

Modified: trunk/Source/WebCore/rendering/RenderObject.h (155243 => 155244)


--- trunk/Source/WebCore/rendering/RenderObject.h	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/Source/WebCore/rendering/RenderObject.h	2013-09-07 06:05:23 UTC (rev 155244)
@@ -872,9 +872,6 @@
     virtual unsigned int length() const { return 1; }
 
     bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOutOfFlowPositioned()); }
-#if ENABLE(CSS_SHAPES)
-    bool isFloatingWithShapeOutside() const { return isBox() && isFloating() && style()->shapeOutside(); }
-#endif
 
     bool isTransparent() const { return style()->opacity() < 1.0f; }
     float opacity() const { return style()->opacity(); }

Modified: trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp (155243 => 155244)


--- trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp	2013-09-07 05:47:57 UTC (rev 155243)
+++ trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp	2013-09-07 06:05:23 UTC (rev 155244)
@@ -39,7 +39,7 @@
 bool ShapeOutsideInfo::isEnabledFor(const RenderBox* box)
 {
     ShapeValue* shapeValue = box->style()->shapeOutside();
-    if (!box->isFloatingWithShapeOutside() || !shapeValue)
+    if (!box->isFloating() || !shapeValue)
         return false;
 
     switch (shapeValue->type()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to