Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1414)

Side by Side Diff: Source/core/loader/ImageLoader.cpp

Issue 640463003: MemoryCache: Enable MemoryCache to have multiple isolated resource maps (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remake Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights reserv ed.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 url = document.completeURL(sourceURI(imageSourceURL)); 357 url = document.completeURL(sourceURI(imageSourceURL));
358 return url; 358 return url;
359 } 359 }
360 360
361 bool ImageLoader::shouldLoadImmediately(const KURL& url, LoadType loadType) cons t 361 bool ImageLoader::shouldLoadImmediately(const KURL& url, LoadType loadType) cons t
362 { 362 {
363 return (m_loadingImageDocument 363 return (m_loadingImageDocument
364 || isHTMLObjectElement(m_element) 364 || isHTMLObjectElement(m_element)
365 || isHTMLEmbedElement(m_element) 365 || isHTMLEmbedElement(m_element)
366 || url.protocolIsData() 366 || url.protocolIsData()
367 || memoryCache()->resourceForURL(url) 367 || memoryCache()->resourceForURL(m_element->document().fetcher()->create CacheIdentifier(), url)
368 || loadType == ForceLoadImmediately); 368 || loadType == ForceLoadImmediately);
369 } 369 }
370 370
371 void ImageLoader::notifyFinished(Resource* resource) 371 void ImageLoader::notifyFinished(Resource* resource)
372 { 372 {
373 WTF_LOG(Timers, "ImageLoader::notifyFinished %p; m_hasPendingLoadEvent=%d", 373 WTF_LOG(Timers, "ImageLoader::notifyFinished %p; m_hasPendingLoadEvent=%d",
374 this, m_hasPendingLoadEvent); 374 this, m_hasPendingLoadEvent);
375 375
376 ASSERT(m_failedLoadURL.isEmpty()); 376 ASSERT(m_failedLoadURL.isEmpty());
377 ASSERT(resource == m_image.get()); 377 ASSERT(resource == m_image.get());
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 } 571 }
572 572
573 #if ENABLE(OILPAN) 573 #if ENABLE(OILPAN)
574 ImageLoader::ImageLoaderClientRemover::~ImageLoaderClientRemover() 574 ImageLoader::ImageLoaderClientRemover::~ImageLoaderClientRemover()
575 { 575 {
576 m_loader.willRemoveClient(m_client); 576 m_loader.willRemoveClient(m_client);
577 } 577 }
578 #endif 578 #endif
579 579
580 } 580 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698