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

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

Issue 2640143005: Support subpixel layout for borders. (Closed)
Patch Set: Created 3 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/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..32fe90db03dbd54726b2da72ffde3124fbe83f8a 100644
--- a/third_party/WebKit/Source/core/paint/NinePieceImageGrid.cpp
+++ b/third_party/WebKit/Source/core/paint/NinePieceImageGrid.cpp
@@ -17,7 +17,7 @@ static int computeEdgeWidth(const BorderImageLength& borderSlice,
int imageSide,
int boxExtent) {
if (borderSlice.isNumber())
- return borderSlice.number() * borderSide;
+ return roundf(borderSlice.number() * borderSide);
if (borderSlice.length().isAuto())
return imageSide;
return valueForLength(borderSlice.length(), LayoutUnit(boxExtent)).toInt();
eae 2017/01/24 23:57:12 This should probably be .round() now
Karl Øygard 2017/01/27 20:19:27 Done.

Powered by Google App Engine
This is Rietveld 408576698