| 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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 } | 645 } |
| 646 | 646 |
| 647 void ResourceFetcher::requestLoadStarted(Resource* resource, const FetchRequest&
request, ResourceLoadStartType type) | 647 void ResourceFetcher::requestLoadStarted(Resource* resource, const FetchRequest&
request, ResourceLoadStartType type) |
| 648 { | 648 { |
| 649 if (type == ResourceLoadingFromCache) | 649 if (type == ResourceLoadingFromCache) |
| 650 notifyLoadedFromMemoryCache(resource); | 650 notifyLoadedFromMemoryCache(resource); |
| 651 | 651 |
| 652 if (request.resourceRequest().url().protocolIsData() || (m_documentLoader &&
m_documentLoader->substituteData().isValid())) | 652 if (request.resourceRequest().url().protocolIsData() || (m_documentLoader &&
m_documentLoader->substituteData().isValid())) |
| 653 return; | 653 return; |
| 654 | 654 |
| 655 if (type == ResourceLoadingFromCache && !m_validatedURLs.contains(request.re
sourceRequest().url())) { | 655 if (type == ResourceLoadingFromCache && !resource->stillNeedsLoad() && !m_va
lidatedURLs.contains(request.resourceRequest().url())) { |
| 656 // Resources loaded from memory cache should be reported the first time
they're used. | 656 // Resources loaded from memory cache should be reported the first time
they're used. |
| 657 RefPtr<ResourceTimingInfo> info = ResourceTimingInfo::create(request.opt
ions().initiatorInfo.name, monotonicallyIncreasingTime()); | 657 RefPtr<ResourceTimingInfo> info = ResourceTimingInfo::create(request.opt
ions().initiatorInfo.name, monotonicallyIncreasingTime()); |
| 658 populateResourceTiming(info.get(), resource, true); | 658 populateResourceTiming(info.get(), resource, true); |
| 659 m_scheduledResourceTimingReports.add(info, resource->type() == Resource:
:MainResource); | 659 m_scheduledResourceTimingReports.add(info, resource->type() == Resource:
:MainResource); |
| 660 if (!m_resourceTimingReportTimer.isActive()) | 660 if (!m_resourceTimingReportTimer.isActive()) |
| 661 m_resourceTimingReportTimer.startOneShot(0, FROM_HERE); | 661 m_resourceTimingReportTimer.startOneShot(0, FROM_HERE); |
| 662 } | 662 } |
| 663 | 663 |
| 664 m_validatedURLs.add(request.resourceRequest().url()); | 664 m_validatedURLs.add(request.resourceRequest().url()); |
| 665 } | 665 } |
| (...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1485 } | 1485 } |
| 1486 } | 1486 } |
| 1487 | 1487 |
| 1488 void ResourceFetcher::trace(Visitor* visitor) | 1488 void ResourceFetcher::trace(Visitor* visitor) |
| 1489 { | 1489 { |
| 1490 visitor->trace(m_document); | 1490 visitor->trace(m_document); |
| 1491 ResourceLoaderHost::trace(visitor); | 1491 ResourceLoaderHost::trace(visitor); |
| 1492 } | 1492 } |
| 1493 | 1493 |
| 1494 } | 1494 } |
| OLD | NEW |