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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 return false; | 455 return false; |
456 Frame* top = f->tree().top(); | 456 Frame* top = f->tree().top(); |
457 if (top != f && !toLocalFrame(top)->loader().mixedContentChecker()->
canRunInsecureContent(toLocalFrame(top)->document()->securityOrigin(), url)) | 457 if (top != f && !toLocalFrame(top)->loader().mixedContentChecker()->
canRunInsecureContent(toLocalFrame(top)->document()->securityOrigin(), url)) |
458 return false; | 458 return false; |
459 } | 459 } |
460 } else if (treatment == TreatAsPassiveContent) { | 460 } else if (treatment == TreatAsPassiveContent) { |
461 if (LocalFrame* f = frame()) { | 461 if (LocalFrame* f = frame()) { |
462 Frame* top = f->tree().top(); | 462 Frame* top = f->tree().top(); |
463 if (!toLocalFrame(top)->loader().mixedContentChecker()->canDisplayIn
secureContent(toLocalFrame(top)->document()->securityOrigin(), url)) | 463 if (!toLocalFrame(top)->loader().mixedContentChecker()->canDisplayIn
secureContent(toLocalFrame(top)->document()->securityOrigin(), url)) |
464 return false; | 464 return false; |
465 if (type == Resource::Font && MixedContentChecker::isMixedContent(to
LocalFrame(top)->document()->securityOrigin(), url)) | 465 if (MixedContentChecker::isMixedContent(toLocalFrame(top)->document(
)->securityOrigin(), url)) { |
466 UseCounter::count(toLocalFrame(top)->document(), UseCounter::Mix
edContentFont); | 466 switch (type) { |
| 467 case Resource::TextTrack: |
| 468 UseCounter::count(toLocalFrame(top)->document(), UseCounter:
:MixedContentTextTrack); |
| 469 break; |
| 470 |
| 471 case Resource::Raw: |
| 472 UseCounter::count(toLocalFrame(top)->document(), UseCounter:
:MixedContentRaw); |
| 473 break; |
| 474 |
| 475 case Resource::Image: |
| 476 UseCounter::count(toLocalFrame(top)->document(), UseCounter:
:MixedContentImage); |
| 477 break; |
| 478 |
| 479 case Resource::Media: |
| 480 UseCounter::count(toLocalFrame(top)->document(), UseCounter:
:MixedContentMedia); |
| 481 break; |
| 482 |
| 483 default: |
| 484 ASSERT_NOT_REACHED(); |
| 485 } |
| 486 } |
467 } | 487 } |
468 } else { | 488 } else { |
469 ASSERT(treatment == TreatAsAlwaysAllowedContent); | 489 ASSERT(treatment == TreatAsAlwaysAllowedContent); |
470 } | 490 } |
471 return true; | 491 return true; |
472 } | 492 } |
473 | 493 |
474 bool ResourceFetcher::canRequest(Resource::Type type, const KURL& url, const Res
ourceLoaderOptions& options, bool forPreload, FetchRequest::OriginRestriction or
iginRestriction) const | 494 bool ResourceFetcher::canRequest(Resource::Type type, const KURL& url, const Res
ourceLoaderOptions& options, bool forPreload, FetchRequest::OriginRestriction or
iginRestriction) const |
475 { | 495 { |
476 SecurityOrigin* securityOrigin = options.securityOrigin.get(); | 496 SecurityOrigin* securityOrigin = options.securityOrigin.get(); |
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1470 } | 1490 } |
1471 } | 1491 } |
1472 | 1492 |
1473 void ResourceFetcher::trace(Visitor* visitor) | 1493 void ResourceFetcher::trace(Visitor* visitor) |
1474 { | 1494 { |
1475 visitor->trace(m_document); | 1495 visitor->trace(m_document); |
1476 ResourceLoaderHost::trace(visitor); | 1496 ResourceLoaderHost::trace(visitor); |
1477 } | 1497 } |
1478 | 1498 |
1479 } | 1499 } |
OLD | NEW |