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

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

Issue 2589913002: 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 | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 340
341 // Destroy |m_autoSizeInfo| as early as possible, to avoid dereferencing 341 // Destroy |m_autoSizeInfo| as early as possible, to avoid dereferencing
342 // partially destroyed |this| via |m_autoSizeInfo->m_frameView|. 342 // partially destroyed |this| via |m_autoSizeInfo->m_frameView|.
343 m_autoSizeInfo.clear(); 343 m_autoSizeInfo.clear();
344 344
345 m_postLayoutTasksTimer.stop(); 345 m_postLayoutTasksTimer.stop();
346 m_didScrollTimer.stop(); 346 m_didScrollTimer.stop();
347 347
348 // FIXME: Do we need to do something here for OOPI? 348 // FIXME: Do we need to do something here for OOPI?
349 HTMLFrameOwnerElement* ownerElement = m_frame->deprecatedLocalOwner(); 349 HTMLFrameOwnerElement* ownerElement = m_frame->deprecatedLocalOwner();
350 // TODO(dcheng): It seems buggy that we can have an owner element that 350 // TODO(dcheng): It seems buggy that we can have an owner element that points
351 // points to another Widget. 351 // to another Widget. This can happen when a plugin element loads a frame
352 // (widget A of type FrameView) and then loads a plugin (widget B of type
353 // WebPluginContainerImpl). In this case, the frame's view is A and the frame
354 // element's owned widget is B. See https://crbug.com/673170 for an example.
352 if (ownerElement && ownerElement->ownedWidget() == this) 355 if (ownerElement && ownerElement->ownedWidget() == this)
353 ownerElement->setWidget(nullptr); 356 ownerElement->setWidget(nullptr);
354 357
355 #if ENABLE(ASSERT) 358 #if ENABLE(ASSERT)
356 m_hasBeenDisposed = true; 359 m_hasBeenDisposed = true;
357 #endif 360 #endif
358 } 361 }
359 362
360 void FrameView::detachScrollbars() { 363 void FrameView::detachScrollbars() {
361 // Previously, we detached custom scrollbars as early as possible to prevent 364 // Previously, we detached custom scrollbars as early as possible to prevent
(...skipping 4251 matching lines...) Expand 10 before | Expand all | Expand 10 after
4613 DCHECK(m_frame->isMainFrame()); 4616 DCHECK(m_frame->isMainFrame());
4614 return m_initialViewportSize.width(); 4617 return m_initialViewportSize.width();
4615 } 4618 }
4616 4619
4617 int FrameView::initialViewportHeight() const { 4620 int FrameView::initialViewportHeight() const {
4618 DCHECK(m_frame->isMainFrame()); 4621 DCHECK(m_frame->isMainFrame());
4619 return m_initialViewportSize.height(); 4622 return m_initialViewportSize.height();
4620 } 4623 }
4621 4624
4622 } // namespace blink 4625 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698