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

Unified Diff: Source/core/rendering/RenderListMarker.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/RenderListMarker.cpp
diff --git a/Source/core/rendering/RenderListMarker.cpp b/Source/core/rendering/RenderListMarker.cpp
index dbc0450e63697ec1eeef6ea4f329f6ff6a2884d2..30939f4910a7a32d2a857817fb7985d83a847dcf 100644
--- a/Source/core/rendering/RenderListMarker.cpp
+++ b/Source/core/rendering/RenderListMarker.cpp
@@ -1280,7 +1280,7 @@ void RenderListMarker::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffse
IntPoint textOrigin = IntPoint(marker.x(), marker.y() + style()->fontMetrics().ascent());
if (type == Asterisks || type == Footnotes)
- context->drawText(font, textRun, textOrigin);
+ context->drawText(font, textRun, textOrigin, marker);
else {
// Text is not arbitrary. We can judge whether it's RTL from the first character,
// and we only need to handle the direction RightToLeft for now.
@@ -1297,15 +1297,15 @@ void RenderListMarker::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffse
const UChar suffix = listMarkerSuffix(type, m_listItem->value());
if (style()->isLeftToRightDirection()) {
int width = font.width(textRun);
- context->drawText(font, textRun, textOrigin);
+ context->drawText(font, textRun, textOrigin, marker);
UChar suffixSpace[2] = { suffix, ' ' };
- context->drawText(font, RenderBlock::constructTextRun(this, font, suffixSpace, 2, style()), textOrigin + IntSize(width, 0));
+ context->drawText(font, RenderBlock::constructTextRun(this, font, suffixSpace, 2, style()), textOrigin + IntSize(width, 0), marker);
} else {
UChar spaceSuffix[2] = { ' ', suffix };
TextRun spaceSuffixRun = RenderBlock::constructTextRun(this, font, spaceSuffix, 2, style());
int width = font.width(spaceSuffixRun);
- context->drawText(font, spaceSuffixRun, textOrigin);
- context->drawText(font, textRun, textOrigin + IntSize(width, 0));
+ context->drawText(font, spaceSuffixRun, textOrigin, marker);
+ context->drawText(font, textRun, textOrigin + IntSize(width, 0), marker);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698