| 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 20 matching lines...) Expand all Loading... |
| 31 #include "core/fetch/ResourceFetcher.h" | 31 #include "core/fetch/ResourceFetcher.h" |
| 32 #include "core/frame/FrameView.h" | 32 #include "core/frame/FrameView.h" |
| 33 #include "core/rendering/RenderObject.h" | 33 #include "core/rendering/RenderObject.h" |
| 34 #include "core/svg/graphics/SVGImage.h" | 34 #include "core/svg/graphics/SVGImage.h" |
| 35 #include "platform/RuntimeEnabledFeatures.h" | 35 #include "platform/RuntimeEnabledFeatures.h" |
| 36 #include "platform/SharedBuffer.h" | 36 #include "platform/SharedBuffer.h" |
| 37 #include "platform/TraceEvent.h" | 37 #include "platform/TraceEvent.h" |
| 38 #include "platform/graphics/BitmapImage.h" | 38 #include "platform/graphics/BitmapImage.h" |
| 39 #include "wtf/CurrentTime.h" | 39 #include "wtf/CurrentTime.h" |
| 40 #include "wtf/StdLibExtras.h" | 40 #include "wtf/StdLibExtras.h" |
| 41 #include "wtf/Vector.h" | |
| 42 | 41 |
| 43 namespace blink { | 42 namespace blink { |
| 44 | 43 |
| 45 ImageResource::ImageResource(const ResourceRequest& resourceRequest) | 44 ImageResource::ImageResource(const ResourceRequest& resourceRequest) |
| 46 : Resource(resourceRequest, Image) | 45 : Resource(resourceRequest, Image) |
| 47 , m_devicePixelRatioHeaderValue(1.0) | 46 , m_devicePixelRatioHeaderValue(1.0) |
| 48 , m_image(nullptr) | 47 , m_image(nullptr) |
| 49 , m_loadingMultipartContent(false) | 48 , m_loadingMultipartContent(false) |
| 50 , m_hasDevicePixelRatioHeaderValue(false) | 49 , m_hasDevicePixelRatioHeaderValue(false) |
| 51 { | 50 { |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin) | 467 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin) |
| 469 { | 468 { |
| 470 if (!image()->currentFrameHasSingleSecurityOrigin()) | 469 if (!image()->currentFrameHasSingleSecurityOrigin()) |
| 471 return false; | 470 return false; |
| 472 if (passesAccessControlCheck(securityOrigin)) | 471 if (passesAccessControlCheck(securityOrigin)) |
| 473 return true; | 472 return true; |
| 474 return !securityOrigin->taintsCanvas(response().url()); | 473 return !securityOrigin->taintsCanvas(response().url()); |
| 475 } | 474 } |
| 476 | 475 |
| 477 } // namespace blink | 476 } // namespace blink |
| OLD | NEW |