| 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 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
| 6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
| 7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
| 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
| 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 } | 469 } |
| 470 | 470 |
| 471 void LocalFrame::detachChildren() { | 471 void LocalFrame::detachChildren() { |
| 472 DCHECK(m_loader.stateMachine()->creatingInitialEmptyDocument() || document()); | 472 DCHECK(m_loader.stateMachine()->creatingInitialEmptyDocument() || document()); |
| 473 | 473 |
| 474 if (Document* document = this->document()) | 474 if (Document* document = this->document()) |
| 475 ChildFrameDisconnector(*document).disconnect(); | 475 ChildFrameDisconnector(*document).disconnect(); |
| 476 } | 476 } |
| 477 | 477 |
| 478 void LocalFrame::setDOMWindow(LocalDOMWindow* domWindow) { | 478 void LocalFrame::setDOMWindow(LocalDOMWindow* domWindow) { |
| 479 // TODO(haraken): Update this comment. |
| 479 // Oilpan: setDOMWindow() cannot be used when finalizing. Which | 480 // Oilpan: setDOMWindow() cannot be used when finalizing. Which |
| 480 // is acceptable as its actions are either not needed or handled | 481 // is acceptable as its actions are either not needed or handled |
| 481 // by other means -- | 482 // by other means -- |
| 482 // | 483 // |
| 483 // - LocalFrameLifecycleObserver::willDetachFrameHost() will have | 484 // - LocalFrameLifecycleObserver::willDetachFrameHost() will have |
| 484 // signalled the Inspector frameWindowDiscarded() notifications. | 485 // signalled the Inspector frameWindowDiscarded() notifications. |
| 485 // We assume that all LocalFrames are detached, where that notification | 486 // We assume that all LocalFrames are detached, where that notification |
| 486 // will have been done. | 487 // will have been done. |
| 487 // | 488 // |
| 488 // - Calling LocalDOMWindow::reset() is not needed (called from | 489 // - Calling LocalDOMWindow::reset() is not needed (called from |
| 489 // Frame::setDOMWindow().) The Member references it clears will now | 490 // Frame::setDOMWindow().) The Member references it clears will now |
| 490 // die with the window. And the registered DOMWindowProperty instances that
don't, | 491 // die with the window. And the registered DOMWindowProperty instances that
don't, |
| 491 // only keep a weak reference to this frame, so there's no need to be | 492 // only keep a weak reference to this frame, so there's no need to be |
| 492 // explicitly notified that this frame is going away. | 493 // explicitly notified that this frame is going away. |
| 493 if (domWindow) | 494 if (domWindow) |
| 494 script().clearWindowProxy(); | 495 script().clearWindowProxy(); |
| 495 | 496 |
| 496 if (m_domWindow) | 497 if (m_domWindow) |
| 497 m_domWindow->reset(); | 498 m_domWindow->reset(); |
| 498 m_domWindow = domWindow; | 499 m_domWindow = domWindow; |
| 499 page()->chromeClient().installSupplements(*this); | |
| 500 } | 500 } |
| 501 | 501 |
| 502 Document* LocalFrame::document() const { | 502 Document* LocalFrame::document() const { |
| 503 return m_domWindow ? m_domWindow->document() : nullptr; | 503 return m_domWindow ? m_domWindow->document() : nullptr; |
| 504 } | 504 } |
| 505 | 505 |
| 506 void LocalFrame::setPagePopupOwner(Element& owner) { | 506 void LocalFrame::setPagePopupOwner(Element& owner) { |
| 507 m_pagePopupOwner = &owner; | 507 m_pagePopupOwner = &owner; |
| 508 } | 508 } |
| 509 | 509 |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 892 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 893 m_frame->client()->frameBlameContext()->Enter(); | 893 m_frame->client()->frameBlameContext()->Enter(); |
| 894 } | 894 } |
| 895 | 895 |
| 896 ScopedFrameBlamer::~ScopedFrameBlamer() { | 896 ScopedFrameBlamer::~ScopedFrameBlamer() { |
| 897 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 897 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 898 m_frame->client()->frameBlameContext()->Leave(); | 898 m_frame->client()->frameBlameContext()->Leave(); |
| 899 } | 899 } |
| 900 | 900 |
| 901 } // namespace blink | 901 } // namespace blink |
| OLD | NEW |