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

Unified Diff: Source/platform/text/TextStream.h

Issue 54803002: Centralize TextStream functions to remove RenderTreeAsText dependency of the filters (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/graphics/filters/SVGFEImage.cpp ('k') | Source/platform/text/TextStream.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/text/TextStream.h
diff --git a/Source/platform/text/TextStream.h b/Source/platform/text/TextStream.h
index d7ecf1c2ed8d0dfcb7baac8cd599de475e4e54ae..9e0c12c43b332d1ae03538546e345d6c162fdf69 100644
--- a/Source/platform/text/TextStream.h
+++ b/Source/platform/text/TextStream.h
@@ -28,11 +28,19 @@
#include "platform/PlatformExport.h"
#include "wtf/Forward.h"
+#include "wtf/Vector.h"
#include "wtf/text/StringBuilder.h"
#include "wtf/unicode/Unicode.h"
namespace WebCore {
+class IntPoint;
+class IntRect;
+class LayoutPoint;
+class FloatPoint;
+class FloatRect;
+class FloatSize;
+
class PLATFORM_EXPORT TextStream {
public:
struct FormatNumberRespectingIntegers {
@@ -60,6 +68,30 @@ private:
StringBuilder m_text;
};
+PLATFORM_EXPORT TextStream& operator<<(TextStream&, const IntPoint&);
+PLATFORM_EXPORT TextStream& operator<<(TextStream&, const IntRect&);
+PLATFORM_EXPORT TextStream& operator<<(TextStream&, const FloatPoint&);
+PLATFORM_EXPORT TextStream& operator<<(TextStream&, const FloatSize&);
+PLATFORM_EXPORT TextStream& operator<<(TextStream&, const FloatRect&);
+
+PLATFORM_EXPORT void writeIndent(TextStream&, int indent);
+
+template<typename Item>
+TextStream& operator<<(TextStream& ts, const Vector<Item>& vector)
+{
+ ts << "[";
+
+ unsigned size = vector.size();
+ for (unsigned i = 0; i < size; ++i) {
+ ts << vector[i];
+ if (i < size - 1)
+ ts << ", ";
+ }
+
+ ts << "]";
+ return ts;
+}
+
}
#endif
« no previous file with comments | « Source/core/svg/graphics/filters/SVGFEImage.cpp ('k') | Source/platform/text/TextStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698