⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 107331 in webkit


Ignore:
Timestamp:
Feb 9, 2012, 5:48:11 PM (15 years ago)
Author:
cevans@google.com
Message:

Merge 106852
BUG=106336
Review URL: https://chromiumcodereview.appspot.com/9373051

Location:
branches/chromium/1025
Files:
1 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/chromium/1025/Source/WebCore/rendering/RenderCounter.cpp

    r102979 r107331  
    302302// - Non-reset CounterNodes cannot have descendants.
    303303
    304 static bool findPlaceForCounter(RenderObject* counterOwner, const AtomicString& identifier, bool isReset, CounterNode*& parent, CounterNode*& previousSibling)
     304static bool findPlaceForCounter(RenderObject* counterOwner, const AtomicString& identifier, bool isReset, RefPtr<CounterNode>& parent, RefPtr<CounterNode>& previousSibling)
    305305{
    306306    // We cannot stop searching for counters with the same identifier before we also
     
    347347                        // If the node we are placing is not reset or we have found a counter that is attached
    348348                        // to an ancestor of the placed counter's owner renderer we know we are a sibling of that node.
    349                         ASSERT(currentCounter->parent() == previousSiblingProtector->parent());
     349                        if (currentCounter->parent() != previousSiblingProtector->parent())
     350                            return false;
     351
    350352                        parent = currentCounter->parent();
    351353                        previousSibling = previousSiblingProtector.get();
     
    429431        return 0;
    430432
    431     CounterNode* newParent = 0;
    432     CounterNode* newPreviousSibling = 0;
     433    RefPtr<CounterNode> newParent = 0;
     434    RefPtr<CounterNode> newPreviousSibling = 0;
    433435    RefPtr<CounterNode> newNode = CounterNode::create(object, isReset, value);
    434436    if (findPlaceForCounter(object, identifier, isReset, newParent, newPreviousSibling))
    435         newParent->insertAfter(newNode.get(), newPreviousSibling, identifier);
     437        newParent->insertAfter(newNode.get(), newPreviousSibling.get(), identifier);
    436438    CounterMap* nodeMap;
    437439    if (object->hasCounterNodeMap())
     
    629631            continue;
    630632        }
    631         CounterNode* newParent = 0;
    632         CounterNode* newPreviousSibling;
     633        RefPtr<CounterNode> newParent = 0;
     634        RefPtr<CounterNode> newPreviousSibling = 0;
    633635       
    634636        findPlaceForCounter(renderer, AtomicString(it->first.get()), node->hasResetType(), newParent, newPreviousSibling);
     
    641643            parent->removeChild(node.get());
    642644        if (newParent)
    643             newParent->insertAfter(node.get(), newPreviousSibling, it->first.get());
     645            newParent->insertAfter(node.get(), newPreviousSibling.get(), it->first.get());
    644646    }
    645647}
Note: See TracChangeset for help on using the changeset viewer.