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

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: add comments 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
Index: Source/core/layout/LayoutBlockFlowLine.cpp
diff --git a/Source/core/layout/LayoutBlockFlowLine.cpp b/Source/core/layout/LayoutBlockFlowLine.cpp
index b7c194bda31ac346636ec498690024d39c6437e9..11f3e653933b8032a2ed77e3c0e1ec56a46dd7b3 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->moveInLogicalDirection(LayoutSize(logicalLeft - curr->logicalLeft(), 0));
leviw_travelin_and_unemployed 2015/06/16 20:09:17 Nit: s/0/LayoutUnit()/
Xianzhu 2015/06/16 20:43:23 Changed to use moveInLineDirection().
}
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->moveInLogicalDirection(LayoutSize(logicalLeft, 0));
leviw_travelin_and_unemployed 2015/06/16 20:09:17 Ditto
Xianzhu 2015/06/16 20:43:23 Ditto
else
- curr->adjustLogicalPosition(logicalLeft - (availableLogicalWidth - totalLogicalWidth), 0);
+ curr->moveInLogicalDirection(LayoutSize(logicalLeft - (availableLogicalWidth - totalLogicalWidth), 0));
leviw_travelin_and_unemployed 2015/06/16 20:09:17 Ditto.
Xianzhu 2015/06/16 20:43:23 Ditto
}
}
firstLine = false;

Powered by Google App Engine
This is Rietveld 408576698