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 16 matching lines...) Expand all Loading... |
27 #include "RuntimeEnabledFeatures.h" | 27 #include "RuntimeEnabledFeatures.h" |
28 #include "core/fetch/ImageResourceClient.h" | 28 #include "core/fetch/ImageResourceClient.h" |
29 #include "core/fetch/MemoryCache.h" | 29 #include "core/fetch/MemoryCache.h" |
30 #include "core/fetch/ResourceClient.h" | 30 #include "core/fetch/ResourceClient.h" |
31 #include "core/fetch/ResourceClientWalker.h" | 31 #include "core/fetch/ResourceClientWalker.h" |
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/TraceEvent.h" |
37 #include "platform/graphics/BitmapImage.h" | 38 #include "platform/graphics/BitmapImage.h" |
38 #include "wtf/CurrentTime.h" | 39 #include "wtf/CurrentTime.h" |
39 #include "wtf/StdLibExtras.h" | 40 #include "wtf/StdLibExtras.h" |
40 #include "wtf/Vector.h" | 41 #include "wtf/Vector.h" |
41 | 42 |
42 namespace WebCore { | 43 namespace WebCore { |
43 | 44 |
44 ImageResource::ImageResource(const ResourceRequest& resourceRequest) | 45 ImageResource::ImageResource(const ResourceRequest& resourceRequest) |
45 : Resource(resourceRequest, Image) | 46 : Resource(resourceRequest, Image) |
46 , m_devicePixelRatioHeaderValue(1.0) | 47 , m_devicePixelRatioHeaderValue(1.0) |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin) | 468 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin) |
468 { | 469 { |
469 if (!image()->currentFrameHasSingleSecurityOrigin()) | 470 if (!image()->currentFrameHasSingleSecurityOrigin()) |
470 return false; | 471 return false; |
471 if (passesAccessControlCheck(securityOrigin)) | 472 if (passesAccessControlCheck(securityOrigin)) |
472 return true; | 473 return true; |
473 return !securityOrigin->taintsCanvas(response().url()); | 474 return !securityOrigin->taintsCanvas(response().url()); |
474 } | 475 } |
475 | 476 |
476 } // namespace WebCore | 477 } // namespace WebCore |
OLD | NEW |