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

Side by Side Diff: trunk/Source/core/rendering/RenderObjectChildList.cpp

Issue 104593014: Revert 164125 "ASSERTION FAILED: !object || object->isTable()" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/Source/core/rendering/RenderBlock.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 if (AXObjectCache* cache = owner->document().existingAXObjectCache()) 108 if (AXObjectCache* cache = owner->document().existingAXObjectCache())
109 cache->childrenChanged(owner); 109 cache->childrenChanged(owner);
110 110
111 return oldChild; 111 return oldChild;
112 } 112 }
113 113
114 void RenderObjectChildList::insertChildNode(RenderObject* owner, RenderObject* n ewChild, RenderObject* beforeChild, bool notifyRenderer) 114 void RenderObjectChildList::insertChildNode(RenderObject* owner, RenderObject* n ewChild, RenderObject* beforeChild, bool notifyRenderer)
115 { 115 {
116 ASSERT(!newChild->parent()); 116 ASSERT(!newChild->parent());
117 ASSERT(!owner->isRenderBlockFlow() || (!newChild->isTableSection() && !newCh ild->isTableRow() && !newChild->isTableCell())); 117 ASSERT(!owner->isRenderBlockFlow() || (!newChild->isTableSection() && !newCh ild->isTableRow() && !newChild->isTableCell()));
118 ASSERT_WITH_SECURITY_IMPLICATION(!owner->isTable() || (newChild->isTableCapt ion() || newChild->isTableSection() || newChild->isRenderTableCol()));
119 118
120 while (beforeChild && beforeChild->parent() && beforeChild->parent() != owne r) 119 while (beforeChild && beforeChild->parent() && beforeChild->parent() != owne r)
121 beforeChild = beforeChild->parent(); 120 beforeChild = beforeChild->parent();
122 121
123 // This should never happen, but if it does prevent render tree corruption 122 // This should never happen, but if it does prevent render tree corruption
124 // where child->parent() ends up being owner but child->nextSibling()->paren t() 123 // where child->parent() ends up being owner but child->nextSibling()->paren t()
125 // is not owner. 124 // is not owner.
126 if (beforeChild && beforeChild->parent() != owner) { 125 if (beforeChild && beforeChild->parent() != owner) {
127 ASSERT_NOT_REACHED(); 126 ASSERT_NOT_REACHED();
128 return; 127 return;
(...skipping 27 matching lines...) Expand all
156 155
157 newChild->setNeedsLayoutAndPrefWidthsRecalc(); 156 newChild->setNeedsLayoutAndPrefWidthsRecalc();
158 if (!owner->normalChildNeedsLayout()) 157 if (!owner->normalChildNeedsLayout())
159 owner->setChildNeedsLayout(); // We may supply the static position for a n absolute positioned child. 158 owner->setChildNeedsLayout(); // We may supply the static position for a n absolute positioned child.
160 159
161 if (AXObjectCache* cache = owner->document().axObjectCache()) 160 if (AXObjectCache* cache = owner->document().axObjectCache())
162 cache->childrenChanged(owner); 161 cache->childrenChanged(owner);
163 } 162 }
164 163
165 } // namespace WebCore 164 } // namespace WebCore
OLDNEW
« no previous file with comments | « trunk/Source/core/rendering/RenderBlock.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698