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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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
Index: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
index 05331497891aeca913e094cc5c3eef955420cef4..b684d23145e7f710a3dc542530b5fb9c35dae961 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
@@ -26,6 +26,7 @@
#include "platform/graphics/GraphicsContext.h"
+#include <memory>
#include "platform/geometry/FloatRect.h"
#include "platform/geometry/FloatRoundedRect.h"
#include "platform/geometry/IntRect.h"
@@ -52,7 +53,6 @@
#include "third_party/skia/include/utils/SkNullCanvas.h"
#include "wtf/Assertions.h"
#include "wtf/MathExtras.h"
-#include <memory>
namespace blink {
@@ -536,8 +536,8 @@ namespace {
sk_sp<PaintRecord> recordMarker(
GraphicsContext::DocumentMarkerLineStyle style) {
SkColor color = (style == GraphicsContext::DocumentMarkerGrammarLineStyle)
- ? SkColorSetRGB(0xC0, 0xC0, 0xC0)
- : SK_ColorRED;
+ ? SkColorSetRGB(0xC0, 0xC0, 0xC0)
+ : SK_ColorRED;
// Record the path equivalent to this legacy pattern:
// X o o X o o X
@@ -550,15 +550,12 @@ sk_sp<PaintRecord> recordMarker(
// (for optimal rasterization at native rez).
SkPath path;
path.moveTo(kW * -3 / 8, kH * 3 / 4);
- path.cubicTo(kW * -1 / 8, kH * 3 / 4,
- kW * -1 / 8, kH * 1 / 4,
- kW * 1 / 8, kH * 1 / 4);
- path.cubicTo(kW * 3 / 8, kH * 1 / 4,
- kW * 3 / 8, kH * 3 / 4,
- kW * 5 / 8, kH * 3 / 4);
- path.cubicTo(kW * 7 / 8, kH * 3 / 4,
- kW * 7 / 8, kH * 1 / 4,
- kW * 9 / 8, kH * 1 / 4);
+ path.cubicTo(kW * -1 / 8, kH * 3 / 4, kW * -1 / 8, kH * 1 / 4, kW * 1 / 8,
+ kH * 1 / 4);
+ path.cubicTo(kW * 3 / 8, kH * 1 / 4, kW * 3 / 8, kH * 3 / 4, kW * 5 / 8,
+ kH * 3 / 4);
+ path.cubicTo(kW * 7 / 8, kH * 3 / 4, kW * 7 / 8, kH * 1 / 4, kW * 9 / 8,
+ kH * 1 / 4);
PaintFlags flags;
flags.setAntiAlias(true);
@@ -578,8 +575,8 @@ sk_sp<PaintRecord> recordMarker(
sk_sp<PaintRecord> recordMarker(
GraphicsContext::DocumentMarkerLineStyle style) {
SkColor color = (style == GraphicsContext::DocumentMarkerGrammarLineStyle)
- ? SkColorSetRGB(0x6B, 0x6B, 0x6B)
- : SkColorSetRGB(0xFB, 0x2D, 0x1D);
+ ? SkColorSetRGB(0x6B, 0x6B, 0x6B)
+ : SkColorSetRGB(0xFB, 0x2D, 0x1D);
// Match the artwork used by the Mac.
static const float kW = 4;
@@ -588,16 +585,10 @@ sk_sp<PaintRecord> recordMarker(
// top->bottom translucent gradient.
const SkColor colors[2] = {
- SkColorSetARGB(0x48,
- SkColorGetR(color),
- SkColorGetG(color),
+ SkColorSetARGB(0x48, SkColorGetR(color), SkColorGetG(color),
SkColorGetB(color)),
- color
- };
- const SkPoint pts[2] = {
- SkPoint::Make(0, 0),
- SkPoint::Make(0, 2 * kR)
- };
+ color};
+ const SkPoint pts[2] = {SkPoint::Make(0, 0), SkPoint::Make(0, 2 * kR)};
PaintFlags flags;
flags.setAntiAlias(true);
@@ -627,9 +618,8 @@ void GraphicsContext::drawLineForDocumentMarker(const FloatPoint& pt,
(recordMarker(DocumentMarkerSpellingLineStyle).release()));
DEFINE_STATIC_LOCAL(PaintRecord*, grammarMarker,
(recordMarker(DocumentMarkerGrammarLineStyle).release()));
- const auto& marker = style == DocumentMarkerSpellingLineStyle
- ? spellingMarker
- : grammarMarker;
+ const auto& marker =
+ style == DocumentMarkerSpellingLineStyle ? spellingMarker : grammarMarker;
// Position already includes zoom and device scale factor.
SkScalar originX = WebCoreFloatToSkScalar(pt.x());

Powered by Google App Engine
This is Rietveld 408576698