Changeset 74292 in webkit
- Timestamp:
- Dec 17, 2010 1:39:19 PM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r74288 r74292 1 2010-12-17 Carol Szabo <carol.szabo@nokia.com> 2 3 Reviewed by Darin Adler. 4 5 A corrupted counter tree is created when renderers are added to the 6 tree bypassing RenderObject::addChild 7 https://bugs.webkit.org/show_bug.cgi?id=51270 8 9 This patch replaces the hack introduced for fixing bug 43812 10 with code that addresses the underlying problem for that bug. 11 No new layout tests provided as there is no identified scenario when 12 visible behavior would be different, the internal datastructures 13 are maintained properly through this fix so the previous hack 14 introduced for bug 43812 is now removed. The fact that the 15 layout test introduced for 43812 continues to pass is proof that the 16 code works. 17 18 * rendering/RenderCounter.cpp: 19 (WebCore::findPlaceForCounter): 20 Removed hack. 21 * rendering/RenderObject.cpp: 22 (WebCore::RenderObject::addChild): 23 Moved call to counter nodes updater to lower level 24 functions to avoid bypass. 25 * rendering/RenderObjectChildList.cpp: 26 (WebCore::RenderObjectChildList::appendChildNode): 27 (WebCore::RenderObjectChildList::insertChildNode): 28 Changed to update the values of the counters that 29 may be inserted in the tree. 30 1 31 2010-12-17 Shimeng (Simon) Wang <swang@google.com> 2 32 -
trunk/WebCore/rendering/RenderCounter.cpp
r69437 r74292 137 137 previousSibling = 0; 138 138 while (currentRenderer) { 139 // A sibling without a parent means that the counter node tree was not constructed correctly so we stop140 // traversing. In the future RenderCounter should handle RenderObjects that are not connected to the141 // render tree at counter node creation. See bug 43812.142 if (previousSibling && !previousSibling->parent())143 return false;144 139 CounterNode* currentCounter = makeCounterNode(currentRenderer, identifier, false); 145 140 if (searchEndRenderer == currentRenderer) { -
trunk/WebCore/rendering/RenderObject.cpp
r74281 r74292 316 316 children->insertChildNode(this, newChild, beforeChild); 317 317 } 318 RenderCounter::rendererSubtreeAttached(newChild);319 318 if (newChild->isText() && newChild->style()->textTransform() == CAPITALIZE) { 320 319 RefPtr<StringImpl> textToTransform = toRenderText(newChild)->originalText(); -
trunk/WebCore/rendering/RenderObjectChildList.cpp
r68860 r74292 175 175 } 176 176 177 RenderCounter::rendererSubtreeAttached(newChild); 177 178 newChild->setNeedsLayoutAndPrefWidthsRecalc(); // Goes up the containing block hierarchy. 178 179 if (!owner->normalChildNeedsLayout()) … … 234 235 } 235 236 237 RenderCounter::rendererSubtreeAttached(child); 236 238 child->setNeedsLayoutAndPrefWidthsRecalc(); 237 239 if (!owner->normalChildNeedsLayout())
Note: See TracChangeset
for help on using the changeset viewer.