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

Unified Diff: Source/WebCore/html/canvas/CanvasRenderingContext.h

Issue 7171012: Merge 88489 - 2011-06-09 Kenneth Russell <kbr@google.com> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebCore/html/canvas/CanvasRenderingContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/canvas/CanvasRenderingContext.h
===================================================================
--- Source/WebCore/html/canvas/CanvasRenderingContext.h (revision 88897)
+++ Source/WebCore/html/canvas/CanvasRenderingContext.h (working copy)
@@ -63,15 +63,22 @@
protected:
CanvasRenderingContext(HTMLCanvasElement*);
- void checkOrigin(const CanvasPattern*);
- void checkOrigin(const HTMLCanvasElement*);
- void checkOrigin(const HTMLImageElement*);
- void checkOrigin(const HTMLVideoElement*);
+ bool wouldTaintOrigin(const CanvasPattern*);
+ bool wouldTaintOrigin(const HTMLCanvasElement*);
+ bool wouldTaintOrigin(const HTMLImageElement*);
+ bool wouldTaintOrigin(const HTMLVideoElement*);
+ bool wouldTaintOrigin(const KURL&);
+
+ template<class T> void checkOrigin(const T* arg)
+ {
+ if (wouldTaintOrigin(arg))
+ canvas()->setOriginTainted();
+ }
void checkOrigin(const KURL&);
private:
HTMLCanvasElement* m_canvas;
- HashSet<String> m_cleanOrigins;
+ HashSet<String> m_cleanURLs;
};
} // namespace WebCore
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebCore/html/canvas/CanvasRenderingContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698