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

Side by Side Diff: third_party/WebKit/Source/platform/geometry/FloatSize.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 /* 1 /*
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2005 Nokia. All rights reserved. 3 * Copyright (C) 2005 Nokia. All rights reserved.
4 * 2008 Eric Seidel <eric@webkit.org> 4 * 2008 Eric Seidel <eric@webkit.org>
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 inline IntSize expandedIntSize(const FloatSize& p) 203 inline IntSize expandedIntSize(const FloatSize& p)
204 { 204 {
205 return IntSize(clampTo<int>(ceilf(p.width())), clampTo<int>(ceilf(p.height() ))); 205 return IntSize(clampTo<int>(ceilf(p.width())), clampTo<int>(ceilf(p.height() )));
206 } 206 }
207 207
208 inline IntPoint flooredIntPoint(const FloatSize& p) 208 inline IntPoint flooredIntPoint(const FloatSize& p)
209 { 209 {
210 return IntPoint(clampTo<int>(floorf(p.width())), clampTo<int>(floorf(p.heigh t()))); 210 return IntPoint(clampTo<int>(floorf(p.width())), clampTo<int>(floorf(p.heigh t())));
211 } 211 }
212 212
213 // Redeclared here to avoid ODR issues. 213 PLATFORM_EXPORT std::ostream& operator<<(std::ostream&, const FloatSize&);
214 // See platform/testing/GeometryPrinters.h.
215 void PrintTo(const FloatSize&, std::ostream*);
216 214
217 } // namespace blink 215 } // namespace blink
218 216
219 #endif // FloatSize_h 217 #endif // FloatSize_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698