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

Side by Side Diff: Source/core/layout/LayoutBlockFlowLine.cpp

Issue 1055683008: Rename variable name from renderText to layoutText (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « Source/core/editing/InsertIntoTextNodeCommand.cpp ('k') | Source/core/layout/LayoutText.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved.
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 textBox->setIsText(isOnlyRun || text->document().inNoQuirksMode()); 76 textBox->setIsText(isOnlyRun || text->document().inNoQuirksMode());
77 textBox->setDirOverride(run.dirOverride(text->style()->rtlOrdering() == Visu alOrder)); 77 textBox->setDirOverride(run.dirOverride(text->style()->rtlOrdering() == Visu alOrder));
78 if (run.m_hasHyphen) 78 if (run.m_hasHyphen)
79 textBox->setHasHyphen(true); 79 textBox->setHasHyphen(true);
80 return textBox; 80 return textBox;
81 } 81 }
82 82
83 static inline void dirtyLineBoxesForRenderer(LayoutObject* o, bool fullLayout) 83 static inline void dirtyLineBoxesForRenderer(LayoutObject* o, bool fullLayout)
84 { 84 {
85 if (o->isText()) { 85 if (o->isText()) {
86 LayoutText* renderText = toLayoutText(o); 86 LayoutText* layoutText = toLayoutText(o);
87 renderText->dirtyOrDeleteLineBoxesIfNeeded(fullLayout); 87 layoutText->dirtyOrDeleteLineBoxesIfNeeded(fullLayout);
88 } else { 88 } else {
89 toLayoutInline(o)->dirtyLineBoxes(fullLayout); 89 toLayoutInline(o)->dirtyLineBoxes(fullLayout);
90 } 90 }
91 } 91 }
92 92
93 static bool parentIsConstructedOrHaveNext(InlineFlowBox* parentBox) 93 static bool parentIsConstructedOrHaveNext(InlineFlowBox* parentBox)
94 { 94 {
95 do { 95 do {
96 if (parentBox->isConstructed() || parentBox->nextOnLine()) 96 if (parentBox->isConstructed() || parentBox->nextOnLine())
97 return true; 97 return true;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 static bool reachedEndOfTextRenderer(const BidiRunList<BidiRun>& bidiRuns) 176 static bool reachedEndOfTextRenderer(const BidiRunList<BidiRun>& bidiRuns)
177 { 177 {
178 BidiRun* run = bidiRuns.logicallyLastRun(); 178 BidiRun* run = bidiRuns.logicallyLastRun();
179 if (!run) 179 if (!run)
180 return true; 180 return true;
181 unsigned pos = run->stop(); 181 unsigned pos = run->stop();
182 LayoutObject* r = run->m_object; 182 LayoutObject* r = run->m_object;
183 if (!r->isText() || r->isBR()) 183 if (!r->isText() || r->isBR())
184 return false; 184 return false;
185 LayoutText* renderText = toLayoutText(r); 185 LayoutText* layoutText = toLayoutText(r);
186 unsigned length = renderText->textLength(); 186 unsigned length = layoutText->textLength();
187 if (pos >= length) 187 if (pos >= length)
188 return true; 188 return true;
189 189
190 if (renderText->is8Bit()) 190 if (layoutText->is8Bit())
191 return endsWithASCIISpaces(renderText->characters8(), pos, length); 191 return endsWithASCIISpaces(layoutText->characters8(), pos, length);
192 return endsWithASCIISpaces(renderText->characters16(), pos, length); 192 return endsWithASCIISpaces(layoutText->characters16(), pos, length);
193 } 193 }
194 194
195 RootInlineBox* LayoutBlockFlow::constructLine(BidiRunList<BidiRun>& bidiRuns, co nst LineInfo& lineInfo) 195 RootInlineBox* LayoutBlockFlow::constructLine(BidiRunList<BidiRun>& bidiRuns, co nst LineInfo& lineInfo)
196 { 196 {
197 ASSERT(bidiRuns.firstRun()); 197 ASSERT(bidiRuns.firstRun());
198 198
199 bool rootHasSelectedChildren = false; 199 bool rootHasSelectedChildren = false;
200 InlineFlowBox* parentBox = 0; 200 InlineFlowBox* parentBox = 0;
201 int runCount = bidiRuns.runCount() - lineInfo.runsFromLeadingWhitespace(); 201 int runCount = bidiRuns.runCount() - lineInfo.runsFromLeadingWhitespace();
202 for (BidiRun* r = bidiRuns.firstRun(); r; r = r->next()) { 202 for (BidiRun* r = bidiRuns.firstRun(); r; r = r->next()) {
(...skipping 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after
2052 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat (); 2052 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat ();
2053 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft; 2053 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft;
2054 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0); 2054 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0);
2055 2055
2056 if (!style()->isLeftToRightDirection()) 2056 if (!style()->isLeftToRightDirection())
2057 return logicalWidth() - logicalLeft; 2057 return logicalWidth() - logicalLeft;
2058 return logicalLeft; 2058 return logicalLeft;
2059 } 2059 }
2060 2060
2061 } 2061 }
OLDNEW
« no previous file with comments | « Source/core/editing/InsertIntoTextNodeCommand.cpp ('k') | Source/core/layout/LayoutText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698