Changeset 224933 in webkit


Ignore:
Timestamp:
Nov 16, 2017 12:26:37 PM (6 years ago)
Author:
Alan Bujtas
Message:

Always invoke RenderObject::insertedIntoTree/willBeRemovedFromTree
https://bugs.webkit.org/show_bug.cgi?id=178007

Reviewed by Antti Koivisto.

Based on Antti Koivisto's patch:
These call are currently skipped in some cases making them bug prone and difficult to reason about.
This is done as an optimization that doesn't appear to be valuable anymore.

Covered by existing tests.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::makeChildrenNonInline):
(WebCore::RenderBlock::dropAnonymousBoxChild):
(WebCore::RenderBlock::takeChild):

  • rendering/RenderBlock.h:

(WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::styleDidChange):
(WebCore::RenderBlockFlow::moveAllChildrenIncludingFloatsTo):

  • rendering/RenderBlockFlow.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::splitAnonymousBoxesAroundChild):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::moveChildTo):
(WebCore::RenderBoxModelObject::moveChildrenTo):

  • rendering/RenderBoxModelObject.h:

(WebCore::RenderBoxModelObject::moveChildTo):
(WebCore::RenderBoxModelObject::moveAllChildrenTo):
(WebCore::RenderBoxModelObject::moveChildrenTo):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::addChild):
(WebCore::RenderElement::takeChild):
(WebCore::RenderElement::insertChildInternal):
(WebCore::RenderElement::takeChildInternal):
(WebCore::RenderElement::handleDynamicFloatPositionChange):

  • rendering/RenderElement.h:
  • rendering/RenderInline.cpp:

(WebCore::RenderInline::splitInlines):
(WebCore::RenderInline::splitFlow):
(WebCore::RenderInline::childBecameNonInline):

  • rendering/RenderMultiColumnFlow.cpp:

(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::moveInlineChildren):
(WebCore::RenderRubyBase::moveBlockChildren):

  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::takeChild):

  • rendering/RenderTableRow.cpp:

(WebCore::RenderTableRow::collapseAndDestroyAnonymousSiblingRows):

  • style/RenderTreeUpdaterMultiColumn.cpp:

(WebCore::RenderTreeUpdater::MultiColumn::createFragmentedFlow):
(WebCore::RenderTreeUpdater::MultiColumn::destroyFragmentedFlow):

Location:
trunk/Source/WebCore
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r224929 r224933  
     12017-11-16  Zalan Bujtas  <zalan@apple.com>
     2
     3        Always invoke RenderObject::insertedIntoTree/willBeRemovedFromTree
     4        https://bugs.webkit.org/show_bug.cgi?id=178007
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Based on Antti Koivisto's patch:
     9        These call are currently skipped in some cases making them bug prone and difficult to reason about.
     10        This is done as an optimization that doesn't appear to be valuable anymore.
     11
     12        Covered by existing tests.
     13
     14        * rendering/RenderBlock.cpp:
     15        (WebCore::RenderBlock::makeChildrenNonInline):
     16        (WebCore::RenderBlock::dropAnonymousBoxChild):
     17        (WebCore::RenderBlock::takeChild):
     18        * rendering/RenderBlock.h:
     19        (WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo):
     20        * rendering/RenderBlockFlow.cpp:
     21        (WebCore::RenderBlockFlow::styleDidChange):
     22        (WebCore::RenderBlockFlow::moveAllChildrenIncludingFloatsTo):
     23        * rendering/RenderBlockFlow.h:
     24        * rendering/RenderBox.cpp:
     25        (WebCore::RenderBox::splitAnonymousBoxesAroundChild):
     26        * rendering/RenderBoxModelObject.cpp:
     27        (WebCore::RenderBoxModelObject::moveChildTo):
     28        (WebCore::RenderBoxModelObject::moveChildrenTo):
     29        * rendering/RenderBoxModelObject.h:
     30        (WebCore::RenderBoxModelObject::moveChildTo):
     31        (WebCore::RenderBoxModelObject::moveAllChildrenTo):
     32        (WebCore::RenderBoxModelObject::moveChildrenTo):
     33        * rendering/RenderElement.cpp:
     34        (WebCore::RenderElement::addChild):
     35        (WebCore::RenderElement::takeChild):
     36        (WebCore::RenderElement::insertChildInternal):
     37        (WebCore::RenderElement::takeChildInternal):
     38        (WebCore::RenderElement::handleDynamicFloatPositionChange):
     39        * rendering/RenderElement.h:
     40        * rendering/RenderInline.cpp:
     41        (WebCore::RenderInline::splitInlines):
     42        (WebCore::RenderInline::splitFlow):
     43        (WebCore::RenderInline::childBecameNonInline):
     44        * rendering/RenderMultiColumnFlow.cpp:
     45        (WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
     46        * rendering/RenderRubyBase.cpp:
     47        (WebCore::RenderRubyBase::moveInlineChildren):
     48        (WebCore::RenderRubyBase::moveBlockChildren):
     49        * rendering/RenderRubyRun.cpp:
     50        (WebCore::RenderRubyRun::takeChild):
     51        * rendering/RenderTableRow.cpp:
     52        (WebCore::RenderTableRow::collapseAndDestroyAnonymousSiblingRows):
     53        * style/RenderTreeUpdaterMultiColumn.cpp:
     54        (WebCore::RenderTreeUpdater::MultiColumn::createFragmentedFlow):
     55        (WebCore::RenderTreeUpdater::MultiColumn::destroyFragmentedFlow):
     56
    1572017-11-14  Dean Jackson  <dino@apple.com>
    258
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r224600 r224933  
    705705        auto newBlock = createAnonymousBlock();
    706706        auto& block = *newBlock;
    707         insertChildInternal(WTFMove(newBlock), inlineRunStart, NotifyChildren);
    708         moveChildrenTo(&block, inlineRunStart, child);
     707        insertChildInternal(WTFMove(newBlock), inlineRunStart);
     708        moveChildrenTo(&block, inlineRunStart, child, RenderBoxModelObject::NormalizeAfterInsertion::No);
    709709    }
    710710
     
    811811    RenderObject* nextSibling = child.nextSibling();
    812812
    813     auto toBeDeleted = takeChildInternal(child, child.hasLayer() ? NotifyChildren : DontNotifyChildren);
    814     child.moveAllChildrenTo(this, nextSibling, child.hasLayer());
     813    auto toBeDeleted = takeChildInternal(child);
     814    child.moveAllChildrenTo(this, nextSibling, RenderBoxModelObject::NormalizeAfterInsertion::No);
    815815    // Delete the now-empty block's lines and nuke it.
    816816    child.deleteLines();
     
    844844            ASSERT(!inlineChildrenBlock.continuation());
    845845            // Cache this value as it might get changed in setStyle() call.
    846             bool inlineChildrenBlockHasLayer = inlineChildrenBlock.hasLayer();
    847846            inlineChildrenBlock.setStyle(RenderStyle::createAnonymousStyleWithDisplay(style(), BLOCK));
    848             auto blockToMove = takeChildInternal(inlineChildrenBlock, inlineChildrenBlockHasLayer ? NotifyChildren : DontNotifyChildren);
     847            auto blockToMove = takeChildInternal(inlineChildrenBlock);
    849848           
    850849            // Now just put the inlineChildrenBlock inside the blockChildrenBlock.
    851850            RenderObject* beforeChild = prev == &inlineChildrenBlock ? blockChildrenBlock.firstChild() : nullptr;
    852             blockChildrenBlock.insertChildInternal(WTFMove(blockToMove), beforeChild,
    853                 (inlineChildrenBlockHasLayer || blockChildrenBlock.hasLayer()) ? NotifyChildren : DontNotifyChildren);
     851            blockChildrenBlock.insertChildInternal(WTFMove(blockToMove), beforeChild);
    854852            next->setNeedsLayoutAndPrefWidthsRecalc();
    855853           
     
    863861            // Take all the children out of the |next| block and put them in
    864862            // the |prev| block.
    865             nextBlock.moveAllChildrenIncludingFloatsTo(prevBlock, nextBlock.hasLayer() || prevBlock.hasLayer());
     863            nextBlock.moveAllChildrenIncludingFloatsTo(prevBlock, RenderBoxModelObject::NormalizeAfterInsertion::No);
    866864           
    867865            // Delete the now-empty block's lines and nuke it.
  • trunk/Source/WebCore/rendering/RenderBlock.h

    r224600 r224933  
    439439
    440440    // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to RenderBlockFlow
    441     virtual void moveAllChildrenIncludingFloatsTo(RenderBlock& toBlock, bool fullRemoveInsert) { moveAllChildrenTo(&toBlock, fullRemoveInsert); }
     441    virtual void moveAllChildrenIncludingFloatsTo(RenderBlock& toBlock, RenderBoxModelObject::NormalizeAfterInsertion normalizeAfterInsertion) { moveAllChildrenTo(&toBlock, normalizeAfterInsertion); }
    442442
    443443    void addChildToContinuation(RenderPtr<RenderObject> newChild, RenderObject* beforeChild);
  • trunk/Source/WebCore/rendering/RenderBlockFlow.cpp

    r224653 r224933  
    20272027    // It copies the logic of RenderBlock::addChildIgnoringContinuation
    20282028    if (noLongerAffectsParentBlock() && style().isFloating() && previousSibling() && previousSibling()->isAnonymousBlock())
    2029         downcast<RenderBoxModelObject>(*parent()).moveChildTo(&downcast<RenderBoxModelObject>(*previousSibling()), this);
     2029        downcast<RenderBoxModelObject>(*parent()).moveChildTo(&downcast<RenderBoxModelObject>(*previousSibling()), this, RenderBoxModelObject::NormalizeAfterInsertion::No);
    20302030
    20312031    if (diff >= StyleDifferenceRepaint) {
     
    21092109}
    21102110
    2111 void RenderBlockFlow::moveAllChildrenIncludingFloatsTo(RenderBlock& toBlock, bool fullRemoveInsert)
     2111void RenderBlockFlow::moveAllChildrenIncludingFloatsTo(RenderBlock& toBlock, RenderBoxModelObject::NormalizeAfterInsertion normalizeAfterInsertion)
    21122112{
    21132113    auto& toBlockFlow = downcast<RenderBlockFlow>(toBlock);
    2114     moveAllChildrenTo(&toBlockFlow, fullRemoveInsert);
     2114    moveAllChildrenTo(&toBlockFlow, normalizeAfterInsertion);
    21152115    addFloatsToNewParent(toBlockFlow);
    21162116}
  • trunk/Source/WebCore/rendering/RenderBlockFlow.h

    r224653 r224933  
    476476    void paintFloats(PaintInfo&, const LayoutPoint&, bool preservePhase = false) override;
    477477
    478     void moveAllChildrenIncludingFloatsTo(RenderBlock& toBlock, bool fullRemoveInsert) override;
     478    void moveAllChildrenIncludingFloatsTo(RenderBlock& toBlock, RenderBoxModelObject::NormalizeAfterInsertion) override;
    479479    void repaintOverhangingFloats(bool paintAllDescendants) final;
    480480    void clipOutFloatingObjects(RenderBlock&, const PaintInfo*, const LayoutPoint&, const LayoutSize&) override;
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r224579 r224933  
    49384938            // See for example RenderTableCell:clippedOverflowRectForRepaint.
    49394939            markBoxForRelayoutAfterSplit(*parentBox);
    4940             parentBox->insertChildInternal(WTFMove(newPostBox), boxToSplit.nextSibling(), NotifyChildren);
    4941             boxToSplit.moveChildrenTo(&postBox, beforeChild, nullptr, true);
     4940            parentBox->insertChildInternal(WTFMove(newPostBox), boxToSplit.nextSibling());
     4941            boxToSplit.moveChildrenTo(&postBox, beforeChild, nullptr, RenderBoxModelObject::NormalizeAfterInsertion::Yes);
    49424942
    49434943            markBoxForRelayoutAfterSplit(boxToSplit);
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r224600 r224933  
    26802680}
    26812681
    2682 void RenderBoxModelObject::moveChildTo(RenderBoxModelObject* toBoxModelObject, RenderObject* child, RenderObject* beforeChild, bool fullRemoveInsert)
    2683 {
    2684     // We assume that callers have cleared their positioned objects list for child moves (!fullRemoveInsert) so the
     2682void RenderBoxModelObject::moveChildTo(RenderBoxModelObject* toBoxModelObject, RenderObject* child, RenderObject* beforeChild, NormalizeAfterInsertion normalizeAfterInsertion)
     2683{
     2684    // We assume that callers have cleared their positioned objects list for child moves so the
    26852685    // positioned renderer maps don't become stale. It would be too slow to do the map lookup on each call.
    2686     ASSERT(!fullRemoveInsert || !is<RenderBlock>(*this) || !downcast<RenderBlock>(*this).hasPositionedObjects());
     2686    ASSERT(normalizeAfterInsertion == NormalizeAfterInsertion::No || !is<RenderBlock>(*this) || !downcast<RenderBlock>(*this).hasPositionedObjects());
    26872687
    26882688    ASSERT(this == child->parent());
    26892689    ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
    2690     if (fullRemoveInsert && (toBoxModelObject->isRenderBlock() || toBoxModelObject->isRenderInline())) {
     2690    if (normalizeAfterInsertion == NormalizeAfterInsertion::Yes && (toBoxModelObject->isRenderBlock() || toBoxModelObject->isRenderInline())) {
    26912691        // Takes care of adding the new child correctly if toBlock and fromBlock
    26922692        // have different kind of children (block vs inline).
    2693         auto childToMove = takeChildInternal(*child, NotifyChildren);
     2693        auto childToMove = takeChildInternal(*child);
    26942694        toBoxModelObject->addChild(WTFMove(childToMove), beforeChild);
    26952695    } else {
    2696         NotifyChildrenType notifyType = fullRemoveInsert ? NotifyChildren : DontNotifyChildren;
    2697         auto childToMove = takeChildInternal(*child, notifyType);
    2698         toBoxModelObject->insertChildInternal(WTFMove(childToMove), beforeChild, notifyType);
    2699     }
    2700 }
    2701 
    2702 void RenderBoxModelObject::moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* startChild, RenderObject* endChild, RenderObject* beforeChild, bool fullRemoveInsert)
     2696        auto childToMove = takeChildInternal(*child);
     2697        toBoxModelObject->insertChildInternal(WTFMove(childToMove), beforeChild);
     2698    }
     2699}
     2700
     2701void RenderBoxModelObject::moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* startChild, RenderObject* endChild, RenderObject* beforeChild, NormalizeAfterInsertion normalizeAfterInsertion)
    27032702{
    27042703    // This condition is rarely hit since this function is usually called on
    27052704    // anonymous blocks which can no longer carry positioned objects (see r120761)
    27062705    // or when fullRemoveInsert is false.
    2707     if (fullRemoveInsert && is<RenderBlock>(*this)) {
     2706    if (normalizeAfterInsertion == NormalizeAfterInsertion::Yes && is<RenderBlock>(*this)) {
    27082707        downcast<RenderBlock>(*this).removePositionedObjects(nullptr);
    27092708        if (is<RenderBlockFlow>(*this))
     
    27332732        }
    27342733
    2735         moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert);
     2734        moveChildTo(toBoxModelObject, child, beforeChild, normalizeAfterInsertion);
    27362735        child = nextSibling;
    27372736    }
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.h

    r224600 r224933  
    278278    void clearFirstLetterRemainingText();
    279279
    280     // These functions are only used internally to manipulate the render tree structure via remove/insert/appendChildNode.
    281     // Since they are typically called only to move objects around within anonymous blocks, the default for fullRemoveInsert is false rather than true.
    282     void moveChildTo(RenderBoxModelObject* toBoxModelObject, RenderObject* child, RenderObject* beforeChild, bool fullRemoveInsert = false);
    283     void moveChildTo(RenderBoxModelObject* toBoxModelObject, RenderObject* child, bool fullRemoveInsert = false)
    284     {
    285         moveChildTo(toBoxModelObject, child, nullptr, fullRemoveInsert);
    286     }
    287     void moveAllChildrenTo(RenderBoxModelObject* toBoxModelObject, bool fullRemoveInsert = false)
    288     {
    289         moveAllChildrenTo(toBoxModelObject, nullptr, fullRemoveInsert);
    290     }
    291     void moveAllChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* beforeChild, bool fullRemoveInsert = false)
    292     {
    293         moveChildrenTo(toBoxModelObject, firstChild(), nullptr, beforeChild, fullRemoveInsert);
     280    // NormalizeAfterInsertion::Yes ensures that the destination subtree is consistent after the insertion (anonymous wrappers etc).
     281    enum class NormalizeAfterInsertion { No, Yes };
     282    void moveChildTo(RenderBoxModelObject* toBoxModelObject, RenderObject* child, RenderObject* beforeChild, NormalizeAfterInsertion);
     283    void moveChildTo(RenderBoxModelObject* toBoxModelObject, RenderObject* child, NormalizeAfterInsertion normalizeAfterInsertion)
     284    {
     285        moveChildTo(toBoxModelObject, child, nullptr, normalizeAfterInsertion);
     286    }
     287    void moveAllChildrenTo(RenderBoxModelObject* toBoxModelObject, NormalizeAfterInsertion normalizeAfterInsertion)
     288    {
     289        moveAllChildrenTo(toBoxModelObject, nullptr, normalizeAfterInsertion);
     290    }
     291    void moveAllChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* beforeChild, NormalizeAfterInsertion normalizeAfterInsertion)
     292    {
     293        moveChildrenTo(toBoxModelObject, firstChild(), nullptr, beforeChild, normalizeAfterInsertion);
    294294    }
    295295    // Move all of the kids from |startChild| up to but excluding |endChild|. 0 can be passed as the |endChild| to denote
    296296    // that all the kids from |startChild| onwards should be moved.
    297     void moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* startChild, RenderObject* endChild, bool fullRemoveInsert = false)
    298     {
    299         moveChildrenTo(toBoxModelObject, startChild, endChild, nullptr, fullRemoveInsert);
    300     }
    301     void moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* startChild, RenderObject* endChild, RenderObject* beforeChild, bool fullRemoveInsert = false);
     297    void moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* startChild, RenderObject* endChild, NormalizeAfterInsertion normalizeAfterInsertion)
     298    {
     299        moveChildrenTo(toBoxModelObject, startChild, endChild, nullptr, normalizeAfterInsertion);
     300    }
     301    void moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* startChild, RenderObject* endChild, RenderObject* beforeChild, NormalizeAfterInsertion);
    302302
    303303    enum ScaleByEffectiveZoomOrNot { ScaleByEffectiveZoom, DoNotScaleByEffectiveZoom };
  • trunk/Source/WebCore/rendering/RenderElement.cpp

    r224563 r224933  
    492492        table->addChild(WTFMove(newChild));
    493493    } else
    494         insertChildInternal(WTFMove(newChild), beforeChild, NotifyChildren);
     494        insertChildInternal(WTFMove(newChild), beforeChild);
    495495
    496496    if (is<RenderText>(child))
     
    513513RenderPtr<RenderObject> RenderElement::takeChild(RenderObject& oldChild)
    514514{
    515     return takeChildInternal(oldChild, NotifyChildren);
     515    return takeChildInternal(oldChild);
    516516}
    517517
     
    530530}
    531531
    532 void RenderElement::insertChildInternal(RenderPtr<RenderObject> newChildPtr, RenderObject* beforeChild, NotifyChildrenType notifyChildren)
     532void RenderElement::insertChildInternal(RenderPtr<RenderObject> newChildPtr, RenderObject* beforeChild)
    533533{
    534534    RELEASE_ASSERT_WITH_MESSAGE(!view().frameView().layoutContext().layoutState(), "Layout must not mutate render tree");
     
    568568    newChild->initializeFragmentedFlowStateOnInsertion();
    569569    if (!renderTreeBeingDestroyed()) {
    570         if (notifyChildren == NotifyChildren)
    571             newChild->insertedIntoTree();
     570        newChild->insertedIntoTree();
    572571        if (is<RenderElement>(*newChild))
    573572            RenderCounter::rendererSubtreeAttached(downcast<RenderElement>(*newChild));
     
    587586}
    588587
    589 RenderPtr<RenderObject> RenderElement::takeChildInternal(RenderObject& oldChild, NotifyChildrenType notifyChildren)
     588RenderPtr<RenderObject> RenderElement::takeChildInternal(RenderObject& oldChild)
    590589{
    591590    RELEASE_ASSERT_WITH_MESSAGE(!view().frameView().layoutContext().layoutState(), "Layout must not mutate render tree");
     
    600599    // that a positioned child got yanked). We also repaint, so that the area exposed when the child
    601600    // disappears gets repainted properly.
    602     if (!renderTreeBeingDestroyed() && notifyChildren == NotifyChildren && oldChild.everHadLayout()) {
     601    if (!renderTreeBeingDestroyed() && oldChild.everHadLayout()) {
    603602        oldChild.setNeedsLayoutAndPrefWidthsRecalc();
    604603        // We only repaint |oldChild| if we have a RenderLayer as its visual overflow may not be tracked by its parent.
     
    623622        frame().selection().setNeedsSelectionUpdate();
    624623
    625     if (!renderTreeBeingDestroyed() && notifyChildren == NotifyChildren)
     624    if (!renderTreeBeingDestroyed())
    626625        oldChild.willBeRemovedFromTree();
    627626
     
    958957            auto newBlock = downcast<RenderBlock>(*parent()).createAnonymousBlock();
    959958            auto& block = *newBlock;
    960             parent()->insertChildInternal(WTFMove(newBlock), this, RenderElement::NotifyChildren);
    961             auto thisToMove = parent()->takeChildInternal(*this, RenderElement::NotifyChildren);
    962             block.insertChildInternal(WTFMove(thisToMove), nullptr, RenderElement::NotifyChildren);
     959            parent()->insertChildInternal(WTFMove(newBlock), this);
     960            auto thisToMove = parent()->takeChildInternal(*this);
     961            block.insertChildInternal(WTFMove(thisToMove), nullptr);
    963962        }
    964963    }
  • trunk/Source/WebCore/rendering/RenderElement.h

    r224583 r224933  
    100100    RenderLayer* findNextLayer(RenderLayer* parentLayer, RenderObject* startPoint, bool checkParent = true);
    101101
    102     enum NotifyChildrenType { NotifyChildren, DontNotifyChildren };
    103     void insertChildInternal(RenderPtr<RenderObject>, RenderObject* beforeChild, NotifyChildrenType);
    104     RenderPtr<RenderObject> takeChildInternal(RenderObject&, NotifyChildrenType) WARN_UNUSED_RETURN;
     102    void insertChildInternal(RenderPtr<RenderObject>, RenderObject* beforeChild);
     103    RenderPtr<RenderObject> takeChildInternal(RenderObject&) WARN_UNUSED_RETURN;
    105104
    106105    virtual RenderElement* hoverAncestor() const;
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r224600 r224933  
    403403            // every time, which is a bit wasteful.
    404404        }
    405         auto childToMove = rendererToMove->parent()->takeChildInternal(*rendererToMove, NotifyChildren);
     405        auto childToMove = rendererToMove->parent()->takeChildInternal(*rendererToMove);
    406406        cloneInline->addChildIgnoringContinuation(WTFMove(childToMove));
    407407        rendererToMove->setNeedsLayoutAndPrefWidthsRecalc();
     
    441441            for (auto* sibling = currentChild->nextSibling(); sibling;) {
    442442                auto* next = sibling->nextSibling();
    443                 auto childToMove = current->takeChildInternal(*sibling, NotifyChildren);
     443                auto childToMove = current->takeChildInternal(*sibling);
    444444                cloneInline->addChildIgnoringContinuation(WTFMove(childToMove));
    445445                sibling->setNeedsLayoutAndPrefWidthsRecalc();
     
    459459
    460460    // Now we are at the block level. We need to put the clone into the toBlock.
    461     toBlock->insertChildInternal(WTFMove(cloneInline), nullptr, NotifyChildren);
     461    toBlock->insertChildInternal(WTFMove(cloneInline), nullptr);
    462462
    463463    // Now take all the children after currentChild and remove them from the fromBlock
     
    465465    for (auto* current = currentChild->nextSibling(); current;) {
    466466        auto* next = current->nextSibling();
    467         auto childToMove = fromBlock->takeChildInternal(*current, NotifyChildren);
    468         toBlock->insertChildInternal(WTFMove(childToMove), nullptr, NotifyChildren);
     467        auto childToMove = fromBlock->takeChildInternal(*current);
     468        toBlock->insertChildInternal(WTFMove(childToMove), nullptr);
    469469        current = next;
    470470    }
     
    504504    RenderObject* boxFirst = madeNewBeforeBlock ? block->firstChild() : pre->nextSibling();
    505505    if (createdPre)
    506         block->insertChildInternal(WTFMove(createdPre), boxFirst, NotifyChildren);
    507     block->insertChildInternal(WTFMove(newBlockBox), boxFirst, NotifyChildren);
    508     block->insertChildInternal(WTFMove(createdPost), boxFirst, NotifyChildren);
     506        block->insertChildInternal(WTFMove(createdPre), boxFirst);
     507    block->insertChildInternal(WTFMove(newBlockBox), boxFirst);
     508    block->insertChildInternal(WTFMove(createdPost), boxFirst);
    509509    block->setChildrenInline(false);
    510510   
     
    514514            RenderObject* no = o;
    515515            o = no->nextSibling();
    516             auto childToMove = block->takeChildInternal(*no, NotifyChildren);
    517             pre->insertChildInternal(WTFMove(childToMove), nullptr, NotifyChildren);
     516            auto childToMove = block->takeChildInternal(*no);
     517            pre->insertChildInternal(WTFMove(childToMove), nullptr);
    518518            no->setNeedsLayoutAndPrefWidthsRecalc();
    519519        }
     
    13721372    newBox->insertIntoContinuationChainAfter(*this);
    13731373    RenderObject* beforeChild = child.nextSibling();
    1374     auto removedChild = takeChildInternal(child, NotifyChildren);
     1374    auto removedChild = takeChildInternal(child);
    13751375    splitFlow(beforeChild, WTFMove(newBox), WTFMove(removedChild), oldContinuation);
    13761376}
  • trunk/Source/WebCore/rendering/RenderMultiColumnFlow.cpp

    r224616 r224933  
    369369                gShiftingSpanner = true;
    370370                RenderBlockFlow& ancestorBlock = downcast<RenderBlockFlow>(*spanner->parent());
    371                 ancestorBlock.moveChildTo(placeholder.parentBox(), spanner, placeholder.nextSibling(), true);
     371                ancestorBlock.moveChildTo(placeholder.parentBox(), spanner, placeholder.nextSibling(), RenderBoxModelObject::NormalizeAfterInsertion::Yes);
    372372                gShiftingSpanner = false;
    373373               
  • trunk/Source/WebCore/rendering/RenderRubyBase.cpp

    r224537 r224933  
    100100            auto newToBlock = toBase->createAnonymousBlock();
    101101            toBlock = newToBlock.get();
    102             toBase->insertChildInternal(WTFMove(newToBlock), nullptr, NotifyChildren);
     102            toBase->insertChildInternal(WTFMove(newToBlock), nullptr);
    103103        }
    104104    }
    105105    // Move our inline children into the target block we determined above.
    106     moveChildrenTo(toBlock, firstChild(), beforeChild);
     106    moveChildrenTo(toBlock, firstChild(), beforeChild, RenderBoxModelObject::NormalizeAfterInsertion::No);
    107107}
    108108
     
    125125        RenderBlock* anonBlockHere = downcast<RenderBlock>(firstChildHere);
    126126        RenderBlock* anonBlockThere = downcast<RenderBlock>(lastChildThere);
    127         anonBlockHere->moveAllChildrenTo(anonBlockThere, true);
     127        anonBlockHere->moveAllChildrenTo(anonBlockThere, RenderBoxModelObject::NormalizeAfterInsertion::Yes);
    128128        anonBlockHere->deleteLines();
    129129        anonBlockHere->removeFromParentAndDestroy();
    130130    }
    131131    // Move all remaining children normally.
    132     moveChildrenTo(toBase, firstChild(), beforeChild);
     132    moveChildrenTo(toBase, firstChild(), beforeChild, RenderBoxModelObject::NormalizeAfterInsertion::No);
    133133}
    134134
  • trunk/Source/WebCore/rendering/RenderRubyRun.cpp

    r224537 r224933  
    168168                // Collect all children in a single base, then swap the bases.
    169169                rightBase->mergeChildrenWithBase(*base);
    170                 moveChildTo(&rightRun, base);
    171                 rightRun.moveChildTo(this, rightBase);
     170                moveChildTo(&rightRun, base, RenderBoxModelObject::NormalizeAfterInsertion::No);
     171                rightRun.moveChildTo(this, rightBase, RenderBoxModelObject::NormalizeAfterInsertion::No);
    172172                // The now empty ruby base will be removed below.
    173173                ASSERT(!rubyBase()->firstChild());
  • trunk/Source/WebCore/rendering/RenderTableRow.cpp

    r224546 r224933  
    315315            continue;
    316316        }
    317         currentRow->moveAllChildrenTo(rowToInsertInto);
     317        currentRow->moveAllChildrenTo(rowToInsertInto, RenderBoxModelObject::NormalizeAfterInsertion::No);
    318318        auto toDestroy = section->takeChild(*currentRow);
    319319        currentRow = currentRow->nextRow();
  • trunk/Source/WebCore/style/RenderTreeUpdaterMultiColumn.cpp

    r222920 r224933  
    5858
    5959    // Reparent children preceding the fragmented flow into the fragmented flow.
    60     flow.moveChildrenTo(&fragmentedFlow, flow.firstChild(), &fragmentedFlow, true);
     60    flow.moveChildrenTo(&fragmentedFlow, flow.firstChild(), &fragmentedFlow, RenderBoxModelObject::NormalizeAfterInsertion::Yes);
    6161    if (flow.isFieldset()) {
    6262        // Keep legends out of the flow thread.
    6363        for (auto& box : childrenOfType<RenderBox>(fragmentedFlow)) {
    6464            if (box.isLegend())
    65                 fragmentedFlow.moveChildTo(&flow, &box, true);
     65                fragmentedFlow.moveChildTo(&flow, &box, RenderBoxModelObject::NormalizeAfterInsertion::Yes);
    6666        }
    6767    }
     
    7676
    7777    fragmentedFlow.deleteLines();
    78     fragmentedFlow.moveAllChildrenTo(&flow, true);
     78    fragmentedFlow.moveAllChildrenTo(&flow, RenderBoxModelObject::NormalizeAfterInsertion::Yes);
    7979
    8080    // Move spanners back to their original DOM position in the tree, and destroy the placeholders.
Note: See TracChangeset for help on using the changeset viewer.