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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 // cached or it is a data: url. In this case, we "Reload" the image, | 653 // cached or it is a data: url. In this case, we "Reload" the image, |
654 // then defer it with resourceNeedsLoad() so that it never actually | 654 // then defer it with resourceNeedsLoad() so that it never actually |
655 // goes to the network. | 655 // goes to the network. |
656 // 2. Images are enabled, but not loaded automatically. In this case, we | 656 // 2. Images are enabled, but not loaded automatically. In this case, we |
657 // will Use cached resources or data: urls, but will similarly fall back | 657 // will Use cached resources or data: urls, but will similarly fall back |
658 // to a deferred network load if we don't have the data available | 658 // to a deferred network load if we don't have the data available |
659 // without a network request. We check allowImage() here, which is | 659 // without a network request. We check allowImage() here, which is |
660 // affected by m_imagesEnabled but not m_autoLoadImages, in order to | 660 // affected by m_imagesEnabled but not m_autoLoadImages, in order to |
661 // allow for this differing behavior. | 661 // allow for this differing behavior. |
662 // TODO(japhet): Can we get rid of one of these settings? | 662 // TODO(japhet): Can we get rid of one of these settings? |
663 if (FetchRequest::DeferredByClient == fetchRequest.defer()) | 663 if (existingResource->isImage() && (FetchRequest::DeferredByClient == fetchR
equest.defer() || !context().allowImage(m_imagesEnabled, existingResource->url()
))) |
664 return Reload; | |
665 if (existingResource->isImage() && !context().allowImage(m_imagesEnabled, ex
istingResource->url())) | |
666 return Reload; | 664 return Reload; |
667 | 665 |
668 // Never use cache entries for downloadToFile / useStreamOnResponse | 666 // Never use cache entries for downloadToFile / useStreamOnResponse |
669 // requests. The data will be delivered through other paths. | 667 // requests. The data will be delivered through other paths. |
670 if (request.downloadToFile() || request.useStreamOnResponse()) | 668 if (request.downloadToFile() || request.useStreamOnResponse()) |
671 return Reload; | 669 return Reload; |
672 | 670 |
673 // If resource was populated from a SubstituteData load or data: url, use it
. | 671 // If resource was populated from a SubstituteData load or data: url, use it
. |
674 if (isStaticData) | 672 if (isStaticData) |
675 return Use; | 673 return Use; |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1177 visitor->trace(m_context); | 1175 visitor->trace(m_context); |
1178 visitor->trace(m_archive); | 1176 visitor->trace(m_archive); |
1179 visitor->trace(m_loaders); | 1177 visitor->trace(m_loaders); |
1180 visitor->trace(m_nonBlockingLoaders); | 1178 visitor->trace(m_nonBlockingLoaders); |
1181 visitor->trace(m_documentResources); | 1179 visitor->trace(m_documentResources); |
1182 visitor->trace(m_preloads); | 1180 visitor->trace(m_preloads); |
1183 visitor->trace(m_resourceTimingInfoMap); | 1181 visitor->trace(m_resourceTimingInfoMap); |
1184 } | 1182 } |
1185 | 1183 |
1186 } // namespace blink | 1184 } // namespace blink |
OLD | NEW |