[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.2.3-2-25-gb2c19be

Gustavo Noronha Silva gns at gnome.org
Mon Sep 6 13:09:59 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 369c7428b9b947efe1e9fef94d04604fd2b79604
Author: inferno at chromium.org <inferno at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 10 20:46:43 2010 +0000

    2010-08-10  Abhishek Arya  <inferno at chromium.org>
    
            Reviewed by David Hyatt.
    
            Take checks for ruby base existence out of the ASSERTs.
            https://bugs.webkit.org/show_bug.cgi?id=43795
    
            Test: fast/ruby/ruby-remove-no-base.html
    
            * rendering/RenderRubyRun.cpp:
            (WebCore::RenderRubyRun::addChild):
            (WebCore::RenderRubyRun::removeChild):
    2010-08-10  Abhishek Arya  <inferno at chromium.org>
    
            Reviewed by David Hyatt.
    
            Tests that removing a ruby child which causes merging of ruby base withe
            a non existant base of the right sibling run does not result in crash.
            https://bugs.webkit.org/show_bug.cgi?id=43795
    
            * fast/ruby/ruby-remove-no-base-expected.txt: Added.
            * fast/ruby/ruby-remove-no-base.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65090 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e8eadbf..d1cc1f6 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-10  Abhishek Arya  <inferno at chromium.org>
+
+        Reviewed by David Hyatt.
+
+        Tests that removing a ruby child which causes merging of ruby base withe
+        a non existant base of the right sibling run does not result in crash.
+        https://bugs.webkit.org/show_bug.cgi?id=43795
+
+        * fast/ruby/ruby-remove-no-base-expected.txt: Added.
+        * fast/ruby/ruby-remove-no-base.html: Added.
+
 2010-07-26  Justin Schuh  <jschuh at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/LayoutTests/fast/dom/beforeload/video-before-load-expected.txt b/LayoutTests/fast/ruby/ruby-remove-no-base-expected.txt
similarity index 100%
copy from LayoutTests/fast/dom/beforeload/video-before-load-expected.txt
copy to LayoutTests/fast/ruby/ruby-remove-no-base-expected.txt
diff --git a/LayoutTests/fast/ruby/ruby-remove-no-base.html b/LayoutTests/fast/ruby/ruby-remove-no-base.html
new file mode 100644
index 0000000..9927f40
--- /dev/null
+++ b/LayoutTests/fast/ruby/ruby-remove-no-base.html
@@ -0,0 +1,30 @@
+<html>
+    <head>
+        <script> 
+            if (window.layoutTestController)
+            {
+                layoutTestController.dumpAsText();
+                layoutTestController.waitUntilDone();
+            }
+            
+            function runTest()
+            {
+                document.body.removeChild(document.getElementById("test"));
+                document.getElementById("result").innerHTML = "PASS";
+                
+                if (window.layoutTestController)
+                    layoutTestController.notifyDone();
+            }
+        </script>
+    </head>
+    <body onload='runTest()'>
+        <div id="result"></div>
+        <ruby id="test">
+            <fieldset/>
+            <rt></rt>
+            <blockquote></blockquote>
+            <rt/><rt/>
+        </ruby>
+    </body>
+</html>
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 877bf84..1e508d4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-10  Abhishek Arya  <inferno at chromium.org>
+
+        Reviewed by David Hyatt.
+
+        Take checks for ruby base existence out of the ASSERTs.
+        https://bugs.webkit.org/show_bug.cgi?id=43795
+
+        Test: fast/ruby/ruby-remove-no-base.html
+
+        * rendering/RenderRubyRun.cpp:
+        (WebCore::RenderRubyRun::addChild):
+        (WebCore::RenderRubyRun::removeChild):
+
 2010-07-26  Justin Schuh  <jschuh at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/rendering/RenderRubyRun.cpp b/WebCore/rendering/RenderRubyRun.cpp
index d91c625..c72cb25 100644
--- a/WebCore/rendering/RenderRubyRun.cpp
+++ b/WebCore/rendering/RenderRubyRun.cpp
@@ -143,14 +143,15 @@ void RenderRubyRun::addChild(RenderObject* child, RenderObject* beforeChild)
             RenderBlock::removeChild(beforeChild);
             newRun->addChild(beforeChild);
         } else {
-            ASSERT(hasRubyBase()); // Otherwise beforeChild would be borked.
-            // Insertion before a ruby base object.
-            // In this case we need insert a new run before the current one and split the base.
-            RenderObject* ruby = parent();
-            RenderRubyRun* newRun = staticCreateRubyRun(ruby);
-            ruby->addChild(newRun, this);
-            newRun->addChild(child);
-            rubyBaseSafe()->moveChildren(newRun->rubyBaseSafe(), beforeChild);
+            if (hasRubyBase()) {
+                // Insertion before a ruby base object.
+                // In this case we need insert a new run before the current one and split the base.
+                RenderObject* ruby = parent();
+                RenderRubyRun* newRun = staticCreateRubyRun(ruby);
+                ruby->addChild(newRun, this);
+                newRun->addChild(child);
+                rubyBaseSafe()->moveChildren(newRun->rubyBaseSafe(), beforeChild);
+            }
         }
     } else {
         // child is not a text -> insert it into the base
@@ -171,13 +172,14 @@ void RenderRubyRun::removeChild(RenderObject* child)
         if (base && rightNeighbour && rightNeighbour->isRubyRun()) {
             // Ruby run without a base can happen only at the first run.
             RenderRubyRun* rightRun = static_cast<RenderRubyRun*>(rightNeighbour);
-            ASSERT(rightRun->hasRubyBase());
-            RenderRubyBase* rightBase = rightRun->rubyBaseSafe();
-            // Collect all children in a single base, then swap the bases.
-            rightBase->moveChildren(base);
-            moveChildTo(rightRun, rightRun->children(), base);
-            rightRun->moveChildTo(this, children(), rightBase);
-            // The now empty ruby base will be removed below.
+            if (rightRun->hasRubyBase()) {
+                RenderRubyBase* rightBase = rightRun->rubyBaseSafe();
+                // Collect all children in a single base, then swap the bases.
+                rightBase->moveChildren(base);
+                moveChildTo(rightRun, rightRun->children(), base);
+                rightRun->moveChildTo(this, children(), rightBase);
+                // The now empty ruby base will be removed below.
+            }
         }
     }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list