| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 } | 49 } |
| 50 | 50 |
| 51 DEFINE_TRACE(DocumentResource) | 51 DEFINE_TRACE(DocumentResource) |
| 52 { | 52 { |
| 53 visitor->trace(m_document); | 53 visitor->trace(m_document); |
| 54 Resource::trace(visitor); | 54 Resource::trace(visitor); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void DocumentResource::checkNotify() | 57 void DocumentResource::checkNotify() |
| 58 { | 58 { |
| 59 if (m_data && mimeTypeAllowed()) { | 59 if (data() && mimeTypeAllowed()) { |
| 60 // We don't need to create a new frame because the new document belongs
to the parent UseElement. | 60 // We don't need to create a new frame because the new document belongs
to the parent UseElement. |
| 61 m_document = createDocument(response().url()); | 61 m_document = createDocument(response().url()); |
| 62 m_document->setContent(decodedText()); | 62 m_document->setContent(decodedText()); |
| 63 } | 63 } |
| 64 Resource::checkNotify(); | 64 Resource::checkNotify(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 bool DocumentResource::mimeTypeAllowed() const | 67 bool DocumentResource::mimeTypeAllowed() const |
| 68 { | 68 { |
| 69 ASSERT(getType() == SVGDocument); | 69 ASSERT(getType() == SVGDocument); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 82 case SVGDocument: | 82 case SVGDocument: |
| 83 return XMLDocument::createSVG(DocumentInit(url)); | 83 return XMLDocument::createSVG(DocumentInit(url)); |
| 84 default: | 84 default: |
| 85 // FIXME: We'll add more types to support HTMLImports. | 85 // FIXME: We'll add more types to support HTMLImports. |
| 86 ASSERT_NOT_REACHED(); | 86 ASSERT_NOT_REACHED(); |
| 87 return nullptr; | 87 return nullptr; |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 | 90 |
| 91 } // namespace blink | 91 } // namespace blink |
| OLD | NEW |