Chromium Code Reviews| Index: Source/core/rendering/RenderBlockLineLayout.cpp |
| diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp |
| index a07ac77c28c8f90ff8121afde9ad9568167ab14e..312615a2a09ea8c74dc64a56fb9d4b0503a9cb31 100644 |
| --- a/Source/core/rendering/RenderBlockLineLayout.cpp |
| +++ b/Source/core/rendering/RenderBlockLineLayout.cpp |
| @@ -495,7 +495,7 @@ static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* ru |
| lastEndOffset = wordMeasurement.endOffset; |
| if (kerningIsEnabled && lastEndOffset == run->m_stop) { |
| int wordLength = lastEndOffset - wordMeasurement.startOffset; |
| - measuredWidth += renderer->width(wordMeasurement.startOffset, wordLength, xPos, lineInfo.isFirstLine()); |
| + measuredWidth += renderer->width(wordMeasurement.startOffset, wordLength, xPos, run->reversed(false) ? RTL : LTR, lineInfo.isFirstLine()); |
|
leviw_travelin_and_unemployed
2014/01/09 00:49:54
It may be worth adding a method just called "Direc
|
| if (i > 0 && wordLength == 1 && renderer->characterAt(wordMeasurement.startOffset) == ' ') |
| measuredWidth += renderer->style()->wordSpacing(); |
| } else |
| @@ -514,7 +514,7 @@ static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* ru |
| } |
| if (!measuredWidth) |
| - measuredWidth = renderer->width(run->m_start, run->m_stop - run->m_start, xPos, lineInfo.isFirstLine(), &fallbackFonts, &glyphOverflow); |
| + measuredWidth = renderer->width(run->m_start, run->m_stop - run->m_start, xPos, run->reversed(false) ? RTL : LTR, lineInfo.isFirstLine(), &fallbackFonts, &glyphOverflow); |
| run->m_box->setLogicalWidth(measuredWidth + hyphenWidth); |
| if (!fallbackFonts.isEmpty()) { |