Removed m_owner accessed in custom scrollbars. qtwebkit-2.2-week35
authorAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Mon, 5 Sep 2011 20:10:03 +0000 (17:10 -0300)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Mon, 5 Sep 2011 20:10:03 +0000 (17:10 -0300)
commita2bd2bb1b19949c6807da38e25bfa7d210bb4b17
treea7a2bf96f7d0b035759d2373fd1f8e71f7bb5180
parentd8fc9f5058f7a639900a2feefc6fbeed1bb72a07
Removed m_owner accessed in custom scrollbars.
https://bugs.webkit.org/show_bug.cgi?id=64737

Reviewed by David Hyatt.

Problem does not reproduce in DRT, even with Eventhandler tricks
and gc(). So, adding a manual test.

* manual-tests/custom-scrollbar-renderer-removed-crash.html: Added.
* page/FrameView.cpp:
(WebCore::FrameView::clearOwningRendererForCustomScrollbars):
* page/FrameView.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::willBeDestroyed): when this renderbox is getting
destroyed, clear the custom scrollbar in this frameview having this renderbox
as its owning renderer.
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::getScrollbarPseudoStyle): fix the null check.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94107 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:

Source/WebCore/page/FrameView.h
Source/WebCore/rendering/RenderBox.cpp

Also changed Source/WebCore/rendering/RenderWidget.cpp because the code
from RenderBox is duplicated there (in this branch, it was refactored in
trunk).
Source/WebCore/ChangeLog
Source/WebCore/manual-tests/custom-scrollbar-renderer-removed-crash.html [new file with mode: 0644]
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderScrollbar.cpp
Source/WebCore/rendering/RenderWidget.cpp