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

Unified Diff: Source/core/layout/LayoutBlockFlowLine.cpp

Issue 1183003003: Move overflow in InlineTextBox::adjustPosition() if it has glyph overflows (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « LayoutTests/TestExpectations ('k') | Source/core/layout/LayoutListItem.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBlockFlowLine.cpp
diff --git a/Source/core/layout/LayoutBlockFlowLine.cpp b/Source/core/layout/LayoutBlockFlowLine.cpp
index b7c194bda31ac346636ec498690024d39c6437e9..e1ece63d418ed9ae26cde80db1191400ec51d0d4 100644
--- a/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -867,7 +867,7 @@ void LayoutBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState,
adjustLinePositionForPagination(*lineBox, adjustment, layoutState.flowThread());
if (adjustment) {
LayoutUnit oldLineWidth = availableLogicalWidthForLine(oldLogicalHeight, layoutState.lineInfo().isFirstLine());
- lineBox->adjustBlockDirectionPosition(adjustment.toFloat());
+ lineBox->moveInBlockDirection(adjustment.toFloat());
if (layoutState.usesPaintInvalidationBounds())
layoutState.updatePaintInvalidationRangeFromBox(lineBox);
@@ -998,7 +998,7 @@ void LayoutBlockFlow::linkToEndLineIfNeeded(LineLayoutState& layoutState)
}
if (delta) {
layoutState.updatePaintInvalidationRangeFromBox(line, delta);
- line->adjustBlockDirectionPosition(delta.toFloat());
+ line->moveInBlockDirection(delta.toFloat());
}
if (Vector<LayoutBox*>* cleanLineFloats = line->floatsPtr()) {
for (auto* box : *cleanLineFloats) {
@@ -1666,7 +1666,7 @@ RootInlineBox* LayoutBlockFlow::determineStartPosition(LineLayoutState& layoutSt
}
layoutState.updatePaintInvalidationRangeFromBox(curr, paginationDelta);
- curr->adjustBlockDirectionPosition(paginationDelta.toFloat());
+ curr->moveInBlockDirection(paginationDelta.toFloat());
}
}
@@ -1910,7 +1910,6 @@ void LayoutBlockFlow::addOverflowFromInlineChildren()
void LayoutBlockFlow::deleteEllipsisLineBoxes()
{
ETextAlign textAlign = style()->textAlign();
- bool ltr = style()->isLeftToRightDirection();
bool firstLine = true;
for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) {
if (curr->hasEllipsisBox()) {
@@ -1922,10 +1921,7 @@ void LayoutBlockFlow::deleteEllipsisLineBoxes()
LayoutUnit totalLogicalWidth = curr->logicalWidth();
updateLogicalWidthForAlignment(textAlign, curr, 0, logicalLeft, totalLogicalWidth, availableLogicalWidth, 0);
- if (ltr)
- curr->adjustLogicalPosition((logicalLeft - curr->logicalLeft()), 0);
- else
- curr->adjustLogicalPosition(-(curr->logicalLeft() - logicalLeft), 0);
+ curr->moveInInlineDirection(logicalLeft - curr->logicalLeft());
}
firstLine = false;
}
@@ -1995,9 +1991,9 @@ void LayoutBlockFlow::checkLinesForTextOverflow()
LayoutUnit availableLogicalWidth = blockRightEdge - blockLeftEdge;
updateLogicalWidthForAlignment(textAlign, curr, 0, logicalLeft, totalLogicalWidth, availableLogicalWidth, 0);
if (ltr)
- curr->adjustLogicalPosition(logicalLeft, 0);
+ curr->moveInInlineDirection(logicalLeft);
else
- curr->adjustLogicalPosition(logicalLeft - (availableLogicalWidth - totalLogicalWidth), 0);
+ curr->moveInInlineDirection(logicalLeft - (availableLogicalWidth - totalLogicalWidth));
}
}
firstLine = false;
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/core/layout/LayoutListItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698