| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 // created from a different implementation. | 217 // created from a different implementation. |
| 218 // Hixie's interpretation of the DOM Core spec suggests we should prefer | 218 // Hixie's interpretation of the DOM Core spec suggests we should prefer |
| 219 // other exceptions to WrongDocumentError (based on order mentioned in spec)
, | 219 // other exceptions to WrongDocumentError (based on order mentioned in spec)
, |
| 220 // but this matches the new DOM Core spec (http://www.w3.org/TR/domcore/). | 220 // but this matches the new DOM Core spec (http://www.w3.org/TR/domcore/). |
| 221 if (doctype && doctype->document()) { | 221 if (doctype && doctype->document()) { |
| 222 es.throwDOMException(WrongDocumentError); | 222 es.throwDOMException(WrongDocumentError); |
| 223 return 0; | 223 return 0; |
| 224 } | 224 } |
| 225 | 225 |
| 226 if (doctype) | 226 if (doctype) |
| 227 doc->appendChild(doctype); | 227 doc->appendChild(doctype, ASSERT_NO_EXCEPTION, DeprecatedAttachNow); |
| 228 if (documentElement) | 228 if (documentElement) |
| 229 doc->appendChild(documentElement.release()); | 229 doc->appendChild(documentElement.release(), ASSERT_NO_EXCEPTION, Depreca
tedAttachNow); |
| 230 | 230 |
| 231 return doc.release(); | 231 return doc.release(); |
| 232 } | 232 } |
| 233 | 233 |
| 234 PassRefPtr<CSSStyleSheet> DOMImplementation::createCSSStyleSheet(const String&,
const String& media) | 234 PassRefPtr<CSSStyleSheet> DOMImplementation::createCSSStyleSheet(const String&,
const String& media) |
| 235 { | 235 { |
| 236 // FIXME: Title should be set. | 236 // FIXME: Title should be set. |
| 237 // FIXME: Media could have wrong syntax, in which case we should generate an
exception. | 237 // FIXME: Media could have wrong syntax, in which case we should generate an
exception. |
| 238 RefPtr<CSSStyleSheet> sheet = CSSStyleSheet::create(StyleSheetContents::crea
te()); | 238 RefPtr<CSSStyleSheet> sheet = CSSStyleSheet::create(StyleSheetContents::crea
te()); |
| 239 sheet->setMediaQueries(MediaQuerySet::create(media)); | 239 sheet->setMediaQueries(MediaQuerySet::create(media)); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 return TextDocument::create(DocumentInit(url, frame)); | 359 return TextDocument::create(DocumentInit(url, frame)); |
| 360 if (type == "image/svg+xml") | 360 if (type == "image/svg+xml") |
| 361 return SVGDocument::create(DocumentInit(url, frame)); | 361 return SVGDocument::create(DocumentInit(url, frame)); |
| 362 if (isXMLMIMEType(type)) | 362 if (isXMLMIMEType(type)) |
| 363 return Document::create(DocumentInit(url, frame)); | 363 return Document::create(DocumentInit(url, frame)); |
| 364 | 364 |
| 365 return HTMLDocument::create(DocumentInit(url, frame)); | 365 return HTMLDocument::create(DocumentInit(url, frame)); |
| 366 } | 366 } |
| 367 | 367 |
| 368 } | 368 } |
| OLD | NEW |