RenderScrollbar: Map of scrollbar parts should use RenderPtr.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Jan 2014 00:52:55 +0000 (00:52 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Jan 2014 00:52:55 +0000 (00:52 +0000)
commit9a43585b802075c0a382407a966b75588c9cefdf
tree472f9715f56ea2549684d292baef184552f888ba
parent9526b327dc3aeeb060ddf05a779adb3ad83ea469
RenderScrollbar: Map of scrollbar parts should use RenderPtr.
<https://webkit.org/b/126367>

Turn RenderScrollbar::m_parts into HashMap of RenderPtrs. This makes
renderer destruction automatic and lets us remove some code.

Reviewed by Antti Koivisto.

* rendering/RenderPtr.h:

    Add HashTraits for RenderPtr so we can use them as values in
    WTF hash tables.

* rendering/RenderScrollbar.h:
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::~RenderScrollbar):
(WebCore::RenderScrollbar::setParent):
(WebCore::RenderScrollbar::updateScrollbarParts):
(WebCore::RenderScrollbar::updateScrollbarPart):

    Remove now-unneeded kludges of logic to manually delete scrollbar
    part renderers in various scenarios.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderPtr.h
Source/WebCore/rendering/RenderScrollbar.cpp
Source/WebCore/rendering/RenderScrollbar.h