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

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

Issue 64113006: Rename es => exceptionState in core/dom (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/DOMSettableTokenList.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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 if (feature.startsWith("http://www.w3.org/TR/SVG", false) 172 if (feature.startsWith("http://www.w3.org/TR/SVG", false)
173 || feature.startsWith("org.w3c.dom.svg", false) 173 || feature.startsWith("org.w3c.dom.svg", false)
174 || feature.startsWith("org.w3c.svg", false)) { 174 || feature.startsWith("org.w3c.svg", false)) {
175 // FIXME: SVG 2.0 support? 175 // FIXME: SVG 2.0 support?
176 return isSupportedSVG10Feature(feature, version) || isSupportedSVG11Feat ure(feature, version); 176 return isSupportedSVG10Feature(feature, version) || isSupportedSVG11Feat ure(feature, version);
177 } 177 }
178 return true; 178 return true;
179 } 179 }
180 180
181 PassRefPtr<DocumentType> DOMImplementation::createDocumentType(const String& qua lifiedName, 181 PassRefPtr<DocumentType> DOMImplementation::createDocumentType(const String& qua lifiedName,
182 const String& publicId, const String& systemId, ExceptionState& es) 182 const String& publicId, const String& systemId, ExceptionState& exceptionSta te)
183 { 183 {
184 String prefix, localName; 184 String prefix, localName;
185 if (!Document::parseQualifiedName(qualifiedName, prefix, localName, es)) 185 if (!Document::parseQualifiedName(qualifiedName, prefix, localName, exceptio nState))
186 return 0; 186 return 0;
187 187
188 return DocumentType::create(m_document, qualifiedName, publicId, systemId); 188 return DocumentType::create(m_document, qualifiedName, publicId, systemId);
189 } 189 }
190 190
191 DOMImplementation* DOMImplementation::getInterface(const String& /*feature*/) 191 DOMImplementation* DOMImplementation::getInterface(const String& /*feature*/)
192 { 192 {
193 return 0; 193 return 0;
194 } 194 }
195 195
196 PassRefPtr<Document> DOMImplementation::createDocument(const String& namespaceUR I, 196 PassRefPtr<Document> DOMImplementation::createDocument(const String& namespaceUR I,
197 const String& qualifiedName, DocumentType* doctype, ExceptionState& es) 197 const String& qualifiedName, DocumentType* doctype, ExceptionState& exceptio nState)
198 { 198 {
199 RefPtr<Document> doc; 199 RefPtr<Document> doc;
200 DocumentInit init = DocumentInit::fromContext(m_document->contextDocument()) ; 200 DocumentInit init = DocumentInit::fromContext(m_document->contextDocument()) ;
201 if (namespaceURI == SVGNames::svgNamespaceURI) { 201 if (namespaceURI == SVGNames::svgNamespaceURI) {
202 doc = SVGDocument::create(init); 202 doc = SVGDocument::create(init);
203 } else if (namespaceURI == HTMLNames::xhtmlNamespaceURI) { 203 } else if (namespaceURI == HTMLNames::xhtmlNamespaceURI) {
204 doc = Document::createXHTML(init.withRegistrationContext(m_document->reg istrationContext())); 204 doc = Document::createXHTML(init.withRegistrationContext(m_document->reg istrationContext()));
205 } else { 205 } else {
206 doc = Document::create(init); 206 doc = Document::create(init);
207 } 207 }
208 208
209 doc->setSecurityOrigin(m_document->securityOrigin()->isolatedCopy()); 209 doc->setSecurityOrigin(m_document->securityOrigin()->isolatedCopy());
210 doc->setContextFeatures(m_document->contextFeatures()); 210 doc->setContextFeatures(m_document->contextFeatures());
211 211
212 RefPtr<Node> documentElement; 212 RefPtr<Node> documentElement;
213 if (!qualifiedName.isEmpty()) { 213 if (!qualifiedName.isEmpty()) {
214 documentElement = doc->createElementNS(namespaceURI, qualifiedName, es); 214 documentElement = doc->createElementNS(namespaceURI, qualifiedName, exce ptionState);
215 if (es.hadException()) 215 if (exceptionState.hadException())
216 return 0; 216 return 0;
217 } 217 }
218 218
219 if (doctype) 219 if (doctype)
220 doc->appendChild(doctype); 220 doc->appendChild(doctype);
221 if (documentElement) 221 if (documentElement)
222 doc->appendChild(documentElement.release()); 222 doc->appendChild(documentElement.release());
223 223
224 return doc.release(); 224 return doc.release();
225 } 225 }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 return TextDocument::create(init); 359 return TextDocument::create(init);
360 if (type == "image/svg+xml") 360 if (type == "image/svg+xml")
361 return SVGDocument::create(init); 361 return SVGDocument::create(init);
362 if (isXMLMIMEType(type)) 362 if (isXMLMIMEType(type))
363 return Document::create(init); 363 return Document::create(init);
364 364
365 return HTMLDocument::create(init); 365 return HTMLDocument::create(init);
366 } 366 }
367 367
368 } 368 }
OLDNEW
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/DOMSettableTokenList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698