Changeset 248743 in webkit
- Timestamp:
- Aug 15, 2019 1:49:56 PM (5 years ago)
- Location:
- branches/safari-608-branch
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-608-branch/LayoutTests/ChangeLog
r248724 r248743 1 2019-08-15 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r248722. rdar://problem/54360866 4 5 Negative size box with border radius causes hang under WebCore::approximateAsRegion 6 https://bugs.webkit.org/show_bug.cgi?id=200769 7 <rdar://problem/53380674> 8 9 Reviewed by Alex Christensen. 10 11 Source/WebCore: 12 13 If a box's width or height computes negative the rounded border rect will also be negative. 14 This caused near-infinite loop during rounded border region approximation. 15 16 Test: fast/css/border-radius-negative-size.html 17 18 * platform/graphics/RoundedRect.cpp: 19 (WebCore::approximateAsRegion): 20 21 Bail out if the region is empty (which includes negative sizes). 22 For safety also limit the number of rectangles we generate for corner arc approximation. 23 24 LayoutTests: 25 26 * fast/css/border-radius-negative-size-expected.txt: Added. 27 * fast/css/border-radius-negative-size.html: Added. 28 29 30 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248722 268f45cc-cd09-0410-ab3c-d52691b4dbfc 31 32 2019-08-15 Antti Koivisto <antti@apple.com> 33 34 Negative size box with border radius causes hang under WebCore::approximateAsRegion 35 https://bugs.webkit.org/show_bug.cgi?id=200769 36 <rdar://problem/53380674> 37 38 Reviewed by Alex Christensen. 39 40 * fast/css/border-radius-negative-size-expected.txt: Added. 41 * fast/css/border-radius-negative-size.html: Added. 42 1 43 2019-08-15 Alan Coon <alancoon@apple.com> 2 44 -
branches/safari-608-branch/Source/WebCore/ChangeLog
r248723 r248743 1 2019-08-15 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r248722. rdar://problem/54360866 4 5 Negative size box with border radius causes hang under WebCore::approximateAsRegion 6 https://bugs.webkit.org/show_bug.cgi?id=200769 7 <rdar://problem/53380674> 8 9 Reviewed by Alex Christensen. 10 11 Source/WebCore: 12 13 If a box's width or height computes negative the rounded border rect will also be negative. 14 This caused near-infinite loop during rounded border region approximation. 15 16 Test: fast/css/border-radius-negative-size.html 17 18 * platform/graphics/RoundedRect.cpp: 19 (WebCore::approximateAsRegion): 20 21 Bail out if the region is empty (which includes negative sizes). 22 For safety also limit the number of rectangles we generate for corner arc approximation. 23 24 LayoutTests: 25 26 * fast/css/border-radius-negative-size-expected.txt: Added. 27 * fast/css/border-radius-negative-size.html: Added. 28 29 30 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248722 268f45cc-cd09-0410-ab3c-d52691b4dbfc 31 32 2019-08-15 Antti Koivisto <antti@apple.com> 33 34 Negative size box with border radius causes hang under WebCore::approximateAsRegion 35 https://bugs.webkit.org/show_bug.cgi?id=200769 36 <rdar://problem/53380674> 37 38 Reviewed by Alex Christensen. 39 40 If a box's width or height computes negative the rounded border rect will also be negative. 41 This caused near-infinite loop during rounded border region approximation. 42 43 Test: fast/css/border-radius-negative-size.html 44 45 * platform/graphics/RoundedRect.cpp: 46 (WebCore::approximateAsRegion): 47 48 Bail out if the region is empty (which includes negative sizes). 49 For safety also limit the number of rectangles we generate for corner arc approximation. 50 1 51 2019-08-15 Alan Coon <alancoon@apple.com> 2 52 -
branches/safari-608-branch/Source/WebCore/platform/graphics/RoundedRect.cpp
r243680 r248743 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.