CachedImage* CachedResourceLoader::requestImage(ResourceRequest& request) { if (Frame* f = frame()) { Settings* settings = f->settings(); if (!f->loader()->client()->allowImages(!settings || settings->areImagesEnabled())) return 0; if (f->loader()->pageDismissalEventBeingDispatched()) { KURL requestURL = request.url(); if (requestURL.isValid() && canRequest(CachedResource::ImageResource, requestURL)) PingLoader::loadImage(f, requestURL); return 0; } } CachedImage* resource = static_cast<CachedImage*>(requestResource(CachedResource::ImageResource, request, String())); if (resource) { #ifdef ANDROID_BLOCK_NETWORK_IMAGE resource->setAutoLoadWasPreventedBySettings(!autoLoadImages() || shouldBlockNetworkImage(request.url())); #else resource->setAutoLoadWasPreventedBySettings(!autoLoadImages()); #endif if (autoLoadImages() && resource->stillNeedsLoad()) { #ifdef ANDROID_BLOCK_NETWORK_IMAGE if (shouldBlockNetworkImage(request.url())) { return resource; } #endif resource->setLoading(true); load(resource, true); } } return resource; }
CachedImage* DocLoader::requestImage(const String& url) { CachedImage* resource = static_cast<CachedImage*>(requestResource(CachedResource::ImageResource, url, String())); if (autoLoadImages() && resource && resource->stillNeedsLoad()) { resource->setLoading(true); cache()->loader()->load(this, resource, true); } return resource; }
CachedImage* DocLoader::requestImage(const String& url) { // <lab126> KINDLE_PRINT_MODULE(Kindle_Debug_Resources, "Image Request: %s\n", url.latin1().data()); // </lab126> CachedImage* resource = static_cast<CachedImage*>(requestResource(CachedResource::ImageResource, url, String())); if (autoLoadImages() && resource && resource->stillNeedsLoad()) { resource->setLoading(true); cache()->loader()->load(this, resource, true); } return resource; }
CachedImage* DocLoader::requestImage(const String& url) { if (Frame* f = frame()) { Settings* settings = f->settings(); if (!f->loader()->client()->allowImages(!settings || settings->areImagesEnabled())) return 0; } CachedImage* resource = static_cast<CachedImage*>(requestResource(CachedResource::ImageResource, url, String())); if (autoLoadImages() && resource && resource->stillNeedsLoad()) { resource->setLoading(true); cache()->loader()->load(this, resource, true); } return resource; }
CachedImage* CachedResourceLoader::requestImage(ResourceRequest& request) { if (Frame* f = frame()) { if (f->loader()->pageDismissalEventBeingDispatched() != FrameLoader::NoDismissal) { KURL requestURL = request.url(); if (requestURL.isValid() && canRequest(CachedResource::ImageResource, requestURL)) PingLoader::loadImage(f, requestURL); return 0; } } CachedImage* resource = static_cast<CachedImage*>(requestResource(CachedResource::ImageResource, request, String(), defaultCachedResourceOptions())); if (autoLoadImages() && resource && resource->stillNeedsLoad()) resource->load(this, defaultCachedResourceOptions()); return resource; }
CachedImage* CachedResourceLoader::requestImage(ResourceRequest& request) { if (Frame* f = frame()) { Settings* settings = f->settings(); if (!f->loader()->client()->allowImages(!settings || settings->areImagesEnabled())) return 0; if (f->loader()->pageDismissalEventBeingDispatched() != FrameLoader::NoDismissal) { KURL requestURL = request.url(); if (requestURL.isValid() && canRequest(CachedResource::ImageResource, requestURL)) PingLoader::loadImage(f, requestURL); return 0; } } CachedImage* resource = static_cast<CachedImage*>(requestResource(CachedResource::ImageResource, request, String())); if (autoLoadImages() && resource && resource->stillNeedsLoad()) resource->load(this); return resource; }
CachedImage* DocLoader::requestImage(const String& url) { if (Frame* f = frame()) { Settings* settings = f->settings(); if (!f->loader()->client()->allowImages(!settings || settings->areImagesEnabled())) return 0; } CachedImage* resource = static_cast<CachedImage*>(requestResource(CachedResource::ImageResource, url, String())); if (autoLoadImages() && resource && resource->stillNeedsLoad()) { #ifdef ANDROID_BLOCK_NETWORK_IMAGE if (shouldBlockNetworkImage(url)) { return resource; } #endif resource->setLoading(true); cache()->loader()->load(this, resource, true); } return resource; }
CachedImage* CachedResourceLoader::requestImage(const String& url) { if (Frame* f = frame()) { Settings* settings = f->settings(); if (!f->loader()->client()->allowImages(!settings || settings->areImagesEnabled())) return 0; if (f->loader()->pageDismissalEventBeingDispatched()) { KURL completeURL = m_document->completeURL(url); if (completeURL.isValid() && canRequest(CachedResource::ImageResource, completeURL)) PingLoader::loadImage(f, completeURL); return 0; } } CachedImage* resource = static_cast<CachedImage*>(requestResource(CachedResource::ImageResource, url, String())); if (autoLoadImages() && resource && resource->stillNeedsLoad()) { resource->setLoading(true); load(resource, true); } return resource; }