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

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

Issue 2681913002: Use the flow of the linebox's containing block when placing ellipsis (Closed)
Patch Set: bug 688957 Created 3 years, 10 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 | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0f183ce21a86cce5e2fc5fb95d25d107d2060891..a7b36da915f9d96a6b048bda232832e635945e6e 100644
--- a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
@@ -604,8 +604,10 @@ void InlineTextBoxPainter::paint(const PaintInfo& paintInfo,
selectionEnd = textRun.length();
bool ltr = m_inlineTextBox.isLeftToRightDirection();
- bool flowIsLTR =
- m_inlineTextBox.getLineLayoutItem().style()->isLeftToRightDirection();
+ bool flowIsLTR = m_inlineTextBox.getLineLayoutItem()
+ .containingBlock()
+ .style()
+ ->isLeftToRightDirection();
if (m_inlineTextBox.truncation() != cNoTruncation) {
// In a mixed-direction flow the ellipsis is at the start of the text
// rather than at the end of it.
@@ -994,8 +996,10 @@ void InlineTextBoxPainter::paintSelection(GraphicsContext& context,
unsigned start = m_inlineTextBox.start();
int length = m_inlineTextBox.len();
bool ltr = m_inlineTextBox.isLeftToRightDirection();
- bool flowIsLTR =
- m_inlineTextBox.getLineLayoutItem().style()->isLeftToRightDirection();
+ bool flowIsLTR = m_inlineTextBox.getLineLayoutItem()
+ .containingBlock()
+ .style()
+ ->isLeftToRightDirection();
if (m_inlineTextBox.truncation() != cNoTruncation) {
// In a mixed-direction flow the ellipsis is at the start of the text
// so we need to start after it. Otherwise we just need to make sure
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698