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

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

Issue 1653673002: Even more explicit LayoutUnit conversion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moarConstructors
Patch Set: address comments 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/LayoutBlock.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
index 5a6d943d7c540b355485afcf1080643711c11c7f..5c35c56336c57e7e6e853ab5ec790b1498a7874b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -1158,7 +1158,7 @@ LayoutUnit LayoutBlock::marginIntrinsicLogicalWidthForChild(LayoutBox& child) co
// Fixed margins can be added in as is.
Length marginLeft = child.style()->marginStartUsing(style());
Length marginRight = child.style()->marginEndUsing(style());
- LayoutUnit margin = 0;
+ LayoutUnit margin;
if (marginLeft.isFixed())
margin += marginLeft.value();
if (marginRight.isFixed())
@@ -1555,7 +1555,7 @@ void LayoutBlock::dirtyForLayoutFromPercentageHeightDescendants(SubtreeLayoutSco
LayoutUnit LayoutBlock::textIndentOffset() const
{
- LayoutUnit cw = 0;
+ LayoutUnit cw;
if (style()->textIndent().hasPercent())
cw = containingBlock()->availableLogicalWidth();
return minimumValueForLength(style()->textIndent(), cw);
@@ -1981,7 +1981,7 @@ void LayoutBlock::computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth
LayoutObject* child = firstChild();
LayoutBlock* containingBlock = this->containingBlock();
- LayoutUnit floatLeftWidth = 0, floatRightWidth = 0;
+ LayoutUnit floatLeftWidth, floatRightWidth;
while (child) {
// Positioned children don't affect the min/max width. Spanners only affect the min/max
// width of the multicol container, not the flow thread.
@@ -2008,9 +2008,9 @@ void LayoutBlock::computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth
// Fixed margins can be added in as is.
Length startMarginLength = childStyle->marginStartUsing(&styleToUse);
Length endMarginLength = childStyle->marginEndUsing(&styleToUse);
- LayoutUnit margin = 0;
- LayoutUnit marginStart = 0;
- LayoutUnit marginEnd = 0;
+ LayoutUnit margin;
+ LayoutUnit marginStart;
+ LayoutUnit marginEnd;
if (startMarginLength.isFixed())
marginStart += startMarginLength.value();
if (endMarginLength.isFixed())
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698