| OLD | NEW |
| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #include "platform/geometry/FloatPoint.h" | 29 #include "platform/geometry/FloatPoint.h" |
| 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; | |
| 39 | |
| 40 namespace blink { | 38 namespace blink { |
| 41 | 39 |
| 42 static const size_t printBufferSize = 100; // large enough for any integer or fl
oating point value in string format, including trailing null character | 40 static const size_t printBufferSize = 100; // large enough for any integer or fl
oating point value in string format, including trailing null character |
| 43 | 41 |
| 44 static inline bool hasFractions(double val) | 42 static inline bool hasFractions(double val) |
| 45 { | 43 { |
| 46 static const double s_epsilon = 0.0001; | 44 static const double s_epsilon = 0.0001; |
| 47 int ival = static_cast<int>(val); | 45 int ival = static_cast<int>(val); |
| 48 double dval = static_cast<double>(ival); | 46 double dval = static_cast<double>(ival); |
| 49 return fabs(val - dval) > s_epsilon; | 47 return fabs(val - dval) > s_epsilon; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 return ts; | 169 return ts; |
| 172 } | 170 } |
| 173 | 171 |
| 174 void writeIndent(TextStream& ts, int indent) | 172 void writeIndent(TextStream& ts, int indent) |
| 175 { | 173 { |
| 176 for (int i = 0; i != indent; ++i) | 174 for (int i = 0; i != indent; ++i) |
| 177 ts << " "; | 175 ts << " "; |
| 178 } | 176 } |
| 179 | 177 |
| 180 } | 178 } |
| OLD | NEW |