Show
Ignore:
Timestamp:
02/16/07 11:40:33 (23 months ago)
Author:
adele
Message:

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):
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/dom/Element.h

    r19400 r19662  
    158158         
    159159    virtual void focus(); 
    160     virtual void updateFocusAppearance(); 
     160    virtual void updateFocusAppearance(bool restorePreviousSelection = false); 
    161161    void blur(); 
    162162    bool needsFocusAppearanceUpdate() const { return m_needsFocusAppearanceUpdate; }