| 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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 } | 566 } |
| 567 | 567 |
| 568 void ImageResource::decodedSizeChangedTo(const blink::Image* image, | 568 void ImageResource::decodedSizeChangedTo(const blink::Image* image, |
| 569 size_t newSize) { | 569 size_t newSize) { |
| 570 if (!image || image != m_image) | 570 if (!image || image != m_image) |
| 571 return; | 571 return; |
| 572 | 572 |
| 573 setDecodedSize(newSize); | 573 setDecodedSize(newSize); |
| 574 } | 574 } |
| 575 | 575 |
| 576 void ImageResource::didDraw(const blink::Image* image) { | 576 void ImageResource::didDraw(const blink::Image* image) {} |
| 577 if (!image || image != m_image) | |
| 578 return; | |
| 579 // decodedSize() == 0 indicates that the image is decoded into | |
| 580 // DiscardableMemory, not in MemoryCache. So we don't need to call | |
| 581 // Resource::didAccessDecodedData() to update MemoryCache. | |
| 582 if (decodedSize() != 0) | |
| 583 Resource::didAccessDecodedData(); | |
| 584 } | |
| 585 | 577 |
| 586 bool ImageResource::shouldPauseAnimation(const blink::Image* image) { | 578 bool ImageResource::shouldPauseAnimation(const blink::Image* image) { |
| 587 if (!image || image != m_image) | 579 if (!image || image != m_image) |
| 588 return false; | 580 return false; |
| 589 | 581 |
| 590 for (auto* observer : m_finishedObservers.asVector()) { | 582 for (auto* observer : m_finishedObservers.asVector()) { |
| 591 if (m_finishedObservers.contains(observer) && observer->willRenderImage()) | 583 if (m_finishedObservers.contains(observer) && observer->willRenderImage()) |
| 592 return false; | 584 return false; |
| 593 } | 585 } |
| 594 | 586 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 WebServiceWorkerResponseTypeOpaque; | 713 WebServiceWorkerResponseTypeOpaque; |
| 722 } | 714 } |
| 723 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 715 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
| 724 return false; | 716 return false; |
| 725 if (passesAccessControlCheck(securityOrigin)) | 717 if (passesAccessControlCheck(securityOrigin)) |
| 726 return true; | 718 return true; |
| 727 return !securityOrigin->taintsCanvas(response().url()); | 719 return !securityOrigin->taintsCanvas(response().url()); |
| 728 } | 720 } |
| 729 | 721 |
| 730 } // namespace blink | 722 } // namespace blink |
| OLD | NEW |