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

Unified Diff: Source/core/layout/line/LineWidth.cpp

Issue 763173003: Convert RenderBlockFlow code to use FloatingObject references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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 | « Source/core/layout/line/LineWidth.h ('k') | Source/core/layout/shapes/ShapeOutsideInfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/line/LineWidth.cpp
diff --git a/Source/core/layout/line/LineWidth.cpp b/Source/core/layout/line/LineWidth.cpp
index 9ca13dc6ce21a079eef9a71e5cf1118731522f10..46fbf926b53cfef97eb6671f56ef34502025fcd6 100644
--- a/Source/core/layout/line/LineWidth.cpp
+++ b/Source/core/layout/line/LineWidth.cpp
@@ -60,19 +60,19 @@ void LineWidth::updateAvailableWidth(LayoutUnit replacedHeight)
computeAvailableWidthFromLeftAndRight();
}
-void LineWidth::shrinkAvailableWidthForNewFloatIfNeeded(FloatingObject* newFloat)
+void LineWidth::shrinkAvailableWidthForNewFloatIfNeeded(const FloatingObject& newFloat)
{
LayoutUnit height = m_block.logicalHeight();
if (height < m_block.logicalTopForFloat(newFloat) || height >= m_block.logicalBottomForFloat(newFloat))
return;
ShapeOutsideDeltas shapeDeltas;
- if (ShapeOutsideInfo* shapeOutsideInfo = newFloat->layoutObject()->shapeOutsideInfo()) {
+ if (ShapeOutsideInfo* shapeOutsideInfo = newFloat.layoutObject()->shapeOutsideInfo()) {
LayoutUnit lineHeight = m_block.lineHeight(m_isFirstLine, m_block.isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes);
- shapeDeltas = shapeOutsideInfo->computeDeltasForContainingBlockLine(m_block, *newFloat, m_block.logicalHeight(), lineHeight);
+ shapeDeltas = shapeOutsideInfo->computeDeltasForContainingBlockLine(m_block, newFloat, m_block.logicalHeight(), lineHeight);
}
- if (newFloat->type() == FloatingObject::FloatLeft) {
+ if (newFloat.type() == FloatingObject::FloatLeft) {
float newLeft = m_block.logicalRightForFloat(newFloat).toFloat();
if (shapeDeltas.isValid()) {
if (shapeDeltas.lineOverlapsShape())
« no previous file with comments | « Source/core/layout/line/LineWidth.h ('k') | Source/core/layout/shapes/ShapeOutsideInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698