Bug 197694

Summary: Event region generation needs to know about backing-sharing
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: CompositingAssignee: Antti Koivisto <koivisto>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue, koivisto, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 197561    
Attachments:
Description Flags
patch
none
patch none

Description Simon Fraser (smfr) 2019-05-08 10:01:02 PDT
When we use backing-store sharing for composting, event region generation also needs to run code to get shared layers to produce event regions.

This will fix fast/scrolling/ios/overflow-scroll-overlap-4.html
Comment 1 Simon Fraser (smfr) 2019-05-08 10:02:43 PDT
For now I'll mark this as a test failure in TestExpectations.
Comment 2 Radar WebKit Bug Importer 2019-05-08 10:03:10 PDT
<rdar://problem/50584991>
Comment 3 Radar WebKit Bug Importer 2019-05-08 10:03:13 PDT
<rdar://problem/50584994>
Comment 4 Antti Koivisto 2019-05-10 00:39:52 PDT
Created attachment 369547 [details]
patch
Comment 5 Antti Koivisto 2019-05-10 01:10:30 PDT
Created attachment 369548 [details]
patch
Comment 6 Anders Carlsson 2019-05-10 07:17:26 PDT
Comment on attachment 369548 [details]
patch

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

> Source/WebCore/rendering/RenderLayerBacking.cpp:1497
> +    for (auto& layerWeakPtr : m_backingSharingLayers)
> +        layerWeakPtr->paintLayerContents(nullContext, paintingInfo, paintFlags);

Do you need to null check layerWeakPtr here?
Comment 7 Antti Koivisto 2019-05-10 08:45:18 PDT
> Do you need to null check layerWeakPtr here?

Nah, weakptrs in this code are just for safety, the logic should guarantee they won't be null here.
Comment 8 Simon Fraser (smfr) 2019-05-10 08:48:16 PDT
Comment on attachment 369548 [details]
patch

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

>> Source/WebCore/rendering/RenderLayerBacking.cpp:1497
>> +        layerWeakPtr->paintLayerContents(nullContext, paintingInfo, paintFlags);
> 
> Do you need to null check layerWeakPtr here?

No, we think that's a correctness bug and are OK with a null-deref crash.

However, this code will be wrong when the sharing layers have transforms. Please file a follow-up bug to fix that. You'll need to use something like I'm adding in bug 197692.
Comment 9 WebKit Commit Bot 2019-05-10 09:20:18 PDT
Comment on attachment 369548 [details]
patch

Clearing flags on attachment: 369548

Committed r245175: <https://trac.webkit.org/changeset/245175>
Comment 10 WebKit Commit Bot 2019-05-10 09:20:20 PDT
All reviewed patches have been landed.  Closing bug.