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

Side by Side Diff: third_party/WebKit/Source/platform/geometry/DoubleRect.cpp

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 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/geometry/DoubleRect.h" 5 #include "platform/geometry/DoubleRect.h"
6 6
7 #include "platform/geometry/FloatRect.h" 7 #include "platform/geometry/FloatRect.h"
8 #include "platform/geometry/IntRect.h" 8 #include "platform/geometry/IntRect.h"
9 #include "platform/geometry/LayoutRect.h" 9 #include "platform/geometry/LayoutRect.h"
10 #include "wtf/text/WTFString.h" 10 #include "wtf/text/WTFString.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 m_location.setY(y() * sy); 52 m_location.setY(y() * sy);
53 m_size.setWidth(width() * sx); 53 m_size.setWidth(width() * sx);
54 m_size.setHeight(height() * sy); 54 m_size.setHeight(height() * sy);
55 } 55 }
56 56
57 String DoubleRect::toString() const 57 String DoubleRect::toString() const
58 { 58 {
59 return String::format("%s %s", location().toString().ascii().data(), size(). toString().ascii().data()); 59 return String::format("%s %s", location().toString().ascii().data(), size(). toString().ascii().data());
60 } 60 }
61 61
62 std::ostream& operator<<(std::ostream& ostream, const DoubleRect& rect)
63 {
64 return ostream << rect.toString();
65 }
66
62 } // namespace blink 67 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/geometry/DoubleRect.h ('k') | third_party/WebKit/Source/platform/geometry/DoubleSize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698