Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: Source/core/fetch/XSLStyleSheetResource.cpp

Issue 23623012: Move TextResourceDecoder from loader/ to fetch/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/fetch/TextResourceDecoder.cpp ('k') | Source/core/fileapi/FileReaderLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/fetch/TextResourceDecoder.cpp ('k') | Source/core/fileapi/FileReaderLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698