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

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: Missing semicolon. 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
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 points
354 // points to another Widget. 354 // to another Widget. This can happen when a plugin element loads a frame
355 if (ownerElement && ownerElement->ownedWidget() == this) 355 // (widget A of type FrameView) and then loads a plugin (widget B of type
356 // WebPluginContainerImpl). In this case, the frame's view is A and the frame
357 // element's owned widget is B. See https://crbug.com/673170 for an example.
358 // DCHECK(ownerElement->ownedWidget() == this);
dcheng 2016/12/14 02:23:00 Nit: let's remove commented out code. I don't thi
Mariusz Mlynski 2016/12/14 02:36:50 This code is what @esprehn asked for :D I think we
359 if (ownerElement)
356 ownerElement->setWidget(nullptr); 360 ownerElement->setWidget(nullptr);
357 361
358 #if ENABLE(ASSERT) 362 #if ENABLE(ASSERT)
359 m_hasBeenDisposed = true; 363 m_hasBeenDisposed = true;
360 #endif 364 #endif
361 } 365 }
362 366
363 void FrameView::detachScrollbars() { 367 void FrameView::detachScrollbars() {
364 // Previously, we detached custom scrollbars as early as possible to prevent 368 // Previously, we detached custom scrollbars as early as possible to prevent
365 // Document::detachLayoutTree() from messing with the view such that its 369 // 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()); 4673 DCHECK(m_frame->isMainFrame());
4670 return m_initialViewportSize.width(); 4674 return m_initialViewportSize.width();
4671 } 4675 }
4672 4676
4673 int FrameView::initialViewportHeight() const { 4677 int FrameView::initialViewportHeight() const {
4674 DCHECK(m_frame->isMainFrame()); 4678 DCHECK(m_frame->isMainFrame());
4675 return m_initialViewportSize.height(); 4679 return m_initialViewportSize.height();
4676 } 4680 }
4677 4681
4678 } // namespace blink 4682 } // 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