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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTable.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/LayoutTable.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.cpp b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
index 1f1e4bf62fd081836b80f4aec997b088476d21c6..7d9621e8ec0dc33907360e7f5a7aa42ca51fb68c 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
@@ -327,7 +327,7 @@ LayoutUnit LayoutTable::convertStyleLogicalWidthToComputedWidth(const Length& st
return computeIntrinsicLogicalWidthUsing(styleLogicalWidth, availableWidth, bordersPaddingAndSpacingInRowDirection());
// HTML tables' width styles already include borders and paddings, but CSS tables' width styles do not.
- LayoutUnit borders = 0;
+ LayoutUnit borders;
bool isCSSTable = !isHTMLTableElement(node());
if (isCSSTable && styleLogicalWidth.isSpecified() && styleLogicalWidth.isPositive() && style()->boxSizing() == CONTENT_BOX)
borders = borderStart() + borderEnd() + (collapseBorders() ? LayoutUnit() : paddingStart() + paddingEnd());
@@ -340,7 +340,7 @@ LayoutUnit LayoutTable::convertStyleLogicalHeightToComputedHeight(const Length&
LayoutUnit borderAndPaddingBefore = borderBefore() + (collapseBorders() ? LayoutUnit() : paddingBefore());
LayoutUnit borderAndPaddingAfter = borderAfter() + (collapseBorders() ? LayoutUnit() : paddingAfter());
LayoutUnit borderAndPadding = borderAndPaddingBefore + borderAndPaddingAfter;
- LayoutUnit computedLogicalHeight = 0;
+ LayoutUnit computedLogicalHeight;
if (styleLogicalHeight.isFixed()) {
// HTML tables size as though CSS height includes border/padding, CSS tables do not.
LayoutUnit borders = LayoutUnit();
@@ -450,8 +450,8 @@ void LayoutTable::layout()
// if ( oldWidth != width() || columns.size() + 1 != columnPos.size() )
m_tableLayout->layout();
- LayoutUnit totalSectionLogicalHeight = 0;
- LayoutUnit oldTableLogicalTop = 0;
+ LayoutUnit totalSectionLogicalHeight;
+ LayoutUnit oldTableLogicalTop;
for (unsigned i = 0; i < m_captions.size(); i++)
oldTableLogicalTop += m_captions[i]->logicalHeight() + m_captions[i]->marginBefore() + m_captions[i]->marginAfter();
@@ -495,7 +495,7 @@ void LayoutTable::layout()
setLogicalHeight(logicalHeight() + borderAndPaddingBefore);
- LayoutUnit computedLogicalHeight = 0;
+ LayoutUnit computedLogicalHeight;
Length logicalHeightLength = style()->logicalHeight();
if (logicalHeightLength.isIntrinsic() || (logicalHeightLength.isSpecified() && logicalHeightLength.isPositive()))
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutRubyRun.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698