| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 } | 331 } |
| 332 | 332 |
| 333 ImageResourceObserverWalker walker(m_observers); | 333 ImageResourceObserverWalker walker(m_observers); |
| 334 while (auto* observer = walker.next()) { | 334 while (auto* observer = walker.next()) { |
| 335 observer->imageChanged(this, changeRect); | 335 observer->imageChanged(this, changeRect); |
| 336 } | 336 } |
| 337 } | 337 } |
| 338 | 338 |
| 339 void ImageResource::clear() | 339 void ImageResource::clear() |
| 340 { | 340 { |
| 341 prune(); | |
| 342 clearImage(); | 341 clearImage(); |
| 343 m_data.clear(); | 342 m_data.clear(); |
| 344 setEncodedSize(0); | 343 setEncodedSize(0); |
| 345 } | 344 } |
| 346 | 345 |
| 347 inline void ImageResource::createImage() | 346 inline void ImageResource::createImage() |
| 348 { | 347 { |
| 349 // Create the image if it doesn't yet exist. | 348 // Create the image if it doesn't yet exist. |
| 350 if (m_image) | 349 if (m_image) |
| 351 return; | 350 return; |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 if (response().wasFetchedViaServiceWorker()) | 584 if (response().wasFetchedViaServiceWorker()) |
| 586 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; | 585 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; |
| 587 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 586 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
| 588 return false; | 587 return false; |
| 589 if (passesAccessControlCheck(securityOrigin)) | 588 if (passesAccessControlCheck(securityOrigin)) |
| 590 return true; | 589 return true; |
| 591 return !securityOrigin->taintsCanvas(response().url()); | 590 return !securityOrigin->taintsCanvas(response().url()); |
| 592 } | 591 } |
| 593 | 592 |
| 594 } // namespace blink | 593 } // namespace blink |
| OLD | NEW |