Move to using std::unique_ptr for Element, Node and related classes
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Feb 2014 08:47:50 +0000 (08:47 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Feb 2014 08:47:50 +0000 (08:47 +0000)
commit9e604dac5715efd01c30ae080e9069e3b67b5441
tree1388d64db4d61cf1e65865a7b3863eaf8d659f99
parentb7663d387f969228d811e025455d65919d1ad6e7
Move to using std::unique_ptr for Element, Node and related classes
https://bugs.webkit.org/show_bug.cgi?id=129058

Reviewed by Anders Carlsson.

Replace uses of OwnPtr and PassOwnPtr in Element, Node and the related
classes with std::unique_ptr and move semantics.

* dom/ContainerNode.h:
(WebCore::ChildNodesLazySnapshot::takeSnapshot):
(WebCore::ChildNodesLazySnapshot::hasSnapshot):
* dom/Element.cpp:
(WebCore::ensureAttrNodeListForElement):
(WebCore::Element::attributes):
* dom/ElementIteratorAssertions.h:
(WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
* dom/ElementRareData.h:
(WebCore::ElementRareData::setAttributeMap):
* dom/MutationObserverRegistration.cpp:
(WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
(WebCore::MutationObserverRegistration::clearTransientRegistrations):
(WebCore::MutationObserverRegistration::addRegistrationNodesToSet):
* dom/MutationObserverRegistration.h:
* dom/NamedNodeMap.h:
(WebCore::NamedNodeMap::NamedNodeMap):
* dom/Node.cpp:
(WebCore::Node::ensureRareData):
(WebCore::Node::didMoveToNewDocument):
(WebCore::Node::ensureEventTargetData):
(WebCore::Node::mutationObserverRegistry):
(WebCore::Node::registerMutationObserver):
(WebCore::Node::unregisterMutationObserver):
(WebCore::Node::notifyMutationObserversNodeWillDetach):
* dom/Node.h:
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::NodeListsNodeData):
(WebCore::NodeRareData::NodeRareData):
(WebCore::NodeRareData::clearNodeLists):
(WebCore::NodeRareData::ensureNodeLists):
(WebCore::NodeRareData::ensureMutationObserverData):
* dom/StyledElement.cpp:
(WebCore::StyledElement::rebuildPresentationAttributeStyle):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/ContainerNode.h
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/ElementIteratorAssertions.h
Source/WebCore/dom/ElementRareData.h
Source/WebCore/dom/MutationObserverRegistration.cpp
Source/WebCore/dom/MutationObserverRegistration.h
Source/WebCore/dom/NamedNodeMap.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/NodeRareData.h
Source/WebCore/dom/StyledElement.cpp