| 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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 860 return resource; | 860 return resource; |
| 861 } | 861 } |
| 862 | 862 |
| 863 void ResourceFetcher::storeResourceTimingInitiatorInformation(Resource* resource
) | 863 void ResourceFetcher::storeResourceTimingInitiatorInformation(Resource* resource
) |
| 864 { | 864 { |
| 865 if (resource->options().requestInitiatorContext != DocumentContext) | 865 if (resource->options().requestInitiatorContext != DocumentContext) |
| 866 return; | 866 return; |
| 867 | 867 |
| 868 RefPtr<ResourceTimingInfo> info = ResourceTimingInfo::create(resource->optio
ns().initiatorInfo.name, monotonicallyIncreasingTime()); | 868 RefPtr<ResourceTimingInfo> info = ResourceTimingInfo::create(resource->optio
ns().initiatorInfo.name, monotonicallyIncreasingTime()); |
| 869 | 869 |
| 870 if (resource->isCacheValidator()) { |
| 871 const AtomicString& timingAllowOrigin = resource->resourceToRevalidate()
->response().httpHeaderField("Timing-Allow-Origin"); |
| 872 if (!timingAllowOrigin.isEmpty()) |
| 873 info->setOriginalTimingAllowOrigin(timingAllowOrigin); |
| 874 } |
| 875 |
| 870 if (resource->type() == Resource::MainResource) { | 876 if (resource->type() == Resource::MainResource) { |
| 871 // <iframe>s should report the initial navigation requested by the paren
t document, but not subsequent navigations. | 877 // <iframe>s should report the initial navigation requested by the paren
t document, but not subsequent navigations. |
| 872 if (frame()->ownerElement() && !frame()->ownerElement()->loadedNonEmptyD
ocument()) { | 878 if (frame()->ownerElement() && !frame()->ownerElement()->loadedNonEmptyD
ocument()) { |
| 873 info->setInitiatorType(frame()->ownerElement()->localName()); | 879 info->setInitiatorType(frame()->ownerElement()->localName()); |
| 874 m_resourceTimingInfoMap.add(resource, info); | 880 m_resourceTimingInfoMap.add(resource, info); |
| 875 frame()->ownerElement()->didLoadNonEmptyDocument(); | 881 frame()->ownerElement()->didLoadNonEmptyDocument(); |
| 876 } | 882 } |
| 877 } else { | 883 } else { |
| 878 m_resourceTimingInfoMap.add(resource, info); | 884 m_resourceTimingInfoMap.add(resource, info); |
| 879 } | 885 } |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1453 } | 1459 } |
| 1454 } | 1460 } |
| 1455 | 1461 |
| 1456 void ResourceFetcher::trace(Visitor* visitor) | 1462 void ResourceFetcher::trace(Visitor* visitor) |
| 1457 { | 1463 { |
| 1458 visitor->trace(m_document); | 1464 visitor->trace(m_document); |
| 1459 ResourceLoaderHost::trace(visitor); | 1465 ResourceLoaderHost::trace(visitor); |
| 1460 } | 1466 } |
| 1461 | 1467 |
| 1462 } | 1468 } |
| OLD | NEW |