WebCore:
authorlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Jun 2009 04:56:16 +0000 (04:56 +0000)
committerlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Jun 2009 04:56:16 +0000 (04:56 +0000)
commit8cff6bfd71983980d131f85b89d37c744bc66593
tree1aff66e65990b8ed9d465593403e71afae0fce8f
parent5d996819d01c9f0269aacf0854f415dc984ddc06
WebCore:

2009-06-16  David Levin  <levin@chromium.org>

        Reviewed by David Hyatt.

        REGRESSION: When the main page (ScrollView) has a custom scrollbar, it crashes on destruction.
        https://bugs.webkit.org/show_bug.cgi?id=26326

        Test: scrollbars/scrollbar-crash-on-refresh.html

        * dom/Document.cpp:
        (WebCore::Document::detach):
        Gives the FrameView a change to do any necessary cleanup on
        Document::detach() which is where the renderArena gets detroyed.
        * page/FrameView.cpp:
        (WebCore::FrameView::detachCustomScrollbars):
        Gets rid of any custom scrollbars (if the docment supplied them).
        * page/FrameView.h:
        * platform/Scrollbar.h:
        (WebCore::Scrollbar::isCustomScrollbar):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::destroy):
        Removed the check for document()->frame().  If frame() is 0 in this code,
        then the call to animation() is also incorrect (since it does document()->frame()->animation()).
        * rendering/RenderScrollbar.h:
        (WebCore::RenderScrollbar::isCustomScrollbar):

LayoutTests:

2009-06-16  David Levin  <levin@chromium.org>

        Reviewed by David Hyatt.

        REGRESSION: When the main page (ScrollView) has a custom scrollbar, it crashes on destruction.
        https://bugs.webkit.org/show_bug.cgi?id=26326

        Test that refreshing an iframe with custom scrollbars works without crashing.

        * scrollbars/resources/page-with-custom-scrollbars.html: Added.
        * scrollbars/scrollbar-crash-on-refresh-expected.txt: Added.
        * scrollbars/scrollbar-crash-on-refresh.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@44751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/scrollbars/resources/page-with-custom-scrollbars.html [new file with mode: 0644]
LayoutTests/scrollbars/scrollbar-crash-on-refresh-expected.txt [new file with mode: 0644]
LayoutTests/scrollbars/scrollbar-crash-on-refresh.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/dom/Document.cpp
WebCore/page/FrameView.cpp
WebCore/page/FrameView.h
WebCore/platform/Scrollbar.h
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderScrollbar.h