-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ASAN_TRAP | WTF::Vector::expandCapacity; WTF::Vector::expandCapacity;…
… WTF::Vector::appendSlowCase https://bugs.webkit.org/show_bug.cgi?id=271904 rdar://125579928 Reviewed by Antti Koivisto. For https://bugs.webkit.org/show_bug.cgi?id=264639 a fix was done to deal with repeating gradients where a tiny offset range was repeated, causing a large number of items to be added to the stop vector. That fix does not apply when the offset range is reasonable but the maxExtent is large. So, also take the maxExtent into account when deciding whether to produce extra gradient stops. * LayoutTests/fast/css/repeating-radial-gradient-small-range-large-extent-expected.txt: Added. * LayoutTests/fast/css/repeating-radial-gradient-small-range-large-extent.html: Added. * Source/WebCore/rendering/style/StyleGradientImage.cpp: (WebCore::StyleGradientImage::computeStops const): Originally-landed-as: 274097.16@webkit-2024.2-embargoed (c2f3e54dfeed). rdar://128555839 Canonical link: https://commits.webkit.org/279229@main
- Loading branch information
1 parent
90e9616
commit 49088ee
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
LayoutTests/fast/css/repeating-radial-gradient-small-range-large-extent-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This test passess if it doesn't crash. | ||
Repeating Gradient With Many Stops | ||
Repeating Gradient With Many Stops | ||
Repeating Gradient With Many Stops |
23 changes: 23 additions & 0 deletions
23
LayoutTests/fast/css/repeating-radial-gradient-small-range-large-extent.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script> | ||
if (window.testRunner) | ||
testRunner.dumpAsText(); | ||
</script> | ||
<style> | ||
.repeating-gradient-with-suffix-stops { | ||
background: repeating-radial-gradient(circle at center, red 0%, green 0.01%); | ||
} | ||
.repeating-gradient-with-prefix-stops { | ||
background: repeating-radial-gradient(circle at center, red 99.99%, green 100%); | ||
} | ||
.repeating-gradient-with-prefix-and-suffix-stops { | ||
background: repeating-radial-gradient(circle at center, red 50%, green 50.01%); | ||
} | ||
div { | ||
width: 200px; | ||
height: 200000px; | ||
} | ||
</style> | ||
<div>This test passess if it doesn't crash.</div> | ||
<div class="repeating-gradient-with-suffix-stops">Repeating Gradient With Many Stops</div> | ||
<div class="repeating-gradient-with-prefix-stops">Repeating Gradient With Many Stops</div> | ||
<div class="repeating-gradient-with-prefix-and-suffix-stops">Repeating Gradient With Many Stops</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters