| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 ImageResourceObserverWalker walker(m_observers); | 309 ImageResourceObserverWalker walker(m_observers); |
| 310 while (auto* observer = walker.next()) { | 310 while (auto* observer = walker.next()) { |
| 311 observer->imageChanged(this, changeRect); | 311 observer->imageChanged(this, changeRect); |
| 312 } | 312 } |
| 313 } | 313 } |
| 314 | 314 |
| 315 void ImageResource::clear() | 315 void ImageResource::clear() |
| 316 { | 316 { |
| 317 prune(); | 317 prune(); |
| 318 clearImage(); | 318 clearImage(); |
| 319 m_data.clear(); |
| 319 setEncodedSize(0); | 320 setEncodedSize(0); |
| 320 } | 321 } |
| 321 | 322 |
| 322 inline void ImageResource::createImage() | 323 inline void ImageResource::createImage() |
| 323 { | 324 { |
| 324 // Create the image if it doesn't yet exist. | 325 // Create the image if it doesn't yet exist. |
| 325 if (m_image) | 326 if (m_image) |
| 326 return; | 327 return; |
| 327 | 328 |
| 328 if (m_response.mimeType() == "image/svg+xml") { | 329 if (m_response.mimeType() == "image/svg+xml") { |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 if (response().wasFetchedViaServiceWorker()) | 550 if (response().wasFetchedViaServiceWorker()) |
| 550 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; | 551 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; |
| 551 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 552 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
| 552 return false; | 553 return false; |
| 553 if (passesAccessControlCheck(securityOrigin)) | 554 if (passesAccessControlCheck(securityOrigin)) |
| 554 return true; | 555 return true; |
| 555 return !securityOrigin->taintsCanvas(response().url()); | 556 return !securityOrigin->taintsCanvas(response().url()); |
| 556 } | 557 } |
| 557 | 558 |
| 558 } // namespace blink | 559 } // namespace blink |
| OLD | NEW |