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

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

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/SVGInlineTextBoxPainter.cpp ('k') | Source/core/paint/TextPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/TextPainter.h
diff --git a/Source/core/paint/TextPainter.h b/Source/core/paint/TextPainter.h
index c81d1b0cf38b2ad175a133acf092cefe13e8f27f..cab51f3c4d2a21f091ceb73ec2b6000474df3cc7 100644
--- a/Source/core/paint/TextPainter.h
+++ b/Source/core/paint/TextPainter.h
@@ -6,11 +6,11 @@
#define TextPainter_h
#include "core/CoreExport.h"
-#include "core/layout/line/FloatToLayoutUnit.h"
#include "core/style/ComputedStyleConstants.h"
#include "platform/fonts/TextBlob.h"
#include "platform/geometry/FloatPoint.h"
#include "platform/geometry/FloatRect.h"
+#include "platform/geometry/LayoutRect.h"
#include "platform/graphics/Color.h"
#include "platform/transforms/AffineTransform.h"
#include "wtf/text/AtomicString.h"
@@ -31,7 +31,7 @@ class CORE_EXPORT TextPainter {
public:
struct Style;
- TextPainter(GraphicsContext*, const Font&, const TextRun&, const FloatPoint& textOrigin, const FloatRect& textBounds, bool horizontal);
+ TextPainter(GraphicsContext*, const Font&, const TextRun&, const LayoutPoint& textOrigin, const LayoutRect& textBounds, bool horizontal);
~TextPainter();
void setEmphasisMark(const AtomicString&, TextEmphasisPosition);
@@ -64,7 +64,7 @@ public:
static Style selectionPaintingStyle(LayoutObject&, bool haveSelection, bool forceBlackText, bool isPrinting, const Style& textStyle);
enum RotationDirection { Counterclockwise, Clockwise };
- static AffineTransform rotation(const FloatRectWillBeLayoutRect& boxRect, RotationDirection);
+ static AffineTransform rotation(const LayoutRect& boxRect, RotationDirection);
private:
void updateGraphicsContext(const Style& style, GraphicsContextStateSaver& saver)
@@ -85,15 +85,15 @@ private:
GraphicsContext* m_graphicsContext;
const Font& m_font;
const TextRun& m_run;
- FloatPoint m_textOrigin;
- FloatRect m_textBounds;
+ LayoutPoint m_textOrigin;
+ LayoutRect m_textBounds;
bool m_horizontal;
AtomicString m_emphasisMark;
int m_emphasisMarkOffset;
LayoutTextCombine* m_combinedText;
};
-inline AffineTransform TextPainter::rotation(const FloatRectWillBeLayoutRect& boxRect, RotationDirection rotationDirection)
+inline AffineTransform TextPainter::rotation(const LayoutRect& boxRect, RotationDirection rotationDirection)
{
// Why this matrix is correct: consider the case of a clockwise rotation.
« no previous file with comments | « Source/core/paint/SVGInlineTextBoxPainter.cpp ('k') | Source/core/paint/TextPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698