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

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

Issue 2483023002: Let positionNewFloats() take a logicalTop parameter. (Closed)
Patch Set: Created 4 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
Index: third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
index 62c6b3bf4266fd3c0bf572d18512f3af0f02f493..d0eb69cc11e4d3ec7faf76bbadeb589d74b514fb 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -1362,9 +1362,9 @@ void LayoutBlockFlow::linkToEndLineIfNeeded(LineLayoutState& layoutState) {
FloatingObject* floatingObject = insertFloatingObject(*box);
ASSERT(!floatingObject->originatingLine());
floatingObject->setOriginatingLine(line);
- setLogicalHeight(logicalTopForChild(*box) -
- marginBeforeForChild(*box) + delta);
- positionNewFloats();
+ LayoutUnit logicalTop =
+ logicalTopForChild(*box) - marginBeforeForChild(*box) + delta;
+ positionNewFloats(logicalTop);
}
}
}
@@ -1379,7 +1379,7 @@ void LayoutBlockFlow::linkToEndLineIfNeeded(LineLayoutState& layoutState) {
// now. This has to be done before adding in the bottom border/padding, or the
// float will
// include the padding incorrectly. -dwh
- if (positionNewFloats() && lastRootBox())
+ if (positionNewFloats(logicalHeight()) && lastRootBox())
appendFloatsToLastLine(layoutState, InlineIterator(), InlineBidiResolver(),
BidiStatus());
}
@@ -1398,7 +1398,7 @@ void LayoutBlockFlow::markDirtyFloatsForPaintInvalidation(
}
insertFloatingObject(*f);
}
- positionNewFloats();
+ positionNewFloats(logicalHeight());
}
// InlineMinMaxIterator is a class that will iterate over all layout objects
@@ -2078,7 +2078,6 @@ RootInlineBox* LayoutBlockFlow::determineStartPosition(
unsigned numCleanFloats = 0;
if (!layoutState.floats().isEmpty()) {
- LayoutUnit savedLogicalHeight = logicalHeight();
// Restore floats from clean lines.
RootInlineBox* line = firstRootBox();
while (line != curr) {
@@ -2087,16 +2086,15 @@ RootInlineBox* LayoutBlockFlow::determineStartPosition(
FloatingObject* floatingObject = insertFloatingObject(*box);
ASSERT(!floatingObject->originatingLine());
floatingObject->setOriginatingLine(line);
- setLogicalHeight(logicalTopForChild(*box) -
- marginBeforeForChild(*box));
- positionNewFloats();
+ LayoutUnit logicalTop =
+ logicalTopForChild(*box) - marginBeforeForChild(*box);
+ positionNewFloats(logicalTop);
ASSERT(layoutState.floats()[numCleanFloats].object == box);
numCleanFloats++;
}
}
line = line->nextRootBox();
}
- setLogicalHeight(savedLogicalHeight);
}
layoutState.setFloatIndex(numCleanFloats);

Powered by Google App Engine
This is Rietveld 408576698