Title: [91691] branches/chromium/782

Diff

Copied: branches/chromium/782/LayoutTests/fast/flexbox/horizontal-box-float-crash-expected.txt (from rev 91386, trunk/LayoutTests/fast/flexbox/horizontal-box-float-crash-expected.txt) (0 => 91691)


--- branches/chromium/782/LayoutTests/fast/flexbox/horizontal-box-float-crash-expected.txt	                        (rev 0)
+++ branches/chromium/782/LayoutTests/fast/flexbox/horizontal-box-float-crash-expected.txt	2011-07-25 18:58:17 UTC (rev 91691)
@@ -0,0 +1,3 @@
+This test passes if it does not crash.
+PASS
+

Copied: branches/chromium/782/LayoutTests/fast/flexbox/horizontal-box-float-crash.html (from rev 91386, trunk/LayoutTests/fast/flexbox/horizontal-box-float-crash.html) (0 => 91691)


--- branches/chromium/782/LayoutTests/fast/flexbox/horizontal-box-float-crash.html	                        (rev 0)
+++ branches/chromium/782/LayoutTests/fast/flexbox/horizontal-box-float-crash.html	2011-07-25 18:58:17 UTC (rev 91691)
@@ -0,0 +1,38 @@
+<html>
+<body _onload_="runTest()">
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+
+    function runTest()
+    {
+        document.body.offsetTop;
+        var container = document.getElementById('container');
+        var test = document.getElementById('test');
+        var blockquote = document.getElementById('blockquote');
+        blockquote.parentNode.removeChild(blockquote);
+        test.appendChild(blockquote);
+        document.body.offsetTop;
+        test.parentNode.removeChild(test);
+        if (window.layoutTestController) {
+            // Force a focus in which forces a paint that can trigger the crash.
+            layoutTestController.setWindowIsKey(false);
+            layoutTestController.setWindowIsKey(true);
+            document.getElementById("results").innerHTML = "PASS";
+        }
+    }
+</script>
+<div>This test passes if it does not crash.</div>
+<div id="container" style="display: -webkit-box;">
+    <div id="test">
+        <span style="float: right;">This is a floating span.</span>
+        <span>.</span>
+    </div>
+    <span>
+        <ol id="results">
+            <blockquote id="blockquote">blockquote</blockquote>
+        </ol>
+    </span>
+</div>
+</body>
+</html>

Modified: branches/chromium/782/Source/WebCore/rendering/RenderBox.cpp (91690 => 91691)


--- branches/chromium/782/Source/WebCore/rendering/RenderBox.cpp	2011-07-25 18:57:07 UTC (rev 91690)
+++ branches/chromium/782/Source/WebCore/rendering/RenderBox.cpp	2011-07-25 18:58:17 UTC (rev 91691)
@@ -3201,7 +3201,7 @@
 
 bool RenderBox::avoidsFloats() const
 {
-    return isReplaced() || hasOverflowClip() || isHR() || isLegend() || isWritingModeRoot();
+    return isReplaced() || hasOverflowClip() || isHR() || isLegend() || isWritingModeRoot() || isDeprecatedFlexItem();
 }
 
 void RenderBox::addShadowOverflow()

Modified: branches/chromium/782/Source/WebCore/rendering/RenderBox.h (91690 => 91691)


--- branches/chromium/782/Source/WebCore/rendering/RenderBox.h	2011-07-25 18:57:07 UTC (rev 91690)
+++ branches/chromium/782/Source/WebCore/rendering/RenderBox.h	2011-07-25 18:58:17 UTC (rev 91691)
@@ -385,6 +385,8 @@
     virtual void markForPaginationRelayoutIfNeeded() { }
 
     bool isWritingModeRoot() const { return !parent() || parent()->style()->writingMode() != style()->writingMode(); }
+
+    bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrPositioned() && parent() && parent()->isFlexibleBox(); }
     
     virtual int lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;
     virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to