| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 2010 Rob Buis <rwlbuis@gmail.com> | 2 Copyright (C) 2010 Rob Buis <rwlbuis@gmail.com> |
| 3 Copyright (C) 2011 Cosmin Truta <ctruta@gmail.com> | 3 Copyright (C) 2011 Cosmin Truta <ctruta@gmail.com> |
| 4 Copyright (C) 2012 University of Szeged | 4 Copyright (C) 2012 University of Szeged |
| 5 Copyright (C) 2012 Renata Hodovan <reni@webkit.org> | 5 Copyright (C) 2012 Renata Hodovan <reni@webkit.org> |
| 6 | 6 |
| 7 This library is free software; you can redistribute it and/or | 7 This library is free software; you can redistribute it and/or |
| 8 modify it under the terms of the GNU Library General Public | 8 modify it under the terms of the GNU Library General Public |
| 9 License as published by the Free Software Foundation; either | 9 License as published by the Free Software Foundation; either |
| 10 version 2 of the License, or (at your option) any later version. | 10 version 2 of the License, or (at your option) any later version. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 DocumentResource::~DocumentResource() | 50 DocumentResource::~DocumentResource() |
| 51 { | 51 { |
| 52 } | 52 } |
| 53 | 53 |
| 54 DEFINE_TRACE(DocumentResource) | 54 DEFINE_TRACE(DocumentResource) |
| 55 { | 55 { |
| 56 visitor->trace(m_document); | 56 visitor->trace(m_document); |
| 57 Resource::trace(visitor); | 57 Resource::trace(visitor); |
| 58 } | 58 } |
| 59 | 59 |
| 60 Document* DocumentResource::document() const | |
| 61 { | |
| 62 return m_document.get(); | |
| 63 } | |
| 64 | |
| 65 void DocumentResource::setEncoding(const String& chs) | 60 void DocumentResource::setEncoding(const String& chs) |
| 66 { | 61 { |
| 67 m_decoder->setEncoding(chs, TextResourceDecoder::EncodingFromHTTPHeader); | 62 m_decoder->setEncoding(chs, TextResourceDecoder::EncodingFromHTTPHeader); |
| 68 } | 63 } |
| 69 | 64 |
| 70 String DocumentResource::encoding() const | 65 String DocumentResource::encoding() const |
| 71 { | 66 { |
| 72 return m_decoder->encoding().name(); | 67 return m_decoder->encoding().name(); |
| 73 } | 68 } |
| 74 | 69 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 91 case SVGDocument: | 86 case SVGDocument: |
| 92 return XMLDocument::createSVG(DocumentInit(url)); | 87 return XMLDocument::createSVG(DocumentInit(url)); |
| 93 default: | 88 default: |
| 94 // FIXME: We'll add more types to support HTMLImports. | 89 // FIXME: We'll add more types to support HTMLImports. |
| 95 ASSERT_NOT_REACHED(); | 90 ASSERT_NOT_REACHED(); |
| 96 return nullptr; | 91 return nullptr; |
| 97 } | 92 } |
| 98 } | 93 } |
| 99 | 94 |
| 100 } | 95 } |
| OLD | NEW |