| Index: third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.cpp
|
| diff --git a/third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.cpp b/third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.cpp
|
| index 9d77f2282745aa7c9fb07dba8d2b611ef7697afc..9384b813c9041831a0d28ae49edd2dc2e3871050 100644
|
| --- a/third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.cpp
|
| +++ b/third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.cpp
|
| @@ -52,6 +52,13 @@ PassRefPtrWillBeRawPtr<XSLStyleSheetResource> XSLStyleSheetResource::fetch(Fetch
|
| {
|
| ASSERT(RuntimeEnabledFeatures::xsltEnabled());
|
| request.mutableResourceRequest().setRequestContext(WebURLRequest::RequestContextXSLT);
|
| + // TODO(japhet): Accept: headers can be set manually on XHRs from script,
|
| + // in the browser process, and... here. The browser process can't tell the
|
| + // difference between an XSL stylesheet and a CSS stylesheet, so it assumes
|
| + // stylesheets are all CSS unless they already have an Accept: header set.
|
| + // Should we teach the browser process the difference?
|
| + DEFINE_STATIC_LOCAL(const AtomicString, acceptXSLT, ("text/xml, application/xml, application/xhtml+xml, text/xsl, application/rss+xml, application/atom+xml", AtomicString::ConstructFromLiteral));
|
| + request.mutableResourceRequest().setHTTPAccept(acceptXSLT);
|
| return toXSLStyleSheetResource(fetcher->requestResource(request, XSLStyleSheetResourceFactory()));
|
| }
|
|
|
| @@ -59,11 +66,6 @@ XSLStyleSheetResource::XSLStyleSheetResource(const ResourceRequest& resourceRequ
|
| : StyleSheetResource(resourceRequest, XSLStyleSheet, options, "text/xsl", charset)
|
| {
|
| ASSERT(RuntimeEnabledFeatures::xsltEnabled());
|
| - DEFINE_STATIC_LOCAL(const AtomicString, acceptXSLT, ("text/xml, application/xml, application/xhtml+xml, text/xsl, application/rss+xml, application/atom+xml", AtomicString::ConstructFromLiteral));
|
| -
|
| - // It's XML we want.
|
| - // FIXME: This should accept more general xml formats */*+xml, image/svg+xml for example.
|
| - setAccept(acceptXSLT);
|
| }
|
|
|
| void XSLStyleSheetResource::didAddClient(ResourceClient* c)
|
|
|