Title: [109440] branches/chromium/1025
- Revision
- 109440
- Author
- [email protected]
- Date
- 2012-03-01 15:12:37 -0800 (Thu, 01 Mar 2012)
Log Message
Merge 109142
BUG=113801
Review URL: https://chromiumcodereview.appspot.com/9570043
Modified Paths
Added Paths
Diff
Copied: branches/chromium/1025/LayoutTests/fast/multicol/span/runin-continuation-crash-expected.txt (from rev 109142, trunk/LayoutTests/fast/multicol/span/runin-continuation-crash-expected.txt) (0 => 109440)
--- branches/chromium/1025/LayoutTests/fast/multicol/span/runin-continuation-crash-expected.txt (rev 0)
+++ branches/chromium/1025/LayoutTests/fast/multicol/span/runin-continuation-crash-expected.txt 2012-03-01 23:12:37 UTC (rev 109440)
@@ -0,0 +1,2 @@
+PASS
+
Copied: branches/chromium/1025/LayoutTests/fast/multicol/span/runin-continuation-crash.html (from rev 109142, trunk/LayoutTests/fast/multicol/span/runin-continuation-crash.html) (0 => 109440)
--- branches/chromium/1025/LayoutTests/fast/multicol/span/runin-continuation-crash.html (rev 0)
+++ branches/chromium/1025/LayoutTests/fast/multicol/span/runin-continuation-crash.html 2012-03-01 23:12:37 UTC (rev 109440)
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<body>
+<style>
+.div1 { -webkit-column-span: all; }
+.divContainer::after { content: ''; }
+.divContainer { -webkit-column-width: 1px; }
+.runin { display: run-in; }
+</style>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+document.body.offsetTop;
+div1 = document.createElement('div');
+div1.setAttribute('class', 'div1');
+div2 = document.createElement('div');
+div3 = document.createElement('div');
+
+divContainer = document.createElement('div');
+divContainer.setAttribute('class', 'divContainer');
+document.documentElement.appendChild(divContainer);
+
+div2.appendChild(div1);
+divContainer.appendChild(div2);
+divContainer.appendChild(div3);
+document.body.offsetTop;
+div2.setAttribute('class', 'runin');
+document.body.offsetTop;
+document.body.innerHTML = "PASS";
+</script>
+</body>
+</html>
Modified: branches/chromium/1025/Source/WebCore/rendering/RenderBlock.cpp (109439 => 109440)
--- branches/chromium/1025/Source/WebCore/rendering/RenderBlock.cpp 2012-03-01 23:10:32 UTC (rev 109439)
+++ branches/chromium/1025/Source/WebCore/rendering/RenderBlock.cpp 2012-03-01 23:12:37 UTC (rev 109440)
@@ -852,8 +852,12 @@
// We are nested inside a multi-column element and are being split by the span. We have to break up
// our block into continuations.
RenderBoxModelObject* oldContinuation = continuation();
- setContinuation(newBox);
+ // When we split an anonymous block, there's no need to do any continuation hookup,
+ // since we haven't actually split a real element.
+ if (!isAnonymousBlock())
+ setContinuation(newBox);
+
// Someone may have put a <p> inside a <q>, causing a split. When this happens, the :after content
// has to move into the inline continuation. Call updateBeforeAfterContent to ensure that our :after
// content gets properly destroyed.
@@ -1757,6 +1761,10 @@
return false;
// FIXME: We don't handle non-block elements with run-in for now.
if (!child->isRenderBlock())
+ return false;
+ // Run-in child shouldn't intrude into the sibling block if it is part of a
+ // continuation chain. In that case, treat it as a normal block.
+ if (child->isElementContinuation() || child->virtualContinuation())
return false;
RenderBlock* blockRunIn = toRenderBlock(child);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes