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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp

Issue 2940933003: DO NOT SUBMIT results of new clang-format (Closed)
Patch Set: Created 3 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) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights 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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 namespace { 366 namespace {
367 367
368 int AdjustedFocusRingOffset(int offset) { 368 int AdjustedFocusRingOffset(int offset) {
369 #if OS(MACOSX) 369 #if OS(MACOSX)
370 return offset + 2; 370 return offset + 2;
371 #else 371 #else
372 return 0; 372 return 0;
373 #endif 373 #endif
374 } 374 }
375 375
376 } // anonymous ns 376 } // namespace
377 377
378 int GraphicsContext::FocusRingOutsetExtent(int offset, int width) { 378 int GraphicsContext::FocusRingOutsetExtent(int offset, int width) {
379 // Unlike normal outlines (whole width is outside of the offset), focus 379 // Unlike normal outlines (whole width is outside of the offset), focus
380 // rings are drawn with the center of the path aligned with the offset, so 380 // rings are drawn with the center of the path aligned with the offset, so
381 // only half of the width is outside of the offset. 381 // only half of the width is outside of the offset.
382 return AdjustedFocusRingOffset(offset) + (width + 1) / 2; 382 return AdjustedFocusRingOffset(offset) + (width + 1) / 2;
383 } 383 }
384 384
385 void GraphicsContext::DrawFocusRingPath(const SkPath& path, 385 void GraphicsContext::DrawFocusRingPath(const SkPath& path,
386 const Color& color, 386 const Color& color,
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 output = *input; 1341 output = *input;
1342 if (output.getSkShader()) { 1342 if (output.getSkShader()) {
1343 output.setColorFilter(high_contrast_filter_); 1343 output.setColorFilter(high_contrast_filter_);
1344 } else { 1344 } else {
1345 output.setColor(high_contrast_filter_->filterColor(output.getColor())); 1345 output.setColor(high_contrast_filter_->filterColor(output.getColor()));
1346 } 1346 }
1347 return output; 1347 return output;
1348 } 1348 }
1349 1349
1350 } // namespace blink 1350 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698