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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 DocumentInit init = DocumentInit::fromContext(document().contextDocument()) | 326 DocumentInit init = DocumentInit::fromContext(document().contextDocument()) |
327 .withRegistrationContext(document().registrationContext()); | 327 .withRegistrationContext(document().registrationContext()); |
328 RefPtrWillBeRawPtr<HTMLDocument> d = HTMLDocument::create(init); | 328 RefPtrWillBeRawPtr<HTMLDocument> d = HTMLDocument::create(init); |
329 d->open(); | 329 d->open(); |
330 d->write("<!doctype html><html><head></head><body></body></html>"); | 330 d->write("<!doctype html><html><head></head><body></body></html>"); |
331 if (!title.isNull()) { | 331 if (!title.isNull()) { |
332 HTMLHeadElement* headElement = d->head(); | 332 HTMLHeadElement* headElement = d->head(); |
333 ASSERT(headElement); | 333 ASSERT(headElement); |
334 RefPtrWillBeRawPtr<HTMLTitleElement> titleElement = HTMLTitleElement::cr
eate(*d); | 334 RefPtrWillBeRawPtr<HTMLTitleElement> titleElement = HTMLTitleElement::cr
eate(*d); |
335 headElement->appendChild(titleElement); | 335 headElement->appendChild(titleElement); |
336 titleElement->appendChild(d->createTextNode(title), IGNORE_EXCEPTION); | 336 titleElement->appendChild(d->createTextNode(title), ASSERT_NO_EXCEPTION)
; |
337 } | 337 } |
338 d->setSecurityOrigin(document().securityOrigin()->isolatedCopy()); | 338 d->setSecurityOrigin(document().securityOrigin()->isolatedCopy()); |
339 d->setContextFeatures(document().contextFeatures()); | 339 d->setContextFeatures(document().contextFeatures()); |
340 return d.release(); | 340 return d.release(); |
341 } | 341 } |
342 | 342 |
343 PassRefPtrWillBeRawPtr<Document> DOMImplementation::createDocument(const String&
type, LocalFrame* frame, const KURL& url, bool inViewSourceMode) | 343 PassRefPtrWillBeRawPtr<Document> DOMImplementation::createDocument(const String&
type, LocalFrame* frame, const KURL& url, bool inViewSourceMode) |
344 { | 344 { |
345 return createDocument(type, DocumentInit(url, frame), inViewSourceMode); | 345 return createDocument(type, DocumentInit(url, frame), inViewSourceMode); |
346 } | 346 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 | 385 |
386 return HTMLDocument::create(init); | 386 return HTMLDocument::create(init); |
387 } | 387 } |
388 | 388 |
389 void DOMImplementation::trace(Visitor* visitor) | 389 void DOMImplementation::trace(Visitor* visitor) |
390 { | 390 { |
391 visitor->trace(m_document); | 391 visitor->trace(m_document); |
392 } | 392 } |
393 | 393 |
394 } | 394 } |
OLD | NEW |