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 "core/html/canvas/CanvasRenderingContext.h" | 27 #include "core/html/canvas/CanvasRenderingContext.h" |
28 | 28 |
29 #include "core/html/HTMLCanvasElement.h" | 29 #include "core/html/HTMLCanvasElement.h" |
30 #include "core/html/HTMLImageElement.h" | 30 #include "core/html/HTMLImageElement.h" |
31 #include "core/html/HTMLVideoElement.h" | 31 #include "core/html/HTMLVideoElement.h" |
32 #include "core/html/canvas/CanvasPattern.h" | 32 #include "core/html/canvas/CanvasPattern.h" |
33 #include "core/loader/cache/CachedImage.h" | 33 #include "core/loader/cache/CachedImage.h" |
34 #include "core/platform/KURL.h" | |
35 #include "weborigin/SecurityOrigin.h" | 34 #include "weborigin/SecurityOrigin.h" |
36 | 35 |
37 namespace WebCore { | 36 namespace WebCore { |
38 | 37 |
39 CanvasRenderingContext::CanvasRenderingContext(HTMLCanvasElement* canvas) | 38 CanvasRenderingContext::CanvasRenderingContext(HTMLCanvasElement* canvas) |
40 : m_canvas(canvas) | 39 : m_canvas(canvas) |
41 { | 40 { |
42 ScriptWrappable::init(this); | 41 ScriptWrappable::init(this); |
43 } | 42 } |
44 | 43 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 return false; | 100 return false; |
102 } | 101 } |
103 | 102 |
104 void CanvasRenderingContext::checkOrigin(const KURL& url) | 103 void CanvasRenderingContext::checkOrigin(const KURL& url) |
105 { | 104 { |
106 if (wouldTaintOrigin(url)) | 105 if (wouldTaintOrigin(url)) |
107 canvas()->setOriginTainted(); | 106 canvas()->setOriginTainted(); |
108 } | 107 } |
109 | 108 |
110 } // namespace WebCore | 109 } // namespace WebCore |
OLD | NEW |