Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Side by Side Diff: Source/WebCore/html/canvas/CanvasRenderingContext.cpp

Issue 13814002: First part of work to move V8 binding integrity off of vtables. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 21 matching lines...) Expand all
32 #include "HTMLImageElement.h" 32 #include "HTMLImageElement.h"
33 #include "HTMLVideoElement.h" 33 #include "HTMLVideoElement.h"
34 #include "KURL.h" 34 #include "KURL.h"
35 #include "SecurityOrigin.h" 35 #include "SecurityOrigin.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 } 43 }
43 44
44 bool CanvasRenderingContext::wouldTaintOrigin(const CanvasPattern* pattern) 45 bool CanvasRenderingContext::wouldTaintOrigin(const CanvasPattern* pattern)
45 { 46 {
46 if (canvas()->originClean() && pattern && !pattern->originClean()) 47 if (canvas()->originClean() && pattern && !pattern->originClean())
47 return true; 48 return true;
48 return false; 49 return false;
49 } 50 }
50 51
51 bool CanvasRenderingContext::wouldTaintOrigin(const HTMLCanvasElement* sourceCan vas) 52 bool CanvasRenderingContext::wouldTaintOrigin(const HTMLCanvasElement* sourceCan vas)
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return false; 106 return false;
106 } 107 }
107 108
108 void CanvasRenderingContext::checkOrigin(const KURL& url) 109 void CanvasRenderingContext::checkOrigin(const KURL& url)
109 { 110 {
110 if (wouldTaintOrigin(url)) 111 if (wouldTaintOrigin(url))
111 canvas()->setOriginTainted(); 112 canvas()->setOriginTainted();
112 } 113 }
113 114
114 } // namespace WebCore 115 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/html/ValidityState.h ('k') | Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698