| Index: sky/engine/core/dom/ContainerNode.h
|
| diff --git a/sky/engine/core/dom/ContainerNode.h b/sky/engine/core/dom/ContainerNode.h
|
| index 82b02846ef0b86e562354ce603b74a33604c9614..73a2afea2bc7936427169b28515b2bb1596ee4c7 100644
|
| --- a/sky/engine/core/dom/ContainerNode.h
|
| +++ b/sky/engine/core/dom/ContainerNode.h
|
| @@ -52,7 +52,6 @@ public:
|
|
|
| bool hasOneChild() const { return m_firstChild && !m_firstChild->nextSibling(); }
|
| bool hasOneTextChild() const { return hasOneChild() && m_firstChild->isTextNode(); }
|
| - bool hasChildCount(unsigned) const;
|
|
|
| unsigned countChildren() const;
|
|
|
| @@ -71,7 +70,6 @@ public:
|
| void parserAppendChild(PassRefPtr<Node>);
|
| void parserRemoveChild(Node&);
|
| void parserInsertBefore(PassRefPtr<Node> newChild, Node& refChild);
|
| - void parserTakeAllChildrenFrom(ContainerNode&);
|
|
|
| void removeChildren();
|
|
|
| @@ -97,31 +95,23 @@ public:
|
| {
|
| ChildrenChange change = {
|
| node.isElementNode() ? ElementInserted : NonElementInserted,
|
| - node.previousSibling(),
|
| - node.nextSibling(),
|
| byParser
|
| };
|
| return change;
|
| }
|
|
|
| - static ChildrenChange forRemoval(Node& node, Node* previousSibling, Node* nextSibling, ChildrenChangeSource byParser)
|
| + static ChildrenChange forRemoval(Node& node, ChildrenChangeSource byParser)
|
| {
|
| ChildrenChange change = {
|
| node.isElementNode() ? ElementRemoved : NonElementRemoved,
|
| - previousSibling,
|
| - nextSibling,
|
| byParser
|
| };
|
| return change;
|
| }
|
|
|
| bool isChildInsertion() const { return type == ElementInserted || type == NonElementInserted; }
|
| - bool isChildRemoval() const { return type == ElementRemoved || type == NonElementRemoved; }
|
| - bool isChildElementChange() const { return type == ElementInserted || type == ElementRemoved; }
|
|
|
| ChildrenChangeType type;
|
| - RawPtr<Node> siblingBeforeChange;
|
| - RawPtr<Node> siblingAfterChange;
|
| ChildrenChangeSource byParser;
|
| };
|
|
|
| @@ -129,14 +119,10 @@ public:
|
| // node that is of the type TEXT_NODE has changed its value.
|
| virtual void childrenChanged(const ChildrenChange&);
|
|
|
| - virtual void trace(Visitor*) override;
|
| -
|
| protected:
|
| ContainerNode(TreeScope*, ConstructionType = CreateContainer);
|
|
|
| -#if !ENABLE(OILPAN)
|
| void removeDetachedChildren();
|
| -#endif
|
|
|
| void setFirstChild(Node* child) { m_firstChild = child; }
|
| void setLastChild(Node* child) { m_lastChild = child; }
|
| @@ -179,16 +165,6 @@ bool childAttachedAllowedWhenAttachingChildren(ContainerNode*);
|
|
|
| DEFINE_NODE_TYPE_CASTS(ContainerNode, isContainerNode());
|
|
|
| -inline bool ContainerNode::hasChildCount(unsigned count) const
|
| -{
|
| - Node* child = m_firstChild;
|
| - while (count && child) {
|
| - child = child->nextSibling();
|
| - --count;
|
| - }
|
| - return !count && !child;
|
| -}
|
| -
|
| inline ContainerNode::ContainerNode(TreeScope* treeScope, ConstructionType type)
|
| : Node(treeScope, type)
|
| , m_firstChild(nullptr)
|
|
|