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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 304323010: Oilpan: have DocumentInit use transition types throughout. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add WeakPtrWillBeMember transition type Created 6 years, 6 months 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
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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 , m_hasAnnotatedRegions(false) 455 , m_hasAnnotatedRegions(false)
456 , m_annotatedRegionsDirty(false) 456 , m_annotatedRegionsDirty(false)
457 , m_useSecureKeyboardEntryWhenActive(false) 457 , m_useSecureKeyboardEntryWhenActive(false)
458 , m_documentClasses(documentClasses) 458 , m_documentClasses(documentClasses)
459 , m_isViewSource(false) 459 , m_isViewSource(false)
460 , m_sawElementsInKnownNamespaces(false) 460 , m_sawElementsInKnownNamespaces(false)
461 , m_isSrcdocDocument(false) 461 , m_isSrcdocDocument(false)
462 , m_isMobileDocument(false) 462 , m_isMobileDocument(false)
463 , m_isTransitionDocument(false) 463 , m_isTransitionDocument(false)
464 , m_renderView(0) 464 , m_renderView(0)
465 #if !ENABLE(OILPAN)
465 , m_weakFactory(this) 466 , m_weakFactory(this)
467 #endif
466 , m_contextDocument(initializer.contextDocument()) 468 , m_contextDocument(initializer.contextDocument())
467 , m_hasFullscreenElementStack(false) 469 , m_hasFullscreenElementStack(false)
468 , m_loadEventDelayCount(0) 470 , m_loadEventDelayCount(0)
469 , m_loadEventDelayTimer(this, &Document::loadEventDelayTimerFired) 471 , m_loadEventDelayTimer(this, &Document::loadEventDelayTimerFired)
470 , m_pluginLoadingTimer(this, &Document::pluginLoadingTimerFired) 472 , m_pluginLoadingTimer(this, &Document::pluginLoadingTimerFired)
471 , m_didSetReferrerPolicy(false) 473 , m_didSetReferrerPolicy(false)
472 , m_referrerPolicy(ReferrerPolicyDefault) 474 , m_referrerPolicy(ReferrerPolicyDefault)
473 , m_directionSetOnDocumentElement(false) 475 , m_directionSetOnDocumentElement(false)
474 , m_writingModeSetOnDocumentElement(false) 476 , m_writingModeSetOnDocumentElement(false)
475 , m_writeRecursionIsTooDeep(false) 477 , m_writeRecursionIsTooDeep(false)
(...skipping 4034 matching lines...) Expand 10 before | Expand all | Expand 10 after
4510 { 4512 {
4511 Document* doc = const_cast<Document*>(this); 4513 Document* doc = const_cast<Document*>(this);
4512 Element* element; 4514 Element* element;
4513 while ((element = doc->ownerElement())) 4515 while ((element = doc->ownerElement()))
4514 doc = &element->document(); 4516 doc = &element->document();
4515 4517
4516 ASSERT(doc); 4518 ASSERT(doc);
4517 return *doc; 4519 return *doc;
4518 } 4520 }
4519 4521
4520 WeakPtr<Document> Document::contextDocument() 4522 WeakPtrWillBeRawPtr<Document> Document::contextDocument()
4521 { 4523 {
4522 if (m_contextDocument) 4524 if (m_contextDocument)
4523 return m_contextDocument; 4525 return m_contextDocument;
4524 if (m_frame) 4526 if (m_frame) {
4527 #if ENABLE(OILPAN)
4528 return this;
4529 #else
4525 return m_weakFactory.createWeakPtr(); 4530 return m_weakFactory.createWeakPtr();
4526 return WeakPtr<Document>(nullptr); 4531 #endif
4532 }
4533 return WeakPtrWillBeRawPtr<Document>(nullptr);
4527 } 4534 }
4528 4535
4529 PassRefPtrWillBeRawPtr<Attr> Document::createAttribute(const AtomicString& name, ExceptionState& exceptionState) 4536 PassRefPtrWillBeRawPtr<Attr> Document::createAttribute(const AtomicString& name, ExceptionState& exceptionState)
4530 { 4537 {
4531 return createAttributeNS(nullAtom, name, exceptionState, true); 4538 return createAttributeNS(nullAtom, name, exceptionState, true);
4532 } 4539 }
4533 4540
4534 PassRefPtrWillBeRawPtr<Attr> Document::createAttributeNS(const AtomicString& nam espaceURI, const AtomicString& qualifiedName, ExceptionState& exceptionState, bo ol shouldIgnoreNamespaceChecks) 4541 PassRefPtrWillBeRawPtr<Attr> Document::createAttributeNS(const AtomicString& nam espaceURI, const AtomicString& qualifiedName, ExceptionState& exceptionState, bo ol shouldIgnoreNamespaceChecks)
4535 { 4542 {
4536 AtomicString prefix, localName; 4543 AtomicString prefix, localName;
(...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after
5807 visitor->trace(m_mediaQueryMatcher); 5814 visitor->trace(m_mediaQueryMatcher);
5808 visitor->trace(m_registrationContext); 5815 visitor->trace(m_registrationContext);
5809 visitor->trace(m_associatedFormControls); 5816 visitor->trace(m_associatedFormControls);
5810 visitor->trace(m_templateDocument); 5817 visitor->trace(m_templateDocument);
5811 visitor->trace(m_templateDocumentHost); 5818 visitor->trace(m_templateDocumentHost);
5812 visitor->trace(m_visibilityObservers); 5819 visitor->trace(m_visibilityObservers);
5813 visitor->trace(m_userActionElements); 5820 visitor->trace(m_userActionElements);
5814 visitor->trace(m_svgExtensions); 5821 visitor->trace(m_svgExtensions);
5815 visitor->trace(m_timeline); 5822 visitor->trace(m_timeline);
5816 visitor->trace(m_compositorPendingAnimations); 5823 visitor->trace(m_compositorPendingAnimations);
5824 visitor->trace(m_contextDocument);
5817 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); 5825 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this);
5818 DocumentSupplementable::trace(visitor); 5826 DocumentSupplementable::trace(visitor);
5819 TreeScope::trace(visitor); 5827 TreeScope::trace(visitor);
5820 ContainerNode::trace(visitor); 5828 ContainerNode::trace(visitor);
5821 ExecutionContext::trace(visitor); 5829 ExecutionContext::trace(visitor);
5822 } 5830 }
5823 5831
5824 } // namespace WebCore 5832 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698