From 635860845790a19bf50bbc51ba8fb66a96dde068 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Thu, 5 Mar 2009 14:34:32 -0800 Subject: auto import from //depot/cupcake/@136594 --- WebCore/rendering/SVGRenderTreeAsText.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'WebCore/rendering/SVGRenderTreeAsText.cpp') diff --git a/WebCore/rendering/SVGRenderTreeAsText.cpp b/WebCore/rendering/SVGRenderTreeAsText.cpp index d3e029c..74a8af9 100644 --- a/WebCore/rendering/SVGRenderTreeAsText.cpp +++ b/WebCore/rendering/SVGRenderTreeAsText.cpp @@ -88,7 +88,7 @@ TextStream& operator<<(TextStream& ts, const IntRect& r) return ts << "at (" << r.x() << "," << r.y() << ") size " << r.width() << "x" << r.height(); } -bool hasFractions(double val) +static bool hasFractions(double val) { double epsilon = 0.0001; int ival = static_cast(val); @@ -151,7 +151,7 @@ TextStream& operator<<(TextStream& ts, const FloatSize& s) return ts; } -TextStream& operator<<(TextStream& ts, const AffineTransform& transform) +TextStream& operator<<(TextStream& ts, const TransformationMatrix& transform) { if (transform.isIdentity()) ts << "identity"; @@ -233,8 +233,10 @@ static void writeStyle(TextStream& ts, const RenderObject& object) if (!object.localTransform().isIdentity()) ts << " [transform=" << object.localTransform() << "]"; - if (svgStyle->imageRendering() != SVGRenderStyle::initialImageRendering()) - ts << " [image rendering=" << svgStyle->imageRendering() << "]"; + if (svgStyle->imageRendering() != SVGRenderStyle::initialImageRendering()) { + unsigned imageRenderingAsInteger = svgStyle->imageRendering(); + ts << " [image rendering=" << imageRenderingAsInteger << "]"; + } if (style->opacity() != RenderStyle::initialOpacity()) ts << " [opacity=" << style->opacity() << "]"; if (object.isRenderPath()) { @@ -329,7 +331,7 @@ static TextStream& operator<<(TextStream& ts, const RenderSVGText& text) return ts; Vector& chunks = const_cast& >(box->svgTextChunks()); - ts << " at (" << text.xPos() << "," << text.yPos() << ") size " << box->width() << "x" << box->height() << " contains " << chunks.size() << " chunk(s)"; + ts << " at (" << text.x() << "," << text.y() << ") size " << box->width() << "x" << box->height() << " contains " << chunks.size() << " chunk(s)"; if (text.parent() && (text.parent()->style()->color() != text.style()->color())) ts << " [color=" << text.style()->color().name() << "]"; @@ -514,7 +516,9 @@ void write(TextStream& ts, const RenderSVGInlineText& text, int indent) ts << " {" << tagName << "}"; } - ts << " at (" << text.xPos() << "," << text.yPos() << ") size " << text.width() << "x" << text.height() << "\n"; + IntRect linesBox = text.linesBoundingBox(); + + ts << " at (" << text.firstRunX() << "," << text.firstRunY() << ") size " << linesBox.width() << "x" << linesBox.height() << "\n"; writeSVGInlineText(ts, text, indent); } -- cgit v1.1