Bug 231014

Summary: Move canCompositeClipPath to RenderLayer
Product: WebKit Reporter: Rob Buis <rbuis>
Component: Layout and RenderingAssignee: Rob Buis <rbuis>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, changseok, esprehn+autocc, ews-watchlist, fred.wang, glenn, kondapallykalyan, pdr, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Rob Buis 2021-09-30 02:37:13 PDT
Move canCompositeClipPath to RenderLayer.
Comment 1 Rob Buis 2021-09-30 02:39:17 PDT
Created attachment 439710 [details]
Patch
Comment 2 Simon Fraser (smfr) 2021-09-30 10:05:16 PDT
Comment on attachment 439710 [details]
Patch

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

> Source/WebCore/rendering/RenderLayer.h:241
> +    bool canCompositeClipPath() const;

Moving it here has added ambiguity. It's not clear if this is "if this layer were composited, can it composite clip-path", or "is this layer composited and has a clip path and can composite it".
Comment 3 Rob Buis 2021-09-30 10:18:57 PDT
Created attachment 439751 [details]
Patch
Comment 4 Rob Buis 2021-09-30 10:23:52 PDT
Comment on attachment 439710 [details]
Patch

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

>> Source/WebCore/rendering/RenderLayer.h:241
>> +    bool canCompositeClipPath() const;
> 
> Moving it here has added ambiguity. It's not clear if this is "if this layer were composited, can it composite clip-path", or "is this layer composited and has a clip path and can composite it".

Fair enough, I did another stab.
To be clear, what I do not like about current code:
- unneeded layer accessing
- unneeded ASSERTs
Of these to me the ASSERTs are more annoying. Note that this is not high priority at all but let me know if you think we can make this code a bit nicer/more efficient this way or some other.
Comment 5 Rob Buis 2021-09-30 10:24:45 PDT
Comment on attachment 439710 [details]
Patch

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

>>> Source/WebCore/rendering/RenderLayer.h:241
>>> +    bool canCompositeClipPath() const;
>> 
>> Moving it here has added ambiguity. It's not clear if this is "if this layer were composited, can it composite clip-path", or "is this layer composited and has a clip path and can composite it".
> 
> Fair enough, I did another stab.
> To be clear, what I do not like about current code:
> - unneeded layer accessing
> - unneeded ASSERTs
> Of these to me the ASSERTs are more annoying. Note that this is not high priority at all but let me know if you think we can make this code a bit nicer/more efficient this way or some other.

Nm, thanks :)
Comment 6 Rob Buis 2021-09-30 10:24:45 PDT
Comment on attachment 439710 [details]
Patch

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

>>> Source/WebCore/rendering/RenderLayer.h:241
>>> +    bool canCompositeClipPath() const;
>> 
>> Moving it here has added ambiguity. It's not clear if this is "if this layer were composited, can it composite clip-path", or "is this layer composited and has a clip path and can composite it".
> 
> Fair enough, I did another stab.
> To be clear, what I do not like about current code:
> - unneeded layer accessing
> - unneeded ASSERTs
> Of these to me the ASSERTs are more annoying. Note that this is not high priority at all but let me know if you think we can make this code a bit nicer/more efficient this way or some other.

Nm, thanks :)
Comment 7 EWS 2021-09-30 14:20:41 PDT
Committed r283340 (242357@main): <https://commits.webkit.org/242357@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 439751 [details].
Comment 8 Radar WebKit Bug Importer 2021-09-30 14:21:14 PDT
<rdar://problem/83737585>