Bug 236800 - drop-shadow filter doesn't work correctly in tiled backing layer
Summary: drop-shadow filter doesn't work correctly in tiled backing layer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks: 237849
  Show dependency treegraph
 
Reported: 2022-02-17 12:33 PST by Fujii Hironori
Modified: 2022-03-29 12:50 PDT (History)
16 users (show)

See Also:


Attachments
test case (for low DPI display) (420 bytes, text/html)
2022-02-17 12:33 PST, Fujii Hironori
no flags Details
[screenshot] STP 140 (118.61 KB, image/png)
2022-02-17 12:37 PST, Fujii Hironori
no flags Details
[screenshot] GTK port (18.54 KB, image/png)
2022-02-17 12:41 PST, Fujii Hironori
no flags Details
test case 2 (328 bytes, text/html)
2022-02-17 14:03 PST, Fujii Hironori
no flags Details
WIP patch (1.01 KB, patch)
2022-03-03 22:51 PST, Fujii Hironori
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
WIP patch (1000 bytes, patch)
2022-03-06 15:47 PST, Fujii Hironori
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
WIP patch (1007 bytes, patch)
2022-03-06 16:42 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (5.03 KB, patch)
2022-03-13 14:40 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch for landing (6.53 KB, patch)
2022-03-14 14:03 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch for landing (8.45 KB, patch)
2022-03-28 21:28 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
drop-shadow-in-tiled-backing.html (474 bytes, text/html)
2022-03-28 21:29 PDT, Fujii Hironori
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2022-02-17 12:33:23 PST
drop-shadow filter doesn't work correctly in tiled backing layer
Comment 1 Fujii Hironori 2022-02-17 12:33:37 PST
Created attachment 452412 [details]
test case (for low DPI display)
Comment 2 Fujii Hironori 2022-02-17 12:37:10 PST
Created attachment 452415 [details]
[screenshot] STP 140
Comment 3 Fujii Hironori 2022-02-17 12:41:11 PST
Created attachment 452416 [details]
[screenshot] GTK port
Comment 4 Simon Fraser (smfr) 2022-02-17 13:05:42 PST
There are a number of existing bugs about drop-shadow repaints. This is probably a dup.
Comment 5 Fujii Hironori 2022-02-17 13:13:44 PST
This is not a drop-shadow repainting issue. If the element is painted in another tile, the drop-shadow can't be drawn.
Comment 6 Fujii Hironori 2022-02-17 14:03:25 PST
Created attachment 452430 [details]
test case 2

This issue doesn't need tiled backed layer.
If the element is placed outside of the view, its drop-shadow isn't painted.
Comment 7 Radar WebKit Bug Importer 2022-02-23 15:41:21 PST
<rdar://problem/89382612>
Comment 8 Fujii Hironori 2022-03-03 22:51:34 PST
Created attachment 453816 [details]
WIP patch
Comment 9 Fujii Hironori 2022-03-06 15:47:51 PST
Created attachment 453934 [details]
WIP patch
Comment 10 Fujii Hironori 2022-03-06 16:42:52 PST
Created attachment 453937 [details]
WIP patch
Comment 11 Fujii Hironori 2022-03-06 23:57:12 PST
https://github.com/web-platform-tests/wpt/pull/33080
Comment 12 Simon Fraser (smfr) 2022-03-07 09:29:27 PST
I think I may end up fixing this via bug 207586
Comment 13 Simon Fraser (smfr) 2022-03-07 10:15:58 PST
I tested, and the patch in 207586 fixes the testcase.
Comment 14 Fujii Hironori 2022-03-07 12:18:04 PST
(In reply to Simon Fraser (smfr) from comment #13)
> I tested, and the patch in 207586 fixes the testcase.

Unfortunately, your patch (attachment#454007 [details]) doesn't fix this test https://github.com/web-platform-tests/wpt/pull/33080
Comment 15 Simon Fraser (smfr) 2022-03-07 13:38:52 PST
Seems like we need both fixes.
Comment 16 Simon Fraser (smfr) 2022-03-07 13:39:04 PST
Comment on attachment 453937 [details]
WIP patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453937&action=review

> Source/WebCore/rendering/RenderLayerFilters.cpp:149
> +        LayoutBoxExtent flippedOutsets { outsets.bottom(), outsets.left(), outsets.top(), outsets.right() };

Why the flipping?
Comment 17 Fujii Hironori 2022-03-07 16:20:01 PST
Comment on attachment 453937 [details]
WIP patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453937&action=review

>> Source/WebCore/rendering/RenderLayerFilters.cpp:149
>> +        LayoutBoxExtent flippedOutsets { outsets.bottom(), outsets.left(), outsets.top(), outsets.right() };
> 
> Why the flipping?

If the drop-shadow is cast to the right direction, dirtyRect needs to be extended to left direction to calculate targetBoundingBox.
Comment 18 Fujii Hironori 2022-03-13 14:40:04 PDT
Created attachment 454557 [details]
Patch
Comment 19 EWS Watchlist 2022-03-13 14:42:32 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 20 Fujii Hironori 2022-03-14 14:03:59 PDT
Created attachment 454620 [details]
Patch for landing
Comment 21 Alexey Proskuryakov 2022-03-14 16:11:40 PDT
Comment on attachment 454620 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=454620&action=review

> LayoutTests/platform/ios-wk2/TestExpectations:2223
> +webkit.org/b/237849 imported/w3c/web-platform-tests/css/filter-effects/filters-drop-shadow-003.html [ ImageOnlyFailure ]

Why is it OK to land with this? Seems like a a big problem for this change to not have a test that starts to pass on iOS.
Comment 22 Fujii Hironori 2022-03-14 20:42:34 PDT
Comment on attachment 454620 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=454620&action=review

>> LayoutTests/platform/ios-wk2/TestExpectations:2223
>> +webkit.org/b/237849 imported/w3c/web-platform-tests/css/filter-effects/filters-drop-shadow-003.html [ ImageOnlyFailure ]
> 
> Why is it OK to land with this? Seems like a a big problem for this change to not have a test that starts to pass on iOS.

I don’t think it’s a big problem. iOS has one more problem. This isn’t sufficient for it.
Comment 23 Alexey Proskuryakov 2022-03-15 10:02:34 PDT
I'm not saying that you need to fix all bugs that impact web-platform-tests/css/filter-effects/filters-drop-shadow-003.html in this patch. What I am saying is that I see it as a problem to land a fix that doesn't make any tests go from failing to passing on iOS.
Comment 24 Fujii Hironori 2022-03-28 21:28:59 PDT
Created attachment 455989 [details]
Patch for landing
Comment 25 Fujii Hironori 2022-03-28 21:29:43 PDT
Created attachment 455990 [details]
drop-shadow-in-tiled-backing.html
Comment 26 EWS 2022-03-29 12:50:19 PDT
Committed r292059 (248994@main): <https://commits.webkit.org/248994@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 455989 [details].