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

Side by Side Diff: Source/platform/text/TextStream.cpp

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/text/TextStream.h ('k') | Source/platform/text/UnicodeBidi.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2008, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 19 matching lines...) Expand all
30 #include "platform/geometry/FloatRect.h" 30 #include "platform/geometry/FloatRect.h"
31 #include "platform/geometry/FloatSize.h" 31 #include "platform/geometry/FloatSize.h"
32 #include "platform/geometry/IntPoint.h" 32 #include "platform/geometry/IntPoint.h"
33 #include "platform/geometry/IntRect.h" 33 #include "platform/geometry/IntRect.h"
34 #include "wtf/MathExtras.h" 34 #include "wtf/MathExtras.h"
35 #include "wtf/StringExtras.h" 35 #include "wtf/StringExtras.h"
36 #include "wtf/text/WTFString.h" 36 #include "wtf/text/WTFString.h"
37 37
38 using namespace std; 38 using namespace std;
39 39
40 namespace WebCore { 40 namespace blink {
41 41
42 static const size_t printBufferSize = 100; // large enough for any integer or fl oating point value in string format, including trailing null character 42 static const size_t printBufferSize = 100; // large enough for any integer or fl oating point value in string format, including trailing null character
43 43
44 static inline bool hasFractions(double val) 44 static inline bool hasFractions(double val)
45 { 45 {
46 static const double s_epsilon = 0.0001; 46 static const double s_epsilon = 0.0001;
47 int ival = static_cast<int>(val); 47 int ival = static_cast<int>(val);
48 double dval = static_cast<double>(ival); 48 double dval = static_cast<double>(ival);
49 return fabs(val - dval) > s_epsilon; 49 return fabs(val - dval) > s_epsilon;
50 } 50 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return ts; 171 return ts;
172 } 172 }
173 173
174 void writeIndent(TextStream& ts, int indent) 174 void writeIndent(TextStream& ts, int indent)
175 { 175 {
176 for (int i = 0; i != indent; ++i) 176 for (int i = 0; i != indent; ++i)
177 ts << " "; 177 ts << " ";
178 } 178 }
179 179
180 } 180 }
OLDNEW
« no previous file with comments | « Source/platform/text/TextStream.h ('k') | Source/platform/text/UnicodeBidi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698