Bug 241257

Summary: TextureMapper: if an element has both a mask image and reflection, the part of the reflection isn't painted
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: PlatformAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, don.olmstead, ews-watchlist, kondapallykalyan, luiz, magomez, webkit-bug-importer, zdobersek
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
test case
none
[screenshot] Safari Technology Preview 145
none
[screenshot] WinCairo
none
[screenshot] AppleWin
none
WIP patch
ews-feeder: commit-queue-
WIP patch
none
Patch
none
mask-and-reflection.html none

Description Fujii Hironori 2022-06-02 23:28:01 PDT
Created attachment 459998 [details]
test case

TextureMapper: if a element has both mask image and reflection, the mask image should clip the reflection
Comment 1 Fujii Hironori 2022-06-02 23:35:57 PDT
Created attachment 459999 [details]
[screenshot] Safari Technology Preview 145
Comment 2 Fujii Hironori 2022-06-02 23:44:57 PDT
Created attachment 460000 [details]
[screenshot] WinCairo
Comment 3 Fujii Hironori 2022-06-02 23:49:32 PDT
Created attachment 460001 [details]
[screenshot] AppleWin
Comment 4 Fujii Hironori 2022-06-02 23:51:19 PDT
AppleWin has a bug that it doesn't show the reflection on the first paint.
Resizing window paints the reflection.
Comment 5 Fujii Hironori 2022-06-02 23:51:25 PDT
Google Chrome doesn't paint the reflection in this case.
Comment 6 Fujii Hironori 2022-06-06 17:39:43 PDT
Created attachment 460055 [details]
WIP patch
Comment 7 Fujii Hironori 2022-06-08 23:42:33 PDT
Created attachment 460116 [details]
WIP patch
Comment 8 Fujii Hironori 2022-06-09 15:09:58 PDT
Created attachment 460146 [details]
Patch
Comment 9 Fujii Hironori 2022-06-09 15:11:48 PDT
Created attachment 460148 [details]
mask-and-reflection.html
Comment 10 Radar WebKit Bug Importer 2022-06-09 23:28:12 PDT
<rdar://problem/94788283>
Comment 11 Don Olmstead 2022-06-13 19:56:39 PDT
Comment on attachment 460146 [details]
Patch

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

> Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp:452
> +    static const size_t OverlapRegionConsolidationThreshold = 4;

Where'd this number come from?
Comment 12 Fujii Hironori 2022-06-13 20:09:12 PDT
Comment on attachment 460146 [details]
Patch

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

Thank you for the review.

>> Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp:452
>> +    static const size_t OverlapRegionConsolidationThreshold = 4;
> 
> Where'd this number come from?

I just copied it from TextureMapperLayer::paintUsingOverlapRegions.
It was added by 133852@main.
Comment 13 EWS 2022-06-13 20:34:18 PDT
Committed r295514 (251519@main): <https://commits.webkit.org/251519@main>

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