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

Unified Diff: third_party/WebKit/Source/core/paint/NinePieceImageGrid.cpp

Issue 1660863002: Force all LayoutUnit construction to be explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also fix LayoutRectTest.cpp Created 4 years, 10 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/paint/NinePieceImageGrid.cpp
diff --git a/third_party/WebKit/Source/core/paint/NinePieceImageGrid.cpp b/third_party/WebKit/Source/core/paint/NinePieceImageGrid.cpp
index 28e7b0dd61d78549781acf43befb0dbf954bbf82..2feb67c701d9ea1aeaf2046580b1114798abac6b 100644
--- a/third_party/WebKit/Source/core/paint/NinePieceImageGrid.cpp
+++ b/third_party/WebKit/Source/core/paint/NinePieceImageGrid.cpp
@@ -12,19 +12,19 @@
namespace blink {
-static int computeEdgeWidth(const BorderImageLength& borderSlice, int borderSide, const LayoutUnit& imageSide,
- const LayoutUnit& boxExtent)
+static int computeEdgeWidth(const BorderImageLength& borderSlice, int borderSide, int imageSide,
+ int boxExtent)
{
if (borderSlice.isNumber())
return borderSlice.number() * borderSide;
if (borderSlice.length().isAuto())
return imageSide;
- return valueForLength(borderSlice.length(), boxExtent);
+ return valueForLength(borderSlice.length(), LayoutUnit(boxExtent));
}
-static int computeEdgeSlice(const Length& slice, LayoutUnit maximum)
+static int computeEdgeSlice(const Length& slice, int maximum)
{
- return std::min<int>(maximum, valueForLength(slice, maximum));
+ return std::min<int>(maximum, valueForLength(slice, LayoutUnit(maximum)));
}
NinePieceImageGrid::NinePieceImageGrid(const NinePieceImage& ninePieceImage, IntSize imageSize, IntRect borderImageArea,

Powered by Google App Engine
This is Rietveld 408576698