Title: [109448] branches/chromium/963

Diff

Copied: branches/chromium/963/LayoutTests/fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash-expected.txt (from rev 108548, trunk/LayoutTests/fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash-expected.txt) (0 => 109448)


--- branches/chromium/963/LayoutTests/fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash-expected.txt	                        (rev 0)
+++ branches/chromium/963/LayoutTests/fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash-expected.txt	2012-03-01 23:29:32 UTC (rev 109448)
@@ -0,0 +1,2 @@
+PASS if no assert or crash on debug
+

Copied: branches/chromium/963/LayoutTests/fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash.html (from rev 108548, trunk/LayoutTests/fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash.html) (0 => 109448)


--- branches/chromium/963/LayoutTests/fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash.html	                        (rev 0)
+++ branches/chromium/963/LayoutTests/fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash.html	2012-03-01 23:29:32 UTC (rev 109448)
@@ -0,0 +1,41 @@
+<style>
+.c9::before { float: right; content: counter(section); }
+.c9 { display: list-item; }
+.c19 { display: table-row; }
+.c19:nth-child(even) { position: fixed; }
+</style>
+<script>
+var nodes = Array();
+function runTest() {
+    firstDiv = document.createElement('div');
+    document.documentElement.appendChild(firstDiv);
+
+    secondDiv = document.createElement('div');
+    document.documentElement.appendChild(secondDiv);
+
+    childDivListItem = document.createElement('div');
+    childDivListItem.setAttribute('class', 'c9');
+    document.documentElement.appendChild(childDivListItem);
+
+    citeNode = document.createElement('cite');
+    citeNode.setAttribute('class', 'c19');
+    document.documentElement.appendChild(citeNode);
+
+    parentDivListItem = document.createElement('div');
+    parentDivListItem.setAttribute('class', 'c9');
+    
+    citeNode.appendChild(parentDivListItem);
+
+    document.body.offsetTop;
+    parentDivListItem.appendChild(childDivListItem);
+    document.body.offsetTop;
+    secondDiv.setAttribute('class', 'c1');
+    document.body.offsetTop;
+    firstDiv.setAttribute('class', 'c1');
+
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+}
+window._onload_ = runTest;
+</script>
+PASS if no assert or crash on debug

Modified: branches/chromium/963/LayoutTests/platform/chromium-win/editing/execCommand/create-list-with-hr-expected.txt (109447 => 109448)


--- branches/chromium/963/LayoutTests/platform/chromium-win/editing/execCommand/create-list-with-hr-expected.txt	2012-03-01 23:28:35 UTC (rev 109447)
+++ branches/chromium/963/LayoutTests/platform/chromium-win/editing/execCommand/create-list-with-hr-expected.txt	2012-03-01 23:29:32 UTC (rev 109448)
@@ -21,7 +21,6 @@
       RenderBlock {DIV} at (0,56) size 784x30
         RenderBlock {UL} at (0,0) size 784x30
           RenderListItem {LI} at (40,0) size 744x30
-            RenderBlock (anonymous) at (0,0) size 744x0
             RenderBlock {HR} at (0,0) size 744x2 [border: (1px inset #000000)]
             RenderBlock (anonymous) at (0,10) size 744x20
               RenderListMarker at (-18,0) size 7x19: bullet

Modified: branches/chromium/963/LayoutTests/platform/gtk/editing/execCommand/create-list-with-hr-expected.txt (109447 => 109448)


--- branches/chromium/963/LayoutTests/platform/gtk/editing/execCommand/create-list-with-hr-expected.txt	2012-03-01 23:28:35 UTC (rev 109447)
+++ branches/chromium/963/LayoutTests/platform/gtk/editing/execCommand/create-list-with-hr-expected.txt	2012-03-01 23:29:32 UTC (rev 109448)
@@ -21,7 +21,6 @@
       RenderBlock {DIV} at (0,52) size 784x28
         RenderBlock {UL} at (0,0) size 784x28
           RenderListItem {LI} at (40,0) size 744x28
-            RenderBlock (anonymous) at (0,0) size 744x0
             RenderBlock {HR} at (0,0) size 744x2 [border: (1px inset #000000)]
             RenderBlock (anonymous) at (0,10) size 744x18
               RenderListMarker at (-17,0) size 7x17: bullet

Modified: branches/chromium/963/LayoutTests/platform/mac/editing/execCommand/create-list-with-hr-expected.txt (109447 => 109448)


--- branches/chromium/963/LayoutTests/platform/mac/editing/execCommand/create-list-with-hr-expected.txt	2012-03-01 23:28:35 UTC (rev 109447)
+++ branches/chromium/963/LayoutTests/platform/mac/editing/execCommand/create-list-with-hr-expected.txt	2012-03-01 23:29:32 UTC (rev 109448)
@@ -21,7 +21,6 @@
       RenderBlock {DIV} at (0,52) size 784x28
         RenderBlock {UL} at (0,0) size 784x28
           RenderListItem {LI} at (40,0) size 744x28
-            RenderBlock (anonymous) at (0,0) size 744x0
             RenderBlock {HR} at (0,0) size 744x2 [border: (1px inset #000000)]
             RenderBlock (anonymous) at (0,10) size 744x18
               RenderListMarker at (-17,0) size 7x18: bullet

Modified: branches/chromium/963/LayoutTests/platform/qt/editing/execCommand/create-list-with-hr-expected.txt (109447 => 109448)


--- branches/chromium/963/LayoutTests/platform/qt/editing/execCommand/create-list-with-hr-expected.txt	2012-03-01 23:28:35 UTC (rev 109447)
+++ branches/chromium/963/LayoutTests/platform/qt/editing/execCommand/create-list-with-hr-expected.txt	2012-03-01 23:29:32 UTC (rev 109448)
@@ -21,7 +21,6 @@
       RenderBlock {DIV} at (0,58) size 784x31
         RenderBlock {UL} at (0,0) size 784x31
           RenderListItem {LI} at (40,0) size 744x31
-            RenderBlock (anonymous) at (0,0) size 744x0
             RenderBlock {HR} at (0,0) size 744x2 [border: (1px inset #000000)]
             RenderBlock (anonymous) at (0,10) size 744x21
               RenderListMarker at (-18,0) size 7x21: bullet

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


--- branches/chromium/963/Source/WebCore/rendering/RenderListItem.cpp	2012-03-01 23:28:35 UTC (rev 109447)
+++ branches/chromium/963/Source/WebCore/rendering/RenderListItem.cpp	2012-03-01 23:29:32 UTC (rev 109448)
@@ -217,6 +217,9 @@
             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));
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to