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

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

Issue 1656743002: Removing more implicit LayoutUnit construction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix additional test Created 4 years, 11 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: third_party/WebKit/Source/core/layout/LayoutGrid.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
index 20617a35e43778a0aa7f3f9cf0fd8d3b1e2edc72..24ea7b282fc4d88a3d2ae6c1d8ccce02ceef10de 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
@@ -559,7 +559,7 @@ void LayoutGrid::computeUsedBreadthOfGridTracks(GridTrackSizingDirection directi
GridTrackSize trackSize = gridTrackSize(direction, trackIndex);
LayoutUnit oldBaseSize = tracks[trackIndex].baseSize();
- LayoutUnit baseSize = std::max<LayoutUnit>(oldBaseSize, flexFraction * trackSize.maxTrackBreadth().flex());
+ LayoutUnit baseSize = std::max(oldBaseSize, LayoutUnit(flexFraction * trackSize.maxTrackBreadth().flex()));
if (LayoutUnit increment = baseSize - oldBaseSize) {
tracks[trackIndex].setBaseSize(baseSize);
freeSpace -= increment;
@@ -1719,7 +1719,7 @@ void LayoutGrid::applyStretchAlignmentToChildIfNeeded(LayoutBox& child)
child.setOverrideLogicalContentHeight(desiredLogicalHeight - child.borderAndPaddingLogicalHeight());
if (desiredLogicalHeight != child.logicalHeight()) {
// TODO (lajava): Can avoid laying out here in some cases. See https://webkit.org/b/87905.
- child.setLogicalHeight(0);
+ child.setLogicalHeight(LayoutUnit());
child.setNeedsLayout(LayoutInvalidationReason::GridChanged);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698