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

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

Issue 1180573003: Add option to dump line box tree when dumping layout tree. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: pointers->references Created 5 years, 6 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/core/layout/LayoutTreeAsText.cpp ('k') | Source/platform/text/TextStream.cpp » ('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 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2008 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 21 matching lines...) Expand all
32 #include "wtf/text/StringBuilder.h" 32 #include "wtf/text/StringBuilder.h"
33 #include "wtf/unicode/Unicode.h" 33 #include "wtf/unicode/Unicode.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 class IntPoint; 37 class IntPoint;
38 class IntRect; 38 class IntRect;
39 class FloatPoint; 39 class FloatPoint;
40 class FloatRect; 40 class FloatRect;
41 class FloatSize; 41 class FloatSize;
42 class LayoutUnit;
43 class LayoutPoint;
44 class LayoutRect;
45 class LayoutSize;
42 46
43 class PLATFORM_EXPORT TextStream { 47 class PLATFORM_EXPORT TextStream {
44 public: 48 public:
45 struct FormatNumberRespectingIntegers { 49 struct FormatNumberRespectingIntegers {
46 FormatNumberRespectingIntegers(double number) : value(number) { } 50 FormatNumberRespectingIntegers(double number) : value(number) { }
47 double value; 51 double value;
48 }; 52 };
49 53
50 TextStream& operator<<(bool); 54 TextStream& operator<<(bool);
51 TextStream& operator<<(int); 55 TextStream& operator<<(int);
(...skipping 13 matching lines...) Expand all
65 69
66 private: 70 private:
67 StringBuilder m_text; 71 StringBuilder m_text;
68 }; 72 };
69 73
70 PLATFORM_EXPORT TextStream& operator<<(TextStream&, const IntPoint&); 74 PLATFORM_EXPORT TextStream& operator<<(TextStream&, const IntPoint&);
71 PLATFORM_EXPORT TextStream& operator<<(TextStream&, const IntRect&); 75 PLATFORM_EXPORT TextStream& operator<<(TextStream&, const IntRect&);
72 PLATFORM_EXPORT TextStream& operator<<(TextStream&, const FloatPoint&); 76 PLATFORM_EXPORT TextStream& operator<<(TextStream&, const FloatPoint&);
73 PLATFORM_EXPORT TextStream& operator<<(TextStream&, const FloatSize&); 77 PLATFORM_EXPORT TextStream& operator<<(TextStream&, const FloatSize&);
74 PLATFORM_EXPORT TextStream& operator<<(TextStream&, const FloatRect&); 78 PLATFORM_EXPORT TextStream& operator<<(TextStream&, const FloatRect&);
79 PLATFORM_EXPORT TextStream& operator<<(TextStream&, const LayoutUnit&);
80 PLATFORM_EXPORT TextStream& operator<<(TextStream&, const LayoutPoint&);
81 PLATFORM_EXPORT TextStream& operator<<(TextStream&, const LayoutRect&);
82 PLATFORM_EXPORT TextStream& operator<<(TextStream&, const LayoutSize&);
75 83
76 PLATFORM_EXPORT void writeIndent(TextStream&, int indent); 84 PLATFORM_EXPORT void writeIndent(TextStream&, int indent);
77 85
78 template<typename Item> 86 template<typename Item>
79 TextStream& operator<<(TextStream& ts, const Vector<Item>& vector) 87 TextStream& operator<<(TextStream& ts, const Vector<Item>& vector)
80 { 88 {
81 ts << "["; 89 ts << "[";
82 90
83 unsigned size = vector.size(); 91 unsigned size = vector.size();
84 for (unsigned i = 0; i < size; ++i) { 92 for (unsigned i = 0; i < size; ++i) {
85 ts << vector[i]; 93 ts << vector[i];
86 if (i < size - 1) 94 if (i < size - 1)
87 ts << ", "; 95 ts << ", ";
88 } 96 }
89 97
90 ts << "]"; 98 ts << "]";
91 return ts; 99 return ts;
92 } 100 }
93 101
94 } 102 }
95 103
96 #endif 104 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutTreeAsText.cpp ('k') | Source/platform/text/TextStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698