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) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 m_image = nullptr; | 195 m_image = nullptr; |
196 setDecodedSize(0); | 196 setDecodedSize(0); |
197 } | 197 } |
198 | 198 |
199 void ImageResource::destroyDecodedDataIfPossible() | 199 void ImageResource::destroyDecodedDataIfPossible() |
200 { | 200 { |
201 if (!hasClientsOrObservers() && !isLoading() && (!m_image || (m_image->hasOn
eRef() && m_image->isBitmapImage()))) { | 201 if (!hasClientsOrObservers() && !isLoading() && (!m_image || (m_image->hasOn
eRef() && m_image->isBitmapImage()))) { |
202 m_image = nullptr; | 202 m_image = nullptr; |
203 setDecodedSize(0); | 203 setDecodedSize(0); |
204 } else if (m_image && !errorOccurred()) { | 204 } else if (m_image && !errorOccurred()) { |
205 m_image->destroyDecodedData(true); | 205 m_image->destroyDecodedData(); |
206 } | 206 } |
207 } | 207 } |
208 | 208 |
209 void ImageResource::allClientsAndObserversRemoved() | 209 void ImageResource::allClientsAndObserversRemoved() |
210 { | 210 { |
211 if (m_image && !errorOccurred()) | 211 if (m_image && !errorOccurred()) |
212 m_image->resetAnimation(); | 212 m_image->resetAnimation(); |
213 if (m_multipartParser) | 213 if (m_multipartParser) |
214 m_multipartParser->cancel(); | 214 m_multipartParser->cancel(); |
215 Resource::allClientsAndObserversRemoved(); | 215 Resource::allClientsAndObserversRemoved(); |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 if (response().wasFetchedViaServiceWorker()) | 546 if (response().wasFetchedViaServiceWorker()) |
547 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; | 547 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; |
548 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 548 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
549 return false; | 549 return false; |
550 if (passesAccessControlCheck(securityOrigin)) | 550 if (passesAccessControlCheck(securityOrigin)) |
551 return true; | 551 return true; |
552 return !securityOrigin->taintsCanvas(response().url()); | 552 return !securityOrigin->taintsCanvas(response().url()); |
553 } | 553 } |
554 | 554 |
555 } // namespace blink | 555 } // namespace blink |
OLD | NEW |