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

Unified Diff: Source/core/rendering/InlineTextBox.cpp

Issue 14160005: Track the region where text is painted. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase with TOT Created 7 years, 8 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
Index: Source/core/rendering/InlineTextBox.cpp
diff --git a/Source/core/rendering/InlineTextBox.cpp b/Source/core/rendering/InlineTextBox.cpp
index 726e8ead54eb3bf44f765dbf5edb624ed284b21c..e8e9d79433be40644c1912879923940c62f319ad 100644
--- a/Source/core/rendering/InlineTextBox.cpp
+++ b/Source/core/rendering/InlineTextBox.cpp
@@ -429,21 +429,21 @@ static void paintTextWithShadows(GraphicsContext* context, const Font& font, con
if (startOffset <= endOffset) {
if (emphasisMark.isEmpty())
- context->drawText(font, textRun, textOrigin + extraOffset, startOffset, endOffset);
+ context->drawText(font, textRun, textOrigin + extraOffset, boxRect, startOffset, endOffset);
else
- context->drawEmphasisMarks(font, textRun, emphasisMark, textOrigin + extraOffset + IntSize(0, emphasisMarkOffset), startOffset, endOffset);
+ context->drawEmphasisMarks(font, textRun, emphasisMark, textOrigin + extraOffset + IntSize(0, emphasisMarkOffset), boxRect, startOffset, endOffset);
} else {
if (endOffset > 0) {
if (emphasisMark.isEmpty())
- context->drawText(font, textRun, textOrigin + extraOffset, 0, endOffset);
+ context->drawText(font, textRun, textOrigin + extraOffset, boxRect, 0, endOffset);
else
- context->drawEmphasisMarks(font, textRun, emphasisMark, textOrigin + extraOffset + IntSize(0, emphasisMarkOffset), 0, endOffset);
+ context->drawEmphasisMarks(font, textRun, emphasisMark, textOrigin + extraOffset + IntSize(0, emphasisMarkOffset), boxRect, 0, endOffset);
}
if (startOffset < truncationPoint) {
if (emphasisMark.isEmpty())
- context->drawText(font, textRun, textOrigin + extraOffset, startOffset, truncationPoint);
+ context->drawText(font, textRun, textOrigin + extraOffset, boxRect, startOffset, truncationPoint);
else
- context->drawEmphasisMarks(font, textRun, emphasisMark, textOrigin + extraOffset + IntSize(0, emphasisMarkOffset), startOffset, truncationPoint);
+ context->drawEmphasisMarks(font, textRun, emphasisMark, textOrigin + extraOffset + IntSize(0, emphasisMarkOffset), boxRect, startOffset, truncationPoint);
}
}

Powered by Google App Engine
This is Rietveld 408576698