Make RenderPtr a type alias of std::unique_ptr
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Oct 2017 21:06:32 +0000 (21:06 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Oct 2017 21:06:32 +0000 (21:06 +0000)
commit3e422601bedf4342313f92f9712852bd5abef5ab
tree7f99611ba7e46eb5a403d1b872fc40f312db5686
parentee3646bed56b1b9201fdbabdb94f866e0454af18
Make RenderPtr a type alias of std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=177739

Reviewed by Sam Weinig.

It just needs a custom deleter.

* page/FrameView.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::insertChildInternal):
* rendering/RenderMultiColumnFlow.cpp:
(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
(WebCore::RenderMultiColumnFlow::handleSpannerRemoval):
* rendering/RenderObject.cpp:
(WebCore::RenderObjectDeleter::operator() const):
(WebCore::RenderObject::willBeDestroyed):
* rendering/RenderPtr.h:
(WebCore::createRenderer):
(WebCore::static_pointer_cast):

    Make this safer with downcast.

(WebCore::RenderPtr::RenderPtr): Deleted.
(WebCore::RenderPtr::~RenderPtr): Deleted.
(WebCore::RenderPtr::get const): Deleted.
(WebCore::RenderPtr::operator* const): Deleted.
(WebCore::RenderPtr::operator-> const): Deleted.
(WebCore::RenderPtr::operator! const): Deleted.
(WebCore::RenderPtr::operator UnspecifiedBoolType const): Deleted.
(WebCore::RenderPtr::operator=): Deleted.
(WebCore::RenderPtr::swap): Deleted.
(WebCore::RenderPtr::operator==): Deleted.
(WebCore::RenderPtr::operator!=): Deleted.
(WebCore::RenderPtr<T>::clear): Deleted.
(WebCore::RenderPtr<T>::leakPtr): Deleted.
(WebCore::RenderPtr<T>::RenderPtr): Deleted.
(WebCore::=): Deleted.
(WebCore::swap): Deleted.
(WebCore::operator==): Deleted.
(WebCore::operator!=): Deleted.
(WebCore::getPtr): Deleted.
(WTF::HashTraits<WebCore::RenderPtr<T>>::emptyValue): Deleted.
(WTF::HashTraits<WebCore::RenderPtr<T>>::peek): Deleted.

    We already have hash traits for std::unique_ptr.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderPtr.h