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

Unified Diff: third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp

Issue 2266273002: Use LayoutUnit where previously LayoutUnits were implicitly converted to int (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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: third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
index 123a9af3e062a73b4c0e316ad6a988c7778ad920..dc43e47483fb687fbfd339963b5c0958b12172b1 100644
--- a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
@@ -495,10 +495,8 @@ void InlineTextBoxPainter::paintSelection(GraphicsContext& context, const Layout
// and so will end up positioned at (0, 0), even though we paint their
// selection highlight with character width. For RTL then, we have to
// explicitly shift the selection rect over to paint in the right location.
- if (!m_inlineTextBox.isLeftToRightDirection() && m_inlineTextBox.isLineBreak()) {
- // TODO(crbug.com/638981): Is the conversion to int intentional?
- selectionRect.move(-selectionRect.width().toInt(), 0);
- }
+ if (!m_inlineTextBox.isLeftToRightDirection() && m_inlineTextBox.isLineBreak())
+ selectionRect.move(-selectionRect.width(), LayoutUnit());
if (!flowIsLTR && m_inlineTextBox.truncation() != cNoTruncation)
selectionRect.move(m_inlineTextBox.logicalWidth() - selectionRect.width(), LayoutUnit());
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698