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

Unified Diff: sky/engine/core/rendering/RenderBlockLineLayout.cpp

Issue 706953003: Delete unused methods/arguments from RenderBlockFlow. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/rendering/RenderBlockFlow.cpp ('k') | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBlockLineLayout.cpp
diff --git a/sky/engine/core/rendering/RenderBlockLineLayout.cpp b/sky/engine/core/rendering/RenderBlockLineLayout.cpp
index 0e61e8f5e325f8b2ac3fea647ba5430cc8105678..59525d9c7d2bff90778cfd8eb8f3effd23b5dc42 100644
--- a/sky/engine/core/rendering/RenderBlockLineLayout.cpp
+++ b/sky/engine/core/rendering/RenderBlockLineLayout.cpp
@@ -504,11 +504,10 @@ void RenderBlockFlow::updateLogicalWidthForAlignment(const ETextAlign& textAlign
logicalLeft += verticalScrollbarWidth();
}
-static void updateLogicalInlinePositions(RenderBlockFlow* block, float& lineLogicalLeft, float& lineLogicalRight, float& availableLogicalWidth, bool firstLine, IndentTextOrNot shouldIndentText, LayoutUnit boxLogicalHeight)
+static void updateLogicalInlinePositions(RenderBlockFlow* block, float& lineLogicalLeft, float& lineLogicalRight, float& availableLogicalWidth, IndentTextOrNot shouldIndentText)
{
- LayoutUnit lineLogicalHeight = block->minLineHeightForReplacedRenderer(firstLine, boxLogicalHeight);
- lineLogicalLeft = block->logicalLeftOffsetForLine(block->logicalHeight(), shouldIndentText == IndentText, lineLogicalHeight).toFloat();
- lineLogicalRight = block->logicalRightOffsetForLine(block->logicalHeight(), shouldIndentText == IndentText, lineLogicalHeight).toFloat();
+ lineLogicalLeft = block->logicalLeftOffsetForLine(shouldIndentText == IndentText).toFloat();
+ lineLogicalRight = block->logicalRightOffsetForLine(shouldIndentText == IndentText).toFloat();
availableLogicalWidth = lineLogicalRight - lineLogicalLeft;
}
@@ -527,13 +526,11 @@ void RenderBlockFlow::computeInlineDirectionPositionsForLine(RootInlineBox* line
float lineLogicalLeft;
float lineLogicalRight;
float availableLogicalWidth;
- updateLogicalInlinePositions(this, lineLogicalLeft, lineLogicalRight, availableLogicalWidth, isFirstLine, shouldIndentText, 0);
+ updateLogicalInlinePositions(this, lineLogicalLeft, lineLogicalRight, availableLogicalWidth, shouldIndentText);
bool needsWordSpacing;
- if (firstRun && firstRun->m_object->isReplaced()) {
- RenderBox* renderBox = toRenderBox(firstRun->m_object);
- updateLogicalInlinePositions(this, lineLogicalLeft, lineLogicalRight, availableLogicalWidth, isFirstLine, shouldIndentText, renderBox->logicalHeight());
- }
+ if (firstRun && firstRun->m_object->isReplaced())
+ updateLogicalInlinePositions(this, lineLogicalLeft, lineLogicalRight, availableLogicalWidth, shouldIndentText);
computeInlineDirectionPositionsForSegment(lineBox, lineInfo, textAlign, lineLogicalLeft, availableLogicalWidth, firstRun, trailingSpaceRun, textBoxDataMap, verticalPositionCache, wordMeasurements);
// The widths of all runs are now known. We can now place every inline box (and
@@ -1592,12 +1589,12 @@ void RenderBlockFlow::checkLinesForTextOverflow()
}
}
-LayoutUnit RenderBlockFlow::startAlignedOffsetForLine(LayoutUnit position, bool firstLine)
+LayoutUnit RenderBlockFlow::startAlignedOffsetForLine(bool firstLine)
{
ETextAlign textAlign = style()->textAlign();
if (textAlign == TASTART) // FIXME: Handle TAEND here
- return startOffsetForLine(position, firstLine);
+ return startOffsetForLine(firstLine);
// updateLogicalWidthForAlignment() handles the direction of the block so no need to consider it here
float totalLogicalWidth = 0;
« no previous file with comments | « sky/engine/core/rendering/RenderBlockFlow.cpp ('k') | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698