summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderSVGTSpan.cpp
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
commit635860845790a19bf50bbc51ba8fb66a96dde068 (patch)
treeef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/rendering/RenderSVGTSpan.cpp
parent8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff)
downloadexternal_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/rendering/RenderSVGTSpan.cpp')
-rw-r--r--WebCore/rendering/RenderSVGTSpan.cpp30
1 files changed, 26 insertions, 4 deletions
diff --git a/WebCore/rendering/RenderSVGTSpan.cpp b/WebCore/rendering/RenderSVGTSpan.cpp
index a8d6c57..49c45df 100644
--- a/WebCore/rendering/RenderSVGTSpan.cpp
+++ b/WebCore/rendering/RenderSVGTSpan.cpp
@@ -26,7 +26,8 @@
#if ENABLE(SVG)
#include "RenderSVGTSpan.h"
-#include "FloatRect.h"
+#include "FloatQuad.h"
+#include "RenderBlock.h"
#include "SVGInlineTextBox.h"
#include "SVGRootInlineBox.h"
@@ -42,20 +43,41 @@ void RenderSVGTSpan::absoluteRects(Vector<IntRect>& rects, int, int, bool)
InlineRunBox* firstBox = firstLineBox();
SVGRootInlineBox* rootBox = firstBox ? static_cast<SVGInlineTextBox*>(firstBox)->svgRootInlineBox() : 0;
- RenderObject* object = rootBox ? rootBox->object() : 0;
+ RenderBox* object = rootBox ? rootBox->block() : 0;
if (!object)
return;
- int xRef = object->xPos() + xPos();
- int yRef = object->yPos() + yPos();
+ int xRef = object->x() + x();
+ int yRef = object->y() + y();
for (InlineRunBox* curr = firstBox; curr; curr = curr->nextLineBox()) {
FloatRect rect(xRef + curr->xPos(), yRef + curr->yPos(), curr->width(), curr->height());
+ // FIXME: broken with CSS transforms
rects.append(enclosingIntRect(absoluteTransform().mapRect(rect)));
}
}
+void RenderSVGTSpan::absoluteQuads(Vector<FloatQuad>& quads, bool)
+{
+ InlineRunBox* firstBox = firstLineBox();
+
+ SVGRootInlineBox* rootBox = firstBox ? static_cast<SVGInlineTextBox*>(firstBox)->svgRootInlineBox() : 0;
+ RenderBox* object = rootBox ? rootBox->block() : 0;
+
+ if (!object)
+ return;
+
+ int xRef = object->x() + x();
+ int yRef = object->y() + y();
+
+ for (InlineRunBox* curr = firstBox; curr; curr = curr->nextLineBox()) {
+ FloatRect rect(xRef + curr->xPos(), yRef + curr->yPos(), curr->width(), curr->height());
+ // FIXME: broken with CSS transforms
+ quads.append(absoluteTransform().mapRect(rect));
+ }
+}
+
}
#endif // ENABLE(SVG)