| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 RefPtr<Frame> frame = adoptRef(new Frame(page, ownerElement, client)); | 137 RefPtr<Frame> frame = adoptRef(new Frame(page, ownerElement, client)); |
| 138 if (!ownerElement) | 138 if (!ownerElement) |
| 139 page->setMainFrame(frame); | 139 page->setMainFrame(frame); |
| 140 InspectorInstrumentation::frameAttachedToParent(frame.get()); | 140 InspectorInstrumentation::frameAttachedToParent(frame.get()); |
| 141 return frame.release(); | 141 return frame.release(); |
| 142 } | 142 } |
| 143 | 143 |
| 144 Frame::~Frame() | 144 Frame::~Frame() |
| 145 { | 145 { |
| 146 setView(0); | 146 setView(0); |
| 147 loader()->clear(ClearScriptObjects | ClearWindowObject); | 147 loader().clear(ClearScriptObjects | ClearWindowObject); |
| 148 | 148 |
| 149 // FIXME: We should not be doing all this work inside the destructor | 149 // FIXME: We should not be doing all this work inside the destructor |
| 150 | 150 |
| 151 #ifndef NDEBUG | 151 #ifndef NDEBUG |
| 152 frameCounter.decrement(); | 152 frameCounter.decrement(); |
| 153 #endif | 153 #endif |
| 154 | 154 |
| 155 disconnectOwnerElement(); | 155 disconnectOwnerElement(); |
| 156 | 156 |
| 157 HashSet<FrameDestructionObserver*>::iterator stop = m_destructionObservers.e
nd(); | 157 HashSet<FrameDestructionObserver*>::iterator stop = m_destructionObservers.e
nd(); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 for (size_t i = 0; i < childFrames.size(); ++i) | 316 for (size_t i = 0; i < childFrames.size(); ++i) |
| 317 childFrames[i]->dispatchVisibilityStateChangeEvent(); | 317 childFrames[i]->dispatchVisibilityStateChangeEvent(); |
| 318 } | 318 } |
| 319 | 319 |
| 320 void Frame::willDetachPage() | 320 void Frame::willDetachPage() |
| 321 { | 321 { |
| 322 // We should never be detatching the page during a Layout. | 322 // We should never be detatching the page during a Layout. |
| 323 RELEASE_ASSERT(!m_view || !m_view->isInLayout()); | 323 RELEASE_ASSERT(!m_view || !m_view->isInLayout()); |
| 324 | 324 |
| 325 if (Frame* parent = tree().parent()) | 325 if (Frame* parent = tree().parent()) |
| 326 parent->loader()->checkLoadComplete(); | 326 parent->loader().checkLoadComplete(); |
| 327 | 327 |
| 328 HashSet<FrameDestructionObserver*>::iterator stop = m_destructionObservers.e
nd(); | 328 HashSet<FrameDestructionObserver*>::iterator stop = m_destructionObservers.e
nd(); |
| 329 for (HashSet<FrameDestructionObserver*>::iterator it = m_destructionObserver
s.begin(); it != stop; ++it) | 329 for (HashSet<FrameDestructionObserver*>::iterator it = m_destructionObserver
s.begin(); it != stop; ++it) |
| 330 (*it)->willDetachPage(); | 330 (*it)->willDetachPage(); |
| 331 | 331 |
| 332 // FIXME: It's unclear as to why this is called more than once, but it is, | 332 // FIXME: It's unclear as to why this is called more than once, but it is, |
| 333 // so page() could be NULL. | 333 // so page() could be NULL. |
| 334 if (page() && page()->focusController().focusedFrame() == this) | 334 if (page() && page()->focusController().focusedFrame() == this) |
| 335 page()->focusController().setFocusedFrame(0); | 335 page()->focusController().setFocusedFrame(0); |
| 336 | 336 |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 if (!m_page) | 677 if (!m_page) |
| 678 return 0; | 678 return 0; |
| 679 | 679 |
| 680 double ratio = m_page->deviceScaleFactor(); | 680 double ratio = m_page->deviceScaleFactor(); |
| 681 if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled()) | 681 if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled()) |
| 682 ratio *= pageZoomFactor(); | 682 ratio *= pageZoomFactor(); |
| 683 return ratio; | 683 return ratio; |
| 684 } | 684 } |
| 685 | 685 |
| 686 } // namespace WebCore | 686 } // namespace WebCore |
| OLD | NEW |