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

Side by Side Diff: sky/engine/core/dom/Document.cpp

Issue 683703003: Remove various Heap* types. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/dom/ExecutionContext.h » ('j') | 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) 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 registerObserver(document); 264 registerObserver(document);
265 } 265 }
266 266
267 DocumentVisibilityObserver::~DocumentVisibilityObserver() 267 DocumentVisibilityObserver::~DocumentVisibilityObserver()
268 { 268 {
269 #if !ENABLE(OILPAN) 269 #if !ENABLE(OILPAN)
270 unregisterObserver(); 270 unregisterObserver();
271 #endif 271 #endif
272 } 272 }
273 273
274 void DocumentVisibilityObserver::trace(Visitor* visitor)
275 {
276 visitor->trace(m_document);
277 }
278
279 void DocumentVisibilityObserver::unregisterObserver() 274 void DocumentVisibilityObserver::unregisterObserver()
280 { 275 {
281 if (m_document) { 276 if (m_document) {
282 m_document->unregisterVisibilityObserver(this); 277 m_document->unregisterVisibilityObserver(this);
283 m_document = nullptr; 278 m_document = nullptr;
284 } 279 }
285 } 280 }
286 281
287 void DocumentVisibilityObserver::registerObserver(Document& document) 282 void DocumentVisibilityObserver::registerObserver(Document& document)
288 { 283 {
(...skipping 2881 matching lines...) Expand 10 before | Expand all | Expand 10 after
3170 wrapperType->installConditionallyEnabledProperties(wrapper, isolate); 3165 wrapperType->installConditionallyEnabledProperties(wrapper, isolate);
3171 V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType, wrapp er, isolate); 3166 V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType, wrapp er, isolate);
3172 3167
3173 DOMWrapperWorld& world = DOMWrapperWorld::current(isolate); 3168 DOMWrapperWorld& world = DOMWrapperWorld::current(isolate);
3174 if (world.isMainWorld() && frame()) 3169 if (world.isMainWorld() && frame())
3175 frame()->script().windowProxy(world)->updateDocumentWrapper(wrapper); 3170 frame()->script().windowProxy(world)->updateDocumentWrapper(wrapper);
3176 3171
3177 return wrapper; 3172 return wrapper;
3178 } 3173 }
3179 3174
3180 void Document::trace(Visitor* visitor)
3181 {
3182 #if ENABLE(OILPAN)
3183 visitor->trace(m_importsController);
3184 visitor->trace(m_implementation);
3185 visitor->trace(m_autofocusElement);
3186 visitor->trace(m_focusedElement);
3187 visitor->trace(m_hoverNode);
3188 visitor->trace(m_activeHoverElement);
3189 visitor->trace(m_documentElement);
3190 visitor->trace(m_titleElement);
3191 visitor->trace(m_markers);
3192 visitor->trace(m_currentScriptStack);
3193 visitor->trace(m_cssCanvasElements);
3194 visitor->trace(m_elemSheet);
3195 visitor->trace(m_ranges);
3196 visitor->trace(m_styleEngine);
3197 visitor->trace(m_domWindow);
3198 visitor->trace(m_fetcher);
3199 visitor->trace(m_parser);
3200 visitor->trace(m_styleSheetList);
3201 visitor->trace(m_mediaQueryMatcher);
3202 visitor->trace(m_scriptedAnimationController);
3203 visitor->trace(m_registrationContext);
3204 visitor->trace(m_customElementMicrotaskRunQueue);
3205 visitor->trace(m_elementDataCache);
3206 visitor->trace(m_templateDocument);
3207 visitor->trace(m_templateDocumentHost);
3208 visitor->trace(m_visibilityObservers);
3209 visitor->trace(m_userActionElements);
3210 visitor->trace(m_timeline);
3211 visitor->trace(m_compositorPendingAnimations);
3212 visitor->trace(m_contextDocument);
3213 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this);
3214 #endif
3215 DocumentSupplementable::trace(visitor);
3216 TreeScope::trace(visitor);
3217 ContainerNode::trace(visitor);
3218 ExecutionContext::trace(visitor);
3219 LifecycleContext<Document>::trace(visitor);
3220 }
3221
3222 } // namespace blink 3175 } // namespace blink
3223 3176
3224 #ifndef NDEBUG 3177 #ifndef NDEBUG
3225 using namespace blink; 3178 using namespace blink;
3226 void showLiveDocumentInstances() 3179 void showLiveDocumentInstances()
3227 { 3180 {
3228 WeakDocumentSet& set = liveDocumentSet(); 3181 WeakDocumentSet& set = liveDocumentSet();
3229 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 3182 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
3230 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { 3183 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) {
3231 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); 3184 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data());
3232 } 3185 }
3233 } 3186 }
3234 #endif 3187 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/dom/ExecutionContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698