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

Side by Side Diff: Source/core/html/canvas/CanvasStyle.cpp

Issue 16357011: Remove support for -webkit-color-correction (which we've never supported on (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: resolve merge conflicts, obey brace style changes Created 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 && k == m_cmyka.k 216 && k == m_cmyka.k
217 && a == m_cmyka.a; 217 && a == m_cmyka.a;
218 } 218 }
219 219
220 void CanvasStyle::applyStrokeColor(GraphicsContext* context) 220 void CanvasStyle::applyStrokeColor(GraphicsContext* context)
221 { 221 {
222 if (!context) 222 if (!context)
223 return; 223 return;
224 switch (m_type) { 224 switch (m_type) {
225 case RGBA: 225 case RGBA:
226 context->setStrokeColor(m_rgba, ColorSpaceDeviceRGB); 226 context->setStrokeColor(m_rgba);
227 break; 227 break;
228 case CMYKA: { 228 case CMYKA: {
229 // FIXME: Do this through platform-independent GraphicsContext API. 229 // FIXME: Do this through platform-independent GraphicsContext API.
230 // We'll need a fancier Color abstraction to support CMYKA correctly 230 // We'll need a fancier Color abstraction to support CMYKA correctly
231 context->setStrokeColor(m_rgba, ColorSpaceDeviceRGB); 231 context->setStrokeColor(m_rgba);
232 break; 232 break;
233 } 233 }
234 case Gradient: 234 case Gradient:
235 context->setStrokeGradient(canvasGradient()->gradient()); 235 context->setStrokeGradient(canvasGradient()->gradient());
236 break; 236 break;
237 case ImagePattern: 237 case ImagePattern:
238 context->setStrokePattern(canvasPattern()->pattern()); 238 context->setStrokePattern(canvasPattern()->pattern());
239 break; 239 break;
240 case CurrentColor: 240 case CurrentColor:
241 case CurrentColorWithOverrideAlpha: 241 case CurrentColorWithOverrideAlpha:
242 ASSERT_NOT_REACHED(); 242 ASSERT_NOT_REACHED();
243 break; 243 break;
244 } 244 }
245 } 245 }
246 246
247 void CanvasStyle::applyFillColor(GraphicsContext* context) 247 void CanvasStyle::applyFillColor(GraphicsContext* context)
248 { 248 {
249 if (!context) 249 if (!context)
250 return; 250 return;
251 switch (m_type) { 251 switch (m_type) {
252 case RGBA: 252 case RGBA:
253 context->setFillColor(m_rgba, ColorSpaceDeviceRGB); 253 context->setFillColor(m_rgba);
254 break; 254 break;
255 case CMYKA: { 255 case CMYKA: {
256 // FIXME: Do this through platform-independent GraphicsContext API. 256 // FIXME: Do this through platform-independent GraphicsContext API.
257 // We'll need a fancier Color abstraction to support CMYKA correctly 257 // We'll need a fancier Color abstraction to support CMYKA correctly
258 context->setFillColor(m_rgba, ColorSpaceDeviceRGB); 258 context->setFillColor(m_rgba);
259 break; 259 break;
260 } 260 }
261 case Gradient: 261 case Gradient:
262 context->setFillGradient(canvasGradient()->gradient()); 262 context->setFillGradient(canvasGradient()->gradient());
263 break; 263 break;
264 case ImagePattern: 264 case ImagePattern:
265 context->setFillPattern(canvasPattern()->pattern()); 265 context->setFillPattern(canvasPattern()->pattern());
266 break; 266 break;
267 case CurrentColor: 267 case CurrentColor:
268 case CurrentColorWithOverrideAlpha: 268 case CurrentColorWithOverrideAlpha:
269 ASSERT_NOT_REACHED(); 269 ASSERT_NOT_REACHED();
270 break; 270 break;
271 } 271 }
272 } 272 }
273 273
274 } 274 }
OLDNEW
« no previous file with comments | « Source/core/html/canvas/CanvasRenderingContext2D.cpp ('k') | Source/core/inspector/InspectorOverlay.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698