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 16 matching lines...) Expand all Loading... |
27 | 27 |
28 #include "platform/LayoutUnit.h" | 28 #include "platform/LayoutUnit.h" |
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 "platform/geometry/LayoutPoint.h" | 34 #include "platform/geometry/LayoutPoint.h" |
35 #include "platform/geometry/LayoutRect.h" | 35 #include "platform/geometry/LayoutRect.h" |
36 #include "platform/geometry/LayoutSize.h" | 36 #include "platform/geometry/LayoutSize.h" |
37 #include "wtf/MathExtras.h" | 37 #include "platform/wtf/MathExtras.h" |
38 #include "wtf/StringExtras.h" | 38 #include "platform/wtf/StringExtras.h" |
39 #include "wtf/text/WTFString.h" | 39 #include "platform/wtf/text/WTFString.h" |
40 | 40 |
41 namespace blink { | 41 namespace blink { |
42 | 42 |
43 // large enough for any integer or floating point value in string format, | 43 // large enough for any integer or floating point value in string format, |
44 // including trailing null character | 44 // including trailing null character |
45 static const size_t printBufferSize = 100; | 45 static const size_t printBufferSize = 100; |
46 | 46 |
47 static inline bool hasFractions(double val) { | 47 static inline bool hasFractions(double val) { |
48 // We use 0.011 to more than match the number of significant digits we print | 48 // We use 0.011 to more than match the number of significant digits we print |
49 // out when dumping the render tree. | 49 // out when dumping the render tree. |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 TextStream& operator<<(TextStream& ts, const LayoutSize& size) { | 173 TextStream& operator<<(TextStream& ts, const LayoutSize& size) { |
174 return ts << FloatSize(size); | 174 return ts << FloatSize(size); |
175 } | 175 } |
176 | 176 |
177 void writeIndent(TextStream& ts, int indent) { | 177 void writeIndent(TextStream& ts, int indent) { |
178 for (int i = 0; i != indent; ++i) | 178 for (int i = 0; i != indent; ++i) |
179 ts << " "; | 179 ts << " "; |
180 } | 180 } |
181 | 181 |
182 } // namespace blink | 182 } // namespace blink |
OLD | NEW |