Bug 224113 - [AspectRatio] Out-of-flow box with intrinsic width (e.g. <img>) may trigger infinite recursion
Summary: [AspectRatio] Out-of-flow box with intrinsic width (e.g. <img>) may trigger i...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-02 09:06 PDT by zalan
Modified: 2021-04-02 12:30 PDT (History)
10 users (show)

See Also:


Attachments
Patch (3.80 KB, patch)
2021-04-02 09:38 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].