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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 if (!memoryCache()->add(resource.get())) | 593 if (!memoryCache()->add(resource.get())) |
594 resource->setOwningCachedResourceLoader(this); | 594 resource->setOwningCachedResourceLoader(this); |
595 storeResourceTimingInitiatorInformation(resource, request); | 595 storeResourceTimingInitiatorInformation(resource, request); |
596 return resource; | 596 return resource; |
597 } | 597 } |
598 | 598 |
599 void CachedResourceLoader::storeResourceTimingInitiatorInformation(const CachedR
esourceHandle<CachedResource>& resource, const CachedResourceRequest& request) | 599 void CachedResourceLoader::storeResourceTimingInitiatorInformation(const CachedR
esourceHandle<CachedResource>& resource, const CachedResourceRequest& request) |
600 { | 600 { |
601 if (resource->type() == CachedResource::MainResource) { | 601 if (resource->type() == CachedResource::MainResource) { |
602 // <iframe>s should report the initial navigation requested by the paren
t document, but not subsequent navigations. | 602 // <iframe>s should report the initial navigation requested by the paren
t document, but not subsequent navigations. |
603 if (frame()->ownerElement() && m_documentLoader->frameLoader()->stateMac
hine()->committingFirstRealLoad()) { | 603 if (frame()->ownerElement() && !frame()->ownerElement()->loadedNonEmptyD
ocument()) { |
604 InitiatorInfo info = { frame()->ownerElement()->localName(), monoton
icallyIncreasingTime() }; | 604 InitiatorInfo info = { frame()->ownerElement()->localName(), monoton
icallyIncreasingTime() }; |
605 m_initiatorMap.add(resource.get(), info); | 605 m_initiatorMap.add(resource.get(), info); |
| 606 frame()->ownerElement()->didLoadNonEmptyDocument(); |
606 } | 607 } |
607 } else { | 608 } else { |
608 InitiatorInfo info = { request.initiatorName(), monotonicallyIncreasingT
ime() }; | 609 InitiatorInfo info = { request.initiatorName(), monotonicallyIncreasingT
ime() }; |
609 m_initiatorMap.add(resource.get(), info); | 610 m_initiatorMap.add(resource.get(), info); |
610 } | 611 } |
611 } | 612 } |
612 | 613 |
613 CachedResourceLoader::RevalidationPolicy CachedResourceLoader::determineRevalida
tionPolicy(CachedResource::Type type, ResourceRequest& request, bool forPreload,
CachedResource* existingResource, CachedResourceRequest::DeferOption defer) con
st | 614 CachedResourceLoader::RevalidationPolicy CachedResourceLoader::determineRevalida
tionPolicy(CachedResource::Type type, ResourceRequest& request, bool forPreload,
CachedResource* existingResource, CachedResourceRequest::DeferOption defer) con
st |
614 { | 615 { |
615 if (!existingResource) | 616 if (!existingResource) |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 info.ignoreMember(m_initiatorMap); | 1041 info.ignoreMember(m_initiatorMap); |
1041 } | 1042 } |
1042 | 1043 |
1043 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions(
) | 1044 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions(
) |
1044 { | 1045 { |
1045 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData
, AllowStoredCredentials, AskClientForCrossOriginCredentials, DoSecurityCheck); | 1046 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData
, AllowStoredCredentials, AskClientForCrossOriginCredentials, DoSecurityCheck); |
1046 return options; | 1047 return options; |
1047 } | 1048 } |
1048 | 1049 |
1049 } | 1050 } |
OLD | NEW |