Commit ce3521b1 authored by zandobersek@gmail.com's avatar zandobersek@gmail.com
Browse files

Move writeIndent, overloaded << operators from RenderTreeAsText to TextStream

https://bugs.webkit.org/show_bug.cgi?id=116012

Reviewed by Simon Fraser.

The writeIndent method and overloaded << operators for writing out vectors and points and rectangles
of various types are not specific to the render tree nor do they depend on any rendering-specific interface.

* page/scrolling/ScrollingStateNode.cpp:
* page/scrolling/ScrollingStateNode.h:
(ScrollingStateNode): Remove the writeIndent declaration, it's functionally the same as the TextStream method.
* platform/graphics/GraphicsLayer.cpp:
* platform/graphics/GraphicsLayer.h:
(GraphicsLayer): Ditto.
* platform/graphics/filters/DistantLightSource.cpp: Remove the RenderTreeAsText.h inclusion or replace it with
the inclusion of the TextStream.h header where required. The writeIndent method is now declared there.
* platform/graphics/filters/FEBlend.cpp: Ditto.
* platform/graphics/filters/FEColorMatrix.cpp: Ditto.
* platform/graphics/filters/FEComponentTransfer.cpp: Ditto.
* platform/graphics/filters/FEComposite.cpp: Ditto.
* platform/graphics/filters/FEConvolveMatrix.cpp: Ditto.
* platform/graphics/filters/FECustomFilter.cpp: Ditto.
* platform/graphics/filters/FEDiffuseLighting.cpp: Ditto.
* platform/graphics/filters/FEDisplacementMap.cpp: Ditto.
* platform/graphics/filters/FEDropShadow.cpp: Ditto.
* platform/graphics/filters/FEFlood.cpp: Ditto.
* platform/graphics/filters/FEGaussianBlur.cpp: Ditto.
* platform/graphics/filters/FEMerge.cpp: Ditto.
* platform/graphics/filters/FEMorphology.cpp: Ditto.
* platform/graphics/filters/FEOffset.cpp: Ditto.
* platform/graphics/filters/FESpecularLighting.cpp: Ditto.
* platform/graphics/filters/FETurbulence.cpp: Ditto.
* platform/graphics/filters/SourceAlpha.cpp: Ditto.
* platform/graphics/filters/SourceGraphic.cpp: Ditto.
* platform/text/TextStream.cpp: Move the writeIndent and operators' definitions here.
(WebCore::operator<<):
(WebCore):
(WebCore::writeIndent):
* platform/text/TextStream.h: Move the writeIndent and operators' declarations here.
(WebCore):
(TextStream):
(WebCore::TextStream::operator<<):
* rendering/RenderTreeAsText.cpp: Move the writeIndent and operators' definitions into TextStream.
(WebCore):
* rendering/RenderTreeAsText.h: Move the writeIndent and operators' declarations into TextStream.
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 057623df
2013-10-29 Zan Dobersek <zdobersek@igalia.com>
Move writeIndent, overloaded << operators from RenderTreeAsText to TextStream
https://bugs.webkit.org/show_bug.cgi?id=116012
Reviewed by Simon Fraser.
The writeIndent method and overloaded << operators for writing out vectors and points and rectangles
of various types are not specific to the render tree nor do they depend on any rendering-specific interface.
* page/scrolling/ScrollingStateNode.cpp:
* page/scrolling/ScrollingStateNode.h:
(ScrollingStateNode): Remove the writeIndent declaration, it's functionally the same as the TextStream method.
* platform/graphics/GraphicsLayer.cpp:
* platform/graphics/GraphicsLayer.h:
(GraphicsLayer): Ditto.
* platform/graphics/filters/DistantLightSource.cpp: Remove the RenderTreeAsText.h inclusion or replace it with
the inclusion of the TextStream.h header where required. The writeIndent method is now declared there.
* platform/graphics/filters/FEBlend.cpp: Ditto.
* platform/graphics/filters/FEColorMatrix.cpp: Ditto.
* platform/graphics/filters/FEComponentTransfer.cpp: Ditto.
* platform/graphics/filters/FEComposite.cpp: Ditto.
* platform/graphics/filters/FEConvolveMatrix.cpp: Ditto.
* platform/graphics/filters/FECustomFilter.cpp: Ditto.
* platform/graphics/filters/FEDiffuseLighting.cpp: Ditto.
* platform/graphics/filters/FEDisplacementMap.cpp: Ditto.
* platform/graphics/filters/FEDropShadow.cpp: Ditto.
* platform/graphics/filters/FEFlood.cpp: Ditto.
* platform/graphics/filters/FEGaussianBlur.cpp: Ditto.
* platform/graphics/filters/FEMerge.cpp: Ditto.
* platform/graphics/filters/FEMorphology.cpp: Ditto.
* platform/graphics/filters/FEOffset.cpp: Ditto.
* platform/graphics/filters/FESpecularLighting.cpp: Ditto.
* platform/graphics/filters/FETurbulence.cpp: Ditto.
* platform/graphics/filters/SourceAlpha.cpp: Ditto.
* platform/graphics/filters/SourceGraphic.cpp: Ditto.
* platform/text/TextStream.cpp: Move the writeIndent and operators' definitions here.
(WebCore::operator<<):
(WebCore):
(WebCore::writeIndent):
* platform/text/TextStream.h: Move the writeIndent and operators' declarations here.
(WebCore):
(TextStream):
(WebCore::TextStream::operator<<):
* rendering/RenderTreeAsText.cpp: Move the writeIndent and operators' definitions into TextStream.
(WebCore):
* rendering/RenderTreeAsText.h: Move the writeIndent and operators' declarations into TextStream.
(WebCore):
2013-10-28 Zan Dobersek <zdobersek@igalia.com>
Clean up ScopedEventQueue
......
......@@ -126,12 +126,6 @@ void ScrollingStateNode::willBeRemovedFromStateTree()
m_children->at(i)->willBeRemovedFromStateTree();
}
void ScrollingStateNode::writeIndent(TextStream& ts, int indent)
{
for (int i = 0; i != indent; ++i)
ts << " ";
}
void ScrollingStateNode::dump(TextStream& ts, int indent) const
{
writeIndent(ts, indent);
......
......@@ -92,7 +92,6 @@ public:
protected:
ScrollingStateNode(const ScrollingStateNode&);
static void writeIndent(TextStream&, int indent);
ScrollingStateTree* m_scrollingStateTree;
......
......@@ -571,12 +571,6 @@ void GraphicsLayer::addRepaintRect(const FloatRect& repaintRect)
}
}
void GraphicsLayer::writeIndent(TextStream& ts, int indent)
{
for (int i = 0; i != indent; ++i)
ts << " ";
}
void GraphicsLayer::dumpLayer(TextStream& ts, int indent, LayerTreeAsTextBehavior behavior) const
{
writeIndent(ts, indent);
......
......@@ -517,8 +517,6 @@ protected:
GraphicsLayer(GraphicsLayerClient*);
static void writeIndent(TextStream&, int indent);
void dumpProperties(TextStream&, int indent, LayerTreeAsTextBehavior) const;
virtual void dumpAdditionalProperties(TextStream&, int /*indent*/, LayerTreeAsTextBehavior) const { }
......
......@@ -33,7 +33,7 @@
#if ENABLE(FILTERS)
#include "DistantLightSource.h"
#include "RenderTreeAsText.h"
#include "TextStream.h"
namespace WebCore {
......
......@@ -30,7 +30,6 @@
#include "Filter.h"
#include "FloatPoint.h"
#include "GraphicsContext.h"
#include "RenderTreeAsText.h"
#include "TextStream.h"
#include <runtime/Uint8ClampedArray.h>
......
......@@ -27,7 +27,6 @@
#include "Filter.h"
#include "GraphicsContext.h"
#include "RenderTreeAsText.h"
#include "TextStream.h"
#include <runtime/Uint8ClampedArray.h>
......
......@@ -28,7 +28,6 @@
#include "Filter.h"
#include "GraphicsContext.h"
#include "RenderTreeAsText.h"
#include "TextStream.h"
#include <runtime/Uint8ClampedArray.h>
......
......@@ -29,7 +29,6 @@
#include "FECompositeArithmeticNEON.h"
#include "Filter.h"
#include "GraphicsContext.h"
#include "RenderTreeAsText.h"
#include "TextStream.h"
#include <runtime/Uint8ClampedArray.h>
......
......@@ -27,7 +27,6 @@
#include "FEConvolveMatrix.h"
#include "Filter.h"
#include "RenderTreeAsText.h"
#include "TextStream.h"
#include <runtime/Uint8ClampedArray.h>
......
......@@ -38,7 +38,6 @@
#include "CustomFilterValidatedProgram.h"
#include "Extensions3D.h"
#include "GraphicsContext3D.h"
#include "RenderTreeAsText.h"
#include "TextStream.h"
#include <runtime/Uint8ClampedArray.h>
......
......@@ -25,7 +25,6 @@
#include "FEDiffuseLighting.h"
#include "LightSource.h"
#include "RenderTreeAsText.h"
#include "TextStream.h"
namespace WebCore {
......
......@@ -28,7 +28,6 @@
#include "Filter.h"
#include "GraphicsContext.h"
#include "RenderTreeAsText.h"
#include "TextStream.h"
#include <runtime/Uint8ClampedArray.h>
......
......@@ -26,7 +26,6 @@
#include "FEGaussianBlur.h"
#include "Filter.h"
#include "GraphicsContext.h"
#include "RenderTreeAsText.h"
#include "ShadowBlur.h"
#include "TextStream.h"
#include <runtime/Uint8ClampedArray.h>
......
......@@ -27,7 +27,6 @@
#include "Filter.h"
#include "GraphicsContext.h"
#include "RenderTreeAsText.h"
#include "TextStream.h"
namespace WebCore {
......
......@@ -30,7 +30,6 @@
#include "FEGaussianBlurNEON.h"
#include "Filter.h"
#include "GraphicsContext.h"
#include "RenderTreeAsText.h"
#include "TextStream.h"
#include <runtime/Operations.h>
......
......@@ -26,7 +26,6 @@
#include "Filter.h"
#include "GraphicsContext.h"
#include "RenderTreeAsText.h"
#include "TextStream.h"
namespace WebCore {
......
......@@ -27,7 +27,6 @@
#include "FEMorphology.h"
#include "Filter.h"
#include "RenderTreeAsText.h"
#include "TextStream.h"
#include <runtime/Uint8ClampedArray.h>
......
......@@ -28,7 +28,6 @@
#include "Filter.h"
#include "GraphicsContext.h"
#include "RenderTreeAsText.h"
#include "TextStream.h"
namespace WebCore {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment