Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2563313002: Clear the owner element's widget in Document::shutdown(). (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 // Destroy |m_autoSizeInfo| as early as possible, to avoid dereferencing 344 // Destroy |m_autoSizeInfo| as early as possible, to avoid dereferencing
345 // partially destroyed |this| via |m_autoSizeInfo->m_frameView|. 345 // partially destroyed |this| via |m_autoSizeInfo->m_frameView|.
346 m_autoSizeInfo.clear(); 346 m_autoSizeInfo.clear();
347 347
348 m_postLayoutTasksTimer.stop(); 348 m_postLayoutTasksTimer.stop();
349 m_didScrollTimer.stop(); 349 m_didScrollTimer.stop();
350 350
351 // FIXME: Do we need to do something here for OOPI? 351 // FIXME: Do we need to do something here for OOPI?
352 HTMLFrameOwnerElement* ownerElement = m_frame->deprecatedLocalOwner(); 352 HTMLFrameOwnerElement* ownerElement = m_frame->deprecatedLocalOwner();
353 // TODO(dcheng): It seems buggy that we can have an owner element that 353 // TODO(dcheng): It seems buggy that we can have an owner element that
354 // points to another Widget. 354 // points to another Widget. See https://crbug.com/673170 for an example.
esprehn 2016/12/13 23:46:22 Can we add a commented out DCHECK here with the wi
Mariusz Mlynski 2016/12/14 00:18:03 Done. The comment would logically better belong in
355 if (ownerElement && ownerElement->ownedWidget() == this) 355 if (ownerElement)
356 ownerElement->setWidget(nullptr); 356 ownerElement->setWidget(nullptr);
357 357
358 #if ENABLE(ASSERT) 358 #if ENABLE(ASSERT)
359 m_hasBeenDisposed = true; 359 m_hasBeenDisposed = true;
360 #endif 360 #endif
361 } 361 }
362 362
363 void FrameView::detachScrollbars() { 363 void FrameView::detachScrollbars() {
364 // Previously, we detached custom scrollbars as early as possible to prevent 364 // Previously, we detached custom scrollbars as early as possible to prevent
365 // Document::detachLayoutTree() from messing with the view such that its 365 // Document::detachLayoutTree() from messing with the view such that its
(...skipping 4303 matching lines...) Expand 10 before | Expand all | Expand 10 after
4669 DCHECK(m_frame->isMainFrame()); 4669 DCHECK(m_frame->isMainFrame());
4670 return m_initialViewportSize.width(); 4670 return m_initialViewportSize.width();
4671 } 4671 }
4672 4672
4673 int FrameView::initialViewportHeight() const { 4673 int FrameView::initialViewportHeight() const {
4674 DCHECK(m_frame->isMainFrame()); 4674 DCHECK(m_frame->isMainFrame());
4675 return m_initialViewportSize.height(); 4675 return m_initialViewportSize.height();
4676 } 4676 }
4677 4677
4678 } // namespace blink 4678 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698