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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebCore/html/canvas/CanvasRenderingContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 virtual void paintRenderingResultsToCanvas() {} 57 virtual void paintRenderingResultsToCanvas() {}
58 virtual bool paintsIntoCanvasBuffer() const { return true; } 58 virtual bool paintsIntoCanvasBuffer() const { return true; }
59 59
60 #if USE(ACCELERATED_COMPOSITING) 60 #if USE(ACCELERATED_COMPOSITING)
61 virtual PlatformLayer* platformLayer() const { return 0; } 61 virtual PlatformLayer* platformLayer() const { return 0; }
62 #endif 62 #endif
63 63
64 protected: 64 protected:
65 CanvasRenderingContext(HTMLCanvasElement*); 65 CanvasRenderingContext(HTMLCanvasElement*);
66 void checkOrigin(const CanvasPattern*); 66 bool wouldTaintOrigin(const CanvasPattern*);
67 void checkOrigin(const HTMLCanvasElement*); 67 bool wouldTaintOrigin(const HTMLCanvasElement*);
68 void checkOrigin(const HTMLImageElement*); 68 bool wouldTaintOrigin(const HTMLImageElement*);
69 void checkOrigin(const HTMLVideoElement*); 69 bool wouldTaintOrigin(const HTMLVideoElement*);
70 bool wouldTaintOrigin(const KURL&);
71
72 template<class T> void checkOrigin(const T* arg)
73 {
74 if (wouldTaintOrigin(arg))
75 canvas()->setOriginTainted();
76 }
70 void checkOrigin(const KURL&); 77 void checkOrigin(const KURL&);
71 78
72 private: 79 private:
73 HTMLCanvasElement* m_canvas; 80 HTMLCanvasElement* m_canvas;
74 HashSet<String> m_cleanOrigins; 81 HashSet<String> m_cleanURLs;
75 }; 82 };
76 83
77 } // namespace WebCore 84 } // namespace WebCore
78 85
79 #endif 86 #endif
OLDNEW
« 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