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

Side by Side Diff: third_party/WebKit/Source/platform/geometry/DoubleSize.h

Issue 2267183003: Switch from PrintTo to operator<< for platform printers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef DoubleSize_h 5 #ifndef DoubleSize_h
6 #define DoubleSize_h 6 #define DoubleSize_h
7 7
8 #include "platform/geometry/FloatSize.h" 8 #include "platform/geometry/FloatSize.h"
9 #include "platform/geometry/IntSize.h" 9 #include "platform/geometry/IntSize.h"
10 #include "wtf/Allocator.h" 10 #include "wtf/Allocator.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 inline IntSize expandedIntSize(const DoubleSize& p) 104 inline IntSize expandedIntSize(const DoubleSize& p)
105 { 105 {
106 return IntSize(clampTo<int>(ceilf(p.width())), clampTo<int>(ceilf(p.height() ))); 106 return IntSize(clampTo<int>(ceilf(p.width())), clampTo<int>(ceilf(p.height() )));
107 } 107 }
108 108
109 inline FloatSize toFloatSize(const DoubleSize& p) 109 inline FloatSize toFloatSize(const DoubleSize& p)
110 { 110 {
111 return FloatSize(p.width(), p.height()); 111 return FloatSize(p.width(), p.height());
112 } 112 }
113 113
114 // Redeclared here to avoid ODR issues. 114 PLATFORM_EXPORT std::ostream& operator<<(std::ostream&, const DoubleSize&);
115 // See platform/testing/GeometryPrinters.h.
116 void PrintTo(const DoubleSize&, std::ostream*);
117 115
118 } // namespace blink 116 } // namespace blink
119 117
120 #endif // DoubleSize_h 118 #endif // DoubleSize_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/geometry/DoubleRect.cpp ('k') | third_party/WebKit/Source/platform/geometry/DoubleSize.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698