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

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

Issue 1651703002: More explicit LayoutUnit conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@evenMoarConstructors
Patch Set: Traits vs Properties vs Pandas 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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index b2e804d8d797b6b21c0b10a64d955d36b2e36a00..e263b1cc7ae2ec3ea8dab6283352c64863316498 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -615,7 +615,7 @@ LayoutUnit LayoutBox::constrainContentBoxLogicalHeightByMinMax(LayoutUnit logica
LayoutUnit availableLogicalHeight = logicalHeight / styleToUse.logicalHeight().value() * 100;
logicalHeight = std::min(logicalHeight, valueForLength(styleToUse.logicalMaxHeight(), availableLogicalHeight));
} else {
- LayoutUnit maxHeight = computeContentLogicalHeight(MaxSize, styleToUse.logicalMaxHeight(), -1);
+ LayoutUnit maxHeight = computeContentLogicalHeight(MaxSize, styleToUse.logicalMaxHeight(), LayoutUnit(-1));
if (maxHeight != -1)
logicalHeight = std::min(logicalHeight, maxHeight);
}
@@ -1037,13 +1037,13 @@ void LayoutBox::setOverrideLogicalContentWidth(LayoutUnit width)
void LayoutBox::clearOverrideLogicalContentHeight()
{
if (m_rareData)
- m_rareData->m_overrideLogicalContentHeight = -1;
+ m_rareData->m_overrideLogicalContentHeight = LayoutUnit(-1);
}
void LayoutBox::clearOverrideLogicalContentWidth()
{
if (m_rareData)
- m_rareData->m_overrideLogicalContentWidth = -1;
+ m_rareData->m_overrideLogicalContentWidth = LayoutUnit(-1);
}
void LayoutBox::clearOverrideSize()

Powered by Google App Engine
This is Rietveld 408576698