OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2114 | 2114 |
2115 m_lifecycle.advanceTo(DocumentLifecycle::Stopping); | 2115 m_lifecycle.advanceTo(DocumentLifecycle::Stopping); |
2116 | 2116 |
2117 if (page()) | 2117 if (page()) |
2118 page()->documentDetached(this); | 2118 page()->documentDetached(this); |
2119 InspectorInstrumentation::documentDetached(this); | 2119 InspectorInstrumentation::documentDetached(this); |
2120 | 2120 |
2121 if (m_frame->loader().client()->sharedWorkerRepositoryClient()) | 2121 if (m_frame->loader().client()->sharedWorkerRepositoryClient()) |
2122 m_frame->loader().client()->sharedWorkerRepositoryClient()->documentDeta ched(this); | 2122 m_frame->loader().client()->sharedWorkerRepositoryClient()->documentDeta ched(this); |
2123 | 2123 |
2124 if (this == &axObjectCacheOwner()) | |
2125 clearAXObjectCache(); | |
2126 | |
2127 stopActiveDOMObjects(); | 2124 stopActiveDOMObjects(); |
2128 | 2125 |
2129 // FIXME: consider using ActiveDOMObject. | 2126 // FIXME: consider using ActiveDOMObject. |
2130 if (m_scriptedAnimationController) | 2127 if (m_scriptedAnimationController) |
2131 m_scriptedAnimationController->clearDocumentPointer(); | 2128 m_scriptedAnimationController->clearDocumentPointer(); |
2132 m_scriptedAnimationController.clear(); | 2129 m_scriptedAnimationController.clear(); |
2133 | 2130 |
2134 if (svgExtensions()) | 2131 if (svgExtensions()) |
2135 accessSVGExtensions().pauseAnimations(); | 2132 accessSVGExtensions().pauseAnimations(); |
2136 | 2133 |
2137 // FIXME: This shouldn't be needed once LocalDOMWindow becomes ExecutionCont ext. | 2134 // FIXME: This shouldn't be needed once LocalDOMWindow becomes ExecutionCont ext. |
2138 if (m_domWindow) | 2135 if (m_domWindow) |
2139 m_domWindow->clearEventQueue(); | 2136 m_domWindow->clearEventQueue(); |
2140 | 2137 |
2141 if (m_layoutView) | 2138 if (m_layoutView) |
2142 m_layoutView->setIsInWindow(false); | 2139 m_layoutView->setIsInWindow(false); |
2143 | 2140 |
2144 if (registrationContext()) | 2141 if (registrationContext()) |
2145 registrationContext()->documentWasDetached(); | 2142 registrationContext()->documentWasDetached(); |
2146 | 2143 |
2147 m_hoverNode = nullptr; | 2144 m_hoverNode = nullptr; |
2148 m_activeHoverElement = nullptr; | 2145 m_activeHoverElement = nullptr; |
2149 m_autofocusElement = nullptr; | 2146 m_autofocusElement = nullptr; |
2150 | 2147 |
2151 if (m_focusedElement.get()) { | 2148 if (m_focusedElement.get()) { |
2152 RefPtrWillBeRawPtr<Element> oldFocusedElement = m_focusedElement; | 2149 RefPtrWillBeRawPtr<Element> oldFocusedElement = m_focusedElement; |
2153 m_focusedElement = nullptr; | 2150 m_focusedElement = nullptr; |
2154 if (frameHost()) | 2151 if (frameHost()) |
2155 frameHost()->chrome().focusedNodeChanged(oldFocusedElement.get(), nu llptr); | 2152 frameHost()->chrome().focusedNodeChanged(oldFocusedElement.get(), nu llptr); |
2153 } | |
2156 | 2154 |
2157 } | 2155 if (this == &axObjectCacheOwner()) |
sof
2015/04/27 06:27:07
Does this mean that we no longer need to check & c
je_julie(Not used)
2015/04/27 19:08:31
You're right.
I can see that commitIfReady() calls
| |
2156 clearAXObjectCache(); | |
2158 | 2157 |
2159 m_layoutView = nullptr; | 2158 m_layoutView = nullptr; |
2160 ContainerNode::detach(context); | 2159 ContainerNode::detach(context); |
2161 | 2160 |
2162 styleEngine().didDetach(); | 2161 styleEngine().didDetach(); |
2163 | 2162 |
2164 frameHost()->eventHandlerRegistry().documentDetached(*this); | 2163 frameHost()->eventHandlerRegistry().documentDetached(*this); |
2165 | 2164 |
2166 // This is required, as our LocalFrame might delete itself as soon as it det aches | 2165 // This is required, as our LocalFrame might delete itself as soon as it det aches |
2167 // us. However, this violates Node::detach() semantics, as it's never | 2166 // us. However, this violates Node::detach() semantics, as it's never |
(...skipping 3592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5760 #ifndef NDEBUG | 5759 #ifndef NDEBUG |
5761 using namespace blink; | 5760 using namespace blink; |
5762 void showLiveDocumentInstances() | 5761 void showLiveDocumentInstances() |
5763 { | 5762 { |
5764 WeakDocumentSet& set = liveDocumentSet(); | 5763 WeakDocumentSet& set = liveDocumentSet(); |
5765 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5764 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5766 for (Document* document : set) | 5765 for (Document* document : set) |
5767 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); | 5766 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); |
5768 } | 5767 } |
5769 #endif | 5768 #endif |
OLD | NEW |