| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
| 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 This class provides all functionality needed for loading images, style sheet
s and html | 23 This class provides all functionality needed for loading images, style sheet
s and html |
| 24 pages from the web. It has a memory cache for these objects. | 24 pages from the web. It has a memory cache for these objects. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 #include "core/fetch/XSLStyleSheetResource.h" | 28 #include "core/fetch/XSLStyleSheetResource.h" |
| 29 | 29 |
| 30 #include "core/fetch/ResourceClientWalker.h" | 30 #include "core/fetch/ResourceClientWalker.h" |
| 31 #include "core/fetch/StyleSheetResourceClient.h" | 31 #include "core/fetch/StyleSheetResourceClient.h" |
| 32 #include "core/loader/TextResourceDecoder.h" | 32 #include "core/fetch/TextResourceDecoder.h" |
| 33 #include "core/platform/SharedBuffer.h" | 33 #include "core/platform/SharedBuffer.h" |
| 34 #include "wtf/Vector.h" | 34 #include "wtf/Vector.h" |
| 35 | 35 |
| 36 namespace WebCore { | 36 namespace WebCore { |
| 37 | 37 |
| 38 XSLStyleSheetResource::XSLStyleSheetResource(const ResourceRequest& resourceRequ
est) | 38 XSLStyleSheetResource::XSLStyleSheetResource(const ResourceRequest& resourceRequ
est) |
| 39 : Resource(resourceRequest, XSLStyleSheet) | 39 : Resource(resourceRequest, XSLStyleSheet) |
| 40 , m_decoder(TextResourceDecoder::create("text/xsl")) | 40 , m_decoder(TextResourceDecoder::create("text/xsl")) |
| 41 { | 41 { |
| 42 DEFINE_STATIC_LOCAL(const AtomicString, acceptXSLT, ("text/xml, application/
xml, application/xhtml+xml, text/xsl, application/rss+xml, application/atom+xml"
, AtomicString::ConstructFromLiteral)); | 42 DEFINE_STATIC_LOCAL(const AtomicString, acceptXSLT, ("text/xml, application/
xml, application/xhtml+xml, text/xsl, application/rss+xml, application/atom+xml"
, AtomicString::ConstructFromLiteral)); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 70 m_sheet = m_decoder->decode(m_data->data(), encodedSize()); | 70 m_sheet = m_decoder->decode(m_data->data(), encodedSize()); |
| 71 m_sheet.append(m_decoder->flush()); | 71 m_sheet.append(m_decoder->flush()); |
| 72 } | 72 } |
| 73 | 73 |
| 74 ResourceClientWalker<StyleSheetResourceClient> w(m_clients); | 74 ResourceClientWalker<StyleSheetResourceClient> w(m_clients); |
| 75 while (StyleSheetResourceClient* c = w.next()) | 75 while (StyleSheetResourceClient* c = w.next()) |
| 76 c->setXSLStyleSheet(m_resourceRequest.url(), m_response.url(), m_sheet); | 76 c->setXSLStyleSheet(m_resourceRequest.url(), m_response.url(), m_sheet); |
| 77 } | 77 } |
| 78 | 78 |
| 79 } // namespace WebCore | 79 } // namespace WebCore |
| OLD | NEW |