Changeset 18965 in webkit


Ignore:
Timestamp:
Jan 18, 2007 5:03:05 PM (17 years ago)
Author:
bdash
Message:

2007-01-18 Mitz Pettel <mitz@webkit.org>

Reviewed by Darin.

  • page/FrameView.cpp: (WebCore::FrameView::~FrameView): Removed the call to Document::detach(). If this view is the current view, then the Frame should have already detached the document. Added an assertion that this is the case. If this view is not the current view, then it cannot access its document, but the page cache should have detached it already. Similarly, changed to call RenderPart::setWidget() only if this is the current view in the frame. (WebCore::FrameView::adjustViewSize): Added an assertion that this view is the current view in the frame. (WebCore::FrameView::layout): Ditto. (WebCore::FrameView::scheduleRelayout): Ditto. (WebCore::FrameView::scheduleRelayoutOfSubtree): Ditto. (WebCore::FrameView::windowClipRect): Ditto.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r18964 r18965  
     12007-01-18  Mitz Pettel  <mitz@webkit.org>
     2
     3        Reviewed by Darin.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=9952
     6          REGRESSION: Repro crash when dragging an image from the window to the address bar
     7
     8        * page/FrameView.cpp:
     9        (WebCore::FrameView::~FrameView): Removed the call to Document::detach(). If this
     10        view is the current view, then the Frame should have already detached the document.
     11        Added an assertion that this is the case. If this view is not the current view,
     12        then it cannot access its document, but the page cache should have detached it already.
     13        Similarly, changed to call RenderPart::setWidget() only if this is the current view
     14        in the frame.
     15        (WebCore::FrameView::adjustViewSize): Added an assertion that this view is the current
     16        view in the frame.
     17        (WebCore::FrameView::layout): Ditto.
     18        (WebCore::FrameView::scheduleRelayout): Ditto.
     19        (WebCore::FrameView::scheduleRelayoutOfSubtree): Ditto.
     20        (WebCore::FrameView::windowClipRect): Ditto.
     21
    1222007-01-18  Eric Seidel  <eric@webkit.org>
    223
  • trunk/WebCore/page/FrameView.cpp

    r18752 r18965  
    133133
    134134    if (m_frame) {
    135         // FIXME: Is this really the right place to call detach on the document?
    136         if (Document* doc = m_frame->document())
    137             doc->detach();
    138         if (RenderPart* renderer = m_frame->ownerRenderer())
     135        ASSERT(m_frame->view() != this || !m_frame->document() || !m_frame->document()->renderer());
     136        RenderPart* renderer = m_frame->ownerRenderer();
     137        if (renderer && renderer->widget() == this)
    139138            renderer->setWidget(0);
    140139    }
     
    216215void FrameView::adjustViewSize()
    217216{
    218     if (m_frame->document()) {
    219         Document* document = m_frame->document();
    220 
     217    ASSERT(m_frame->view() == this);
     218    if (Document* document = m_frame->document()) {
    221219        RenderView* root = static_cast<RenderView*>(document->renderer());
    222220        if (!root)
     
    311309
    312310    bool subtree = d->layoutRoot;
     311
     312    ASSERT(m_frame->view() == this);
     313
    313314    Document* document = m_frame->document();
    314315    if (!document) {
     
    635636void FrameView::scheduleRelayout()
    636637{
     638    ASSERT(m_frame->view() == this);
     639
    637640    if (d->layoutRoot) {
    638641        if (d->layoutRoot->renderer())
     
    664667void FrameView::scheduleRelayoutOfSubtree(Node* n)
    665668{
     669    ASSERT(m_frame->view() == this);
     670
    666671    if (!d->layoutSchedulingEnabled || (m_frame->document()
    667672            && m_frame->document()->renderer()
     
    811816IntRect FrameView::windowClipRect(bool clipToContents) const
    812817{
     818    ASSERT(m_frame->view() == this);
     819
    813820    // Set our clip rect to be our contents.
    814821    IntRect clipRect;
Note: See TracChangeset for help on using the changeset viewer.