Bug 216031

Summary: EventRegion paint should respect layer's foreground and background painting phases
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: ScrollingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, esprehn+autocc, ews-watchlist, fred.wang, glenn, kondapallykalyan, pdr, simon.fraser
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch none

Antti Koivisto
Reported 2020-09-01 03:19:00 PDT
We are currently painting event region for the box background to the foreground layer.
Attachments
patch (15.16 KB, patch)
2020-09-01 03:31 PDT, Antti Koivisto
no flags
Antti Koivisto
Comment 1 2020-09-01 03:19:26 PDT
Antti Koivisto
Comment 2 2020-09-01 03:31:25 PDT
Simon Fraser (smfr)
Comment 3 2020-09-01 09:35:14 PDT
Comment on attachment 407668 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=407668&action=review > Source/WebCore/rendering/RenderBlock.cpp:1140 > + if (paintInfo.eventRegionContext) > + paintInfoForChild.paintBehavior.add(PaintBehavior::EventRegionIncludeBackground); This is pretty weird. I wish event region painting followed normal painting more closely. > Source/WebCore/rendering/RenderLayer.cpp:4654 > + paintBehavior = paintBehavior & PaintBehavior::CompositedOverflowScrollContent; I know you moved this and I added it in r262337 but I don't understand it.
Simon Fraser (smfr)
Comment 4 2020-09-01 09:37:56 PDT
Comment on attachment 407668 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=407668&action=review >> Source/WebCore/rendering/RenderBlock.cpp:1140 >> + paintInfoForChild.paintBehavior.add(PaintBehavior::EventRegionIncludeBackground); > > This is pretty weird. I wish event region painting followed normal painting more closely. Maybe leave it alone so I can decipher it without too many history jumps.
Antti Koivisto
Comment 5 2020-09-01 09:41:31 PDT
> > Source/WebCore/rendering/RenderBlock.cpp:1140 > > + if (paintInfo.eventRegionContext) > > + paintInfoForChild.paintBehavior.add(PaintBehavior::EventRegionIncludeBackground); > > This is pretty weird. I wish event region painting followed normal painting > more closely. It basically just does the same thing the code next to it does with paint phases: newPhase = (newPhase == PaintPhase::ChildBlockBackgrounds) ? PaintPhase::ChildBlockBackground : newPhase; (ChildBlockBackgrounds vs ChildBlockBackground is bit subtle) > I know you moved this and I added it in r262337 but I don't understand it. I suppose the other flags are not relevant for event regions?
EWS
Comment 6 2020-09-01 10:48:42 PDT
Committed r266403: <https://trac.webkit.org/changeset/266403> All reviewed patches have been landed. Closing bug and clearing flags on attachment 407668 [details].
Note You need to log in before you can comment on or make changes to this bug.