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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h

Issue 2806803003: Make OffscreenCanvas WebGL(2) context consider taintedness of image source (Closed)
Patch Set: rebase Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 TreeScope* GetTreeScope() override; 152 TreeScope* GetTreeScope() override;
153 void ResourceContentChanged() override; 153 void ResourceContentChanged() override;
154 void ResourceElementChanged() override; 154 void ResourceElementChanged() override;
155 155
156 void UpdateFilterReferences(const FilterOperations&); 156 void UpdateFilterReferences(const FilterOperations&);
157 void ClearFilterReferences(); 157 void ClearFilterReferences();
158 158
159 // BaseRenderingContext2D implementation 159 // BaseRenderingContext2D implementation
160 bool OriginClean() const final; 160 bool OriginClean() const final;
161 void SetOriginTainted() final; 161 void SetOriginTainted() final;
162 bool WouldTaintOrigin(CanvasImageSource* source, ExecutionContext*) final { 162 bool WouldTaintOrigin(CanvasImageSource* source,
163 return CanvasRenderingContext::WouldTaintOrigin(source); 163 ExecutionContext* execution_context) final {
164 return CanvasRenderingContext::WouldTaintOrigin(
165 source, execution_context->GetSecurityOrigin());
164 } 166 }
165 167
166 int Width() const final; 168 int Width() const final;
167 int Height() const final; 169 int Height() const final;
168 170
169 bool HasImageBuffer() const final; 171 bool HasImageBuffer() const final;
170 ImageBuffer* GetImageBuffer() const final; 172 ImageBuffer* GetImageBuffer() const final;
171 173
172 bool ParseColorOrCurrentColor(Color&, const String& color_string) const final; 174 bool ParseColorOrCurrentColor(Color&, const String& color_string) const final;
173 175
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 268
267 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, 269 DEFINE_TYPE_CASTS(CanvasRenderingContext2D,
268 CanvasRenderingContext, 270 CanvasRenderingContext,
269 context, 271 context,
270 context->Is2d() && context->canvas(), 272 context->Is2d() && context->canvas(),
271 context.Is2d() && context.canvas()); 273 context.Is2d() && context.canvas());
272 274
273 } // namespace blink 275 } // namespace blink
274 276
275 #endif // CanvasRenderingContext2D_h 277 #endif // CanvasRenderingContext2D_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698