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

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

Issue 1914923002: Rename all existing custom element classes as V0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CustomElementV0 -> V0CustomElement Created 4 years, 7 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 10 matching lines...) Expand all
21 * You should have received a copy of the GNU Library General Public License 21 * You should have received a copy of the GNU Library General Public License
22 * along with this library; see the file COPYING.LIB. If not, write to 22 * along with this library; see the file COPYING.LIB. If not, write to
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA. 24 * Boston, MA 02110-1301, USA.
25 * 25 *
26 */ 26 */
27 27
28 #include "core/dom/DocumentInit.h" 28 #include "core/dom/DocumentInit.h"
29 29
30 #include "core/dom/Document.h" 30 #include "core/dom/Document.h"
31 #include "core/dom/custom/CustomElementRegistrationContext.h" 31 #include "core/dom/custom/V0CustomElementRegistrationContext.h"
32 #include "core/frame/LocalFrame.h" 32 #include "core/frame/LocalFrame.h"
33 #include "core/html/HTMLFrameOwnerElement.h" 33 #include "core/html/HTMLFrameOwnerElement.h"
34 #include "core/html/imports/HTMLImportsController.h" 34 #include "core/html/imports/HTMLImportsController.h"
35 #include "core/loader/DocumentLoader.h" 35 #include "core/loader/DocumentLoader.h"
36 #include "platform/RuntimeEnabledFeatures.h" 36 #include "platform/RuntimeEnabledFeatures.h"
37 #include "public/platform/Platform.h" 37 #include "public/platform/Platform.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 // FIXME: Broken with OOPI. 41 // FIXME: Broken with OOPI.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 { 141 {
142 DCHECK(frameForSecurityContext()); 142 DCHECK(frameForSecurityContext());
143 return frameForSecurityContext()->settings(); 143 return frameForSecurityContext()->settings();
144 } 144 }
145 145
146 KURL DocumentInit::parentBaseURL() const 146 KURL DocumentInit::parentBaseURL() const
147 { 147 {
148 return m_parent->baseURL(); 148 return m_parent->baseURL();
149 } 149 }
150 150
151 DocumentInit& DocumentInit::withRegistrationContext(CustomElementRegistrationCon text* registrationContext) 151 DocumentInit& DocumentInit::withRegistrationContext(V0CustomElementRegistrationC ontext* registrationContext)
152 { 152 {
153 DCHECK(!m_createNewRegistrationContext); 153 DCHECK(!m_createNewRegistrationContext);
154 DCHECK(!m_registrationContext); 154 DCHECK(!m_registrationContext);
155 m_registrationContext = registrationContext; 155 m_registrationContext = registrationContext;
156 return *this; 156 return *this;
157 } 157 }
158 158
159 DocumentInit& DocumentInit::withNewRegistrationContext() 159 DocumentInit& DocumentInit::withNewRegistrationContext()
160 { 160 {
161 DCHECK(!m_createNewRegistrationContext); 161 DCHECK(!m_createNewRegistrationContext);
162 DCHECK(!m_registrationContext); 162 DCHECK(!m_registrationContext);
163 m_createNewRegistrationContext = true; 163 m_createNewRegistrationContext = true;
164 return *this; 164 return *this;
165 } 165 }
166 166
167 CustomElementRegistrationContext* DocumentInit::registrationContext(Document* do cument) const 167 V0CustomElementRegistrationContext* DocumentInit::registrationContext(Document* document) const
168 { 168 {
169 if (!document->isHTMLDocument() && !document->isXHTMLDocument()) 169 if (!document->isHTMLDocument() && !document->isXHTMLDocument())
170 return nullptr; 170 return nullptr;
171 171
172 if (m_createNewRegistrationContext) 172 if (m_createNewRegistrationContext)
173 return CustomElementRegistrationContext::create(); 173 return V0CustomElementRegistrationContext::create();
174 174
175 return m_registrationContext.get(); 175 return m_registrationContext.get();
176 } 176 }
177 177
178 Document* DocumentInit::contextDocument() const 178 Document* DocumentInit::contextDocument() const
179 { 179 {
180 return m_contextDocument; 180 return m_contextDocument;
181 } 181 }
182 182
183 DocumentInit DocumentInit::fromContext(Document* contextDocument, const KURL& ur l) 183 DocumentInit DocumentInit::fromContext(Document* contextDocument, const KURL& ur l)
184 { 184 {
185 return DocumentInit(url, 0, contextDocument, 0); 185 return DocumentInit(url, 0, contextDocument, 0);
186 } 186 }
187 187
188 } // namespace blink 188 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentInit.h ('k') | third_party/WebKit/Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698