Reviewed by Mitz.
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Feb 2007 19:40:33 +0000 (19:40 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Feb 2007 19:40:33 +0000 (19:40 +0000)
commite1393c902c6df5fd35ca003f80fd7622bd1a1326
treed35ff49f12969a23169498188ec9d707b986ac38
parent31f7e272f814c61d2283da0899292db3cb95a87e
    Reviewed by Mitz.

        Fixed: http://bugs.webkit.org/show_bug.cgi?id=12768
        <rdar://problem/4995250> REGRESSION: Crash occurs at WebCore::RenderLayer::scrollToOffset() when leaving page that has focus in field

        No test case added.  This crash doesn't occur in DumpRenderTree because the B/F cache is turned off.

        * dom/Node.cpp: (WebCore::Node::willRemove): Check that the document is not in the page cache before

        * dom/Element.cpp: (WebCore::Element::updateFocusAppearance): Added restorePreviousSelection argument, with appropriate default values.
        * dom/Element.h: ditto.
        * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateFocusAppearance): ditto.
        * html/HTMLInputElement.h: ditto.
        * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::updateFocusAppearance): ditto.
        * html/HTMLTextAreaElement.h: ditto.

        * page/PageState.cpp: (WebCore::PageState::restore): Call updateFocusAppearance on the focused node for this page.  Pass true for the
          restorePreviousSelection argument.

        * rendering/RenderLayer.cpp: Added ASSERTS and nil checks on the RenderView.  It shouldn't be null, but if it is,
          we'll fail silently on release builds.
        (WebCore::RenderLayer::updateLayerPositions):
        (WebCore::RenderLayer::scrollToOffset):
        (WebCore::RenderLayer::windowClipRect):
        (WebCore::RenderLayer::calculateClipRects):
        (WebCore::RenderLayer::calculateRects):
        (WebCore::RenderLayer::intersectsDamageRect):
        (WebCore::RenderLayer::absoluteBoundingBox):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/dom/Element.cpp
WebCore/dom/Element.h
WebCore/dom/Node.cpp
WebCore/html/HTMLInputElement.cpp
WebCore/html/HTMLInputElement.h
WebCore/html/HTMLTextAreaElement.cpp
WebCore/html/HTMLTextAreaElement.h
WebCore/page/PageState.cpp
WebCore/rendering/RenderLayer.cpp