[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

carol.szabo at nokia.com carol.szabo at nokia.com
Wed Dec 22 18:46:57 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1cbfead445ffba183b0d82d550a48064e1da0fb6
Author: carol.szabo at nokia.com <carol.szabo at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 17 21:39:19 2010 +0000

    2010-12-17  Carol Szabo  <carol.szabo at nokia.com>
    
            Reviewed by Darin Adler.
    
            A corrupted counter tree is created when renderers are added to the
            tree bypassing RenderObject::addChild
            https://bugs.webkit.org/show_bug.cgi?id=51270
    
            This patch replaces the hack introduced for fixing bug 43812
            with code that addresses the underlying problem for that bug.
            No new layout tests provided as there is no identified scenario when
            visible behavior would be different, the internal datastructures
            are maintained properly through this fix so the previous hack
            introduced for bug 43812 is now removed. The fact that the
            layout test introduced for 43812 continues to pass is proof that the
            code works.
    
            * rendering/RenderCounter.cpp:
            (WebCore::findPlaceForCounter):
              Removed hack.
            * rendering/RenderObject.cpp:
            (WebCore::RenderObject::addChild):
              Moved call to counter nodes updater to lower level
              functions to avoid bypass.
            * rendering/RenderObjectChildList.cpp:
            (WebCore::RenderObjectChildList::appendChildNode):
            (WebCore::RenderObjectChildList::insertChildNode):
              Changed to update the values of the counters that
              may be inserted in the tree.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74292 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3816965..a7c4e73 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,33 @@
+2010-12-17  Carol Szabo  <carol.szabo at nokia.com>
+
+        Reviewed by Darin Adler.
+
+        A corrupted counter tree is created when renderers are added to the
+        tree bypassing RenderObject::addChild
+        https://bugs.webkit.org/show_bug.cgi?id=51270
+
+        This patch replaces the hack introduced for fixing bug 43812
+        with code that addresses the underlying problem for that bug.
+        No new layout tests provided as there is no identified scenario when
+        visible behavior would be different, the internal datastructures
+        are maintained properly through this fix so the previous hack
+        introduced for bug 43812 is now removed. The fact that the 
+        layout test introduced for 43812 continues to pass is proof that the
+        code works.
+
+        * rendering/RenderCounter.cpp:
+        (WebCore::findPlaceForCounter):
+          Removed hack.
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::addChild):
+          Moved call to counter nodes updater to lower level
+          functions to avoid bypass.
+        * rendering/RenderObjectChildList.cpp:
+        (WebCore::RenderObjectChildList::appendChildNode):
+        (WebCore::RenderObjectChildList::insertChildNode):
+          Changed to update the values of the counters that
+          may be inserted in the tree.
+
 2010-12-17  Shimeng (Simon) Wang  <swang at google.com>
 
         Reviewed by Steve Block.
diff --git a/WebCore/rendering/RenderCounter.cpp b/WebCore/rendering/RenderCounter.cpp
index c357be1..7e10440 100644
--- a/WebCore/rendering/RenderCounter.cpp
+++ b/WebCore/rendering/RenderCounter.cpp
@@ -136,11 +136,6 @@ 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 3930910..d27a780 100644
--- a/WebCore/rendering/RenderObject.cpp
+++ b/WebCore/rendering/RenderObject.cpp
@@ -315,7 +315,6 @@ 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 c7c8e44..fed5a2e 100644
--- a/WebCore/rendering/RenderObjectChildList.cpp
+++ b/WebCore/rendering/RenderObjectChildList.cpp
@@ -174,6 +174,7 @@ 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.
@@ -233,6 +234,7 @@ 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