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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 } | 474 } |
475 | 475 |
476 void ImageResource::decodedSizeChangedTo(const blink::Image* image, | 476 void ImageResource::decodedSizeChangedTo(const blink::Image* image, |
477 size_t newSize) { | 477 size_t newSize) { |
478 if (!image || image != m_image) | 478 if (!image || image != m_image) |
479 return; | 479 return; |
480 | 480 |
481 setDecodedSize(newSize); | 481 setDecodedSize(newSize); |
482 } | 482 } |
483 | 483 |
484 void ImageResource::didDraw(const blink::Image* image) { | 484 void ImageResource::didDraw(const blink::Image* image) {} |
485 if (!image || image != m_image) | |
486 return; | |
487 // decodedSize() == 0 indicates that the image is decoded into | |
488 // DiscardableMemory, not in MemoryCache. So we don't need to call | |
489 // Resource::didAccessDecodedData() to update MemoryCache. | |
490 if (decodedSize() != 0) | |
491 Resource::didAccessDecodedData(); | |
492 } | |
493 | 485 |
494 bool ImageResource::shouldPauseAnimation(const blink::Image* image) { | 486 bool ImageResource::shouldPauseAnimation(const blink::Image* image) { |
495 if (!image || image != m_image) | 487 if (!image || image != m_image) |
496 return false; | 488 return false; |
497 | 489 |
498 for (auto* observer : m_finishedObservers.asVector()) { | 490 for (auto* observer : m_finishedObservers.asVector()) { |
499 if (m_finishedObservers.contains(observer) && observer->willRenderImage()) | 491 if (m_finishedObservers.contains(observer) && observer->willRenderImage()) |
500 return false; | 492 return false; |
501 } | 493 } |
502 | 494 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 WebServiceWorkerResponseTypeOpaque; | 606 WebServiceWorkerResponseTypeOpaque; |
615 } | 607 } |
616 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 608 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
617 return false; | 609 return false; |
618 if (passesAccessControlCheck(securityOrigin)) | 610 if (passesAccessControlCheck(securityOrigin)) |
619 return true; | 611 return true; |
620 return !securityOrigin->taintsCanvas(response().url()); | 612 return !securityOrigin->taintsCanvas(response().url()); |
621 } | 613 } |
622 | 614 |
623 } // namespace blink | 615 } // namespace blink |
OLD | NEW |