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

Unified Diff: Source/core/rendering/exclusions/ExclusionPolygon.cpp

Issue 14959014: [CSS Exclusions] Programmatic layout tests fail when subpixel layout is disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated per review feedback. Created 7 years, 7 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 | « LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-right-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/exclusions/ExclusionPolygon.cpp
diff --git a/Source/core/rendering/exclusions/ExclusionPolygon.cpp b/Source/core/rendering/exclusions/ExclusionPolygon.cpp
index 1157041a79855fb6531f1759b801243710e59baf..2e042f2b9b8da910b0dc6ef4868460ddc2539103 100644
--- a/Source/core/rendering/exclusions/ExclusionPolygon.cpp
+++ b/Source/core/rendering/exclusions/ExclusionPolygon.cpp
@@ -31,8 +31,7 @@
#include "core/rendering/exclusions/ExclusionPolygon.h"
#include "core/platform/graphics/LayoutPoint.h"
-
-#include <wtf/MathExtras.h>
+#include "wtf/MathExtras.h"
namespace WebCore {
@@ -120,12 +119,12 @@ static inline void appendArc(Vector<FloatPoint>& vertices, const FloatPoint& arc
if (endAngle < 0)
endAngle += twoPI;
float angle = (startAngle > endAngle) ? (startAngle - endAngle) : (startAngle + twoPI - endAngle);
- const float arcSegmentCount = 5; // An odd number so that one arc vertex will be eactly arcRadius from arcCenter.
- float angle5 = ((padding) ? -angle : twoPI - angle) / arcSegmentCount;
+ const float arcSegmentCount = 6; // An even number so that one arc vertex will be eactly arcRadius from arcCenter.
+ float arcSegmentAngle = ((padding) ? -angle : twoPI - angle) / arcSegmentCount;
vertices.append(startArcVertex);
for (unsigned i = 1; i < arcSegmentCount; ++i) {
- float angle = startAngle + angle5 * i;
+ float angle = startAngle + arcSegmentAngle * i;
vertices.append(arcCenter + FloatPoint(cos(angle) * arcRadius, sin(angle) * arcRadius));
}
vertices.append(endArcVertex);
« no previous file with comments | « LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-right-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698