| OLD | NEW |
| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 RawPtr<HTMLDocument> DOMImplementation::createHTMLDocument(const String& title) | 199 RawPtr<HTMLDocument> DOMImplementation::createHTMLDocument(const String& title) |
| 200 { | 200 { |
| 201 DocumentInit init = DocumentInit::fromContext(document().contextDocument()) | 201 DocumentInit init = DocumentInit::fromContext(document().contextDocument()) |
| 202 .withRegistrationContext(document().registrationContext()); | 202 .withRegistrationContext(document().registrationContext()); |
| 203 RawPtr<HTMLDocument> d = HTMLDocument::create(init); | 203 RawPtr<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 DCHECK(headElement); |
| 209 RawPtr<HTMLTitleElement> titleElement = HTMLTitleElement::create(*d); | 209 RawPtr<HTMLTitleElement> titleElement = HTMLTitleElement::create(*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().getSecurityOrigin()->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 RawPtr<Document> DOMImplementation::createDocument(const String& type, const Doc
umentInit& init, bool inViewSourceMode) | 218 RawPtr<Document> DOMImplementation::createDocument(const String& type, const Doc
umentInit& init, bool inViewSourceMode) |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 256 |
| 257 return HTMLDocument::create(init); | 257 return HTMLDocument::create(init); |
| 258 } | 258 } |
| 259 | 259 |
| 260 DEFINE_TRACE(DOMImplementation) | 260 DEFINE_TRACE(DOMImplementation) |
| 261 { | 261 { |
| 262 visitor->trace(m_document); | 262 visitor->trace(m_document); |
| 263 } | 263 } |
| 264 | 264 |
| 265 } // namespace blink | 265 } // namespace blink |
| OLD | NEW |