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

Unified Diff: Source/core/rendering/RenderGrid.cpp

Issue 752723004: Use references in RenderBlock and RenderBlockFlow methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: cover RenderBlockFlow class as well 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 | « Source/core/rendering/RenderFlexibleBox.cpp ('k') | Source/core/rendering/RenderTable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderGrid.cpp
diff --git a/Source/core/rendering/RenderGrid.cpp b/Source/core/rendering/RenderGrid.cpp
index 0f5c1b684c9ff5ca5411928a447295ab000b7ff4..24fad064d5a1f85170912fb4e0e1c49505b37bcd 100644
--- a/Source/core/rendering/RenderGrid.cpp
+++ b/Source/core/rendering/RenderGrid.cpp
@@ -651,7 +651,7 @@ LayoutUnit RenderGrid::minContentForChild(RenderBox& child, GridTrackSizingDirec
if (direction == ForColumns) {
// FIXME: It's unclear if we should return the intrinsic width or the preferred width.
// See http://lists.w3.org/Archives/Public/www-style/2013Jan/0245.html
- return child.minPreferredLogicalWidth() + marginIntrinsicLogicalWidthForChild(&child);
+ return child.minPreferredLogicalWidth() + marginIntrinsicLogicalWidthForChild(child);
}
return logicalHeightForChild(child, columnTracks);
@@ -667,7 +667,7 @@ LayoutUnit RenderGrid::maxContentForChild(RenderBox& child, GridTrackSizingDirec
if (direction == ForColumns) {
// FIXME: It's unclear if we should return the intrinsic width or the preferred width.
// See http://lists.w3.org/Archives/Public/www-style/2013Jan/0245.html
- return child.maxPreferredLogicalWidth() + marginIntrinsicLogicalWidthForChild(&child);
+ return child.maxPreferredLogicalWidth() + marginIntrinsicLogicalWidthForChild(child);
}
return logicalHeightForChild(child, columnTracks);
@@ -1207,7 +1207,7 @@ LayoutUnit RenderGrid::startOfColumnForChild(const RenderBox& child) const
const GridCoordinate& coordinate = cachedGridCoordinate(child);
LayoutUnit startOfColumn = m_columnPositions[coordinate.columns.resolvedInitialPosition.toInt()];
// The grid items should be inside the grid container's border box, that's why they need to be shifted.
- return startOfColumn + marginStartForChild(&child);
+ return startOfColumn + marginStartForChild(child);
}
LayoutUnit RenderGrid::endOfColumnForChild(const RenderBox& child) const
@@ -1215,7 +1215,7 @@ LayoutUnit RenderGrid::endOfColumnForChild(const RenderBox& child) const
const GridCoordinate& coordinate = cachedGridCoordinate(child);
LayoutUnit startOfColumn = m_columnPositions[coordinate.columns.resolvedInitialPosition.toInt()];
// The grid items should be inside the grid container's border box, that's why they need to be shifted.
- LayoutUnit columnPosition = startOfColumn + marginStartForChild(&child);
+ LayoutUnit columnPosition = startOfColumn + marginStartForChild(child);
LayoutUnit endOfColumn = m_columnPositions[coordinate.columns.resolvedFinalPosition.next().toInt()];
LayoutUnit offsetFromColumnPosition = computeOverflowAlignmentOffset(child.style()->justifySelfOverflowAlignment(), startOfColumn, endOfColumn, child.logicalWidth());
@@ -1244,7 +1244,7 @@ LayoutUnit RenderGrid::centeredColumnPositionForChild(const RenderBox& child) co
const GridCoordinate& coordinate = cachedGridCoordinate(child);
LayoutUnit startOfColumn = m_columnPositions[coordinate.columns.resolvedInitialPosition.toInt()];
LayoutUnit endOfColumn = m_columnPositions[coordinate.columns.resolvedFinalPosition.next().toInt()];
- LayoutUnit columnPosition = startOfColumn + marginStartForChild(&child);
+ LayoutUnit columnPosition = startOfColumn + marginStartForChild(child);
LayoutUnit offsetFromColumnPosition = computeOverflowAlignmentOffset(child.style()->justifySelfOverflowAlignment(), startOfColumn, endOfColumn, child.logicalWidth());
return columnPosition + offsetFromColumnPosition / 2;
@@ -1331,7 +1331,7 @@ LayoutUnit RenderGrid::endOfRowForChild(const RenderBox& child) const
LayoutUnit startOfRow = m_rowPositions[coordinate.rows.resolvedInitialPosition.toInt()];
// The grid items should be inside the grid container's border box, that's why they need to be shifted.
- LayoutUnit rowPosition = startOfRow + marginBeforeForChild(&child);
+ LayoutUnit rowPosition = startOfRow + marginBeforeForChild(child);
LayoutUnit endOfRow = m_rowPositions[coordinate.rows.resolvedFinalPosition.next().toInt()];
LayoutUnit offsetFromRowPosition = computeOverflowAlignmentOffset(child.style()->alignSelfOverflowAlignment(), startOfRow, endOfRow, child.logicalHeight());
@@ -1345,7 +1345,7 @@ LayoutUnit RenderGrid::startOfRowForChild(const RenderBox& child) const
LayoutUnit startOfRow = m_rowPositions[coordinate.rows.resolvedInitialPosition.toInt()];
// The grid items should be inside the grid container's border box, that's why they need to be shifted.
- LayoutUnit rowPosition = startOfRow + marginBeforeForChild(&child);
+ LayoutUnit rowPosition = startOfRow + marginBeforeForChild(child);
return rowPosition;
}
@@ -1355,9 +1355,9 @@ LayoutUnit RenderGrid::centeredRowPositionForChild(const RenderBox& child) const
const GridCoordinate& coordinate = cachedGridCoordinate(child);
// The grid items should be inside the grid container's border box, that's why they need to be shifted.
- LayoutUnit startOfRow = m_rowPositions[coordinate.rows.resolvedInitialPosition.toInt()] + marginBeforeForChild(&child);
+ LayoutUnit startOfRow = m_rowPositions[coordinate.rows.resolvedInitialPosition.toInt()] + marginBeforeForChild(child);
LayoutUnit endOfRow = m_rowPositions[coordinate.rows.resolvedFinalPosition.next().toInt()];
- LayoutUnit rowPosition = startOfRow + marginBeforeForChild(&child);
+ LayoutUnit rowPosition = startOfRow + marginBeforeForChild(child);
LayoutUnit offsetFromRowPosition = computeOverflowAlignmentOffset(child.style()->alignSelfOverflowAlignment(), startOfRow, endOfRow, child.logicalHeight());
return rowPosition + offsetFromRowPosition / 2;
« no previous file with comments | « Source/core/rendering/RenderFlexibleBox.cpp ('k') | Source/core/rendering/RenderTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698