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