| 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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
| 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 226 |
| 227 bool CachedResourceLoader::checkInsecureContent(CachedResource::Type type, const
KURL& url) const | 227 bool CachedResourceLoader::checkInsecureContent(CachedResource::Type type, const
KURL& url) const |
| 228 { | 228 { |
| 229 switch (type) { | 229 switch (type) { |
| 230 case CachedResource::Script: | 230 case CachedResource::Script: |
| 231 case CachedResource::XSLStyleSheet: | 231 case CachedResource::XSLStyleSheet: |
| 232 #if ENABLE(SVG) | 232 #if ENABLE(SVG) |
| 233 case CachedResource::SVGDocumentResource: | 233 case CachedResource::SVGDocumentResource: |
| 234 #endif | 234 #endif |
| 235 case CachedResource::CSSStyleSheet: | 235 case CachedResource::CSSStyleSheet: |
| 236 case CachedResource::RawResource: |
| 236 // These resource can inject script into the current document (Script, | 237 // These resource can inject script into the current document (Script, |
| 237 // XSL) or exfiltrate the content of the current document (CSS). | 238 // XSL) or exfiltrate the content of the current document (CSS). |
| 238 if (Frame* f = frame()) | 239 if (Frame* f = frame()) |
| 239 if (!f->loader()->mixedContentChecker()->canRunInsecureContent(m_doc
ument->securityOrigin(), url)) | 240 if (!f->loader()->mixedContentChecker()->canRunInsecureContent(m_doc
ument->securityOrigin(), url)) |
| 240 return false; | 241 return false; |
| 241 break; | 242 break; |
| 242 case CachedResource::TextTrackResource: | 243 case CachedResource::TextTrackResource: |
| 243 case CachedResource::ShaderResource: | 244 case CachedResource::ShaderResource: |
| 244 case CachedResource::RawResource: | |
| 245 case CachedResource::ImageResource: | 245 case CachedResource::ImageResource: |
| 246 case CachedResource::FontResource: { | 246 case CachedResource::FontResource: { |
| 247 // These resources can corrupt only the frame's pixels. | 247 // These resources can corrupt only the frame's pixels. |
| 248 if (Frame* f = frame()) { | 248 if (Frame* f = frame()) { |
| 249 Frame* top = f->tree()->top(); | 249 Frame* top = f->tree()->top(); |
| 250 if (!top->loader()->mixedContentChecker()->canDisplayInsecureContent
(top->document()->securityOrigin(), url)) | 250 if (!top->loader()->mixedContentChecker()->canDisplayInsecureContent
(top->document()->securityOrigin(), url)) |
| 251 return false; | 251 return false; |
| 252 } | 252 } |
| 253 break; | 253 break; |
| 254 } | 254 } |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 info.ignoreMember(m_initiatorMap); | 1040 info.ignoreMember(m_initiatorMap); |
| 1041 } | 1041 } |
| 1042 | 1042 |
| 1043 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions(
) | 1043 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions(
) |
| 1044 { | 1044 { |
| 1045 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData
, AllowStoredCredentials, AskClientForCrossOriginCredentials, DoSecurityCheck); | 1045 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData
, AllowStoredCredentials, AskClientForCrossOriginCredentials, DoSecurityCheck); |
| 1046 return options; | 1046 return options; |
| 1047 } | 1047 } |
| 1048 | 1048 |
| 1049 } | 1049 } |
| OLD | NEW |