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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 break; | 616 break; |
617 } | 617 } |
618 | 618 |
619 if (m_image->animationPolicy() != newPolicy) { | 619 if (m_image->animationPolicy() != newPolicy) { |
620 m_image->resetAnimation(); | 620 m_image->resetAnimation(); |
621 m_image->setAnimationPolicy(newPolicy); | 621 m_image->setAnimationPolicy(newPolicy); |
622 } | 622 } |
623 } | 623 } |
624 | 624 |
625 static bool isLoFiImage(const ImageResource& resource) { | 625 static bool isLoFiImage(const ImageResource& resource) { |
626 if (resource.resourceRequest().loFiState() != WebURLRequest::LoFiOn) | 626 if (!(resource.resourceRequest().previewsState() & |
| 627 WebURLRequest::PreviewsState::ServerLoFiOn)) { |
627 return false; | 628 return false; |
| 629 } |
628 return !resource.isLoaded() || | 630 return !resource.isLoaded() || |
629 resource.response() | 631 resource.response() |
630 .httpHeaderField("chrome-proxy-content-transform") | 632 .httpHeaderField("chrome-proxy-content-transform") |
631 .contains("empty-image"); | 633 .contains("empty-image"); |
632 } | 634 } |
633 | 635 |
634 void ImageResource::reloadIfLoFiOrPlaceholder( | 636 void ImageResource::reloadIfLoFiOrPlaceholder( |
635 ResourceFetcher* fetcher, | 637 ResourceFetcher* fetcher, |
636 ReloadCachePolicy reloadCachePolicy) { | 638 ReloadCachePolicy reloadCachePolicy) { |
637 if (!m_isPlaceholder && !isLoFiImage(*this)) | 639 if (!m_isPlaceholder && !isLoFiImage(*this)) |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 WebServiceWorkerResponseTypeOpaque; | 717 WebServiceWorkerResponseTypeOpaque; |
716 } | 718 } |
717 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 719 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
718 return false; | 720 return false; |
719 if (passesAccessControlCheck(securityOrigin)) | 721 if (passesAccessControlCheck(securityOrigin)) |
720 return true; | 722 return true; |
721 return !securityOrigin->taintsCanvas(response().url()); | 723 return !securityOrigin->taintsCanvas(response().url()); |
722 } | 724 } |
723 | 725 |
724 } // namespace blink | 726 } // namespace blink |
OLD | NEW |