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

Side by Side Diff: third_party/WebKit/Source/core/dom/DocumentInit.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2013 Google Inc. All rights reserved. 9 * Copyright (C) 2013 Google Inc. All rights reserved.
10 * 10 *
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 return 0; 56 return 0;
57 57
58 Frame* ownerFrame = frame->tree().parent(); 58 Frame* ownerFrame = frame->tree().parent();
59 if (!ownerFrame) 59 if (!ownerFrame)
60 ownerFrame = frame->loader().opener(); 60 ownerFrame = frame->loader().opener();
61 if (!ownerFrame || !ownerFrame->isLocalFrame()) 61 if (!ownerFrame || !ownerFrame->isLocalFrame())
62 return 0; 62 return 0;
63 return toLocalFrame(ownerFrame)->document(); 63 return toLocalFrame(ownerFrame)->document();
64 } 64 }
65 65
66 DocumentInit::DocumentInit(const KURL& url, LocalFrame* frame, WeakPtrWillBeRawP tr<Document> contextDocument, HTMLImportsController* importsController) 66 DocumentInit::DocumentInit(const KURL& url, LocalFrame* frame, RawPtr<Document> contextDocument, HTMLImportsController* importsController)
67 : m_url(url) 67 : m_url(url)
68 , m_frame(frame) 68 , m_frame(frame)
69 , m_parent(parentDocument(frame)) 69 , m_parent(parentDocument(frame))
70 , m_owner(ownerDocument(frame)) 70 , m_owner(ownerDocument(frame))
71 , m_contextDocument(contextDocument) 71 , m_contextDocument(contextDocument)
72 , m_importsController(importsController) 72 , m_importsController(importsController)
73 , m_createNewRegistrationContext(false) 73 , m_createNewRegistrationContext(false)
74 , m_shouldReuseDefaultView(frame && frame->shouldReuseDefaultView(url)) 74 , m_shouldReuseDefaultView(frame && frame->shouldReuseDefaultView(url))
75 , m_shouldInheritSecurityOriginFromOwner(url.isEmpty() || url.protocolIsAbou t()) 75 , m_shouldInheritSecurityOriginFromOwner(url.isEmpty() || url.protocolIsAbou t())
76 { 76 {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 m_createNewRegistrationContext = true; 161 m_createNewRegistrationContext = true;
162 return *this; 162 return *this;
163 } 163 }
164 164
165 DocumentInit& DocumentInit::withoutInheritingSecurityOrigin() 165 DocumentInit& DocumentInit::withoutInheritingSecurityOrigin()
166 { 166 {
167 m_shouldInheritSecurityOriginFromOwner = false; 167 m_shouldInheritSecurityOriginFromOwner = false;
168 return *this; 168 return *this;
169 } 169 }
170 170
171 PassRefPtrWillBeRawPtr<CustomElementRegistrationContext> DocumentInit::registrat ionContext(Document* document) const 171 RawPtr<CustomElementRegistrationContext> DocumentInit::registrationContext(Docum ent* document) const
172 { 172 {
173 if (!document->isHTMLDocument() && !document->isXHTMLDocument()) 173 if (!document->isHTMLDocument() && !document->isXHTMLDocument())
174 return nullptr; 174 return nullptr;
175 175
176 if (m_createNewRegistrationContext) 176 if (m_createNewRegistrationContext)
177 return CustomElementRegistrationContext::create(); 177 return CustomElementRegistrationContext::create();
178 178
179 return m_registrationContext.get(); 179 return m_registrationContext.get();
180 } 180 }
181 181
182 WeakPtrWillBeRawPtr<Document> DocumentInit::contextDocument() const 182 RawPtr<Document> DocumentInit::contextDocument() const
183 { 183 {
184 return m_contextDocument; 184 return m_contextDocument;
185 } 185 }
186 186
187 DocumentInit DocumentInit::fromContext(WeakPtrWillBeRawPtr<Document> contextDocu ment, const KURL& url) 187 DocumentInit DocumentInit::fromContext(RawPtr<Document> contextDocument, const K URL& url)
188 { 188 {
189 return DocumentInit(url, 0, contextDocument, 0); 189 return DocumentInit(url, 0, contextDocument, 0);
190 } 190 }
191 191
192 } // namespace blink 192 } // namespace blink
193 193
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698