Title: [91684] branches/chromium/782
- Revision
- 91684
- Author
- [email protected]
- Date
- 2011-07-25 11:32:27 -0700 (Mon, 25 Jul 2011)
Log Message
Merge 91386
BUG=88889
Review URL: http://codereview.chromium.org/7502005
Modified Paths
Added Paths
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 => 91684)
--- 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:32:27 UTC (rev 91684)
@@ -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 => 91684)
--- 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:32:27 UTC (rev 91684)
@@ -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 (91683 => 91684)
--- branches/chromium/782/Source/WebCore/rendering/RenderBox.cpp 2011-07-25 18:21:08 UTC (rev 91683)
+++ branches/chromium/782/Source/WebCore/rendering/RenderBox.cpp 2011-07-25 18:32:27 UTC (rev 91684)
@@ -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 (91683 => 91684)
--- branches/chromium/782/Source/WebCore/rendering/RenderBox.h 2011-07-25 18:21:08 UTC (rev 91683)
+++ branches/chromium/782/Source/WebCore/rendering/RenderBox.h 2011-07-25 18:32:27 UTC (rev 91684)
@@ -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()->isDeprecatedFlexibleBox(); }
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