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

jschuh at chromium.org jschuh at chromium.org
Fri Jan 21 14:49:07 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 77989d8f93f038725ad82d0031163fbab181d017
Author: jschuh at chromium.org <jschuh at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 31 00:50:59 2010 +0000

    2010-12-30  Justin Schuh  <jschuh at chromium.org>
    
            Reviewed by James Robinson.
    
            Reverting r74292 because it introduced a crash with ruby text.
            https://bugs.webkit.org/show_bug.cgi?id=51637
    
            Test: fast/css/counters/counter-ruby-text-cleared.html
    
            * rendering/RenderCounter.cpp:
            (WebCore::findPlaceForCounter):
            * rendering/RenderObject.cpp:
            (WebCore::RenderObject::addChild):
            * rendering/RenderObjectChildList.cpp:
            (WebCore::RenderObjectChildList::appendChildNode):
            (WebCore::RenderObjectChildList::insertChildNode):
    2010-12-30  Justin Schuh  <jschuh at chromium.org>
    
            Reviewed by James Robinson.
    
            Check for crash when deleting ruby text with counters.
            https://bugs.webkit.org/show_bug.cgi?id=51637
    
            * fast/css/counters/counter-ruby-text-cleared-expected.txt: Added.
            * fast/css/counters/counter-ruby-text-cleared.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74816 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5ed1658..ca5c83c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-30  Justin Schuh  <jschuh at chromium.org>
+
+        Reviewed by James Robinson.
+
+        Check for crash when deleting ruby text with counters.
+        https://bugs.webkit.org/show_bug.cgi?id=51637
+
+        * fast/css/counters/counter-ruby-text-cleared-expected.txt: Added.
+        * fast/css/counters/counter-ruby-text-cleared.html: Added.
+
 2010-12-30  Mihai Parparita  <mihaip at chromium.org>
 
         Unreviewed Chromium baseline update.
diff --git a/LayoutTests/fast/css/counters/counter-ruby-text-cleared-expected.txt b/LayoutTests/fast/css/counters/counter-ruby-text-cleared-expected.txt
new file mode 100644
index 0000000..ae78d1c
--- /dev/null
+++ b/LayoutTests/fast/css/counters/counter-ruby-text-cleared-expected.txt
@@ -0,0 +1 @@
+PASS: Clearing ruby text with counters does not crash.
diff --git a/LayoutTests/fast/css/counters/counter-ruby-text-cleared.html b/LayoutTests/fast/css/counters/counter-ruby-text-cleared.html
new file mode 100644
index 0000000..3f89e81
--- /dev/null
+++ b/LayoutTests/fast/css/counters/counter-ruby-text-cleared.html
@@ -0,0 +1,12 @@
+<style>* {counter-increment: x;}</style>
+<script>
+    window.onload = function() {
+        if (window.layoutTestController)
+            layoutTestController.dumpAsText();
+        document.body.innerHTML = "PASS: Clearing ruby text with counters does not crash.";
+    }
+</script>
+<ruby>
+    <rt></rt>
+    <div></div>
+</ruby>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 800d0b7..c1f19bd 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-12-30  Justin Schuh  <jschuh at chromium.org>
+
+        Reviewed by James Robinson.
+
+        Reverting r74292 because it introduced a crash with ruby text.
+        https://bugs.webkit.org/show_bug.cgi?id=51637
+
+        Test: fast/css/counters/counter-ruby-text-cleared.html
+
+        * rendering/RenderCounter.cpp:
+        (WebCore::findPlaceForCounter):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::addChild):
+        * rendering/RenderObjectChildList.cpp:
+        (WebCore::RenderObjectChildList::appendChildNode):
+        (WebCore::RenderObjectChildList::insertChildNode):
+
 2010-12-30  Darin Adler  <darin at apple.com>
 
         Reviewed by David Kilzer.
diff --git a/WebCore/rendering/RenderCounter.cpp b/WebCore/rendering/RenderCounter.cpp
index 7e10440..57c54f8 100644
--- a/WebCore/rendering/RenderCounter.cpp
+++ b/WebCore/rendering/RenderCounter.cpp
@@ -136,6 +136,11 @@ static bool findPlaceForCounter(RenderObject* counterOwner, const AtomicString&
     RenderObject* currentRenderer = counterOwner->previousInPreOrder();
     previousSibling = 0;
     while (currentRenderer) {
+        // A sibling without a parent means that the counter node tree was not constructed correctly so we stop 
+        // traversing. In the future RenderCounter should handle RenderObjects that are not connected to the 
+        // render tree at counter node creation. See bug 43812. 
+        if (previousSibling && !previousSibling->parent())
+            return false;
         CounterNode* currentCounter = makeCounterNode(currentRenderer, identifier, false);
         if (searchEndRenderer == currentRenderer) {
             // We may be at the end of our search.
diff --git a/WebCore/rendering/RenderObject.cpp b/WebCore/rendering/RenderObject.cpp
index d27a780..c7c81f9 100644
--- a/WebCore/rendering/RenderObject.cpp
+++ b/WebCore/rendering/RenderObject.cpp
@@ -315,6 +315,7 @@ void RenderObject::addChild(RenderObject* newChild, RenderObject* beforeChild)
         // Just add it...
         children->insertChildNode(this, newChild, beforeChild);
     }
+    RenderCounter::rendererSubtreeAttached(newChild); 
     if (newChild->isText() && newChild->style()->textTransform() == CAPITALIZE) {
         RefPtr<StringImpl> textToTransform = toRenderText(newChild)->originalText();
         if (textToTransform)
diff --git a/WebCore/rendering/RenderObjectChildList.cpp b/WebCore/rendering/RenderObjectChildList.cpp
index fed5a2e..c7c8e44 100644
--- a/WebCore/rendering/RenderObjectChildList.cpp
+++ b/WebCore/rendering/RenderObjectChildList.cpp
@@ -174,7 +174,6 @@ void RenderObjectChildList::appendChildNode(RenderObject* owner, RenderObject* n
             owner->dirtyLinesFromChangedChild(newChild);
     }
 
-    RenderCounter::rendererSubtreeAttached(newChild);
     newChild->setNeedsLayoutAndPrefWidthsRecalc(); // Goes up the containing block hierarchy.
     if (!owner->normalChildNeedsLayout())
         owner->setChildNeedsLayout(true); // We may supply the static position for an absolute positioned child.
@@ -234,7 +233,6 @@ void RenderObjectChildList::insertChildNode(RenderObject* owner, RenderObject* c
             owner->dirtyLinesFromChangedChild(child);
     }
 
-    RenderCounter::rendererSubtreeAttached(child);
     child->setNeedsLayoutAndPrefWidthsRecalc();
     if (!owner->normalChildNeedsLayout())
         owner->setChildNeedsLayout(true); // We may supply the static position for an absolute positioned child.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list