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

Side by Side Diff: third_party/WebKit/Source/platform/testing/GeometryPrinters.cpp

Issue 2195903002: Add Double{Size, Point, Rect} pretty printers for logging and testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@geometryPrettyPrinters2
Patch Set: Remove unnecessary String casts Created 4 years, 3 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 | « third_party/WebKit/Source/platform/testing/GeometryPrinters.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/testing/GeometryPrinters.h" 5 #include "platform/testing/GeometryPrinters.h"
6 6
7 #include "platform/geometry/DoublePoint.h"
8 #include "platform/geometry/DoubleRect.h"
9 #include "platform/geometry/DoubleSize.h"
7 #include "platform/geometry/FloatBox.h" 10 #include "platform/geometry/FloatBox.h"
8 #include "platform/geometry/FloatPoint.h" 11 #include "platform/geometry/FloatPoint.h"
9 #include "platform/geometry/FloatPoint3D.h" 12 #include "platform/geometry/FloatPoint3D.h"
10 #include "platform/geometry/FloatQuad.h" 13 #include "platform/geometry/FloatQuad.h"
11 #include "platform/geometry/FloatRect.h" 14 #include "platform/geometry/FloatRect.h"
12 #include "platform/geometry/FloatSize.h" 15 #include "platform/geometry/FloatSize.h"
13 #include "platform/geometry/IntPoint.h" 16 #include "platform/geometry/IntPoint.h"
14 #include "platform/geometry/IntRect.h" 17 #include "platform/geometry/IntRect.h"
15 #include "platform/geometry/IntSize.h" 18 #include "platform/geometry/IntSize.h"
16 #include "platform/geometry/LayoutPoint.h" 19 #include "platform/geometry/LayoutPoint.h"
17 #include "platform/geometry/LayoutRect.h" 20 #include "platform/geometry/LayoutRect.h"
18 #include "platform/geometry/LayoutSize.h" 21 #include "platform/geometry/LayoutSize.h"
19 #include <ostream> // NOLINT 22 #include <ostream> // NOLINT
20 23
21 namespace blink { 24 namespace blink {
22 25
26 void PrintTo(const DoublePoint& point, std::ostream* os)
27 {
28 *os << point.toString();
29 }
30
31 void PrintTo(const DoubleRect& rect, std::ostream* os)
32 {
33 *os << rect.toString();
34 }
35
36 void PrintTo(const DoubleSize& size, std::ostream* os)
37 {
38 *os << size.toString();
39 }
40
23 void PrintTo(const FloatBox& box, std::ostream* os) 41 void PrintTo(const FloatBox& box, std::ostream* os)
24 { 42 {
25 *os << box.toString(); 43 *os << box.toString();
26 } 44 }
27 45
28 void PrintTo(const FloatPoint& point, std::ostream* os) 46 void PrintTo(const FloatPoint& point, std::ostream* os)
29 { 47 {
30 *os << point.toString(); 48 *os << point.toString();
31 } 49 }
32 50
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 { 102 {
85 *os << rect.toString(); 103 *os << rect.toString();
86 } 104 }
87 105
88 void PrintTo(const LayoutSize& size, std::ostream* os) 106 void PrintTo(const LayoutSize& size, std::ostream* os)
89 { 107 {
90 *os << size.toString(); 108 *os << size.toString();
91 } 109 }
92 110
93 } // namespace blink 111 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/testing/GeometryPrinters.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698