Changeset 107331 in webkit
- Timestamp:
- Feb 9, 2012, 5:48:11 PM (15 years ago)
- Location:
- branches/chromium/1025
- Files:
-
- 1 edited
- 2 copied
-
LayoutTests/fast/css/counters/reparent-table-children-with-counters-crash-expected.txt (copied) (copied from trunk/LayoutTests/fast/css/counters/reparent-table-children-with-counters-crash-expected.txt )
-
LayoutTests/fast/css/counters/reparent-table-children-with-counters-crash.html (copied) (copied from trunk/LayoutTests/fast/css/counters/reparent-table-children-with-counters-crash.html )
-
Source/WebCore/rendering/RenderCounter.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/chromium/1025/Source/WebCore/rendering/RenderCounter.cpp
r102979 r107331 302 302 // - Non-reset CounterNodes cannot have descendants. 303 303 304 static bool findPlaceForCounter(RenderObject* counterOwner, const AtomicString& identifier, bool isReset, CounterNode*& parent, CounterNode*& previousSibling)304 static bool findPlaceForCounter(RenderObject* counterOwner, const AtomicString& identifier, bool isReset, RefPtr<CounterNode>& parent, RefPtr<CounterNode>& previousSibling) 305 305 { 306 306 // We cannot stop searching for counters with the same identifier before we also … … 347 347 // If the node we are placing is not reset or we have found a counter that is attached 348 348 // 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 350 352 parent = currentCounter->parent(); 351 353 previousSibling = previousSiblingProtector.get(); … … 429 431 return 0; 430 432 431 CounterNode*newParent = 0;432 CounterNode*newPreviousSibling = 0;433 RefPtr<CounterNode> newParent = 0; 434 RefPtr<CounterNode> newPreviousSibling = 0; 433 435 RefPtr<CounterNode> newNode = CounterNode::create(object, isReset, value); 434 436 if (findPlaceForCounter(object, identifier, isReset, newParent, newPreviousSibling)) 435 newParent->insertAfter(newNode.get(), newPreviousSibling , identifier);437 newParent->insertAfter(newNode.get(), newPreviousSibling.get(), identifier); 436 438 CounterMap* nodeMap; 437 439 if (object->hasCounterNodeMap()) … … 629 631 continue; 630 632 } 631 CounterNode*newParent = 0;632 CounterNode* newPreviousSibling;633 RefPtr<CounterNode> newParent = 0; 634 RefPtr<CounterNode> newPreviousSibling = 0; 633 635 634 636 findPlaceForCounter(renderer, AtomicString(it->first.get()), node->hasResetType(), newParent, newPreviousSibling); … … 641 643 parent->removeChild(node.get()); 642 644 if (newParent) 643 newParent->insertAfter(node.get(), newPreviousSibling , it->first.get());645 newParent->insertAfter(node.get(), newPreviousSibling.get(), it->first.get()); 644 646 } 645 647 }
Note:
See TracChangeset
for help on using the changeset viewer.