Title: [91776] branches/chromium/782
- Revision
- 91776
- Author
- cev...@google.com
- Date
- 2011-07-26 12:54:40 -0700 (Tue, 26 Jul 2011)
Log Message
Merge 91689
BUG=88723
Review URL: http://codereview.chromium.org/7470026
Modified Paths
Added Paths
Diff
Copied: branches/chromium/782/LayoutTests/fast/block/positioning/relayout-nested-positioned-elements-crash.html (from rev 91689, trunk/LayoutTests/fast/block/positioning/relayout-nested-positioned-elements-crash.html) (0 => 91776)
--- branches/chromium/782/LayoutTests/fast/block/positioning/relayout-nested-positioned-elements-crash.html (rev 0)
+++ branches/chromium/782/LayoutTests/fast/block/positioning/relayout-nested-positioned-elements-crash.html 2011-07-26 19:54:40 UTC (rev 91776)
@@ -0,0 +1,27 @@
+<html>
+<head>
+<title>Test case for bug 64286</title>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+</script>
+</head>
+<body>
+<p>This tests that we don't cause an assertion failure on relayout of nested positioned elements. This test PASSED if we don't cause an assertion failure.</p>
+<div style="position:absolute">
+ <span style="position:relative">
+ PASS
+ <div style="position:absolute">
+ <input id="hideMe"/>
+ </div>
+ </span>
+</div>
+<script>
+window.setTimeout(runTest, 0); // For some reason we need the setTimeout() for this test to work.
+function runTest()
+{
+ document.getElementById("hideMe").style.display = "none";
+}
+</script>
+</body>
+</html>
Copied: branches/chromium/782/LayoutTests/fast/block/positioning/relayout-nested-positioned-elements-expected-crash.txt (from rev 91689, trunk/LayoutTests/fast/block/positioning/relayout-nested-positioned-elements-expected-crash.txt) (0 => 91776)
--- branches/chromium/782/LayoutTests/fast/block/positioning/relayout-nested-positioned-elements-expected-crash.txt (rev 0)
+++ branches/chromium/782/LayoutTests/fast/block/positioning/relayout-nested-positioned-elements-expected-crash.txt 2011-07-26 19:54:40 UTC (rev 91776)
@@ -0,0 +1,3 @@
+This tests that we don't cause an assertion failure on relayout of nested positioned elements. This test PASSED if we don't cause an assertion failure.
+
+PASS
Modified: branches/chromium/782/Source/WebCore/rendering/RenderObject.h (91775 => 91776)
--- branches/chromium/782/Source/WebCore/rendering/RenderObject.h 2011-07-26 19:48:37 UTC (rev 91775)
+++ branches/chromium/782/Source/WebCore/rendering/RenderObject.h 2011-07-26 19:54:40 UTC (rev 91776)
@@ -1018,10 +1018,13 @@
if (!container && !o->isRenderView())
return;
if (!last->isText() && (last->style()->position() == FixedPosition || last->style()->position() == AbsolutePosition)) {
+ bool willSkipRelativelyPositionedInlines = !o->isRenderBlock();
while (o && !o->isRenderBlock()) // Skip relatively positioned inlines and get to the enclosing RenderBlock.
o = o->container();
if (!o || o->m_posChildNeedsLayout)
return;
+ if (willSkipRelativelyPositionedInlines)
+ container = o->container();
o->m_posChildNeedsLayout = true;
simplifiedNormalFlowLayout = true;
ASSERT(!o->isSetNeedsLayoutForbidden());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes