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

Unified Diff: Source/core/rendering/shapes/Shape.cpp

Issue 237123002: Fix off-by-one error in RasterShape of CSS shapes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing space Created 6 years, 8 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
« no previous file with comments | « Source/core/rendering/shapes/RasterShape.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/shapes/Shape.cpp
diff --git a/Source/core/rendering/shapes/Shape.cpp b/Source/core/rendering/shapes/Shape.cpp
index 7c1f5276af173e433225167f04c3a5ce6f6c6ccd..4cfdbdafe996efcdeceaeb0e8c7c5f29ed50bae6 100644
--- a/Source/core/rendering/shapes/Shape.cpp
+++ b/Source/core/rendering/shapes/Shape.cpp
@@ -202,7 +202,8 @@ PassOwnPtr<Shape> Shape::createRasterShape(Image* image, float threshold, const
if (startX == -1 && alphaAboveThreshold) {
startX = x;
} else if (startX != -1 && (!alphaAboveThreshold || x == imageRect.width() - 1)) {
- intervals->intervalAt(y + imageRect.y()).unite(IntShapeInterval(startX + imageRect.x(), x + imageRect.x()));
+ int endX = alphaAboveThreshold ? x + 1 : x;
+ intervals->intervalAt(y + imageRect.y()).unite(IntShapeInterval(startX + imageRect.x(), endX + imageRect.x()));
startX = -1;
}
}
« no previous file with comments | « Source/core/rendering/shapes/RasterShape.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698