OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "CanvasRenderingContext.h" | 27 #include "CanvasRenderingContext.h" |
28 | 28 |
29 #include "CachedImage.h" | 29 #include "CachedImage.h" |
30 #include "CanvasPattern.h" | 30 #include "CanvasPattern.h" |
31 #include "HTMLCanvasElement.h" | 31 #include "HTMLCanvasElement.h" |
32 #include "HTMLImageElement.h" | 32 #include "HTMLImageElement.h" |
33 #include "HTMLVideoElement.h" | 33 #include "HTMLVideoElement.h" |
34 #include "KURL.h" | |
35 #include "SecurityOrigin.h" | 34 #include "SecurityOrigin.h" |
| 35 #include "core/platform/KURL.h" |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 CanvasRenderingContext::CanvasRenderingContext(HTMLCanvasElement* canvas) | 39 CanvasRenderingContext::CanvasRenderingContext(HTMLCanvasElement* canvas) |
40 : m_canvas(canvas) | 40 : m_canvas(canvas) |
41 { | 41 { |
42 ScriptWrappable::init(this); | 42 ScriptWrappable::init(this); |
43 } | 43 } |
44 | 44 |
45 bool CanvasRenderingContext::wouldTaintOrigin(const CanvasPattern* pattern) | 45 bool CanvasRenderingContext::wouldTaintOrigin(const CanvasPattern* pattern) |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 return false; | 101 return false; |
102 } | 102 } |
103 | 103 |
104 void CanvasRenderingContext::checkOrigin(const KURL& url) | 104 void CanvasRenderingContext::checkOrigin(const KURL& url) |
105 { | 105 { |
106 if (wouldTaintOrigin(url)) | 106 if (wouldTaintOrigin(url)) |
107 canvas()->setOriginTainted(); | 107 canvas()->setOriginTainted(); |
108 } | 108 } |
109 | 109 |
110 } // namespace WebCore | 110 } // namespace WebCore |
OLD | NEW |