2011-03-16 Jer Noble <jer.noble@apple.com>
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Mar 2011 23:48:44 +0000 (23:48 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Mar 2011 23:48:44 +0000 (23:48 +0000)
commit8afc3588de631df375979b8a8b21d37c93528fcd
tree980be7ab7458003b2830df8d6e3e2c9675270fb5
parent165577a5bf2312c186dad5fefba9384688061760
2011-03-16  Jer Noble  <jer.noble@apple.com>

        Reviewed by Beth Dakin.

        RenderFullScreen::createFullScreenStyle() leaks
        https://bugs.webkit.org/show_bug.cgi?id=53384

        Two problems: a) not calling release() on the style returned in setFullScreenRenderer
        causes an unnecessary ref/deref, and b) the fullscreen renderer needs to be destroyed,
        not just detached, when it is no longer needed.

        * dom/Document.cpp:
        (WebCore::Document::setFullScreenRenderer): Destroy the current renderer when a new one is set.
        * rendering/RenderFullScreen.cpp:
        (RenderFullScreen::createFullScreenStyle): release() the return value.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/rendering/RenderFullScreen.cpp