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

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

Issue 1648573002: Transition to explicit constructors in LayoutUnit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moar tweaks! 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/LayoutDeprecatedFlexibleBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
index 9857cf4b7c912f9f171c47626ca836cbce46a93f..9dc52ea07a452de1efdcbafd9af7919baecc7933 100644
--- a/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
@@ -563,7 +563,7 @@ void LayoutDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
remainingSpace -= (remainingSpace / totalChildren);
--totalChildren;
- placeChild(child, child->location() + LayoutSize(offset, 0));
+ placeChild(child, child->location() + LayoutSize(offset, LayoutUnit()));
}
}
} else {
@@ -575,7 +575,7 @@ void LayoutDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
if (childDoesNotAffectWidthOrFlexing(child))
continue;
- placeChild(child, child->location() + LayoutSize(offset, 0));
+ placeChild(child, child->location() + LayoutSize(offset, LayoutUnit()));
}
}
}
@@ -658,7 +658,7 @@ void LayoutDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren)
switch (style()->boxAlign()) {
case BCENTER:
case BBASELINE: // Baseline just maps to center for vertical boxes
- childX += child->marginLeft() + std::max<LayoutUnit>(0, (contentWidth() - (child->size().width() + child->marginWidth())) / 2);
+ childX += child->marginLeft() + std::max<LayoutUnit>(LayoutUnit(), (contentWidth() - (child->size().width() + child->marginWidth())) / 2);
eae 2016/01/29 03:38:12 Add LayoutUnit() around the non-LayoutUnit value i
break;
case BEND:
if (!style()->isLeftToRightDirection())
@@ -813,7 +813,7 @@ void LayoutDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren)
offset += remainingSpace / totalChildren;
remainingSpace -= (remainingSpace / totalChildren);
--totalChildren;
- placeChild(child, child->location() + LayoutSize(0, offset));
+ placeChild(child, child->location() + LayoutSize(LayoutUnit(), offset));
}
}
} else {
@@ -824,7 +824,7 @@ void LayoutDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren)
for (LayoutBox* child = iterator.first(); child; child = iterator.next()) {
if (childDoesNotAffectWidthOrFlexing(child))
continue;
- placeChild(child, child->location() + LayoutSize(0, offset));
+ placeChild(child, child->location() + LayoutSize(LayoutUnit(), offset));
}
}
}

Powered by Google App Engine
This is Rietveld 408576698