Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Unified Diff: Source/WebCore/rendering/CounterNode.cpp

Issue 10770002: Merge 120801 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/css/counters/counter-reset-subtree-insert-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/CounterNode.cpp
===================================================================
--- Source/WebCore/rendering/CounterNode.cpp (revision 122121)
+++ Source/WebCore/rendering/CounterNode.cpp (working copy)
@@ -261,25 +261,22 @@
newChild->m_parent = this;
newChild->m_previousSibling = refChild;
- if (!newChild->m_firstChild || newChild->m_hasResetType) {
+ if (next) {
+ ASSERT(next->m_previousSibling == refChild);
+ next->m_previousSibling = newChild;
newChild->m_nextSibling = next;
- if (next) {
- ASSERT(next->m_previousSibling == refChild);
- next->m_previousSibling = newChild;
- } else {
- ASSERT(m_lastChild == refChild);
- m_lastChild = newChild;
- }
+ } else {
+ ASSERT(m_lastChild == refChild);
+ m_lastChild = newChild;
+ }
+ if (!newChild->m_firstChild || newChild->m_hasResetType) {
newChild->m_countInParent = newChild->computeCountInParent();
newChild->resetThisAndDescendantsRenderers();
if (next)
next->recount();
return;
}
- // If the new child is the last in the sibling list we must set the parent's lastChild.
- if (!newChild->m_nextSibling)
- m_lastChild = newChild;
// The code below handles the case when a formerly root increment counter is loosing its root position
// and therefore its children become next siblings.
« no previous file with comments | « LayoutTests/fast/css/counters/counter-reset-subtree-insert-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698