Bug 224113

Summary: [AspectRatio] Out-of-flow box with intrinsic width (e.g. <img>) may trigger infinite recursion
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, changseok, esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, pdr, rbuis, simon.fraser, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description zalan 2021-04-02 09:06:22 PDT
<style>
  img {
    aspect-ratio: 1;
    max-width: fit-content;

    top: 0;
    bottom: 0;
    position: absolute;
  }
</style>
<img src="foobar">

<rdar://75877776>
Comment 1 zalan 2021-04-02 09:38:45 PDT
Created attachment 425029 [details]
Patch
Comment 2 Rob Buis 2021-04-02 10:34:38 PDT
Comment on attachment 425029 [details]
Patch

Sorry for that one!
Comment 3 zalan 2021-04-02 10:37:50 PDT
(In reply to Rob Buis from comment #2)
> Comment on attachment 425029 [details]
> Patch
> 
> Sorry for that one!
This is a very peculiar case :) (I myself made this mistake many times -not taking the blockified replaced case into consideration.)
Thanks for the review!
Comment 4 EWS 2021-04-02 12:30:17 PDT
Committed r275430: <https://commits.webkit.org/r275430>

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