Title: [94542] branches/chromium/835

Diff

Copied: branches/chromium/835/LayoutTests/fast/multicol/column-span-parent-continuation-crash-expected.txt (from rev 94541, trunk/LayoutTests/fast/multicol/column-span-parent-continuation-crash-expected.txt) (0 => 94542)


--- branches/chromium/835/LayoutTests/fast/multicol/column-span-parent-continuation-crash-expected.txt	                        (rev 0)
+++ branches/chromium/835/LayoutTests/fast/multicol/column-span-parent-continuation-crash-expected.txt	2011-09-06 01:21:18 UTC (rev 94542)
@@ -0,0 +1 @@
+PASS

Copied: branches/chromium/835/LayoutTests/fast/multicol/column-span-parent-continuation-crash.html (from rev 94541, trunk/LayoutTests/fast/multicol/column-span-parent-continuation-crash.html) (0 => 94542)


--- branches/chromium/835/LayoutTests/fast/multicol/column-span-parent-continuation-crash.html	                        (rev 0)
+++ branches/chromium/835/LayoutTests/fast/multicol/column-span-parent-continuation-crash.html	2011-09-06 01:21:18 UTC (rev 94542)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div id="console"></div>
+<style>
+div { -webkit-column-count: 1; }
+h2 { -webkit-column-span: all; }
+</style>
+<script src=""
+<script>
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+	layoutTestController.waitUntilDone();
+}
+
+function runTest()
+{
+    document.body.offsetTop;
+    child = document.getElementById('test');
+    child.parentNode.removeChild(child);
+    child = document.getElementById('anything');
+    gc();
+    document.body.innerHTML = "PASS";
+
+	var successfullyParsed = true;
+	if (window.layoutTestController)
+   	    layoutTestController.notifyDone();
+}
+
+setTimeout("runTest()", 0);
+</script>
+<script src=""
+<div>
+<span id="test"><h2></span>
+</div>
+</body>
+</html>
\ No newline at end of file

Modified: branches/chromium/835/LayoutTests/platform/mac/fast/multicol/span/anonymous-split-block-crash-expected.png


(Binary files differ)

Modified: branches/chromium/835/LayoutTests/platform/mac/fast/multicol/span/anonymous-split-block-crash-expected.txt (94541 => 94542)


--- branches/chromium/835/LayoutTests/platform/mac/fast/multicol/span/anonymous-split-block-crash-expected.txt	2011-09-06 01:16:57 UTC (rev 94541)
+++ branches/chromium/835/LayoutTests/platform/mac/fast/multicol/span/anonymous-split-block-crash-expected.txt	2011-09-06 01:21:18 UTC (rev 94542)
@@ -3,27 +3,26 @@
 layer at (0,0) size 800x600
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,16) size 784x568
-layer at (8,16) size 784x184
-  RenderBlock {DIV} at (0,0) size 784x184 [border: (5px solid #800000)]
-    RenderBlock (anonymous multi-column span) at (5,113) size 774x66
-      RenderBlock {H2} at (0,19) size 774x28 [bgcolor=#EEEEEE]
+layer at (8,16) size 784x151
+  RenderBlock {DIV} at (0,0) size 784x151 [border: (5px solid #800000)]
+    RenderBlock (anonymous) at (5,5) size 379x0
+      RenderInline {JUNK} at (0,0) size 0x0
+        RenderText {#text} at (0,0) size 0x0
+    RenderBlock (anonymous) at (5,24) size 379x28
+      RenderBlock {H2} at (0,0) size 379x28 [bgcolor=#EEEEEE]
         RenderText {#text} at (0,0) size 58x28
           text run at (0,0) width 58: "PASS"
-layer at (13,21) size 774x108
-  RenderBlock (anonymous multi-column) at (5,5) size 774x108
-    RenderBlock (anonymous) at (0,0) size 379x198
-      RenderInline {JUNK} at (0,0) size 369x198
-        RenderText {#text} at (0,0) size 0x0
-        RenderText {#text} at (0,0) size 369x198
+    RenderBlock (anonymous) at (5,71) size 379x201
+      RenderInline {JUNK} at (0,0) size 369x201
+        RenderText {#text} at (0,0) size 369x201
           text run at (0,0) width 354: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
           text run at (0,18) width 351: "Nulla varius enim ac mi. Curabitur sollicitudin felis quis"
           text run at (0,36) width 368: "lectus. Quisque adipiscing rhoncus sem. Proin nulla purus,"
           text run at (0,54) width 368: "vulputate vel, varius ut, euismod et, nisi. Sed vitae felis vel"
-          text run at (0,72) width 358: "orci sagittis aliquam. Cras convallis adipiscing sem. Nam"
-          text run at (0,90) width 318: "nonummy enim. Nullam bibendum lobortis neque."
-          text run at (0,108) width 332: "Vestibulum velit orci, tempus euismod, pretium quis,"
-          text run at (0,126) width 309: "interdum vitae, nulla. Phasellus eget ante et tortor"
-          text run at (0,144) width 369: "condimentum vestibulum. Suspendisse hendrerit quam nec"
-          text run at (0,162) width 354: "felis. Sed varius turpis vitae pede. Lorem ipsum dolor sit"
-          text run at (0,180) width 211: "amet, consectetuer adipiscing elit."
-    RenderBlock (anonymous) at (0,198) size 379x0
+          text run at (0,75) width 358: "orci sagittis aliquam. Cras convallis adipiscing sem. Nam"
+          text run at (0,93) width 318: "nonummy enim. Nullam bibendum lobortis neque."
+          text run at (0,111) width 332: "Vestibulum velit orci, tempus euismod, pretium quis,"
+          text run at (0,129) width 309: "interdum vitae, nulla. Phasellus eget ante et tortor"
+          text run at (0,147) width 369: "condimentum vestibulum. Suspendisse hendrerit quam nec"
+          text run at (0,165) width 354: "felis. Sed varius turpis vitae pede. Lorem ipsum dolor sit"
+          text run at (0,183) width 211: "amet, consectetuer adipiscing elit."

Modified: branches/chromium/835/LayoutTests/platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.png


(Binary files differ)

Modified: branches/chromium/835/LayoutTests/platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.txt (94541 => 94542)


--- branches/chromium/835/LayoutTests/platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.txt	2011-09-06 01:16:57 UTC (rev 94541)
+++ branches/chromium/835/LayoutTests/platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.txt	2011-09-06 01:21:18 UTC (rev 94542)
@@ -3,37 +3,32 @@
 layer at (0,0) size 800x600
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,16) size 784x568
-layer at (8,16) size 784x202
-  RenderBlock {DIV} at (0,0) size 784x202 [border: (5px solid #800000)]
-    RenderBlock (anonymous multi-column span) at (5,23) size 774x66
-      RenderBlock {H2} at (0,19) size 774x28 [bgcolor=#EEEEEE]
-        RenderText {#text} at (0,0) size 58x28
-          text run at (0,0) width 58: "PASS"
-layer at (13,21) size 774x18
-  RenderBlock (anonymous multi-column) at (5,5) size 774x18
-    RenderBlock (anonymous) at (0,0) size 379x18
+layer at (8,16) size 784x169
+  RenderBlock {DIV} at (0,0) size 784x169 [border: (5px solid #800000)]
+    RenderBlock (anonymous) at (5,5) size 379x18
       RenderInline {LABEL} at (0,0) size 102x18
         RenderText {#text} at (0,0) size 102x18
           text run at (0,0) width 102: "Some inline text"
-    RenderBlock (anonymous) at (0,18) size 379x18
-      RenderSummary {SUMMARY} at (0,0) size 379x18
-        RenderText {#text} at (0,0) size 102x18
-          text run at (0,0) width 102: "Some block text"
-layer at (13,105) size 774x108
-  RenderBlock (anonymous multi-column) at (5,89) size 774x108
-    RenderBlock (anonymous) at (0,0) size 379x198
-      RenderBlock {SUMMARY} at (0,0) size 379x198
-        RenderText {#text} at (0,0) size 369x198
-          text run at (0,0) width 354: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
-          text run at (0,18) width 351: "Nulla varius enim ac mi. Curabitur sollicitudin felis quis"
-          text run at (0,36) width 368: "lectus. Quisque adipiscing rhoncus sem. Proin nulla purus,"
-          text run at (0,54) width 368: "vulputate vel, varius ut, euismod et, nisi. Sed vitae felis vel"
-          text run at (0,72) width 358: "orci sagittis aliquam. Cras convallis adipiscing sem. Nam"
-          text run at (0,90) width 318: "nonummy enim. Nullam bibendum lobortis neque."
-          text run at (0,108) width 332: "Vestibulum velit orci, tempus euismod, pretium quis,"
-          text run at (0,126) width 309: "interdum vitae, nulla. Phasellus eget ante et tortor"
-          text run at (0,144) width 369: "condimentum vestibulum. Suspendisse hendrerit quam nec"
-          text run at (0,162) width 354: "felis. Sed varius turpis vitae pede. Lorem ipsum dolor sit"
-          text run at (0,180) width 211: "amet, consectetuer adipiscing elit."
-    RenderBlock (anonymous) at (0,198) size 379x0
+    RenderBlock (anonymous) at (5,23) size 379x285
+      RenderSummary {SUMMARY} at (0,0) size 379x285
+        RenderBlock (anonymous) at (0,0) size 379x18
+          RenderText {#text} at (0,0) size 102x18
+            text run at (0,0) width 102: "Some block text"
+        RenderBlock {H2} at (0,37) size 379x28 [bgcolor=#EEEEEE]
+          RenderText {#text} at (0,0) size 58x28
+            text run at (0,0) width 58: "PASS"
+        RenderBlock (anonymous) at (0,84) size 379x201
+          RenderText {#text} at (0,0) size 369x201
+            text run at (0,0) width 354: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
+            text run at (0,18) width 351: "Nulla varius enim ac mi. Curabitur sollicitudin felis quis"
+            text run at (0,36) width 368: "lectus. Quisque adipiscing rhoncus sem. Proin nulla purus,"
+            text run at (0,57) width 368: "vulputate vel, varius ut, euismod et, nisi. Sed vitae felis vel"
+            text run at (0,75) width 358: "orci sagittis aliquam. Cras convallis adipiscing sem. Nam"
+            text run at (0,93) width 318: "nonummy enim. Nullam bibendum lobortis neque."
+            text run at (0,111) width 332: "Vestibulum velit orci, tempus euismod, pretium quis,"
+            text run at (0,129) width 309: "interdum vitae, nulla. Phasellus eget ante et tortor"
+            text run at (0,147) width 369: "condimentum vestibulum. Suspendisse hendrerit quam nec"
+            text run at (0,165) width 354: "felis. Sed varius turpis vitae pede. Lorem ipsum dolor sit"
+            text run at (0,183) width 211: "amet, consectetuer adipiscing elit."
+    RenderBlock (anonymous) at (5,308) size 379x0
       RenderInline {LABEL} at (0,0) size 0x0

Modified: branches/chromium/835/Source/WebCore/rendering/RenderBlock.cpp (94541 => 94542)


--- branches/chromium/835/Source/WebCore/rendering/RenderBlock.cpp	2011-09-06 01:16:57 UTC (rev 94541)
+++ branches/chromium/835/Source/WebCore/rendering/RenderBlock.cpp	2011-09-06 01:21:18 UTC (rev 94542)
@@ -656,8 +656,22 @@
         && !newChild->isInline() && !isAnonymousColumnSpanBlock()) {
         if (style()->specifiesColumns())
             columnsBlockAncestor = this;
-        else if (!isInline() && parent() && parent()->isRenderBlock())
+        else if (!isInline() && parent() && parent()->isRenderBlock()) {
             columnsBlockAncestor = toRenderBlock(parent())->containingColumnsBlock(false);
+            
+            if (columnsBlockAncestor) {
+                // Make sure that none of the parent ancestors have a continuation.
+                // If yes, we do not want split the block into continuations.
+                RenderObject* curr = this;
+                while (curr && curr != columnsBlockAncestor) {
+                    if (curr->isRenderBlock() && toRenderBlock(curr)->continuation()) {
+                        columnsBlockAncestor = 0;
+                        break;
+                    }
+                    curr = curr->parent();
+                }
+            }
+        }
     }
     return columnsBlockAncestor;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to