Title: [109449] branches/chromium/963

Diff

Copied: branches/chromium/963/LayoutTests/fast/lists/remove-listmarker-from-anonblock-with-continuation-crash-expected.txt (from rev 109245, trunk/LayoutTests/fast/lists/remove-listmarker-from-anonblock-with-continuation-crash-expected.txt) (0 => 109449)


--- branches/chromium/963/LayoutTests/fast/lists/remove-listmarker-from-anonblock-with-continuation-crash-expected.txt	                        (rev 0)
+++ branches/chromium/963/LayoutTests/fast/lists/remove-listmarker-from-anonblock-with-continuation-crash-expected.txt	2012-03-01 23:31:10 UTC (rev 109449)
@@ -0,0 +1,3 @@
+PASS if no crash or assert in debug
+
+

Copied: branches/chromium/963/LayoutTests/fast/lists/remove-listmarker-from-anonblock-with-continuation-crash.html (from rev 109245, trunk/LayoutTests/fast/lists/remove-listmarker-from-anonblock-with-continuation-crash.html) (0 => 109449)


--- branches/chromium/963/LayoutTests/fast/lists/remove-listmarker-from-anonblock-with-continuation-crash.html	                        (rev 0)
+++ branches/chromium/963/LayoutTests/fast/lists/remove-listmarker-from-anonblock-with-continuation-crash.html	2012-03-01 23:31:10 UTC (rev 109449)
@@ -0,0 +1,25 @@
+<style>
+.listItem { display: list-item; text-decoration: none; -webkit-column-width: 10px; }
+.colSpanAll { display: block; -webkit-column-span: all; }
+.absPosition { display: inherit; position: absolute; }
+</style>
+<script>
+theadElement = document.createElement('thead');
+theadElement.setAttribute('class', 'listItem');
+document.documentElement.appendChild(theadElement);
+
+listItemElement = document.createElement('li');
+listItemElement.appendChild(document.createTextNode('PASS if no crash or assert in debug'));
+
+theadElement.appendChild(listItemElement);
+theadElement.appendChild(document.createElement('progress'));
+theadElement.appendChild(document.createElement('hgroup'));
+
+document.documentElement.offsetHeight;
+listItemElement.setAttribute('class', 'absPosition');
+document.documentElement.offsetHeight;
+listItemElement.setAttribute('class', 'colSpanAll');
+
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+</script>

Modified: branches/chromium/963/Source/WebCore/rendering/RenderListItem.cpp (109448 => 109449)


--- branches/chromium/963/Source/WebCore/rendering/RenderListItem.cpp	2012-03-01 23:29:32 UTC (rev 109448)
+++ branches/chromium/963/Source/WebCore/rendering/RenderListItem.cpp	2012-03-01 23:31:10 UTC (rev 109449)
@@ -217,14 +217,15 @@
             LayoutStateDisabler layoutStateDisabler(view());
             updateFirstLetter();
             m_marker->remove();
-            // If markerPar is an anonymous block that will lose all its children, destroy it
-            if (markerPar && (markerPar != lineBoxParent) && markerPar->isAnonymousBlock() && !(toRenderBlock(markerPar)->firstChild()))
-                markerPar->destroy();
             if (!lineBoxParent)
                 lineBoxParent = this;
             lineBoxParent->addChild(m_marker, firstNonMarkerChild(lineBoxParent));
             if (m_marker->preferredLogicalWidthsDirty())
                 m_marker->computePreferredLogicalWidths();
+            // If markerPar is an anonymous block that has lost all its children, destroy it.
+            // Extraneous anonymous blocks can cause problems for RenderBlock::updateBeforeAfterContent.
+            if (markerPar && markerPar->isAnonymousBlock() && !markerPar->firstChild() && !toRenderBlock(markerPar)->continuation())
+                markerPar->destroy();
         }
     }
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to