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

Unified Diff: Source/core/rendering/svg/SVGInlineTextBox.cpp

Issue 14160005: Track the region where text is painted. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed build on win and mac Created 7 years, 7 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/rendering/RenderListMarker.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGInlineTextBox.cpp
diff --git a/Source/core/rendering/svg/SVGInlineTextBox.cpp b/Source/core/rendering/svg/SVGInlineTextBox.cpp
index 685fa18419dd2de509fbb0300a94e1c681e188cb..c30cd90f35e2dfddfd4a4508d190e138ba8bf135 100644
--- a/Source/core/rendering/svg/SVGInlineTextBox.cpp
+++ b/Source/core/rendering/svg/SVGInlineTextBox.cpp
@@ -606,6 +606,10 @@ void SVGInlineTextBox::paintTextWithShadows(GraphicsContext* context, RenderStyl
}
FloatRect shadowRect(FloatPoint(textOrigin.x(), textOrigin.y() - scaledFont.fontMetrics().floatAscent()), textSize);
+ TextRunPaintInfo textRunPaintInfo(textRun);
+ textRunPaintInfo.from = startPosition;
+ textRunPaintInfo.to = endPosition;
+ textRunPaintInfo.bounds = FloatRect(textOrigin, textSize);
do {
if (!prepareGraphicsContextForTextPainting(context, scalingFactor, textRun, style))
@@ -618,7 +622,7 @@ void SVGInlineTextBox::paintTextWithShadows(GraphicsContext* context, RenderStyl
context->save();
context->scale(FloatSize(1 / scalingFactor, 1 / scalingFactor));
- scaledFont.drawText(context, textRun, textOrigin + extraOffset, startPosition, endPosition);
+ scaledFont.drawText(context, textRunPaintInfo, textOrigin + extraOffset);
context->restore();
« no previous file with comments | « Source/core/rendering/RenderListMarker.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698