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

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

Issue 2566593002: Change handling of sub-pixel borders to round
Patch Set: Change border images to round edges Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6212642cada8bfb2383a3532d4e93c71c47b586e..467dcf20f5b07834a80987fdaf67240b8d428e27 100644
--- a/third_party/WebKit/Source/core/paint/NinePieceImageGrid.cpp
+++ b/third_party/WebKit/Source/core/paint/NinePieceImageGrid.cpp
@@ -20,12 +20,12 @@ static int computeEdgeWidth(const BorderImageLength& borderSlice,
return borderSlice.number() * borderSide;
if (borderSlice.length().isAuto())
return imageSide;
- return valueForLength(borderSlice.length(), LayoutUnit(boxExtent)).toInt();
+ return valueForLength(borderSlice.length(), LayoutUnit(boxExtent)).round();
}
static int computeEdgeSlice(const Length& slice, int maximum) {
return std::min<int>(maximum,
- valueForLength(slice, LayoutUnit(maximum)).toInt());
+ valueForLength(slice, LayoutUnit(maximum)).round());
}
NinePieceImageGrid::NinePieceImageGrid(const NinePieceImage& ninePieceImage,
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698