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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutFileUploadControl.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/LayoutFileUploadControl.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutFileUploadControl.cpp b/third_party/WebKit/Source/core/layout/LayoutFileUploadControl.cpp
index 03dd133144a39b7a0c590f4641ad6e280d155ff6..a3ef44c99b0ee0d1c73684a82dffdc501a88984d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutFileUploadControl.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutFileUploadControl.cpp
@@ -99,7 +99,7 @@ void LayoutFileUploadControl::computeIntrinsicLogicalWidths(LayoutUnit& minLogic
if (LayoutObject* buttonLayoutObject = button->layoutObject())
defaultLabelWidth += buttonLayoutObject->maxPreferredLogicalWidth() + afterButtonSpacing;
}
- maxLogicalWidth = static_cast<int>(ceilf(std::max(minDefaultLabelWidth, defaultLabelWidth)));
+ maxLogicalWidth = LayoutUnit(ceilf(std::max(minDefaultLabelWidth, defaultLabelWidth)));
if (!style()->width().hasPercent())
minLogicalWidth = maxLogicalWidth;
@@ -109,8 +109,8 @@ void LayoutFileUploadControl::computePreferredLogicalWidths()
{
ASSERT(preferredLogicalWidthsDirty());
- m_minPreferredLogicalWidth = 0;
- m_maxPreferredLogicalWidth = 0;
+ m_minPreferredLogicalWidth = LayoutUnit();
+ m_maxPreferredLogicalWidth = LayoutUnit();
const ComputedStyle& styleToUse = styleRef();
if (styleToUse.width().isFixed() && styleToUse.width().value() > 0)
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698