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

Unified Diff: Source/core/paint/TextPainter.cpp

Issue 1043643002: Switch line layout to LayoutUnit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More TestExpectations tweaks Created 5 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/paint/TextPainter.h ('k') | Source/modules/accessibility/AXInlineTextBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/TextPainter.cpp
diff --git a/Source/core/paint/TextPainter.cpp b/Source/core/paint/TextPainter.cpp
index c16364e587b152921e1221000058f9d51072b74a..b26a2d3521f5861e951bb42744bb44e1adb93447 100644
--- a/Source/core/paint/TextPainter.cpp
+++ b/Source/core/paint/TextPainter.cpp
@@ -21,7 +21,7 @@
namespace blink {
-TextPainter::TextPainter(GraphicsContext* context, const Font& font, const TextRun& run, const FloatPoint& textOrigin, const FloatRect& textBounds, bool horizontal)
+TextPainter::TextPainter(GraphicsContext* context, const Font& font, const TextRun& run, const LayoutPoint& textOrigin, const LayoutRect& textBounds, bool horizontal)
: m_graphicsContext(context)
, m_font(font)
, m_run(run)
@@ -191,10 +191,10 @@ void TextPainter::paintInternalRun(TextRunPaintInfo& textRunPaintInfo, int from,
if (step == PaintEmphasisMark) {
m_graphicsContext->drawEmphasisMarks(m_font, textRunPaintInfo, m_emphasisMark,
- m_textOrigin + IntSize(0, m_emphasisMarkOffset));
+ FloatPoint(m_textOrigin) + IntSize(0, m_emphasisMarkOffset));
} else {
ASSERT(step == PaintText);
- m_graphicsContext->drawText(m_font, textRunPaintInfo, m_textOrigin);
+ m_graphicsContext->drawText(m_font, textRunPaintInfo, FloatPoint(m_textOrigin));
}
}
@@ -219,7 +219,7 @@ void TextPainter::paintEmphasisMarkForCombinedText()
{
ASSERT(m_combinedText);
DEFINE_STATIC_LOCAL(TextRun, placeholderTextRun, (&ideographicFullStopCharacter, 1));
- FloatPoint emphasisMarkTextOrigin(m_textBounds.x(), m_textBounds.y() + m_font.fontMetrics().ascent() + m_emphasisMarkOffset);
+ FloatPoint emphasisMarkTextOrigin(m_textBounds.x().toFloat(), m_textBounds.y().toFloat() + m_font.fontMetrics().ascent() + m_emphasisMarkOffset);
TextRunPaintInfo textRunPaintInfo(placeholderTextRun);
textRunPaintInfo.bounds = m_textBounds;
m_graphicsContext->concatCTM(rotation(m_textBounds, Clockwise));
« no previous file with comments | « Source/core/paint/TextPainter.h ('k') | Source/modules/accessibility/AXInlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698