| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 m_image = nullptr; | 146 m_image = nullptr; |
| 147 setDecodedSize(0); | 147 setDecodedSize(0); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void ImageResource::destroyDecodedDataIfPossible() | 150 void ImageResource::destroyDecodedDataIfPossible() |
| 151 { | 151 { |
| 152 if (!hasClients() && !isLoading() && (!m_image || (m_image->hasOneRef() && m
_image->isBitmapImage()))) { | 152 if (!hasClients() && !isLoading() && (!m_image || (m_image->hasOneRef() && m
_image->isBitmapImage()))) { |
| 153 m_image = nullptr; | 153 m_image = nullptr; |
| 154 setDecodedSize(0); | 154 setDecodedSize(0); |
| 155 } else if (m_image && !errorOccurred()) { | 155 } else if (m_image && !errorOccurred()) { |
| 156 m_image->destroyDecodedData(true); | 156 m_image->destroyDecodedData(); |
| 157 } | 157 } |
| 158 } | 158 } |
| 159 | 159 |
| 160 void ImageResource::allClientsRemoved() | 160 void ImageResource::allClientsRemoved() |
| 161 { | 161 { |
| 162 if (m_image && !errorOccurred()) | 162 if (m_image && !errorOccurred()) |
| 163 m_image->resetAnimation(); | 163 m_image->resetAnimation(); |
| 164 if (m_multipartParser) | 164 if (m_multipartParser) |
| 165 m_multipartParser->cancel(); | 165 m_multipartParser->cancel(); |
| 166 Resource::allClientsRemoved(); | 166 Resource::allClientsRemoved(); |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 if (response().wasFetchedViaServiceWorker()) | 491 if (response().wasFetchedViaServiceWorker()) |
| 492 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; | 492 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; |
| 493 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 493 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
| 494 return false; | 494 return false; |
| 495 if (passesAccessControlCheck(securityOrigin)) | 495 if (passesAccessControlCheck(securityOrigin)) |
| 496 return true; | 496 return true; |
| 497 return !securityOrigin->taintsCanvas(response().url()); | 497 return !securityOrigin->taintsCanvas(response().url()); |
| 498 } | 498 } |
| 499 | 499 |
| 500 } // namespace blink | 500 } // namespace blink |
| OLD | NEW |