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 16 matching lines...) Expand all Loading... |
27 #include "platform/loader/fetch/FetchRequest.h" | 27 #include "platform/loader/fetch/FetchRequest.h" |
28 #include "platform/loader/fetch/ResourceFetcher.h" | 28 #include "platform/loader/fetch/ResourceFetcher.h" |
29 #include "wtf/text/StringBuilder.h" | 29 #include "wtf/text/StringBuilder.h" |
30 | 30 |
31 namespace blink { | 31 namespace blink { |
32 | 32 |
33 DocumentResource* DocumentResource::fetchSVGDocument(FetchRequest& request, | 33 DocumentResource* DocumentResource::fetchSVGDocument(FetchRequest& request, |
34 ResourceFetcher* fetcher) { | 34 ResourceFetcher* fetcher) { |
35 DCHECK_EQ(request.resourceRequest().frameType(), | 35 DCHECK_EQ(request.resourceRequest().frameType(), |
36 WebURLRequest::FrameTypeNone); | 36 WebURLRequest::FrameTypeNone); |
37 request.mutableResourceRequest().setRequestContext( | 37 request.setRequestContext(WebURLRequest::RequestContextImage); |
38 WebURLRequest::RequestContextImage); | |
39 return toDocumentResource( | 38 return toDocumentResource( |
40 fetcher->requestResource(request, SVGDocumentResourceFactory())); | 39 fetcher->requestResource(request, SVGDocumentResourceFactory())); |
41 } | 40 } |
42 | 41 |
43 DocumentResource::DocumentResource(const ResourceRequest& request, | 42 DocumentResource::DocumentResource(const ResourceRequest& request, |
44 Type type, | 43 Type type, |
45 const ResourceLoaderOptions& options) | 44 const ResourceLoaderOptions& options) |
46 : TextResource(request, type, options, "application/xml", String()) { | 45 : TextResource(request, type, options, "application/xml", String()) { |
47 // FIXME: We'll support more types to support HTMLImports. | 46 // FIXME: We'll support more types to support HTMLImports. |
48 DCHECK_EQ(type, SVGDocument); | 47 DCHECK_EQ(type, SVGDocument); |
(...skipping 30 matching lines...) Expand all Loading... |
79 case SVGDocument: | 78 case SVGDocument: |
80 return XMLDocument::createSVG(DocumentInit(url)); | 79 return XMLDocument::createSVG(DocumentInit(url)); |
81 default: | 80 default: |
82 // FIXME: We'll add more types to support HTMLImports. | 81 // FIXME: We'll add more types to support HTMLImports. |
83 NOTREACHED(); | 82 NOTREACHED(); |
84 return nullptr; | 83 return nullptr; |
85 } | 84 } |
86 } | 85 } |
87 | 86 |
88 } // namespace blink | 87 } // namespace blink |
OLD | NEW |