OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |