-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Filters] Filters with outsets have to repaint all the filterRegion i…
…f GraphicsStyles are used https://bugs.webkit.org/show_bug.cgi?id=261856 rdar://115817290 Reviewed by Simon Fraser. The bounding box of a target element might all be clipped. But a filter effect, like drop shadow, may still be visible in the current viewport. If GraphicsStyles are used, we need to redraw the whole filterRegion. * LayoutTests/css3/filters/drop-shadow-target-clipped-expected.html: Added. * LayoutTests/css3/filters/drop-shadow-target-clipped.html: Added. * Source/WebCore/rendering/RenderLayerFilters.cpp: (WebCore::RenderLayerFilters::needsRedrawSourceImage const): (WebCore::RenderLayerFilters::beginFilterEffect): * Source/WebCore/rendering/RenderLayerFilters.h: Canonical link: https://commits.webkit.org/268282@main
- Loading branch information
Showing
4 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
LayoutTests/css3/filters/drop-shadow-target-clipped-expected.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,28 @@ | ||
<style> | ||
.box { | ||
width: 300px; | ||
height: 300px; | ||
position: absolute; | ||
} | ||
.background-red { | ||
top: 0; | ||
left: 0; | ||
background-color: red; | ||
} | ||
.background-green { | ||
top: -100px; | ||
left: -100px; | ||
background-color: green; | ||
} | ||
.background-blue { | ||
top: -200px; | ||
left: -200px; | ||
background-color: blue; | ||
} | ||
</style> | ||
<body> | ||
Three overlapping boxes should be displayed. | ||
<div class="box background-red"></div> | ||
<div class="box background-green"></div> | ||
<div class="box background-blue"></div> | ||
</body> |
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,30 @@ | ||
<!-- webkit-test-runner [ GraphicsContextFiltersEnabled=true ] --> | ||
<style> | ||
.box { | ||
width: 300px; | ||
height: 300px; | ||
position: absolute; | ||
background-color: black; | ||
} | ||
.drop-shadow-red { | ||
top: -1000px; | ||
left: -1000px; | ||
filter: drop-shadow(1000px 1000px 0 red); | ||
} | ||
.drop-shadow-green { | ||
top: -1000px; | ||
left: -1000px; | ||
filter: drop-shadow(900px 900px 0 green); | ||
} | ||
.drop-shadow-blue { | ||
top: -1000px; | ||
left: -1000px; | ||
filter: drop-shadow(800px 800px 0 blue); | ||
} | ||
</style> | ||
<body> | ||
Three overlapping boxes should be displayed. | ||
<div class="box drop-shadow-red"></div> | ||
<div class="box drop-shadow-green"></div> | ||
<div class="box drop-shadow-blue"></div> | ||
</body> |
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
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