-
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.
[Filters] Do not clip the destination context when compositing the fi…
…lter style transparency layers https://bugs.webkit.org/show_bug.cgi?id=261926 rdar://115901634 Reviewed by Simon Fraser. Clipping is not needed at that time because it has to be applied to the filter style transparency layers before drawing the target element. If this unneeded clipping is applied, removing this clipping will overlap with ending the transparency layers. This will end up calling GraphicsContext::restore() with the wrong purpose. Rename FilterTargetSwitcher::needsRedrawSourceImage() to hasSourceImage() and flip its meaning. This will make differentiating software filters from style filters clearer. When hasSourceImage() is true, this means the target element is drawn to an ImageBuffer. * LayoutTests/css3/filters/drop-shadow-child-clipped-expected.html: Added. * LayoutTests/css3/filters/drop-shadow-child-clipped.html: Added. * LayoutTests/fast/filter-image/clipped-filter.html: * Source/WebCore/platform/graphics/filters/FilterImageTargetSwitcher.h: * Source/WebCore/platform/graphics/filters/FilterStyleTargetSwitcher.h: (): Deleted. * Source/WebCore/platform/graphics/filters/FilterTargetSwitcher.h: (WebCore::FilterTargetSwitcher::hasSourceImage const): (WebCore::FilterTargetSwitcher::needsRedrawSourceImage const): Deleted. * Source/WebCore/rendering/RenderLayer.cpp: (WebCore::RenderLayer::applyFilters): * Source/WebCore/rendering/RenderLayerFilters.cpp: (WebCore::RenderLayerFilters::hasSourceImage const): (WebCore::RenderLayerFilters::beginFilterEffect): (WebCore::RenderLayerFilters::needsRedrawSourceImage const): Deleted. * Source/WebCore/rendering/RenderLayerFilters.h: * Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::applyResource): Canonical link: https://commits.webkit.org/268341@main
- Loading branch information
Showing
10 changed files
with
73 additions
and
19 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
LayoutTests/css3/filters/drop-shadow-child-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> | ||
.container { | ||
width: 135px; | ||
height: 100px; | ||
border: gray 1px solid; | ||
overflow: hidden; | ||
} | ||
.box { | ||
width: 45px; | ||
height: 100px; | ||
position: relative; | ||
} | ||
.blue-background { | ||
left: 0; | ||
background: MediumBlue; | ||
} | ||
.red-background { | ||
left: 90px; | ||
top: -100px; | ||
background: crimson; | ||
} | ||
</style> | ||
<body> | ||
<div class="container"> | ||
<div class="box blue-background"></div> | ||
<div class="box red-background"></div> | ||
</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,22 @@ | ||
<!-- webkit-test-runner [ GraphicsContextFiltersEnabled=true ] --> | ||
<style> | ||
.container { | ||
width: 135px; | ||
height: 100px; | ||
border: gray 1px solid; | ||
overflow: hidden; | ||
} | ||
.box { | ||
width: 45px; | ||
height: 100px; | ||
position: relative; | ||
left: 90px; | ||
background: crimson; | ||
filter: drop-shadow(-90px 0 0 MediumBlue); | ||
} | ||
</style> | ||
<body> | ||
<div class="container"> | ||
<div class="box"></div> | ||
</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
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
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
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