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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/Document.cpp » ('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 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org) 6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org)
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 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 return false; 186 return false;
187 } 187 }
188 return true; 188 return true;
189 } 189 }
190 190
191 PassRefPtr<DocumentType> DOMImplementation::createDocumentType(const AtomicStrin g& qualifiedName, 191 PassRefPtr<DocumentType> DOMImplementation::createDocumentType(const AtomicStrin g& qualifiedName,
192 const String& publicId, const String& systemId, ExceptionState& exceptionSta te) 192 const String& publicId, const String& systemId, ExceptionState& exceptionSta te)
193 { 193 {
194 AtomicString prefix, localName; 194 AtomicString prefix, localName;
195 if (!Document::parseQualifiedName(qualifiedName, prefix, localName, exceptio nState)) 195 if (!Document::parseQualifiedName(qualifiedName, prefix, localName, exceptio nState))
196 return 0; 196 return nullptr;
197 197
198 return DocumentType::create(&m_document, qualifiedName, publicId, systemId); 198 return DocumentType::create(&m_document, qualifiedName, publicId, systemId);
199 } 199 }
200 200
201 DOMImplementation* DOMImplementation::getInterface(const String& /*feature*/) 201 DOMImplementation* DOMImplementation::getInterface(const String& /*feature*/)
202 { 202 {
203 return 0; 203 return 0;
204 } 204 }
205 205
206 PassRefPtr<XMLDocument> DOMImplementation::createDocument(const AtomicString& na mespaceURI, 206 PassRefPtr<XMLDocument> DOMImplementation::createDocument(const AtomicString& na mespaceURI,
(...skipping 11 matching lines...) Expand all
218 doc = XMLDocument::create(init); 218 doc = XMLDocument::create(init);
219 } 219 }
220 220
221 doc->setSecurityOrigin(m_document.securityOrigin()->isolatedCopy()); 221 doc->setSecurityOrigin(m_document.securityOrigin()->isolatedCopy());
222 doc->setContextFeatures(m_document.contextFeatures()); 222 doc->setContextFeatures(m_document.contextFeatures());
223 223
224 RefPtr<Node> documentElement; 224 RefPtr<Node> documentElement;
225 if (!qualifiedName.isEmpty()) { 225 if (!qualifiedName.isEmpty()) {
226 documentElement = doc->createElementNS(namespaceURI, qualifiedName, exce ptionState); 226 documentElement = doc->createElementNS(namespaceURI, qualifiedName, exce ptionState);
227 if (exceptionState.hadException()) 227 if (exceptionState.hadException())
228 return 0; 228 return nullptr;
229 } 229 }
230 230
231 if (doctype) 231 if (doctype)
232 doc->appendChild(doctype); 232 doc->appendChild(doctype);
233 if (documentElement) 233 if (documentElement)
234 doc->appendChild(documentElement.release()); 234 doc->appendChild(documentElement.release());
235 235
236 return doc.release(); 236 return doc.release();
237 } 237 }
238 238
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 return TextDocument::create(init); 389 return TextDocument::create(init);
390 if (type == "image/svg+xml") 390 if (type == "image/svg+xml")
391 return SVGDocument::create(init); 391 return SVGDocument::create(init);
392 if (isXMLMIMEType(type)) 392 if (isXMLMIMEType(type))
393 return XMLDocument::create(init); 393 return XMLDocument::create(init);
394 394
395 return HTMLDocument::create(init); 395 return HTMLDocument::create(init);
396 } 396 }
397 397
398 } 398 }
OLDNEW
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698