⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 269161 in webkit


Ignore:
Timestamp:
Oct 29, 2020, 12:24:41 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Make WebCore::ContainerNode::ChildChangeType enum class
https://bugs.webkit.org/show_bug.cgi?id=218298
Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2020-10-29
Reviewed by Darin Adler.

And this patch moved to ChildChangeType to under ChildChange.
This patch also move ChildChangeSource to under ChildChange and specify a base type.

  • dom/CharacterData.cpp:

(WebCore::CharacterData::parserAppendData):
(WebCore::CharacterData::setDataAndUpdate):
(WebCore::CharacterData::notifyParentAfterChange):

  • dom/CharacterData.h:
  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::removeAllChildrenWithScriptAssertion):
(WebCore::ContainerNode::removeNodeWithScriptAssertion):
(WebCore::executeNodeInsertionWithScriptAssertion):
(WebCore::ContainerNode::takeAllChildrenFrom):
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::parserInsertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::removeChild):
(WebCore::ContainerNode::parserRemoveChild):
(WebCore::ContainerNode::replaceAllChildrenWithNewText):
(WebCore::ContainerNode::removeChildren):
(WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck):
(WebCore::ContainerNode::parserAppendChild):
(WebCore::affectsElements):
(WebCore::ContainerNode::childrenChanged):
(WebCore::ContainerNode::replaceChildren):

  • dom/ContainerNode.h:

(WebCore::ContainerNode::ChildChange::isInsertion const):

  • dom/Element.cpp:

(WebCore::Element::childrenChanged):

  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::childrenChanged):

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):

  • html/HTMLElement.h:
  • html/HTMLOutputElement.cpp:

(WebCore::HTMLOutputElement::childrenChanged):

  • svg/SVGClipPathElement.cpp:

(WebCore::SVGClipPathElement::childrenChanged):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::childrenChanged):

  • svg/SVGFELightElement.cpp:

(WebCore::SVGFELightElement::childrenChanged):

  • svg/SVGFilterElement.cpp:

(WebCore::SVGFilterElement::childrenChanged):

  • svg/SVGFilterPrimitiveStandardAttributes.cpp:

(WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):

  • svg/SVGGradientElement.cpp:

(WebCore::SVGGradientElement::childrenChanged):

  • svg/SVGMarkerElement.cpp:

(WebCore::SVGMarkerElement::childrenChanged):

  • svg/SVGMaskElement.cpp:

(WebCore::SVGMaskElement::childrenChanged):

  • svg/SVGPatternElement.cpp:

(WebCore::SVGPatternElement::childrenChanged):

Location:
trunk/Source/WebCore
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r269160 r269161  
     12020-10-29  Tetsuharu Ohzeki  <tetsuharu.ohzeki@gmail.com>
     2
     3        Make WebCore::ContainerNode::ChildChangeType enum class
     4        https://bugs.webkit.org/show_bug.cgi?id=218298
     5        Reviewed by Darin Adler.
     6
     7        And this patch moved to `ChildChangeType` to under `ChildChange`.
     8        This patch also move `ChildChangeSource` to under `ChildChange` and specify a base type.
     9
     10        * dom/CharacterData.cpp:
     11        (WebCore::CharacterData::parserAppendData):
     12        (WebCore::CharacterData::setDataAndUpdate):
     13        (WebCore::CharacterData::notifyParentAfterChange):
     14        * dom/CharacterData.h:
     15        * dom/ContainerNode.cpp:
     16        (WebCore::ContainerNode::removeAllChildrenWithScriptAssertion):
     17        (WebCore::ContainerNode::removeNodeWithScriptAssertion):
     18        (WebCore::executeNodeInsertionWithScriptAssertion):
     19        (WebCore::ContainerNode::takeAllChildrenFrom):
     20        (WebCore::ContainerNode::insertBefore):
     21        (WebCore::ContainerNode::parserInsertBefore):
     22        (WebCore::ContainerNode::replaceChild):
     23        (WebCore::ContainerNode::removeChild):
     24        (WebCore::ContainerNode::parserRemoveChild):
     25        (WebCore::ContainerNode::replaceAllChildrenWithNewText):
     26        (WebCore::ContainerNode::removeChildren):
     27        (WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck):
     28        (WebCore::ContainerNode::parserAppendChild):
     29        (WebCore::affectsElements):
     30        (WebCore::ContainerNode::childrenChanged):
     31        (WebCore::ContainerNode::replaceChildren):
     32        * dom/ContainerNode.h:
     33        (WebCore::ContainerNode::ChildChange::isInsertion const):
     34        * dom/Element.cpp:
     35        (WebCore::Element::childrenChanged):
     36        * dom/ShadowRoot.cpp:
     37        (WebCore::ShadowRoot::childrenChanged):
     38        * html/HTMLElement.cpp:
     39        (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
     40        * html/HTMLElement.h:
     41        * html/HTMLOutputElement.cpp:
     42        (WebCore::HTMLOutputElement::childrenChanged):
     43        * svg/SVGClipPathElement.cpp:
     44        (WebCore::SVGClipPathElement::childrenChanged):
     45        * svg/SVGElement.cpp:
     46        (WebCore::SVGElement::childrenChanged):
     47        * svg/SVGFELightElement.cpp:
     48        (WebCore::SVGFELightElement::childrenChanged):
     49        * svg/SVGFilterElement.cpp:
     50        (WebCore::SVGFilterElement::childrenChanged):
     51        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
     52        (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
     53        * svg/SVGGradientElement.cpp:
     54        (WebCore::SVGGradientElement::childrenChanged):
     55        * svg/SVGMarkerElement.cpp:
     56        (WebCore::SVGMarkerElement::childrenChanged):
     57        * svg/SVGMaskElement.cpp:
     58        (WebCore::SVGMaskElement::childrenChanged):
     59        * svg/SVGPatternElement.cpp:
     60        (WebCore::SVGPatternElement::childrenChanged):
     61
    1622020-10-29  Sihui Liu  <sihui_liu@apple.com>
    263
  • trunk/Source/WebCore/dom/CharacterData.cpp

    r267220 r269161  
    106106        downcast<Text>(*this).updateRendererAfterContentChange(oldLength, 0);
    107107
    108     notifyParentAfterChange(ContainerNode::ChildChangeSource::Parser);
     108    notifyParentAfterChange(ContainerNode::ChildChange::Source::Parser);
    109109
    110110    auto mutationRecipients = MutationObserverInterestGroup::createForCharacterDataMutation(*this);
     
    192192        document().frame()->selection().textWasReplaced(this, offsetOfReplacedData, oldLength, newLength);
    193193
    194     notifyParentAfterChange(ContainerNode::ChildChangeSource::API);
     194    notifyParentAfterChange(ContainerNode::ChildChange::Source::API);
    195195
    196196    dispatchModifiedEvent(oldData);
    197197}
    198198
    199 void CharacterData::notifyParentAfterChange(ContainerNode::ChildChangeSource source)
     199void CharacterData::notifyParentAfterChange(ContainerNode::ChildChange::Source source)
    200200{
    201201    document().incDOMTreeVersion();
     
    205205
    206206    ContainerNode::ChildChange change = {
    207         ContainerNode::TextChanged,
     207        ContainerNode::ChildChange::Type::TextChanged,
    208208        ElementTraversal::previousSibling(*this),
    209209        ElementTraversal::nextSibling(*this),
  • trunk/Source/WebCore/dom/CharacterData.h

    r267220 r269161  
    6666    String nodeValue() const final;
    6767    ExceptionOr<void> setNodeValue(const String&) final;
    68     void notifyParentAfterChange(ContainerNode::ChildChangeSource);
     68    void notifyParentAfterChange(ContainerNode::ChildChange::Source);
    6969
    7070    String m_data;
  • trunk/Source/WebCore/dom/ContainerNode.cpp

    r268314 r269161  
    7979#endif
    8080
    81 ALWAYS_INLINE NodeVector ContainerNode::removeAllChildrenWithScriptAssertion(ChildChangeSource source, DeferChildrenChanged deferChildrenChanged)
     81ALWAYS_INLINE NodeVector ContainerNode::removeAllChildrenWithScriptAssertion(ChildChange::Source source, DeferChildrenChanged deferChildrenChanged)
    8282{
    8383    auto children = collectChildNodes(*this);
    8484
    85     if (source == ContainerNode::ChildChangeSource::API) {
     85    if (source == ChildChange::Source::API) {
    8686        ChildListMutationScope mutation(*this);
    8787        for (auto& child : children) {
     
    9191        }
    9292    } else {
    93         ASSERT(source == ContainerNode::ChildChangeSource::Parser);
     93        ASSERT(source == ChildChange::Source::Parser);
    9494        ScriptDisallowedScope::InMainThread scriptDisallowedScope;
    9595        if (UNLIKELY(document().hasMutationObserversOfType(MutationObserver::ChildList))) {
     
    116116
    117117    if (deferChildrenChanged == DeferChildrenChanged::No)
    118         childrenChanged(ContainerNode::ChildChange { ContainerNode::AllChildrenRemoved, nullptr, nullptr, source });
     118        childrenChanged(ContainerNode::ChildChange { ChildChange::Type::AllChildrenRemoved, nullptr, nullptr, source });
    119119
    120120    return children;
    121121}
    122122
    123 ALWAYS_INLINE bool ContainerNode::removeNodeWithScriptAssertion(Node& childToRemove, ChildChangeSource source)
     123ALWAYS_INLINE bool ContainerNode::removeNodeWithScriptAssertion(Node& childToRemove, ChildChange::Source source)
    124124{
    125125    Ref<Node> protectedChildToRemove(childToRemove);
     
    131131
    132132    ASSERT_WITH_SECURITY_IMPLICATION(ScriptDisallowedScope::InMainThread::isEventDispatchAllowedInSubtree(childToRemove));
    133     if (source == ContainerNode::ChildChangeSource::API) {
     133    if (source == ChildChange::Source::API) {
    134134        childToRemove.notifyMutationObserversNodeWillDetach();
    135135        dispatchChildRemovalEvents(protectedChildToRemove);
     
    138138    }
    139139
    140     if (source == ContainerNode::ChildChangeSource::Parser) {
     140    if (source == ChildChange::Source::Parser) {
    141141        // FIXME: Merge these two code paths. It's a bug in the parser not to update connectedSubframeCount in time.
    142142        disconnectSubframesIfNeeded(*this, DescendantsOnly);
     
    167167        notifyChildNodeRemoved(*this, childToRemove);
    168168
    169         change.type = is<Element>(childToRemove) ? ElementRemoved : (is<Text>(childToRemove) ? TextRemoved : NonContentsChildRemoved);
     169        change.type = is<Element>(childToRemove) ?
     170            ChildChange::Type::ElementRemoved :
     171            (is<Text>(childToRemove) ?
     172                ChildChange::Type::TextRemoved :
     173                ChildChange::Type::NonContentsChildRemoved);
    170174        change.previousSiblingElement = (!previousSibling || is<Element>(*previousSibling)) ? downcast<Element>(previousSibling.get()) : ElementTraversal::previousSibling(*previousSibling);
    171175        change.nextSiblingElement = (!nextSibling || is<Element>(*nextSibling)) ? downcast<Element>(nextSibling.get()) : ElementTraversal::nextSibling(*nextSibling);
     
    183187template<typename DOMInsertionWork>
    184188static ALWAYS_INLINE void executeNodeInsertionWithScriptAssertion(ContainerNode& containerNode, Node& child,
    185     ContainerNode::ChildChangeSource source, ReplacedAllChildren replacedAllChildren, DOMInsertionWork doNodeInsertion)
     189    ContainerNode::ChildChange::Source source, ReplacedAllChildren replacedAllChildren, DOMInsertionWork doNodeInsertion)
    186190{
    187191    NodeVector postInsertionNotificationTargets;
     
    199203    // FIXME: Move childrenChanged into ScriptDisallowedScope block.
    200204    if (replacedAllChildren == ReplacedAllChildren::Yes)
    201         containerNode.childrenChanged(ContainerNode::ChildChange { ContainerNode::AllChildrenReplaced, nullptr, nullptr, source });
     205        containerNode.childrenChanged(ContainerNode::ChildChange { ContainerNode::ChildChange::Type::AllChildrenReplaced, nullptr, nullptr, source });
    202206    else {
    203207        containerNode.childrenChanged(ContainerNode::ChildChange {
    204             child.isElementNode() ? ContainerNode::ElementInserted : (child.isTextNode() ? ContainerNode::TextInserted : ContainerNode::NonContentsChildInserted),
     208            child.isElementNode() ?
     209                ContainerNode::ChildChange::Type::ElementInserted :
     210                (child.isTextNode() ?
     211                    ContainerNode::ChildChange::Type::TextInserted :
     212                    ContainerNode::ChildChange::Type::NonContentsChildInserted),
    205213            ElementTraversal::previousSibling(child),
    206214            ElementTraversal::nextSibling(child),
     
    213221        target->didFinishInsertingNode();
    214222
    215     if (source == ContainerNode::ChildChangeSource::API)
     223    if (source == ContainerNode::ChildChange::Source::API)
    216224        dispatchChildInsertionEvents(child);
    217225}
     
    262270    ASSERT(oldParent);
    263271
    264     auto children = oldParent->removeAllChildrenWithScriptAssertion(ChildChangeSource::Parser);
     272    auto children = oldParent->removeAllChildrenWithScriptAssertion(ChildChange::Source::Parser);
    265273
    266274    // FIXME: assert that we don't dispatch events here since this container node is still disconnected.
     
    412420            break;
    413421
    414         executeNodeInsertionWithScriptAssertion(*this, child.get(), ChildChangeSource::API, ReplacedAllChildren::No, [&] {
     422        executeNodeInsertionWithScriptAssertion(*this, child.get(), ChildChange::Source::API, ReplacedAllChildren::No, [&] {
    415423            child->setTreeScopeRecursively(treeScope());
    416424            insertBeforeCommon(next, child);
     
    471479        return;
    472480
    473     executeNodeInsertionWithScriptAssertion(*this, newChild, ChildChangeSource::Parser, ReplacedAllChildren::No, [&] {
     481    executeNodeInsertionWithScriptAssertion(*this, newChild, ChildChange::Source::Parser, ReplacedAllChildren::No, [&] {
    474482        if (&document() != &newChild.document())
    475483            document().adoptNode(newChild);
     
    545553            break;
    546554
    547         executeNodeInsertionWithScriptAssertion(*this, child.get(), ChildChangeSource::API, ReplacedAllChildren::No, [&] {
     555        executeNodeInsertionWithScriptAssertion(*this, child.get(), ChildChange::Source::API, ReplacedAllChildren::No, [&] {
    548556            child->setTreeScopeRecursively(treeScope());
    549557            if (refChild)
     
    575583        return Exception { NotFoundError };
    576584
    577     if (!removeNodeWithScriptAssertion(oldChild, ChildChangeSource::API))
     585    if (!removeNodeWithScriptAssertion(oldChild, ChildChange::Source::API))
    578586        return Exception { NotFoundError };
    579587
     
    620628void ContainerNode::parserRemoveChild(Node& oldChild)
    621629{
    622     removeNodeWithScriptAssertion(oldChild, ChildChangeSource::Parser);
     630    removeNodeWithScriptAssertion(oldChild, ChildChange::Source::Parser);
    623631}
    624632
     
    648656    Ref<ContainerNode> protectedThis(*this);
    649657    ChildListMutationScope mutation(*this);
    650     removeAllChildrenWithScriptAssertion(ChildChangeSource::API, DeferChildrenChanged::Yes);
    651 
    652     executeNodeInsertionWithScriptAssertion(*this, node.get(), ChildChangeSource::API, ReplacedAllChildren::Yes, [&] {
     658    removeAllChildrenWithScriptAssertion(ChildChange::Source::API, DeferChildrenChanged::Yes);
     659
     660    executeNodeInsertionWithScriptAssertion(*this, node.get(), ChildChange::Source::API, ReplacedAllChildren::Yes, [&] {
    653661        ASSERT(!ensurePreInsertionValidity(node, nullptr).hasException());
    654662        InspectorInstrumentation::willInsertDOMNode(document(), *this);
     
    675683
    676684    Ref<ContainerNode> protectedThis(*this);
    677     removeAllChildrenWithScriptAssertion(ChildChangeSource::API);
     685    removeAllChildrenWithScriptAssertion(ChildChange::Source::API);
    678686
    679687    rebuildSVGExtensionsElementsIfNecessary();
     
    726734
    727735        // Append child to the end of the list
    728         executeNodeInsertionWithScriptAssertion(*this, child.get(), ChildChangeSource::API, ReplacedAllChildren::No, [&] {
     736        executeNodeInsertionWithScriptAssertion(*this, child.get(), ChildChange::Source::API, ReplacedAllChildren::No, [&] {
    729737            child->setTreeScopeRecursively(treeScope());
    730738            appendChildCommon(child);
     
    742750    ASSERT(!hasTagName(HTMLNames::templateTag));
    743751
    744     executeNodeInsertionWithScriptAssertion(*this, newChild, ChildChangeSource::Parser, ReplacedAllChildren::No, [&] {
     752    executeNodeInsertionWithScriptAssertion(*this, newChild, ChildChange::Source::Parser, ReplacedAllChildren::No, [&] {
    745753        if (&document() != &newChild.document())
    746754            document().adoptNode(newChild);
     
    755763{
    756764    switch (change.type) {
    757     case ContainerNode::ElementInserted:
    758     case ContainerNode::ElementRemoved:
    759     case ContainerNode::AllChildrenRemoved:
    760     case ContainerNode::AllChildrenReplaced:
     765    case ContainerNode::ChildChange::Type::ElementInserted:
     766    case ContainerNode::ChildChange::Type::ElementRemoved:
     767    case ContainerNode::ChildChange::Type::AllChildrenRemoved:
     768    case ContainerNode::ChildChange::Type::AllChildrenReplaced:
    761769        return true;
    762     case ContainerNode::TextInserted:
    763     case ContainerNode::TextRemoved:
    764     case ContainerNode::TextChanged:
    765     case ContainerNode::NonContentsChildInserted:
    766     case ContainerNode::NonContentsChildRemoved:
     770    case ContainerNode::ChildChange::Type::TextInserted:
     771    case ContainerNode::ChildChange::Type::TextRemoved:
     772    case ContainerNode::ChildChange::Type::TextChanged:
     773    case ContainerNode::ChildChange::Type::NonContentsChildInserted:
     774    case ContainerNode::ChildChange::Type::NonContentsChildRemoved:
    767775        return false;
    768776    }
     
    781789    // FIXME: Seems like it's equally safe to skip for TextInserted and TextRemoved as for TextChanged.
    782790    // FIXME: Should use switch for change type so we remember to update when adding new types.
    783     if (change.source == ChildChangeSource::API && change.type != TextChanged)
     791    if (change.source == ChildChange::Source::API && change.type != ChildChange::Type::TextChanged)
    784792        document().updateRangesAfterChildrenChanged(*this);
    785793
     
    973981    auto protectedThis = makeRef(*this);
    974982    ChildListMutationScope mutation(*this);
    975     removeAllChildrenWithScriptAssertion(ChildChangeSource::API, DeferChildrenChanged::No);
     983    removeAllChildrenWithScriptAssertion(ChildChange::Source::API, DeferChildrenChanged::No);
    976984
    977985    if (node) {
  • trunk/Source/WebCore/dom/ContainerNode.h

    r266578 r269161  
    7474    void cloneChildNodes(ContainerNode& clone);
    7575
    76     enum ChildChangeType { ElementInserted, ElementRemoved, TextInserted, TextRemoved, TextChanged, AllChildrenRemoved, NonContentsChildRemoved, NonContentsChildInserted, AllChildrenReplaced };
    77     enum class ChildChangeSource { Parser, API };
    7876    struct ChildChange {
    79         ChildChangeType type;
     77        enum class Type : uint8_t { ElementInserted, ElementRemoved, TextInserted, TextRemoved, TextChanged, AllChildrenRemoved, NonContentsChildRemoved, NonContentsChildInserted, AllChildrenReplaced };
     78        enum class Source : bool { Parser, API };
     79
     80        ChildChange::Type type;
    8081        Element* previousSiblingElement;
    8182        Element* nextSiblingElement;
    82         ChildChangeSource source;
     83        ChildChange::Source source;
    8384
    8485        bool isInsertion() const
    8586        {
    8687            switch (type) {
    87             case ElementInserted:
    88             case TextInserted:
    89             case NonContentsChildInserted:
    90             case AllChildrenReplaced:
     88            case ChildChange::Type::ElementInserted:
     89            case ChildChange::Type::TextInserted:
     90            case ChildChange::Type::NonContentsChildInserted:
     91            case ChildChange::Type::AllChildrenReplaced:
    9192                return true;
    92             case ElementRemoved:
    93             case TextRemoved:
    94             case TextChanged:
    95             case AllChildrenRemoved:
    96             case NonContentsChildRemoved:
     93            case ChildChange::Type::ElementRemoved:
     94            case ChildChange::Type::TextRemoved:
     95            case ChildChange::Type::TextChanged:
     96            case ChildChange::Type::AllChildrenRemoved:
     97            case ChildChange::Type::NonContentsChildRemoved:
    9798                return false;
    9899            }
     
    146147    void executePreparedChildrenRemoval();
    147148    enum class DeferChildrenChanged { Yes, No };
    148     NodeVector removeAllChildrenWithScriptAssertion(ChildChangeSource, DeferChildrenChanged = DeferChildrenChanged::No);
    149     bool removeNodeWithScriptAssertion(Node&, ChildChangeSource);
     149    NodeVector removeAllChildrenWithScriptAssertion(ChildChange::Source, DeferChildrenChanged = DeferChildrenChanged::No);
     150    bool removeNodeWithScriptAssertion(Node&, ChildChange::Source);
    150151
    151152    void removeBetween(Node* previousChild, Node* nextChild, Node& oldChild);
  • trunk/Source/WebCore/dom/Element.cpp

    r269144 r269161  
    26222622{
    26232623    ContainerNode::childrenChanged(change);
    2624     if (change.source == ChildChangeSource::Parser)
     2624    if (change.source == ChildChange::Source::Parser)
    26252625        checkForEmptyStyleChange(*this);
    26262626    else {
    2627         SiblingCheckType checkType = change.type == ElementRemoved ? SiblingElementRemoved : Other;
     2627        auto checkType = change.type == ChildChange::Type::ElementRemoved ? SiblingElementRemoved : Other;
    26282628        checkForSiblingStyleChanges(*this, checkType, change.previousSiblingElement, change.nextSiblingElement);
    26292629    }
     
    26312631    if (ShadowRoot* shadowRoot = this->shadowRoot()) {
    26322632        switch (change.type) {
    2633         case ElementInserted:
    2634         case ElementRemoved:
     2633        case ChildChange::Type::ElementInserted:
     2634        case ChildChange::Type::ElementRemoved:
    26352635            // For elements, we notify shadowRoot in Element::insertedIntoAncestor and Element::removedFromAncestor.
    26362636            break;
    2637         case AllChildrenRemoved:
    2638         case AllChildrenReplaced:
     2637        case ChildChange::Type::AllChildrenRemoved:
     2638        case ChildChange::Type::AllChildrenReplaced:
    26392639            shadowRoot->didRemoveAllChildrenOfShadowHost();
    26402640            break;
    2641         case TextInserted:
    2642         case TextRemoved:
    2643         case TextChanged:
     2641        case ChildChange::Type::TextInserted:
     2642        case ChildChange::Type::TextRemoved:
     2643        case ChildChange::Type::TextChanged:
    26442644            shadowRoot->didChangeDefaultSlot();
    26452645            break;
    2646         case NonContentsChildInserted:
    2647         case NonContentsChildRemoved:
     2646        case ChildChange::Type::NonContentsChildInserted:
     2647        case ChildChange::Type::NonContentsChildRemoved:
    26482648            break;
    26492649        }
  • trunk/Source/WebCore/dom/ShadowRoot.cpp

    r267172 r269161  
    129129    // FIXME: Avoid always invalidating style just for first-child, etc... as done in Element::childrenChanged.
    130130    switch (childChange.type) {
    131     case ElementInserted:
    132     case ElementRemoved:
     131    case ChildChange::Type::ElementInserted:
     132    case ChildChange::Type::ElementRemoved:
    133133        m_host->invalidateStyleForSubtreeInternal();
    134134        break;
    135     case TextInserted:
    136     case TextRemoved:
    137     case TextChanged:
    138     case AllChildrenRemoved:
    139     case NonContentsChildRemoved:
    140     case NonContentsChildInserted:
    141     case AllChildrenReplaced:
     135    case ChildChange::Type::TextInserted:
     136    case ChildChange::Type::TextRemoved:
     137    case ChildChange::Type::TextChanged:
     138    case ChildChange::Type::AllChildrenRemoved:
     139    case ChildChange::Type::NonContentsChildRemoved:
     140    case ChildChange::Type::NonContentsChildInserted:
     141    case ChildChange::Type::AllChildrenReplaced:
    142142        break;
    143143    }
  • trunk/Source/WebCore/html/HTMLElement.cpp

    r267939 r269161  
    947947}
    948948
    949 void HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged(Element* beforeChange, ChildChangeType changeType)
     949void HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged(Element* beforeChange, ChildChange::Type changeType)
    950950{
    951951    // FIXME: This function looks suspicious.
     
    956956    RefPtr<Node> oldMarkedNode;
    957957    if (beforeChange)
    958         oldMarkedNode = changeType == ElementInserted ? ElementTraversal::nextSibling(*beforeChange) : beforeChange->nextSibling();
     958        oldMarkedNode = changeType == ChildChange::Type::ElementInserted ? ElementTraversal::nextSibling(*beforeChange) : beforeChange->nextSibling();
    959959
    960960    while (oldMarkedNode && elementAffectsDirectionality(*oldMarkedNode))
  • trunk/Source/WebCore/html/HTMLElement.h

    r262235 r269161  
    152152    void dirAttributeChanged(const AtomString&);
    153153    void adjustDirectionalityIfNeededAfterChildAttributeChanged(Element* child);
    154     void adjustDirectionalityIfNeededAfterChildrenChanged(Element* beforeChange, ChildChangeType);
     154    void adjustDirectionalityIfNeededAfterChildrenChanged(Element* beforeChange, ChildChange::Type);
    155155    TextDirection directionality(Node** strongDirectionalityTextNode= 0) const;
    156156
  • trunk/Source/WebCore/html/HTMLOutputElement.cpp

    r261013 r269161  
    8080    HTMLFormControlElement::childrenChanged(change);
    8181
    82     if (change.source == ChildChangeSource::Parser || m_isSetTextContentInProgress) {
     82    if (change.source == ChildChange::Source::Parser || m_isSetTextContentInProgress) {
    8383        m_isSetTextContentInProgress = false;
    8484        return;
  • trunk/Source/WebCore/svg/SVGClipPathElement.cpp

    r259241 r269161  
    8080    SVGGraphicsElement::childrenChanged(change);
    8181
    82     if (change.source == ChildChangeSource::Parser)
     82    if (change.source == ChildChange::Source::Parser)
    8383        return;
    8484
  • trunk/Source/WebCore/svg/SVGElement.cpp

    r267783 r269161  
    875875    StyledElement::childrenChanged(change);
    876876
    877     if (change.source == ChildChangeSource::Parser)
     877    if (change.source == ChildChange::Source::Parser)
    878878        return;
    879879    invalidateInstances();
  • trunk/Source/WebCore/svg/SVGFELightElement.cpp

    r246490 r269161  
    152152    SVGElement::childrenChanged(change);
    153153
    154     if (change.source == ChildChangeSource::Parser)
     154    if (change.source == ChildChange::Source::Parser)
    155155        return;
    156156    auto parent = makeRefPtr(parentNode());
  • trunk/Source/WebCore/svg/SVGFilterElement.cpp

    r251318 r269161  
    111111    SVGElement::childrenChanged(change);
    112112
    113     if (change.source == ChildChangeSource::Parser)
     113    if (change.source == ChildChange::Source::Parser)
    114114        return;
    115115
  • trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp

    r251499 r269161  
    8989    SVGElement::childrenChanged(change);
    9090
    91     if (change.source == ChildChangeSource::Parser)
     91    if (change.source == ChildChange::Source::Parser)
    9292        return;
    9393    invalidate();
  • trunk/Source/WebCore/svg/SVGGradientElement.cpp

    r264290 r269161  
    9292    SVGElement::childrenChanged(change);
    9393
    94     if (change.source == ChildChangeSource::Parser)
     94    if (change.source == ChildChange::Source::Parser)
    9595        return;
    9696
  • trunk/Source/WebCore/svg/SVGMarkerElement.cpp

    r252444 r269161  
    117117    SVGElement::childrenChanged(change);
    118118
    119     if (change.source == ChildChangeSource::Parser)
     119    if (change.source == ChildChange::Source::Parser)
    120120        return;
    121121
  • trunk/Source/WebCore/svg/SVGMaskElement.cpp

    r251318 r269161  
    117117    SVGElement::childrenChanged(change);
    118118
    119     if (change.source == ChildChangeSource::Parser)
     119    if (change.source == ChildChange::Source::Parser)
    120120        return;
    121121
  • trunk/Source/WebCore/svg/SVGPatternElement.cpp

    r251318 r269161  
    130130    SVGElement::childrenChanged(change);
    131131
    132     if (change.source == ChildChangeSource::Parser)
     132    if (change.source == ChildChange::Source::Parser)
    133133        return;
    134134
Note: See TracChangeset for help on using the changeset viewer.