[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

inferno at chromium.org inferno at chromium.org
Fri Jan 21 14:45:41 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 3397e91445ececd84451b3da8d9cfe9dfcfb4945
Author: inferno at chromium.org <inferno at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 29 15:50:15 2010 +0000

    2010-12-29  Abhishek Arya  <inferno at chromium.org>
    
            Reviewed by Eric Seidel.
    
            When cloning an anonymous block, make sure to set the childrenInline flag based
            on the state of the block to be cloned.
            https://bugs.webkit.org/show_bug.cgi?id=51489
    
            Test: fast/multicol/span/clone-anonymous-block-non-inline-child-crash.html
    
            * rendering/RenderBlock.cpp:
            (WebCore::RenderBlock::clone): add code to handle cloning of anonymous blocks.
            (WebCore::RenderBlock::splitBlocks): remove anonymous block creation calls since it is now handled by clone().
    2010-12-29  Abhishek Arya  <inferno at chromium.org>
    
            Reviewed by Eric Seidel.
    
            Tests that cloning an anonymous block with non inline children does not crash.
            https://bugs.webkit.org/show_bug.cgi?id=51489
    
            * fast/multicol/span/clone-anonymous-block-non-inline-child-crash.html: Added.
            * platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.checksum: Added.
            * platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.png: Added.
            * platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.txt: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74743 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index eabe11f..47a1671 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-29  Abhishek Arya  <inferno at chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Tests that cloning an anonymous block with non inline children does not crash.
+        https://bugs.webkit.org/show_bug.cgi?id=51489
+
+        * fast/multicol/span/clone-anonymous-block-non-inline-child-crash.html: Added.
+        * platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.checksum: Added.
+        * platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.png: Added.
+        * platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.txt: Added.
+
 2010-12-28  Alexander Pavlov  <apavlov at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/LayoutTests/fast/multicol/span/clone-anonymous-block-non-inline-child-crash.html b/LayoutTests/fast/multicol/span/clone-anonymous-block-non-inline-child-crash.html
new file mode 100644
index 0000000..3ef1ef4
--- /dev/null
+++ b/LayoutTests/fast/multicol/span/clone-anonymous-block-non-inline-child-crash.html
@@ -0,0 +1,21 @@
+<html>
+<style>
+div { 
+    border: 5px solid maroon; 
+    -webkit-column-count: 2;
+    margin: 1em 0;
+}
+h2 { 
+    -webkit-column-span: all;
+    background-color: #eeeeee;
+    color: black;
+}
+</style>
+<div>
+<label>Some inline text
+<summary>Some block text
+<h2>PASS</h2>
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla varius enim ac mi. Curabitur sollicitudin felis quis lectus. Quisque adipiscing rhoncus sem. Proin nulla purus, vulputate vel, varius ut, euismod et, nisi. Sed vitae felis vel orci sagittis aliquam. Cras convallis adipiscing sem. Nam nonummy enim. Nullam bibendum lobortis neque. Vestibulum velit orci, tempus euismod, pretium quis, interdum vitae, nulla. Phasellus eget ante et tortor condimentum vestibulum.
+Suspendisse hendrerit quam nec felis. Sed varius turpis vitae pede. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+</div>
+</html>
diff --git a/LayoutTests/platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.checksum b/LayoutTests/platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.checksum
new file mode 100644
index 0000000..fbd5ad7
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.checksum
@@ -0,0 +1 @@
+07b34585fc3f7827b2b67d76448f10ae
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.png b/LayoutTests/platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.png
new file mode 100644
index 0000000..3d63cd6
Binary files /dev/null and b/LayoutTests/platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.txt b/LayoutTests/platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.txt
new file mode 100644
index 0000000..838621c
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.txt
@@ -0,0 +1,39 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+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,42) size 774x28
+      RenderBlock {H2} at (0,0) 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
+      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
+      RenderBlock {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
+      RenderInline {LABEL} at (0,0) size 0x0
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b5222e3..511e440 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-12-29  Abhishek Arya  <inferno at chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        When cloning an anonymous block, make sure to set the childrenInline flag based
+        on the state of the block to be cloned.
+        https://bugs.webkit.org/show_bug.cgi?id=51489
+
+        Test: fast/multicol/span/clone-anonymous-block-non-inline-child-crash.html
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::clone): add code to handle cloning of anonymous blocks.
+        (WebCore::RenderBlock::splitBlocks): remove anonymous block creation calls since it is now handled by clone().
+
 2010-12-29  Patrick Gansterer  <paroga at webkit.org>
 
         Unreviewed build fix for WinCE after r73802.
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index 7760503..9d85744 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -389,10 +389,15 @@ RenderBlock* RenderBlock::containingColumnsBlock(bool allowAnonymousColumnBlock)
 
 RenderBlock* RenderBlock::clone() const
 {
-    RenderBlock* o = new (renderArena()) RenderBlock(node());
-    o->setStyle(style());
-    o->setChildrenInline(childrenInline());
-    return o;
+    RenderBlock* cloneBlock;
+    if (isAnonymousBlock())
+        cloneBlock = createAnonymousBlock();
+    else {
+        cloneBlock = new (renderArena()) RenderBlock(node());
+        cloneBlock->setStyle(style());
+    }
+    cloneBlock->setChildrenInline(childrenInline());
+    return cloneBlock;
 }
 
 void RenderBlock::splitBlocks(RenderBlock* fromBlock, RenderBlock* toBlock,
@@ -400,13 +405,9 @@ void RenderBlock::splitBlocks(RenderBlock* fromBlock, RenderBlock* toBlock,
                               RenderObject* beforeChild, RenderBoxModelObject* oldCont)
 {
     // Create a clone of this inline.
-    RenderBlock* cloneBlock;
-    if (isAnonymousBlock())
-        cloneBlock = createAnonymousBlock();
-    else {
-        cloneBlock = clone();
+    RenderBlock* cloneBlock = clone();
+    if (!isAnonymousBlock())
         cloneBlock->setContinuation(oldCont);
-    }
 
     // Now take all of the children from beforeChild to the end and remove
     // them from |this| and place them in the clone.
@@ -431,7 +432,7 @@ void RenderBlock::splitBlocks(RenderBlock* fromBlock, RenderBlock* toBlock,
         
         // Create a new clone.
         RenderBlock* cloneChild = cloneBlock;
-        cloneBlock = blockCurr->isAnonymousBlock() ? blockCurr->createAnonymousBlock() : blockCurr->clone();
+        cloneBlock = blockCurr->clone();
 
         // Insert our child clone as the first child.
         cloneBlock->children()->appendChildNode(cloneBlock, cloneChild);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list