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: third_party/WebKit/Source/core/dom/DOMImplementation.cpp

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes Created 4 years, 9 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 * 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 RefPtrWillBeRawPtr<XMLDocument> doc = nullptr; 81 RefPtrWillBeRawPtr<XMLDocument> doc = nullptr;
82 DocumentInit init = DocumentInit::fromContext(document().contextDocument()); 82 DocumentInit init = DocumentInit::fromContext(document().contextDocument());
83 if (namespaceURI == SVGNames::svgNamespaceURI) { 83 if (namespaceURI == SVGNames::svgNamespaceURI) {
84 doc = XMLDocument::createSVG(init); 84 doc = XMLDocument::createSVG(init);
85 } else if (namespaceURI == HTMLNames::xhtmlNamespaceURI) { 85 } else if (namespaceURI == HTMLNames::xhtmlNamespaceURI) {
86 doc = XMLDocument::createXHTML(init.withRegistrationContext(document().r egistrationContext())); 86 doc = XMLDocument::createXHTML(init.withRegistrationContext(document().r egistrationContext()));
87 } else { 87 } else {
88 doc = XMLDocument::create(init); 88 doc = XMLDocument::create(init);
89 } 89 }
90 90
91 doc->setSecurityOrigin(document().securityOrigin()->isolatedCopy()); 91 doc->setSecurityOrigin(document().getSecurityOrigin()->isolatedCopy());
92 doc->setContextFeatures(document().contextFeatures()); 92 doc->setContextFeatures(document().contextFeatures());
93 93
94 RefPtrWillBeRawPtr<Node> documentElement = nullptr; 94 RefPtrWillBeRawPtr<Node> documentElement = nullptr;
95 if (!qualifiedName.isEmpty()) { 95 if (!qualifiedName.isEmpty()) {
96 documentElement = doc->createElementNS(namespaceURI, qualifiedName, exce ptionState); 96 documentElement = doc->createElementNS(namespaceURI, qualifiedName, exce ptionState);
97 if (exceptionState.hadException()) 97 if (exceptionState.hadException())
98 return nullptr; 98 return nullptr;
99 } 99 }
100 100
101 if (doctype) 101 if (doctype)
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 RefPtrWillBeRawPtr<HTMLDocument> d = HTMLDocument::create(init); 203 RefPtrWillBeRawPtr<HTMLDocument> d = HTMLDocument::create(init);
204 d->open(); 204 d->open();
205 d->write("<!doctype html><html><head></head><body></body></html>"); 205 d->write("<!doctype html><html><head></head><body></body></html>");
206 if (!title.isNull()) { 206 if (!title.isNull()) {
207 HTMLHeadElement* headElement = d->head(); 207 HTMLHeadElement* headElement = d->head();
208 ASSERT(headElement); 208 ASSERT(headElement);
209 RefPtrWillBeRawPtr<HTMLTitleElement> titleElement = HTMLTitleElement::cr eate(*d); 209 RefPtrWillBeRawPtr<HTMLTitleElement> titleElement = HTMLTitleElement::cr eate(*d);
210 headElement->appendChild(titleElement); 210 headElement->appendChild(titleElement);
211 titleElement->appendChild(d->createTextNode(title), ASSERT_NO_EXCEPTION) ; 211 titleElement->appendChild(d->createTextNode(title), ASSERT_NO_EXCEPTION) ;
212 } 212 }
213 d->setSecurityOrigin(document().securityOrigin()->isolatedCopy()); 213 d->setSecurityOrigin(document().getSecurityOrigin()->isolatedCopy());
214 d->setContextFeatures(document().contextFeatures()); 214 d->setContextFeatures(document().contextFeatures());
215 return d.release(); 215 return d.release();
216 } 216 }
217 217
218 PassRefPtrWillBeRawPtr<Document> DOMImplementation::createDocument(const String& type, const DocumentInit& init, bool inViewSourceMode) 218 PassRefPtrWillBeRawPtr<Document> DOMImplementation::createDocument(const String& type, const DocumentInit& init, bool inViewSourceMode)
219 { 219 {
220 if (inViewSourceMode) 220 if (inViewSourceMode)
221 return HTMLViewSourceDocument::create(init, type); 221 return HTMLViewSourceDocument::create(init, type);
222 222
223 // Plugins cannot take HTML and XHTML from us, and we don't even need to ini tialize the plugin database for those. 223 // Plugins cannot take HTML and XHTML from us, and we don't even need to ini tialize the plugin database for those.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 return HTMLDocument::create(init); 256 return HTMLDocument::create(init);
257 } 257 }
258 258
259 DEFINE_TRACE(DOMImplementation) 259 DEFINE_TRACE(DOMImplementation)
260 { 260 {
261 visitor->trace(m_document); 261 visitor->trace(m_document);
262 } 262 }
263 263
264 } // namespace blink 264 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ContextLifecycleObserver.h ('k') | third_party/WebKit/Source/core/dom/DOMURL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698