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 21 matching lines...) Expand all Loading... |
32 #include "core/fetch/ResourceFetcher.h" | 32 #include "core/fetch/ResourceFetcher.h" |
33 #include "core/frame/FrameView.h" | 33 #include "core/frame/FrameView.h" |
34 #include "core/rendering/RenderObject.h" | 34 #include "core/rendering/RenderObject.h" |
35 #include "core/svg/graphics/SVGImage.h" | 35 #include "core/svg/graphics/SVGImage.h" |
36 #include "platform/SharedBuffer.h" | 36 #include "platform/SharedBuffer.h" |
37 #include "platform/graphics/BitmapImage.h" | 37 #include "platform/graphics/BitmapImage.h" |
38 #include "wtf/CurrentTime.h" | 38 #include "wtf/CurrentTime.h" |
39 #include "wtf/StdLibExtras.h" | 39 #include "wtf/StdLibExtras.h" |
40 #include "wtf/Vector.h" | 40 #include "wtf/Vector.h" |
41 | 41 |
42 using namespace std; | |
43 | |
44 namespace WebCore { | 42 namespace WebCore { |
45 | 43 |
46 ImageResource::ImageResource(const ResourceRequest& resourceRequest) | 44 ImageResource::ImageResource(const ResourceRequest& resourceRequest) |
47 : Resource(resourceRequest, Image) | 45 : Resource(resourceRequest, Image) |
48 , m_devicePixelRatioHeaderValue(1.0) | 46 , m_devicePixelRatioHeaderValue(1.0) |
49 , m_image(0) | 47 , m_image(0) |
50 , m_loadingMultipartContent(false) | 48 , m_loadingMultipartContent(false) |
51 , m_hasDevicePixelRatioHeaderValue(false) | 49 , m_hasDevicePixelRatioHeaderValue(false) |
52 { | 50 { |
53 setStatus(Unknown); | 51 setStatus(Unknown); |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin) | 461 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin) |
464 { | 462 { |
465 if (!image()->currentFrameHasSingleSecurityOrigin()) | 463 if (!image()->currentFrameHasSingleSecurityOrigin()) |
466 return false; | 464 return false; |
467 if (passesAccessControlCheck(securityOrigin)) | 465 if (passesAccessControlCheck(securityOrigin)) |
468 return true; | 466 return true; |
469 return !securityOrigin->taintsCanvas(response().url()); | 467 return !securityOrigin->taintsCanvas(response().url()); |
470 } | 468 } |
471 | 469 |
472 } // namespace WebCore | 470 } // namespace WebCore |
OLD | NEW |