Changeset 248722 in webkit
- Timestamp:
- Aug 15, 2019 10:20:20 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r248718 r248722 1 2019-08-15 Antti Koivisto <antti@apple.com> 2 3 Negative size box with border radius causes hang under WebCore::approximateAsRegion 4 https://bugs.webkit.org/show_bug.cgi?id=200769 5 <rdar://problem/53380674> 6 7 Reviewed by Alex Christensen. 8 9 * fast/css/border-radius-negative-size-expected.txt: Added. 10 * fast/css/border-radius-negative-size.html: Added. 11 1 12 2019-08-15 Youenn Fablet <youenn@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r248721 r248722 1 2019-08-15 Antti Koivisto <antti@apple.com> 2 3 Negative size box with border radius causes hang under WebCore::approximateAsRegion 4 https://bugs.webkit.org/show_bug.cgi?id=200769 5 <rdar://problem/53380674> 6 7 Reviewed by Alex Christensen. 8 9 If a box's width or height computes negative the rounded border rect will also be negative. 10 This caused near-infinite loop during rounded border region approximation. 11 12 Test: fast/css/border-radius-negative-size.html 13 14 * platform/graphics/RoundedRect.cpp: 15 (WebCore::approximateAsRegion): 16 17 Bail out if the region is empty (which includes negative sizes). 18 For safety also limit the number of rectangles we generate for corner arc approximation. 19 1 20 2019-08-15 Thibault Saunier <tsaunier@igalia.com> 2 21 -
trunk/Source/WebCore/platform/graphics/RoundedRect.cpp
r243680 r248722 311 311 Region region; 312 312 313 if (roundedRect.isEmpty()) 314 return region; 315 313 316 auto& rect = roundedRect.rect(); 314 317 region.unite(enclosingIntRect(rect)); … … 333 336 auto count = (arcLengthFactor + (stepLength / 2)) / stepLength; 334 337 338 constexpr auto maximumCount = 20u; 339 count = std::min(maximumCount, count); 340 335 341 for (auto i = 0u; i < count; ++i) { 336 342 auto angle = fromAngle + (i + 1) * (toAngle - fromAngle) / (count + 1);
Note: See TracChangeset
for help on using the changeset viewer.