ASSIGNED 207586
CSS style 'filter: drop-shadow...' does not render correctly without repaint.
https://bugs.webkit.org/show_bug.cgi?id=207586
Summary CSS style 'filter: drop-shadow...' does not render correctly without repaint.
Drew McMurry
Reported 2020-02-11 14:38:22 PST
Created attachment 390427 [details] Animated gif showing the issue. the CSS style 'filter: drop-shadow...' does not render properly. On page load, the styles load and are applied as expected, but as we toggle visibility (this also happens when toggling display none/block), the drop-shadow effect isn't applied until you scroll or resize the window. To be specific, as you toggle the visibility on, there is no drop-shadow until you scroll or resize; as you toggle visibility off, the shadow remains until you scroll or resize. Please see the issue here: https://codepen.io/anon/pen/gNXvQX Safari 12.0 - No Issue Safari 12.1.1 - Broken Safari 12.1.2 - Fixed Safari 13.0.5 - Broken
Attachments
Animated gif showing the issue. (1.24 MB, image/gif)
2020-02-11 14:38 PST, Drew McMurry
no flags
Patch (12.58 KB, patch)
2022-03-07 10:01 PST, Simon Fraser (smfr)
ews-feeder: commit-queue-
Patch (16.28 KB, patch)
2022-03-07 11:58 PST, Simon Fraser (smfr)
zalan: review+
ews-feeder: commit-queue-
Patch (19.33 KB, patch)
2022-03-14 15:02 PDT, Simon Fraser (smfr)
ews-feeder: commit-queue-
Radar WebKit Bug Importer
Comment 1 2020-02-13 11:18:17 PST
Simon Fraser (smfr)
Comment 2 2022-03-03 21:29:32 PST
*** Bug 234639 has been marked as a duplicate of this bug. ***
Simon Fraser (smfr)
Comment 3 2022-03-04 08:33:48 PST
*** This bug has been marked as a duplicate of bug 202472 ***
Simon Fraser (smfr)
Comment 4 2022-03-04 13:37:03 PST
Reopening to track the non-transition repaint issues with drop-shadow.
Simon Fraser (smfr)
Comment 5 2022-03-07 10:01:03 PST
Simon Fraser (smfr)
Comment 6 2022-03-07 11:58:44 PST
zalan
Comment 7 2022-03-07 15:34:19 PST
Comment on attachment 454007 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=454007&action=review > Source/WebCore/rendering/RenderBox.cpp:4998 > + overflowMinX = std::min(overflowMinX, borderBox.x() - ((!isFlipped || isHorizontal) ? filterOutsets.left() : filterOutsets.right())); "!isFlipped || isHorizontal" is a bit odd as horizontal could be flipped too (horizontal-bt, though I don't think any language uses it)so this essentially only flips for vertical writing mode.
Simon Fraser (smfr)
Comment 8 2022-03-14 15:02:08 PDT
Simon Fraser (smfr)
Comment 9 2022-09-10 18:43:53 PDT
Affects these tests: css3/filters/effect-combined-hw.html css3/filters/effect-drop-shadow-hw.html css3/filters/effect-drop-shadow.html
Miguel Gomez
Comment 10 2022-09-29 07:54:20 PDT
*** Bug 245773 has been marked as a duplicate of this bug. ***
Miguel Gomez
Comment 11 2022-09-29 07:57:56 PDT
Folks, what's the plan for this bug? I've tested the patch and it seems to work properly. The new tests fail on the bots cause they are missing expectations for those platforms (as you already know). Is this going to be committed? or is it breaking something that's not mentioned here?
Miguel Gomez
Comment 12 2022-09-29 07:58:51 PDT
(In reply to Miguel Gomez from comment #11) > Folks, what's the plan for this bug? I've tested the patch and it seems to > work properly. The new tests fail on the bots cause they are missing > expectations for those platforms (as you already know). Is this going to be > committed? or is it breaking something that's not mentioned here? Also, anything I can do to help?
Miguel Gomez
Comment 13 2022-10-11 07:33:51 PDT
Folks, I was playing with the patch provided here, and I found a case where this doesn't seem to fix the wrong rendering. I've tested that the rendering is not correct even on macOS Safari 15.4. The test is this: https://certification.bbctvapps.co.uk/act/test/ui/187/css-supports-shadows/ The image should have a drop-shadow filter that's not properly rendered. On GTK and WPE it's not rendered at all, with or without the patch here. On Safari some shadow is rendered, but it's not correct.
Simon Fraser (smfr)
Comment 14 2022-10-11 11:42:38 PDT
Right, the patch is not complete (it doesn't handle invalidation on child elements correctly).
Fujii Hironori
Comment 15 2022-10-11 13:16:53 PDT
It looks like bug#118411.
Vitor Roriz
Comment 16 2023-04-17 07:13:50 PDT
Filipe Norte
Comment 17 2024-01-16 23:54:15 PST
Hello This issue is affecting us. Was wondering if anyone is looking further into this? Thanks
Note You need to log in before you can comment on or make changes to this bug.