mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
gfx: Fix a nasty bug whereby the transient clip was not always removed,
causing elements to be randomly clipped out. Improves Wikipedia, Reddit, etc.
This commit is contained in:
parent
dea8375613
commit
b22b29533a
1 changed files with 6 additions and 0 deletions
|
@ -814,6 +814,12 @@ impl<'a> PaintContext<'a> {
|
|||
|
||||
pub fn get_or_create_temporary_draw_target(&mut self, opacity: AzFloat) -> DrawTarget {
|
||||
if opacity == 1.0 {
|
||||
// Reuse the draw target, but remove the transient clip. If we don't do the latter,
|
||||
// we'll be in a state whereby the paint subcontext thinks it has no transient clip
|
||||
// (see `StackingContext::optimize_and_draw_into_context`) but it actually does,
|
||||
// resulting in a situation whereby display items are seemingly randomly clipped out.
|
||||
self.remove_transient_clip_if_applicable();
|
||||
|
||||
return self.draw_target.clone()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue