Chromium Code Reviews| Index: Source/core/rendering/ExclusionPolygon.cpp |
| diff --git a/Source/core/rendering/ExclusionPolygon.cpp b/Source/core/rendering/ExclusionPolygon.cpp |
| index 136287ac40f54a90d70754c8defa857add7cc4cd..63eae0140fc811fc9ff82855af9b4e63a1d5c32d 100644 |
| --- a/Source/core/rendering/ExclusionPolygon.cpp |
| +++ b/Source/core/rendering/ExclusionPolygon.cpp |
| @@ -129,6 +129,12 @@ static inline void appendArc(Vector<FloatPoint>& vertices, const FloatPoint& arc |
| vertices.append(endArcVertex); |
| } |
| +static inline void snapVerticesToLayoutUnitGrid(Vector<FloatPoint>& vertices) |
|
Julien - ping for review
2013/04/23 17:09:04
Wouldn't it make more sense to have your vertices
leviw_travelin_and_unemployed
2013/04/23 18:27:20
For the record, I agree that since this issue show
|
| +{ |
| + for (unsigned i = 0; i < vertices.size(); ++i) |
| + vertices[i].set(LayoutUnit(vertices[i].x()).toFloat(), LayoutUnit(vertices[i].y()).toFloat()); |
|
Julien - ping for review
2013/04/23 17:09:04
Note that this could (and will) yield to big round
|
| +} |
| + |
| static inline FloatPolygon* computeShapePaddingBounds(const FloatPolygon& polygon, float padding, WindRule fillRule) |
| { |
| Vector<FloatPoint>* paddedVertices = new Vector<FloatPoint>(); |
| @@ -146,6 +152,7 @@ static inline FloatPolygon* computeShapePaddingBounds(const FloatPolygon& polygo |
| appendArc(*paddedVertices, thisEdge.vertex1(), padding, prevOffsetEdge.vertex2(), thisOffsetEdge.vertex1(), true); |
| } |
| + snapVerticesToLayoutUnitGrid(*paddedVertices); |
| return new FloatPolygon(adoptPtr(paddedVertices), fillRule); |
| } |
| @@ -166,6 +173,7 @@ static inline FloatPolygon* computeShapeMarginBounds(const FloatPolygon& polygon |
| appendArc(*marginVertices, thisEdge.vertex1(), margin, prevOffsetEdge.vertex2(), thisOffsetEdge.vertex1(), false); |
| } |
| + snapVerticesToLayoutUnitGrid(*marginVertices); |
| return new FloatPolygon(adoptPtr(marginVertices), fillRule); |
| } |