WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 207586
245773
Problem rendering images with drop-shadow filter
https://bugs.webkit.org/show_bug.cgi?id=245773
Summary
Problem rendering images with drop-shadow filter
Miguel Gomez
Reported
2022-09-28 02:36:41 PDT
There's a problem when rendering an image with a drop-shadow filter (I've detected it with images, but there might be other components suffering the same problem too). The problem seems to happen when the image content's load is delayed for some reason. When the image finally loads and gets rendered, the drop-shadow filter won't be properly rendered. This is reproducible on WebKitGTK (with and without AC) ToT, WPE ToT and Safari 15.4 (I could not test ToT for that). I've created a testcase that shows the problem in
https://people.igalia.com/magomez/drop-shadow/index.html
It contains a simple img element with the drop-shadow filter whose src is set a couple of seconds after the page loads. When the src is set and the image loads, only the right part of the drop-shadow will be rendered, while the lower one will be missing. Doing anything that triggers a redraw of the content (like clicking out of browser the window) will properly render the content. I've been debugging this a bit and it seems that when the src is set and the image is loaded, the rectangle passed to GraphicsLayer::setNeedsRepaintInRect() doesn't seem to include the area needed to paint the full drop-shadow filter. It seems to take into account the image size only. In my test, the repaint rectangle position is (8,8) and the size is 1008x200, which completely fits the image, but leaves out the lower part of the filter. During the painting stage the filter rectangle is taken into account, but as we're clipping the rendering to the repaint rectangle, the right part of the filter gets rendered, but the lower part doesn't.
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2022-09-28 10:23:40 PDT
This reproduces in Safari, too.
Alexey Proskuryakov
Comment 2
2022-09-28 10:24:07 PDT
(on macOS Ventura beta, that is).
Simon Fraser (smfr)
Comment 3
2022-09-28 11:33:26 PDT
Dup of
bug 207586
?
Miguel Gomez
Comment 4
2022-09-29 06:19:09 PDT
(In reply to Simon Fraser (smfr) from
comment #3
)
> Dup of
bug 207586
?
I suspect it's the same issue, yes. Let me play a bit with the patch you sent to that bug and see whether it fixes the issue. Also, to check why it makes the some wk2-gtk bot test fail.
Miguel Gomez
Comment 5
2022-09-29 07:54:20 PDT
Yes, same issue as the referenced bug, and also fixed by the proposed patch. Closing this as duplicated. *** This bug has been marked as a duplicate of
bug 207586
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug