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

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

Issue 230403003: [CSS Shapes] large corner radius combined with 0 radius does not wrap properly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use unprefixed version 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 | « LayoutTests/fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-002-expected.html ('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/BoxShape.cpp
diff --git a/Source/core/rendering/shapes/BoxShape.cpp b/Source/core/rendering/shapes/BoxShape.cpp
index 3c1e094d665e123dd1eb9fd8472dedb893e372c2..fe82e857d9a2f56fa3d341f06a9225432a95114a 100644
--- a/Source/core/rendering/shapes/BoxShape.cpp
+++ b/Source/core/rendering/shapes/BoxShape.cpp
@@ -70,7 +70,7 @@ void BoxShape::getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHei
float topCornerMaxY = std::max<float>(marginBounds.topLeftCorner().maxY(), marginBounds.topRightCorner().maxY());
float bottomCornerMinY = std::min<float>(marginBounds.bottomLeftCorner().y(), marginBounds.bottomRightCorner().y());
- if (y1 <= topCornerMaxY && y2 >= bottomCornerMinY) {
+ if (topCornerMaxY <= bottomCornerMinY && y1 <= topCornerMaxY && y2 >= bottomCornerMinY) {
result.append(LineSegment(rect.x(), rect.maxX()));
return;
}
@@ -80,6 +80,12 @@ void BoxShape::getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHei
float minXIntercept;
float maxXIntercept;
+ if (y1 <= marginBounds.topLeftCorner().maxY() && y2 >= marginBounds.bottomLeftCorner().y())
+ x1 = rect.x();
+
+ if (y1 <= marginBounds.topRightCorner().maxY() && y2 >= marginBounds.bottomRightCorner().y())
+ x2 = rect.maxX();
+
if (marginBounds.xInterceptsAtY(y1, minXIntercept, maxXIntercept)) {
x1 = std::min<float>(x1, minXIntercept);
x2 = std::max<float>(x2, maxXIntercept);
« no previous file with comments | « LayoutTests/fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-002-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698