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

Unified Diff: Source/core/rendering/RenderBlockLineLayout.cpp

Issue 654283002: Fix style issues in RenderBlockLineLayout::stripTrailingSpaces (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlockLineLayout.cpp
diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp
index da665f0ffca9bf092628947983e288a79ab0183e..2423b4c5b89694fce7f9e32e6c07d7902913f199 100644
--- a/Source/core/rendering/RenderBlockLineLayout.cpp
+++ b/Source/core/rendering/RenderBlockLineLayout.cpp
@@ -1166,13 +1166,12 @@ static LayoutUnit getBorderPaddingMargin(RenderBoxModelObject* child, bool endOf
static inline void stripTrailingSpace(float& inlineMax, float& inlineMin, RenderObject* trailingSpaceChild)
{
if (trailingSpaceChild && trailingSpaceChild->isText()) {
- bool useComplexCodePath = !toRenderText(trailingSpaceChild)->
- canUseSimpleFontCodePath();
// Collapse away the trailing space at the end of a block.
- RenderText* t = toRenderText(trailingSpaceChild);
+ RenderText* text = toRenderText(trailingSpaceChild);
+ bool useComplexCodePath = !text->canUseSimpleFontCodePath();
const UChar space = ' ';
- const Font& font = t->style()->font(); // FIXME: This ignores first-line.
- TextRun run = constructTextRun(t, font, &space, 1, t->style(), LTR);
+ const Font& font = text->style()->font(); // FIXME: This ignores first-line.
+ TextRun run = constructTextRun(text, font, &space, 1, text->style(), LTR);
if (useComplexCodePath)
run.setUseComplexCodePath(true);
float spaceWidth = font.width(run);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698