| Index: Source/WebCore/rendering/RenderObjectChildList.cpp
|
| ===================================================================
|
| --- Source/WebCore/rendering/RenderObjectChildList.cpp (revision 127654)
|
| +++ Source/WebCore/rendering/RenderObjectChildList.cpp (working copy)
|
| @@ -63,14 +63,6 @@
|
| }
|
| }
|
|
|
| -static RenderNamedFlowThread* renderNamedFlowThreadContainer(RenderObject* object)
|
| -{
|
| - while (object && object->isAnonymousBlock() && !object->isRenderNamedFlowThread())
|
| - object = object->parent();
|
| -
|
| - return object && object->isRenderNamedFlowThread() ? toRenderNamedFlowThread(object) : 0;
|
| -}
|
| -
|
| RenderObject* RenderObjectChildList::removeChildNode(RenderObject* owner, RenderObject* oldChild, bool fullRemove)
|
| {
|
| ASSERT(oldChild->parent() == owner);
|
| @@ -126,7 +118,7 @@
|
| oldChild->enclosingRenderFlowThread()->clearRenderObjectCustomStyle(oldChild);
|
| }
|
|
|
| - if (RenderNamedFlowThread* containerFlowThread = renderNamedFlowThreadContainer(owner))
|
| + if (RenderNamedFlowThread* containerFlowThread = owner->enclosingRenderNamedFlowThread())
|
| containerFlowThread->removeFlowChild(oldChild);
|
|
|
| #if ENABLE(SVG)
|
| @@ -169,7 +161,7 @@
|
| return oldChild;
|
| }
|
|
|
| -void RenderObjectChildList::appendChildNode(RenderObject* owner, RenderObject* newChild, bool fullAppend)
|
| +void RenderObjectChildList::appendChildNode(RenderObject* owner, RenderObject* newChild, bool notifyRenderer)
|
| {
|
| ASSERT(newChild->parent() == 0);
|
| ASSERT(!owner->isBlockFlow() || (!newChild->isTableSection() && !newChild->isTableRow() && !newChild->isTableCell()));
|
| @@ -185,41 +177,9 @@
|
|
|
| setLastChild(newChild);
|
|
|
| - if (fullAppend) {
|
| - // Keep our layer hierarchy updated. Optimize for the common case where we don't have any children
|
| - // and don't have a layer attached to ourselves.
|
| - RenderLayer* layer = 0;
|
| - if (newChild->firstChild() || newChild->hasLayer()) {
|
| - layer = owner->enclosingLayer();
|
| - newChild->addLayers(layer);
|
| - }
|
| + if (notifyRenderer)
|
| + newChild->insertedIntoTree();
|
|
|
| - // if the new child is visible but this object was not, tell the layer it has some visible content
|
| - // that needs to be drawn and layer visibility optimization can't be used
|
| - if (owner->style()->visibility() != VISIBLE && newChild->style()->visibility() == VISIBLE && !newChild->hasLayer()) {
|
| - if (!layer)
|
| - layer = owner->enclosingLayer();
|
| - if (layer)
|
| - layer->setHasVisibleContent();
|
| - }
|
| -
|
| - if (newChild->isListItem())
|
| - toRenderListItem(newChild)->updateListMarkerNumbers();
|
| -
|
| - if (!newChild->isFloating() && owner->childrenInline())
|
| - owner->dirtyLinesFromChangedChild(newChild);
|
| -
|
| - if (newChild->isRenderRegion())
|
| - toRenderRegion(newChild)->attachRegion();
|
| -
|
| - // You can't attachQuote() otherwise the quote would be attached too early
|
| - // and get the wrong depth since generated content is inserted into anonymous
|
| - // renderers before going into the main render tree.
|
| -
|
| - if (RenderNamedFlowThread* containerFlowThread = renderNamedFlowThreadContainer(owner))
|
| - containerFlowThread->addFlowChild(newChild);
|
| - }
|
| -
|
| if (!owner->documentBeingDestroyed()) {
|
| RenderCounter::rendererSubtreeAttached(newChild);
|
| }
|
| @@ -231,10 +191,10 @@
|
| owner->document()->axObjectCache()->childrenChanged(owner);
|
| }
|
|
|
| -void RenderObjectChildList::insertChildNode(RenderObject* owner, RenderObject* child, RenderObject* beforeChild, bool fullInsert)
|
| +void RenderObjectChildList::insertChildNode(RenderObject* owner, RenderObject* child, RenderObject* beforeChild, bool notifyRenderer)
|
| {
|
| if (!beforeChild) {
|
| - appendChildNode(owner, child, fullInsert);
|
| + appendChildNode(owner, child, notifyRenderer);
|
| return;
|
| }
|
|
|
| @@ -257,40 +217,9 @@
|
|
|
| child->setParent(owner);
|
|
|
| - if (fullInsert) {
|
| - // Keep our layer hierarchy updated. Optimize for the common case where we don't have any children
|
| - // and don't have a layer attached to ourselves.
|
| - RenderLayer* layer = 0;
|
| - if (child->firstChild() || child->hasLayer()) {
|
| - layer = owner->enclosingLayer();
|
| - child->addLayers(layer);
|
| - }
|
| + if (notifyRenderer)
|
| + child->insertedIntoTree();
|
|
|
| - // if the new child is visible but this object was not, tell the layer it has some visible content
|
| - // that needs to be drawn and layer visibility optimization can't be used
|
| - if (owner->style()->visibility() != VISIBLE && child->style()->visibility() == VISIBLE && !child->hasLayer()) {
|
| - if (!layer)
|
| - layer = owner->enclosingLayer();
|
| - if (layer)
|
| - layer->setHasVisibleContent();
|
| - }
|
| -
|
| - if (child->isListItem())
|
| - toRenderListItem(child)->updateListMarkerNumbers();
|
| -
|
| - if (!child->isFloating() && owner->childrenInline())
|
| - owner->dirtyLinesFromChangedChild(child);
|
| -
|
| - if (child->isRenderRegion())
|
| - toRenderRegion(child)->attachRegion();
|
| -
|
| - // Calling attachQuote() here would be too early (before anonymous renderers are inserted)
|
| - // see appendChild() for more explanation.
|
| -
|
| - if (RenderNamedFlowThread* containerFlowThread = renderNamedFlowThreadContainer(owner))
|
| - containerFlowThread->addFlowChild(child, beforeChild);
|
| - }
|
| -
|
| if (!owner->documentBeingDestroyed()) {
|
| RenderCounter::rendererSubtreeAttached(child);
|
| }
|
|
|