| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 ASSERT(resource); | 67 ASSERT(resource); |
| 68 if (!resource) | 68 if (!resource) |
| 69 return; | 69 return; |
| 70 | 70 |
| 71 const KURL& url = resource->url(); // get before passing PassRefPtr (which s
ets it to 0) | 71 const KURL& url = resource->url(); // get before passing PassRefPtr (which s
ets it to 0) |
| 72 m_subresources.set(url, resource); | 72 m_subresources.set(url, resource); |
| 73 } | 73 } |
| 74 | 74 |
| 75 ArchiveResource* ArchiveResourceCollection::archiveResourceForURL(const KURL& ur
l) | 75 ArchiveResource* ArchiveResourceCollection::archiveResourceForURL(const KURL& ur
l) |
| 76 { | 76 { |
| 77 ArchiveResource* resource = m_subresources.get(url).get(); | 77 ArchiveResource* resource = m_subresources.get(url); |
| 78 if (!resource) | 78 if (!resource) |
| 79 return 0; | 79 return 0; |
| 80 | 80 |
| 81 return resource; | 81 return resource; |
| 82 } | 82 } |
| 83 | 83 |
| 84 PassRefPtr<MHTMLArchive> ArchiveResourceCollection::popSubframeArchive(const Str
ing& frameName, const KURL& url) | 84 PassRefPtr<MHTMLArchive> ArchiveResourceCollection::popSubframeArchive(const Str
ing& frameName, const KURL& url) |
| 85 { | 85 { |
| 86 RefPtr<MHTMLArchive> archive = m_subframes.take(frameName); | 86 RefPtr<MHTMLArchive> archive = m_subframes.take(frameName); |
| 87 if (archive) | 87 if (archive) |
| 88 return archive.release(); | 88 return archive.release(); |
| 89 | 89 |
| 90 return m_subframes.take(url.string()); | 90 return m_subframes.take(url.string()); |
| 91 } | 91 } |
| 92 | 92 |
| 93 } | 93 } |
| OLD | NEW |