| Index: Source/core/dom/ContainerNode.h
|
| diff --git a/Source/core/dom/ContainerNode.h b/Source/core/dom/ContainerNode.h
|
| index e25b30826bc3ec4efe27958568601e0d59142fb6..1af89093e81fbf3bd9dd8d3321511b5229443d47 100644
|
| --- a/Source/core/dom/ContainerNode.h
|
| +++ b/Source/core/dom/ContainerNode.h
|
| @@ -127,10 +127,10 @@ public:
|
| // node that is of the type CDATA_SECTION_NODE, TEXT_NODE or COMMENT_NODE has changed its value.
|
| virtual void childrenChanged(bool createdByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
|
|
|
| - void attachChildren();
|
| + void attachChildren(const AttachContext& = AttachContext());
|
| void attachChildrenLazily();
|
| - void detachChildren();
|
| - void detachChildrenIfNeeded();
|
| + void detachChildren(const AttachContext& = AttachContext());
|
| + void detachChildrenIfNeeded(const AttachContext& = AttachContext());
|
|
|
| void disconnectDescendantFrames();
|
|
|
| @@ -196,12 +196,15 @@ inline ContainerNode::ContainerNode(TreeScope* treeScope, ConstructionType type)
|
| {
|
| }
|
|
|
| -inline void ContainerNode::attachChildren()
|
| +inline void ContainerNode::attachChildren(const AttachContext& context)
|
| {
|
| + AttachContext childrenContext(context);
|
| + childrenContext.resolvedStyle = 0;
|
| +
|
| for (Node* child = firstChild(); child; child = child->nextSibling()) {
|
| ASSERT(!child->attached() || childAttachedAllowedWhenAttachingChildren(this));
|
| if (!child->attached())
|
| - child->attach();
|
| + child->attach(childrenContext);
|
| }
|
| }
|
|
|
| @@ -212,18 +215,24 @@ inline void ContainerNode::attachChildrenLazily()
|
| child->lazyAttach();
|
| }
|
|
|
| -inline void ContainerNode::detachChildrenIfNeeded()
|
| +inline void ContainerNode::detachChildrenIfNeeded(const AttachContext& context)
|
| {
|
| + AttachContext childrenContext(context);
|
| + childrenContext.resolvedStyle = 0;
|
| +
|
| for (Node* child = firstChild(); child; child = child->nextSibling()) {
|
| if (child->attached())
|
| - child->detach();
|
| + child->detach(childrenContext);
|
| }
|
| }
|
|
|
| -inline void ContainerNode::detachChildren()
|
| +inline void ContainerNode::detachChildren(const AttachContext& context)
|
| {
|
| + AttachContext childrenContext(context);
|
| + childrenContext.resolvedStyle = 0;
|
| +
|
| for (Node* child = firstChild(); child; child = child->nextSibling())
|
| - child->detach();
|
| + child->detach(childrenContext);
|
| }
|
|
|
| inline unsigned Node::childNodeCount() const
|
|
|