Index: third_party/WebKit/WebCore/rendering/RenderSVGText.cpp |
=================================================================== |
--- third_party/WebKit/WebCore/rendering/RenderSVGText.cpp (revision 5296) |
+++ third_party/WebKit/WebCore/rendering/RenderSVGText.cpp (working copy) |
@@ -164,11 +164,37 @@ |
for (InlineBox* box = flowBox->firstChild(); box; box = box->nextOnLine()) { |
FloatRect boxRect(box->xPos(), box->yPos(), box->width(), box->height()); |
boxRect.move(narrowPrecisionToFloat(absPos.x() - htmlParentCtm.e()), narrowPrecisionToFloat(absPos.y() - htmlParentCtm.f())); |
+ // FIXME: broken with CSS transforms |
rects.append(enclosingIntRect(absoluteTransform().mapRect(boxRect))); |
} |
} |
} |
+void RenderSVGText::absoluteQuads(Vector<FloatQuad>& quads, bool topLevel) |
+{ |
+ RenderSVGRoot* root = findSVGRootObject(parent()); |
+ if (!root) |
+ return; |
+ |
+ FloatPoint absPos = localToAbsolute(); |
+ |
+ AffineTransform htmlParentCtm = root->RenderContainer::absoluteTransform(); |
+ |
+ // Don't use relativeBBox here, as it's unites the selection rects. Makes it hard |
+ // to spot errors, if there are any using WebInspector. Individually feed them into 'rects'. |
+ for (InlineRunBox* runBox = firstLineBox(); runBox; runBox = runBox->nextLineBox()) { |
+ ASSERT(runBox->isInlineFlowBox()); |
+ |
+ InlineFlowBox* flowBox = static_cast<InlineFlowBox*>(runBox); |
+ for (InlineBox* box = flowBox->firstChild(); box; box = box->nextOnLine()) { |
+ FloatRect boxRect(box->xPos(), box->yPos(), box->width(), box->height()); |
+ boxRect.move(narrowPrecisionToFloat(absPos.x() - htmlParentCtm.e()), narrowPrecisionToFloat(absPos.y() - htmlParentCtm.f())); |
+ // FIXME: broken with CSS transforms |
+ quads.append(absoluteTransform().mapRect(boxRect)); |
+ } |
+ } |
+} |
+ |
void RenderSVGText::paint(PaintInfo& paintInfo, int, int) |
{ |
RenderObject::PaintInfo pi(paintInfo); |