| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. |    2  * Copyright (C) 2006, 2007, 2009 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  124     return true; |  124     return true; | 
|  125 } |  125 } | 
|  126  |  126  | 
|  127 void SubresourceLoader::willSendRequest(ResourceRequest& newRequest, const Resou
     rceResponse& redirectResponse) |  127 void SubresourceLoader::willSendRequest(ResourceRequest& newRequest, const Resou
     rceResponse& redirectResponse) | 
|  128 { |  128 { | 
|  129     // Store the previous URL because the call to ResourceLoader::willSendReques
     t will modify it. |  129     // Store the previous URL because the call to ResourceLoader::willSendReques
     t will modify it. | 
|  130     KURL previousURL = request().url(); |  130     KURL previousURL = request().url(); | 
|  131     RefPtr<SubresourceLoader> protect(this); |  131     RefPtr<SubresourceLoader> protect(this); | 
|  132  |  132  | 
|  133     ASSERT(!newRequest.isNull()); |  133     ASSERT(!newRequest.isNull()); | 
|  134     if (!previousURL.isNull() && previousURL != newRequest.url()) { |  134     if (!redirectResponse.isNull()) { | 
|  135         if (!m_documentLoader->cachedResourceLoader()->canRequest(m_resource->ty
     pe(), newRequest.url())) { |  135         if (!m_documentLoader->cachedResourceLoader()->canRequest(m_resource->ty
     pe(), newRequest.url())) { | 
|  136             cancel(); |  136             cancel(); | 
|  137             return; |  137             return; | 
|  138         } |  138         } | 
|  139         if (m_resource->type() == CachedResource::ImageResource && m_documentLoa
     der->cachedResourceLoader()->shouldDeferImageLoad(newRequest.url())) { |  139         if (m_resource->type() == CachedResource::ImageResource && m_documentLoa
     der->cachedResourceLoader()->shouldDeferImageLoad(newRequest.url())) { | 
|  140             cancel(); |  140             cancel(); | 
|  141             return; |  141             return; | 
|  142         } |  142         } | 
|  143         m_resource->willSendRequest(newRequest, redirectResponse); |  143         m_resource->willSendRequest(newRequest, redirectResponse); | 
|  144     } |  144     } | 
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  322         m_documentLoader->cachedResourceLoader()->loadDone(m_resource); |  322         m_documentLoader->cachedResourceLoader()->loadDone(m_resource); | 
|  323         if (reachedTerminalState()) |  323         if (reachedTerminalState()) | 
|  324             return; |  324             return; | 
|  325         m_resource->stopLoading(); |  325         m_resource->stopLoading(); | 
|  326         m_documentLoader->removeSubresourceLoader(this); |  326         m_documentLoader->removeSubresourceLoader(this); | 
|  327     } |  327     } | 
|  328     ResourceLoader::releaseResources(); |  328     ResourceLoader::releaseResources(); | 
|  329 } |  329 } | 
|  330  |  330  | 
|  331 } |  331 } | 
| OLD | NEW |