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

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: 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
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..5e2bbc1fe2752aa17fe1c171a1c46d4af635f923 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.
leviw_travelin_and_unemployed 2013/05/21 19:32:05 I don't fully understand this change... Where did
+ 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);
@@ -507,7 +506,7 @@ bool ExclusionPolygon::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalInte
}
if (firstFitFound)
- result = LayoutUnit::fromFloatCeil(firstFitRect.y());
+ result = ceiledLayoutUnit(firstFitRect.y());
leviw_travelin_and_unemployed 2013/05/21 19:32:05 Are these different on WebKit then? They're the sa
leviw_travelin_and_unemployed 2013/05/21 22:21:56 Avoid this change
return firstFitFound;
}

Powered by Google App Engine
This is Rietveld 408576698